diff --git a/src/api/model/codeDefine.js b/src/api/model/codeDefine.js index f9f304f..5a3370c 100644 --- a/src/api/model/codeDefine.js +++ b/src/api/model/codeDefine.js @@ -42,3 +42,11 @@ export function delCodeDefine(id) { method: 'delete' }) } + +//获取ID +export function getCode(busi_code){ + return request({ + url: '/model/codeDefine/coder/' + busi_code, + method: 'get', + }) +} diff --git a/src/views/model/devicemodel/editModel.vue b/src/views/model/devicemodel/editModel.vue index 5abf849..66e1757 100644 --- a/src/views/model/devicemodel/editModel.vue +++ b/src/views/model/devicemodel/editModel.vue @@ -147,6 +147,7 @@ import { delModelparam, listModelparamNoPage, addBatch, editBatch, } from "@/api import Table from "@/components/TableColumnTreeSelect/index.vue"; import { ElMessageBox } from 'element-plus'; import { onMounted, ref } from 'vue'; +import { getCode } from '@/api/model/codeDefine'; const { proxy } = getCurrentInstance(); const { dc_class_type, dc_device_partion } = proxy.useDict('dc_class_type', 'dc_device_partion'); const router = useRouter(); @@ -593,7 +594,7 @@ function partionChange(val) { item.partion = val; item.id = "ABCDEFXYZ" + form.value.modelCode + item.paramClassCode; }); - debugger + } @@ -739,8 +740,14 @@ function addRowsCallBack(records, callback) { callback([...newSelectedList.value]) } +function getModelCode() { + getCode("device_model_code").then(response => { + form.value.modelCode = response.msg; + }); +} +getModelCode(); getTreeselect(); getModelTypeListNoPage(); getModelParamList();