|
|
@@ -160,7 +160,8 @@ export default {
|
|
160
|
160
|
isSubmittingPost: false,
|
|
161
|
161
|
currentTime: undefined,
|
|
162
|
162
|
errModalShow: false,
|
|
163
|
|
- errModalContent: ''
|
|
|
163
|
+ errModalContent: '',
|
|
|
164
|
+ selectedLocationPath: [] // 存储完整的三级路径数据
|
|
164
|
165
|
}
|
|
165
|
166
|
},
|
|
166
|
167
|
computed: {
|
|
|
@@ -169,37 +170,44 @@ export default {
|
|
169
|
170
|
},
|
|
170
|
171
|
//单选获取的区域
|
|
171
|
172
|
positions() {
|
|
172
|
|
- return this.notkezhang ? {
|
|
|
173
|
+ // 解析三级路径数据
|
|
|
174
|
+ const path = this.selectedLocationPath
|
|
|
175
|
+ const result = {
|
|
|
176
|
+ terminlCode: '',
|
|
|
177
|
+ terminlName: '',
|
|
173
|
178
|
regionalCode: '',
|
|
174
|
179
|
regionalName: '',
|
|
175
|
|
- channelCode: this.channelOrRegional,
|
|
176
|
|
- channelName: this.channelOrRegionalName
|
|
177
|
|
- } : {
|
|
178
|
|
- regionalCode: this.channelOrRegional,
|
|
179
|
|
- regionalName: this.channelOrRegionalName,
|
|
180
|
180
|
channelCode: '',
|
|
181
|
181
|
channelName: ''
|
|
182
|
182
|
}
|
|
|
183
|
+
|
|
|
184
|
+ if (path.length >= 1) {
|
|
|
185
|
+ result.terminlCode = path[0].terminlCode || path[0].value
|
|
|
186
|
+ result.terminlName = path[0].terminlName || path[0].text
|
|
|
187
|
+ }
|
|
|
188
|
+ if (path.length >= 2) {
|
|
|
189
|
+ result.regionalCode = path[1].regionalCode || path[1].value
|
|
|
190
|
+ result.regionalName = path[1].regionalName || path[1].text
|
|
|
191
|
+ }
|
|
|
192
|
+ if (path.length >= 3) {
|
|
|
193
|
+ result.channelCode = path[2].channelCode || path[2].value
|
|
|
194
|
+ result.channelName = path[2].channelName || path[2].text
|
|
|
195
|
+ }
|
|
|
196
|
+
|
|
|
197
|
+ return result
|
|
183
|
198
|
},
|
|
184
|
199
|
//多选获得的区域
|
|
185
|
200
|
getSelectArea() {
|
|
186
|
201
|
let area = []
|
|
187
|
202
|
this.selectedAreas.forEach(item => {
|
|
188
|
203
|
item.children.forEach(child => {
|
|
189
|
|
- area.push(this.notkezhang ? {
|
|
190
|
|
- regionalCode: '',
|
|
191
|
|
- regionalName: '',
|
|
192
|
|
- channelCode: child.code,
|
|
193
|
|
- channelName: child.label,
|
|
194
|
|
- terminlCode: item.code,
|
|
195
|
|
- terminlName: item.label
|
|
196
|
|
- } : {
|
|
197
|
|
- regionalCode: child.code,
|
|
198
|
|
- regionalName: child.label,
|
|
199
|
|
- channelCode: '',
|
|
200
|
|
- channelName: '',
|
|
201
|
|
- terminlCode: item.code,
|
|
202
|
|
- terminlName: item.label
|
|
|
204
|
+ area.push({
|
|
|
205
|
+ terminlCode: child.terminlCode || item.code,
|
|
|
206
|
+ terminlName: child.terminlName || item.label,
|
|
|
207
|
+ regionalCode: child.regionalCode || (this.notkezhang ? '' : child.code),
|
|
|
208
|
+ regionalName: child.regionalName || (this.notkezhang ? '' : child.label),
|
|
|
209
|
+ channelCode: child.channelCode || (this.notkezhang ? child.code : ''),
|
|
|
210
|
+ channelName: child.channelName || (this.notkezhang ? child.label : '')
|
|
203
|
211
|
})
|
|
204
|
212
|
})
|
|
205
|
213
|
})
|
|
|
@@ -268,7 +276,14 @@ export default {
|
|
268
|
276
|
return list.map(node => ({
|
|
269
|
277
|
text: node.label,
|
|
270
|
278
|
value: node.code,
|
|
271
|
|
- children: node.children ? this.convertTree(node.children) : null
|
|
|
279
|
+ children: node.children ? this.convertTree(node.children) : null,
|
|
|
280
|
+ // 保留原始数据字段
|
|
|
281
|
+ terminlName: node.terminlName,
|
|
|
282
|
+ terminlCode: node.terminlCode,
|
|
|
283
|
+ regionalName: node.regionalName,
|
|
|
284
|
+ regionalCode: node.regionalCode,
|
|
|
285
|
+ channelName: node.channelName,
|
|
|
286
|
+ channelCode: node.channelCode
|
|
272
|
287
|
}))
|
|
273
|
288
|
},
|
|
274
|
289
|
invokerDataConfigTree(level) {
|
|
|
@@ -281,6 +296,8 @@ export default {
|
|
281
|
296
|
onLocationChange({ detail }) {
|
|
282
|
297
|
const { value } = detail
|
|
283
|
298
|
this.channelOrRegionalName = value.map(item => item.text).join('/')
|
|
|
299
|
+ // 存储完整的三级路径数据
|
|
|
300
|
+ this.selectedLocationPath = value
|
|
284
|
301
|
},
|
|
285
|
302
|
openModal() {
|
|
286
|
303
|
if (this.disabled || (this.selectedMember.length === 0 && this.notkezhang)) return
|
|
|
@@ -383,12 +400,12 @@ export default {
|
|
383
|
400
|
});
|
|
384
|
401
|
return;
|
|
385
|
402
|
}
|
|
386
|
|
- debugger
|
|
|
403
|
+
|
|
387
|
404
|
const checkUserStatusALL = this.selectedUser.map(item => {
|
|
388
|
405
|
return this.checkUserStatus(item)
|
|
389
|
406
|
})
|
|
390
|
407
|
uni.showLoading({ title: '正在查询人员状态...' });
|
|
391
|
|
- debugger
|
|
|
408
|
+
|
|
392
|
409
|
Promise.all(checkUserStatusALL).then((res) => {
|
|
393
|
410
|
const checkResult = res.filter(Boolean)
|
|
394
|
411
|
if (checkResult.length) {
|
|
|
@@ -468,7 +485,7 @@ export default {
|
|
468
|
485
|
}];
|
|
469
|
486
|
}
|
|
470
|
487
|
console.log(postRecordList, "postRecordList")
|
|
471
|
|
- debugger
|
|
|
488
|
+
|
|
472
|
489
|
|
|
473
|
490
|
return addPostRecord(postRecordList)
|
|
474
|
491
|
});
|