|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<div class="cmain">
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" :disabled="edits" label-width="80px">
|
|
|
<el-form-item label="标题" prop="title">
|
|
|
<el-input v-model="form.title" placeholder="请输入标题"></el-input>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="图片上传">-->
|
|
|
<!-- <cropper v-model="form.fileUrl" :fixed_number="[4, 2]"></cropper>-->
|
|
|
<!-- </el-form-item>-->
|
|
|
- <el-form-item label="内容" prop="content">
|
|
|
- <editor v-model="form.content" />
|
|
|
+ <el-form-item label="内容" prop="content" >
|
|
|
+ <editor v-model="form.content" :edits="edits" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- <el-form-item label="图片上传">-->
|
|
@@ -30,8 +30,8 @@
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="mfooter">
|
|
|
- <el-button type="info" @click="submitzc" v-if="checkPermi(['business:COUNSELINGMESSAGE:confirm'])">暂存草稿</el-button>
|
|
|
- <el-button type="primary" @click="submitForm" v-if="checkPermi(['business:COUNSELINGMESSAGE:confirm'])">提交审核</el-button>
|
|
|
+ <el-button type="info" @click="submitzc" v-if="checkPermi(['business:COUNSELINGMESSAGE:confirm']) && !edits">暂存草稿</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm" v-if="checkPermi(['business:COUNSELINGMESSAGE:confirm'])&& !edits">提交审核</el-button>
|
|
|
<el-button @click="$layer.close(layerid)">取 消</el-button>
|
|
|
</div>
|
|
|
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" fullscreen append-to-body @close="dialogVisible = false">
|
|
@@ -52,6 +52,7 @@ export default {
|
|
|
dialogVisible:false,
|
|
|
disabled: false,
|
|
|
fileList: [],
|
|
|
+ edits: null,
|
|
|
// 表单参数
|
|
|
form: {content:''},
|
|
|
// 表单校验
|
|
@@ -63,11 +64,20 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ created(){
|
|
|
+ },
|
|
|
mounted() {
|
|
|
+ this.edits = this.param.edit;
|
|
|
if (this.param.id) {
|
|
|
getCOUNSELINGMESSAGE(this.param.id).then(response => {
|
|
|
this.form = response.data;
|
|
|
- this.form.content = response.data.content.replace(new RegExp('/profile/upload/', 'g'), this.baseUrl + '/profile/upload/');
|
|
|
+ if(this.form.content.includes(process.env.VUE_APP_BASE_API)){
|
|
|
+ this.form.content = response.data.content
|
|
|
+ }else{
|
|
|
+ this.form.content = response.data.content.replace(
|
|
|
+ new RegExp("/profile/upload/", "g"),
|
|
|
+ this.baseUrl + "/profile/upload/")
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
},
|