From 6a2b94622cdb716cd93c5f5a92b0da7650f9c749 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Tue, 1 Aug 2023 15:19:08 +0800 Subject: [PATCH] finish --- src/components/DetailTable.vue | 25 ++++++- src/components/Nuclear.vue | 28 ++++---- src/components/Task.vue | 145 +++++++++++++++++++++-------------------- src/pages/index.vue | 2 +- 4 files changed, 115 insertions(+), 85 deletions(-) diff --git a/src/components/DetailTable.vue b/src/components/DetailTable.vue index ec1572c..7f5e36e 100644 --- a/src/components/DetailTable.vue +++ b/src/components/DetailTable.vue @@ -42,7 +42,14 @@ const columns = ref([ width: 120, cell: (h, { row }) => row.firstSign && row.secondSign ? ( -
+

{row.firstSign?.substr(-4)}

{row.secondSign?.substr(-4)}

@@ -56,7 +63,13 @@ const columns = ref([ cell: (h, { row }) => { if (row.result == 1) { return ( -
+

{row.resultSerial}

+

{row.resultSerial}

- 新增核电站 +
+ 新增核电站 +
- 新增堆芯 +
+ 新增堆芯 +
{ if (row.status == 0) { - if (this.role == 'ROLE_ADMIN') { - return ( -
- - - - - - 未开始 -
- ) - } return ( -
- this.startTask(row, row.nuclearCoreName, 1, row.canUpload) - } - > - 开始任务 +
+ + + + + + 未开始
) } else if (row.status == 1) { @@ -264,22 +248,14 @@ export default {
) } else if (row.status == 2) { - if (this.role == 'ROLE_ADMIN') { - return ( -
- 任务暂停 -
- ) - } else { - return ( -
this.startTask(row, row.nuclearCoreName)} - > - 继续任务 -
- ) - } + return ( +
+ 任务暂停 +
+ ) } else { return (
@@ -412,24 +388,55 @@ export default { ) } else { return ( -
- this.viewDetail( - row.id, - row.nuclearCoreName, - 1, - row.nuclearStationName, - row.operatorName, - row.canUpload, - ) - } - class={ - row.canUpload - ? 'start_table_btn disable_table_btn' - : 'start_table_btn' - } - > - 查看详情 +
+ {row.status == 2 && this.role == 'ROLE_USER' ? ( +
this.startTask(row, row.nuclearCoreName)} + > + 继续任务 +
+ ) : null} + {row.status == 0 && this.role == 'ROLE_USER' ? ( +
+ this.startTask( + row, + row.nuclearCoreName, + 1, + row.canUpload, + ) + } + > + 开始任务 +
+ ) : null} +
+ this.viewDetail( + row.id, + row.nuclearCoreName, + 1, + row.nuclearStationName, + row.operatorName, + row.canUpload, + ) + } + class={ + row.canUpload + ? 'start_table_btn disable_table_btn' + : 'start_table_btn' + } + > + 查看详情 +
) } diff --git a/src/pages/index.vue b/src/pages/index.vue index aa4d12d..2a555c0 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -1015,7 +1015,7 @@ initWebSocket() align-items: center; justify-content: space-between; .progress_btn { - padding: 25px 24px 18px 0; + padding: 25px 24px 18px 24px; box-sizing: border-box; border-radius: 6px; background: #ffffff;