diff --git a/src/views/report/highFault/index.vue b/src/views/report/highFault/index.vue index 2396b63..dfa57d9 100644 --- a/src/views/report/highFault/index.vue +++ b/src/views/report/highFault/index.vue @@ -36,11 +36,11 @@ width="180"> @@ -69,95 +69,75 @@ export default { }, data() { return { - total:100, + total:0, form: { pageNum:1, - pageSize:10 + pageSize:10, + factory:'1301', + productionLine:'CX_02', + date:[] }, option: [ { - value: '11', + value: '1301', label: '工厂一' - }, - { - value: '22', - label: '工厂二' - }, + } ], option1: [ { - value: '11', + value: 'CX_01', label: '产线一' }, { - value: '22', + value: 'CX_02', label: '产线二' }, ], - tableData: [ - { - type:'1', - num:1, - }, - { - type:'1', - num:1, - }, - { - type:'1', - num:1, - }, - { - type:'1', - num:1, - }, - { - type:'1', - num:1, - }, - ] + tableData: [] } }, mounted() { - this.$refs.chart1.setData({ - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } - }, - legend: {}, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - xAxis: { - type: 'value', - position:'top', - boundaryGap: [0, 0.01] - }, - yAxis: { - type: 'category', - data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World'] - }, - series: [ - { - name: '数量', - type: 'bar', - data: [18203, 23489, 29034, 104970, 131744, 630230] - }, - ] - }) + this.getList() }, methods: { getList(){ - highFaultList({ beginBeginTime: '2024-03-28', endBeginTime: '2024-04-28' - , FACTORY_CODE: '1301' , PRODUCT_LINE_CODE: 'CX_02'}).then(response => { + highFaultList({ beginBeginTime: this.form?.date?.[0], endBeginTime: this.form?.date?.[1] + , FACTORY_CODE: this.form.factory , PRODUCT_LINE_CODE: this.form.productionLine}).then(response => { //分页查询 console.log(response) - this.loading = false + this.total = response?.total || 0 + this.tableData = response.data + this.$refs.chart1.setData({ + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + legend: {}, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + position:'top', + boundaryGap: [0, 0.01] + }, + yAxis: { + type: 'category', + data: response.data.map(v=>v.material_MODEL).reverse() + }, + series: [ + { + name: '数量', + type: 'bar', + data: response.data.map(v=>v.q_SUM).reverse() + }, + ] + }) }); }, resetForm(formName) { diff --git a/src/views/report/weldLeakRate/index.vue b/src/views/report/weldLeakRate/index.vue index d8f0342..1a7a8c2 100644 --- a/src/views/report/weldLeakRate/index.vue +++ b/src/views/report/weldLeakRate/index.vue @@ -64,7 +64,7 @@ export default { }, data() { return { - total: 100, + total: 0, form: { year: new Date().getFullYear().toString(), pageNum: 1, @@ -94,6 +94,7 @@ export default { methods: { getList() { weldLeakRateList({year: this.form.year,}).then(response => { + this.total = response?.total || 0 //分页查询 let productLineArr = [...new Set(response.data.map(v => v.PRODUCT_LINE_NAME))] let data = productLineArr.map(v => {