Переглянути джерело

feature_20250925_计划外筛选反选bug

zhujindu 2 місяців тому
батько
коміт
ab84bc35b5

+ 53 - 49
src/components/zCheckbox.vue

@@ -3,8 +3,12 @@
     <div>
       <div class="checkbox">
         <van-checkbox-group v-model="zSelectValuec" @change="checkboxclick">
-          <van-checkbox :name="item.collectionOptionId+''" v-for="(item,index) in zCheckboxcolumns" :key="index"
-                        shape="square">{{ item.collectionOption }}
+          <van-checkbox
+            :name="item.collectionOptionId + ''"
+            v-for="(item, index) in zCheckboxcolumns"
+            :key="index"
+            shape="square"
+            >{{ item.collectionOption }}
           </van-checkbox>
         </van-checkbox-group>
       </div>
@@ -14,46 +18,45 @@
 
 <script>
 export default {
-  name: "zSelect",
+  name: 'zSelect',
   props: {
     zCheckboxcolumns: [],
-    checkboxval: "",
-    textc: "",
+    checkboxval: '',
+    textc: '',
     rules: false,
-    answerType: "",
-    collectionType: "",
-    childindex:"",
-    childindex1:"",
-    childindex2:"",
-    childindex4:"",
-    childindex3:"",
-    level:""
+    answerType: '',
+    collectionType: '',
+    childindex: '',
+    childindex1: '',
+    childindex2: '',
+    childindex4: '',
+    childindex3: '',
+    level: '',
   },
   data() {
     return {
       zSelect: false,
-      zSelectValuec: ""
-    }
+      zSelectValuec: '',
+    };
   },
   created() {
-
-    this.checkboxvalFn()
+    this.checkboxvalFn();
   },
   methods: {
     checkboxvalFn() {
-      if (this.checkboxval == "" || this.checkboxval == undefined) {
-        this.zSelectValuec = []
+      if (this.checkboxval == '' || this.checkboxval == undefined) {
+        this.zSelectValuec = [];
       } else {
-        this.zSelectValuec = this.checkboxval.split(",")
+        this.zSelectValuec = this.checkboxval.split(',');
       }
     },
     checkboxclick(value) {
-      var typeval = []
-      var index=""
+      var typeval = [];
+      var index = '';
       for (let k = 0; k < this.zCheckboxcolumns.length; k++) {
         for (let kk = 0; kk < value.length; kk++) {
           if (this.zCheckboxcolumns[k].collectionOptionId == value[kk]) {
-            typeval.push(this.zCheckboxcolumns[k])
+            typeval.push(this.zCheckboxcolumns[k]);
           }
         }
       }
@@ -61,27 +64,27 @@ export default {
         type: this.textc,
         answerType: this.answerType,
         collectionType: this.collectionType,
-        childindex:this.childindex,
-        childindex1:this.childindex1,
-        childindex2:this.childindex2,
-        childindex3:this.childindex3,
-        childindex4:this.childindex4,
-        level:this.level,
-        value: typeval
-      }
-      this.zSelectValuec = value
-      this.$emit('zSelectVal', datalist)
-      this.zSelect = false
-    }
-  }
-}
+        childindex: this.childindex,
+        childindex1: this.childindex1,
+        childindex2: this.childindex2,
+        childindex3: this.childindex3,
+        childindex4: this.childindex4,
+        level: this.level,
+        value: typeval,
+      };
+      this.zSelectValuec = value;
+      this.$emit('zSelectVal', datalist);
+      this.zSelect = false;
+    },
+  },
+};
 </script>
 
 <style scoped>
 .van-f-red {
   color: red;
   width: 4px;
-  display: inline-block
+  display: inline-block;
 }
 
 .zSelect .z-cell {
@@ -91,18 +94,19 @@ export default {
 
 /*.checkbox{padding: 10px 16px 0 16px;background-color: white;}*/
 .checkbox .van-checkbox {
-  padding-bottom: 10px
+  padding-bottom: 10px;
 }
-
 </style>
-<style>
-.checkbox .van-checkbox__icon .van-icon {
-  border: 1px solid #333 !important;
-}
+<style lang="scss">
+.zSelect {
+  .checkbox .van-checkbox__icon .van-icon {
+    border: 1px solid #333 !important;
+  }
 
-.checkbox .van-checkbox__icon--checked .van-icon {
-  border: 1px solid #1989fa !important;
-  color: #1989fa;
-  background-color: #fff;
+  .checkbox .van-checkbox__icon--checked .van-icon {
+    border: 1px solid #1989fa !important;
+    color: #1989fa;
+    background-color: #fff;
+  }
 }
-</style>
+</style>

+ 40 - 36
src/components/zCheckbox1.vue

@@ -3,8 +3,12 @@
     <div>
       <div class="checkbox">
         <van-checkbox-group v-model="zSelectValuec" @change="checkboxclick">
-          <van-checkbox :name="item.customerClueOptionId+''" v-for="(item,index) in zCheckboxcolumns" :key="index"
-                        shape="square">{{ item.customerClueOption }}
+          <van-checkbox
+            :name="item.customerClueOptionId + ''"
+            v-for="(item, index) in zCheckboxcolumns"
+            :key="index"
+            shape="square"
+            >{{ item.customerClueOption }}
           </van-checkbox>
         </van-checkbox-group>
       </div>
@@ -14,59 +18,58 @@
 
 <script>
 export default {
-  name: "zSelect",
+  name: 'zSelect',
   props: {
     zCheckboxcolumns: [],
-    checkboxval: "",
-    textc: "",
+    checkboxval: '',
+    textc: '',
     rules: false,
-    answerType: "",
-    collectionType: ""
+    answerType: '',
+    collectionType: '',
   },
   data() {
     return {
       zSelect: false,
-      zSelectValuec: ""
-    }
+      zSelectValuec: '',
+    };
   },
   created() {
-
-    this.checkboxvalFn()
+    this.checkboxvalFn();
   },
   methods: {
     checkboxvalFn() {
-      if (this.checkboxval == "" || this.checkboxval == undefined) {
-        this.zSelectValuec = []
+      if (this.checkboxval == '' || this.checkboxval == undefined) {
+        this.zSelectValuec = [];
       } else {
-        this.zSelectValuec = this.checkboxval.split(",")
+        this.zSelectValuec = this.checkboxval.split(',');
       }
     },
     checkboxclick(value) {
-      var typeval = [...this.zCheckboxcolumns]
+      var typeval = [...this.zCheckboxcolumns];
       for (var k = 0; k < typeval.length; k++) {
         for (var kk = 0; kk < value.length; kk++) {
           if (typeval[k].customerClueOptionId == value[kk]) {
-            typeval[k].value="Y"
+            typeval[k].value = 'Y';
           }
         }
       }
       let datalist = {
         id: this.textc,
-        value: typeval
-      }
-      this.zSelectValuec = value
-      this.$emit('zSelectVal', datalist)
-      this.zSelect = false
-    }
-  }
-}
+        value: typeval,
+      };
+      this.zSelectValuec = value;
+      this.$emit('zSelectVal', datalist);
+      this.zSelect = false;
+    },
+  },
+};
 </script>
 
 <style scoped>
 .van-f-red {
   color: red;
   width: 4px;
-  display: inline-block
+  display: inline-block;
 }
 
 .zSelect .z-cell {
@@ -76,18 +79,19 @@ export default {
 
 /*.checkbox{padding: 10px 16px 0 16px;background-color: white;}*/
 .checkbox .van-checkbox {
-  padding-bottom: 10px
+  padding-bottom: 10px;
 }
-
 </style>
-<style>
-.checkbox .van-checkbox__icon .van-icon {
-  border: 1px solid #333 !important;
-}
+<style lang="scss">
+.zSelect {
+  .checkbox .van-checkbox__icon .van-icon {
+    border: 1px solid #333 !important;
+  }
 
-.checkbox .van-checkbox__icon--checked .van-icon {
-  border: 1px solid #1989fa !important;
-  color: #1989fa;
-  background-color: #fff;
+  .checkbox .van-checkbox__icon--checked .van-icon {
+    border: 1px solid #1989fa !important;
+    color: #1989fa;
+    background-color: #fff;
+  }
 }
-</style>
+</style>

+ 10 - 8
src/components/zCheckbox2.vue

@@ -103,14 +103,16 @@ export default {
   padding-bottom: 10px;
 }
 </style>
-<style>
-.checkbox .van-checkbox__icon .van-icon {
-  border: 1px solid #333 !important;
-}
+<style lang="scss">
+.zSelect {
+  .checkbox .van-checkbox__icon .van-icon {
+    border: 1px solid #333 !important;
+  }
 
-.checkbox .van-checkbox__icon--checked .van-icon {
-  border: 1px solid #1989fa !important;
-  color: #1989fa;
-  background-color: #fff;
+  .checkbox .van-checkbox__icon--checked .van-icon {
+    border: 1px solid #1989fa !important;
+    color: #1989fa;
+    background-color: #fff;
+  }
 }
 </style>

+ 34 - 29
src/components/zCheckboxD.vue

@@ -3,8 +3,12 @@
     <div>
       <div class="checkbox">
         <van-checkbox-group v-model="zSelectValuec" disabled>
-          <van-checkbox :name="item.collectionOptionId+''" v-for="(item,index) in zCheckboxcolumns" :key="index"
-                        shape="square">{{ item.collectionOption }}
+          <van-checkbox
+            :name="item.collectionOptionId + ''"
+            v-for="(item, index) in zCheckboxcolumns"
+            :key="index"
+            shape="square"
+            >{{ item.collectionOption }}
           </van-checkbox>
         </van-checkbox-group>
       </div>
@@ -14,42 +18,42 @@
 
 <script>
 export default {
-  name: "zSelect",
+  name: 'zSelect',
   props: {
     zCheckboxcolumns: [],
-    checkboxval: "",
-    textc: "",
+    checkboxval: '',
+    textc: '',
     rules: false,
-    answerType: "",
-    collectionType: "",
-    level:""
+    answerType: '',
+    collectionType: '',
+    level: '',
   },
   data() {
     return {
       zSelect: false,
-      zSelectValuec: ""
-    }
+      zSelectValuec: '',
+    };
   },
   created() {
-    this.checkboxvalFn()
+    this.checkboxvalFn();
   },
   methods: {
     checkboxvalFn() {
-      if (this.checkboxval == "" || this.checkboxval == undefined) {
-        this.zSelectValuec = []
+      if (this.checkboxval == '' || this.checkboxval == undefined) {
+        this.zSelectValuec = [];
       } else {
-        this.zSelectValuec = this.checkboxval.split(",")
+        this.zSelectValuec = this.checkboxval.split(',');
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style scoped>
 .van-f-red {
   color: red;
   width: 4px;
-  display: inline-block
+  display: inline-block;
 }
 
 .zSelect .z-cell {
@@ -59,18 +63,19 @@ export default {
 
 /*.checkbox{padding: 10px 16px 0 16px;background-color: white;}*/
 .checkbox .van-checkbox {
-  padding-bottom: 10px
+  padding-bottom: 10px;
 }
-
 </style>
-<style>
-.checkbox .van-checkbox__icon .van-icon {
-  border: 1px solid #333 !important;
-}
+<style lang="scss">
+.zSelect {
+  .checkbox .van-checkbox__icon .van-icon {
+    border: 1px solid #333 !important;
+  }
 
-.checkbox .van-checkbox__icon--checked .van-icon {
-  border: 1px solid #1989fa !important;
-  color: #1989fa;
-  background-color: #fff;
+  .checkbox .van-checkbox__icon--checked .van-icon {
+    border: 1px solid #1989fa !important;
+    color: #1989fa;
+    background-color: #fff;
+  }
 }
-</style>
+</style>