Browse Source

添加模板编号生成

develop
ljlong_2630 10 months ago
parent
commit
9d4d31d7b2
  1. 8
      src/api/model/codeDefine.js
  2. 9
      src/views/model/devicemodel/editModel.vue

8
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',
})
}

9
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();

Loading…
Cancel
Save