Ver código fonte

新增处理日志

seimin 2 anos atrás
pai
commit
66cbfddffb
1 arquivos alterados com 59 adições e 17 exclusões
  1. 59 17
      src/components/showModel/showModel.vue

+ 59 - 17
src/components/showModel/showModel.vue

@@ -22,16 +22,29 @@
22
           <cube-select
22
           <cube-select
23
             v-model="selectGroupId"
23
             v-model="selectGroupId"
24
             :options="selectDataGroup"
24
             :options="selectDataGroup"
25
-            placeholder="请选择工作组" @change="changeGroup($event)"
25
+            placeholder="请选择工作组"
26
+            @change="changeGroup($event)"
26
           ></cube-select>
27
           ></cube-select>
27
           <cube-select
28
           <cube-select
28
             v-model="selectUserId"
29
             v-model="selectUserId"
29
             :options="selectDataUser"
30
             :options="selectDataUser"
30
-            placeholder="请选择指派对象" style="margin-top:0.5rem;"
31
+            placeholder="请选择指派对象"
32
+            style="margin-top:0.5rem;"
31
           ></cube-select>
33
           ></cube-select>
32
         </div>
34
         </div>
33
         <div v-if="textName === 'textarea'">
35
         <div v-if="textName === 'textarea'">
34
-          <cube-textarea autofocus :maxlength="255" v-model="textareaData" placeholder="请填写处理日志" style="border:1px solid #ececec;height:2rem;resize:none;"></cube-textarea>
36
+          <div class="tipsAll">
37
+            <div class="tips" v-for="item in logs" :key="item.id" @click="copyTo(item.value)">
38
+              {{ item.value }}
39
+            </div>
40
+          </div>
41
+          <cube-textarea
42
+            autofocus
43
+            :maxlength="255"
44
+            v-model="textareaData"
45
+            placeholder="请填写处理日志"
46
+            style="border:1px solid #ececec;height:2rem;resize:none;"
47
+          ></cube-textarea>
35
         </div>
48
         </div>
36
       </div>
49
       </div>
37
       <div class="showModel__footer">
50
       <div class="showModel__footer">
@@ -60,6 +73,7 @@
60
 export default {
73
 export default {
61
   data() {
74
   data() {
62
     return {
75
     return {
76
+      logs: [],
63
       time: 5, //5秒后自动关闭
77
       time: 5, //5秒后自动关闭
64
       timer: null, //5秒后自动关闭,定时器
78
       timer: null, //5秒后自动关闭,定时器
65
       timerFlag: true, //是否显示取消自动关闭按钮
79
       timerFlag: true, //是否显示取消自动关闭按钮
@@ -67,7 +81,7 @@ export default {
67
       selectUserId: 0, //select选中的数据-用户
81
       selectUserId: 0, //select选中的数据-用户
68
       selectDataGroup: [], //select数据-工作组
82
       selectDataGroup: [], //select数据-工作组
69
       selectGroupId: 0, //select选中的数据-工作组
83
       selectGroupId: 0, //select选中的数据-工作组
70
-      textareaData: '', //textarea的数据
84
+      textareaData: "" //textarea的数据
71
     };
85
     };
72
   },
86
   },
73
   watch: {
87
   watch: {
@@ -77,7 +91,7 @@ export default {
77
         this.selectUserId = 0;
91
         this.selectUserId = 0;
78
       }
92
       }
79
       if (newValue && this.textName === "textarea") {
93
       if (newValue && this.textName === "textarea") {
80
-        this.textareaData = '';
94
+        this.textareaData = "";
81
       }
95
       }
82
       if (newValue && this.operate.know == "知道了") {
96
       if (newValue && this.operate.know == "知道了") {
83
         this.time = 5;
97
         this.time = 5;
@@ -138,8 +152,20 @@ export default {
138
     }
152
     }
139
   },
153
   },
140
   methods: {
154
   methods: {
155
+    copyTo(value){
156
+      this.textareaData += value;
157
+    },
158
+    getLogs() {
159
+      var postData = { idx: 0, sum: 999, dictionary: { key: "processingLog" } };
160
+      this.$http
161
+        .post("service/bpm/data/fetchDataList/dictionary", postData)
162
+        .then(res => {
163
+          res.data.list = res.data.list || [];
164
+          this.logs = res.data.list.slice(0,2);
165
+        });
166
+    },
141
     //选择组
167
     //选择组
142
-    changeGroup(groupId){
168
+    changeGroup(groupId) {
143
       this.getZpUser(groupId);
169
       this.getZpUser(groupId);
144
     },
170
     },
145
     // 获取指派对象
171
     // 获取指派对象
@@ -152,19 +178,19 @@ export default {
152
           roledata: { rolecode: "first-line support" },
178
           roledata: { rolecode: "first-line support" },
153
           roledata2: { rolecode: "second-line support" },
179
           roledata2: { rolecode: "second-line support" },
154
           selectType: "1",
180
           selectType: "1",
155
-          selectDetails:1
181
+          selectDetails: 1
156
         }
182
         }
157
       };
183
       };
158
-      if(groupId){
159
-        postData.user.groupdata = {id:groupId}
184
+      if (groupId) {
185
+        postData.user.groupdata = { id: groupId };
160
       }
186
       }
161
       this.$http
187
       this.$http
162
         .post("service/user/data/fetchDataList/user", postData)
188
         .post("service/user/data/fetchDataList/user", postData)
163
         .then(res => {
189
         .then(res => {
164
           res.data.list = res.data.list || [];
190
           res.data.list = res.data.list || [];
165
-          this.selectDataUser = res.data.list.map((v) => {
191
+          this.selectDataUser = res.data.list.map(v => {
166
             return {
192
             return {
167
-              text: v.name+'【'+v.taskCount+'】',
193
+              text: v.name + "【" + v.taskCount + "】",
168
               value: v.id
194
               value: v.id
169
             };
195
             };
170
           });
196
           });
@@ -181,8 +207,8 @@ export default {
181
       this.$http
207
       this.$http
182
         .post("service/user/data/fetchDataList/group", postData)
208
         .post("service/user/data/fetchDataList/group", postData)
183
         .then(res => {
209
         .then(res => {
184
-          res.data.list = res.data.list||[];
185
-          this.selectDataGroup = res.data.list.map((v) => {
210
+          res.data.list = res.data.list || [];
211
+          this.selectDataGroup = res.data.list.map(v => {
186
             return {
212
             return {
187
               text: v.groupName,
213
               text: v.groupName,
188
               value: v.id
214
               value: v.id
@@ -196,9 +222,9 @@ export default {
196
     },
222
     },
197
     // 确定
223
     // 确定
198
     ok() {
224
     ok() {
199
-      if (this.selectName === 'user') {
225
+      if (this.selectName === "user") {
200
         this.$emit("ok", this.selectUserId);
226
         this.$emit("ok", this.selectUserId);
201
-      }else if (this.textName === 'textarea') {
227
+      } else if (this.textName === "textarea") {
202
         this.$emit("ok", this.textareaData);
228
         this.$emit("ok", this.textareaData);
203
       } else {
229
       } else {
204
         this.$emit("ok");
230
         this.$emit("ok");
@@ -224,6 +250,9 @@ export default {
224
       this.getZpGroup();
250
       this.getZpGroup();
225
       this.getZpUser();
251
       this.getZpUser();
226
     }
252
     }
253
+    if (this.textName === "textarea") {
254
+      this.getLogs();
255
+    }
227
   }
256
   }
228
 };
257
 };
229
 </script>
258
 </script>
@@ -238,6 +267,19 @@ export default {
238
   background-color: rgba(0, 0, 0, 0.2);
267
   background-color: rgba(0, 0, 0, 0.2);
239
   z-index: 99;
268
   z-index: 99;
240
 
269
 
270
+  .tipsAll {
271
+    display: flex;
272
+    flex-wrap: wrap;
273
+    .tips {
274
+      word-break: break-all;
275
+      margin-bottom: 0.1rem;
276
+      margin-left: 0.2rem;
277
+      &:first-of-type {
278
+        margin-left: 0;
279
+      }
280
+    }
281
+  }
282
+
241
   .showModel__wrap {
283
   .showModel__wrap {
242
     width: 5.6rem;
284
     width: 5.6rem;
243
     position: absolute;
285
     position: absolute;
@@ -257,9 +299,9 @@ export default {
257
     }
299
     }
258
 
300
 
259
     .showModel__article {
301
     .showModel__article {
260
-      margin: 0.4rem auto 0.25rem;
302
+      margin: 0.2rem auto;
261
       width: 4.88rem;
303
       width: 4.88rem;
262
-      padding: 0.6rem 0;
304
+      padding: 0.2rem;
263
       background-color: rgb(249, 250, 251);
305
       background-color: rgb(249, 250, 251);
264
       border: 0.02rem solid rgb(229, 233, 237);
306
       border: 0.02rem solid rgb(229, 233, 237);
265
       border-radius: 0.12rem;
307
       border-radius: 0.12rem;