默认值

This commit is contained in:
shijingjing
2022-08-12 19:01:09 +08:00
parent a275e873fa
commit 040cef5028

View File

@@ -50,7 +50,7 @@
</template> </template>
</ai-list> </ai-list>
<!-- <ai-empty v-else>暂无应用权限</ai-empty> --> <!-- <ai-empty v-else>暂无应用权限</ai-empty> -->
<ai-dialog :title="dialogTitle" :visible.sync="dialog" @onConfirm="onConfirm" @closed="form={}" width="900px" > <ai-dialog :title="dialogTitle" :visible.sync="dialog" @onConfirm="onConfirm" @closed="closed" width="900px" >
<div class="form_div"> <div class="form_div">
<el-form ref="DialogForm" :model="form" :rules="formRules" size="small" label-suffix="" label-width="150px"> <el-form ref="DialogForm" :model="form" :rules="formRules" size="small" label-suffix="" label-width="150px">
@@ -174,7 +174,7 @@ export default {
tableData: [], tableData: [],
dialog: false, dialog: false,
form: { form: {
ruleType: 0, ruleType: '0',
systemRuleId: '', systemRuleId: '',
ruleName: '', ruleName: '',
scoringCycle: '', scoringCycle: '',
@@ -231,8 +231,19 @@ export default {
} }
}); });
}, },
closed() {
this.form = {
ruleType: '0',
systemRuleId: '',
ruleName: '',
scoringCycle: '',
numberLimit: '',
integral: '',
validRangeType: '0',
validRangeData: ''
}
},
toEdit(row) { toEdit(row) {
console.log(row);
this.form = this.$copy(row) this.form = this.$copy(row)
this.$nextTick(() => { this.$nextTick(() => {
this.dialog = true this.dialog = true
@@ -364,14 +375,11 @@ export default {
if (!this.$refs.tree.getCheckedNodes().length) { if (!this.$refs.tree.getCheckedNodes().length) {
return this.$message.error('请选择网格') return this.$message.error('请选择网格')
} }
this.$set(this.girdInfoList, this.currIndex, { this.$set(this.girdInfoList, this.currIndex, {
...this.$refs.tree.getCheckedNodes(), ...this.$refs.tree.getCheckedNodes(),
checkType: true checkType: true
}) })
console.log(this.$refs.tree.getCheckedNodes());
this.form.validRangeData = this.$refs.tree.getCheckedNodes().map(e=> e.id).toString() this.form.validRangeData = this.$refs.tree.getCheckedNodes().map(e=> e.id).toString()
console.log(this.form.validRangeData);
this.showGrid = false; this.showGrid = false;
}, },