From 56191453af715f0fdb526107b22451510c176199 Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 18 Aug 2023 15:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=9B=AE=E5=BD=95=E7=BB=93?= =?UTF-8?q?=E6=9E=84=EF=BC=8C=E7=A7=BB=E5=8A=A8DialogForm=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E7=A7=BB=E5=8A=A8=E8=AE=BE=E5=A4=87=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=92=8C=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B=E8=87=B3?= =?UTF-8?q?=E6=A0=B8=E5=BF=83=E7=94=9F=E4=BA=A7=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DialogForm/index.vue} | 0 .../mixin => mixins/lb}/basicPageMixin.js | 2 +- src/views/base/equipmentGroup/index.vue | 2 +- src/views/base/mixin/basicPageMixin.js | 115 ---------- src/views/{ => core}/base/equipment/index.vue | 2 +- .../{ => core}/base/equipmentType/index.vue | 2 +- .../base/qualityInspectionBoxBtn/index.vue | 2 +- .../base/qualityInspectionDet/index.vue | 2 +- .../base/qualityInspectionType/index.vue | 2 +- src/views/quality/components/dialogForm.vue | 208 ------------------ .../qualityInspectionRecord/index.vue | 2 +- .../components/summaryTable.vue | 8 - .../monitoring/qualityStatistics/index.vue | 10 +- 13 files changed, 9 insertions(+), 348 deletions(-) rename src/{views/base/components/dialogForm.vue => components/DialogForm/index.vue} (100%) rename src/{views/quality/mixin => mixins/lb}/basicPageMixin.js (97%) delete mode 100644 src/views/base/mixin/basicPageMixin.js rename src/views/{ => core}/base/equipment/index.vue (99%) rename src/views/{ => core}/base/equipmentType/index.vue (99%) delete mode 100644 src/views/quality/components/dialogForm.vue diff --git a/src/views/base/components/dialogForm.vue b/src/components/DialogForm/index.vue similarity index 100% rename from src/views/base/components/dialogForm.vue rename to src/components/DialogForm/index.vue diff --git a/src/views/quality/mixin/basicPageMixin.js b/src/mixins/lb/basicPageMixin.js similarity index 97% rename from src/views/quality/mixin/basicPageMixin.js rename to src/mixins/lb/basicPageMixin.js index 670b909a..af4dbeda 100644 --- a/src/views/quality/mixin/basicPageMixin.js +++ b/src/mixins/lb/basicPageMixin.js @@ -1,4 +1,4 @@ -import DialogForm from '../components/dialogForm.vue'; +import DialogForm from '@/components/DialogForm/index.vue'; export default { components: { DialogForm }, diff --git a/src/views/base/equipmentGroup/index.vue b/src/views/base/equipmentGroup/index.vue index c1c43efc..7c75e8f0 100644 --- a/src/views/base/equipmentGroup/index.vue +++ b/src/views/base/equipmentGroup/index.vue @@ -53,7 +53,7 @@ import { exportEquipmentGroupExcel, } from '@/api/base/equipmentGroup'; import moment from 'moment'; -import basicPageMixin from '../mixin/basicPageMixin'; +import basicPageMixin from '@/mixins/lb/basicPageMixin'; import { getAccessToken } from '@/utils/auth'; export default { diff --git a/src/views/base/mixin/basicPageMixin.js b/src/views/base/mixin/basicPageMixin.js deleted file mode 100644 index 547a168b..00000000 --- a/src/views/base/mixin/basicPageMixin.js +++ /dev/null @@ -1,115 +0,0 @@ -import DialogForm from '../components/dialogForm.vue'; - -export default { - components: { DialogForm }, - data() { - return { - // 遮罩层 - loading: true, - // 导出遮罩层 - exportLoading: false, - // 显示搜索条件 - showSearch: true, - // 总条数 - total: 0, - // 质量检测信息基础列表 - list: [], - // 弹出层标题 - title: '', - // 是否显示弹出层 - open: false, - // 列表数据 - tableData: [], - // 弹窗的表单 - // form: {}, // 占位 - // 搜索框需要的 keys - // searchBarKeys: [], // 占位 - // tableProps: [], // 占位 - // tableBtn: [], // 占位 - // searchBarFormConfig: [], // 占位 - // // 弹窗表单配置 - // dialogFormConfig: [], // 占位 - }; - }, - mounted() {}, - methods: { - // 过滤后端传回的详情数据 - filterData(data, keys) { - const obj = {}; - keys.forEach((key) => { - if (/time/i.test(key)) { - obj[key] = new Date(data[key]); - } else { - obj[key] = data[key]; - } - }); - return obj; - }, - // 处理搜索条件 - handleSearchBarBtnClick() {}, - // 处理表格按钮 - handleTableBtnClick({ data, type }) { - switch (type) { - case 'edit': - this.handleUpdate(data); - break; - case 'delete': - this.handleDelete(data); - break; - } - }, - // 处理搜索栏按钮 - handleSearchBarBtnClick(btn) { - // const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代 - switch (btn.btnName) { - case 'search': - this.searchBarKeys.forEach((key) => { - if (key == 'timeVal') { - this.queryParams['startTime'] = btn.timeVal[0]; - this.queryParams['endTime'] = btn.timeVal[1]; - return; - } - this.queryParams[key] = btn[key] || null; - }); - this.handleQuery(); - break; - case 'add': - this.handleAdd(); - break; - case 'export': - this.handleExport(); - break; - case 'reset': - this.$refs['search-bar'].resetForm(); - this.resetQuery(); - break; - } - }, - handleEmitFun({ action, value }) { - console.log('[Emit Fun]', action, value); - switch (action) { - // 查看详情 - case 'show-detail': - this.$modal.msgSuccess('查看详情') - break; - } - }, - // 获取列表数据 - getList() {}, - /** 搜索按钮操作 */ - handleQuery() { - this.queryParams.pageNo = 1; - this.getList(); - }, - /** 重置按钮操作 */ - resetQuery() { - this.resetForm('queryForm'); - this.handleQuery(); - }, - /** 取消按钮 */ - cancel() { - this.open = false; - this.reset(); - }, - }, -}; diff --git a/src/views/base/equipment/index.vue b/src/views/core/base/equipment/index.vue similarity index 99% rename from src/views/base/equipment/index.vue rename to src/views/core/base/equipment/index.vue index bc8b84cd..6b31fe78 100644 --- a/src/views/base/equipment/index.vue +++ b/src/views/core/base/equipment/index.vue @@ -122,7 +122,7 @@ - - diff --git a/src/views/quality/monitoring/qualityInspectionRecord/index.vue b/src/views/quality/monitoring/qualityInspectionRecord/index.vue index 2ff114c1..19e691f4 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/index.vue +++ b/src/views/quality/monitoring/qualityInspectionRecord/index.vue @@ -55,7 +55,7 @@ import { import Editor from '@/components/Editor'; import moment from 'moment'; -import basicPageMixin from '../../mixin/basicPageMixin'; +import basicPageMixin from '@/mixins/lb/basicPageMixin'; export default { name: 'QualityInspectionRecord', components: { diff --git a/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue b/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue index 9bdc7c24..4edc8489 100644 --- a/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue +++ b/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue @@ -13,14 +13,6 @@ :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"> - -