|
@ -40,7 +40,7 @@ |
|
|
:closeBtn="true" |
|
|
:closeBtn="true" |
|
|
> |
|
|
> |
|
|
<div class="path_wrap"> |
|
|
<div class="path_wrap"> |
|
|
<PathPlan /> |
|
|
|
|
|
|
|
|
<PathPlan :excelData="excelData" /> |
|
|
</div> |
|
|
</div> |
|
|
</t-drawer> |
|
|
</t-drawer> |
|
|
<t-dialog |
|
|
<t-dialog |
|
@ -120,7 +120,9 @@ import { |
|
|
delTaskApi, |
|
|
delTaskApi, |
|
|
updateOperByTaskIdApi, |
|
|
updateOperByTaskIdApi, |
|
|
} from '@/api/task' |
|
|
} from '@/api/task' |
|
|
|
|
|
import { getNuclearExcelApi } from '@/api' |
|
|
import PathPlan from 'cpns/PathPlan' |
|
|
import PathPlan from 'cpns/PathPlan' |
|
|
|
|
|
import { checkCanDiyPathApi, pathPlanApi } from '@/api/path' |
|
|
import { useAccountStore, useTaskStore, useImageStore } from '@/store' |
|
|
import { useAccountStore, useTaskStore, useImageStore } from '@/store' |
|
|
import { allOperatorApi } from '@/api/publish' |
|
|
import { allOperatorApi } from '@/api/publish' |
|
|
import moment from 'moment' |
|
|
import moment from 'moment' |
|
@ -131,6 +133,7 @@ const imageStore = useImageStore() |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
excelData: [], |
|
|
pathVisible: false, |
|
|
pathVisible: false, |
|
|
userList: [], |
|
|
userList: [], |
|
|
formData: { operatorId: '' }, |
|
|
formData: { operatorId: '' }, |
|
@ -346,6 +349,7 @@ export default { |
|
|
<t-button |
|
|
<t-button |
|
|
variant="text" |
|
|
variant="text" |
|
|
theme="primary" |
|
|
theme="primary" |
|
|
|
|
|
disabled={row.canUpload} |
|
|
onClick={() => this.showPathDialog(row.id)} |
|
|
onClick={() => this.showPathDialog(row.id)} |
|
|
> |
|
|
> |
|
|
自定义路径规划 |
|
|
自定义路径规划 |
|
@ -415,18 +419,37 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
saveDiyPath() { |
|
|
|
|
|
console.log('diy') |
|
|
|
|
|
|
|
|
async getExcelList(taskId) { |
|
|
|
|
|
const res = await getNuclearExcelApi(taskId) |
|
|
|
|
|
if (res?.code == 200) { |
|
|
|
|
|
// 根据data的serialNumber算出序列号 |
|
|
|
|
|
const list = res.data.list |
|
|
|
|
|
list.map(item => { |
|
|
|
|
|
const arr = item.serialNumber.split('-') |
|
|
|
|
|
item.num = parseInt(arr[0]) * 14 + parseInt(arr[1]) + 1 |
|
|
|
|
|
}) |
|
|
|
|
|
this.excelData = list |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
showPathDialog() { |
|
|
|
|
|
|
|
|
async saveDiyPath() { |
|
|
|
|
|
const res = await pathPlanApi() |
|
|
|
|
|
}, |
|
|
|
|
|
showPathDialog(taskId) { |
|
|
|
|
|
this.currentTaskId = taskId |
|
|
|
|
|
this.getExcelList(taskId) |
|
|
const confirmDia = this.$dialog.confirm({ |
|
|
const confirmDia = this.$dialog.confirm({ |
|
|
header: '提示', |
|
|
header: '提示', |
|
|
body: '已开始的任务无法更改路径。复杂路径规划后,将清除创建任务时所选择的规则路径,确认要进行自定义规划吗?', |
|
|
body: '已开始的任务无法更改路径。复杂路径规划后,将清除创建任务时所选择的规则路径,确认要进行自定义规划吗?', |
|
|
confirmBtn: '确定', |
|
|
confirmBtn: '确定', |
|
|
cancelBtn: '取消', |
|
|
cancelBtn: '取消', |
|
|
onConfirm: ({ e }) => { |
|
|
|
|
|
// 请求成功后,销毁弹框 |
|
|
|
|
|
this.pathVisible = true |
|
|
|
|
|
|
|
|
onConfirm: async ({ e }) => { |
|
|
|
|
|
const res = await checkCanDiyPathApi(taskId) |
|
|
|
|
|
if (res?.code == 200) { |
|
|
|
|
|
// 请求成功后,销毁弹框 |
|
|
|
|
|
this.pathVisible = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(res?.msg) |
|
|
|
|
|
} |
|
|
confirmDia.destroy() |
|
|
confirmDia.destroy() |
|
|
}, |
|
|
}, |
|
|
onClose: ({ e, trigger }) => { |
|
|
onClose: ({ e, trigger }) => { |
|
|