Commit 4bc45ba9 authored by 黄奎's avatar 黄奎

页面修改

parent 5e8be885
......@@ -49,7 +49,8 @@ module.exports = function (ctx) {
build: {
vueRouterMode: 'hash', // available values: 'hash', 'history'
env: ctx.dev ? {
API: 'http://192.168.1.13:8085/api'
//API: 'http://192.168.1.36:8300/api'
API: 'https://localhost:5001/api'
} : {
API: 'http://eduapi.oytour.com/api'
},
......
......@@ -20,7 +20,7 @@
</div>
</el-upload>
</el-tab-pane>
<el-tab-pane label="云盘文件" name="second">
<!-- <el-tab-pane label="云盘文件" name="second" style="display:none;">
<table style="width:100%" class="cloud_Table">
<tr>
<th width="8%">
......@@ -53,7 +53,7 @@
</tr>
</tbody>
</table>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
<div style="margin-top:20px;text-align:right">
<el-button size="small" type="primary" @click="SelectAttachment">选定</el-button>
......
......@@ -93,7 +93,7 @@
this.loadUe();
},
methods: {
focus(){
focus() {
this.ue.focus(true)
},
//关闭上传文件弹窗
......@@ -102,16 +102,18 @@
},
//选择文件弹窗
attachmentSelected(fileArray) {
if (fileArray&&fileArray.length) {
console.log("this.uploadType", this.uploadType)
if (fileArray && fileArray.length) {
let html = '';
//图片
if (this.uploadType == 1) {
for (let i in fileArray) {
html += '<img src="' + fileArray[i].fileUrl + '" style="max-width: 100%;">';
}
this.ue.execCommand('inserthtml', html);
}
//附件
if (this.uploadType == 2 || this.uploadType == 3 ) {
if (this.uploadType == 2) {
for (let i in fileArray) {
var type = fileArray[i].fileName.split('.')[1];
var imgUrl = "";
......@@ -140,37 +142,22 @@
`<p><span contenteditable="false" style="display:-webkit-box;margin-top:10px;background: #F7F8FA;padding: 14px 16px;max-width: 572px;overflow: hidden;cursor:pointer;-webkit-box-align: center;text-align:left;cursor:pointer;" name="${fileArray[i].dataName}" data="${fileArray[i].fileName}">` +
`<img src="${imgUrl}" style="width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;"><span style="font-size:14px; color:#181E33; line-height:20px; display:block; overflow:hidden; text-overflow:ellipsis;">${fileArray[i].fileName}</span></span></p>`
}
this.ue.execCommand('inserthtml', html);
}
if(this.uploadType==3)
{
for (let i in fileArray) {
var type = fileArray[i].fileName.split('.')[1];
var imgUrl = "";
var dataName = "";
if (type == 'xlsx' || type == 'xls') {
imgUrl = "http://imgfile.oytour.com/static/excel.png";
dataName = "xls";
}
if (type == 'txt') {
imgUrl = "http://imgfile.oytour.com/static/txt.png";
dataName = "txt";
}
if (type == 'ppt' || type == 'pptx') {
imgUrl = "http://imgfile.oytour.com/static/ppt.png";
dataName = "ppt";
}
if (type == 'doc' || type == 'docx') {
imgUrl = "http://imgfile.oytour.com/static/word.png";
dataName = "doc";
}
//音频
if (this.uploadType == 3) {
html +=
`<p><span contenteditable="false" style="display:-webkit-box;margin-top:10px;background: #F7F8FA;padding: 14px 16px;max-width: 572px;overflow: hidden;cursor:pointer;-webkit-box-align: center;text-align:left;cursor:pointer;" name="${fileArray[i].dataName}" data="${fileArray[i].fileName}">` +
`<img src="${imgUrl}" style="width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;"><span style="font-size:14px; color:#181E33; line-height:20px; display:block; overflow:hidden; text-overflow:ellipsis;">${fileArray[i].fileName}</span></span></p>`
fileArray.forEach(item => {
var musicObj = {
url: item.fileUrl,
width: 400,
height: 95,
align: "center",
}
console.log("musicObj", musicObj);
this.ue.execCommand('music', musicObj);
})
}
this.ue.execCommand('inserthtml', html);
}
this.attachmentDialogVisible = false;
},
......@@ -225,7 +212,7 @@
if (this.tempContent) {
this.ue.setContent(this.tempContent);
}
if(this.noMargin){
if (this.noMargin) {
UE.dom.domUtils.setStyles(this.ue.body, {
'margin': '0px'
});
......@@ -241,7 +228,7 @@
});
this.ue.addListener('blur', editor => {
this.isInputChange = true;
this.$emit('blur',this.ue.getContent());
this.$emit('blur', this.ue.getContent());
});
this.ue.addListener('focus', editor => {
this.$emit('focus');
......
......@@ -128,8 +128,6 @@ function SeeksBidirectionalTreeLayouter(layoutSetting, graphSetting) {
if (!rootNode) {
console.error('root is null')
return
} else {
console.log('layout by root:', rootNode)
}
this.__origin_nodes = allNodes
this.rootNode = rootNode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment