完善物模型新增和修改

This commit is contained in:
ChenYi 2025-10-28 13:59:55 +08:00
parent 68ff5db53f
commit cd6d45bed1
2 changed files with 5 additions and 5 deletions

View File

@ -230,7 +230,6 @@ async function submit() {
if (!valid) return;
const formValues = await formApi.getValues();
const fetchParams: any = {
...formValues,
//

View File

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