From cabf58ac1a2356a9f0296d957191fefde333f58b Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期五, 13 十月 2023 09:38:40 +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