Przeglądaj źródła

待审核页面下的批量审核

ymz 4 miesięcy temu
rodzic
commit
8ea00c6d48

+ 2 - 2
.env.development

@@ -1,8 +1,8 @@
 NODE_ENV = 'development'
 VUE_APP_TYPE= 'dev'
-# VUE_APP_URL = 'http://10.144.62.235:9999'
+VUE_APP_URL = 'http://10.144.62.235:9999'
 # VUE_APP_URL = 'https://mic.freerr.cn'
 # VUE_APP_URL = 'https://mic.cnbg.com.cn'
 # VUE_APP_URL = 'https://cnbg.yaoyi.net'
 # VUE_APP_URL = 'http://192.168.110.25:9999'
-VUE_APP_URL = 'https://mic-t.cnbg.com.cn'
+# VUE_APP_URL = 'https://mic-t.cnbg.com.cn'

BIN
dist.zip


+ 17 - 0
src/api/serviceManagement/servicesToBeReviewed/index.js

@@ -104,3 +104,20 @@ export function getTaskV2CheckHisApi(params) {
     params: params
   });
 }
+
+// 获取任务审核记录
+export function getPretreatmentApi(data) {
+  return request({
+    url: ' /admin/task/v2/check/pretreatment',
+    method: 'post',
+    data: data
+  });
+}
+
+export function pretreatmentClearApi(data) {
+  return request({
+    url: ' /admin/task/v2/check/pretreatment/clear',
+    method: 'post',
+    data: data
+  });
+}

+ 84 - 6
src/views/serviceManagement/servicesToBeReviewed/index.vue

@@ -186,6 +186,38 @@
         <el-button type="primary" @click="checkForm" v-loading="loading">确 定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog title="批量审核预处理结果" :visible.sync="lockedDialog" top="12vh" width="50%" :before-close="lockedDialogClose" center :show-close="false">
+      <div>
+        <div class="check-tips">
+          本次批量审核,拟处理服务 【{{ pretreatmentInfo?.total?.length }}】 个, 成功预留【{{ pretreatmentInfo?.available?.length }}】个,忽略【{{
+            pretreatmentInfo?.locked?.length
+          }}】个, 继续审核请点击“确定”,放弃请点击“取消”(有效期三分钟)。
+        </div>
+        <el-table
+          :data="pretreatmentInfo?.total"
+          border
+          style="width: 100%"
+          max-height="500"
+          :header-cell-style="{ 'text-align': 'center' }"
+          :cell-style="{ 'text-align': 'center' }"
+        >
+          <el-table-column prop="taskId" label="任务ID"> </el-table-column>
+          <el-table-column prop="status" label="预留结果">
+            <template slot-scope="scope">
+              <span :class="scope.row.status === '成功' ? 'status-success' : 'status-fail'">{{ scope.row.status }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="lockInfo" label="结果说明"> </el-table-column>
+          <el-table-column prop="expireAt" label="锁定至"> </el-table-column>
+        </el-table>
+      </div>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="lockedDialogClose">取 消</el-button>
+        <el-button type="primary" @click="lockedBtn">确 定</el-button>
+      </span>
+    </el-dialog>
   </basic-container>
 </template>
 
@@ -199,7 +231,9 @@ import {
   getTaskV2TokenApi,
   checkSingleApi,
   taskV2CheckBatchApi,
-  getPkgV2Api
+  getPkgV2Api,
+  getPretreatmentApi,
+  pretreatmentClearApi
 } from '@/api/serviceManagement/servicesToBeReviewed/index.js';
 import { tableOptin } from './index.js';
 import { getDictType } from '@/api/common';
@@ -209,6 +243,7 @@ import { mapGetters } from 'vuex';
 import TaskDetail from './components/TaskDetail.vue';
 import refuseReason from '@/components/refuseReason';
 import Config from '@/settings';
+import color from '@/mixins/color';
 
 export default {
   components: { refuseReason, TaskDetail },
@@ -263,7 +298,10 @@ export default {
       loading: false,
       currentTaskId: '',
       reviewToken: '',
-      expireTime: ''
+      expireTime: '',
+      pretreatmentInfo: {},
+      lockedInfo: [],
+      lockedDialog: false
     };
   },
   computed: {
@@ -487,9 +525,41 @@ export default {
       if (!this.checkIds.length) {
         return this.$message.error('请选择待审核数据');
       }
+      this.getPretreatment();
+
       this.singleFlag = false;
-      await this.getToken(this.checkIds);
-      this.reviewDialog = true;
+    },
+    async getPretreatment() {
+      const res = await getPretreatmentApi({ taskIds: this.checkIds });
+      if (res.data.code === 0) {
+        this.pretreatmentInfo = res.data.data;
+        this.lockedInfo = res.data.data.locked;
+        this.lockedDialog = true;
+      }
+    },
+    async lockedBtn() {
+      if (this.pretreatmentInfo.available.length) {
+        this.lockedDialog = false;
+        this.lockedInfo = [];
+        this.reviewDialog = true;
+        await this.getToken(this.checkIds);
+      } else {
+        this.$message.info('当前无可审核数据!');
+        this.lockedDialogClose();
+      }
+    },
+    async lockedDialogClose() {
+      const taskIds = this.pretreatmentInfo.available.map((item) => item.taskId);
+      if (this.pretreatmentInfo?.token?.token) {
+        const obj = {
+          taskIds: taskIds,
+          token: this.pretreatmentInfo.token.token
+        };
+        await pretreatmentClearApi(obj);
+      }
+      this.getList();
+      this.lockedDialog = false;
+      this.lockedInfo = [];
     },
     // 快捷审核
     quickAuditClick() {
@@ -542,10 +612,12 @@ export default {
         };
         res = await checkSingleApi(obj);
       } else {
+        const ids = this.pretreatmentInfo?.available.map((item) => item.taskId);
+        console.log('this.pretreatmentInfo', this.pretreatmentInfo);
         this.loading = true;
         let obj = {
-          token: this.reviewToken,
-          taskIds: this.checkIds,
+          token: this.pretreatmentInfo?.token?.token,
+          taskIds: ids,
           checkResult: this.taskForm.checkResult,
           checkMessage: this.taskForm.checkMessage,
           nodeId: nodeId
@@ -615,4 +687,10 @@ export default {
   text-align: center;
   font-weight: 600;
 }
+.status-success {
+  color: #85ce61;
+}
+.status-fail {
+  color: rgb(233 77 77);
+}
 </style>