From 8fd1504dc0f4a88a1b3a0098bd9d5317541f21fb Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 4 Aug 2023 16:51:26 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=A3=80=E6=B5=8B=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/summaryTable.vue | 8 +- .../monitoring/qualityStatistics/index.vue | 181 +++++++++++++----- 2 files changed, 140 insertions(+), 49 deletions(-) diff --git a/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue b/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue index ebffc73b..dad49dac 100644 --- a/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue +++ b/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue @@ -26,7 +26,12 @@ export default { name: 'SummaryTable', components: {}, - props: {}, + props: { + list: { + type: Array, + default: () => [], + }, + }, data() { return { queryParams: { @@ -60,7 +65,6 @@ export default { align: 'center', }, ], - list: [{}], }; }, computed: {}, diff --git a/src/views/quality/monitoring/qualityStatistics/index.vue b/src/views/quality/monitoring/qualityStatistics/index.vue index 97f6440e..f66fad69 100644 --- a/src/views/quality/monitoring/qualityStatistics/index.vue +++ b/src/views/quality/monitoring/qualityStatistics/index.vue @@ -40,7 +40,7 @@ @close="handleSummaryClose" @cancel="handleSummaryClose" @confirm="handleSummaryClose"> - + @@ -106,7 +106,7 @@ export default { tableProps: [ { width: 160, - prop: 'inspectionDetContent', + prop: 'content', label: '检测内容', align: 'center', }, @@ -163,56 +163,56 @@ export default { prop: 'typeTotal', label: '检测类型总数', align: 'center', - subcomponent: { - name: 'TextOnly', - props: { - injectData: { - type: Object, - default: () => ({}), - }, - }, - data() { - return { - text: '各产线相加数量', - }; - }, - methods: { - handleEmit(payload) { - console.log('handleEmit', payload); - }, - }, - render(h) { - return h('el-button', { props: { type: 'text' } }, this.text); - }, - }, + // subcomponent: { + // name: 'TextOnly', + // props: { + // injectData: { + // type: Object, + // default: () => ({}), + // }, + // }, + // data() { + // return { + // text: '各产线相加数量', + // }; + // }, + // methods: { + // handleEmit(payload) { + // console.log('handleEmit', payload); + // }, + // }, + // render(h) { + // return h('el-button', { props: { type: 'text' } }, this.text); + // }, + // }, }, { width: 128, prop: 'ratio', label: '比例', align: 'center', - subcomponent: { - name: 'TextOnly', - props: { - injectData: { - type: Object, - default: () => ({}), - }, - }, - data() { - return { - text: '比例', - }; - }, - methods: { - handleEmit(payload) { - console.log('handleEmit', payload); - }, - }, - render(h) { - return h('el-button', { props: { type: 'text' } }, this.text); - }, - }, + // subcomponent: { + // name: 'TextOnly', + // props: { + // injectData: { + // type: Object, + // default: () => ({}), + // }, + // }, + // data() { + // return { + // text: '比例', + // }; + // }, + // methods: { + // handleEmit(payload) { + // console.log('handleEmit', payload); + // }, + // }, + // render(h) { + // return h('el-button', { props: { type: 'text' } }, this.text); + // }, + // }, }, ], // 查询参数 @@ -220,15 +220,101 @@ export default { pageNo: 1, pageSize: 10, }, - list: [], + summaryList: [], summaryOpen: false, + list: [ + /** mock data */ + { + content: 'asdfasdf', + line1: '', + line2: '', + line3: '', + line4: '', + line5: '', + line6: '', + line7: '', + line8: '', + line9: '', + line10: '', + typeTotal: 100, + ratio: '93%', + }, + { + content: 'fdasfs', + line1: '', + line2: '', + line3: '', + line4: '', + line5: '', + line6: '', + line7: '', + line8: '', + line9: '', + line10: '', + typeTotal: 100, + ratio: '93%', + }, + { + content: 'asdfdfffffff', + line1: '', + line2: '', + line3: '', + line4: '', + line5: '', + line6: '', + line7: '', + line8: '', + line9: '', + line10: '', + typeTotal: 100, + ratio: '93%', + }, + ], }; }, computed: {}, + mounted() { + this.getList(); + }, methods: { + getList() { + this.getSummaryList(); + this.getDetailedList(); + }, + /** 获取 检测总数 列表 */ + async getSummaryList() { + const response = await this.$axios( + '/monitoring/statistical-data/getUpPart', + { + params: { + startTime: '2023-07-01 00:00:00', + endTime: '2023-08-10 00:00:00', + }, + } + ); + this.summaryList = response.data; + }, + /** 获取 检测内容和产线关联 列表 */ + async getDetailedList() { + const { + data: { data, otherList, otherMap, nameData }, + } = await this.$axios('/monitoring/statistical-data/getDownPart', { + params: { + startTime: '2023-07-01 00:00:00', + endTime: '2023-08-10 00:00:00', + }, + }); + // this.list = response.data; + console.log("data", data); + console.log("otherList", otherList); + console.log("otherMap", otherMap); + console.log("nameData", nameData); + }, + /** 总览关闭 */ handleSummaryClose() { this.summaryOpen = false; }, + /** 搜索按钮 */ handleSearchBarBtnClick(btn) { switch (btn.btnName) { case 'search': @@ -250,6 +336,7 @@ export default { break; } }, + /** 处理表格事件 */ handleEmitFun() {}, }, };