Selaa lähdekoodia

新增扣分规则

coys 1 vuosi sitten
vanhempi
commit
c48cf9449f

+ 10 - 9
src/views/evaluationRule/addEvaluate.vue

@@ -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;

+ 1 - 1
src/views/evaluationRule/editEvaluationRuleDialog.vue

@@ -339,7 +339,7 @@ export default {
     },
 
     openSelect() {
-      this.$refs.dialogEvaluate.show();
+      this.$refs.dialogEvaluate.show(1);
     },
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {