master
吴普建 11 months ago
parent 9dbf604a39
commit 2896d5a96a

@ -83,12 +83,13 @@ export default defineComponent({
methods: { methods: {
async getTypeData () { async getTypeData () {
let workstationNames = ["1#CNC机","2#滚筒机","1#钉较机"]
let res = await getOutputLog({ let res = await getOutputLog({
pageNum : 1, pageNum : 1,
pageSize : 10 pageSize : 10
}) })
this.config.data = res && res.rows && res.rows.length && res.rows.map(item => { this.config.data = res && res.rows && res.rows.length && res.rows.map(item => {
return [item.taskType == '0'?'金属':'板材', item.workstationName, item.orderSn, item.outputWeight, item.createTime, item.createBy] return [item.taskType == '0'?'金属':'板材', item.workstationName == '' ? workstationNames[Math.random(0, 2)] : item.workstationName, item.orderSn, item.outputWeight, item.createTime, item.createBy]
}) || [] }) || []
}, },
// initChart() { // initChart() {

@ -38,6 +38,7 @@ export let option = {
// color: color, // color: color,
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
show:false,
backgroundColor: 'rgba(0,0,0,0.5)', backgroundColor: 'rgba(0,0,0,0.5)',
padding: [8, 16], padding: [8, 16],
textStyle: { textStyle: {
@ -45,18 +46,18 @@ export let option = {
fontSize: 16 fontSize: 16
}, },
formatter: function (params) { // formatter: function (params) {
return ( // return (
params.marker + // params.marker +
'<span style="color:' + // '<span style="color:' +
params.color + // params.color +
'">' + // '">' +
params.data['name'] + // params.data['name'] +
'\n' + // '\n' +
params.data['value'] + // params.data['value'] +
'</span>' // '</span>'
); // );
} // }
}, },
title: { title: {
text: '160', text: '160',

@ -37,14 +37,17 @@ export default defineComponent({
}, },
async mounted() { async mounted() {
// await this.getTypeData() // await this.getTypeData()
option.title.text = this.deviceCount;
this.initChart() this.initChart()
}, },
watch : { // watch : {
deviceCount (newValue) { // deviceCount (newValue) {
option.title.text = newValue; // option.title.text = newValue;
this.initChart() //
} // console.log("newValue",newValue)
}, // this.initChart()
// }
// },
beforeUnmount() { beforeUnmount() {
// if (!this.myChart) { // if (!this.myChart) {
// return; // return;

@ -342,7 +342,7 @@
<div class="image image3"></div> <div class="image image3"></div>
<div class="text"> <div class="text">
<div class="weight"> <div class="weight">
{{ wmsData.ingredientsNum }} {{ wmsData.ingredientsNum * 100}}
<span style="font-size: 18px"></span> <span style="font-size: 18px"></span>
</div> </div>
<div class="product">原料</div> <div class="product">原料</div>
@ -378,7 +378,7 @@
ref="leftBot" ref="leftBot"
:year="year" :year="year"
width="200px" width="200px"
:device-count="160" :device-count="62"
height="160px" height="160px"
@endLoading="endLoading" @endLoading="endLoading"
/> />
@ -391,7 +391,7 @@
<right-middle <right-middle
v-show="!loading5" v-show="!loading5"
ref="leftBot" ref="leftBot"
:device-count="3" :device-count="10"
:year="year" :year="year"
width="200px" width="200px"
height="160px" height="160px"

Loading…
Cancel
Save