完善物模型新增和修改
This commit is contained in:
parent
68ff5db53f
commit
cd6d45bed1
@ -230,7 +230,6 @@ async function submit() {
|
||||
if (!valid) return;
|
||||
|
||||
const formValues = await formApi.getValues();
|
||||
|
||||
const fetchParams: any = {
|
||||
...formValues,
|
||||
// 自动添加平台和产品信息
|
||||
|
||||
@ -160,6 +160,7 @@ export const addThingModelFormSchema = computed(() => [
|
||||
typeCode: formValues?.filedType ?? null,
|
||||
onResolve: (item: any | null) => {
|
||||
// 选择后自动回填:名称=displayText,值类型=extendedAttribute(转大写)
|
||||
formValues.standardFieldDisplayName = item?.displayText ?? '';
|
||||
formValues.standardFieldName = item?.code ?? '';
|
||||
formValues.standardFieldValueType = (item?.extendedAttribute ?? '')
|
||||
.toString()
|
||||
@ -298,7 +299,7 @@ export const editThingModelFormSchema = computed(() => [
|
||||
typeCode: formValues?.filedType ?? null,
|
||||
disabled: true, // 编辑时禁用
|
||||
onResolve: (item: any | null) => {
|
||||
formValues.standardFieldDisplayName = item?.code ?? '';
|
||||
formValues.standardFieldDisplayName = item?.displayText ?? '';
|
||||
formValues.standardFieldValueType = (item?.extendedAttribute ?? '')
|
||||
.toString()
|
||||
.toUpperCase();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user