fix : dashboardTemplate 增加验证
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user