|
|
@@ -27,8 +27,12 @@
|
|
|
@on-load="onLoad">
|
|
|
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
+ <el-button class="el-button el-button--text el-button--small" icon="el-icon-edit"
|
|
|
+ v-if="(userInfo.tenant_id === '000000' && scope.row.senderType === 'PLATFORM')||(userInfo.tenant_id !== '000000' && scope.row.senderType === 'MALL')"
|
|
|
+ @click="rowEdit(scope.row,scope.index)">编辑
|
|
|
+ </el-button>
|
|
|
<el-button class="el-button el-button--text el-button--small" icon="el-icon-delete"
|
|
|
- v-if="(userInfo.tenant_id === '000000' && scope.row.senderType === '平台')||(userInfo.tenant_id !== '000000' && scope.row.senderType === '商场')"
|
|
|
+ v-if="(userInfo.tenant_id === '000000' && scope.row.senderType === 'PLATFORM')||(userInfo.tenant_id !== '000000' && scope.row.senderType === 'MALL')"
|
|
|
@click="rowDel(scope.row)">删除
|
|
|
</el-button>
|
|
|
<el-button type="text" size="small" icon="icon-navicon-xxjsr" plain class="none-border"
|
|
|
@@ -70,6 +74,8 @@ export default {
|
|
|
index: true,
|
|
|
viewBtn: true,
|
|
|
selection: true,
|
|
|
+ delBtn: false,
|
|
|
+ editBtn: false,
|
|
|
dialogClickModal: false,
|
|
|
column: [
|
|
|
{
|
|
|
@@ -113,7 +119,8 @@ export default {
|
|
|
type: "checkbox",
|
|
|
searchLabelWidth: 90,
|
|
|
hide: true,
|
|
|
- display: false,
|
|
|
+ editDisplay: false,
|
|
|
+ viewDisplay: false,
|
|
|
span: 24,
|
|
|
dicData: [],
|
|
|
rules: [{
|
|
|
@@ -183,13 +190,12 @@ export default {
|
|
|
receiverTypes.dicData = this.receiverTypesDicDataFun();
|
|
|
},
|
|
|
methods: {
|
|
|
- rowDel(row, index) {
|
|
|
- this.$refs.crud.rowDel(row, index)
|
|
|
+ rowEdit(row, index) {
|
|
|
+ this.$refs.crud.rowEdit(row, index);
|
|
|
},
|
|
|
rowSave(row, done, loading) {
|
|
|
const content = encodeURIComponent(row.content);
|
|
|
row.content = content;
|
|
|
- console.log(row);
|
|
|
add(row).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
@@ -203,6 +209,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rowUpdate(row, index, done, loading) {
|
|
|
+ const content = encodeURIComponent(row.content);
|
|
|
+ row.content = content;
|
|
|
update(row).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
@@ -257,8 +265,9 @@ export default {
|
|
|
beforeOpen(done, type) {
|
|
|
if (["edit", "view"].includes(type)) {
|
|
|
getDetail(this.form.id).then(res => {
|
|
|
+ const content = res.data.data.content;
|
|
|
+ res.data.data.content = decodeURIComponent(content);
|
|
|
this.form = res.data.data;
|
|
|
- this.form.content = decodeURIComponent(res.data.data.content);
|
|
|
});
|
|
|
}
|
|
|
done();
|