Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -911,7 +911,9 @@
|
|||||||
}
|
}
|
||||||
})(img));
|
})(img));
|
||||||
img.width = 113;
|
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);
|
img.setAttribute('_src', urlPrefix + list[i].url);
|
||||||
domUtils.addClass(icon, 'icon');
|
domUtils.addClass(icon, 'icon');
|
||||||
|
|
||||||
|
|||||||
@@ -7336,15 +7336,14 @@ var fillCharReg = new RegExp(domUtils.fillChar, 'g');
|
|||||||
* editor.setContent('<p>new text</p>', true); //插入的结果是<p>old text</p><p>new text</p>
|
* editor.setContent('<p>new text</p>', true); //插入的结果是<p>old text</p><p>new text</p>
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
setContent: function (html, isAppendTo, notFireSelectionchange) {
|
setContent: function (html, isAppendTo, notFireSelectionchange) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
me.fireEvent('beforesetcontent', html);
|
||||||
me.fireEvent('beforesetcontent', html);
|
|
||||||
var root = UE.htmlparser(html);
|
var root = UE.htmlparser(html);
|
||||||
me.filterInputRule(root);
|
me.filterInputRule(root);
|
||||||
html = root.toHtml();
|
html = root.toHtml();
|
||||||
|
me.body.innerHTML = (isAppendTo ? me.body.innerHTML : '') + html;
|
||||||
me.body.innerHTML = (isAppendTo ? me.body.innerHTML : '') + html;
|
|
||||||
|
|
||||||
|
|
||||||
function isCdataDiv(node){
|
function isCdataDiv(node){
|
||||||
@@ -8078,14 +8077,14 @@ UE.Editor.defaultOptions = function(editor){
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
try{
|
try{
|
||||||
me.options.imageUrl && me.setOpt('serverUrl', me.options.imageUrl.replace(/^(.*[\/]).+([\.].+)$/, '$1controller$2'));
|
me.options.imageUrl && me.setOpt('serverUrl', me.options.imageUrl.replace(/^(.*[\/]).+([\.].+)$/, '$1controller$2'));
|
||||||
|
console.log(me.options.imageUrl)
|
||||||
var configUrl = me.getActionUrl('config'),
|
var configUrl = me.getActionUrl('config'),
|
||||||
isJsonp = utils.isCrossDomainUrl(configUrl);
|
isJsonp = utils.isCrossDomainUrl(configUrl);
|
||||||
|
|
||||||
/* 发出ajax请求 */
|
/* 发出ajax请求 */
|
||||||
me._serverConfigLoaded = false;
|
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',
|
'method': 'GET',
|
||||||
'dataType': isJsonp ? 'jsonp':'',
|
'dataType': isJsonp ? 'jsonp':'',
|
||||||
'onsuccess':function(r){
|
'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 原来的方式 [^"'<>\/] 有\/就不能配对上 <TD vAlign=top background=../AAA.JPG> 这样的标签了
|
//todo 原来的方式 [^"'<>\/] 有\/就不能配对上 <TD vAlign=top background=../AAA.JPG> 这样的标签了
|
||||||
//先去掉了,加上的原因忘了,这里先记录
|
//先去掉了,加上的原因忘了,这里先记录
|
||||||
var re_tag = /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g,
|
var re_tag = /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g,
|
||||||
@@ -9548,7 +9547,8 @@ var htmlparser = UE.htmlparser = function (htmlstr,ignoreBlank) {
|
|||||||
if (nextIndex < htmlstr.length) {
|
if (nextIndex < htmlstr.length) {
|
||||||
text(currentParent, htmlstr.slice(nextIndex));
|
text(currentParent, htmlstr.slice(nextIndex));
|
||||||
}
|
}
|
||||||
return root;
|
console.log(root)
|
||||||
|
return root;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -27736,7 +27736,7 @@ UE.ui = baidu.editor.ui = {};
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setContent: function(content){
|
setContent: function(content){
|
||||||
this.getDom('content').innerHTML = content;
|
this.getDom('content').innerHTML = content;
|
||||||
},
|
},
|
||||||
setType: function(type){
|
setType: function(type){
|
||||||
type = type || 'info';
|
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
|
||||||
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -79,6 +79,12 @@ export default {
|
|||||||
const fileNowTypes = file.type.split('/')
|
const fileNowTypes = file.type.split('/')
|
||||||
fileFlag = (fileTypes[0] === fileNowTypes[0])
|
fileFlag = (fileTypes[0] === fileNowTypes[0])
|
||||||
// console.log('filetype',fileFlag)
|
// console.log('filetype',fileFlag)
|
||||||
|
const fileSize = file.size // 上传的文件大小
|
||||||
|
if (fileSize > 1024 * 1024 * 500) {
|
||||||
|
this.$message.warning('文件大小超出500MB限制, 请压缩或降低文件质量!')
|
||||||
|
this.fileTypeSatus = false
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (!fileFlag) {
|
if (!fileFlag) {
|
||||||
this.$message.warning(this.$t('文件格式不正确,请上传图片格式文件'))
|
this.$message.warning(this.$t('文件格式不正确,请上传图片格式文件'))
|
||||||
this.fileTypeSatus = false
|
this.fileTypeSatus = false
|
||||||
@@ -87,11 +93,10 @@ export default {
|
|||||||
if (this.uploadFileFlag < 20) {
|
if (this.uploadFileFlag < 20) {
|
||||||
this.uploadFileFlag++
|
this.uploadFileFlag++
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fileTypeSatus = true
|
this.fileTypeSatus = true
|
||||||
this.$message.destroy()
|
this.$message.destroy()
|
||||||
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
|
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
|
||||||
this.errorMessage = file.name + '文件大小超出1000MB限制, 请压缩或降低文件质量!'
|
this.errorMessage = file.name + '文件大小超出500MB限制, 请压缩或降低文件质量!'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove () {
|
remove () {
|
||||||
@@ -107,7 +112,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.fileTypeSatus) {
|
if (this.fileTypeSatus) {
|
||||||
if (file.size > 1000000000) {
|
if (file.size > 1024 * 1024 * 500) {
|
||||||
this.$message.warning(this.errorMessage)
|
this.$message.warning(this.errorMessage)
|
||||||
} else {
|
} else {
|
||||||
if (status === 'error') {
|
if (status === 'error') {
|
||||||
|
|||||||
@@ -197,6 +197,9 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.contentList = [...res.result]
|
this.contentList = [...res.result]
|
||||||
this.contentList.forEach(item => {
|
this.contentList.forEach(item => {
|
||||||
|
if (item.type === this.TypeOfClauseItem.TABLE.value) {
|
||||||
|
item.itemContent = window.getHtml(item.itemContent)
|
||||||
|
}
|
||||||
const imgData = item.itemContent.split('fileName=')[1]
|
const imgData = item.itemContent.split('fileName=')[1]
|
||||||
item.thumbUrl = window._CONFIG.domianURL + '/sys/split/file/getImage?fileName=' + imgData
|
item.thumbUrl = window._CONFIG.domianURL + '/sys/split/file/getImage?fileName=' + imgData
|
||||||
})
|
})
|
||||||
@@ -622,4 +625,7 @@ export default {
|
|||||||
.unscramble-item:last-child {
|
.unscramble-item:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
/deep/ .clause-item-content td, th{
|
||||||
|
border: 1px solid #DDD;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
open (val) {
|
open (val) {
|
||||||
this.contentVisible = true
|
this.contentVisible = true
|
||||||
this.contentValue = val
|
console.log(val)
|
||||||
|
this.contentValue = window.getHtml(val)
|
||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
this.contentVisible = false
|
this.contentVisible = false
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UEditor from '../../../../components/uEditor/UEditor.vue'
|
import UEditor from '../../../../components/uEditor/UEditor.vue'
|
||||||
|
import { getHtml } from '../../../../../public/ueditor/ueditor.all'
|
||||||
export default {
|
export default {
|
||||||
name: 'SplitDetailAddTable',
|
name: 'SplitDetailAddTable',
|
||||||
components: { UEditor },
|
components: { UEditor },
|
||||||
@@ -121,9 +122,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
unhtml (str) {
|
||||||
|
return str ? str.replace(/[<>]/g, (a) => {
|
||||||
|
return {
|
||||||
|
'<': '<',
|
||||||
|
'>': '>',
|
||||||
|
}[a]
|
||||||
|
}) : ''
|
||||||
|
},
|
||||||
open (tableStr) {
|
open (tableStr) {
|
||||||
console.log('$$$$$$$$$$$$', tableStr)
|
|
||||||
this.tableVisible = true
|
this.tableVisible = true
|
||||||
|
// console.log(window.getHtml(tableStr))
|
||||||
this.ueContent = tableStr
|
this.ueContent = tableStr
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.ueditor.setContent(this.ueContent)
|
this.$refs.ueditor.setContent(this.ueContent)
|
||||||
|
|||||||
Reference in New Issue
Block a user