|
|
|
|
@ -59,8 +59,18 @@
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:content>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Content:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<my-tinymce v-if="showWang" :id="'content'"
|
|
|
|
|
@input="(e)=>{changeEditor(e,'content')}" :value="form.content"></my-tinymce>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -79,7 +89,8 @@
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isShow: false,
|
|
|
|
|
isShow: false,
|
|
|
|
|
showWang: false,
|
|
|
|
|
type: 'add',
|
|
|
|
|
id: '',
|
|
|
|
|
uploadOther: {
|
|
|
|
|
@ -93,7 +104,8 @@
|
|
|
|
|
sort: 0,
|
|
|
|
|
is_visible:1,
|
|
|
|
|
description: '',
|
|
|
|
|
file_ids:[]
|
|
|
|
|
file_ids:[],
|
|
|
|
|
content:''
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
title: [{
|
|
|
|
|
@ -117,6 +129,10 @@
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.pictureList = fileList
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
changeEditor(e, type) {
|
|
|
|
|
this.form[type] = e
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
if (this.id) {
|
|
|
|
|
@ -157,9 +173,11 @@
|
|
|
|
|
// show_relation: ['picture'],
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.form = this.base.requestToForm(res, this.form)
|
|
|
|
|
this.description = res.description ? res.description : ''
|
|
|
|
|
this.form.description = res.description ? res.description : ''
|
|
|
|
|
this.form.content = res.content?res.content:''
|
|
|
|
|
this.form.is_visible = res.is_visible?res.is_visible:0
|
|
|
|
|
this.form.sort = res.sort?res.sort:0
|
|
|
|
|
this.form.sort = res.sort?res.sort:0
|
|
|
|
|
this.showWang = true
|
|
|
|
|
if (res.files) {
|
|
|
|
|
let _arr = []
|
|
|
|
|
res.files.map(item=>{
|
|
|
|
|
@ -179,17 +197,21 @@
|
|
|
|
|
if (newVal) {
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
}else{
|
|
|
|
|
this.showWang = true
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.type = "add"
|
|
|
|
|
this.pictureList = []
|
|
|
|
|
this.pictureList = []
|
|
|
|
|
this.showWang = false
|
|
|
|
|
this.form = {
|
|
|
|
|
title: '',
|
|
|
|
|
sort: 0,
|
|
|
|
|
is_visible:1,
|
|
|
|
|
description: '',
|
|
|
|
|
file_ids: '',
|
|
|
|
|
file_ids: '',
|
|
|
|
|
content:''
|
|
|
|
|
}
|
|
|
|
|
this.$refs['dialog'].reset()
|
|
|
|
|
}
|
|
|
|
|
@ -202,7 +224,8 @@
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
::v-deep .title,
|
|
|
|
|
::v-deep .file_ids,
|
|
|
|
|
::v-deep .description {
|
|
|
|
|
::v-deep .description,
|
|
|
|
|
::v-deep .content {
|
|
|
|
|
flex-basis: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|