Prechádzať zdrojové kódy

feat: 统一提示弹窗

cuiyalong 10 mesiacov pred
rodič
commit
b781f7dc07

+ 31 - 9
frontend/src/views/CodeList.vue

@@ -7,7 +7,7 @@
                 <el-space class="action-bar-item-container action-bar-action-left">
                     <el-button-group class="ml-4">
                         <el-button type="primary" :icon="Refresh" @click="resetFilterAndRefreshTableList">刷新</el-button>
-                        <el-button type="primary" :icon="Box" @click="userClaimCodes" v-if="showRenLingButton">认领</el-button>
+                        <el-button type="primary" :icon="Box" @click="clickClaimCodes" v-if="showRenLingButton">认领</el-button>
                     </el-button-group>
                 </el-space>
                 <el-space class="action-bar-item-container action-bar-action-right">
@@ -367,6 +367,18 @@ const userClaimCodes = async () => {
         })
     }
 }
+const clickClaimCodes = () => {
+    ElMessageBox.confirm('确定要认领一批爬虫?', '提示',
+        {
+            customClass: 'j-confirm-message-box',
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            showCancelButton: false,
+        }
+    ).then(() => {
+        userClaimCodes()
+    })
+}
 
 getTableList()
 
@@ -610,14 +622,24 @@ const tableEvents = {
     },
     handleRollback(_, row) {
         onlyClickHighlight(row, '_action_clicked_rollback')
-        ElMessageBox.alert('确定退回?', '提示', {
-            customClass: 'j-confirm-message-box',
-            confirmButtonText: '确定',
-            callback: (action) => {
-                if (action === 'confirm') {
-                    this.confirmRollback(row)
-                }
-            },
+        // ElMessageBox.alert('确定退回?', '提示', {
+        //     customClass: 'j-confirm-message-box',
+        //     confirmButtonText: '确定',
+        //     callback: (action) => {
+        //         if (action === 'confirm') {
+        //             
+        //         }
+        //     },
+        // })
+        ElMessageBox.confirm('确定退回?', '提示',
+            {
+                customClass: 'j-confirm-message-box',
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                showCancelButton: false,
+            }
+        ).then(() => {
+            this.confirmRollback(row)
         })
     },
     confirmRollback(row) {

+ 9 - 6
frontend/src/views/ReviewList.vue

@@ -630,17 +630,18 @@ const tableEvents = {
     reviewerSubmit(_, row) {
         console.log('审核提交', row)
         onlyClickHighlight(row, '_action_clicked_submit')
-        ElMessageBox.confirm('确认提交?', '提示',
+        ElMessageBox.confirm('确认通过?', '提示',
             {
+                customClass: 'j-confirm-message-box',
                 confirmButtonText: '确认',
                 cancelButtonText: '取消',
-                type: 'warning',
+                showCancelButton: false,
             }
         ).then(() => {
             this.updateCodeStateAction(row, {
                 state: 3,
-                successTip: '提交成功',
-                errorTip: '提交失败',
+                successTip: '通过成功',
+                errorTip: '通过失败',
             })
         })
     },
@@ -650,9 +651,10 @@ const tableEvents = {
         onlyClickHighlight(row, '_action_clicked_submit')
         ElMessageBox.confirm('确认上线?', '提示',
             {
+                customClass: 'j-confirm-message-box',
                 confirmButtonText: '确认',
                 cancelButtonText: '取消',
-                type: 'warning',
+                showCancelButton: false,
             }
         ).then(() => {
             this.updateCodeStateAction(row, {
@@ -668,9 +670,10 @@ const tableEvents = {
         onlyClickHighlight(row, '_action_clicked_rollback')
         ElMessageBox.confirm('确认退回?', '提示',
             {
+                customClass: 'j-confirm-message-box',
                 confirmButtonText: '确认',
                 cancelButtonText: '取消',
-                type: 'warning',
+                showCancelButton: false,
             }
         ).then(() => {
             this.updateCodeStateAction(row, {