sasp-flow-render 1.1.21 → 1.1.22

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasp-flow-render",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -157,7 +157,7 @@
157
157
  icon="saspiconfont pl-icon-liuchengtu" type="primary">流转记录
158
158
  </el-button>
159
159
  </template>
160
- <el-button size="small" v-if="scope.row.linkProcId && scope.row.nodeKey == startNodeKeyObj[scope.row.version]"
160
+ <el-button size="small" v-if="scope.row.linkProcId && scope.row.nodeKey == startNodeKeyObj[scope.row.version] && isShow('pending')"
161
161
  @click="deleteRowFlow(scope.row)"
162
162
  icon="el-icon-delete" type="danger">删除
163
163
  </el-button>
@@ -2249,9 +2249,9 @@
2249
2249
  let posUserIdArr = [];
2250
2250
  checkedUserArr.forEach(item => {
2251
2251
  userName += "," + item.dataLabel;
2252
- userId += "," + item.dataKey;
2253
- arr.push(item.dataKey);
2254
- posUserIdArr.push(item.dataKey);
2252
+ userId += "," + item.dataKey.startsWith("user_") ? item.dataKey.replace("user_", "") : item.dataKey;
2253
+ arr.push(item.dataKey.startsWith("user_") ? item.dataKey.replace("user_", "") : item.dataKey);
2254
+ posUserIdArr.push(item.dataKey.startsWith("user_") ? item.dataKey.replace("user_", "") : item.dataKey);
2255
2255
  });
2256
2256
  if (userName) {
2257
2257
  userName = userName.substring(1);
@@ -2426,7 +2426,7 @@
2426
2426
  }
2427
2427
  let userIds = "";
2428
2428
  checkedUserArr.forEach(item => {
2429
- userIds += "," + item.dataKey;
2429
+ userIds += "," + item.dataKey.startsWith("user_") ? item.dataKey.replace("user_", "") : item.dataKey;
2430
2430
  });
2431
2431
  this.disableSign = true;
2432
2432
  this.saspFlowAxios.post(this.api.plFlowInst.completeSign, {
@@ -2455,7 +2455,7 @@
2455
2455
  this.$message({type: "error", message: "请选择转签人!"});
2456
2456
  return;
2457
2457
  }
2458
- let userId = checkedUserArr[0].dataKey;
2458
+ let userId = checkedUserArr[0].dataKey.startsWith("user_") ? checkedUserArr[0].dataKey.replace("user_", "") : checkedUserArr[0].dataKey;
2459
2459
  this.disableSign = true;
2460
2460
  this.saspFlowAxios.post(this.api.plFlowInst.turnSign, {
2461
2461
  taskId: this.currentInst.taskId,
@@ -138,20 +138,39 @@
138
138
  this.analyseRequest(dataInter).then(data => {
139
139
  let checkedUserKeys = Object.keys(this.checkedInfos["user"] || {});
140
140
  let chooseUsers = this.chooseUserIds.split(",");
141
+ let alreadyChooseKeys = [];
142
+ if(checkedUserKeys.length > 0){
143
+ checkedUserKeys = checkedUserKeys.map(item => {
144
+ if (item.startsWith("user_") || !item) {
145
+ return item;
146
+ }
147
+ return "user_" + item;
148
+ })
149
+ }
150
+ if(chooseUsers.length > 0){
151
+ chooseUsers = chooseUsers.map(item => {
152
+ if (item.startsWith("user_") || !item) {
153
+ return item;
154
+ }
155
+ return "user_" + item;
156
+ })
157
+ }
141
158
  data.forEach(item => {
142
159
  item.dataUserId = item[dataInter["idCode"] || "userId"];
143
- item.dataKey = item.dataUserId;
160
+ item.dataKey = "user_" + item.dataUserId;
144
161
  item.flowDataType = "user";
145
162
  item.dataLabel = item[dataInter["showCode"] || "userName"];
146
163
  item.dataOrgId = item[dataInter["orgCode"] || "orgId"];
147
164
  item.dataPosId = item[dataInter["posCode"] || "posId"];
148
165
  if(item.dataOrgId){
149
- item.dataParentId = item.orgId;
166
+ item.dataParentId = "org_" + item.orgId;
150
167
  }
151
168
  if(item.dataPosId){
152
- item.dataParentId = item.posId;
169
+ item.dataParentId = "pos_" + item.posId;
153
170
  }
154
- if(checkedUserKeys.indexOf(item.dataKey) > -1 || chooseUsers.indexOf(item.dataKey) > -1){
171
+ if((checkedUserKeys.indexOf(item.dataKey) > -1 || chooseUsers.indexOf(item.dataKey) > -1)
172
+ && alreadyChooseKeys.indexOf(item.dataKey) === -1){
173
+ alreadyChooseKeys.push(item.dataKey);
155
174
  this.chooseUsers.push(item);
156
175
  }
157
176
  })
@@ -185,14 +204,23 @@
185
204
  let orgDimArr = [];
186
205
  let dimIdArr = [];
187
206
  let checkedOrgKeys = Object.keys(this.checkedInfos["org"] || {});
207
+ if (checkedOrgKeys.length > 0) {
208
+ checkedOrgKeys = checkedOrgKeys.map(item => {
209
+ if (item.startsWith("org_") || !item) {
210
+ return item;
211
+ }
212
+ return "org_" + item;
213
+ })
214
+ }
188
215
  data.forEach(item => {
189
216
  item.dataOrgId = item[dataInter["orgCode"] || "orgId"];
190
- item.dataKey = item.dataOrgId;
217
+ item.dataKey = "org_" + item.dataOrgId;
191
218
  item.flowDataType = "org";
192
219
  item.dataLabel = item[dataInter["orgNameCode"] || "orgName"];
193
220
  item.dataOrgDim = item[dataInter["orgTypeCode"] || "orgDim"];
194
221
  item.dataDimName = item[dataInter["orgTypeNameCode"] || "dimName"];
195
- item.dataParentId = item[dataInter["parentCode"] || "orgParentId"];
222
+ let dataParentId = item[dataInter["parentCode"] || "orgParentId"];
223
+ item.dataParentId = dataParentId ? "org_" + dataParentId : "";
196
224
  if(item.dataOrgDim && dimIdArr.indexOf(item.dataOrgDim) === -1){
197
225
  orgDimArr.push({
198
226
  label:item.dataDimName,
@@ -233,13 +261,22 @@
233
261
  this.posEnable = true;
234
262
  }
235
263
  let checkedPosKeys = Object.keys(this.checkedInfos["pos"] || {});
264
+ if (checkedPosKeys.length > 0) {
265
+ checkedPosKeys = checkedPosKeys.map(item => {
266
+ if (item.startsWith("pos_") || !item) {
267
+ return item;
268
+ }
269
+ return "pos_" + item;
270
+ })
271
+ }
236
272
  data.forEach(item => {
237
273
  item.dataPosId = item[dataInter["posCode"] || "posId"];
238
- item.dataKey = item.dataPosId;
274
+ item.dataKey = "pos_" + item.dataPosId;
239
275
  item.flowDataType = "pos";
240
276
  item.dataLabel = item[dataInter["posNameCode"] || "posName"];
241
- item.dataOrgId = item[dataInter["orgCode"] || "orgId"];
242
- item.dataParentId = item[dataInter["parentCode"] || "parentPosId"];
277
+ item.dataOrgId = "org_" + item[dataInter["orgCode"] || "orgId"];
278
+ let dataParentId = item[dataInter["parentCode"] || "parentPosId"];
279
+ item.dataParentId = dataParentId ? ("pos_" + dataParentId) : "";
243
280
  if((!item.dataParentId || item.dataParentId === '-1') && item.dataOrgId){
244
281
  item.dataParentId = item.dataOrgId;
245
282
  }