|
|
@@ -2,9 +2,9 @@
|
|
|
<div>
|
|
|
<!-- :visible.sync="isShow" -->
|
|
|
<DialogCom
|
|
|
- :visible.sync="isShow"
|
|
|
+ :visible.sync="isShow"
|
|
|
:width="'500px'"
|
|
|
- :title="`${id ? '编辑' : '新增'}扣分规则`"
|
|
|
+ :title="`${!id ? '编辑' : '新增'}扣分规则`"
|
|
|
@close="closeHandler"
|
|
|
append-to-body
|
|
|
>
|
|
|
@@ -104,17 +104,18 @@ export default {
|
|
|
mounted() {},
|
|
|
|
|
|
methods: {
|
|
|
- show() {
|
|
|
+ show(val) {
|
|
|
+ console.log(this.id );
|
|
|
+ this.id = val;
|
|
|
+
|
|
|
this.isShow = true;
|
|
|
},
|
|
|
resetFormHandler() {
|
|
|
this.isShow = false;
|
|
|
},
|
|
|
closeHandler() {
|
|
|
- if(this.$refs.ruleForm){
|
|
|
-
|
|
|
-
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
+ if (this.$refs.ruleForm) {
|
|
|
+ this.$refs.ruleForm.resetFields();
|
|
|
}
|
|
|
this.ruleForm = {};
|
|
|
},
|
|
|
@@ -128,9 +129,9 @@ export default {
|
|
|
//当前是新增
|
|
|
this.ruleForm.uid = guid();
|
|
|
}
|
|
|
- let obj=JSON.parse(JSON.stringify(this.ruleForm))
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.ruleForm));
|
|
|
this.$emit("submitHandler", obj);
|
|
|
-
|
|
|
+
|
|
|
this.isShow = false;
|
|
|
} else {
|
|
|
return false;
|