diff --git a/.env.dev b/.env.dev index 912c2eab..e53dd47e 100644 --- a/.env.dev +++ b/.env.dev @@ -12,8 +12,10 @@ ENV = 'development' VUE_APP_TITLE = 智能监控分析系统 # 芋道管理系统/开发环境 -# VUE_APP_BASE_API = 'http://192.168.8.22:48080' -VUE_APP_BASE_API = 'http://172.16.33.65:48082' +# VUE_APP_BASE_API = 'http://172.16.33.187:48082' +# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com' +VUE_APP_BASE_API = 'http://172.16.32.79:48082' + # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/base/equipment.js b/src/api/base/equipment.js index 8c1b4246..3239772a 100644 --- a/src/api/base/equipment.js +++ b/src/api/base/equipment.js @@ -59,3 +59,34 @@ export function getEquipmentAll() { method: 'get' }) } + +export function getTree(query) { + return request({ + url: '/base/factory/getTree', + method: 'get', + params: query + }) +} + +export function getEquipmentOverall(data) { + return request({ + url: '/monitoring/equipment-overall/get', + method: 'post', + data: data, + }); +} + +export function getParamMonitor(data) { + return request({ + url: '/monitoring/equipment-monitor/paramMonitor', + method: 'post', + data: data, + }); +} +export function getAlarmDet(data) { + return request({ + url: 'monitoring/equipment-overall/alarmDet', + method: 'post', + data: data, + }); +} diff --git a/src/api/base/equipmentType.js b/src/api/base/equipmentType.js index 57e7746a..6309087f 100644 --- a/src/api/base/equipmentType.js +++ b/src/api/base/equipmentType.js @@ -52,3 +52,5 @@ export function exportEquipmentTypeExcel(query) { responseType: 'blob' }) } + + diff --git a/src/api/core/monitoring/auto.js b/src/api/core/monitoring/auto.js index 577209a7..07acbe6e 100644 --- a/src/api/core/monitoring/auto.js +++ b/src/api/core/monitoring/auto.js @@ -50,6 +50,15 @@ export function getPdlAutoReportNewSearchNow(data) { }); } +export function getPdlAutoReportNewSearchLastGroup(data) { + return request({ + url: '/monitoring/production-monitor/getPdlAutoReportNewSearchLastGroup', + method: 'post', + data: data, + timeout: 60000, + }); +} + // 班组自动报表分页 export function getTeamReportPage(data) { diff --git a/src/api/monitoring/defectSummary.js b/src/api/monitoring/defectSummary.js new file mode 100644 index 00000000..b48be963 --- /dev/null +++ b/src/api/monitoring/defectSummary.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' + +// 创建能源监控配置 +export function getDefectSummaryTable(data) { + return request({ + url: '/extend/check-gaozhun-record/defectSummaryTable', + method: 'post', + data: data, + }); +} +export function getTranslucentPage(data) { + return request({ + url: '/monitoring/translucent/page', + method: 'get', + params: data, + }); +} + +export function exportTranslucent(data) { + return request({ + url: '/monitoring/translucent/export-excel', + method: 'get', + params: data, + responseType: 'blob', + }); +} + +export function getDefectAnalysis(data) { + return request({ + url: '/extend/check-gaozhun-record/defectAnalysis', + method: 'post', + data: data, + }); +} + +export function getSectionDefect(data) { + return request({ + url: '/extend/check-gaozhun-record/sectionDefect', + method: 'post', + data: data, + }); +} +export function getDefectSummaryChart(data) { + return request({ + url: '/extend/check-gaozhun-record/defectSummaryChart', + method: 'post', + data: data, + }); +} +export function getDefectSummaryDet(data) { + return request({ + url: '/extend/check-gaozhun-record/defectSummaryDet', + method: 'post', + data: data, + }); +} diff --git a/src/api/monitoring/qualityIsra.js b/src/api/monitoring/qualityIsra.js new file mode 100644 index 00000000..28ec31a0 --- /dev/null +++ b/src/api/monitoring/qualityIsra.js @@ -0,0 +1,63 @@ +/* + * @Author: zhp + * @Date: 2023-12-08 15:26:59 + * @LastEditTime: 2023-12-11 15:21:44 + * @LastEditors: zhp + * @Description: + */ +import request from '@/utils/request' +export function getQualityIsraPage(query) { + return request({ + url: '/extend/check-isra-statistics/getIsraData', + method: 'get', + params: query, + }); +} + +export function getQualityIsraDayMap(query) { + return request({ + url: '/base/quality-isra-statistics/dayMap', + method: 'get', + params: query + }) +} + +export function getQualityIsraWeekMap(query) { + return request({ + url: '/base/quality-isra-statistics/weekMap', + method: 'get', + params: query + }) +} + +export function getQualityIsraMonthMap(query) { + return request({ + url: '/base/quality-isra-statistics/monthMap', + method: 'get', + params: query + }) +} + +export function getQualityIsraDayList(query) { + return request({ + url: '/base/quality-isra-statistics/dayList', + method: 'get', + params: query + }) +} + +export function getQualityIsraWeekList(query) { + return request({ + url: '/base/quality-isra-statistics/weekList', + method: 'get', + params: query + }) +} + +export function getQualityIsraMonthList(query) { + return request({ + url: '/base/quality-isra-statistics/monthList', + method: 'get', + params: query + }) +} diff --git a/src/assets/images/equipmentNum.png b/src/assets/images/equipmentNum.png new file mode 100644 index 00000000..530a8f00 Binary files /dev/null and b/src/assets/images/equipmentNum.png differ diff --git a/src/assets/images/equipmentNumImg.png b/src/assets/images/equipmentNumImg.png new file mode 100644 index 00000000..3d38d4b1 Binary files /dev/null and b/src/assets/images/equipmentNumImg.png differ diff --git a/src/assets/images/runNum.png b/src/assets/images/runNum.png new file mode 100644 index 00000000..798531e9 Binary files /dev/null and b/src/assets/images/runNum.png differ diff --git a/src/assets/images/runNumImg.png b/src/assets/images/runNumImg.png new file mode 100644 index 00000000..345260d6 Binary files /dev/null and b/src/assets/images/runNumImg.png differ diff --git a/src/assets/images/stopNum.png b/src/assets/images/stopNum.png new file mode 100644 index 00000000..9ecdefab Binary files /dev/null and b/src/assets/images/stopNum.png differ diff --git a/src/assets/images/stopNumImg.png b/src/assets/images/stopNumImg.png new file mode 100644 index 00000000..903e55d8 Binary files /dev/null and b/src/assets/images/stopNumImg.png differ diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 862ff036..a2a5522f 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -6,104 +6,48 @@ --> diff --git a/src/views/core/monitoring/lineAuto/BarChart.vue b/src/views/core/monitoring/lineAuto/BarChart.vue index d823cedd..73e7716d 100644 --- a/src/views/core/monitoring/lineAuto/BarChart.vue +++ b/src/views/core/monitoring/lineAuto/BarChart.vue @@ -262,6 +262,14 @@ export default { tooltip: { valueFormatter: (value) => `${value} %`, }, + label: { + show: true, + position: 'top', + distance: 6, + fontSize: 11, + color: '#333333', + formatter: (params) => `${params.value}` // 显示单位 + }, data: this.barData.map((item) => item.processingRatio), }, ], diff --git a/src/views/core/monitoring/lineAuto/index.vue b/src/views/core/monitoring/lineAuto/index.vue index 6ca68b83..c1e70c1c 100644 --- a/src/views/core/monitoring/lineAuto/index.vue +++ b/src/views/core/monitoring/lineAuto/index.vue @@ -34,7 +34,7 @@ + :page="1" :limit="100" :table-props="tableProps" :table-data="tableData" :max-height="300" />
@@ -57,7 +57,7 @@ + :page="1" :limit="100" :table-props="tableProps" :table-data="tableData2" :max-height="300" />
@@ -71,9 +71,55 @@
+
+ +
+ + 上一班数据 + + + + + + + +
+ +
+
+
+
+
+
+
+ +
+ + 当天数据 + + + + + + + +
+ +
+
+
+
+
+
+
+
-
+
@@ -86,7 +132,7 @@ 生产表格数据
+ :limit="100" :table-props="tableProps" :max-height="300" :table-data="tableDataCustom" />
@@ -113,7 +159,7 @@ 当班数据 + :max-height="300" />
@@ -122,7 +168,7 @@ 当天数据 + :max-height="300" />
@@ -142,7 +188,7 @@ 生产表格数据 + :limit="100" :table-props="productTableProps" :table-data="productTableData" :max-height="300" /> @@ -154,7 +200,7 @@ import { parseTime } from '@/filter/code-filter'; import { getLineAuto, getPdList, getPdlAutoReportNewSearchNow, getProductAuto, - getProcessAutoReportGroup, getProcessAutoReportDay, getProcessAutoReportNew + getProcessAutoReportGroup, getProcessAutoReportDay, getProcessAutoReportNew, getPdlAutoReportNewSearchLastGroup } from '@/api/core/monitoring/auto'; import { getFactoryPage } from '@/api/core/base/factory'; import * as XLSX from 'xlsx'; @@ -165,11 +211,11 @@ import ButtonNav from '@/components/ButtonNav'; import { listData } from '@/api/system/dict/data'; // 表格列配置 const tableProps = [ - // { - // prop: 'factoryName', - // label: '工厂', - // fixed: true - // }, + { + prop: 'factoryName', + label: '工厂', + fixed: true + }, { prop: 'lineName', label: '产线', @@ -368,15 +414,27 @@ export default { productTableDataDay: [], tableDataCustom: [], list: [], // 折线图数据 + timeTypeOptions: { + productLine: [ // 按产线监控(包含上一班) + { id: 1, name: '当天' }, + { id: 2, name: '自定义' }, + { id: 3, name: '上一班' } + ], + product: [ // 按产品监控(不含上一班) + { id: 1, name: '当天' }, + { id: 2, name: '自定义' } + ] + }, formConfig: [ { type: 'select', label: '时间维度', selectOptions: [ { id: 1, name: '当天' }, - { id: 2, name: '自定义' } + { id: 2, name: '自定义' }, + { id: 3, name: '上一班' } ], - width: 80, + width: 100, onchange: true, // defaultSelect: 1, clearable: false, @@ -437,6 +495,7 @@ export default { { id: 3, name: '月' }, { id: 4, name: '年' } ], + onchange: true, width: 80, param: 'reportType' }, @@ -467,6 +526,13 @@ export default { productTableProps() { // 当班数据的完整表头(基础列 + 当班动态表头) const baseColumns = [ + { + prop: 'sizes', + label: '规格', + width: 105, + showOverflowtooltip: true, + fixed: true + }, { prop: 'process', label: '产品工艺', @@ -476,7 +542,8 @@ export default { prop: 'processType', label: '产品类型', filter: (val) => (val != 1 ? '面板' : '背板'), - fixed: true + fixed: true, + sortable: true, }, { prop: 'factoryName', @@ -513,13 +580,16 @@ export default { this.$nextTick(() => { if (this.$refs.buttonNav) { this.$refs.buttonNav.currentMenu = '按产线监控'; + this.formConfig[0].selectOptions = this.timeTypeOptions.productLine; } if (this.$refs.searchBarForm) { // this.$refs.searchBarForm.formInline.timeVal = [ // yesterday.getTime(), // end.getTime() // ]; + this.$refs.searchBarForm.formInline.timeType = 1 + } }); @@ -576,18 +646,26 @@ export default { // 3. 执行公共重置 resetCommon(); - + // if (this.activeName === 'productLine') { + // } else { + // } // 4. 根据类型设置差异化的表单配置(仅处理不同的部分) if (isProductLine) { - // 按产线监控:显示产线,隐藏产品工艺和类型 + // 按产线监控:显示产线,隐藏产品工艺和类型,时间维度包含上一班 + this.formConfig[0].selectOptions = this.timeTypeOptions.productLine; // 恢复上一班选项 this.formConfig[3].type = 'select'; // 显示产线 this.formConfig[4].type = ''; // 隐藏产品工艺 this.formConfig[5].type = ''; // 隐藏产品类型 + this.getDayDataList(); + } else { - // 按产品监控:显示产品工艺和类型,隐藏产线 + // 按产品监控:显示产品工艺和类型,隐藏产线,时间维度移除上一班 + this.formConfig[0].selectOptions = this.timeTypeOptions.product; // 不含上一班 this.formConfig[3].type = ''; // 隐藏产线 this.formConfig[4].type = 'select'; // 显示产品工艺 this.formConfig[5].type = 'select'; // 显示产品类型 + this.getProductList(); + } }, @@ -601,6 +679,12 @@ export default { { ref: 'lineCurrentShiftTable', name: '产线监控_当班数据' }, { ref: 'lineTodayTable', name: '产线监控_当天数据' } ], '产线监控_当班及当天数据汇总'); // 传入自定义汇总文件名 + } else if (this.listQuery.timeType === 1) { + // 产线-当天:导出当班 + 当天两个表格(自定义汇总文件名) + this.exportMultipleTables([ + { ref: 'lineCurrentShiftTable', name: '产线监控_上一班数据' }, + { ref: 'lineTodayTable', name: '产线监控_当天数据' } + ], '产线监控_当班及当天数据汇总'); // 传入自定义汇总文件名 } else { // 产线-自定义:导出一个表格(自定义文件名) this.exportSingleTable('lineCustomTable', '产线监控_自定义时间数据'); @@ -801,31 +885,126 @@ export default { this.formConfig[2].selectOptions = res.data.list || []; }); }, + getWeekTimeRange(date) { + const targetDate = new Date(date); + const day = targetDate.getDay() || 7; // 周日转为7 + const year = targetDate.getFullYear(); + const month = targetDate.getMonth(); + const dateNum = targetDate.getDate(); + // 本周一 00:00:00 + const startDate = new Date(year, month, dateNum - day + 1); + startDate.setHours(0, 0, 0, 0); + + // 本周日 23:59:59 + const endDate = new Date(year, month, dateNum - day + 7); + endDate.setHours(23, 59, 59, 999); + + return { + startTime: startDate.getTime(), + endTime: endDate.getTime() + }; + }, + + // 辅助函数:获取本年的开始和结束时间戳(1月1日00:00:00 到 12月31日23:59:59) + getYearTimeRange(date) { + const targetDate = new Date(date); + const year = targetDate.getFullYear(); + + // 本年1月1日 00:00:00 + const startDate = new Date(year, 0, 1); + startDate.setHours(0, 0, 0, 0); + + // 本年12月31日 23:59:59 + const endDate = new Date(year, 11, 31); + endDate.setHours(23, 59, 59, 999); + + return { + startTime: startDate.getTime(), + endTime: endDate.getTime() + }; + }, // 搜索/导出按钮点击 buttonClick(val) { + if (this.activeName === 'productLine') { + this.listQuery.pageNo = 1; + this.listQuery.pageSize = 10; + this.listQuery.factoryId = val.factoryId || undefined; + this.listQuery.process = val.process ? val.process : []; + this.listQuery.lineId = val.lineId ? val.lineId : []; + this.listQuery.processType = val.processType ? val.processType : []; + this.listQuery.reportType = val.reportType || undefined; + this.listQuery.timeType = val.timeType || undefined; + this.listQuery.searchType = val.searchType || undefined; + + // 处理不同时间选择类型 + if (val.timeVal) { + this.listQuery.startTime = val.timeVal[0]; + this.listQuery.endTime = val.timeVal[1]; + } else if (val.timeValWeek) { + // 周选择器 + const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else if (val.timeValMonth) { + // 月选择器 + this.listQuery.startTime = val.timeValMonth[0]; + this.listQuery.endTime = val.timeValMonth[1]; + } else if (val.timeValYear) { + // 年选择器 + const { startTime, endTime } = this.getYearTimeRange(val.timeValYear); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else { + this.listQuery.startTime = undefined; + this.listQuery.endTime = undefined; + } + } else { + this.listQuery.pageNo = 1; + this.listQuery.pageSize = 10; + this.listQuery.factoryId = val.factoryId || [] + this.listQuery.process = val.process ? val.process : []; + this.listQuery.lineId = undefined; + this.listQuery.processType = val.processType ? val.processType : []; + this.listQuery.reportType = val.reportType || undefined; + this.listQuery.timeType = val.timeType || undefined; + this.listQuery.searchType = val.searchType || undefined; + + // 处理不同时间选择类型 + if (val.timeVal) { + this.listQuery.startTime = val.timeVal[0]; + this.listQuery.endTime = val.timeVal[1]; + } else if (val.timeValWeek) { + // 周选择器 + const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else if (val.timeValMonth) { + // 月选择器 + this.listQuery.startTime = val.timeValMonth[0]; + this.listQuery.endTime = val.timeValMonth[1]; + } else if (val.timeValYear) { + // 年选择器 + const { startTime, endTime } = this.getYearTimeRange(val.timeValYear); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else { + this.listQuery.startTime = undefined; + this.listQuery.endTime = undefined; + } + } switch (val.btnName) { case 'search': - this.listQuery.pageNo = 1; - this.listQuery.pageSize = 10; - this.listQuery.factoryId = val.factoryId || undefined; - this.listQuery.process = val.process ? val.process : []; - this.listQuery.lineId = val.lineId ? val.lineId : []; - this.listQuery.processType = val.processType ? val.processType : []; - this.listQuery.reportType = val.reportType || undefined; - this.listQuery.timeType = val.timeType || undefined; - this.listQuery.searchType = val.searchType || undefined; - this.listQuery.startTime = val.timeVal ? val.timeVal[0] : undefined; - this.listQuery.endTime = val.timeVal ? val.timeVal[1] : undefined; if (this.activeName === 'productLine') { if (this.listQuery.timeType === 1) { this.getDayDataList(); + } else if (this.listQuery.timeType === 3) { + this.getLastDayDataList(); } else { this.getDataList(); } } else { this.getProductList(); - } break; case 'export': @@ -834,6 +1013,9 @@ export default { case 'reset': this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.formInline.timeType = 1; + this.formConfig[0].selectOptions = this.activeName === 'productLine' + ? this.timeTypeOptions.productLine + : this.timeTypeOptions.product; this.listQuery = { pageSize: 100, pageNo: 1, @@ -842,12 +1024,9 @@ export default { }; if (this.activeName === 'productLine') { this.getDayDataList(); - } else { this.getProductList(); - } - break; default: console.log(val); @@ -1097,6 +1276,28 @@ export default { return [...lineColumns, totalColumn]; }, // 为当天时调用的接口 + getLastDayDataList() { + getPdlAutoReportNewSearchLastGroup().then((response) => { + this.tableData = response.data.classData.map((item, index) => { + item.originalLossNum = item.original?.lossNum; + item.originalLossArea = item.original?.lossArea; + item.edgeLossNum = item.edge?.lossNum; + item.edgeLossArea = item.edge?.lossArea; + item.drillLossNum = item.drill?.lossNum; + item.drillLossArea = item.drill?.lossArea; + item.coatingLossNum = item.coating?.lossNum; + item.coatingLossArea = item.coating?.lossArea; + item.silkLossNum = item.silk?.lossNum; + item.silkLossArea = item.silk?.lossArea; + item.temperingLossNum = item.tempering?.lossNum; + item.temperingLossArea = item.tempering?.lossArea; + item.packingLossNum = item.packing?.lossNum; + item.packingLossArea = item.packing?.lossArea; + return item; + }); + // console.log(this.tableData, this.tableData2); + }); + }, getDayDataList() { getPdlAutoReportNewSearchNow().then((response) => { this.tableData = response.data.classData.map((item, index) => { @@ -1156,24 +1357,21 @@ export default { console.log(value); this.listQuery.timeType = value; - if (value === 1) { - // 切换为“当天”:隐藏查询类型、报表类型、时间范围 + if (value === 2) { + // 切换为“自定义”:显示查询类型和时间范围 + this.formConfig[1].type = 'select'; + this.$refs.searchBarForm.formInline.timeType = value; + this.listQuery.timeType = value; + this.formConfig[7].type = 'datePicker'; + } else { this.formConfig[1].type = ''; this.formConfig[6].type = ''; this.formConfig[7].type = ''; this.$refs.searchBarForm.formInline.timeType = value; this.listQuery.timeType = value; - this.$refs.searchBarForm.formInline.searchType = undefined; this.$refs.searchBarForm.formInline.reportType = undefined; this.$refs.searchBarForm.formInline.timeVal = undefined; - } else { - // 切换为“自定义”:显示查询类型和时间范围 - this.formConfig[1].type = 'select'; - this.$refs.searchBarForm.formInline.timeType = value; - this.listQuery.timeType = value; - - this.formConfig[7].type = 'datePicker'; } } else if (param === 'searchType') { if (value === 1) { @@ -1187,7 +1385,74 @@ export default { this.formConfig[7].type = 'datePicker'; } } else if (param === 'reportType') { - this.$refs.searchBarForm.formInline.timeVal = undefined; + if (this.$refs.searchBarForm && this.$refs.searchBarForm.formInline) { + const formInline = this.$refs.searchBarForm.formInline; + // 精准判断:只有字段存在时,才置为undefined(不存在则不处理) + if ('timeVal' in formInline) { + formInline.timeVal = undefined; + } + if ('timeValWeek' in formInline) { + formInline.timeValWeek = undefined; + } + if ('timeValMonth' in formInline) { + formInline.timeValMonth = undefined; + } + if ('timeValYear' in formInline) { + formInline.timeValYear = undefined; + } + } + this.listQuery.startTime = undefined; + this.listQuery.endTime = undefined; + if (value === 1) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'datetimerange', + format: 'yyyy-MM-dd HH:mm:ss', + valueFormat: 'timestamp', + rangeSeparator: '-', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + param: 'timeVal', + width: 350 + }; + } else if (value === 2) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'week', + placeholder: '选择日期', + format: 'yyyy-MM-dd', + valueFormat: 'yyyy-MM-dd', + param: 'timeValWeek', + width: 250, + }; + } else if (value === 3) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'monthrange', + format: 'yyyy-MM-dd', + valueFormat: 'timestamp', + rangeSeparator: '-', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + param: 'timeValMonth', + defaultTime: ['00:00:00', '23:59:59'], + width: 250, + }; + } else if (value === 4) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'year', + placeholder: '选择年份', + format: 'yyyy', + valueFormat: 'timestamp', + param: 'timeValYear', + width: 250, + }; + } } else if (param === 'factoryId') { // 切换工厂时刷新产线列表 this.listQuery.lineId = []; @@ -1234,7 +1499,7 @@ export default { .content-wrapper { // flex: 1; width: 100%; - height: calc(100vh - 303px); + height: calc(100vh - 280px); // overflow: hidden; } diff --git a/src/views/core/monitoring/nextClip/hisData.vue b/src/views/core/monitoring/nextClip/hisData.vue index 5342afa4..87105ed6 100644 --- a/src/views/core/monitoring/nextClip/hisData.vue +++ b/src/views/core/monitoring/nextClip/hisData.vue @@ -77,7 +77,7 @@ const tableProps = [ }, { prop: 'palletNum', - label: '下片托数' + label: '一托玻璃数量/片' }, { prop: 'startTime', @@ -92,7 +92,7 @@ const tableProps = [ width: 160 }, { - prop: 'outputNum', + prop: 'length', label: '玻璃长度/mm' }, { @@ -314,9 +314,10 @@ export default { case 'search': this.listQuery.pageNo = 1; this.listQuery.pageSize = 10; - this.listQuery.productId = val.productId ? val.productId : undefined; - this.listQuery.startTime = val.timeVal ? val.timeVal[0]: undefined; - this.listQuery.endTime = val.timeVal ? val.timeVal[1]: undefined; + this.listQuery.productionLineId = val.productionLineId ? val.productionLineId : undefined; + this.listQuery.thick = val.thick ? val.thick : undefined; + this.listQuery.startTime = val.timeVal ? val.timeVal[0] : undefined; + this.listQuery.endTime = val.timeVal ? val.timeVal[1] : undefined; //this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined; this.getDataList(); diff --git a/src/views/core/monitoring/nextClip/index.vue b/src/views/core/monitoring/nextClip/index.vue index 55bf6a9c..ff748fe2 100644 --- a/src/views/core/monitoring/nextClip/index.vue +++ b/src/views/core/monitoring/nextClip/index.vue @@ -77,7 +77,7 @@ const tableProps = [ }, { prop: 'palletNum', - label: '下片托数' + label: '一托玻璃数量/片' }, { prop: 'startTime', @@ -92,7 +92,7 @@ const tableProps = [ width: 160 }, { - prop: 'outputNum', + prop: 'length', label: '玻璃长度/mm' }, { diff --git a/src/views/core/monitoring/productAuto/BarChart.vue b/src/views/core/monitoring/productAuto/BarChart.vue index d823cedd..73e7716d 100644 --- a/src/views/core/monitoring/productAuto/BarChart.vue +++ b/src/views/core/monitoring/productAuto/BarChart.vue @@ -262,6 +262,14 @@ export default { tooltip: { valueFormatter: (value) => `${value} %`, }, + label: { + show: true, + position: 'top', + distance: 6, + fontSize: 11, + color: '#333333', + formatter: (params) => `${params.value}` // 显示单位 + }, data: this.barData.map((item) => item.processingRatio), }, ], diff --git a/src/views/core/monitoring/productAuto/index.vue b/src/views/core/monitoring/productAuto/index.vue index 764bbbfd..c916ce73 100644 --- a/src/views/core/monitoring/productAuto/index.vue +++ b/src/views/core/monitoring/productAuto/index.vue @@ -34,7 +34,7 @@ + :page="1" :limit="100" :table-props="tableProps" :table-data="tableData" :max-height="300" />
@@ -57,7 +57,7 @@ + :page="1" :limit="100" :table-props="tableProps" :table-data="tableData2" :max-height="300" />
@@ -71,22 +71,68 @@
+
+ +
+ + 上一班数据 + + + + + + + +
+ +
+
+
+
+
+
+
+ +
+ + 当天数据 + + + + + + + +
+ +
+
+
+
+
+
+
+
-
+
{{ reportTypeMap[listQuery.reportType] }} {{ parseTime(listQuery.startTime) }} 至{{ - parseTime(listQuery.endTime) }} + parseTime(listQuery.endTime) }} 生产表格数据
+ :limit="100" :table-props="tableProps" :max-height="300" :table-data="tableDataCustom" />
@@ -113,7 +159,7 @@ 当班数据 + :max-height="300" />
@@ -122,7 +168,7 @@ 当天数据 + :max-height="300" />
@@ -142,7 +188,7 @@ 生产表格数据 + :limit="100" :table-props="productTableProps" :table-data="productTableData" :max-height="300" /> @@ -154,7 +200,7 @@ import { parseTime } from '@/filter/code-filter'; import { getLineAuto, getPdList, getPdlAutoReportNewSearchNow, getProductAuto, - getProcessAutoReportGroup, getProcessAutoReportDay, getProcessAutoReportNew + getProcessAutoReportGroup, getProcessAutoReportDay, getProcessAutoReportNew, getPdlAutoReportNewSearchLastGroup } from '@/api/core/monitoring/auto'; import { getFactoryPage } from '@/api/core/base/factory'; import * as XLSX from 'xlsx'; @@ -165,11 +211,11 @@ import ButtonNav from '@/components/ButtonNav'; import { listData } from '@/api/system/dict/data'; // 表格列配置 const tableProps = [ - // { - // prop: 'factoryName', - // label: '工厂', - // fixed: true - // }, + { + prop: 'factoryName', + label: '工厂', + fixed: true + }, { prop: 'lineName', label: '产线', @@ -368,15 +414,27 @@ export default { productTableDataDay: [], tableDataCustom: [], list: [], // 折线图数据 + timeTypeOptions: { + productLine: [ // 按产线监控(包含上一班) + { id: 1, name: '当天' }, + { id: 2, name: '自定义' }, + { id: 3, name: '上一班' } + ], + product: [ // 按产品监控(不含上一班) + { id: 1, name: '当天' }, + { id: 2, name: '自定义' } + ] + }, formConfig: [ { type: 'select', label: '时间维度', selectOptions: [ { id: 1, name: '当天' }, - { id: 2, name: '自定义' } + { id: 2, name: '自定义' }, + { id: 3, name: '上一班' } ], - width: 80, + width: 100, onchange: true, // defaultSelect: 1, clearable: false, @@ -438,6 +496,7 @@ export default { { id: 4, name: '年' } ], width: 80, + onchange: true, param: 'reportType' }, { @@ -513,17 +572,20 @@ export default { this.$nextTick(() => { if (this.$refs.buttonNav) { this.$refs.buttonNav.currentMenu = '按产品监控'; + this.formConfig[0].selectOptions = this.timeTypeOptions.product; } if (this.$refs.searchBarForm) { // this.$refs.searchBarForm.formInline.timeVal = [ // yesterday.getTime(), // end.getTime() // ]; + this.$refs.searchBarForm.formInline.timeType = 1 + } }); - this.getProductList(); + this.getDayDataList(); this.getPdLineList(); const queryParams = { pageNo: 1, @@ -579,15 +641,21 @@ export default { // 4. 根据类型设置差异化的表单配置(仅处理不同的部分) if (isProductLine) { - // 按产线监控:显示产线,隐藏产品工艺和类型 + // 按产线监控:显示产线,隐藏产品工艺和类型,时间维度包含上一班 + this.formConfig[0].selectOptions = this.timeTypeOptions.productLine; // 恢复上一班选项 this.formConfig[3].type = 'select'; // 显示产线 this.formConfig[4].type = ''; // 隐藏产品工艺 this.formConfig[5].type = ''; // 隐藏产品类型 + this.getDayDataList(); + } else { - // 按产品监控:显示产品工艺和类型,隐藏产线 + // 按产品监控:显示产品工艺和类型,隐藏产线,时间维度移除上一班 + this.formConfig[0].selectOptions = this.timeTypeOptions.product; // 不含上一班 this.formConfig[3].type = ''; // 隐藏产线 this.formConfig[4].type = 'select'; // 显示产品工艺 this.formConfig[5].type = 'select'; // 显示产品类型 + this.getProductList(); + } }, @@ -596,48 +664,52 @@ export default { // 按产线监控 if (this.activeName === 'productLine') { if (this.listQuery.timeType === 1) { - // 产线-当天:导出当班 + 当天两个表格 + // 产线-当天:导出当班 + 当天两个表格(自定义汇总文件名) this.exportMultipleTables([ { ref: 'lineCurrentShiftTable', name: '产线监控_当班数据' }, { ref: 'lineTodayTable', name: '产线监控_当天数据' } - ]); + ], '产线监控_当班及当天数据汇总'); // 传入自定义汇总文件名 + } else if (this.listQuery.timeType === 1) { + // 产线-当天:导出当班 + 当天两个表格(自定义汇总文件名) + this.exportMultipleTables([ + { ref: 'lineCurrentShiftTable', name: '产线监控_上一班数据' }, + { ref: 'lineTodayTable', name: '产线监控_当天数据' } + ], '产线监控_当班及当天数据汇总'); // 传入自定义汇总文件名 } else { - // 产线-自定义:导出一个表格 + // 产线-自定义:导出一个表格(自定义文件名) this.exportSingleTable('lineCustomTable', '产线监控_自定义时间数据'); } } // 按产品监控 else { if (this.listQuery.timeType === 1) { - // 产品-当天:导出当班 + 当天两个表格 + // 产品-当天:导出当班 + 当天两个表格(自定义汇总文件名) this.exportMultipleTables([ { ref: 'productCurrentShiftTable', name: '产品监控_当班数据' }, { ref: 'productTodayTable', name: '产品监控_当天数据' } - ]); + ], '产品监控_当班及当天数据汇总'); // 传入自定义汇总文件名 } else { - // 产品-自定义:导出一个表格 + // 产品-自定义:导出一个表格(自定义文件名) this.exportSingleTable('productCustomTable', '产品监控_自定义时间数据'); } } }, - // 导出单个表格 + // 导出单个表格(保持原有逻辑,文件名由调用方传入,已区分不同场景) exportSingleTable(refName, fileName) { const table = this.getTableDom(refName); if (!table) return; - // 克隆表格并移除固定列 const clonedTable = table.cloneNode(true); - this.removeFixedColumns(clonedTable); + this.adjustTableForExport(clonedTable); - // 转换为工作簿并导出 const workbook = XLSX.utils.table_to_book(clonedTable); const fullName = `${fileName}_${this.formatDate()}.xlsx`; XLSX.writeFile(workbook, fullName); }, - // 导出多个表格(同一个Excel的不同sheet) - exportMultipleTables(tables) { + // 导出多个表格(新增自定义汇总文件名参数,适配不同选项卡) + exportMultipleTables(tables, customSummaryName) { const workbook = XLSX.utils.book_new(); let hasValidTable = false; @@ -646,11 +718,9 @@ export default { if (!table) return; hasValidTable = true; - // 克隆表格并移除固定列 const clonedTable = table.cloneNode(true); - this.removeFixedColumns(clonedTable); + this.adjustTableForExport(clonedTable); - // 转换为sheet并添加到工作簿 const worksheet = XLSX.utils.table_to_sheet(clonedTable); XLSX.utils.book_append_sheet(workbook, worksheet, name); }); @@ -660,31 +730,128 @@ export default { return; } - // 导出包含多个sheet的Excel - const fullName = `生产监控数据汇总_${this.formatDate()}.xlsx`; + // 动态生成汇总文件名:自定义名称 + 日期 + const fullName = `${customSummaryName}_${this.formatDate()}.xlsx`; XLSX.writeFile(workbook, fullName); }, - - // 辅助方法:获取表格DOM元素 + // 辅助方法:获取表格DOM元素(包含表头) getTableDom(refName) { const tableComponent = this.$refs[refName]; if (!tableComponent) { this.$message.warning(`未找到${refName}表格`); return null; } - // 获取表格组件内部的el-table DOM - const tableDom = tableComponent.$el.querySelector('.el-table__body-wrapper table'); - if (!tableDom) { + // 获取完整表格容器(包含表头和表体) + const tableContainer = tableComponent.$el.querySelector('.el-table'); + if (!tableContainer) { this.$message.warning(`${refName}表格数据为空`); return null; } - return tableDom; + return tableContainer; }, - // 辅助方法:移除固定列(避免重复导出) - removeFixedColumns(table) { - const fixedColumns = table.querySelectorAll('.el-table__fixed, .el-table__fixed-right'); - fixedColumns.forEach(col => col.remove()); + // 重点修复:调整表格结构(解决表头重复问题) + adjustTableForExport(tableContainer) { + // 1. 移除空表格提示和分页等无关元素 + const emptyCells = tableContainer.querySelectorAll('.el-table__empty-block, .el-pagination'); + emptyCells.forEach(cell => cell.remove()); + + // 2. 定位核心元素 + const mainTable = tableContainer.querySelector('.el-table__body-wrapper table'); // 主表体 + const fixedLeft = tableContainer.querySelector('.el-table__fixed'); // 左固定列容器 + const fixedRight = tableContainer.querySelector('.el-table__fixed-right'); // 右固定列容器 + + // 3. 提取所有表头行(支持多级表头,按层级收集) + const allHeaderRows = []; // 存储所有层级的表头行(每行是一个单元格数组) + + // 辅助函数:提取某个容器内的所有表头行(处理多级表头) + const extractHeaderRows = (container) => { + const headerWrapper = container?.querySelector('.el-table__header-wrapper table'); + if (!headerWrapper) return []; + const thead = headerWrapper.querySelector('thead'); + if (!thead) return []; + // 多级表头可能有多个tr(行) + const headerRows = Array.from(thead.querySelectorAll('tr')); + return headerRows.map(row => Array.from(row.querySelectorAll('th'))); // 每行的单元格数组 + }; + + // 收集左固定列的表头行(可能有多层) + const fixedLeftHeaderRows = extractHeaderRows(fixedLeft); + // 收集主表头的表头行(可能有多层) + const mainHeaderRows = extractHeaderRows(tableContainer); + // 收集右固定列的表头行(可能有多层) + const fixedRightHeaderRows = extractHeaderRows(fixedRight); + + // 4. 合并表头行(按层级对齐,左固定列 → 主表头 → 右固定列) + // 确定最大表头层级(多级表头的行数) + const maxLevel = Math.max( + fixedLeftHeaderRows.length, + mainHeaderRows.length, + fixedRightHeaderRows.length + ); + + // 按层级合并每行的单元格 + for (let i = 0; i < maxLevel; i++) { + const rowCells = []; + // 左固定列当前层级的单元格(不足则补空) + rowCells.push(...(fixedLeftHeaderRows[i] || [])); + // 主表头当前层级的单元格(不足则补空) + rowCells.push(...(mainHeaderRows[i] || [])); + // 右固定列当前层级的单元格(不足则补空) + rowCells.push(...(fixedRightHeaderRows[i] || [])); + allHeaderRows.push(rowCells); + } + + // 5. 清理所有原有表头和固定列容器(避免干扰) + tableContainer.querySelectorAll('thead').forEach(thead => thead.remove()); + tableContainer.querySelectorAll('.el-table__header-wrapper').forEach(wrapper => wrapper.remove()); + [fixedLeft, fixedRight].forEach(container => container?.remove()); + + // 6. 构建唯一表头并添加到主表体(支持多级表头) + if (mainTable && allHeaderRows.length > 0) { + const newThead = document.createElement('thead'); + // 按层级添加表头行 + allHeaderRows.forEach(cells => { + const newTr = document.createElement('tr'); + cells.forEach(cell => { + // 复制单元格(避免DOM残留引用问题) + const clonedCell = cell.cloneNode(true); + newTr.appendChild(clonedCell); + }); + newThead.appendChild(newTr); + }); + // 将新表头插入主表体最前面 + mainTable.insertBefore(newThead, mainTable.firstChild); + } + + // 7. 合并固定列数据到主表体(仅处理tbody数据) + // 合并左固定列数据 + if (fixedLeft && mainTable) { + const fixedLeftRows = fixedLeft.querySelectorAll('.el-table__body-wrapper tbody tr'); + const mainRows = mainTable.querySelectorAll('tbody tr'); + fixedLeftRows.forEach((fixedRow, index) => { + if (mainRows[index]) { + const fixedCells = Array.from(fixedRow.querySelectorAll('td')); + fixedCells.forEach(cell => { + mainRows[index].insertBefore(cell.cloneNode(true), mainRows[index].firstChild); + }); + } + }); + } + + // 合并右固定列数据 + if (fixedRight && mainTable) { + const fixedRightRows = fixedRight.querySelectorAll('.el-table__body-wrapper tbody tr'); + const mainRows = mainTable.querySelectorAll('tbody tr'); + fixedRightRows.forEach((fixedRow, index) => { + if (mainRows[index]) { + const fixedCells = Array.from(fixedRow.querySelectorAll('td')); + fixedCells.forEach(cell => { + mainRows[index].appendChild(cell.cloneNode(true)); + }); + } + }); + } }, // 辅助方法:格式化日期(用于文件名) @@ -698,7 +865,6 @@ export default { String(date.getMinutes()).padStart(2, '0') ].join(''); }, - // 获取产线和工厂列表 getPdLineList() { getPdList().then(res => { @@ -712,28 +878,85 @@ export default { // 搜索/导出按钮点击 buttonClick(val) { + if (this.activeName === 'productLine') { + this.listQuery.pageNo = 1; + this.listQuery.pageSize = 10; + this.listQuery.factoryId = val.factoryId || undefined; + this.listQuery.process = val.process ? val.process : []; + this.listQuery.lineId = val.lineId ? val.lineId : []; + this.listQuery.processType = val.processType ? val.processType : []; + this.listQuery.reportType = val.reportType || undefined; + this.listQuery.timeType = val.timeType || undefined; + this.listQuery.searchType = val.searchType || undefined; + + // 处理不同时间选择类型 + if (val.timeVal) { + this.listQuery.startTime = val.timeVal[0]; + this.listQuery.endTime = val.timeVal[1]; + } else if (val.timeValWeek) { + // 周选择器 + const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else if (val.timeValMonth) { + // 月选择器 + this.listQuery.startTime = val.timeValMonth[0]; + this.listQuery.endTime = val.timeValMonth[1]; + } else if (val.timeValYear) { + // 年选择器 + const { startTime, endTime } = this.getYearTimeRange(val.timeValYear); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else { + this.listQuery.startTime = undefined; + this.listQuery.endTime = undefined; + } + } else { + this.listQuery.pageNo = 1; + this.listQuery.pageSize = 10; + this.listQuery.factoryId = val.factoryId || [] + this.listQuery.process = val.process ? val.process : []; + this.listQuery.lineId = undefined; + this.listQuery.processType = val.processType ? val.processType : []; + this.listQuery.reportType = val.reportType || undefined; + this.listQuery.timeType = val.timeType || undefined; + this.listQuery.searchType = val.searchType || undefined; + + // 处理不同时间选择类型 + if (val.timeVal) { + this.listQuery.startTime = val.timeVal[0]; + this.listQuery.endTime = val.timeVal[1]; + } else if (val.timeValWeek) { + // 周选择器 + const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else if (val.timeValMonth) { + // 月选择器 + this.listQuery.startTime = val.timeValMonth[0]; + this.listQuery.endTime = val.timeValMonth[1]; + } else if (val.timeValYear) { + // 年选择器 + const { startTime, endTime } = this.getYearTimeRange(val.timeValYear); + this.listQuery.startTime = startTime; + this.listQuery.endTime = endTime; + } else { + this.listQuery.startTime = undefined; + this.listQuery.endTime = undefined; + } + } switch (val.btnName) { case 'search': - this.listQuery.pageNo = 1; - this.listQuery.pageSize = 10; - this.listQuery.factoryId = val.factoryId || undefined; - this.listQuery.process = val.process ? val.process : []; - this.listQuery.lineId = val.lineId ? val.lineId : []; - this.listQuery.processType = val.processType ? val.processType : []; - this.listQuery.reportType = val.reportType || undefined; - this.listQuery.timeType = val.timeType || undefined; - this.listQuery.searchType = val.searchType || undefined; - this.listQuery.startTime = val.timeVal ? val.timeVal[0] : undefined; - this.listQuery.endTime = val.timeVal ? val.timeVal[1] : undefined; if (this.activeName === 'productLine') { if (this.listQuery.timeType === 1) { this.getDayDataList(); + } else if (this.listQuery.timeType === 3) { + this.getLastDayDataList(); } else { this.getDataList(); } } else { - this.getProductList(); - + this.getProductList(); } break; case 'export': @@ -742,6 +965,9 @@ export default { case 'reset': this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.formInline.timeType = 1; + this.formConfig[0].selectOptions = this.activeName === 'productLine' + ? this.timeTypeOptions.productLine + : this.timeTypeOptions.product; this.listQuery = { pageSize: 100, pageNo: 1, @@ -750,12 +976,9 @@ export default { }; if (this.activeName === 'productLine') { this.getDayDataList(); - } else { this.getProductList(); - } - break; default: console.log(val); @@ -763,8 +986,8 @@ export default { }, getDataList() { - if(!this.listQuery.startTime &&!this.listQuery.endTime ){ - return this.$modal.msgError('请选择时间'); + if (!this.listQuery.startTime && !this.listQuery.endTime) { + return this.$modal.msgError('请选择时间'); } this.dataListLoading = true; // const arr = ['日', '周', '月', '年']; @@ -798,7 +1021,7 @@ export default { console.log('resGroup'); if (this.listQuery.timeType === 2) { const resGroup = await getProcessAutoReportNew(this.listQuery); - console.log('resGroup',resGroup); + console.log('resGroup', resGroup); // 格式化数据:lineDetList提取到外层,键名加lineId前缀 const formatData = (rawList) => { @@ -827,7 +1050,7 @@ export default { // 处理当班和当天数据(分别存储) this.productTableData = formatData(resGroup.data.list); // 当班数据 - console.log(this.productTableData,'productTableData'); + console.log(this.productTableData, 'productTableData'); // -------------------------- // 生成当班数据的动态表头 @@ -1005,6 +1228,28 @@ export default { return [...lineColumns, totalColumn]; }, // 为当天时调用的接口 + getLastDayDataList() { + getPdlAutoReportNewSearchLastGroup().then((response) => { + this.tableData = response.data.classData.map((item, index) => { + item.originalLossNum = item.original?.lossNum; + item.originalLossArea = item.original?.lossArea; + item.edgeLossNum = item.edge?.lossNum; + item.edgeLossArea = item.edge?.lossArea; + item.drillLossNum = item.drill?.lossNum; + item.drillLossArea = item.drill?.lossArea; + item.coatingLossNum = item.coating?.lossNum; + item.coatingLossArea = item.coating?.lossArea; + item.silkLossNum = item.silk?.lossNum; + item.silkLossArea = item.silk?.lossArea; + item.temperingLossNum = item.tempering?.lossNum; + item.temperingLossArea = item.tempering?.lossArea; + item.packingLossNum = item.packing?.lossNum; + item.packingLossArea = item.packing?.lossArea; + return item; + }); + // console.log(this.tableData, this.tableData2); + }); + }, getDayDataList() { getPdlAutoReportNewSearchNow().then((response) => { this.tableData = response.data.classData.map((item, index) => { @@ -1060,28 +1305,26 @@ export default { // 搜索栏下拉选择变化 handleSearchBarChanged({ param, value }) { + console.log(value, param); if (param === 'timeType') { console.log(value); this.listQuery.timeType = value; - if (value === 1) { - // 切换为“当天”:隐藏查询类型、报表类型、时间范围 + if (value === 2) { + // 切换为“自定义”:显示查询类型和时间范围 + this.formConfig[1].type = 'select'; + this.$refs.searchBarForm.formInline.timeType = value; + this.listQuery.timeType = value; + this.formConfig[7].type = 'datePicker'; + } else { this.formConfig[1].type = ''; this.formConfig[6].type = ''; this.formConfig[7].type = ''; this.$refs.searchBarForm.formInline.timeType = value; this.listQuery.timeType = value; - this.$refs.searchBarForm.formInline.searchType = undefined; this.$refs.searchBarForm.formInline.reportType = undefined; this.$refs.searchBarForm.formInline.timeVal = undefined; - } else { - // 切换为“自定义”:显示查询类型和时间范围 - this.formConfig[1].type = 'select'; - this.$refs.searchBarForm.formInline.timeType = value; - this.listQuery.timeType = value; - - this.formConfig[7].type = 'datePicker'; } } else if (param === 'searchType') { if (value === 1) { @@ -1095,7 +1338,74 @@ export default { this.formConfig[7].type = 'datePicker'; } } else if (param === 'reportType') { - this.$refs.searchBarForm.formInline.timeVal = undefined; + if (this.$refs.searchBarForm && this.$refs.searchBarForm.formInline) { + const formInline = this.$refs.searchBarForm.formInline; + // 精准判断:只有字段存在时,才置为undefined(不存在则不处理) + if ('timeVal' in formInline) { + formInline.timeVal = undefined; + } + if ('timeValWeek' in formInline) { + formInline.timeValWeek = undefined; + } + if ('timeValMonth' in formInline) { + formInline.timeValMonth = undefined; + } + if ('timeValYear' in formInline) { + formInline.timeValYear = undefined; + } + } + this.listQuery.startTime = undefined; + this.listQuery.endTime = undefined; + if (value === 1) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'datetimerange', + format: 'yyyy-MM-dd HH:mm:ss', + valueFormat: 'timestamp', + rangeSeparator: '-', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + param: 'timeVal', + width: 350 + }; + } else if (value === 2) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'week', + placeholder: '选择日期', + format: 'yyyy-MM-dd', + valueFormat: 'yyyy-MM-dd', + param: 'timeValWeek', + width: 250, + }; + } else if (value === 3) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'monthrange', + format: 'yyyy-MM-dd', + valueFormat: 'timestamp', + rangeSeparator: '-', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + param: 'timeValMonth', + defaultTime: ['00:00:00', '23:59:59'], + width: 250, + }; + } else if (value === 4) { + this.formConfig[7] = { + type: 'datePicker', + label: '时间范围', + dateType: 'year', + placeholder: '选择年份', + format: 'yyyy', + valueFormat: 'timestamp', + param: 'timeValYear', + width: 250, + }; + } } else if (param === 'factoryId') { // 切换工厂时刷新产线列表 this.listQuery.lineId = []; @@ -1142,7 +1452,7 @@ export default { .content-wrapper { // flex: 1; width: 100%; - height: calc(100vh - 303px); + height: calc(100vh - 280px); // overflow: hidden; } diff --git a/src/views/core/monitoring/rawFilmReport/index.vue b/src/views/core/monitoring/rawFilmReport/index.vue index 5dd5448a..33798e93 100644 --- a/src/views/core/monitoring/rawFilmReport/index.vue +++ b/src/views/core/monitoring/rawFilmReport/index.vue @@ -1,14 +1,8 @@ - + + diff --git a/src/views/core/monitoring/rawFilmReport/searchBar.vue b/src/views/core/monitoring/rawFilmReport/searchBar.vue new file mode 100644 index 00000000..234a70ee --- /dev/null +++ b/src/views/core/monitoring/rawFilmReport/searchBar.vue @@ -0,0 +1,274 @@ + + + diff --git a/src/views/equipment/equipmentOverview/SmallTitle.vue b/src/views/equipment/equipmentOverview/SmallTitle.vue new file mode 100644 index 00000000..93b4a18f --- /dev/null +++ b/src/views/equipment/equipmentOverview/SmallTitle.vue @@ -0,0 +1,65 @@ + + + + + + diff --git a/src/views/equipment/equipmentOverview/add-or-updata.vue b/src/views/equipment/equipmentOverview/add-or-updata.vue new file mode 100644 index 00000000..0e3c8403 --- /dev/null +++ b/src/views/equipment/equipmentOverview/add-or-updata.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/src/views/equipment/equipmentOverview/alarm-or-updata.vue b/src/views/equipment/equipmentOverview/alarm-or-updata.vue new file mode 100644 index 00000000..1a5341b3 --- /dev/null +++ b/src/views/equipment/equipmentOverview/alarm-or-updata.vue @@ -0,0 +1,498 @@ + + + + + diff --git a/src/views/equipment/equipmentOverview/index.vue b/src/views/equipment/equipmentOverview/index.vue new file mode 100644 index 00000000..b3d22063 --- /dev/null +++ b/src/views/equipment/equipmentOverview/index.vue @@ -0,0 +1,1252 @@ + + + + + + + diff --git a/src/views/login.vue b/src/views/login.vue index 051df9a2..5db9fab6 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -51,6 +51,7 @@ src="/static/videos/login.webm" muted autoplay + id="video" loop style=" user-select: none; @@ -338,7 +339,8 @@ export default { SysUserSocialTypeEnum: SystemUserSocialTypeEnum, }; }, - created() { + created() { + // 租户开关 this.tenantEnable = getTenantEnable(); if (this.tenantEnable) { @@ -356,8 +358,15 @@ export default { this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : undefined; - this.getCookie(); - }, + this.getCookie(); + + + }, + mounted () { + const video = document.getElementById('video'); + // 设置为0.5倍速,数值越小速度越慢(0.5为半速,0.75为0.75倍速等) + video.playbackRate = 0.2; + }, methods: { getCode() { // 情况一,未开启:则直接登录 diff --git a/src/views/quality/dpdda/defectAnalysis.vue b/src/views/quality/dpdda/defectAnalysis.vue new file mode 100644 index 00000000..da8f55ec --- /dev/null +++ b/src/views/quality/dpdda/defectAnalysis.vue @@ -0,0 +1,309 @@ + + + diff --git a/src/views/quality/dpdda/defectSummary.vue b/src/views/quality/dpdda/defectSummary.vue new file mode 100644 index 00000000..ca1934bb --- /dev/null +++ b/src/views/quality/dpdda/defectSummary.vue @@ -0,0 +1,560 @@ + + + + diff --git a/src/views/quality/dpdda/defectSummaryDet.vue b/src/views/quality/dpdda/defectSummaryDet.vue new file mode 100644 index 00000000..f60f8eb1 --- /dev/null +++ b/src/views/quality/dpdda/defectSummaryDet.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/src/views/quality/dpdda/sectionDefect.vue b/src/views/quality/dpdda/sectionDefect.vue new file mode 100644 index 00000000..49bed6a2 --- /dev/null +++ b/src/views/quality/dpdda/sectionDefect.vue @@ -0,0 +1,416 @@ + + + + diff --git a/src/views/quality/qualityIsra/defectVisualization.vue b/src/views/quality/qualityIsra/defectVisualization.vue new file mode 100644 index 00000000..89033e0a --- /dev/null +++ b/src/views/quality/qualityIsra/defectVisualization.vue @@ -0,0 +1,674 @@ + + + + + diff --git a/src/views/quality/qualityIsra/dialogForm.vue b/src/views/quality/qualityIsra/dialogForm.vue new file mode 100644 index 00000000..be2f7c74 --- /dev/null +++ b/src/views/quality/qualityIsra/dialogForm.vue @@ -0,0 +1,270 @@ + + + + + + + diff --git a/src/views/quality/qualityIsra/index.vue b/src/views/quality/qualityIsra/index.vue new file mode 100644 index 00000000..885e6fc1 --- /dev/null +++ b/src/views/quality/qualityIsra/index.vue @@ -0,0 +1,468 @@ + + + + diff --git a/src/views/quality/transmittanceTesting.vue b/src/views/quality/transmittanceTesting.vue new file mode 100644 index 00000000..cd40b057 --- /dev/null +++ b/src/views/quality/transmittanceTesting.vue @@ -0,0 +1,305 @@ + + + diff --git a/yarn.lock b/yarn.lock index 8d649fcd..f067da31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3157,6 +3157,11 @@ "resolved" "https://registry.npmmirror.com/check-types/-/check-types-8.0.3.tgz" "version" "8.0.3" +"chinese-lunar@^0.1.4": + "integrity" "sha512-E4seb9UZkSJtkm65Ry2ZLWTw5Z87DOyGcCePdg3ft7da342hnEliMtcDAPSn+YSo/o0xl1Egmhh671kxEJgY+g==" + "resolved" "https://registry.npmmirror.com/chinese-lunar/-/chinese-lunar-0.1.4.tgz" + "version" "0.1.4" + "chokidar@^2.1.8": "integrity" "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==" "resolved" "https://registry.npmmirror.com/chokidar/-/chokidar-2.1.8.tgz"