Browse Source

一键重签按钮

duy 1 tuần trước cách đây
mục cha
commit
898c2595cc
1 tập tin đã thay đổi với 148 bổ sung5 xóa
  1. 148 5
      src/views/systemService/test.vue

+ 148 - 5
src/views/systemService/test.vue

@@ -66,28 +66,76 @@
                 </div>
                 <div style="height: 70px" class="mb-2 flex justify-around">
                     <hc-card>
-                        <div style="line-height: 26px;">
+                        <div v-if="electronicSignData?.totalCount === 0" style="line-height: 26px;">
                             <div>
                                 <div class="text-16px font-800">一键CA</div>
                                 <div>暂无任务...</div>
                             </div>
                         </div>
+                        <div v-else style="line-height: 26px;">
+                            <div>
+                                <div class="text-16px font-800">一键CA   </div>
+                                <div class="flex">
+                                    <el-progress
+                                        :text-inside="true"
+                                        :stroke-width="20"
+                                        :percentage="electronicSignData?.pace"
+                                        status="success"
+                                        size="small"
+                                        style="width: 80%;"
+                                    />
+                                    <span class="ml-1">{{ `${electronicSignData?.finishCount}/${electronicSignData?.totalCount}` }}</span>
+                                </div>
+                            </div>
+                        </div>
                     </hc-card>
                     <hc-card class="ml-2">
-                        <div style="line-height: 26px;">
+                        <div v-if="reSignData?.totalCount === 0" style="line-height: 26px;">
                             <div>
                                 <div class="text-16px font-800">re-sign</div>
                                 <div>暂无任务...</div>
                             </div>
                         </div>
+                        <div v-else style="line-height: 26px;">
+                            <div>
+                                <div class="text-16px font-800">re-sign    </div>
+                                <div class="flex">
+                                    <el-progress
+                                        :text-inside="true"
+                                        :stroke-width="20"
+                                        :percentage="reSignData?.pace"
+                                        status="success"
+                                        size="small"
+                                        style="width: 80%;"
+                                    />
+                                    <span class="ml-1">{{ `${reSignData?.finishCount}/${reSignData?.totalCount}` }}</span>
+                                </div>
+                            </div>
+                        </div>
                     </hc-card>
                     <hc-card class="ml-2">
-                        <div style="line-height: 26px;">
+                        <div v-if="saveAgainData?.totalCount === 0" style="line-height: 26px;">
                             <div>
                                 <div class="text-16px font-800">save-sign</div>
                                 <div>暂无任务...</div>
                             </div>
                         </div>
+                        <div v-else style="line-height: 26px;">
+                            <div>
+                                <div class="text-16px font-800">save-sign    </div>
+                                <div class="flex">
+                                    <el-progress
+                                        :text-inside="true"
+                                        :stroke-width="20"
+                                        :percentage="saveAgainData?.pace"
+                                        status="success"
+                                        size="small"
+                                        style="width: 80%;"
+                                    />
+                                    <span class="ml-1">{{ `${saveAgainData?.finishCount}/${saveAgainData?.totalCount}` }}</span>
+                                </div>
+                            </div>
+                        </div>
                     </hc-card>
                     <hc-card class="ml-2">
                         <div v-if="progressObj.totalCount === 0" style="line-height: 26px;">
@@ -147,7 +195,19 @@
                             <HcIcon name="survey" />
                             <span>电签检测</span>
                         </el-button>
-                       
+                      
+                        <HcTooltip keys="data-query-once-agin">
+                            <el-button 
+                                v-if="userInfo.dept_id === '1536982621165592577'"
+                                :disabled="tableCheckedKeys.length <= 0 || userInfo.dept_id !== '1536982621165592577'" 
+                                :loading="signLoading" 
+                                hc-btn type="warning" 
+                                @click="resignClick1"
+                            >  
+                                <HcIcon name="repeat" />
+                                一键重签
+                            </el-button>
+                        </HcTooltip>
                         <!-- <el-button
                             style="color: white;"
                             :disabled="tableCheckedKeys.length <= 0" hc-btn
@@ -483,6 +543,7 @@ const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 
 //渲染完成
 onMounted(() => {
+    getOtherPaceInfoData()
     getCheckPdfPaceInfoData()
     getFileUser()
     getReportNumber()
@@ -1139,6 +1200,7 @@ const signClick = async () => {
     if (!error && code === 200) {
         window.$message?.success(msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。')
         getTableData().then()
+         getOtherPaceInfoData()
     } else {
         window.$message?.error(msg ?? '操作失败')
     }
@@ -1170,6 +1232,7 @@ const objArr = rows.map(row => ({
     if (!error && code === 200) {
         window.$message?.success(msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。')
         getTableData().then()
+        getOtherPaceInfoData()
     } else {
         window.$message?.error(msg ?? '操作失败')
     }
@@ -1434,7 +1497,16 @@ const resignClick1 = ()=>{
         window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
         return
     }
-
+      //获取任务id
+    const taskIds = arrToKey(rows, 'taskId')
+    const idsArr = taskIds.split(',')
+    let isCan = idsArr.some(ele=>!ele)
+  
+    if (isCan) {
+        window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
+        return
+    }
+    
     
 
     resignModal1.value = true
@@ -1477,6 +1549,7 @@ const signClick1 = async () => {
         window.$message?.success(msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。')
            cancelresign1()
         getTableData().then()
+         getOtherPaceInfoData()
     } 
 
 }
@@ -1582,6 +1655,76 @@ const getCheckPdfPaceInfoData = async () => {
         }
         }
  
+}
+const saveAgainData = ref(
+    {
+        totalCount:0,
+        pace:0,
+        finishCount:0,
+    },
+)
+const reSignData = ref(
+    {
+        totalCount:0,
+        pace:0,
+        finishCount:0,
+    },
+)
+const electronicSignData = ref(
+    {
+        totalCount:0,
+        pace:0,
+        finishCount:0,
+    },
+)
+const getOtherPaceInfoData = async () => {
+           const { error, code, data, msg } = await queryApi.getTaskProgress({
+           
+            contractId: contractId.value,
+          
+            projectId:projectId.value,
+        })
+        //处理数据
+      
+        if (!error && code === 200) {
+           console.log(data, 'data')
+           const resData = getObjValue(data)
+           saveAgainData.value = resData['save-again'] || {
+            totalCount:0,
+                pace:0,
+                finishCount:0,
+           }
+           reSignData.value = resData['re-sign'] || {
+            totalCount:0,
+                pace:0,
+                finishCount:0,
+           }
+           electronicSignData.value = resData['electronic-sign'] || {
+            totalCount:0,
+                pace:0,
+                finishCount:0,
+           }
+       
+            
+        } else {
+            saveAgainData.value = {
+                totalCount:0,
+                pace:0,
+                finishCount:0,
+            }
+            reSignData.value = {
+                totalCount:0,
+                pace:0,
+                finishCount:0,
+            }
+            electronicSignData.value = {
+                totalCount:0,
+                pace:0,
+                finishCount:0,
+            }
+      
+        }
+ 
 }
 </script>