This commit is contained in:
liushuai
2019-07-16 10:35:40 +08:00
parent 75990cd509
commit a462cd826d
3 changed files with 28 additions and 22 deletions

View File

@@ -3,7 +3,7 @@
<el-card>
<el-row>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1();searchTable2()">
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable1()">
<el-option
v-for="item in machineNumber"
:key="item.value"
@@ -207,26 +207,30 @@ export default {
} else {
searchTable1(this.machineNumberValue, this.check2).then(response => {
this.tableData1 = response.data
}).then(() => {
this.searchTable2()
})
}
},
searchTable2() {
this.tableData2 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
searchTable2(this.machineNumberValue, this.check2).then(response => {
this.tableData2 = response.data
this.tableData2.map(v => {
if (v.组件是否完成 === null || v.组件是否完成 === 0) {
this.$set(v, 'buttonStatus', 1)
} else if (v.组件是否完成 === 1) {
this.$set(v, 'buttonStatus', 2)
} else {
this.$set(v, 'buttonStatus', 3)
}
return v
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
this.check2 = 1
searchTable2(this.machineNumberValue, this.check2).then(response => {
console.log(response.data, 111)
this.tableData2 = response.data
this.tableData2.map(v => {
if (v.组件是否完成 === null || v.组件是否完成 === 0) {
this.$set(v, 'buttonStatus', 1)
} else if (v.组件是否完成 === 1) {
this.$set(v, 'buttonStatus', 2)
} else {
this.$set(v, 'buttonStatus', 3)
}
return v
})
})
})
} else { this.check2 = 0 }
},
// 总装开始装配
handlestart_1(row) { // 弹出单据编辑

View File

@@ -145,9 +145,11 @@ export default {
time1: '',
time2: '',
time3: '',
time4: '',
time11: '',
time22: '',
time33: '',
time44: '',
pageCurrent: 1,
pageSize: 10,
total: 0,
@@ -181,6 +183,7 @@ export default {
this.time1 = response.data.rows[0].运行持续时间
this.time2 = response.data.rows[0].等待持续时间
this.time3 = response.data.rows[0].停机持续时间
this.time4 = response.data.rows[0].报警持续时间
}).then(() => {
this.drawLine1()
})
@@ -188,6 +191,7 @@ export default {
this.time11 = response.data[0].运行持续时间
this.time22 = response.data[0].等待持续时间
this.time33 = response.data[0].停机持续时间
this.time44 = response.data[0].报警持续时间
}).then(() => {
this.drawLine2()
})
@@ -287,8 +291,8 @@ export default {
},
drawLine1() {
const myChart = this.$echarts.init(document.getElementById('myChart1'))
const xData = ['运行', '等待', '停机']
const lineData = [{ name: '运行', value: this.time1 }, { name: '等待', value: this.time2 }, { name: '停机', value: this.time3 }]
const xData = ['运行', '等待', '停机', '报警']
const lineData = [{ name: '运行', value: this.time1 }, { name: '等待', value: this.time2 }, { name: '停机', value: this.time3 }, { name: '报警', value: this.time4 }]
myChart.clear()
myChart.setOption({
title: {
@@ -327,8 +331,8 @@ export default {
},
drawLine2() {
const myChart = this.$echarts.init(document.getElementById('myChart2'))
const xData = ['运行', '等待', '停机']
const lineData = [{ name: '运行', value: this.time11 }, { name: '等待', value: this.time22 }, { name: '停机', value: this.time33 }]
const xData = ['运行', '等待', '停机', '报警']
const lineData = [{ name: '运行', value: this.time11 }, { name: '等待', value: this.time22 }, { name: '停机', value: this.time33 }, { name: '报警', value: this.time44 }]
myChart.clear()
myChart.setOption({
title: {
@@ -416,7 +420,7 @@ export default {
legend: {
orient: 'vertical',
x: 'left',
data: ['运行', '停机', '等待']
data: ['运行', '停机', '等待', '报警']
},
dataZoom: [{
type: 'inside',

View File

@@ -20,14 +20,12 @@
style="margin-left: 10px"
@click="pageCurrent00=1;pageSize00=10;total00=0;searchTable00()">查询</el-button>
<el-button
:disabled="groupPartNumGroup.length===0"
type="primary"
size="small"
icon="el-icon-edit"
style="margin-left: 10px"
@click="changeInquiryStatus">变更询价状态</el-button>
<el-button
:disabled="tableData02.length===0"
type="primary"
size="small"
icon="el-icon-menu"