修改检验报告预览

ywj_dev
wangwei 2 years ago
parent e228b4562e
commit 91369baf78

@ -167,12 +167,12 @@
<span>预览</span>
</div>
</el-col>
<el-col :span="8">
<el-button type="primary" size="mini" icon="search" v-if="this.inputQuery.filePath!=null"
style="text-align:right" @click="toViewCompanyCert" >
文件预览
</el-button>
</el-col>
<!--<el-col :span="8">-->
<!-- <el-button type="primary" size="mini" icon="search" v-if="this.inputQuery.filePath!=null"-->
<!-- style="text-align:right" @click="toViewCompanyCert" >-->
<!-- 文件预览-->
<!-- </el-button>-->
<!--</el-col>-->
</el-row>
@ -341,10 +341,10 @@ export default {
},
toViewCompanyCert() {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + this.inputQuery.filePath);
},
// toViewCompanyCert() {
// this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
// window.open(this.certFileUrl + this.inputQuery.filePath);
// },
},
filters: {},
mounted() {

@ -320,7 +320,7 @@
<el-button
type="text"
size="small"
@click="toViewCompanyCert(scope.row)"
@click="showImgViewer(scope.row)"
:disabled="scope.row.filePath == null"
>预览
</el-button
@ -328,6 +328,8 @@
</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="bizTotal>0"
:total="bizTotal"
@ -537,6 +539,9 @@ import {getCodeList} from "@/api/inout/code";
import AcceptOrder from "@/views/inout/DialogReviewOrder";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import { previewImage } from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
const formJson = {
@ -550,6 +555,8 @@ export default {
name: "IoCheckSuccessOrder",
data() {
return {
imgList:[],
imgViewerVisible:false,
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
@ -681,7 +688,7 @@ export default {
acceptOrderVisible: false,
};
},
components: {AcceptOrder},
components: {AcceptOrder,ElImageViewer},
methods: {
onReset() {
this.$router.push({
@ -725,10 +732,29 @@ export default {
hideSearch() {
this.showSearch = !this.showSearch;
},
toViewCompanyCert(row) {
showImgViewer(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + row.filePath);
this.imgList=[];
previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => {
if (response.code === 20000) {
debugger
this.imgList=response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer(){
this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
invChange() {
this.filterQuery.action = null;
this.getBusType();

Loading…
Cancel
Save