|
|
|
@ -109,7 +109,7 @@
@@ -109,7 +109,7 @@
|
|
|
|
|
import { getCourierUserList } from '/@/api/platform/system/controller/user'; |
|
|
|
|
import { listOrg } from '/@/api/platform/common/controller/org'; |
|
|
|
|
import { useUserStore } from '/@/store/modules/user'; |
|
|
|
|
import { split, divide, subtract, merge, isEmpty, cloneDeep, add } from 'lodash-es'; |
|
|
|
|
import {split, divide, subtract, merge, isEmpty, cloneDeep, add, omit} from 'lodash-es'; |
|
|
|
|
import componentSetting from '/@/settings/componentSetting'; |
|
|
|
|
import { BasicUpload } from '/@/components/Upload'; |
|
|
|
|
import { commonUpload } from '/@/api/platform/core/controller/upload'; |
|
|
|
@ -526,17 +526,28 @@
@@ -526,17 +526,28 @@
|
|
|
|
|
key: buildUUID() |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
const mapTask = mapState.mapData.mapTask |
|
|
|
|
.filter(item => item.taskType == sendOrderTaskTypeOldValue) |
|
|
|
|
.find(item => item.sort == 1); |
|
|
|
|
const taskOrdinaryData = mapState.mapData.mapTask.filter(item => !~~item.taskType); |
|
|
|
|
const taskPresetData = mapState.mapData.mapTask.filter(item => ~~item.taskType); |
|
|
|
|
const index = ~~sendOrderTaskTypeOldValue ? taskPresetData.findIndex(item => item.sort == 1) : taskOrdinaryData.findIndex(item => item.sort == 1); |
|
|
|
|
const mapTask = ~~sendOrderTaskTypeOldValue ? taskPresetData[index] : taskOrdinaryData[index]; |
|
|
|
|
mapTask && Object.assign(mapTask, { |
|
|
|
|
hospitalId: sendOrderIdValue, |
|
|
|
|
taskType: sendOrderTaskTypeValue |
|
|
|
|
}, ~~sendOrderTaskTypeValue != ~~sendOrderTaskTypeOldValue && { |
|
|
|
|
orgId: '', |
|
|
|
|
orgName: ~~sendOrderTaskTypeValue ? '等待收样员设置!' : '', |
|
|
|
|
fileId: [] |
|
|
|
|
}); |
|
|
|
|
if (~~sendOrderTaskTypeValue != ~~sendOrderTaskTypeOldValue && mapTask) { |
|
|
|
|
// 普通任务与交接任务互换清除上级医院 |
|
|
|
|
Object.assign(mapTask, { |
|
|
|
|
orgId: '', |
|
|
|
|
orgName: ~~sendOrderTaskTypeValue ? '等待收样员设置!' : '', |
|
|
|
|
fileId: [] |
|
|
|
|
}); |
|
|
|
|
// 重新在头部添加任务并且重新排序 |
|
|
|
|
~~sendOrderTaskTypeOldValue ? taskPresetData.splice(index, 1) : taskOrdinaryData.splice(index, 1); |
|
|
|
|
~~sendOrderTaskTypeValue ? taskPresetData.unshift(mapTask) : taskOrdinaryData.unshift(mapTask); |
|
|
|
|
taskOrdinaryData.forEach((item, index)=> item.sort = add(index, 1)); |
|
|
|
|
taskPresetData.forEach((item, index)=> item.sort = add(index, 1)); |
|
|
|
|
mapState.mapData.mapTask = [...taskOrdinaryData, ...taskPresetData]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
handleMapPointGenerate(); |
|
|
|
|
}); |
|
|
|
|