From 3d24159743da8f7906437c675d69b521991cb40d Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 24 Aug 2023 15:36:38 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=AE=8C=E6=88=90=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DialogForm/index.vue | 2 +- src/mixins/lb/basicPageMixin.js | 4 --- .../equipment/components/EquipmentDrawer.vue | 35 +++++++++++++------ .../equipment/components/EquipmentPics.vue | 12 ++++--- src/views/core/base/equipment/index.vue | 20 ++++------- 5 files changed, 40 insertions(+), 33 deletions(-) diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index ae3ad324..716f5a02 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -62,7 +62,7 @@ v-if="col.subcomponent" :key="col.key" :is="col.subcomponent" - :style="col.style"> + :inlineStyle="col.style"> diff --git a/src/mixins/lb/basicPageMixin.js b/src/mixins/lb/basicPageMixin.js index 73dd4a19..3a59732b 100644 --- a/src/mixins/lb/basicPageMixin.js +++ b/src/mixins/lb/basicPageMixin.js @@ -45,8 +45,6 @@ export default { }); return obj; }, - // 处理搜索条件 - handleSearchBarBtnClick() {}, // 处理表格按钮 handleTableBtnClick({ data, type }) { switch (type) { @@ -94,8 +92,6 @@ export default { break; } }, - // 获取列表数据 - getList() {}, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNo = 1; diff --git a/src/views/core/base/equipment/components/EquipmentDrawer.vue b/src/views/core/base/equipment/components/EquipmentDrawer.vue index dc4a170a..445ac334 100644 --- a/src/views/core/base/equipment/components/EquipmentDrawer.vue +++ b/src/views/core/base/equipment/components/EquipmentDrawer.vue @@ -32,6 +32,7 @@
{ - return row.map((col) => ({ - ...col, - bind: { - // 详情 模式下,禁用各种输入 - disabled: this.mode == 'detail', - }, - })); + return row.map((col) => { + if (col.key == 'eq-pics') { + // 重置图片的位置 + return { + ...col, + style: { + left: 0, + right: 'unset' + } + } + } + return { + ...col, + bind: { + // 详情 模式下,禁用各种输入 + disabled: this.mode == 'detail', + }, + }; + }); }); }, tableBtn() { @@ -231,8 +244,8 @@ export default { this.attrListLoading = true; const res = await this.$axios(this.attrQuery); if (res.code == 0) { - this.list = data.list; - this.total = data.total; + this.list = res.data.list; + this.total = res.data.total; } this.attrListLoading = false; }, @@ -332,7 +345,7 @@ export default { method: isEdit ? 'put' : 'post', data: this.attrForm, }); - + if (res.code == 0) { this.closeAttrForm(); this.$message({ diff --git a/src/views/core/base/equipment/components/EquipmentPics.vue b/src/views/core/base/equipment/components/EquipmentPics.vue index 5484c901..9c4b1f92 100644 --- a/src/views/core/base/equipment/components/EquipmentPics.vue +++ b/src/views/core/base/equipment/components/EquipmentPics.vue @@ -9,8 +9,8 @@
-
- +
+
{{ desc[idx] }}
@@ -21,7 +21,12 @@ export default { name: 'EquipmentPics', components: {}, - props: {}, + props: { + inlineStyle: { + type: Object, + default: () => ({}), + }, + }, data() { return { desc: [ @@ -43,7 +48,6 @@ export default { .map((_, index) => require(`../assets/eq${index + 1}.jpg`)), }; }, - computed: {}, methods: {}, }; diff --git a/src/views/core/base/equipment/index.vue b/src/views/core/base/equipment/index.vue index 00bca940..b031cd65 100644 --- a/src/views/core/base/equipment/index.vue +++ b/src/views/core/base/equipment/index.vue @@ -36,7 +36,12 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - + @@ -186,7 +191,7 @@ export default { type: 'input', label: '编码', placeholder: '请输入设备编码', - param: 'codes', + param: 'code', }, { type: 'button', @@ -358,7 +363,6 @@ export default { // some async request return []; }, - style: 'overflow-x: auto;', }, ], ], @@ -431,16 +435,6 @@ export default { }; this.resetForm('form'); }, - /** 搜索按钮操作 */ - handleQuery() { - this.queryParams.pageNo = 1; - this.getList(); - }, - /** 重置按钮操作 */ - resetQuery() { - this.resetForm('queryForm'); - this.handleQuery(); - }, /** 新增按钮操作 */ handleAdd() { this.reset();