Просмотр исходного кода

事件列表增加【我处理的】筛选条件

seimin 1 год назад
Родитель
Сommit
7604f86d2a
2 измененных файлов с 64 добавлено и 20 удалено
  1. 22 0
      src/custom/seiminDrawer.vue
  2. 42 20
      src/views/IncidentNewList.vue

+ 22 - 0
src/custom/seiminDrawer.vue

@@ -37,6 +37,13 @@
37
               </div>
37
               </div>
38
             </li>
38
             </li>
39
           </ul>
39
           </ul>
40
+          <ul class="tags_selection_custom">
41
+            <li class="J_ping">
42
+              <cube-checkbox v-model="selectData.belongtoMe">
43
+                我处理的
44
+              </cube-checkbox>
45
+            </li>
46
+          </ul>
40
           <div id="filterClearBtn" class="J_ping s_btn" @click="clear">
47
           <div id="filterClearBtn" class="J_ping s_btn" @click="clear">
41
             清除选项
48
             清除选项
42
           </div>
49
           </div>
@@ -80,6 +87,7 @@ export default {
80
         area: {id: 0, area: '全部'},
87
         area: {id: 0, area: '全部'},
81
         category: {id: 0, category: '全部'},
88
         category: {id: 0, category: '全部'},
82
         selected: 'todo',
89
         selected: 'todo',
90
+        belongtoMe: false,
83
       },
91
       },
84
       flag: false,
92
       flag: false,
85
       isSelectArea: false,
93
       isSelectArea: false,
@@ -95,6 +103,7 @@ export default {
95
       this.selectData.area = {id: 0, area: '全部'};
103
       this.selectData.area = {id: 0, area: '全部'};
96
       this.selectData.category = {id: 0, category: '全部'};
104
       this.selectData.category = {id: 0, category: '全部'};
97
       this.selectData.selected = 'todo';
105
       this.selectData.selected = 'todo';
106
+      this.selectData.belongtoMe = false;
98
     },
107
     },
99
     // 确定
108
     // 确定
100
     confirm(){
109
     confirm(){
@@ -757,6 +766,19 @@ export default {
757
     display: none;
766
     display: none;
758
   }
767
   }
759
 
768
 
769
+  .tags_selection_custom {
770
+    margin: 15px 0;
771
+    font-size: 14px;
772
+    text-align: center;
773
+    background-color: #fff
774
+  }
775
+  .tags_selection_custom .cube-checkbox{
776
+    padding: 0 10px;
777
+  }
778
+  .tags_selection_custom /deep/ .cube-checkbox_checked .cube-checkbox-ui i{
779
+    color: #005395;
780
+  }
781
+
760
   .tags_selection {
782
   .tags_selection {
761
     margin: 15px 0;
783
     margin: 15px 0;
762
     padding: 10px 0 0 10px;
784
     padding: 10px 0 0 10px;

+ 42 - 20
src/views/IncidentNewList.vue

@@ -8,12 +8,6 @@
8
           </div>
8
           </div>
9
           <div class="header_right"><div class="filter" @click="showDrawer()"><img src="../assets/icon/filter.png" alt=""></div></div>
9
           <div class="header_right"><div class="filter" @click="showDrawer()"><img src="../assets/icon/filter.png" alt=""></div></div>
10
         </div>
10
         </div>
11
-        <!-- <div class="stateSearchWrap">
12
-          <div class="stateSearch" @click="typeChange(tab)" v-for="tab in tabTypes" :key="tab.id" :class="{active: tabTypeIdActive == tab.id}">
13
-            {{ tab.text }}({{ tab.num }})
14
-            <div class="filter" v-if="tab.id == 2" @click.stop="showDrawer()" :class="{active: tabTypeIdActive == tab.id}"><i class="dash dash-shaixuan"></i></div>
15
-          </div>
16
-        </div> -->
17
         <div class="scroll-list-wrap">
11
         <div class="scroll-list-wrap">
18
           <cube-scroll
12
           <cube-scroll
19
             ref="scroll"
13
             ref="scroll"
@@ -241,15 +235,20 @@ export default {
241
       wxIncidentId: '',
235
       wxIncidentId: '',
242
       evt: null,
236
       evt: null,
243
       isShowDrawer: false,
237
       isShowDrawer: false,
244
-      tabTypeIdActive: 2,
238
+      tabTypeIdActive: 3,
245
       tabTypes: [
239
       tabTypes: [
246
         {
240
         {
247
           id: 1,
241
           id: 1,
248
-          text: "待接单",
242
+          text: "全部",
249
           num: 0
243
           num: 0
250
         },
244
         },
251
         {
245
         {
252
           id: 2,
246
           id: 2,
247
+          text: "待接单",
248
+          num: 0
249
+        },
250
+        {
251
+          id: 3,
253
           text: "处理中",
252
           text: "处理中",
254
           num: 0
253
           num: 0
255
         }
254
         }
@@ -839,14 +838,16 @@ export default {
839
         }
838
         }
840
       }
839
       }
841
       if(this.$route.params.status){
840
       if(this.$route.params.status){
842
-        this.searchState = this.$route.params.status ? Number(this.$route.params.status) : 0;
841
+        this.searchState = this.$route.params.status ? Number(this.$route.params.status) : undefined;
843
       }
842
       }
844
     },
843
     },
845
     typeChange(tab) {
844
     typeChange(tab) {
846
       this.tabTypeIdActive = tab.id;
845
       this.tabTypeIdActive = tab.id;
847
       if(tab.id == 1){
846
       if(tab.id == 1){
848
-        this.searchState = 1543;
847
+        this.searchState = undefined;
849
       }else if(tab.id == 2){
848
       }else if(tab.id == 2){
849
+        this.searchState = 1543;
850
+      }else if(tab.id == 3){
850
         this.searchState = 1544;
851
         this.searchState = 1544;
851
       }
852
       }
852
       this.loadShow = true;
853
       this.loadShow = true;
@@ -897,6 +898,7 @@ export default {
897
         searchType: this.searchType,
898
         searchType: this.searchType,
898
         idx: 0,
899
         idx: 0,
899
         sum: 1,
900
         sum: 1,
901
+        belongtoMe: this.evt ? this.evt.belongtoMe : false,
900
         incident: { temporary: true,statusId }
902
         incident: { temporary: true,statusId }
901
       };
903
       };
902
       if(this.evt && this.evt.category.id){
904
       if(this.evt && this.evt.category.id){
@@ -925,20 +927,24 @@ export default {
925
         this.$http
927
         this.$http
926
         .post("service/user/data/fetchDataList/incident", postData)
928
         .post("service/user/data/fetchDataList/incident", postData)
927
         .then((res) => {
929
         .then((res) => {
928
-          if(statusId == 1543){
930
+          if(statusId === undefined){
929
             this.tabTypes[0].num = res.data.totalNum;
931
             this.tabTypes[0].num = res.data.totalNum;
930
-          }else if(statusId == 1544){
932
+          }else if(statusId == 1543){
931
             this.tabTypes[1].num = res.data.totalNum;
933
             this.tabTypes[1].num = res.data.totalNum;
934
+          }else if(statusId == 1544){
935
+            this.tabTypes[2].num = res.data.totalNum;
932
           }
936
           }
933
         });
937
         });
934
       }else{
938
       }else{
935
         this.$http
939
         this.$http
936
         .post("service/bpm/bpm/fetchTask/bpm_incident", postData)
940
         .post("service/bpm/bpm/fetchTask/bpm_incident", postData)
937
         .then((res) => {
941
         .then((res) => {
938
-          if(statusId == 1543){
942
+          if(statusId === undefined){
939
             this.tabTypes[0].num = res.data.resultCount;
943
             this.tabTypes[0].num = res.data.resultCount;
940
-          }else if(statusId == 1544){
944
+          }if(statusId == 1543){
941
             this.tabTypes[1].num = res.data.resultCount;
945
             this.tabTypes[1].num = res.data.resultCount;
946
+          }else if(statusId == 1544){
947
+            this.tabTypes[2].num = res.data.resultCount;
942
           }
948
           }
943
         });
949
         });
944
       }
950
       }
@@ -951,9 +957,10 @@ export default {
951
         searchType: this.searchType,
957
         searchType: this.searchType,
952
         idx: this.idx,
958
         idx: this.idx,
953
         sum: this.sum,
959
         sum: this.sum,
960
+        belongtoMe: this.evt ? this.evt.belongtoMe : false,
954
         incident: {
961
         incident: {
955
           temporary: true,
962
           temporary: true,
956
-          statusId:this.searchState?this.searchState:undefined,
963
+          statusId:this.searchState || undefined,
957
         }
964
         }
958
       };
965
       };
959
       if(this.evt && this.evt.category.id){
966
       if(this.evt && this.evt.category.id){
@@ -1006,11 +1013,17 @@ export default {
1006
           } else {
1013
           } else {
1007
             this.$refs.scroll.forceUpdate();
1014
             this.$refs.scroll.forceUpdate();
1008
           }
1015
           }
1009
-          if(this.searchState == 1543){
1016
+          if(this.searchState === undefined){
1010
             this.tabTypes[0].num = res.data.totalNum;
1017
             this.tabTypes[0].num = res.data.totalNum;
1018
+            this.getNum(1543);
1011
             this.getNum(1544);
1019
             this.getNum(1544);
1012
-          }else if(this.searchState == 1544){
1020
+          }else if(this.searchState == 1543){
1013
             this.tabTypes[1].num = res.data.totalNum;
1021
             this.tabTypes[1].num = res.data.totalNum;
1022
+            this.getNum();
1023
+            this.getNum(1544);
1024
+          }else if(this.searchState == 1544){
1025
+            this.tabTypes[2].num = res.data.totalNum;
1026
+            this.getNum();
1014
             this.getNum(1543);
1027
             this.getNum(1543);
1015
           }
1028
           }
1016
           this.loadShow = false;
1029
           this.loadShow = false;
@@ -1044,11 +1057,17 @@ export default {
1044
           } else {
1057
           } else {
1045
             this.$refs.scroll.forceUpdate();
1058
             this.$refs.scroll.forceUpdate();
1046
           }
1059
           }
1047
-          if(this.searchState == 1543){
1060
+          if(this.searchState === undefined){
1048
             this.tabTypes[0].num = res.data.resultCount;
1061
             this.tabTypes[0].num = res.data.resultCount;
1062
+            this.getNum(1543);
1049
             this.getNum(1544);
1063
             this.getNum(1544);
1050
-          }else if(this.searchState == 1544){
1064
+          }else if(this.searchState == 1543){
1051
             this.tabTypes[1].num = res.data.resultCount;
1065
             this.tabTypes[1].num = res.data.resultCount;
1066
+            this.getNum();
1067
+            this.getNum(1544);
1068
+          }else if(this.searchState == 1544){
1069
+            this.tabTypes[2].num = res.data.resultCount;
1070
+            this.getNum();
1052
             this.getNum(1543);
1071
             this.getNum(1543);
1053
           }
1072
           }
1054
           this.loadShow = false;
1073
           this.loadShow = false;
@@ -1262,9 +1281,12 @@ export default {
1262
   justify-content: center;
1281
   justify-content: center;
1263
   align-items: center;
1282
   align-items: center;
1264
 }
1283
 }
1265
-.header .header_left .tab:first-of-type{
1284
+.header .header_left .tab{
1266
   border-right: 1px solid #515151;
1285
   border-right: 1px solid #515151;
1267
 }
1286
 }
1287
+.header .header_left .tab:last-of-type{
1288
+  border-right: none;
1289
+}
1268
 .header .header_left .tab.active{
1290
 .header .header_left .tab.active{
1269
   font-weight: bold;
1291
   font-weight: bold;
1270
   position: relative;
1292
   position: relative;