cloud-module-bpm 6.13.2 → 6.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/cloud-module-bpm.common.js +3965 -1347
  2. package/dist/cloud-module-bpm.common.js.map +1 -1
  3. package/dist/cloud-module-bpm.css +1 -1
  4. package/dist/cloud-module-bpm.umd.js +3965 -1347
  5. package/dist/cloud-module-bpm.umd.js.map +1 -1
  6. package/dist/cloud-module-bpm.umd.min.js +6 -6
  7. package/dist/cloud-module-bpm.umd.min.js.map +1 -1
  8. package/package.json +5 -2
  9. package/packages/bpm-back-anylink-dialog/Tree.vue +222 -0
  10. package/packages/bpm-back-anylink-dialog/bpm-back-anylink-dialog.vue +466 -213
  11. package/packages/bpm-form-tools/bpm-form-tools.vue +33 -10
  12. package/packages/bpm-jump-dialog/Tree.vue +222 -0
  13. package/packages/bpm-jump-dialog/bpm-jump-dialog.vue +425 -161
  14. package/packages/bpm-jump-latest-dialog/Tree.vue +180 -41
  15. package/packages/bpm-jump-latest-dialog/bpm-jump-latest-dialog.vue +200 -30
  16. package/packages/bpm-opinion-dialog/bpm-opinion.vue +105 -44
  17. package/packages/bpm-send-read-dialog/SelectedGrid.vue +1 -1
  18. package/packages/bpm-send-read-dialog/SourceGrid.vue +90 -102
  19. package/packages/bpm-send-read-dialog/Tree.vue +145 -24
  20. package/packages/bpm-send-read-dialog/bpm-next-node.vue +3 -3
  21. package/packages/bpm-send-read-opinion-dialog/bpm-send-read-opinion.vue +35 -34
  22. package/packages/bpm-sign-dialog/SelectedGrid.vue +2 -2
  23. package/packages/bpm-sign-dialog/SourceGrid.vue +96 -113
  24. package/packages/bpm-sign-dialog/Tree.vue +125 -87
  25. package/packages/bpm-sign-dialog/bpm-next-node.vue +11 -8
  26. package/packages/bpm-user-select-dialog/SourceGrid.vue +127 -51
  27. package/packages/bpm-user-select-dialog/Tree.vue +151 -61
  28. package/packages/bpm-user-select-dialog/bpm-next-node.vue +17 -5
  29. package/packages/i18n/langs/zh_CN.js +6 -6
  30. package/packages/utils/merit-bpm.js +121 -8
@@ -19,8 +19,14 @@
19
19
  >
20
20
  <el-row>
21
21
  <el-form-item :label="$t('bpm.opinion.opinion_area')">
22
- <el-tabs v-model="activeOpinionArea" class="cloud-opinion-area">
23
- <el-tab-pane :label="$t('bpm.opinion.common_opinion')">
22
+ <el-tabs
23
+ v-model="activeOpinionArea"
24
+ class="cloud-opinion-area"
25
+ >
26
+ <el-tab-pane
27
+ v-if="!customOpinions.length>0"
28
+ :label="$t('bpm.opinion.common_opinion')"
29
+ >
24
30
  <el-row class="cloud-opinion-area-tab-pane">
25
31
  <el-row
26
32
  v-for="commonOpinion in commonOpinions"
@@ -37,7 +43,10 @@
37
43
  </el-row>
38
44
  </el-row>
39
45
  </el-tab-pane>
40
- <el-tab-pane :label="$t('bpm.opinion.personal_opinion')">
46
+ <el-tab-pane
47
+ v-if="!customOpinions.length>0"
48
+ :label="$t('bpm.opinion.personal_opinion')"
49
+ >
41
50
  <el-row class="cloud-opinion-area-tab-pane">
42
51
  <el-row
43
52
  v-for="personalOpinion in personalOpinions"
@@ -54,6 +63,24 @@
54
63
  </el-row>
55
64
  </el-row>
56
65
  </el-tab-pane>
66
+ <el-row
67
+ v-else
68
+ class="cloud-opinion-area-tab-pane"
69
+ >
70
+ <el-row
71
+ v-for="customOpinion in customOpinions"
72
+ :key="customOpinion"
73
+ >
74
+ <el-col>
75
+ <div
76
+ class="cloud-opinion-area-item"
77
+ @click="handleOpnionSelect(customOpinion)"
78
+ >
79
+ {{ customOpinion }}
80
+ </div>
81
+ </el-col>
82
+ </el-row>
83
+ </el-row>
57
84
  </el-tabs>
58
85
  </el-form-item>
59
86
  </el-row>
@@ -76,12 +103,21 @@
76
103
  </el-row>
77
104
  </el-form>
78
105
 
79
- <span slot="footer" class="dialog-footer">
106
+ <span
107
+ slot="footer"
108
+ class="dialog-footer"
109
+ >
80
110
  <el-button @click="handleClose">{{
81
111
  $t('base.button.cancel')
82
- }}</el-button>
83
- <el-button @click="handleSave" v-if="isZc">暂存</el-button>
84
- <el-button type="primary" @click="handlePublish">确定</el-button>
112
+ }}</el-button>
113
+ <el-button
114
+ @click="handleSave"
115
+ v-if="isZc"
116
+ >暂存</el-button>
117
+ <el-button
118
+ type="primary"
119
+ @click="handlePublish"
120
+ >确定</el-button>
85
121
  </span>
86
122
  </el-dialog>
87
123
  </div>
@@ -129,7 +165,7 @@ export default {
129
165
  required: true
130
166
  }
131
167
  },
132
- data() {
168
+ data () {
133
169
  return {
134
170
  maxHeight: '',
135
171
  isZc: false,
@@ -151,19 +187,21 @@ export default {
151
187
  content: undefined
152
188
  },
153
189
  commonOpinions: [],
154
- personalOpinions: []
190
+ personalOpinions: [],
191
+ customOpinions: []
155
192
  };
156
193
  },
157
- created() {
194
+ created () {
158
195
  this.maxHeight = window.outerHeight > 900 ? '483px' : '361px';
159
196
  },
160
197
  methods: {
161
- openDialog() {
198
+ openDialog () {
162
199
  let _this = this;
163
200
  let procDefId = _this.ruleEngine.runtime.procDefId;
164
201
  let procInstId = _this.ruleEngine.runtime.procInstId;
165
202
  let taskId = _this.ruleEngine.runtime.taskId;
166
203
  let taskDefKey = _this.ruleEngine.runtime.taskDefKey;
204
+ let opinionType = _this.ruleEngine.opinion.opinionType;
167
205
  if (_this.ruleEngine.opinion && _this.ruleEngine.opinion.zc == '1') {
168
206
  _this.isZc = true;
169
207
  }
@@ -174,31 +212,54 @@ export default {
174
212
  taskId: taskId,
175
213
  taskDefKey: taskDefKey
176
214
  })
177
- .then(function(res) {
215
+ .then(function (res) {
178
216
  _this.procOpinion.content = res.data;
179
217
  })
180
- .catch(function(err) {
218
+ .catch(function (err) {
181
219
  console.log(err);
182
220
  });
183
221
  //在此处查询公共意见和个人意见
184
- axios['bpm-engine']
185
- .post('/bpm/api/opinion/getAllOpionContent', {})
186
- .then(function(res) {
187
- //公共意见
188
- if (res.data.commonOpinions.length > 0) {
189
- _this.commonOpinions = res.data.commonOpinions;
190
- }
191
- //个人意见
192
- if (res.data.personalOpinions.length > 0) {
193
- _this.personalOpinions = res.data.personalOpinions;
194
- }
195
- })
196
- .catch(function(err) {
197
- console.log(err);
198
- });
222
+ if (opinionType == '2') {
223
+ axios['bpm-engine']
224
+ .post('/bpm/api/opinion/getCustomAllOpionContent', { activityId: taskDefKey })
225
+ .then(function (res) {
226
+ //自定义意见
227
+ if (res.data.customOpinions && res.data.customOpinions.length > 0) {
228
+ _this.customOpinions = res.data.customOpinions;
229
+ }
230
+ //公共意见
231
+ if (res.data.commonOpinions && res.data.commonOpinions.length > 0) {
232
+ _this.commonOpinions = res.data.commonOpinions;
233
+ }
234
+ //个人意见
235
+ if (res.data.personalOpinions && res.data.personalOpinions.length > 0) {
236
+ _this.personalOpinions = res.data.personalOpinions;
237
+ }
238
+ })
239
+ .catch(function (err) {
240
+ console.log(err);
241
+ });
242
+ } else {
243
+ axios['bpm-engine']
244
+ .post('/bpm/api/opinion/getAllOpionContent', {})
245
+ .then(function (res) {
246
+ //公共意见
247
+ if (res.data.commonOpinions.length > 0) {
248
+ _this.commonOpinions = res.data.commonOpinions;
249
+ }
250
+ //个人意见
251
+ if (res.data.personalOpinions.length > 0) {
252
+ _this.personalOpinions = res.data.personalOpinions;
253
+ }
254
+ })
255
+ .catch(function (err) {
256
+ console.log(err);
257
+ });
258
+ }
259
+
199
260
  },
200
261
  //流程意见选择事件
201
- handleOpnionSelect(opinion) {
262
+ handleOpnionSelect (opinion) {
202
263
  if (
203
264
  this.procOpinion.content == null ||
204
265
  this.procOpinion.content.length == 0
@@ -212,12 +273,12 @@ export default {
212
273
  }
213
274
  },
214
275
  //关闭人员选择对话框
215
- handleClose() {
276
+ handleClose () {
216
277
  this.procOpinion.content = undefined;
217
278
  this.$refs.procOpinion.resetFields();
218
279
  this.$emit('dialog-close', this.dialogVisible);
219
280
  },
220
- handleSave() {
281
+ handleSave () {
221
282
  let _this = this;
222
283
  if (_this.procOpinion.content.length > 200) {
223
284
  return this.$message.error(
@@ -239,24 +300,24 @@ export default {
239
300
  content: _this.procOpinion.content,
240
301
  type: 'save'
241
302
  })
242
- .then(function(res) {
303
+ .then(function (res) {
243
304
  _this.$emit("dialog-save", _this.ruleEngine);
244
305
  _this.$emit("dialog-close");
245
306
  let ele = document.getElementsByClassName('a-SXYJ');
246
- if(ele && ele.length > 0){
307
+ if (ele && ele.length > 0) {
247
308
  _this.refreshCurrentPageOpionList();
248
- } else{
309
+ } else {
249
310
  // 不存在
250
- _this.$emit('refreshCurrentPageOpionList',_this.ruleEngine);
311
+ _this.$emit('refreshCurrentPageOpionList', _this.ruleEngine);
251
312
  }
252
313
  })
253
- .catch(function(err) {
314
+ .catch(function (err) {
254
315
  console.log(err);
255
316
  });
256
317
  }
257
318
  });
258
319
  },
259
- handlePublish() {
320
+ handlePublish () {
260
321
  let _this = this;
261
322
  if (_this.procOpinion.content.length > 255) {
262
323
  return this.$message.error(
@@ -278,26 +339,26 @@ export default {
278
339
  content: _this.procOpinion.content,
279
340
  type: 'publish'
280
341
  })
281
- .then(function(res) {
342
+ .then(function (res) {
282
343
  _this.$emit("dialog-save", _this.ruleEngine);
283
344
  _this.$emit("dialog-close");
284
345
  let ele = document.getElementsByClassName('a-SXYJ');
285
346
  console.log('ele:' + ele);
286
- if(ele && ele.length > 0){
347
+ if (ele && ele.length > 0) {
287
348
  _this.refreshCurrentPageOpionList();
288
- } else{
349
+ } else {
289
350
  // 不存在
290
- _this.$emit('refreshCurrentPageOpionList',_this.ruleEngine);
351
+ _this.$emit('refreshCurrentPageOpionList', _this.ruleEngine);
291
352
  }
292
-
353
+
293
354
  })
294
- .catch(function(err) {
355
+ .catch(function (err) {
295
356
  console.log(err);
296
357
  });
297
358
  }
298
359
  });
299
360
  },
300
- refreshCurrentPageOpionList() {
361
+ refreshCurrentPageOpionList () {
301
362
  // 刷新当前页面的意见列表 给AMIS定制刷新页面的意见列表组件
302
363
  let sxBtn = document.getElementsByClassName('a-SXYJ');
303
364
  if (sxBtn && sxBtn[0]) {
@@ -21,7 +21,7 @@
21
21
  </el-table-column>
22
22
  <el-table-column
23
23
  prop="code"
24
- :label="$t('base.user.user_name')"
24
+ :label="$t('bpm.user_select.emp_code')"
25
25
  fit="true"
26
26
  >
27
27
  <template slot-scope="scope">
@@ -1,27 +1,29 @@
1
1
  <template>
2
2
  <div>
3
- <el-row justify="space-between" style="padding: 5px;">
3
+ <el-row
4
+ justify="space-between"
5
+ style="padding: 5px;"
6
+ >
4
7
  <el-col
5
8
  :span="7"
6
9
  style="float: left;margin-top: 5px;padding-left: 2px;"
7
- >{{ $t('base.list_alternatives') }}</el-col
10
+ >{{ $t('base.list_alternatives') }}</el-col>
11
+ <el-col
12
+ :span="17"
13
+ style="float:right;"
8
14
  >
9
- <el-col :span="17" style="float:right;">
10
15
  <el-input
11
- class="custom_input_1"
12
16
  placeholder="请输入姓名或编码"
13
17
  v-model="searchName"
14
18
  clearable
15
- @change="searchGridData"
16
- @keyup.enter.native="searchGridData"
17
- suffix-icon="el-icon-search"
19
+ @change="requestGridData"
18
20
  >
19
- <!-- <el-button
21
+ <el-button
20
22
  class="el-icon-search-button"
21
23
  slot="append"
22
24
  icon="el-icon-search"
23
- @click="searchGridData"
24
- ></el-button> -->
25
+ @click="requestGridData"
26
+ ></el-button>
25
27
  </el-input>
26
28
  </el-col>
27
29
  </el-row>
@@ -39,10 +41,20 @@
39
41
  @row-click="handleRowClick"
40
42
  >
41
43
  <div class=""></div>
42
- <el-table-column style="height: 18px" type="selection"></el-table-column>
43
- <el-table-column prop="name" :label="$t('base.user.name')" fit="true">
44
+ <el-table-column
45
+ style="height: 18px"
46
+ type="selection"
47
+ ></el-table-column>
48
+ <el-table-column
49
+ prop="name"
50
+ :label="$t('base.user.name')"
51
+ fit="true"
52
+ >
44
53
  <template slot-scope="scope">
45
- <div :title="scope.row.name" class="cell-hidden">
54
+ <div
55
+ :title="scope.row.name"
56
+ class="cell-hidden"
57
+ >
46
58
  {{ scope.row.name }}
47
59
  </div>
48
60
  </template>
@@ -53,14 +65,24 @@
53
65
  fit="true"
54
66
  >
55
67
  <template slot-scope="scope">
56
- <div :title="scope.row.code" class="cell-hidden">
68
+ <div
69
+ :title="scope.row.code"
70
+ class="cell-hidden"
71
+ >
57
72
  {{ scope.row.code }}
58
73
  </div>
59
74
  </template>
60
75
  </el-table-column>
61
- <el-table-column prop="deptName" :label="$t('base.dept.name')" fit="true">
76
+ <el-table-column
77
+ prop="deptName"
78
+ :label="$t('base.dept.name')"
79
+ fit="true"
80
+ >
62
81
  <template slot-scope="scope">
63
- <div :title="scope.row.deptName" class="cell-hidden">
82
+ <div
83
+ :title="scope.row.deptName"
84
+ class="cell-hidden"
85
+ >
64
86
  {{ scope.row.deptName }}
65
87
  </div>
66
88
  </template>
@@ -110,7 +132,7 @@ export default {
110
132
  'el-input': Input,
111
133
  'el-button': Button
112
134
  },
113
- data() {
135
+ data () {
114
136
  return {
115
137
  empUrl: '/api/identity/bpm-user/list-by-deptcode', //人员数据接口
116
138
  searchName: '',
@@ -128,14 +150,14 @@ export default {
128
150
  };
129
151
  },
130
152
  computed: {},
131
- created() {
153
+ created () {
132
154
  // this.tableHeight = window.outerHeight > 900 ? 385 : 265;
133
155
  this.opt.forEach(bpmUser => {
134
156
  this.receiverIds.push(bpmUser.code);
135
157
  });
136
158
  },
137
159
  watch: {
138
- opt(old, newVal) {
160
+ opt (old, newVal) {
139
161
  this.empTableData = this.opt;
140
162
  this.empTotal = this.opt.length;
141
163
  this.opt.forEach(bpmUser => {
@@ -144,18 +166,18 @@ export default {
144
166
  }
145
167
  },
146
168
  //加载时调用方法 函数
147
- mounted() {
169
+ mounted () {
148
170
  let _this = this;
149
171
  // this.empTableData = this.opt;
150
172
  // this.empTableData = this.opt.bpmUsers;
151
173
  // 初始化选择数据分页
152
174
  this.sourceAllData = this.opt;
153
- if (!this.treeNode.code) {
175
+ if (!this.treeNode.code && !this.treeNode.deptCode) {
154
176
  this.resultDataChange();
155
177
  }
156
178
  this.empTotal = this.opt.length;
157
179
  //点击树节点,刷新待选列表
158
- this.EventBus.$on('refresh-source-grid', treeNode => {
180
+ this.EventBus.$on('refresh-source-grid-sendRead', treeNode => {
159
181
  _this.pageSize = 10;
160
182
  _this.currentPage = 1;
161
183
  _this.treeNode = treeNode.attributes || treeNode;
@@ -166,17 +188,17 @@ export default {
166
188
  _this.cancelSelecedUser(row);
167
189
  });
168
190
  //监听保存按钮事件。点击后,清除已选择处理人对象
169
- this.EventBus.$on('save-button-click', function() {
191
+ this.EventBus.$on('save-button-click', function () {
170
192
  _this.searchName = '';
171
193
  _this.multipleSelection = [];
172
194
  });
173
195
  },
174
196
  methods: {
175
197
  //每页显示数据个数变化时调用
176
- handleSizeChange(val) {
198
+ handleSizeChange (val) {
177
199
  this.pageSize = val;
178
200
  //点击过tree,this.treeNode.code有值进行分页
179
- if (this.treeNode.code) {
201
+ if (this.treeNode.code || this.treeNode.deptCode) {
180
202
  this.requestGridData();
181
203
  } else {
182
204
  //未点击tree进行分页
@@ -184,71 +206,37 @@ export default {
184
206
  }
185
207
  },
186
208
  //页码变化时调用
187
- handleCurrentChange(val) {
209
+ handleCurrentChange (val) {
188
210
  this.currentPage = val;
189
211
  //点击过tree,this.treeNode.code有值进行分页
190
- if (this.treeNode.code) {
212
+ if (this.treeNode.code || this.treeNode.deptCode) {
191
213
  this.requestGridData();
192
214
  } else {
193
215
  //未点击tree进行分页
194
216
  this.resultDataChange();
195
217
  }
196
218
  },
197
- searchGridData() {
198
- this.currentPage = 1;
199
- if (this.treeNode.code) {
200
- this.requestGridData();
201
- } else {
202
- this.resultDataChange();
203
- }
204
- },
205
219
  //判断是否是选择一条数据还是取消选择
206
- selectRow(select, row) {
220
+ selectRow (select, row) {
207
221
  return select.some(element => {
208
222
  if (element.code == row.code) {
209
223
  return true;
210
224
  }
211
225
  });
212
226
  },
213
- resultDataChange() {
214
- if (this.sourceAllData.length) {
215
- // 按照模糊次进行匹配
216
- if (this.searchName) {
217
- const filteredData = this.sourceAllData.filter(item => {
218
- const code = String(item.code || '').toLowerCase();
219
- const name = String(item.name || '').toLowerCase();
220
- const keywordLower = this.searchName.toLowerCase();
221
- return code.includes(keywordLower) || name.includes(keywordLower);
222
- });
223
- this.empTotal = filteredData.length;
224
- if (filteredData) {
225
- let result = filteredData.slice(
226
- this.pageSize * (this.currentPage - 1),
227
- this.pageSize * this.currentPage
228
- );
229
- this.empTableData = result;
230
- } else {
231
- this.empTableData = [];
232
- }
233
- } else {
234
- let result = this.sourceAllData.slice(
235
- this.pageSize * (this.currentPage - 1),
236
- this.pageSize * this.currentPage
237
- );
238
- this.empTableData = result;
239
- this.empTotal = this.sourceAllData.length;
240
- }
241
- // 设置行选中效果
242
- this.$nextTick(() => {
243
- this.setRowStatus();
244
- });
227
+ resultDataChange () {
228
+ if (this.sourceAllData) {
229
+ var result = this.sourceAllData.slice(
230
+ this.pageSize * (this.currentPage - 1),
231
+ this.pageSize * this.currentPage
232
+ );
233
+ this.empTableData = result;
245
234
  } else {
246
235
  this.empTableData = [];
247
- this.empTotal = 0;
248
236
  }
249
237
  },
250
238
  //判断是否已经选择该条数据
251
- indexOfMultipleSelection(row) {
239
+ indexOfMultipleSelection (row) {
252
240
  var index = -1;
253
241
  var _this = this;
254
242
  if (_this.multipleSelection.length > 0) {
@@ -262,7 +250,7 @@ export default {
262
250
  return index;
263
251
  },
264
252
  //行单击事件只有单人审批是选人才生效,其他审批方式,通过checkbox生效
265
- handleRowClick(row, event, column) {
253
+ handleRowClick (row, event, column) {
266
254
  let _this = this;
267
255
  let index = this.indexOfMultipleSelection(row);
268
256
  this.$refs.sourceGrid.toggleRowSelection(row);
@@ -280,7 +268,7 @@ export default {
280
268
  dealUserCodes: dealUserCodes
281
269
  });
282
270
  },
283
- handleSelect(select, row) {
271
+ handleSelect (select, row) {
284
272
  if (this.selectRow(select, row)) {
285
273
  if (this.indexOfMultipleSelection(row) == -1) {
286
274
  this.multipleSelection.push(row);
@@ -300,7 +288,7 @@ export default {
300
288
  dealUserCodes: dealUserCodes
301
289
  });
302
290
  },
303
- handleSelectAll(selection) {
291
+ handleSelectAll (selection) {
304
292
  if (selection.length == 0) {
305
293
  this.empTableData.forEach(row => {
306
294
  let index = this.indexOfMultipleSelection(row);
@@ -320,39 +308,39 @@ export default {
320
308
  this.multipleSelection.forEach(element => {
321
309
  dealUserCodes[element.code] = element.name;
322
310
  });
323
- this.EventBus.$emit('refresh-selected-grid' ,this.multipleSelection);
311
+ this.EventBus.$emit('refresh-selected-grid', this.multipleSelection);
324
312
  this.EventBus.$emit('update-selected-user', {
325
313
  dealUserCodes: dealUserCodes
326
314
  });
327
315
  },
328
316
  //请求数据
329
- requestGridData() {
317
+ requestGridData () {
330
318
  let _this = this;
331
319
  let param = {
332
320
  page: this.currentPage,
333
321
  rows: this.pageSize,
334
- deptCode: this.treeNode.code,
322
+ deptCode: this.treeNode.code ? this.treeNode.code : this.treeNode.deptCode,
335
323
  search: this.searchName,
336
324
  userNames: this.receiverIds.join(',')
337
325
  };
338
326
  axios['bpm-engine']
339
327
  .post(this.empUrl, param)
340
- .then(function(res) {
328
+ .then(function (res) {
341
329
  if (res.success) {
342
330
  _this.empTableData = res.data.rows;
343
331
  _this.empTotal = res.data.total;
344
332
  //必须等列表重新渲染完毕,才能执行此方法。
345
- setTimeout(function() {
333
+ setTimeout(function () {
346
334
  _this.setRowStatus();
347
335
  }, 100);
348
336
  }
349
337
  _this.loading = false;
350
338
  })
351
- .catch(function(err) {
339
+ .catch(function (err) {
352
340
  console.log(err);
353
341
  });
354
342
  },
355
- setRowStatus() {
343
+ setRowStatus () {
356
344
  let _this = this;
357
345
  this.empTableData.forEach(row => {
358
346
  let index = _this.indexOfMultipleSelection(row);
@@ -361,29 +349,29 @@ export default {
361
349
  }
362
350
  });
363
351
  },
364
- cancelSelecedUser(row) {
365
- //取消已选中的
366
- let index = this.indexOfMultipleSelection(row);
367
- if (index != -1) {
368
- this.multipleSelection.splice(index, 1);
369
- }
370
- //更新待选的人员
371
- for (var i = 0; i < this.empTableData.length; i++) {
372
- if (this.empTableData[i].code == row.code) {
373
- this.$refs.sourceGrid.toggleRowSelection(
374
- this.empTableData[i],
375
- false
376
- );
377
- }
352
+ cancelSelecedUser (row) {
353
+ //取消已选中的
354
+ let index = this.indexOfMultipleSelection(row);
355
+ if (index != -1) {
356
+ this.multipleSelection.splice(index, 1);
357
+ }
358
+ //更新待选的人员
359
+ for (var i = 0; i < this.empTableData.length; i++) {
360
+ if (this.empTableData[i].code == row.code) {
361
+ this.$refs.sourceGrid.toggleRowSelection(
362
+ this.empTableData[i],
363
+ false
364
+ );
378
365
  }
379
- // this.$refs.sourceGrid.toggleRowSelection(row);
380
- let dealUserCodes = {};
381
- this.multipleSelection.forEach(element => {
382
- dealUserCodes[element.code] = element.name;
383
- });
384
- this.EventBus.$emit('update-selected-user', {
385
- dealUserCodes: dealUserCodes
386
- });
366
+ }
367
+ // this.$refs.sourceGrid.toggleRowSelection(row);
368
+ let dealUserCodes = {};
369
+ this.multipleSelection.forEach(element => {
370
+ dealUserCodes[element.code] = element.name;
371
+ });
372
+ this.EventBus.$emit('update-selected-user', {
373
+ dealUserCodes: dealUserCodes
374
+ });
387
375
  }
388
376
  }
389
377
  };