maochaoying 2 years ago
parent
commit
13616b332d
  1. 18
      src/components/Task.vue
  2. 50
      src/pages/index.vue

18
src/components/Task.vue

@ -233,7 +233,7 @@ export default {
} else if (row.status == 2) {
if (this.role == 'ROLE_ADMIN') {
return (
<div class="process_table_btn disable_table_btn">
<div class="process_table_btn continue_table_btn">
任务暂停
</div>
)
@ -348,14 +348,20 @@ export default {
<t-button
variant="text"
theme="primary"
disabled={row.canUpload}
disabled={row.canUpload || row.status != 0}
onClick={() => this.showPathDialog(row.id)}
>
自定义路径规划
</t-button>
<t-button
variant="text"
theme="primary"
theme={
row.canUpload
? 'primary'
: row.hasError
? 'danger'
: 'success'
}
disabled={row.canUpload}
onClick={() =>
this.viewDetail(
@ -617,7 +623,7 @@ export default {
<style lang="scss">
.task_component {
height: 100vh;
overflow: hidden;
overflow: scroll;
}
.process_table_btn {
width: 93.18px;
@ -711,4 +717,8 @@ export default {
align-items: center;
justify-content: center;
}
::-webkit-scrollbar {
width: 0; /*隐藏滚动条空间*/
background-color: transparent; /*隐藏背景*/
}
</style>

50
src/pages/index.vue

@ -201,6 +201,8 @@
:class="
taskStore.currentTaskId == null || checkStore.manualCheck
? 'auto_btn cant_btn'
: taskStore.checkStatus
? 'auto_btn stop_btn'
: 'auto_btn'
"
@click="startAutoCheck"
@ -308,7 +310,14 @@
</p>
<t-progress theme="plump" :percentage="detailProcess" />
</div>
<div class="history_btn" @click="catCurrentTaskDetail">
<div
:class="
taskStore.currentTaskId == null
? 'history_btn cant_history'
: 'history_btn'
"
@click="catCurrentTaskDetail"
>
<p class="first">{{ imageStore.nuclearCoreName }}</p>
<p class="second">当前历史记录</p>
</div>
@ -498,13 +507,18 @@ const preBtn = async () => {
}
const checkNumber = checkStore.checkNumber
const currentTaskId = taskStore.currentTaskId
const res = await getNextCoordApi(checkNumber, currentTaskId, '0')
if (res?.code == 200) {
if (!res?.data?.result) {
MessagePlugin('error', { content: '已到达检测边缘' })
return
if (checkNumber) {
const res = await getNextCoordApi(checkNumber, currentTaskId, '0')
if (res?.code == 200) {
if (!res?.data?.result) {
MessagePlugin('error', { content: '已到达检测边缘' })
return
}
checkStore.updateCheckNumber(res?.data?.result)
}
checkStore.updateCheckNumber(res?.data?.result)
} else {
//
MessagePlugin('error', { content: '请保证当前正在核查的坐标不为空' })
}
}
@ -514,13 +528,17 @@ const nextBtn = async () => {
}
const checkNumber = checkStore.checkNumber
const currentTaskId = taskStore.currentTaskId
const res = await getNextCoordApi(checkNumber, currentTaskId, '1')
if (res?.code == 200) {
if (!res?.data?.result) {
MessagePlugin('error', { content: '已到达检测边缘' })
return
if (checkNumber) {
const res = await getNextCoordApi(checkNumber, currentTaskId, '1')
if (res?.code == 200) {
if (!res?.data?.result) {
MessagePlugin('error', { content: '已到达检测边缘' })
return
}
checkStore.updateCheckNumber(res?.data?.result)
}
checkStore.updateCheckNumber(res?.data?.result)
} else {
MessagePlugin('error', { content: '请保证当前正在核查的坐标不为空' })
}
}
@ -792,6 +810,9 @@ initWebSocket()
border-radius: 6px;
}
}
.stop_btn {
background: #0743fc;
}
.cant_btn {
background: #e8e8e8;
.icon_box {
@ -896,6 +917,9 @@ initWebSocket()
margin-top: 6px;
}
}
.cant_history {
background: #ebebeb;
}
}
.bottom_detail_card {
width: 100%;

Loading…
Cancel
Save