diff --git a/src/views/base/equipmentBindGroup/index.vue b/src/views/base/equipmentBindGroup/index.vue index 33477279..bab7525f 100644 --- a/src/views/base/equipmentBindGroup/index.vue +++ b/src/views/base/equipmentBindGroup/index.vue @@ -303,7 +303,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除设备与分组绑定编号为"' + id + '"的数据项?') + .confirm('是否确认删除该分组绑定?') .then(function () { return deleteEquipmentBindGroup(id); }) diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index 87695fb6..3364c914 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -118,12 +118,12 @@ export default { { width: 128, prop: 'workTime', - label: '工作时长', + label: '工作时长[h]', }, { width: 128, prop: 'workRate', - label: '百分比', + label: '百分比[%]', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, ], @@ -134,9 +134,9 @@ export default { { width: 128, prop: 'stopTime', - label: '停机时长', + label: '停机时长[h]', }, - { width: 128, prop: 'stopRate', label: '百分比' }, + { width: 128, prop: 'stopRate', label: '百分比[%]' }, ], }, { @@ -145,10 +145,10 @@ export default { { width: 128, prop: 'downTime', - label: '故障时长', + label: '故障时长[h]', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, - { width: 128, prop: 'downRate', label: '百分比' }, + { width: 128, prop: 'downRate', label: '百分比[%]' }, { width: 128, prop: 'timeEfficiency', diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue index a7afb2df..c3d38562 100644 --- a/src/views/equipment/analysis/exception/index.vue +++ b/src/views/equipment/analysis/exception/index.vue @@ -155,7 +155,7 @@ export default { async getList() { this.loading = true; // 执行查询 - const { data } = await this.$axios({ + const { code, data } = await this.$axios({ url: '/analysis/equipment-analysis/efficiency', method: 'get', params: { @@ -163,6 +163,11 @@ export default { recordTime: this.queryParams.recordTime || null, }, }); + if (code === 0) { + this.list = data; + } else { + this.list.splice(0); + } }, handleSearchBarBtnClick(btn) { diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue index 025af935..60107a51 100644 --- a/src/views/equipment/analysis/quality/components/lineChart.vue +++ b/src/views/equipment/analysis/quality/components/lineChart.vue @@ -43,7 +43,7 @@ export default { eq.okQuantity, eq.nokQuantity, eq.totalQuantity, - eq.passRate.toFixed(2), + eq.passRate.toFixed(4), ]); }); return { @@ -53,6 +53,30 @@ export default { axisPointer: { type: 'shadow', }, + formatter: (params) => { + const name = params[0].name; + const goodRate = opt.find((item) => item[0] == name)[4]; + return ` +

${ + params[0].axisValue + } ${goodRate}%

+ + `; + }, }, legend: { itemWidth: 12, @@ -110,17 +134,17 @@ export default { stack: 's', data: opt.map((item) => item[2]), }, - { - name: '加工数量', - type: 'bar', - barWidth: 20, - data: opt.map((item) => item[3]), - }, - { - name: '合格率', - type: 'line', - data: opt.map((item) => item[4]), - }, + // { + // name: '加工数量', + // type: 'bar', + // barWidth: 20, + // data: opt.map((item) => item[3]), + // }, + // { + // name: '合格率', + // type: 'line', + // data: opt.map((item) => item[4]), + // }, ], }; }, diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index bec2ed0a..4c1d6d6c 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -31,7 +31,8 @@
各设备加工数量
- + +
diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue index 2c01dffd..829bf109 100644 --- a/src/views/equipment/timing-diagram/output/index.vue +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -8,7 +8,7 @@ + + diff --git a/src/views/quality/monitoring/qualityInspectionRecord/index.vue b/src/views/quality/monitoring/qualityInspectionRecord/index.vue index 9aef665c..8dec558e 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/index.vue +++ b/src/views/quality/monitoring/qualityInspectionRecord/index.vue @@ -39,7 +39,7 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - + @@ -53,14 +53,15 @@ import { getQualityInspectionRecordPage, exportQualityInspectionRecordExcel, } from '@/api/monitoring/qualityInspectionRecord'; -import Editor from '@/components/Editor'; +// import Editor from '@/components/Editor'; import moment from 'moment'; +import DialogForm from './dialogForm.vue'; import basicPageMixin from '@/mixins/lb/basicPageMixin'; export default { name: 'QualityInspectionRecord', components: { - Editor, + DialogForm, }, mixins: [basicPageMixin], data() { @@ -272,32 +273,38 @@ export default { }, created() { this.getList(); - this.getProductLineList(); + // this.getProductLineList(); }, watch: { - // 注册弹窗里产线改变时的监听事件 - 'form.productionLineId': { + form: { handler: function (val) { - if (val == null) return; - this.$axios('/base/workshop-section/listByParentId', { - params: { - id: val, - }, - }).then((response) => { - this.$set( - this.rows[1][1], // 这里索引是硬编码,所以当 this.rows 里数据顺序改变时,此处也要改 - 'options', - response.data.map((item) => { - return { - label: item.name, - value: item.id, - }; - }) - ); - }); + console.log('form change:', val); }, - immediate: true, - }, + deep: true + } + // 注册弹窗里产线改变时的监听事件 + // 'form.productionLineId': { + // handler: function (val) { + // if (val == null) return; + // this.$axios('/base/workshop-section/listByParentId', { + // params: { + // id: val, + // }, + // }).then((response) => { + // this.$set( + // this.rows[1][1], // 这里索引是硬编码,所以当 this.rows 里数据顺序改变时,此处也要改 + // 'options', + // response.data.map((item) => { + // return { + // label: item.name, + // value: item.id, + // }; + // }) + // ); + // }); + // }, + // immediate: true, + // }, }, methods: { /** 获取搜索栏的产线列表 */ @@ -366,7 +373,11 @@ export default { const id = row.id; getQualityInspectionRecord(id).then((response) => { /** 因为后端返回的时间是时间戳格式,需转换 */ - this.form = this.filterData(response.data, Object.keys(this.form)); + const info = {} + Object.keys(this.form).forEach(key => { + info[key] = response.data[key] + }); + this.form = info; this.open = true; this.title = '修改质量检查信息记录表'; }); diff --git a/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue b/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue index b982bcf0..71de4946 100644 --- a/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue +++ b/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue @@ -147,7 +147,7 @@ export default { }, yAxis: { type: 'value', - name: '单位/片', + name: '检测数量', nameTextStyle: { color: '#999', fontSize: 14,