Преглед изворни кода

预案演练 正常案例改为普通按钮,推优管理新增 不推荐选项

zhulu пре 1 година
родитељ
комит
29aa7c971b

+ 49 - 14
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -400,6 +400,11 @@ export default {
         if (this.orgType == 1) {
           //省联社
           this.resultList = [
+          {
+              name: '不推荐',
+              value: 8,
+              disabled: false
+            },
             {
               name: '设置为省级优秀案例',
               value: 5,
@@ -413,6 +418,11 @@ export default {
         } else if (this.orgType == 2) {
           //办事处
           this.resultList = [
+          {
+              name: '不推荐',
+              value: 7,
+              disabled: false
+            },
             {
               name: '设置为地区优秀案例',
               value: 3,
@@ -435,6 +445,11 @@ export default {
           //行社
           this.resultList = [
             {
+              name: '不推荐',
+              value: 6,
+              disabled: false
+            },
+            {
               name: '设置为行社优秀案例',
               value: 1,
 
@@ -470,22 +485,32 @@ export default {
       }
     },
     clickChekcBox(v) {
-      console.log(v)
-      console.log(this.resultList[0])
+      // console.log(v)
+      // console.log(this.resultList[0])
+      console.log("clickChekcBox",v,this.resultList)
+      // console.log("clickChekcBoxx",v[0] < this.resultList[0].value,v[0],,v[0]==this.resultList[1])
+      
       if (v[0] == this.resultList[0].value) {
         if (this.resultList[1]) {
-          this.resultList[1].disabled = this.disabledCheck('false')
+          this.resultList[1].disabled = this.disabledCheck('true')
         }
-        // if(v.length>1){
-        //   this.result=[]
-        // }
-        // this.resultList[1].checked = this.disabledCheck('false')
-      } else if (v[0] > this.resultList[0].value) {
-        this.result = []
-      } else {
-        this.resultList[1].disabled = this.disabledCheck('true')
-
-        // this.result=[]
+        if (this.resultList[2]) {
+          this.resultList[2].disabled = this.disabledCheck('true')
+        }
+        console.log("clickChekcBox1",v,this.resultList)
+      } else if (v[0] < this.resultList[0].value && v[0]==this.resultList[1].value) {
+            this.resultList[0].disabled = this.disabledCheck('true')
+            this.resultList[2].disabled = this.disabledCheck('false')
+            console.log("clickChekcBox2",v,this.resultList)
+      }
+      else if (v[0] < this.resultList[0].value && v[0]>this.resultList[1].value) {
+          this.result=[];
+      }
+      else {       
+          this.resultList[0].disabled = this.disabledCheck('false')
+          this.resultList[1].disabled = this.disabledCheck('false')
+          this.resultList[2].disabled = this.disabledCheck('true')
+          console.log("clickChekcBox3",v,this.resultList)
       }
     },
     signatureHandler() {
@@ -529,7 +554,11 @@ export default {
           })
       } else {
         //评价推优
-
+        if(!this.result || this.result.length==0)
+        {
+          this.$toast.fail('请至少选择一项评优推优选项');
+          return;
+        }
         submitRecTask({
           drillTaskId: this.trainingData.id,
           recStatus: Math.max(...this.result)
@@ -645,6 +674,12 @@ export default {
   .van-col {
     text-align: justify;
     white-space: pre-wrap;
+    .van-checkbox-group--horizontal{
+      .van-checkbox--horizontal{
+        margin-top:3.2vw;
+}
+    }
+   
   }
   .zl {
     display: block !important;

+ 1 - 1
src/views/menu/rehearsalTask/optimal.vue

@@ -198,7 +198,7 @@ export default {
           this.statusValue='2'
           break
         case '3':
-          this.fieldValue = '正常案例'
+          this.fieldValue = '普通案例'
           this.statusValue='0'
           break
         case '1':