马宇豪
2025-03-07 db905ecd14f63dba9337b4f4715584ef2d7e8c7e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="用户姓名" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入用户姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="身份证号" prop="idcardNum">
        <el-input
          v-model="queryParams.idcardNum"
          placeholder="请输入身份证号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">证书查询</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
 
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-refresh"
          size="mini"
          @click="getAsyncData"
          v-hasPermi="['system:experts:add']"
        >同步国家平台数据</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getPage"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="dataList">
      <el-table-column type="index" label="归档序号" width="55" align="center" />
      <el-table-column label="姓名" align="center" prop="name" />
      <el-table-column label="性别" align="center" prop="sex"/>
      <el-table-column label="身份证号" align="center" prop="idcardNum">
        <template #default="scope">
          {{scope.row.idcardNum | peridcardtm}}
        </template>
      </el-table-column>
<!--      <el-table-column label="电话" align="center" prop="phone"/>-->
<!--      <el-table-column label="民族" align="center" prop="phone"/>-->
<!--      <el-table-column label="最高学历" align="center" prop="degree" />-->
      <el-table-column label="资格类型" align="center" prop="personTypeName" />
      <el-table-column label="作业类别" align="center" prop="jobTypeName" />
      <el-table-column label="操作项目" align="center" prop="operItemName" />
      <el-table-column label="证书初申请" align="center" prop="firstCertDate"/>
      <el-table-column label="证书发放" align="center" prop="createTime">
        <template #default="scope">
          {{scope.row.createTime.substring(0,7)}}
        </template>
      </el-table-column>
      <el-table-column label="有效期从" align="center" prop="validBeginDate"/>
      <el-table-column label="有效期到" align="center" prop="validEndDate"/>
      <el-table-column label="复审期" align="center" prop="shouldReviewDate"/>
<!--      <el-table-column label="二次复审期" align="center" prop="operItemName"/>-->
     <el-table-column label="证书领取" align="center" > 机构代领 </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template #default="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-check"
            @click="openCert(scope.row,'view')"
          >审核发证</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="openCert(scope.row,'view')"
          >查看</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="openSupplementary(scope.row,'view')"
          >证书补打</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getPage"
    />
    <certificate-dialog ref="certificate" @getList="getPage"></certificate-dialog>
    <el-dialog title="证书补打" :visible.sync="supplementaryVisible" width="50%" append-to-body>
      <div style="display: flex;flex-direction: column;align-items: center">
        <el-image
          style="width: 100px; height: 100px"
          :src="print"
          fit="contain"></el-image>
        <p style="font-size: 16px">请使用专业打印机连接</p>
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
import {getCertificatePage, getCertificateSync} from "@/api/notCoalMine/certifiate";
import printImg from '@/assets/images/print.png'
import certificateDialog from "@/views/notCoalMine/nCertificateList/components/certificateDialog";
export default {
  name: "nCertificateManage",
  dicts: [],
  components: {certificateDialog},
  data() {
    return {
      loading: false,
      showSearch: true,
      supplementaryVisible: false,
      total: 0,
      dataList: [],
      queryParams: {
        idcardNum: '',
        name: '',
        idcardTypeCode: '',
        pageNum: 1,
        pageSize: 10
      },
      print: printImg
    };
  },
  created() {
    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
      if(t.queryParams.idcardNum !== ''){
        t.queryParams.idcardTypeCode = '01'
      }else{
        t.queryParams.idcardTypeCode = ''
      }
      const res = await getCertificatePage(t.queryParams)
      if(res.code == 200){
        t.dataList = res.rows
        t.total = res.total
      }else{
        t.$message({
          message: res.msg,
          type: 'warning'
        })
      }
      t.loading = false
    },
    handleChange(){
 
    },
    handleQuery(){
      this.queryParams.pageNum = 1
      this.getPage()
    },
    resetQuery(){
      this.queryParams={
        idcardNum: '',
        name: '',
        idcardTypeCode: '01',
        pageNum: 1,
        pageSize: 10
      }
      this.getPage()
    },
    openCert(data,type){
      this.$refs.certificate.openDialog(data,type)
    },
    openSupplementary(data,type){
      this.supplementaryVisible = true
    }
  }
};
</script>