正在显示
1 个修改的文件
包含
21 行增加
和
10 行删除
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | @keyup.enter.native="handleQuery" | 17 | @keyup.enter.native="handleQuery" |
| 18 | /> | 18 | /> |
| 19 | </el-form-item> | 19 | </el-form-item> |
| 20 | - <el-form-item label="认证机构名称" prop="certificationName"> | 20 | + <el-form-item label="认证机构名称" prop="certificationName" label-width="150"> |
| 21 | <el-input | 21 | <el-input |
| 22 | v-model="queryParams.certificationName" | 22 | v-model="queryParams.certificationName" |
| 23 | placeholder="请输入认证机构名称" | 23 | placeholder="请输入认证机构名称" |
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | placeholder="请选择发证时间"> | 33 | placeholder="请选择发证时间"> |
| 34 | </el-date-picker> | 34 | </el-date-picker> |
| 35 | </el-form-item> | 35 | </el-form-item> |
| 36 | - <el-form-item label="证书有效期" prop="certificateValidityPeriod"> | 36 | + <el-form-item label="证书有效期" prop="certificateValidityPeriod" label-width="100px"> |
| 37 | <el-date-picker clearable | 37 | <el-date-picker clearable |
| 38 | v-model="queryParams.certificateValidityPeriod" | 38 | v-model="queryParams.certificateValidityPeriod" |
| 39 | type="date" | 39 | type="date" |
| @@ -41,14 +41,14 @@ | @@ -41,14 +41,14 @@ | ||
| 41 | placeholder="请选择证书有效期"> | 41 | placeholder="请选择证书有效期"> |
| 42 | </el-date-picker> | 42 | </el-date-picker> |
| 43 | </el-form-item> | 43 | </el-form-item> |
| 44 | - <el-form-item label="证书附件" prop="certificateAttachment"> | 44 | + <!-- <el-form-item label="证书附件" prop="certificateAttachment"> |
| 45 | <el-input | 45 | <el-input |
| 46 | v-model="queryParams.certificateAttachment" | 46 | v-model="queryParams.certificateAttachment" |
| 47 | placeholder="请输入证书附件" | 47 | placeholder="请输入证书附件" |
| 48 | clearable | 48 | clearable |
| 49 | @keyup.enter.native="handleQuery" | 49 | @keyup.enter.native="handleQuery" |
| 50 | /> | 50 | /> |
| 51 | - </el-form-item> | 51 | + </el-form-item> --> |
| 52 | <el-form-item> | 52 | <el-form-item> |
| 53 | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 53 | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| @@ -118,8 +118,7 @@ | @@ -118,8 +118,7 @@ | ||
| 118 | </template> | 118 | </template> |
| 119 | </el-table-column> | 119 | </el-table-column> |
| 120 | <el-table-column label="证书附件" align="center" prop="certificateAttachment" > | 120 | <el-table-column label="证书附件" align="center" prop="certificateAttachment" > |
| 121 | - <template slot-scope="scope"> | ||
| 122 | - | 121 | + <template slot-scope="scope"> |
| 123 | <img src="@/assets/images/PDF.png" @click="openFile(scope.row.certificateAttachment)" width="40px" height="auto" style="cursor: pointer"/> | 122 | <img src="@/assets/images/PDF.png" @click="openFile(scope.row.certificateAttachment)" width="40px" height="auto" style="cursor: pointer"/> |
| 124 | </template> | 123 | </template> |
| 125 | </el-table-column> | 124 | </el-table-column> |
| @@ -151,9 +150,12 @@ | @@ -151,9 +150,12 @@ | ||
| 151 | @pagination="getList" | 150 | @pagination="getList" |
| 152 | /> | 151 | /> |
| 153 | 152 | ||
| 153 | + <el-dialog title="预览" :visible.sync="dialogVisible" width="50%" center :before-close="handleClose"> | ||
| 154 | + <vue-pdf :src="currentFile" type="application/pdf" width="100%" height="800px" /> | ||
| 155 | + </el-dialog> | ||
| 154 | <!-- 添加或修改单位证照表对话框 --> | 156 | <!-- 添加或修改单位证照表对话框 --> |
| 155 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||
| 156 | - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 157 | + <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> |
| 158 | + <el-form ref="form" :model="form" :rules="rules" label-width="110px"> | ||
| 157 | <el-form-item label="单位编号" prop="orgcode"> | 159 | <el-form-item label="单位编号" prop="orgcode"> |
| 158 | <el-input v-model="this.orgcode" placeholder="请输入单位编号" :disabled="true"/> | 160 | <el-input v-model="this.orgcode" placeholder="请输入单位编号" :disabled="true"/> |
| 159 | </el-form-item> | 161 | </el-form-item> |
| @@ -225,6 +227,9 @@ import { getToken } from "@/utils/auth"; | @@ -225,6 +227,9 @@ import { getToken } from "@/utils/auth"; | ||
| 225 | import VuePdf from 'vue-pdf'; | 227 | import VuePdf from 'vue-pdf'; |
| 226 | export default { | 228 | export default { |
| 227 | name: "OrginfoCertificate", | 229 | name: "OrginfoCertificate", |
| 230 | + components: { | ||
| 231 | + VuePdf | ||
| 232 | + }, | ||
| 228 | data() { | 233 | data() { |
| 229 | return { | 234 | return { |
| 230 | // 设置上传的请求头部 | 235 | // 设置上传的请求头部 |
| @@ -233,6 +238,9 @@ export default { | @@ -233,6 +238,9 @@ export default { | ||
| 233 | url: process.env.VUE_APP_BASE_API + "/common/uploads", | 238 | url: process.env.VUE_APP_BASE_API + "/common/uploads", |
| 234 | // urlhead: "http://joycart.zgftlm.com", | 239 | // urlhead: "http://joycart.zgftlm.com", |
| 235 | urlhead:process.env.VUE_APP_BASE_API, | 240 | urlhead:process.env.VUE_APP_BASE_API, |
| 241 | + baseUrl:process.env.VUE_APP_BASE_API, | ||
| 242 | + dialogVisible:false, | ||
| 243 | + currentFile:'', | ||
| 236 | fileList: [], | 244 | fileList: [], |
| 237 | file:[], | 245 | file:[], |
| 238 | // 按钮loading | 246 | // 按钮loading |
| @@ -429,12 +437,15 @@ export default { | @@ -429,12 +437,15 @@ export default { | ||
| 429 | }, | 437 | }, |
| 430 | 438 | ||
| 431 | openFile(filePath) { | 439 | openFile(filePath) { |
| 432 | - | ||
| 433 | - this.currentFile = this.urlhead+filePath; | 440 | + this.currentFile = this.baseUrl+filePath; |
| 434 | console.log(this.currentFile) | 441 | console.log(this.currentFile) |
| 435 | this.dialogVisible = true; | 442 | this.dialogVisible = true; |
| 436 | 443 | ||
| 437 | }, | 444 | }, |
| 445 | + handleClose() { | ||
| 446 | + this.currentFile = '' | ||
| 447 | + this.dialogVisible = false | ||
| 448 | + }, | ||
| 438 | beforeUpload(file) { | 449 | beforeUpload(file) { |
| 439 | const isPDF = file.type === 'application/pdf'; | 450 | const isPDF = file.type === 'application/pdf'; |
| 440 | const isLt5M = file.size / 1024 / 1024 < 5; | 451 | const isLt5M = file.size / 1024 / 1024 < 5; |
-
请 注册 或 登录 后发表评论