From 9561dc27e332c62f73ad325aa8601286d32a1123 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 20 Dec 2023 10:26:38 +0800 Subject: [PATCH 1/7] fix some bugs --- src/components/DialogForm/index.vue | 24 +++++++++++++++++-- .../specialEquipment/basic/FireFighthing.vue | 8 +++---- src/views/specialEquipment/basic/Safety.vue | 4 ++-- .../specialEquipment/check/Record-add.vue | 3 +++ .../specialEquipment/maintain/PlanConfig.vue | 2 +- .../specialEquipment/maintain/Record.vue | 13 ++++++++++ 6 files changed, 45 insertions(+), 9 deletions(-) diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 3248ce17..ac7e32ac 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -101,7 +101,9 @@ } " v-bind="col.bind"> - + @@ -410,8 +412,26 @@ export default { } if (!promiseList.length) this.formLoading = false; }, + // 上传成功的特殊处理 - beforeUpload() {}, + beforeUpload(file) { + const checkFileSize = () => { + const isLt2M = file.size / 1024 / 1024 < 2; + if (!isLt2M) { + this.$modal.msgError('上传文件大小不能超过 2MB!'); + } + return isLt2M; + }; + const checkFileType = () => { + const isJPG = + file.type === 'image/jpeg' || + file.type === 'image/png' || + file.type === 'image/jpg'; + return isJPG; + }; + return checkFileSize() && checkFileType(); + }, + // 上传前的验证规则可通过 bind 属性传入 handleUploadSuccess(response, file, prop) { console.log('[handleUploadSuccess]', response, file, prop); diff --git a/src/views/specialEquipment/basic/FireFighthing.vue b/src/views/specialEquipment/basic/FireFighthing.vue index 341d4883..9f925444 100644 --- a/src/views/specialEquipment/basic/FireFighthing.vue +++ b/src/views/specialEquipment/basic/FireFighthing.vue @@ -170,19 +170,19 @@ export default { { width: 256, prop: 'code', label: '设备编码' }, { prop: 'location', label: '位置' }, { prop: 'responsiblePeopleName', label: '负责人' }, - { prop: 'dueDate', label: '有效期至' }, + { prop: 'dueTime', label: '有效期至' }, { prop: 'remark', label: '备注' }, ], searchBarFormConfig: [ { type: 'input', - label: '名称', + label: '设备名称', placeholder: '请输入设备名称', param: 'name', }, { type: 'input', - label: '编码', + label: '设备编码', placeholder: '请输入设备编码', param: 'code', }, @@ -251,7 +251,7 @@ export default { { datetime: true, label: '有效期至', - prop: 'dueDate', + prop: 'dueTime', bind: { clearable: true }, }, {}, diff --git a/src/views/specialEquipment/basic/Safety.vue b/src/views/specialEquipment/basic/Safety.vue index 25cd5a61..b91767fb 100644 --- a/src/views/specialEquipment/basic/Safety.vue +++ b/src/views/specialEquipment/basic/Safety.vue @@ -175,13 +175,13 @@ export default { searchBarFormConfig: [ { type: 'input', - label: '名称', + label: '设备名称', placeholder: '请输入设备名称', param: 'name', }, { type: 'input', - label: '编码', + label: '设备编码', placeholder: '请输入设备编码', param: 'code', }, diff --git a/src/views/specialEquipment/check/Record-add.vue b/src/views/specialEquipment/check/Record-add.vue index c5935113..79e9c659 100644 --- a/src/views/specialEquipment/check/Record-add.vue +++ b/src/views/specialEquipment/check/Record-add.vue @@ -54,6 +54,7 @@ diff --git a/src/views/specialEquipment/maintain/PlanConfig.vue b/src/views/specialEquipment/maintain/PlanConfig.vue index 217e61fe..c4559687 100644 --- a/src/views/specialEquipment/maintain/PlanConfig.vue +++ b/src/views/specialEquipment/maintain/PlanConfig.vue @@ -353,7 +353,7 @@ export default { queryData.createTime = this.queryParams.createTime; } this.$router.push({ - path: '/equipment/base/maintain/record', + path: '/safety-environmental/special-equipment/equipment-maintain/maintain-record', query: queryData, }); // this.$router.push({ path: '/equipment/base/maintain/record', query: { orderNo: row.orderNo }}) diff --git a/src/views/specialEquipment/maintain/Record.vue b/src/views/specialEquipment/maintain/Record.vue index 3d18b73e..bf33d9a0 100644 --- a/src/views/specialEquipment/maintain/Record.vue +++ b/src/views/specialEquipment/maintain/Record.vue @@ -556,6 +556,19 @@ export default { this.form.relatePlan = tempRow.nextMaintainTime ? 1 : 2; this.form.startTime = tempRow.nextMaintainTime; this.form.maintainPlanId = tempRow.id; + // await (() => { + // return new Promise((acpt, rejt) => { + // this.form.relatePlan = + // this.$route.query.relatePlan || + // (tempRow.nextMaintainTime ? 1 : 2); + // this.form.startTime = tempRow.nextMaintainTime; + // acpt(); + // }); + // })(); + // this.$nextTick(() => { + // this.form.maintainPlanId = tempRow.id; + // this.form.equipmentId = tempRow.equipmentId; + // }); } if (this.$route.query.isAdd) { // 赋值 From a764e20bd4497a7b3f336346e8ef468e5510fd52 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 20 Dec 2023 10:45:00 +0800 Subject: [PATCH 2/7] update --- src/views/specialEquipment/check/Record-add.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/specialEquipment/check/Record-add.vue b/src/views/specialEquipment/check/Record-add.vue index 79e9c659..3da17625 100644 --- a/src/views/specialEquipment/check/Record-add.vue +++ b/src/views/specialEquipment/check/Record-add.vue @@ -50,7 +50,12 @@ - + --> - + Date: Wed, 20 Dec 2023 14:11:05 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Sidebar/Item.vue | 2 + src/layout/components/Sidebar/Logo.vue | 10 +- src/layout/components/Sidebar/SidebarItem.vue | 9 +- .../components/Sidebar/SidebarItemSub.vue | 96 +++++++++++++++++++ src/layout/components/Sidebar/index.vue | 8 +- src/views/system/menu/index.vue | 16 ++-- 6 files changed, 122 insertions(+), 19 deletions(-) create mode 100644 src/layout/components/Sidebar/SidebarItemSub.vue diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index be3285df..07dca92a 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -18,6 +18,8 @@ export default { if (icon) { vnodes.push() + } else { + vnodes.push() } if (title) { diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 91a437be..c02cd648 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -15,7 +15,7 @@ key="collapse" class="sidebar-logo-link" to="/"> - +

- + - +
+ + + + + + +
+ + + diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index bac19f28..5c46634d 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -28,10 +28,10 @@ mode="vertical"> + :base-path="routeList.path+ '/'+ route.path" /> @@ -49,9 +49,7 @@ export default { ...mapState(['settings']), ...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']), routeList() { - // return [this.partList[this.choicepart]] - // return [this.sidebarRouters[29]] - return [this.sidebarRouters[this.choicepart]] + return this.sidebarRouters[this.choicepart] }, activeMenu() { const route = this.$route; diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index efb4df49..082db5a8 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -32,11 +32,11 @@ - + @@ -76,7 +76,7 @@ - + @@ -263,9 +263,9 @@ export default { }, methods: { // 选择图标 - selected(name) { - this.form.icon = name; - }, + // selected(name) { + // this.form.icon = name; + // }, /** 查询菜单列表 */ getList() { this.loading = true; @@ -305,7 +305,7 @@ export default { id: undefined, parentId: 0, name: undefined, - icon: undefined, + // icon: undefined, type: SystemMenuTypeEnum.DIR, sort: undefined, status: CommonStatusEnum.ENABLE, From 4c99d39f8a2dea42289a641d91c7c9d754d54856 Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Wed, 20 Dec 2023 14:22:30 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Sidebar/Item.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index 07dca92a..30873bd5 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -17,7 +17,7 @@ export default { const vnodes = [] if (icon) { - vnodes.push() + vnodes.push() } else { vnodes.push() } From df7bc08f71a657789dc9a78d54d875487f2f012f Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Fri, 22 Dec 2023 16:35:03 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E8=AF=A6=E6=83=85ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/base/coreAlarmLog/index.vue | 2 +- src/views/base/coreWorkOrder/detail.vue | 309 +++++++++++------- .../monitoring/equipmentFullParams/index.vue | 46 ++- 3 files changed, 219 insertions(+), 138 deletions(-) diff --git a/src/views/base/coreAlarmLog/index.vue b/src/views/base/coreAlarmLog/index.vue index 731bb4ab..e9853140 100644 --- a/src/views/base/coreAlarmLog/index.vue +++ b/src/views/base/coreAlarmLog/index.vue @@ -90,7 +90,7 @@ export default { { type: 'datePicker', label: '时间段', - dateType: 'datetimerange', + dateType: 'daterange', format: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd HH:mm:ss', rangeSeparator: '-', diff --git a/src/views/base/coreWorkOrder/detail.vue b/src/views/base/coreWorkOrder/detail.vue index d3859ebf..53d181d1 100644 --- a/src/views/base/coreWorkOrder/detail.vue +++ b/src/views/base/coreWorkOrder/detail.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: DY - * @LastEditTime: 2023-11-23 18:45:15 + * @LastEditTime: 2023-12-22 16:02:25 * @Description: -->