富文本还原

test
黄泽腾 2 years ago
parent 70437588c0
commit 5b5b58e566

@ -3,7 +3,7 @@
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-card style="margin-top: -30px">
<el-button-group style="display: flex">
<el-button type="primary" @click.native="submitUpload" style="margin: 0 60px 10px auto; height: 35px"
<el-button type="primary" @click.native="submitUpload()" style="margin: 0 60px 10px auto; height: 35px"
:loading="loading">提交
</el-button>
</el-button-group>
@ -97,49 +97,41 @@
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="3">-->
<!-- <div class="ao-text">-->
<!-- <span>文件</span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item>-->
<!-- <el-upload-->
<!-- :disabled="formData.auditStatus == 1"-->
<!-- class="upload-demo"-->
<!-- ref="upload"-->
<!-- :action="this.uploadUrl"-->
<!-- :on-preview="uploadHandlePreview"-->
<!-- :on-remove="uploadHandleRemove"-->
<!-- :headers="headers"-->
<!-- :on-exceed="uploadHandleExceed"-->
<!-- accept=".jpg,.png"-->
<!-- :on-change="uploadOnchange"-->
<!-- :on-success="uploadHandleSuccess"-->
<!-- :on-error="uploadHandleError"-->
<!-- :file-list="fileList"-->
<!-- :data="{type:'image2'}"-->
<!-- :auto-upload="true">-->
<!-- <el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">-->
<!-- {{ choiceFile }}-->
<!-- </el-button>-->
<!-- <div>只能上传 jpg,png 文件且不超过 3 MB</div>-->
<!-- </el-upload>-->
<!-- &lt;!&ndash; <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"&ndash;&gt;-->
<!-- &lt;!&ndash; style="text-align:right"&ndash;&gt;-->
<!-- &lt;!&ndash; >文件预览&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row gutter="20" class="el-row" type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="文件:" prop="filePath">
<cusEditor ref="editorRef" style="width:90vh;height: 100%;overflow: auto; " :content="formData.filePath"
:type="`image2`"/>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>文件</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item>
<el-upload
:disabled="formData.auditStatus == 1"
class="upload-demo"
ref="upload"
:action="this.uploadUrl"
:on-preview="uploadHandlePreview"
:on-remove="uploadHandleRemove"
:headers="headers"
:on-exceed="uploadHandleExceed"
accept=".jpg,.png"
:on-change="uploadOnchange"
:on-success="uploadHandleSuccess"
:on-error="uploadHandleError"
:file-list="fileList"
:data="{type:'image2'}"
:auto-upload="true">
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile }}
</el-button>
<div>只能上传 jpg,png 文件且不超过 3 MB</div>
</el-upload>
<!-- <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"-->
<!-- style="text-align:right"-->
<!-- >文件预览-->
<!-- </el-button-->
<!-- >-->
</el-form-item>
</el-col>
</el-row>
@ -208,8 +200,8 @@ export default {
};
},
components: {
// draggable,
// ElImageViewer
draggable,
ElImageViewer
},
methods: {
submitUpload() {
@ -238,13 +230,23 @@ export default {
onConfirmSubmit(val) {
this.formData.repeatUpload = val;
console.log(this.formData)
this.onSubmit();
// this.formData.repeatUpload = val;
// if (this.$isNotBlank(this.formData.filePath)) {
// this.onSubmit();
// }else {
// this.$message.warning(``);
// }
if (this.$isNotBlank(this.formData.filePath)) {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
this.onSubmit();
} else {
this.onSubmit();
}
} else {
console.log(this.$refs.upload.uploadFiles.length);
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.$message.warning(`请选择文件`);
}
}
},
onSubmit() {
@ -260,10 +262,8 @@ export default {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk;
this.formData.productIdFk = this.inputQuery.productId;
}
if (this.formData.auditStatus != 1){
if (this.formData.auditStatus != 1)
this.formData.auditStatus = "6";
this.formData.filePath = this.$refs.editorRef.html
}
if (this.editTye == 1) {
insertCompanyCert(this.formData).then(response => {

@ -162,7 +162,7 @@
</el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="确认说明" prop="auditComment" show-overflow-tooltip></el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button v-if="editType==1 && auditType!=1" type="text" size="small"
@click.native="printSupCert(scope.row)">打印
@ -544,21 +544,21 @@ export default {
'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1;
},
showImgViewer(row) {
let newWindow = window.open();
newWindow.document.write(row.filePath)
// 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 = response.data;
// }
// });
// this.imgViewer = true;
// const m = (e) => {
// e.preventDefault()
// };
// document.body.style.overflow = 'hidden';
// document.addEventListener("touchmove", m, false); //
// let newWindow = window.open();
// newWindow.document.write(row.filePath)
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 = response.data;
}
});
this.imgViewer = true;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;

@ -556,21 +556,21 @@ export default {
'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1;
},
showImgViewer(row) {
let newWindow = window.open();
newWindow.document.write(row.filePath)
// 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=response.data;
// }
// });
// this.imgViewerVisible = true;
// const m = (e) => {
// e.preventDefault()
// };
// document.body.style.overflow = 'hidden';
// document.addEventListener("touchmove", m, false); //
// let newWindow = window.open();
// newWindow.document.write(row.filePath)
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=response.data;
}
});
this.imgViewerVisible = true;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;

@ -602,22 +602,22 @@ export default {
return [
'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1
},
showImgViewer(row) {supCertAudi
let newWindow = window.open();
newWindow.document.write(row.filePath)
// 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 = response.data
// }
// })
// this.imgViewerVisible = true
// const m = (e) => {
// e.preventDefault()
// }
// document.body.style.overflow = 'hidden'
// document.addEventListener('touchmove', m, false) //
showImgViewer(row) {
// let newWindow = window.open();
// newWindow.document.write(row.filePath)
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 = response.data
}
})
this.imgViewerVisible = true
const m = (e) => {
e.preventDefault()
}
document.body.style.overflow = 'hidden'
document.addEventListener('touchmove', m, false) //
},
closeImgViewer() {
this.imgViewerVisible = false

@ -579,21 +579,21 @@ export default {
'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1;
},
showImgViewer(row) {
let newWindow = window.open();
newWindow.document.write(row.filePath)
// 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 = response.data;
// }
// });
// this.imgViewer = true;
// const m = (e) => {
// e.preventDefault()
// };
// document.body.style.overflow = 'hidden';
// document.addEventListener("touchmove", m, false); //
// let newWindow = window.open();
// newWindow.document.write(row.filePath)
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 = response.data;
}
});
this.imgViewer = true;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;

@ -663,21 +663,21 @@ export default {
'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1;
},
showImgViewer(row) {
let newWindow = window.open();
newWindow.document.write(row.filePath)
// 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=response.data;
// }
// });
// this.imgViewerVisible = true;
// const m = (e) => {
// e.preventDefault()
// };
// document.body.style.overflow = 'hidden';
// document.addEventListener("touchmove", m, false); //
// let newWindow = window.open();
// newWindow.document.write(row.filePath)
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=response.data;
}
});
this.imgViewerVisible = true;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;

@ -648,27 +648,27 @@ export default {
},
showImgViewer(row) {
let newWindow = window.open();
newWindow.document.write(row.filePath)
// 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 = response.data;
// }
// console.log(this.imgList);
// this.imgViewerVisible = true;
// });
// const m = (e) => {
// e.preventDefault();
// };
// document.body.style.overflow = "hidden";
// document.addEventListener("touchmove", m, false); //
// let newWindow = window.open();
// newWindow.document.write(row.filePath)
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 = 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;

Loading…
Cancel
Save