From 2f09fa2e05278bc6106f39b7efb9a53c73a5f309 Mon Sep 17 00:00:00 2001 From: z_yu <1534695664@qq.com> Date: Mon, 18 Jul 2022 16:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/storeManage/deviceManage/param.js | 14 +- src/views/storeManage/deviceManage/index.vue | 11 +- .../deviceManage/module/bindParams.vue | 133 ++++++------------ .../deviceManage/module/deviceDetail.vue | 62 +++++--- 4 files changed, 101 insertions(+), 119 deletions(-) diff --git a/src/api/storeManage/deviceManage/param.js b/src/api/storeManage/deviceManage/param.js index 3de1354..52de8a1 100644 --- a/src/api/storeManage/deviceManage/param.js +++ b/src/api/storeManage/deviceManage/param.js @@ -8,23 +8,23 @@ export function getParams(params) { }) } -export function del(ids) { +export function del(id) { const params = { - id: ids[0] + id: id } return request({ - url: 'api/storeroom/delete', + url: 'api/spec/delete', method: 'delete', params }) } -export function edit(data) { +export function add(data) { return request({ - url: 'api/storeroom/update', - method: 'put', + url: 'api/spec/bind', + method: 'post', data }) } -export default { getParams, edit, del } +export default { getParams, add, del } diff --git a/src/views/storeManage/deviceManage/index.vue b/src/views/storeManage/deviceManage/index.vue index 78ef012..859155f 100644 --- a/src/views/storeManage/deviceManage/index.vue +++ b/src/views/storeManage/deviceManage/index.vue @@ -48,7 +48,7 @@
- +
@@ -123,9 +123,14 @@ export default { handleNodeClick(val) { if (val) { this.crud.selectionChangeHandler([val]) - this.$refs.deviceDetail.storeroomId = val + if (val.id === this.crud.data[0].id) { + this.activeRightBtn = false + this.$refs.deviceDetail.storeroomId = {} + } else { + this.activeRightBtn = true + this.$refs.deviceDetail.storeroomId = val + } this.$refs.deviceDetail.crud.toQuery() - this.activeRightBtn = true } }, // 编辑前将区域临时清空,避免日志入库数据过长 diff --git a/src/views/storeManage/deviceManage/module/bindParams.vue b/src/views/storeManage/deviceManage/module/bindParams.vue index e811395..2dee754 100644 --- a/src/views/storeManage/deviceManage/module/bindParams.vue +++ b/src/views/storeManage/deviceManage/module/bindParams.vue @@ -1,7 +1,7 @@