diff --git a/src/components/Image.vue b/src/components/Image.vue index c29ffaa..f5c79b6 100644 --- a/src/components/Image.vue +++ b/src/components/Image.vue @@ -62,7 +62,24 @@
-
+ + + + +
@@ -89,6 +106,9 @@ const getIdentifyClass = () => { border-radius: 6px; overflow: hidden; background: #ebebeb; + display: flex; + align-items: center; + justify-content: center; } .image_container { width: 100%; diff --git a/src/components/Task.vue b/src/components/Task.vue index 6170328..28941d7 100644 --- a/src/components/Task.vue +++ b/src/components/Task.vue @@ -215,7 +215,11 @@ export default { ) } else if (row.status == 2) { if (this.role == 'ROLE_ADMIN') { - return
任务暂停
+ return ( +
+ 任务暂停 +
+ ) } else { return (
-

核查进度

- +

核查进度(0/121)

+

3号核反应堆

@@ -400,7 +400,9 @@ const onChange = async val => { // 终止自动核查任务 if (val) { taskStore.updateCheckStatus(false) - const res = await breakOffAutoCheckApi(taskStore.currentTaskId) + if (taskStore.currentTaskId) { + const res = await breakOffAutoCheckApi(taskStore.currentTaskId) + } } checkStore.handleChangeCheck(val) } @@ -446,18 +448,27 @@ const getInitData = async () => { const res = await getProcessTaskInfoApi() if (res?.code == 200) { const data = res?.data - taskStore.updateTaskStatus(data.status) - if (data.status == 1) { - taskStore.updateCheckStatus(true) + if (data) { + taskStore.updateTaskStatus(data.status) + if (data.status == 1) { + taskStore.updateCheckStatus(true) + } else { + taskStore.updateCheckStatus(false) + } + taskStore.updateCurrentCoord(data.currentCoord) + imageStore.updateNuclearCoreName(data.nuclearCoreName) + imageStore.updateShowImage(false) + taskStore.getExcelList(data.id) + taskStore.updateCurrentTaskId(data.id) + taskStore.updateCurrentDetailTaskId(null) } else { + taskStore.updateCurrentCoord(null) + // taskStore.updateCurrentTaskId(null) + taskStore.updateExcelData([]) + imageStore.updateShowImage(false) taskStore.updateCheckStatus(false) + taskStore.updateTaskStatus(0) } - taskStore.updateCurrentCoord(data.currentCoord) - imageStore.updateNuclearCoreName(data.nuclearCoreName) - imageStore.updateShowImage(false) - taskStore.getExcelList(data.id) - taskStore.updateCurrentTaskId(data.id) - taskStore.updateCurrentDetailTaskId(null) } } @@ -473,10 +484,10 @@ const logout = () => { } const getSocketdata = res => { - console.log(res) if (res == 'update') { // 更新一系列数据 taskStore.getExcelList(taskStore.currentTaskId) + getInitData() } }