From f26d7abc6443731965bf93bab75cb2e8aa6fd557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Fri, 3 Jan 2025 09:55:08 +0800 Subject: [PATCH 1/2] =?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/mixins/lb/basicPageMixin.js | 6 ++++-- src/views/equipment/base/inspection/Settings/add.vue | 2 +- .../base/inspection/items/components/basic-page.js | 6 +++--- src/views/equipment/base/inspection/items/index.vue | 9 +++++---- src/views/equipment/base/inspection/items/showDetail.vue | 3 ++- src/views/equipment/base/spareParts/List/index.vue | 7 ++++--- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/mixins/lb/basicPageMixin.js b/src/mixins/lb/basicPageMixin.js index 638b069c..6c75636b 100644 --- a/src/mixins/lb/basicPageMixin.js +++ b/src/mixins/lb/basicPageMixin.js @@ -28,7 +28,7 @@ export default { // tableBtn: [], // 占位 // searchBarFormConfig: [], // 占位 // // 弹窗表单配置 - // dialogFormConfig: [], // + // dialogFormConfig: [], // updateUrl: '', addUrl: '', pageUrl: '', @@ -109,7 +109,9 @@ export default { } }, // 处理搜索栏按钮 - handleSearchBarBtnClick(btn) { + handleSearchBarBtnClick(btn) { + console.log(btn); + // const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代 switch (btn.btnName) { case 'search': diff --git a/src/views/equipment/base/inspection/Settings/add.vue b/src/views/equipment/base/inspection/Settings/add.vue index 0e73a809..093649b8 100644 --- a/src/views/equipment/base/inspection/Settings/add.vue +++ b/src/views/equipment/base/inspection/Settings/add.vue @@ -201,7 +201,7 @@ export default { this.groupOptions = res1.data.map((item) => { item.label = - item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict); + item.name + (getDictDataLabel('workshop', item.roomNameDict) ? ' - ' + getDictDataLabel('workshop', item.roomNameDict) : '') return item; }) || []; // const res = await getEquipmentAll() diff --git a/src/views/equipment/base/inspection/items/components/basic-page.js b/src/views/equipment/base/inspection/items/components/basic-page.js index d4aab025..44beb69e 100644 --- a/src/views/equipment/base/inspection/items/components/basic-page.js +++ b/src/views/equipment/base/inspection/items/components/basic-page.js @@ -29,9 +29,9 @@ export default { }, created() { }, - mounted() { - this.getDataList() - }, + // mounted() { + // this.getDataList() + // }, methods: { // 获取数据列表 getDataList() { diff --git a/src/views/equipment/base/inspection/items/index.vue b/src/views/equipment/base/inspection/items/index.vue index fbf01d64..3cfb1926 100644 --- a/src/views/equipment/base/inspection/items/index.vue +++ b/src/views/equipment/base/inspection/items/index.vue @@ -40,7 +40,7 @@ export default { const t = new Date(); const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()]; return { - searchBarKeys: ['equipmentName', 'createTime'], + searchBarKeys: ['equipmentTypeId'], equipmentTypeList:[], tableBtn: [ { @@ -125,7 +125,7 @@ export default { created() { this.initSearchBar() this.getList(); - }, + }, methods: { /** 查询列表 */ getList() { @@ -231,13 +231,14 @@ export default { return; } // 添加的提交 - this.post(this.form).then((response) => { + this.post(this.form).then((res) => { + console.log('res', res) this.$modal.msgSuccess('新增成功'); this.open = false; this.getList() this.showDetailVisible = true this.$nextTick(() => { - this.$refs.showDetail.init(this.form.equipmentTypeId) + this.$refs.showDetail.init(res.data) }) }); }); diff --git a/src/views/equipment/base/inspection/items/showDetail.vue b/src/views/equipment/base/inspection/items/showDetail.vue index 34d5e57f..d24939f6 100644 --- a/src/views/equipment/base/inspection/items/showDetail.vue +++ b/src/views/equipment/base/inspection/items/showDetail.vue @@ -100,9 +100,10 @@ export default { // console.log(this.tableData) }, getDataList(id) { + console.log(id) this.dataListLoading = true; this.queryParams.equipmentTypeId = id - console.log(id); + console.log(this.queryParams.equipmentTypeId) this.urlOptions.getDataListURL(this.queryParams).then(response => { this.tableData = response.data.list; this.listQuery.total = response.data.total; diff --git a/src/views/equipment/base/spareParts/List/index.vue b/src/views/equipment/base/spareParts/List/index.vue index 905c206c..05c26bfe 100644 --- a/src/views/equipment/base/spareParts/List/index.vue +++ b/src/views/equipment/base/spareParts/List/index.vue @@ -404,8 +404,8 @@ export default { .catch(() => {}); }, async getDict() { - const materRes = await getMaterialTree(); // - let typeId = materRes.data.find((item) => item.product === 2).id; + const materRes = await getMaterialTree(); + let typeId = materRes.data.find((item) => item.product === 2); const listQuery = { typeId: typeId, }; @@ -416,7 +416,8 @@ export default { ...item })); }, - updateDialogFormZ(val) { + updateDialogFormZ(val) { + // console.log(this.rows[0][0].options) const selectData = this.rows[0][0].options.find( (item) => item.id === val.productMaterialId ); -- 2.45.2 From 04a5359eda23574eba77a74b9df837e5dd6cde37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Wed, 8 Jan 2025 16:10:46 +0800 Subject: [PATCH 2/2] =?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/api/equipment/base/maintain/record.js | 10 +- .../equipment/base/config/BindGroup/index.vue | 44 +++--- .../DataCollection/CollectionConfig.vue | 8 +- .../base/inspection/Confirm/index.vue | 15 +- .../base/maintain/Monitor/showDetail.vue | 4 +- .../base/spareParts/Config/index.vue | 4 +- .../equipment/base/spareParts/List/index.vue | 25 ++- .../equipment/timing-diagram/status/chart.js | 10 +- .../equipment/timing-diagram/status/index.vue | 147 ++++++++---------- .../monitoring/equipmentFullParams/index.vue | 39 +++-- 10 files changed, 155 insertions(+), 151 deletions(-) diff --git a/src/api/equipment/base/maintain/record.js b/src/api/equipment/base/maintain/record.js index 012239bf..f6cf896e 100644 --- a/src/api/equipment/base/maintain/record.js +++ b/src/api/equipment/base/maintain/record.js @@ -3,7 +3,7 @@ * @Date: 2023-11-08 15:56:52 * @LastEditTime: 2024-02-26 17:02:53 * @LastEditors: DY - * @Description: + * @Description: */ import request from '@/utils/request' @@ -78,3 +78,11 @@ export function deleteLogDet(id) { method: 'delete' }) } + +export function getEqMaintainPlanPageData(query) { + return request({ + url: '/base/equipment-maintain-plan-det/page', + method: 'get', + params: query + }) +} diff --git a/src/views/equipment/base/config/BindGroup/index.vue b/src/views/equipment/base/config/BindGroup/index.vue index 03cd2c9d..ff8d73b5 100644 --- a/src/views/equipment/base/config/BindGroup/index.vue +++ b/src/views/equipment/base/config/BindGroup/index.vue @@ -119,12 +119,12 @@ export default { return { searchBarKeys: ['groupId', 'equipmentName'], tableBtn: [ - this.$auth.hasPermi('equipment:bind-group:update') - ? { - type: 'detail', - btnName: '查看报警', - } - : undefined, + // this.$auth.hasPermi('equipment:bind-group:update') + // ? { + // type: 'detail', + // btnName: '查看报警', + // } + // : undefined, this.$auth.hasPermi('equipment:bind-group:update') ? { type: 'edit', @@ -371,8 +371,8 @@ export default { }, handleTableBtnClick({ data, type }) { switch (type) { - case 'edit': - this.handleDetail(data, 'edit'); + case 'edit': + this.handleUpdate(data) break; case 'delete': this.handleDelete(data); @@ -397,7 +397,7 @@ export default { this.reset(); this.open = true; this.title = '添加设备与分组绑定'; - }, + }, /** 修改按钮操作 */ handleUpdate(row) { this.reset(); @@ -432,19 +432,19 @@ export default { }); }, // 查看报警 - handleDetail(row, mode = 'detail') { - const { equipmentId, equipmentName, groupCode, groupId, groupName, id } = - row; - // 打开抽屉 - this.editMode = mode; - this.alarmForm.id = groupId; - this.alarmForm.equipmentGroupCode = groupCode; - this.alarmForm.equipmentGroupName = groupName; - this.editVisible = true; - this.$nextTick(() => { - this.$refs['drawer'].init(); - }); - }, + // handleDetail(row, mode = 'detail') { + // const { equipmentId, equipmentName, groupCode, groupId, groupName, id } = + // row; + // // 打开抽屉 + // this.editMode = mode; + // this.alarmForm.id = groupId; + // this.alarmForm.equipmentGroupCode = groupCode; + // this.alarmForm.equipmentGroupName = groupName; + // this.editVisible = true; + // this.$nextTick(() => { + // this.$refs['drawer'].init(); + // }); + // }, /** 删除按钮操作 */ handleDelete(row) { const id = row.id; diff --git a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue index abba9d4d..b4e33780 100644 --- a/src/views/equipment/base/config/DataCollection/CollectionConfig.vue +++ b/src/views/equipment/base/config/DataCollection/CollectionConfig.vue @@ -1,8 +1,8 @@ -