diff --git a/jero-web/public/ueditor/ADT/image/image.js b/jero-web/public/ueditor/ADT/image/image.js index dee16bb..7817ecf 100644 --- a/jero-web/public/ueditor/ADT/image/image.js +++ b/jero-web/public/ueditor/ADT/image/image.js @@ -911,7 +911,9 @@ } })(img)); img.width = 113; - img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); + + console.log(urlPrefix + list[i].url) + img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); img.setAttribute('_src', urlPrefix + list[i].url); domUtils.addClass(icon, 'icon'); diff --git a/jero-web/public/ueditor/ueditor.all.js b/jero-web/public/ueditor/ueditor.all.js index 2976d1d..88ff65c 100644 --- a/jero-web/public/ueditor/ueditor.all.js +++ b/jero-web/public/ueditor/ueditor.all.js @@ -7336,15 +7336,14 @@ var fillCharReg = new RegExp(domUtils.fillChar, 'g'); * editor.setContent('

new text

', true); //插入的结果是

old text

new text

* ``` */ + setContent: function (html, isAppendTo, notFireSelectionchange) { var me = this; - - me.fireEvent('beforesetcontent', html); + me.fireEvent('beforesetcontent', html); var root = UE.htmlparser(html); me.filterInputRule(root); html = root.toHtml(); - - me.body.innerHTML = (isAppendTo ? me.body.innerHTML : '') + html; + me.body.innerHTML = (isAppendTo ? me.body.innerHTML : '') + html; function isCdataDiv(node){ @@ -8078,14 +8077,14 @@ UE.Editor.defaultOptions = function(editor){ setTimeout(function(){ try{ me.options.imageUrl && me.setOpt('serverUrl', me.options.imageUrl.replace(/^(.*[\/]).+([\.].+)$/, '$1controller$2')); - - var configUrl = me.getActionUrl('config'), + console.log(me.options.imageUrl) + var configUrl = me.getActionUrl('config'), isJsonp = utils.isCrossDomainUrl(configUrl); /* 发出ajax请求 */ me._serverConfigLoaded = false; - configUrl && UE.ajax.request(configUrl,{ + configUrl && UE.ajax.request('http://localhost:8184/laws-sinotruk/sys/split/file/getImage?fileName=7DS756NXKGimage5.png',{ 'method': 'GET', 'dataType': isJsonp ? 'jsonp':'', 'onsuccess':function(r){ @@ -9378,7 +9377,7 @@ var filterWord = UE.filterWord = function () { * ``` */ -var htmlparser = UE.htmlparser = function (htmlstr,ignoreBlank) { + var htmlparser = UE.htmlparser = function (htmlstr,ignoreBlank) { //todo 原来的方式 [^"'<>\/] 有\/就不能配对上 这样的标签了 //先去掉了,加上的原因忘了,这里先记录 var re_tag = /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g, @@ -9548,7 +9547,8 @@ var htmlparser = UE.htmlparser = function (htmlstr,ignoreBlank) { if (nextIndex < htmlstr.length) { text(currentParent, htmlstr.slice(nextIndex)); } - return root; + console.log(root) + return root; }; @@ -27736,7 +27736,7 @@ UE.ui = baidu.editor.ui = {}; }); }, setContent: function(content){ - this.getDom('content').innerHTML = content; + this.getDom('content').innerHTML = content; }, setType: function(type){ type = type || 'info'; @@ -29566,6 +29566,11 @@ UE.registerUI('autosave', function(editor) { }); - + window.getHtml = function (content) { + let html = '' + var root = UE.htmlparser(content); + html = root.toHtml(); + return html + } })(); diff --git a/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue b/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue index a367d91..b2e70df 100644 --- a/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue +++ b/jero-web/src/components/splitUpload/SplitAddClauseUploadImage.vue @@ -79,6 +79,12 @@ export default { const fileNowTypes = file.type.split('/') fileFlag = (fileTypes[0] === fileNowTypes[0]) // console.log('filetype',fileFlag) + const fileSize = file.size // 上传的文件大小 + if (fileSize > 1024 * 1024 * 500) { + this.$message.warning('文件大小超出500MB限制, 请压缩或降低文件质量!') + this.fileTypeSatus = false + return false + } if (!fileFlag) { this.$message.warning(this.$t('文件格式不正确,请上传图片格式文件')) this.fileTypeSatus = false @@ -87,11 +93,10 @@ export default { if (this.uploadFileFlag < 20) { this.uploadFileFlag++ } - this.fileTypeSatus = true this.$message.destroy() // 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量! - this.errorMessage = file.name + '文件大小超出1000MB限制, 请压缩或降低文件质量!' + this.errorMessage = file.name + '文件大小超出500MB限制, 请压缩或降低文件质量!' } }, remove () { @@ -107,7 +112,7 @@ export default { } }) if (this.fileTypeSatus) { - if (file.size > 1000000000) { + if (file.size > 1024 * 1024 * 500) { this.$message.warning(this.errorMessage) } else { if (status === 'error') { diff --git a/jero-web/src/views/documentTool/documentSplit/modules/SplitAddForm.vue b/jero-web/src/views/documentTool/documentSplit/modules/SplitAddForm.vue index 28425e1..ec5179b 100644 --- a/jero-web/src/views/documentTool/documentSplit/modules/SplitAddForm.vue +++ b/jero-web/src/views/documentTool/documentSplit/modules/SplitAddForm.vue @@ -197,6 +197,9 @@ export default { if (res.success) { this.contentList = [...res.result] this.contentList.forEach(item => { + if (item.type === this.TypeOfClauseItem.TABLE.value) { + item.itemContent = window.getHtml(item.itemContent) + } const imgData = item.itemContent.split('fileName=')[1] item.thumbUrl = window._CONFIG.domianURL + '/sys/split/file/getImage?fileName=' + imgData }) @@ -622,4 +625,7 @@ export default { .unscramble-item:last-child { margin-bottom: 0; } + /deep/ .clause-item-content td, th{ + border: 1px solid #DDD; + } diff --git a/jero-web/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue b/jero-web/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue index d26bd2b..898cf30 100644 --- a/jero-web/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue +++ b/jero-web/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue @@ -26,7 +26,8 @@ export default { methods: { open (val) { this.contentVisible = true - this.contentValue = val + console.log(val) + this.contentValue = window.getHtml(val) }, handleCancel () { this.contentVisible = false diff --git a/jero-web/src/views/documentTool/documentSplit/modules/SplitDetailAddTable.vue b/jero-web/src/views/documentTool/documentSplit/modules/SplitDetailAddTable.vue index 2bb1a0a..103a066 100644 --- a/jero-web/src/views/documentTool/documentSplit/modules/SplitDetailAddTable.vue +++ b/jero-web/src/views/documentTool/documentSplit/modules/SplitDetailAddTable.vue @@ -15,6 +15,7 @@