瀏覽代碼

评价内容非必填,文字修改,评分默认5星

seimin 3 年之前
父節點
當前提交
44d576b03a
共有 2 個文件被更改,包括 20 次插入18 次删除
  1. 16 14
      src/views/evaluate.vue
  2. 4 4
      src/views/repair.vue

+ 16 - 14
src/views/evaluate.vue

@@ -59,9 +59,9 @@ export default {
59 59
         return{
60 60
             data:"",
61 61
             imgs:[],
62
-            rate:0,
63
-            rateText:"",
64
-            rateData:1603,
62
+            rate:5,
63
+            rateText:"暂无内容",
64
+            rateData:0,
65 65
             promptingConent:"",
66 66
             promptingStatus:"",
67 67
             degreeDictionary:[]
@@ -69,25 +69,27 @@ export default {
69 69
     },
70 70
     methods:{
71 71
         evaluate(){
72
-            if(this.rateData==1603){
72
+            if(!this.rate){
73 73
                 this.$createDialog({
74 74
                     type: 'alert',
75 75
                     title: '评分未选',
76 76
                     content: '请选择评分',
77 77
                     icon: 'cubeic-wrong'
78 78
                 }).show()
79
-            }else if(this.rateText==""){
80
-                this.$createDialog({
81
-                    type: 'alert',
82
-                    title: '评价未填',
83
-                    content: '请作出您的评价',
84
-                    icon: 'cubeic-wrong'
85
-                }).show()
86
-            }else{
79
+            }
80
+            // else if(this.rateText==""){
81
+            //     this.$createDialog({
82
+            //         type: 'alert',
83
+            //         title: '评价未填',
84
+            //         content: '请作出您的评价',
85
+            //         icon: 'cubeic-wrong'
86
+            //     }).show()
87
+            // }
88
+            else{
87 89
                 var that=this;
88 90
                 this.$http.post('service/apply/bpm/degree',{
89 91
                     "id":that.data.id,
90
-                    "degree":this.rateData,
92
+                    "degree":this.rateData===0?this.degreeDictionary[0].id:this.rateData,
91 93
                     "degreeRemark":this.rateText
92 94
                 }).then(function(res){
93 95
                     if(res.status==200){
@@ -191,7 +193,7 @@ export default {
191 193
             handler:function(val){
192 194
                 console.log(this.degreeDictionary);
193 195
                 if(val==0){
194
-                    this.rateData=this.degreeDictionary[4].id
196
+                    this.rateData=this.degreeDictionary[0].id
195 197
                 }else if(val==1){
196 198
                     this.rateData=this.degreeDictionary[4].id
197 199
                 }else if(val==2){

+ 4 - 4
src/views/repair.vue

@@ -302,9 +302,9 @@ export default {
302 302
         {
303 303
           type: "select",
304 304
           modelKey: "categoryId",
305
-          label: "故障类别:",
305
+          label: "报修类别:",
306 306
           props: {
307
-            placeholder: "请选择故障类别",
307
+            placeholder: "请选择报修类别",
308 308
             options: []
309 309
           },
310 310
           rules: {
@@ -569,7 +569,7 @@ export default {
569 569
         item.rules.required = this.repairMain.valueconfig == 1;
570 570
       }
571 571
     });
572
-    // 获取故障类别
572
+    // 获取报修类别
573 573
     this.$http
574 574
       .post("service/bpm/data/fetchDataList/incidentcategory", {
575 575
         idx: 0,
@@ -583,7 +583,7 @@ export default {
583 583
             arr.push({ value: item.id, text: item.category });
584 584
           });
585 585
           this.fields.forEach(item => {
586
-            // 初始化故障类别下拉框列表
586
+            // 初始化报修类别下拉框列表
587 587
             if (item.modelKey == "categoryId") {
588 588
               item.props.options = arr;
589 589
             }