富文本还原

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

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

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

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

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

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

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

@ -648,27 +648,27 @@ export default {
}, },
showImgViewer(row) { showImgViewer(row) {
let newWindow = window.open(); // let newWindow = window.open();
newWindow.document.write(row.filePath) // newWindow.document.write(row.filePath)
// this.certFileUrl = this.certFileUrl =
// this.BASE_URL + this.BASE_URL +
// "/udiwms/image/register/file/getImage?type=image2&name="; "/udiwms/image/register/file/getImage?type=image2&name=";
// this.imgList = []; this.imgList = [];
// previewImage({ previewImage({
// imageUrl: row.filePath, imageUrl: row.filePath,
// certFileUrl: this.certFileUrl, certFileUrl: this.certFileUrl,
// }).then((response) => { }).then((response) => {
// if (response.code === 20000) { if (response.code === 20000) {
// this.imgList = response.data; this.imgList = response.data;
// } }
// console.log(this.imgList); console.log(this.imgList);
// this.imgViewerVisible = true; this.imgViewerVisible = true;
// }); });
// const m = (e) => { const m = (e) => {
// e.preventDefault(); e.preventDefault();
// }; };
// document.body.style.overflow = "hidden"; document.body.style.overflow = "hidden";
// document.addEventListener("touchmove", m, false); // document.addEventListener("touchmove", m, false); //
}, },
closeImgViewer() { closeImgViewer() {
this.imgViewerVisible = false; this.imgViewerVisible = false;

Loading…
Cancel
Save