瀏覽代碼

消息通知

seimin 11 月之前
父節點
當前提交
28e07d3e9b

+ 32 - 31
assets/js/controllers/system/notificationCtrl.js

@@ -9,18 +9,18 @@ app.controller('notificationCtr', ["$rootScope", "$scope", "$state", "$timeout",
9 9
     $scope.tableName = "消息通知设置";
10 10
     //侧边栏名称
11 11
     $scope.listData = [
12
-        { "name": "报修流程" },
12
+        // { "name": "报修流程" },
13 13
         { "name": "事件流程" }
14 14
         // { "name": "上下班管理" }
15 15
     ];
16 16
     //转换通知规则
17
-    $scope.computedRule = function (data, id) {
18
-        if (data === undefined) {
17
+    $scope.computedRule = function (noticeRule, noticeCode) {
18
+        if (noticeRule === undefined) {
19 19
             return '进入本步骤时';
20
-        } else if (id == 13 || id == 14 || id == 12) {
21
-            return '【逾期响应时间】' + data + '分钟';
22
-        } else if (id == 18 || id == 19) {
23
-            return '【解决时间】剩余 ' + data + '%';
20
+        } else if (noticeCode == 'user_receive_overresp' || noticeCode == 'manager_receive_overresp') {
21
+            return '【逾期响应时间】' + noticeRule + '分钟';
22
+        } else if (noticeCode == 'user_doing_overresp' || noticeCode == 'manager_doing_overresp') {
23
+            return '【解决时间】剩余 ' + noticeRule + '%';
24 24
         }
25 25
     };
26 26
     /**
@@ -56,38 +56,39 @@ app.controller('notificationCtr', ["$rootScope", "$scope", "$state", "$timeout",
56 56
             }
57 57
         })
58 58
     }
59
-    $scope.getBxList();
59
+    // $scope.getBxList();
60 60
     //请求获取事件流程列表
61 61
     //process: '通知流程',processNode:'流程节点',processStatus:'状态',notifiedPerson:'被通知人'
62 62
     $scope.sjList = [
63
-        { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '运维工程师', noticeCode:'user_receive' },
64
-        { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '运维工程师', noticeCode:'user_receive_overresp' },
65
-        { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '分类管理员', noticeCode:'cm_receive_overresp' },
66
-        { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '事件经理', noticeCode:'manager_receive_overresp' },
67
-        { processName: '事件流程', processNode: '重新指派', processStatus: '重新指派', notifiedPerson: '服务台人员', noticeCode:'service_reassign' },
68
-        { processName: '事件流程', processNode: '重新指派', processStatus: '重新指派', notifiedPerson: '运维工程师', noticeCode:'user_reassign' },
69
-        { processName: '事件流程', processNode: '处理', processStatus: '处理中', notifiedPerson: '报修人', noticeCode:'req_doing' },
70
-        { processName: '事件流程', processNode: '处理', processStatus: '处理中', notifiedPerson: '运维工程师', noticeCode:'user_doing' },
71
-        { processName: '事件流程', processNode: '处理', processStatus: '处理中', notifiedPerson: '分类管理员', noticeCode:'cm_doing' },
72
-        { processName: '事件流程', processNode: '处理', processStatus: '指派', notifiedPerson: '运维工程师', noticeCode:'user_doing_assign' },
73
-        { processName: '事件流程', processNode: '处理', processStatus: '转派', notifiedPerson: '运维工程师', noticeCode:'user_doing_redeploy' },
74
-        { processName: '事件流程', processNode: '处理', processStatus: '升级', notifiedPerson: '运维工程师', noticeCode:'user_doing_upgrade' },
75
-        { processName: '事件流程', processNode: '评价', processStatus: '已解决', notifiedPerson: '报修人', noticeCode:'req_resolve' },
76
-        { processName: '事件流程', processNode: '关单', processStatus: '已解决', notifiedPerson: '服务台人员', noticeCode:'service_resolve' },
77
-        { processName: '事件流程', processNode: '完成', processStatus: '已关闭', notifiedPerson: '报修人', noticeCode:'req_close' }
63
+        // { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '运维工程师', noticeCode:'user_receive' },
64
+        // { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '运维工程师', noticeCode:'user_receive_overresp' },
65
+        // { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '分类管理员', noticeCode:'cm_receive_overresp' },
66
+        // { processName: '事件流程', processNode: '接单', processStatus: '待接单', notifiedPerson: '事件经理', noticeCode:'manager_receive_overresp' },
67
+        // { processName: '事件流程', processNode: '重新指派', processStatus: '重新指派', notifiedPerson: '服务台人员', noticeCode:'service_reassign' },
68
+        // { processName: '事件流程', processNode: '重新指派', processStatus: '重新指派', notifiedPerson: '运维工程师', noticeCode:'user_reassign' },
69
+        // { processName: '事件流程', processNode: '处理', processStatus: '处理中', notifiedPerson: '报修人', noticeCode:'req_doing' },
70
+        // { processName: '事件流程', processNode: '处理', processStatus: '处理中', notifiedPerson: '运维工程师', noticeCode:'user_doing' },
71
+        // { processName: '事件流程', processNode: '处理', processStatus: '处理中', notifiedPerson: '分类管理员', noticeCode:'cm_doing' },
72
+        // { processName: '事件流程', processNode: '处理', processStatus: '指派', notifiedPerson: '运维工程师', noticeCode:'user_doing_assign' },
73
+        // { processName: '事件流程', processNode: '处理', processStatus: '转派', notifiedPerson: '运维工程师', noticeCode:'user_doing_redeploy' },
74
+        // { processName: '事件流程', processNode: '处理', processStatus: '升级', notifiedPerson: '运维工程师', noticeCode:'user_doing_upgrade' },
75
+        // { processName: '事件流程', processNode: '评价', processStatus: '已解决', notifiedPerson: '报修人', noticeCode:'req_resolve' },
76
+        // { processName: '事件流程', processNode: '关单', processStatus: '已解决', notifiedPerson: '服务台人员', noticeCode:'service_resolve' },
77
+        // { processName: '事件流程', processNode: '完成', processStatus: '已关闭', notifiedPerson: '报修人', noticeCode:'req_close' }
78 78
     ];
79 79
     $scope.getSjList = function () {
80 80
         api_notification_data.fetchDataList({
81 81
             "idx": 0,
82 82
             "sum": 20,
83 83
             "messageManager": {
84
-                "noticeProcess": 2
84
+                "noticeProcess": 1
85 85
             }
86 86
         }).then(function (res) {
87 87
             if (res.status == 200) {
88
-                angular.forEach($scope.sjList, function (v, i) {
89
-                    angular.extend(v, res.list[i]);//合并对象
90
-                })
88
+                // angular.forEach($scope.sjList, function (v, i) {
89
+                //     angular.extend(v, res.list[i]);//合并对象
90
+                // })
91
+                $scope.sjList = res.list.map(v => ({...v, ...{processName: '事件流程'}}));
91 92
                 console.log($scope.sjList)
92 93
             }
93 94
         })
@@ -102,10 +103,10 @@ app.controller('notificationCtr', ["$rootScope", "$scope", "$state", "$timeout",
102 103
                     id: data.id,//id
103 104
                     noticeCode: data.noticeCode,
104 105
                     noticeRule: data.noticeRule === undefined ? 'no' : data.noticeRule,//通知规则,数字
105
-                    processNode: data.processNode,//流程节点
106
+                    noticeNode: data.noticeNode,//流程节点
106 107
                     processName: data.processName,//报修流程或者事件流程
107
-                    processStatus: data.processStatus,//状态
108
-                    notifiedPerson: data.notifiedPerson,//被通知人
108
+                    noticeState: data.noticeState,//状态
109
+                    noticeDetails: data.noticeDetails,//被通知人
109 110
                     noticeProcess: data.noticeProcess,//1为报修流程、2为事件流程
110 111
                     messageStationContent: data.messageStationContent,//站内消息通知内容
111 112
                     shortMessageContent: data.shortMessageContent,//短信通知内容
@@ -360,7 +361,7 @@ app.controller('notificationCtr', ["$rootScope", "$scope", "$state", "$timeout",
360 361
                         type: "success",
361 362
                         confirmButtonColor: "#007AFF"
362 363
                     }, function () {
363
-                        $scope.getBxList();
364
+                        // $scope.getBxList();
364 365
                         $scope.getSjList();
365 366
                     });
366 367
                 }

+ 7 - 7
assets/views/system/notification.html

@@ -113,7 +113,7 @@
113 113
       <div class="fonsize">消息通知设置</div>
114 114
       <div class="rightBox">
115 115
         <!-- 报修流程 -->
116
-        <table class="jry_table" ng-if="leftListIdx==0" cellspacing="0" cellpadding="20"
116
+        <!-- <table class="jry_table" ng-if="leftListIdx==0" cellspacing="0" cellpadding="20"
117 117
           style="font-weight:normal !important;margin-bottom: 15px;table-layout:fixed">
118 118
           <thread>
119 119
             <tr>
@@ -180,9 +180,9 @@
180 180
               </td>
181 181
             </tr>
182 182
           </tbody>
183
-        </table>
183
+        </table> -->
184 184
         <!-- 事件流程 -->
185
-        <table class="jry_table" ng-if="leftListIdx==1" cellspacing="0" cellpadding="20"
185
+        <table class="jry_table" ng-if="leftListIdx==0" cellspacing="0" cellpadding="20"
186 186
           style="font-weight:normal !important;margin-bottom: 15px;table-layout:fixed">
187 187
           <thread>
188 188
             <tr>
@@ -224,16 +224,16 @@
224 224
                 {{rowData.processName}}
225 225
               </td>
226 226
               <td style="width:10%">
227
-                {{rowData.processNode}}
227
+                {{rowData.noticeNode}}
228 228
               </td>
229 229
               <td style="width:10%">
230
-                {{rowData.processStatus}}
230
+                {{rowData.noticeState}}
231 231
               </td>
232 232
               <td style="width:12%">
233
-                {{rowData.notifiedPerson}}
233
+                {{rowData.noticeDetails}}
234 234
               </td>
235 235
               <td style="width:18%">
236
-                {{computedRule(rowData.noticeRule,rowData.id)}}
236
+                {{computedRule(rowData.noticeRule,rowData.noticeCode)}}
237 237
               </td>
238 238
               <td style="width:18%">
239 239
                 {{rowData.messageStationFlag ==1?'站内消息':''}}

+ 6 - 6
assets/views/system/tpl/notificationBj.html

@@ -38,13 +38,13 @@
38 38
         outline: none;
39 39
     }
40 40
 
41
-    .modal-body-common .processNode {
41
+    .modal-body-common .noticeNode {
42 42
         margin-top: 16px;
43 43
         font-size: 14px;
44 44
         color: #333;
45 45
     }
46 46
 
47
-    .modal-body-common .processNode span {
47
+    .modal-body-common .noticeNode span {
48 48
         color: #666;
49 49
     }
50 50
 
@@ -63,7 +63,7 @@
63 63
         color: #666;
64 64
     }
65 65
 
66
-    .modal-body-common .notifiedPerson {
66
+    .modal-body-common .noticeDetails {
67 67
         margin-left: 192px;
68 68
     }
69 69
 
@@ -224,10 +224,10 @@
224 224
                 ng-model="editData.noticeRule">分钟</h2>
225 225
             <h2 ng-if="editData.noticeRule !== 'no'&&(editData.id == 18||editData.id == 19)">{{editData.processName}}-【解决时长】剩余<input
226 226
                     class="noticeRule" type="number" ng-model="editData.noticeRule">%</h2>
227
-            <div class="processNode">流程节点:<span>{{editData.processNode}}</span></div>
227
+            <div class="noticeNode">流程节点:<span>{{editData.noticeNode}}</span></div>
228 228
             <div class="infoParent">
229
-                <div class="processStatus infoCommon">状态:<span>{{editData.processStatus}}</span></div>
230
-                <div class="notifiedPerson infoCommon">被通知人:<span>{{editData.notifiedPerson}}</span></div>
229
+                <div class="noticeState infoCommon">状态:<span>{{editData.noticeState}}</span></div>
230
+                <div class="noticeDetails infoCommon">被通知人:<span>{{editData.noticeDetails}}</span></div>
231 231
             </div>
232 232
         </div>
233 233
     </div>