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 @@