Commit d802d888 authored by 黄奎's avatar 黄奎

页面修改

parent 2aeac837
......@@ -64,7 +64,7 @@
uploadType: "1", //1-上传图片,2-上传附件,3-上传音频
//默认图片域名
defaultImgDomain: "http://imgfile.oytour.com/static/",
ViewDomain: "http://192.168.1.36:8140",
ViewDomain: "",
};
},
watch: {
......@@ -92,6 +92,10 @@
this.isInputChange = false;
},
},
created() {
this.ViewDomain = this.domainManager().ViewFileUrl;
console.log("this.domainManager().ViewDomain",this.ViewDomain)
},
mounted() {
this.loadUe();
},
......@@ -117,12 +121,15 @@
else {
fileArray.forEach(item => {
var obj = this.getIcon(item.fileName);
html += this.getIconContent(item);
if (obj.fileType == 4) {
html += this.audioIframeStr(item);
} else if (obj.fileType == 1 || obj.fileType == 2 || obj.fileType == 3) {
html += this.fileIframeList(item,obj.fileType);
} else {
html += this.getIconContent(item);
}
// else if (obj.fileType == 1 || obj.fileType == 2 || obj.fileType == 3) {
// html += this.fileIframeList(item, obj.fileType);
// }
})
}
if (html && html != '') {
......@@ -135,8 +142,13 @@
getIconContent(item) {
var iconObj = this.getIcon(item.fileName);
var fileUrl = encodeURIComponent(item.fileUrl);
let dataUrl = `${this.ViewDomain + '/read.html?fileName=' + item.fileName + '&url=' + fileUrl + '&fileType=' + fileType}`;
return `<p dataUrl='${this.ViewDomain + '/read.html?fileName=' + item.fileName + '&url=' + fileUrl + '&fileType=' + fileType}'><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="${iconObj.dataType}" data="${item.fileName}">` +
let dataUrl =
`${this.ViewDomain + '/read.html?fileName=' + item.fileName + '&url=' + fileUrl + '&fileType=' + iconObj.fileType}`;
var linkAttr = "";
if (iconObj.fileType == 1 || iconObj.fileType == 2 || iconObj.fileType == 3) {
linkAttr = ` dataUrl='${dataUrl}'`;
}
return `<p '${linkAttr}'><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="${iconObj.dataType}" data="${item.fileName}">` +
`<img src="${iconObj.iconUrl}" 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;">${item.fileName}</span></span></p>`;
},
//获取文件图标和类型
......@@ -196,12 +208,13 @@
'" class="ans-insertaudio-module" module="_insertaudio">' + ' </iframe></p>';
},
//视频、PDF、WORD、PPT、EXCEL
fileIframeList(data,fileType) {
fileIframeList(data, fileType) {
//视频1 音频 2 ppt/word 3
var fileUrl = encodeURIComponent(data.fileUrl);
return '<p><iframe height="62px" width="auto" frameborder="0" allowtransparency="true" ' +
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" ' +
' src="' + this.ViewDomain + '/read.html?fileName=' + data.fileName + '&url=' + fileUrl + '&fileType=' + fileType+
' src="' + this.ViewDomain + '/read.html?fileName=' + data.fileName + '&url=' + fileUrl + '&fileType=' +
fileType +
'" class="ans-insertaudio-module" module="_insertaudio">' + ' </iframe></p>';
},
loadUe() {
......
......@@ -81,12 +81,14 @@ export default {
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = 'http://192.168.1.13:8083';
let autoUrl = 'http://192.168.1.36:8140';
let viewFileUrl = 'http://192.168.1.36:8120';
let locationName = window.location.hostname;
if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com";
viewFileUrl="http://upload.oytour.com";
} else if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com";
viewFileUrl="http://upload.oytour.com";
}
var obj = {
//主地址
......@@ -99,8 +101,8 @@ export default {
LocalTemplateFileDownLoadUrl: domainUrl,
//本站文件流下载地址
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
autoUrl:autoUrl
//文件预览地址
ViewFileUrl:viewFileUrl
};
return obj;
},
......
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