Commit 56604e40 authored by 罗超's avatar 罗超

修改

parent bd98ae83
<style scoped>
<style>
.el-dialog__wrapper{
z-index:99999!important;
}
.cloud_Table{
text-align: center;
}
</style>
<template id="app-attachment">
<div class="app-attachment" style="z-index:99999">
<el-dialog class="app-attachment-dialog" style="width:1000px;height:800px;margin:0 auto;"
<el-dialog class="app-attachment-dialog" style="width:1000px;height:800px;margin:0 auto;z-index:99999"
:title="title ? title : '选择文件'" :visible.sync="dialogVisible" @opened="dialogOpened"
:close-on-click-modal="false">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="本地文件" name="first">
<el-upload class="avatar-uploader" action="" :accept="accept" :show-file-list="false"
<el-upload class="upload-demo" action="" :accept="accept" :show-file-list="false"
:http-request="UploadAttachment" :multiple="uploadMultple">
<div class="app-upload" flex="main:center cross:center" style="width: 100px; height: 100px;">
<i class="el-icon-upload"></i>
<div class="app-upload" flex="main:center cross:center" style="width: 200px; height: 120px;font-size:67px;border:1px dashed #d1d1d1;">
<i class="el-icon-upload" style="font-size:64px;"></i>
</div>
</el-upload>
</el-tab-pane>
<el-tab-pane label="云盘文件" name="second">
<table style="width:100%">
<table style="width:100%" class="cloud_Table">
<tr>
<th width="8%">
选择
......
<style>
</style>
<template id="app-rich-text">
<div class="app-rich-text">
<textarea style="width: 100%" :id="id"></textarea>
<app-attachment v-show="attachmentDialogVisible" style="height:0" :uploadMultple="uploadMultple"
<app-attachment v-show="attachmentDialogVisible" style="height:0;" :uploadMultple="uploadMultple"
:openDialog="attachmentDialogVisible" :chooseMultple="chooseMultple" @closed="attachmentClosed"
@selected="attachmentSelected" :uploadType="uploadType">
</app-attachment>
......@@ -90,8 +92,28 @@
attachmentSelected(e) {
if (e.length) {
let html = '';
for (let i in e) {
html += '<img src="' + e[i].fileUrl + '" style="max-width: 100%;">';
if(this.uploadType==1){
for (let i in e) {
html += '<img src="' + e[i].fileUrl + '" style="max-width: 100%;">';
}
}
if(this.uploadType==2){
console.log(e,'eeee');
for(let i in e){
html +=`<span 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;" :name="${e[i].fileName}">
<img src="http://mooc2-ans.chaoxing.com/images/questionbank/icon/txt.png"
style="width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;">
${e[i].fileName}
</span>`
}
// html +=
// <span type="txt" name="新建文本文档 (2).txt" contenteditable="false" style=" display: -webkit-box;-webkit-box-align: center;margin-top:10px;background:#F7F8FA;padding:14px 16px;max-width:572px;zoom:1;overflow:hidden;cursor:pointer;position: relative;"><img src="http://mooc2-ans.chaoxing.com/images/questionbank/icon/txt.png" style=" width:42px; height:42px; overflow:hidden; margin-right:14px;border-radius:4px;"><span style=" display:block;min-height:42px; display:table-cell; vertical-align:middle;display:-webkit-box; -webkit-box-pack:center; -webkit-box-orient:vertical; display:-moz-box; -moz-box-pack:center; -moz-box-orient:vertical;">
// <span style="-webkit-box-flex:1; width:510px\0; display:block; display:-webkit-box; -webkit-box-pack:center; -webkit-box-orient:vertical; display:-moz-box; -moz-box-pack:center; -moz-box-orient:vertical;">
// <span style=" padding-right:72px; padding-right:0\9; font-size:14px; color:#181E33; line-height:20px; display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">新建文本文档 (2).txt</span>
// <span style=" display:block; padding-right:72px; padding-right:0\9; line-height:18px; margin-top:4px; font-size:12px; color:#A8A8B3; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"></span>
// </span>
// </span>
}
this.ue.execCommand('inserthtml', 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