|
@ -128,6 +128,18 @@ |
|
|
<Publish :handleCancel="handleCancel" :getTaskList="getTaskList" /> |
|
|
<Publish :handleCancel="handleCancel" :getTaskList="getTaskList" /> |
|
|
</template> |
|
|
</template> |
|
|
</t-dialog> |
|
|
</t-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<t-dialog |
|
|
|
|
|
theme="danger" |
|
|
|
|
|
header="删除" |
|
|
|
|
|
:visible="stopTaskVisible" |
|
|
|
|
|
:onClose="() => (stopTaskVisible = false)" |
|
|
|
|
|
:onConfirm="handleStopTask" |
|
|
|
|
|
> |
|
|
|
|
|
<p style="font-size: 16px; margin: 20px 0"> |
|
|
|
|
|
结束任务后将不能再继续对该任务进行核查! |
|
|
|
|
|
</p> |
|
|
|
|
|
</t-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -135,6 +147,7 @@ |
|
|
import { |
|
|
import { |
|
|
taskListApi, |
|
|
taskListApi, |
|
|
delExcelByTaskIdApi, |
|
|
delExcelByTaskIdApi, |
|
|
|
|
|
stopTaskApi, |
|
|
delTaskApi, |
|
|
delTaskApi, |
|
|
updateOperByTaskIdApi, |
|
|
updateOperByTaskIdApi, |
|
|
} from '@/api/task' |
|
|
} from '@/api/task' |
|
@ -159,6 +172,8 @@ const cameraStore = useCameraStore() |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
stopTaskInfo: {}, |
|
|
|
|
|
stopTaskVisible: false, |
|
|
publishVisible: false, |
|
|
publishVisible: false, |
|
|
excelData: [], |
|
|
excelData: [], |
|
|
pathVisible: false, |
|
|
pathVisible: false, |
|
@ -420,6 +435,22 @@ export default { |
|
|
开始任务 |
|
|
开始任务 |
|
|
</div> |
|
|
</div> |
|
|
) : null} |
|
|
) : null} |
|
|
|
|
|
<div> |
|
|
|
|
|
{[0, 1, 2].includes(row.status) && |
|
|
|
|
|
this.role == 'ROLE_USER' ? ( |
|
|
|
|
|
<div |
|
|
|
|
|
style={{ marginRight: '10px' }} |
|
|
|
|
|
onClick={() => this.changeTaskStatusTo3(row)} |
|
|
|
|
|
class={ |
|
|
|
|
|
row.canUpload |
|
|
|
|
|
? 'start_table_btn disable_table_btn' |
|
|
|
|
|
: 'start_table_btn' |
|
|
|
|
|
} |
|
|
|
|
|
> |
|
|
|
|
|
结束任务 |
|
|
|
|
|
</div> |
|
|
|
|
|
) : null} |
|
|
|
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
onClick={() => |
|
|
onClick={() => |
|
|
this.viewDetail( |
|
|
this.viewDetail( |
|
@ -459,6 +490,19 @@ export default { |
|
|
Publish, |
|
|
Publish, |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
|
|
|
testArrLength() { |
|
|
|
|
|
const testArr = taskStore.excelData.filter( |
|
|
|
|
|
item => item.firstSign && item.secondSign, |
|
|
|
|
|
) |
|
|
|
|
|
return testArr.length |
|
|
|
|
|
}, |
|
|
|
|
|
hasTestedLength() { |
|
|
|
|
|
const testArr = taskStore.excelData.filter( |
|
|
|
|
|
item => item.firstSign && item.secondSign, |
|
|
|
|
|
) |
|
|
|
|
|
const hasTested = testArr.filter(item => item.result != 0) |
|
|
|
|
|
return hasTested.length |
|
|
|
|
|
}, |
|
|
actionAddress() { |
|
|
actionAddress() { |
|
|
return `${import.meta.env.VITE_BASE_URL}/upload/${this.currentTaskId}` |
|
|
return `${import.meta.env.VITE_BASE_URL}/upload/${this.currentTaskId}` |
|
|
}, |
|
|
}, |
|
@ -474,6 +518,17 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
async handleStopTask() { |
|
|
|
|
|
const res = await stopTaskApi({ ...this.stopTaskInfo, status: 3 }) |
|
|
|
|
|
if (res?.code == 200) { |
|
|
|
|
|
this.getTaskList() |
|
|
|
|
|
this.stopTaskVisible = false |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
changeTaskStatusTo3(row) { |
|
|
|
|
|
this.stopTaskVisible = true |
|
|
|
|
|
this.stopTaskInfo = row |
|
|
|
|
|
}, |
|
|
handleCancel() { |
|
|
handleCancel() { |
|
|
this.publishVisible = false |
|
|
this.publishVisible = false |
|
|
}, |
|
|
}, |
|
|