From aff4ce9ab81be8709efe4ebf1bc0383872aea205 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期六, 07 十月 2023 17:04:56 +0800
Subject: [PATCH] 对接接口

---
 src/views/notCoalMine/nCertificateList/index.vue |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/views/notCoalMine/nCertificateList/index.vue b/src/views/notCoalMine/nCertificateList/index.vue
index 471239b..41e30fd 100644
--- a/src/views/notCoalMine/nCertificateList/index.vue
+++ b/src/views/notCoalMine/nCertificateList/index.vue
@@ -30,7 +30,7 @@
           plain
           icon="el-icon-refresh"
           size="mini"
-          @click="resetQuery"
+          @click="getAsyncData"
           v-hasPermi="['system:experts:add']"
         >同步数据</el-button>
       </el-col>
@@ -85,7 +85,7 @@
 </template>
 
 <script>
-import { getCertificatePage } from "@/api/notCoalMine/certifiate";
+import {getCertificatePage, getCertificateSync} from "@/api/notCoalMine/certifiate";
 import certificateDialog from "@/views/notCoalMine/nCertificateList/components/certificateDialog";
 export default {
   name: "nCertificateManage",
@@ -110,6 +110,30 @@
     this.getPage()
   },
   methods: {
+    async getAsyncData(){
+      const t = this
+      t.loading = true
+      if(t.queryParams.idcardNum !== ''){
+        t.queryParams.idcardTypeCode = '01'
+        const {pageNum,pageSize,...data} = t.queryParams
+        const res = await getCertificateSync(data)
+        if(res.code == 200){
+          await t.getPage()
+        }else{
+          t.$message({
+            message: res.msg,
+            type: 'warning'
+          })
+        }
+      }else{
+        t.$message({
+          message: '请输入身份证号',
+          type: 'warning'
+        })
+      }
+      t.loading = false
+    },
+
     async getPage(){
       const t = this
       t.loading = true

--
Gitblit v1.9.2