|
|
|
|
@ -17,7 +17,7 @@ |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-dialog title="生成曲线" append-to-body v-model="lineBox" fullscreen width="70%"> |
|
|
|
|
<el-form :inline="true" v-model="lineForm" label-width="80px"> |
|
|
|
|
<el-form :inline="true" ref="lineForm" :model="lineForm" :rules="lineRules" label-width="80px"> |
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="作业中心" prop="wcId"> |
|
|
|
|
@ -108,6 +108,10 @@ export default { |
|
|
|
|
form: {}, |
|
|
|
|
query: {}, |
|
|
|
|
lineForm: {}, |
|
|
|
|
lineRules:{ |
|
|
|
|
wcId:[{ required: true, message: '请选择作业中心', trigger: 'blur' }], |
|
|
|
|
timeRange:[{ required: true, message: '请选择时间范围', trigger: 'blur' }], |
|
|
|
|
}, |
|
|
|
|
nameForm: {}, |
|
|
|
|
detailBox: false, |
|
|
|
|
detailForm: {}, |
|
|
|
|
@ -262,17 +266,21 @@ export default { |
|
|
|
|
this.lineBox = true |
|
|
|
|
}, |
|
|
|
|
createLine(){ |
|
|
|
|
createLineList({ |
|
|
|
|
workCenterId:this.lineForm.wcId, |
|
|
|
|
createTimeStart:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[0] , |
|
|
|
|
createTimeEnd:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[1] , |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('res--------------',res) |
|
|
|
|
this.isShowBox = true |
|
|
|
|
this.lineData = res.data.data.waveData |
|
|
|
|
this.$nextTick(() =>{ |
|
|
|
|
this.createChart() |
|
|
|
|
}) |
|
|
|
|
this.$refs.lineForm.validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
createLineList({ |
|
|
|
|
workCenterId:this.lineForm.wcId, |
|
|
|
|
createTimeStart:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[0] , |
|
|
|
|
createTimeEnd:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[1] , |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('res--------------',res) |
|
|
|
|
this.isShowBox = true |
|
|
|
|
this.lineData = res.data.data.waveData |
|
|
|
|
this.$nextTick(() =>{ |
|
|
|
|
this.createChart() |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
@ -443,7 +451,7 @@ export default { |
|
|
|
|
|
|
|
|
|
const option = { |
|
|
|
|
title: { |
|
|
|
|
text: item.workTankName + item.testElement, |
|
|
|
|
text: item.workTankName ? item.workTankName + item.testElement : item.testElement, |
|
|
|
|
left: "center", |
|
|
|
|
}, |
|
|
|
|
legend: { |
|
|
|
|
|