|
|
@@ -15,30 +15,36 @@
|
|
|
>
|
|
|
<!-- 工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
- <el-button type="primary" icon="el-icon-plus" @click="handleUpload()">新建</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-plus" @click="handleUpload()"
|
|
|
+ >新建</el-button
|
|
|
+ >
|
|
|
<!-- <el-button type="primary" @click="handleUpload">导入</el-button> -->
|
|
|
</template>
|
|
|
<template v-slot:code="{ row }">
|
|
|
- <el-link type="primary" :underline="false" @click="openDetail(row)">{{row.code}}</el-link>
|
|
|
- <p class="ele-text-info">
|
|
|
- {{getDictValue('证件类型', row.type)}}
|
|
|
+ <el-link type="primary" :underline="false" @click="openDetail(row)">{{
|
|
|
+ row.code
|
|
|
+ }}</el-link>
|
|
|
+ <p class="ele-text-info" v-if="['1'].includes(row.holderType)">
|
|
|
+ {{ getDictValue('证件类型', row.type) }}
|
|
|
+ </p>
|
|
|
+ <p
|
|
|
+ class="ele-text-info"
|
|
|
+ v-if="['2', '3', '4', '5', '6'].includes(row.holderType)"
|
|
|
+ >
|
|
|
+ {{ getDictValue('客户/供应商资质类型', row.type) }}
|
|
|
</p>
|
|
|
</template>
|
|
|
<template v-slot:time="{ row }">
|
|
|
- <p>起:{{row.validityStartTime}}</p>
|
|
|
- <p class="ele-text-info">止:{{row.validityEndTime}}</p>
|
|
|
+ <p>起:{{ row.validityStartTime }}</p>
|
|
|
+ <p class="ele-text-info">止:{{ row.validityEndTime }}</p>
|
|
|
</template>
|
|
|
<template v-slot:createUser="{ row }">
|
|
|
- <p>{{row.createUserName}}</p>
|
|
|
- <p>{{row.createUserDeptName}}</p>
|
|
|
- <p class="ele-text-info">{{row.createTime}}</p>
|
|
|
+ <p>{{ row.createUserName }}</p>
|
|
|
+ <p>{{ row.createUserDeptName }}</p>
|
|
|
+ <p class="ele-text-info">{{ row.createTime }}</p>
|
|
|
</template>
|
|
|
<template v-slot:picture="{ row }">
|
|
|
- <el-image
|
|
|
- style="width: 100px; height: 100px"
|
|
|
- :src="row.fileObj[0]?.storePath"
|
|
|
- :preview-src-list="row.fileObj.map(item => item.storePath)"
|
|
|
- />
|
|
|
+ <fileMain v-model="row.fileObj" type="view"></fileMain>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link
|
|
|
@@ -49,6 +55,17 @@
|
|
|
>
|
|
|
修改
|
|
|
</el-link>
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除此信息吗?"
|
|
|
+ @confirm="remove([row.id])"
|
|
|
+ >
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
|
@@ -58,109 +75,142 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+
|
|
|
+ import certificateSearch from './components/certificate-search';
|
|
|
+ import addDialog from './components/add-dialog.vue';
|
|
|
+ import detailDialog from './components/detail-dialog.vue';
|
|
|
+ import { getPhotoList, deleteIdentityphoto } from '@/api/documentManagement';
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
+ import { getImageUrl } from '@/utils/file.js';
|
|
|
+ import { deepClone } from '@/utils';
|
|
|
+ import { holderTypeOptions } from '@/enum/dict.js';
|
|
|
+ import fileMain from '@/components/addDoc/index.vue';
|
|
|
|
|
|
-import { getFile, getFileList } from '@/api/system/file/index.js';
|
|
|
-import certificateSearch from './components/certificate-search';
|
|
|
-import addDialog from './components/add-dialog.vue';
|
|
|
-import detailDialog from './components/detail-dialog.vue';
|
|
|
-import { getPhotoList } from '@/api/documentManagement';
|
|
|
-import dictMixins from '@/mixins/dictMixins';
|
|
|
-import { getImageUrl } from '@/utils/file.js';
|
|
|
-import { deepClone } from '@/utils';
|
|
|
-export default {
|
|
|
- mixins: [dictMixins, tabMixins],
|
|
|
- components: { certificateSearch, addDialog , detailDialog },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- columns: [
|
|
|
- {
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '证照编号',
|
|
|
- prop: 'code',
|
|
|
- slot: 'code',
|
|
|
- width:180
|
|
|
- },
|
|
|
- {
|
|
|
- label: '状态',
|
|
|
- prop: 'status',
|
|
|
- formatter: (row) => {
|
|
|
- return this.getDictValue('规则状态', row.status);
|
|
|
+ export default {
|
|
|
+ mixins: [dictMixins, tabMixins],
|
|
|
+ components: { certificateSearch, addDialog, detailDialog, fileMain },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '持证类型',
|
|
|
+ align: 'center',
|
|
|
+ prop: 'holderType',
|
|
|
+ formatter: (row) => {
|
|
|
+ return holderTypeOptions.find(
|
|
|
+ (item) => item.value == row.holderType
|
|
|
+ )?.label;
|
|
|
+ },
|
|
|
+ width: 150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ align: 'center',
|
|
|
+ label: '证照编号',
|
|
|
+ prop: 'code',
|
|
|
+ slot: 'code',
|
|
|
+ width: 180
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ prop: 'status',
|
|
|
+ formatter: (row) => {
|
|
|
+ return this.getDictValue('规则状态', row.status);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '执证对象',
|
|
|
+ align: 'center',
|
|
|
+ prop: 'holder'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ align: 'center',
|
|
|
+ label: '有效期限',
|
|
|
+ prop: 'time',
|
|
|
+ slot: 'time',
|
|
|
+ minWidth: '180',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '创建人信息',
|
|
|
+ align: 'center',
|
|
|
+ prop: 'createUser',
|
|
|
+ slot: 'createUser',
|
|
|
+ minWidth: '200',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '证照',
|
|
|
+ align: 'center',
|
|
|
+ prop: 'picture',
|
|
|
+ slot: 'picture'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ align: 'center',
|
|
|
+ prop: 'remark',
|
|
|
+ minWidth: '100',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ align: 'center',
|
|
|
+ width: 200,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
}
|
|
|
- },
|
|
|
- {
|
|
|
- label: '执证人',
|
|
|
- prop:'holder'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '有效期限',
|
|
|
- prop: 'time',
|
|
|
- slot: 'time',
|
|
|
- minWidth: '180',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '创建人信息',
|
|
|
- prop: 'createUser',
|
|
|
- slot: 'createUser',
|
|
|
- minWidth: '200',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '证照',
|
|
|
- prop: 'picture',
|
|
|
- slot: 'picture'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注',
|
|
|
- prop: 'remark',
|
|
|
- minWidth: '100',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 80,
|
|
|
- align: 'left',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true
|
|
|
- }
|
|
|
- ],
|
|
|
- pageSize: this.$store.state.tablePageSize,
|
|
|
- cacheKeyUrl: '7597dd71-documentManagement-certificateManagement'
|
|
|
- };
|
|
|
- },
|
|
|
- created () {
|
|
|
- this.requestDict('证件类型');
|
|
|
- this.requestDict('规则状态');
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async datasource ({ page, where, limit }) {
|
|
|
- const data = await getPhotoList({ ...where, pageNum: page, size: limit });
|
|
|
- const res = deepClone(data)
|
|
|
- res.list.map(item=>{
|
|
|
- item.imageUrl = getImageUrl(item.fileObj.storePath)
|
|
|
- })
|
|
|
- return res
|
|
|
- },
|
|
|
- reload (where = {}) {
|
|
|
- this.$refs.table.reload({ where });
|
|
|
+ ],
|
|
|
+ pageSize: this.$store.state.tablePageSize,
|
|
|
+ cacheKeyUrl: '7597dd71-documentManagement-certificateManagement'
|
|
|
+ };
|
|
|
},
|
|
|
- handleUpload (row) {
|
|
|
- this.$refs.addDialogRef.open(row);
|
|
|
+ created() {
|
|
|
+ this.requestDict('证件类型');
|
|
|
+ this.requestDict('客户/供应商资质类型');
|
|
|
+ this.requestDict('规则状态');
|
|
|
},
|
|
|
- openDetail(row){
|
|
|
- this.$refs.detailDialogRef.open(row);
|
|
|
+ methods: {
|
|
|
+ async datasource({ page, where, limit }) {
|
|
|
+ const data = await getPhotoList({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
+ });
|
|
|
+ const res = deepClone(data);
|
|
|
+ res.list.map((item) => {
|
|
|
+ item.imageUrl = getImageUrl(item.fileObj.storePath);
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+ },
|
|
|
+ reload(where = {}) {
|
|
|
+ this.$refs.table.reload({ where });
|
|
|
+ },
|
|
|
+ //删除接口
|
|
|
+ remove(delData) {
|
|
|
+ deleteIdentityphoto(delData).then((res) => {
|
|
|
+ this.$message.success('删除成功!');
|
|
|
+ this.reload();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleUpload(row) {
|
|
|
+ this.$refs.addDialogRef.open(row);
|
|
|
+ },
|
|
|
+ openDetail(row) {
|
|
|
+ this.$refs.detailDialogRef.open(row);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style class=""></style>
|