|
|
|
|
@ -3,7 +3,8 @@ |
|
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel" |
|
|
|
|
v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" |
|
|
|
|
@search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
|
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" |
|
|
|
|
:upload-after="uploadAfter"> |
|
|
|
|
<template slot-scope="{row}" slot="menu"> |
|
|
|
|
<el-button type="text" icon="el-icon-check" size="small" @click="rowPublish(row)">{{ |
|
|
|
|
row.publishSta == 1 ? '取消发布' : row.publishSta == 2 ? '重新发布' |
|
|
|
|
@ -96,8 +97,12 @@ export default { |
|
|
|
|
component: 'AvueUeditor', |
|
|
|
|
overHidden: true, |
|
|
|
|
options: { |
|
|
|
|
customConfig: { |
|
|
|
|
menus: ['head', 'bold', 'fontSize', 'fontName', 'italic', 'underline', 'strikeThrough', 'foreColor', 'backColor', 'link', 'list', 'justify', 'quote', 'emoticon', 'table', 'code', 'undo', 'redo'] |
|
|
|
|
}, |
|
|
|
|
action: '/api/blade-resource/oss/endpoint/put-file', |
|
|
|
|
props: { |
|
|
|
|
home: this.website.filePrex, |
|
|
|
|
res: "data", |
|
|
|
|
url: "link", |
|
|
|
|
} |
|
|
|
|
@ -105,7 +110,7 @@ export default { |
|
|
|
|
minRows: 12, |
|
|
|
|
span: 24, |
|
|
|
|
formatter: (val) => { |
|
|
|
|
return decodeURIComponent(val.content); |
|
|
|
|
return decodeURIComponent(val.content).replace(/src=\"/gi, 'src="' + this.website.filePrex); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
@ -144,6 +149,11 @@ export default { |
|
|
|
|
mounted() { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//富文本编辑器上传 |
|
|
|
|
uploadAfter(res, done) { |
|
|
|
|
console.log(res) |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
//发布 |
|
|
|
|
rowPublish(row) { |
|
|
|
|
this.$confirm("确定" + (row.publishSta == 1 ? "取消发布该条数据吗" : "发布该条数据吗") + "?", { |
|
|
|
|
|