|
@@ -45,7 +45,7 @@
|
|
|
<!-- 精度 -->
|
|
|
<el-form-item :label="$t('message.device.formI18nLabel.precision')" prop="decimals" v-if="type == 'float' || type == 'double'">
|
|
|
<!-- 请输入精度 -->
|
|
|
- <el-input v-model="valueType.decimals" :placeholder="$t('message.device.formI18nPlaceholder.precision')" />
|
|
|
+ <el-input v-model="valueType.decimals" :placeholder="$t('message.device.formI18nPlaceholder.inputPrecision')" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 单位 -->
|
|
@@ -410,13 +410,13 @@ const resetForm = () => {
|
|
|
transportProtocol: '',
|
|
|
accessMode: 1,
|
|
|
status: 1,
|
|
|
- valueType: JSON.parse(JSON.stringify(valueType)),
|
|
|
+ valueType: JSON.parse(JSON.stringify(valueType.value)),
|
|
|
desc: '',
|
|
|
}
|
|
|
type.value = ''
|
|
|
types.value = ''
|
|
|
- valueType.value = JSON.parse(JSON.stringify(valueType))
|
|
|
- elementType.value = JSON.parse(JSON.stringify(valueType))
|
|
|
+ valueType.value = JSON.parse(JSON.stringify(valueType.value))
|
|
|
+ elementType.value = JSON.parse(JSON.stringify(valueType.value))
|
|
|
jsondata.value = []
|
|
|
enumdata.value = [
|
|
|
{
|
|
@@ -533,9 +533,10 @@ const onSubmit = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- ruleForm.value.valueType = valueType.value
|
|
|
- api.model.propertyadd(ruleForm.value).then(() => {
|
|
|
+ Object.assign(ruleForm.value.valueType, valueType.value)
|
|
|
+ // 深拷贝确保响应式对象正确序列化
|
|
|
+ const submitData = JSON.parse(JSON.stringify(ruleForm.value))
|
|
|
+ api.model.propertyadd(submitData).then(() => {
|
|
|
ElMessage.success(t('message.tableI18nConfirm.addSuccess'))
|
|
|
closeDialog() // 关闭弹窗
|
|
|
emit('typeList')
|