From 4cafa78908333ca9c27913c1289fc6bcd2692ecf Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Fri, 26 Apr 2024 10:16:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=9F=E7=89=87=E8=BF=BD=E6=BA=AF?= =?UTF-8?q?=EF=BC=8C=E6=8A=A5=E8=A1=A8=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/api/quality/rawMaterialTraceability.js | 10 +- src/views/quality/base/qualityIsra/index.vue | 80 ++++--- .../monitoring/originalGlassRetrace/index.vue | 225 ++++++++++-------- .../monitoring/statisticalData/index.vue | 86 +++---- src/views/report/Product/monthly.vue | 36 ++- src/views/report/Product/year.vue | 42 +++- 7 files changed, 287 insertions(+), 194 deletions(-) diff --git a/package.json b/package.json index 904117f5..b9452d00 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "0.10.0", "clipboard": "2.0.8", - "code-brick-zj": "^1.0.5", + "code-brick-zj": "^1.1.0", "core-js": "^3.26.0", "crypto-js": "^4.0.0", "diagram-js": "^12.3.0", diff --git a/src/api/quality/rawMaterialTraceability.js b/src/api/quality/rawMaterialTraceability.js index 44d6392d..98aa1a24 100644 --- a/src/api/quality/rawMaterialTraceability.js +++ b/src/api/quality/rawMaterialTraceability.js @@ -1,8 +1,8 @@ /* * @Author: zhp * @Date: 2023-10-31 10:55:20 - * @LastEditTime: 2023-12-06 14:09:14 - * @LastEditors: zhp + * @LastEditTime: 2024-04-25 15:28:44 + * @LastEditors: DY * @Description: */ import request from '@/utils/request' @@ -34,11 +34,11 @@ export function exportEnergyPlcExcel(query) { }) } -export function getOriginalGlassRetrace(query) { +export function getOriginalGlassRetrace(data) { return request({ url: '/base/original-glass-statistics/originalGlassRetrace', - method: 'get', - params: query, + method: 'post', + data }) } diff --git a/src/views/quality/base/qualityIsra/index.vue b/src/views/quality/base/qualityIsra/index.vue index 14b5ce08..e7586efa 100644 --- a/src/views/quality/base/qualityIsra/index.vue +++ b/src/views/quality/base/qualityIsra/index.vue @@ -86,16 +86,19 @@ import moment from 'moment'; // import DialogForm from './dialogForm.vue'; import * as echarts from 'echarts'; import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; +import { getCorePLList } from '@/api/base/coreProductionLine'; +import { parseTime } from '@/utils/ruoyi'; // import basicPageMixin from '@/mixins/lb/basicPageMixin'; export default { - name: 'statisticalData', + name: 'QualityIsra', // components: { // DialogForm, // }, mixins: [tableHeightMixin], data() { return { + isFold: false, list: [], dynamicProps: [], activeName: 'day', @@ -106,6 +109,16 @@ export default { weekListUrl: '/base/quality-isra-statistics/weekList', monthListUrl: '/base/quality-isra-statistics/monthList', searchBarFormConfig: [ + { + type: 'select', + label: '是否报废', + placeholder: '请选择是否报废', + param: 'checkDiscard', + selectOptions: [ + { name: '否', id: 0 }, + { name: '是', id: 1 } + ], + }, { type: 'select', label: '缺陷类型', @@ -114,6 +127,17 @@ export default { selectOptions: [], labelField: 'name', valueField: 'name', + defaultSelect: [], + filterable: true + }, + { + type: 'select', + label: '产线', + selectOptions: [], + labelField: 'name', + valueField: 'name', + param: 'lineName', + filterable: true, defaultSelect: [] }, { @@ -139,8 +163,9 @@ export default { ], // 查询参数 queryParams: { + checkDiscard: undefined, checkType:undefined, - // productionId: undefined, + lineName: undefined, startTime: undefined, endTime: undefined, // productionLineId: null, @@ -149,6 +174,7 @@ export default { }, created() { // this.getProductLineList(); + // this.isFold = this.searchBarWidth('QualityIsraBox', 1198); }, computed: { tableProps() { @@ -168,29 +194,20 @@ export default { }, }, mounted() { - // if (this.$route.query.woIdString) { - // console.log(this.$route.query.woIdString) - // this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',') - // // this.queryParams.workOrderIdList = [this.$route.query.woIdString] - // // let arr =[] - // this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',') - // console.log(this.searchBarFormConfig[0].defaultSelect); - // } - // if (this.$route.params.startTime && this.$route.params.endTime) { - // this.searchBarFormConfig[0].defaultSelect = [ - // this.$route.params.startTime, - // this.$route.params.endTime, - // ]; - // this.queryParams.param = {}; - // this.$set( - // this.queryParams.param, - // 'startTime', - // this.$route.params.startTime - // ); - // this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime); - // } else { - // this.searchBarFormConfig[0].defaultSelect = []; - // } + if (this.$route.query.lineName) { + // console.log('打印看看产线', this.$route.query.lineName) + this.queryParams.lineName = this.$route.query.lineName + this.searchBarFormConfig[2].defaultSelect = this.$route.query.lineName + } + if (this.$route.query.originalGlassOutputTime) { + console.log('你好', this.$route.query.originalGlassOutputTime) + this.queryParams.startTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime))) + this.queryParams.endTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime))) + this.searchBarFormConfig[3].defaultSelect = [ + this.queryParams.startTime, + this.queryParams.endTime, + ]; + } this.getList() this.getData() this.getDict() @@ -393,8 +410,12 @@ export default { pageNo:1 } }); - console.log(res) - this.searchBarFormConfig[0].selectOptions = res.data.list + // console.log(res) + this.searchBarFormConfig[1].selectOptions = res.data.list + await getCorePLList().then((res) => { + // console.log(res); + this.searchBarFormConfig[2].selectOptions = res.data; + }) // this.searchBarFormConfig[1].selectOptions = res.data.map((item) => { // return { // name: item.name, @@ -425,7 +446,7 @@ export default { }, /** 查询列表 */ async getDataList() { - console.log(this.queryParams); + console.log('查询条件', this.queryParams); this.loading = true; // 执行查询 const { @@ -467,7 +488,10 @@ export default { }, /** 取消按钮 */ handleSearchBarBtnClick(val) { + console.log('11111', val) if (val.btnName === 'search') { + this.queryParams.checkDiscard = (val?.checkDiscard === 0 || val?.checkDiscard === 1) ? val?.checkDiscard : undefined + this.queryParams.lineName = val.lineName ? val.lineName : undefined this.queryParams.checkType = val.checkType ? val.checkType : undefined // this.queryParams.productionId = val.productionId ? val.productionId : undefined this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined diff --git a/src/views/quality/monitoring/originalGlassRetrace/index.vue b/src/views/quality/monitoring/originalGlassRetrace/index.vue index 56d68fe1..c1f9342e 100644 --- a/src/views/quality/monitoring/originalGlassRetrace/index.vue +++ b/src/views/quality/monitoring/originalGlassRetrace/index.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2023-08-01 14:55:51 * @LastEditors: DY - * @LastEditTime: 2024-04-25 14:42:53 + * @LastEditTime: 2024-04-26 09:58:51 * @Description: -->