|
|
|
@ -227,29 +227,10 @@
|
|
|
|
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="250">
|
|
|
|
|
<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="toViewCompanyCert(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" @click.native="addCert(scope.row)">编辑</el-button>
|
|
|
|
|
<el-button type="text" size="mini" @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>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -308,9 +289,10 @@ import {provinceAndCityData, regionData, provinceAndCityDataPlus, regionDataPlus
|
|
|
|
|
import {filterCompanyCert, deleteCompanyCert, updateCompanyCert} from "../../../api/purchase/companyCert";
|
|
|
|
|
import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
|
|
|
|
|
import draggable from "vuedraggable";
|
|
|
|
|
import {getSupComapnys} from "@/api/purchase/supCompany";
|
|
|
|
|
import { getSupComapnys, previewImage } from '@/api/purchase/supCompany'
|
|
|
|
|
import {getUUID} from "@/utils/strUtil";
|
|
|
|
|
import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog";
|
|
|
|
|
import ElImageViewer from "element-ui/packages/image/src/image-viewer"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -340,6 +322,8 @@ export default {
|
|
|
|
|
classesDisplay: false,
|
|
|
|
|
selectedOptions: [],
|
|
|
|
|
selectedOptions2: [],
|
|
|
|
|
imgViewerVisible:false,
|
|
|
|
|
imgList:[],
|
|
|
|
|
options: regionData,
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
|
@ -482,7 +466,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
draggable,
|
|
|
|
|
companyAddCert, supCertSetSelectDialog
|
|
|
|
|
companyAddCert, supCertSetSelectDialog, ElImageViewer
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onModifySubmit(type) {
|
|
|
|
@ -581,7 +565,39 @@ 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.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;
|
|
|
|
|
const m = (e) => { e.preventDefault() };
|
|
|
|
|
document.body.style.overflow = 'auto';
|
|
|
|
|
document.removeEventListener("touchmove", m, true);
|
|
|
|
|
},
|
|
|
|
|
disableCert(row, status) {
|
|
|
|
|
row.status = status;
|
|
|
|
|
updateCompanyCert(row).then(response => {
|
|
|
|
|