فهرست منبع

公装主管任务

zhujindu 7 ماه پیش
والد
کامیت
801be52fc1
3فایلهای تغییر یافته به همراه34 افزوده شده و 22 حذف شده
  1. 2 0
      src/components/zCheckbox2.vue
  2. 29 22
      src/components/zRadio2.vue
  3. 3 0
      src/views/week/componVisitSummary.vue

+ 2 - 0
src/components/zCheckbox2.vue

@@ -4,6 +4,7 @@
       <div class="checkbox">
         <van-checkbox-group v-model="zSelectValuec" @change="checkboxclick">
           <van-checkbox
+            :disabled="disabled"
             :name="item.customOptionId + ''"
             v-for="(item, index) in zCheckboxcolumns"
             :key="index"
@@ -26,6 +27,7 @@ export default {
     rules: false,
     answerType: '',
     collectionType: '',
+    disabled: false,
   },
   data() {
     return {

+ 29 - 22
src/components/zRadio2.vue

@@ -1,8 +1,14 @@
 <template>
   <div class="zSelect">
     <div class="checkbox">
-      <van-radio-group v-model="zradioc" @change="radiofn">
-        <van-radio :name="item.customOptionId+''" @click="radioclick" v-for="(item,index) in zRadiocolumns" :key="index">{{item.customOption}}</van-radio>
+      <van-radio-group v-model="zradioc" @change="radiofn" :disabled="disabled">
+        <van-radio
+          :name="item.customOptionId + ''"
+          @click="radioclick"
+          v-for="(item, index) in zRadiocolumns"
+          :key="index"
+          >{{ item.customOption }}</van-radio
+        >
       </van-radio-group>
     </div>
   </div>
@@ -10,51 +16,52 @@
 
 <script>
 export default {
-  name: "zSelect",
+  name: 'zSelect',
   props: {
-    radio: "",
-    textc: "",
+    radio: '',
+    textc: '',
     zRadiocolumns: [],
-    answerType: "",
-    collectionType: ""
+    answerType: '',
+    collectionType: '',
+    disabled: false,
   },
   data() {
     return {
       radioChange: false,
-      zradioc: this.radio
-    }
+      zradioc: this.radio,
+    };
   },
   methods: {
     radiofn(value) {
       this.radioChange = true;
-      var typeval =[...this.zRadiocolumns]
+      var typeval = [...this.zRadiocolumns];
       for (var k = 0; k < this.zRadiocolumns.length; k++) {
-        typeval[k].value="N"
+        typeval[k].value = 'N';
         if (this.zRadiocolumns[k].customOptionId == value) {
-          typeval[k].value="Y"
+          typeval[k].value = 'Y';
         }
       }
       let datalist = {
         id: this.textc,
-        value: typeval
-      }
+        value: typeval,
+      };
       this.$emit('zSelectVal', datalist);
     },
     radioclick() {
       if (!this.radioChange) {
-        this.zradioc = ""
+        this.zradioc = '';
       }
-      this.radioChange = false
+      this.radioChange = false;
     },
-  }
-}
+  },
+};
 </script>
 
 <style scoped>
 .van-f-red {
   color: red;
   width: 4px;
-  display: inline-block
+  display: inline-block;
 }
 
 .zSelect .z-cell {
@@ -63,14 +70,14 @@ export default {
 }
 
 .checkbox .van-radio {
-  padding-bottom: 10px
+  padding-bottom: 10px;
 }
 </style>
 <style>
 .checkbox .van-radio__icon {
   border: 1px solid #333;
   border-radius: 80px;
-  width: 1em
+  width: 1em;
 }
 
 .checkbox .van-radio__icon .van-icon {
@@ -93,4 +100,4 @@ export default {
 .checkbox .van-radio__icon--checked {
   border: 1px solid #1989fa;
 }
-</style>
+</style>

+ 3 - 0
src/views/week/componVisitSummary.vue

@@ -67,6 +67,7 @@
             </template>
           </van-cell>
           <van-field
+            :disabled="item.writeAgain == '0'"
             v-model="item.answerValue"
             :formatter="formatter"
             :placeholder="item.customName"></van-field>
@@ -95,6 +96,7 @@
             </template>
           </van-cell>
           <z-checkbox
+            :disabled="item.writeAgain == '0'"
             :answerType="item.answerType"
             :checkboxval="item.answerValue"
             :collectionType="item.customOptionList"
@@ -109,6 +111,7 @@
             </template>
           </van-cell>
           <z-radio
+            :disabled="item.writeAgain == '0'"
             :answerType="item.answerType"
             :collectionType="item.collectionType"
             :radio="item.answerValue"