Commit 438b1bf0 authored by zhengke's avatar zhengke

修改

parent 49aa0f0d
......@@ -24,7 +24,7 @@
border-radius: 9px;
padding: 15px;
margin-right: 30px;
height: auto;
overflow: auto;
}
.appmsg_account {
......@@ -54,7 +54,7 @@
</style>
<template>
<div class="addimageText">
<div class="box_l">
<div class="box_l" style="display:none;">
<div class="box_l_center">
<div class="appmsg_account">
<img style="width: 24px;height: 24px;border-radius: 50%;margin-right: 10px;"
......@@ -79,7 +79,7 @@
<q-btn-group push>
<q-btn-dropdown push label="图片">
<q-list>
<q-item clickable v-close-popup>
<q-item>
<el-upload :action="importFileUrl2"
:multiple="false" :on-success="successUpload" :show-file-list="false"
accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp">
......@@ -143,7 +143,12 @@
successUpload(file) {
console.log(file,'file');
if (file.Code == 1) {
let data = [{
fileName:file.Data.Name,
fileUrl: this.domainManager().DomainUrl+''+file.Data.HttpPath
}]
console.log(data,'data');
this.$refs.UE_cb.instertImage(data)
}
},
onItemClick() {
......
......@@ -97,12 +97,27 @@
focus() {
this.ue.focus(true)
},
insertVideo(fileArray) {//插入视频
//插入图片
instertImage(fileArray) {
if (fileArray && fileArray.length) {
let html = '';
//s视频
fileArray.forEach(item => {
html += '<p style="text-align:center"><iframe frameborder="0" src="' + item.fileUrl + '" allowFullScreen="true" align="center" height="280" width="420"></iframe></p>';
html += '<img src="' + item.fileUrl + '" style="max-width: 100%;">';
})
if (html && html != '') {
this.ue.execCommand('inserthtml', html);
}
}
},
insertVideo(fileArray) { //插入视频
if (fileArray && fileArray.length) {
let html = '';
//s视频
fileArray.forEach(item => {
html += '<p style="text-align:center"><iframe frameborder="0" src="' + item.fileUrl +
'" allowFullScreen="true" align="center" height="280" width="420"></iframe></p>';
})
console.log(html)
......@@ -113,7 +128,7 @@
}
}
},
insertaudio(fileArray) {//插入音频
insertaudio(fileArray) { //插入音频
if (fileArray && fileArray.length) {
let html = '';
//音频
......@@ -121,7 +136,8 @@
// html += '<p style="text-align:center"><iframe frameborder="0" src="' + item.fileUrl + '" allowFullScreen="true" align="center"></iframe></p>';
html += '<p><iframe height="auto" width="100%" frameborder="0" allowtransparency="true" ' +
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" ' +
' src="http://localhost:8181/#/teacher/contribution/graphicType?fileName=' + item.fileName + '&url=' + item.fileUrl + '&fileType=3' +
' src="http://localhost:8181/#/teacher/contribution/graphicType?fileName=' + item.fileName + '&url=' +
item.fileUrl + '&fileType=3' +
'" class="ans-insertaudio-module" module="_insertaudio">' + ' </iframe></p>';;
})
......@@ -136,7 +152,8 @@
let html = '';
//音频
fileArray.forEach(item => {
html += `<p><a target="_self" href="${item.fileUrl}" data-itemshowtype="0" tab="innerlink" style='text-decoration:none;color: #576b95;' _href="${item.fileUrl}">${item.fileName}</a></p>`;
html +=
`<p><a target="_self" href="${item.fileUrl}" data-itemshowtype="0" tab="innerlink" style='text-decoration:none;color: #576b95;' _href="${item.fileUrl}">${item.fileName}</a></p>`;
})
console.log(html)
if (html && html != '') {
......
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