|
|
|
@ -193,17 +193,13 @@
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" size="small" @click.native="addCert(scope.row)">编辑</el-button>
|
|
|
|
|
<el-button type="text" size="small" @click.native="showImgViewer(scope.row)">预览</el-button>
|
|
|
|
|
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList" />
|
|
|
|
|
<el-button type="text" size="small"
|
|
|
|
|
v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
|
|
|
|
|
@click.native="deleteCompanyCert(scope.row)">删除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="text" size="small" v-if="scope.row.auditStatus == 2"
|
|
|
|
|
@click.native="explainCompanyCert(scope.row)">说明
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="text" size="small" v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6" @click.native="deleteCompanyCert(scope.row)">删除</el-button>
|
|
|
|
|
<el-button type="text" size="small" v-if="scope.row.auditStatus == 2" @click.native="explainCompanyCert(scope.row)">说明</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="certTotal>0"
|
|
|
|
|
:total="certTotal"
|
|
|
|
@ -274,11 +270,10 @@ import {regionDataPlus, CodeToText,} from "element-china-area-data";
|
|
|
|
|
import {filterCompanyCert, deleteCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert";
|
|
|
|
|
import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
|
|
|
|
|
import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog";
|
|
|
|
|
import ElImageViewer from "element-ui/packages/image/src/image-viewer"
|
|
|
|
|
|
|
|
|
|
import draggable from "vuedraggable";
|
|
|
|
|
import {getCompany} from "@/api/supplier/company";
|
|
|
|
|
import { previewImage } from '@/api/purchase/supCompany'
|
|
|
|
|
import { previewImage } from '@/api/purchase/supCompany';
|
|
|
|
|
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
|
@ -539,30 +534,20 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
isAssetTypeAnImage(ext) {
|
|
|
|
|
return [
|
|
|
|
|
'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].
|
|
|
|
|
indexOf(ext.toLowerCase()) !== -1;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
showImgViewer(row){
|
|
|
|
|
var varindex= row.filePath.lastIndexOf(".");
|
|
|
|
|
var varext = row.filePath.substring(varindex+1);
|
|
|
|
|
var isImage=this.isAssetTypeAnImage(varext);
|
|
|
|
|
if(isImage==true){
|
|
|
|
|
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
|
|
|
|
|
this.imgList=[];
|
|
|
|
|
previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.imgList.push(response.data);
|
|
|
|
|
this.imgList=response.data;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.imgList)
|
|
|
|
|
this.imgViewerVisible = true;
|
|
|
|
|
});
|
|
|
|
|
this.imgViewerVisible = true;
|
|
|
|
|
const m = (e) => { e.preventDefault() };
|
|
|
|
|
document.body.style.overflow = 'hidden';
|
|
|
|
|
document.addEventListener("touchmove", m, false); // 禁止页面滑动
|
|
|
|
|
}else{
|
|
|
|
|
this.toViewCompanyCert(row);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
closeImgViewer(){
|
|
|
|
|
this.imgViewerVisible = false;
|
|
|
|
|