|
|
@ -49,7 +49,7 @@ |
|
|
<el-form-item label="案例来源:" |
|
|
<el-form-item label="案例来源:" |
|
|
prop="caseSource"> |
|
|
prop="caseSource"> |
|
|
<el-input v-model="item.caseSource" |
|
|
<el-input v-model="item.caseSource" |
|
|
disabled="true" |
|
|
:disabled="true" |
|
|
type="text" |
|
|
type="text" |
|
|
clearable |
|
|
clearable |
|
|
style="width: 40rem;"> |
|
|
style="width: 40rem;"> |
|
|
@ -60,7 +60,7 @@ |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-form-item label="案例类型:"prop="associatedType"> |
|
|
<el-form-item label="案例类型:"prop="associatedType"> |
|
|
<el-select v-model="item.associatedType" disabled="true"> |
|
|
<el-select v-model="item.associatedType" :disabled="true"> |
|
|
<el-option label="议题" value="0"></el-option> |
|
|
<el-option label="议题" value="0"></el-option> |
|
|
<el-option label="项目" value="1"></el-option> |
|
|
<el-option label="项目" value="1"></el-option> |
|
|
<el-option label="话题" value="2"></el-option> |
|
|
<el-option label="话题" value="2"></el-option> |
|
|
@ -69,7 +69,18 @@ |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-form-item label="内容描述:" prop="contentDescription"> |
|
|
<el-form-item label="内容描述:" prop="contentDescription"> |
|
|
<quill-editor ref="text" v-model="item.contentDescription" class="myQuillEditor" :options="editorOption" style="width: 40rem;"></quill-editor> |
|
|
<el-upload ref="upload" |
|
|
|
|
|
:action="uploadUrl" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:before-upload="uploadBeforeUploadHandle" |
|
|
|
|
|
:on-success="uploadSuccessHandle" |
|
|
|
|
|
style="display: none;"> |
|
|
|
|
|
<el-button ref="uploadBtn" |
|
|
|
|
|
type="primary" |
|
|
|
|
|
id="uploadBtn" |
|
|
|
|
|
size="small">{{ $t('upload.button') }}</el-button> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<quill-editor ref="myQuillEditor" v-model="item.contentDescription" class="myQuillEditor" :options="editorOption" style="width: 40rem;"></quill-editor> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</div> |
|
|
</div> |
|
|
@ -112,11 +123,11 @@ export default { |
|
|
// 富文本 |
|
|
// 富文本 |
|
|
this.hideUpload = false |
|
|
this.hideUpload = false |
|
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` |
|
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` |
|
|
if (this.quillEditor) { |
|
|
// if (this.quillEditor) { |
|
|
this.quillEditor.deleteText(0, this.quillEditor.getLength()) |
|
|
// this.quillEditor.deleteText(0, this.quillEditor.getLength()) |
|
|
} else { |
|
|
// } else { |
|
|
this.quillEditorHandle() |
|
|
// this.quillEditorHandle() |
|
|
} |
|
|
// } |
|
|
// 富文本end |
|
|
// 富文本end |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -131,7 +142,28 @@ export default { |
|
|
connectListVisible: false, |
|
|
connectListVisible: false, |
|
|
content: '', |
|
|
content: '', |
|
|
loading: false, |
|
|
loading: false, |
|
|
editorOption: {}, |
|
|
editorOption: { |
|
|
|
|
|
placeholder: 'Please enter it here...', |
|
|
|
|
|
modules:{ |
|
|
|
|
|
toolbar:{ |
|
|
|
|
|
container: [ |
|
|
|
|
|
['bold', 'italic', 'underline', 'strike'],// 加粗,斜体,下划线,删除线 |
|
|
|
|
|
['blockquote'],// 引用 |
|
|
|
|
|
[{ 'header': 1 }, { 'header': 2 }],// 标题,键值对的形式;1、2表示字体大小 |
|
|
|
|
|
[{ 'list': 'ordered'}, { 'list': 'bullet' }],//列表 |
|
|
|
|
|
[{ 'indent': '-1'}, { 'indent': '+1' }],// 缩进 |
|
|
|
|
|
[{ 'direction': 'rtl' }],// 文本方向 |
|
|
|
|
|
[{ 'size': ['small', false, 'large', 'huge'] }],// 字体大小 |
|
|
|
|
|
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],//几级标题 |
|
|
|
|
|
[{ 'color': [] }, { 'background': [] }],// 字体颜色,字体背景颜色 |
|
|
|
|
|
[{ 'font': [] }],//字体 |
|
|
|
|
|
[{ 'align': [] }],//对齐方式 |
|
|
|
|
|
['clean'],//清除字体样式 |
|
|
|
|
|
['image']//上传图片、上传视频 |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
// 富文本 |
|
|
// 富文本 |
|
|
quillEditor: null, |
|
|
quillEditor: null, |
|
|
quillEditorToolbarOptions: [ |
|
|
quillEditorToolbarOptions: [ |
|
|
@ -286,16 +318,14 @@ export default { |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 上传图片成功 (富文本) |
|
|
// 上传图片成功 (富文本) |
|
|
uploadSuccessHandle (res, file, fileList) { |
|
|
uploadSuccessHandle (res) { |
|
|
|
|
|
let quill = this.$refs.myQuillEditor[0].quill; |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} |
|
|
} |
|
|
this.quillEditor.insertEmbed(this.quillEditor.getSelection().index, 'image', res.data.url) |
|
|
this.quill.insertEmbed(this.quill.getSelection().index, 'image', res.data.url) |
|
|
}, |
|
|
|
|
|
setRegistTime () { |
|
|
|
|
|
this.dataForm.newsReleaseStartTime = this.time[0] |
|
|
|
|
|
this.dataForm.newsReleaseEndTime = this.time[1] |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 上传图片ends |
|
|
// 上传图片ends |
|
|
init () { |
|
|
init () { |
|
|
|