From fc5aad9205be4bbecd13925167ed424b3e662129 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Thu, 18 Apr 2024 15:34:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=B1=E6=9D=86=E9=85=8D=E5=A5=97=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/api/store/poleConfig.js | 16 ++- .../src/views/store/poleConfig/poleConfig.vue | 132 ++++++++++++------ 2 files changed, 104 insertions(+), 44 deletions(-) diff --git a/sgzb-ui/src/api/store/poleConfig.js b/sgzb-ui/src/api/store/poleConfig.js index 02c81303..ab086075 100644 --- a/sgzb-ui/src/api/store/poleConfig.js +++ b/sgzb-ui/src/api/store/poleConfig.js @@ -1,11 +1,12 @@ import request from '@/utils/request' const maTypeUrl = '/base/type/getMaType' // 物品类型+配件 -const addUrl = '/material/maWhole/add' // 添加 +const addOrUpdateUrl = '/material/maWhole/addOrUpdate' // 添加 const selectListUrl = '/material/maWhole/selectList' // 查询首页 const selectListByIdUrl = '/material/maWhole/selectListById' // 查询详情 const deleteByIdUrl = '/material/maWhole/deleteById' // 删除 const treeTypeUrl = '/system/select/getDeviceTypeTree' // 设备树 +const selectListTreeUrl = '/material/maWhole/selectListTree' // 编辑查询 // 物品类型 选择配件 export function getMaType(query) { @@ -26,9 +27,9 @@ export function getDeviceTypeTree(params = {}){ } // 新增 -export function addMaWhole(data) { +export function addOrUpdateWhole(data) { return request({ - url: addUrl, + url: addOrUpdateUrl, method: 'post', data, }) @@ -60,3 +61,12 @@ export function deleteById(data) { data, }) } + +// 编辑 +export function editRequest(data) { + return request({ + url: selectListTreeUrl, + method: 'post', + data, + }) +} \ No newline at end of file diff --git a/sgzb-ui/src/views/store/poleConfig/poleConfig.vue b/sgzb-ui/src/views/store/poleConfig/poleConfig.vue index f07ed71f..a16e50d3 100644 --- a/sgzb-ui/src/views/store/poleConfig/poleConfig.vue +++ b/sgzb-ui/src/views/store/poleConfig/poleConfig.vue @@ -1,7 +1,7 @@