Browse Source

继续任务按钮状态

master
maochaoying 2 years ago
parent
commit
99817d25c4
  1. 22
      src/components/Image.vue
  2. 6
      src/components/Task.vue
  3. 37
      src/pages/index.vue

22
src/components/Image.vue

@ -62,7 +62,24 @@
</div>
</div>
<div class="no_image" v-else>
<div class="box"></div>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="85.90400695800781"
height="76.7254638671875"
viewBox="0 0 85.90400695800781 76.7254638671875"
>
<g>
<path
d="M6.91322,0L78.9908,0C82.8088,0,85.904,3.2252,85.904,7.20367L85.904,69.6923C85.8151,73.6041,82.7458,76.7266,78.9908,76.7255L6.91322,76.7255C3.15816,76.7266,0.0888908,73.6041,0,69.6923L0,7.20367C0,3.22519,3.09515,0,6.91322,0ZM63.5689,38.8742C64.784,37.9363,66.4446,37.9363,67.6596,38.8742L78.9908,43.7761L78.9908,7.20367L6.91322,7.20367L6.91322,38.107L22.3351,21.7815C23.6974,20.2285,26.0451,20.2285,27.4074,21.7815L48.6381,49.3601L63.5689,38.8742ZM51.0912,24.6798C51.0912,19.1005,55.4317,14.5776,60.7861,14.5776C66.1404,14.5777,70.4809,19.1005,70.481,24.6798C70.481,30.2591,66.1404,34.7821,60.7861,34.7821C55.4317,34.7821,51.0912,30.2591,51.0912,24.6798ZM58.0045,24.4667C58.0045,26.0675,59.2498,27.3652,60.7861,27.3652L60.7861,27.5357C62.3886,27.5387,63.6621,26.1337,63.5678,24.4667C63.5678,22.8658,62.3224,21.5681,60.7862,21.5681C59.2499,21.5681,58.0045,22.8658,58.0045,24.4667Z"
fill-rule="evenodd"
fill="#5E5C5C"
fill-opacity="1"
/>
</g>
</svg>
</div>
</template>
@ -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%;

6
src/components/Task.vue

@ -215,7 +215,11 @@ export default {
)
} else if (row.status == 2) {
if (this.role == 'ROLE_ADMIN') {
return <div class="process_table_btn">任务暂停</div>
return (
<div class="process_table_btn disable_table_btn">
任务暂停
</div>
)
} else {
return (
<div

37
src/pages/index.vue

@ -303,8 +303,8 @@
</div>
</div>
<div class="progress_btn">
<p class="title">核查进度</p>
<t-progress theme="plump" :percentage="30" />
<p class="title">核查进度0/121</p>
<t-progress theme="plump" :percentage="0" />
</div>
<div class="history_btn">
<p class="first">3号核反应堆</p>
@ -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()
}
}

Loading…
Cancel
Save