fix : dashboardTemplate 增加验证

This commit is contained in:
likexuan
2022-11-23 14:10:17 +08:00
parent e8ff90303c
commit 0e315c5895
2 changed files with 24 additions and 4 deletions

View File

@@ -61,7 +61,7 @@
></el-autocomplete>
</el-form-item>
<!-- DashboardTemplate -->
<el-form-item :label="$t('model.dashboardtemplate')" prop="DashboardTemplate">
<el-form-item :label="$t('model.dashboardtemplate')" prop="panelId" ref="dashboardTemplate">
<v-selectpage
:data="dashboardList"
:tb-columns="DashboardSearchShowFields"
@@ -71,7 +71,7 @@
:language="language"
title="DashboardSearch"
key-field="id"
:width="640"
:width="634"
v-model="editModule.panelId"
show-field="name"
class="form-control"
@@ -800,6 +800,9 @@ export default {
],
timeout: [
{ validator: nzNumber, trigger: 'blur' }
],
panelId: [
{ required: true, message: this.$t('validate.required'), trigger: ['blur', 'change'] }
]
},
projectList: [],
@@ -1684,6 +1687,13 @@ export default {
this.configsCopyValue = JSON.stringify(params, null, 2)
}
}
},
'editModule.panelId': {
handler (n) {
if (n) {
this.$refs.dashboardTemplate.$emit('el.form.change')
}
}
}
}
}