修改检验报告预览

ywj_dev
wangwei 2 years ago
parent e228b4562e
commit 91369baf78

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

@ -320,7 +320,7 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click="toViewCompanyCert(scope.row)" @click="showImgViewer(scope.row)"
:disabled="scope.row.filePath == null" :disabled="scope.row.filePath == null"
>预览 >预览
</el-button </el-button
@ -328,6 +328,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
<pagination <pagination
v-show="bizTotal>0" v-show="bizTotal>0"
:total="bizTotal" :total="bizTotal"
@ -537,6 +539,9 @@ import {getCodeList} from "@/api/inout/code";
import AcceptOrder from "@/views/inout/DialogReviewOrder"; import AcceptOrder from "@/views/inout/DialogReviewOrder";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint" import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import { previewImage } from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
const formJson = { const formJson = {
@ -550,6 +555,8 @@ export default {
name: "IoCheckSuccessOrder", name: "IoCheckSuccessOrder",
data() { data() {
return { return {
imgList:[],
imgViewerVisible:false,
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
@ -681,7 +688,7 @@ export default {
acceptOrderVisible: false, acceptOrderVisible: false,
}; };
}, },
components: {AcceptOrder}, components: {AcceptOrder,ElImageViewer},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
@ -725,10 +732,29 @@ export default {
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
toViewCompanyCert(row) { showImgViewer(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; 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() { invChange() {
this.filterQuery.action = null; this.filterQuery.action = null;
this.getBusType(); this.getBusType();

Loading…
Cancel
Save