|
|
@ -95,11 +95,11 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<!-- :editor-content="editorContent" --> |
|
|
<WangEditor |
|
|
<WangEditor |
|
|
v-model="editorContent" |
|
|
v-model="editorContent" |
|
|
style="width: 740px;" |
|
|
style="width: 740px;" |
|
|
:editor-content="editorContent" |
|
|
|
|
|
:editor-ref="editorRef" |
|
|
|
|
|
|
|
|
@editor-ref="onEditorRef" |
|
|
@contentData="contentData" |
|
|
@contentData="contentData" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
@ -276,7 +276,7 @@ export default { |
|
|
{ key: -1, display_name: '已取消' } |
|
|
{ key: -1, display_name: '已取消' } |
|
|
], |
|
|
], |
|
|
imageUrl: require('@/assets/images/system/default-img.jpg'), |
|
|
imageUrl: require('@/assets/images/system/default-img.jpg'), |
|
|
editorRef: 'test', |
|
|
|
|
|
|
|
|
editorRef: null, |
|
|
editorContent: '', |
|
|
editorContent: '', |
|
|
cancelDialogVisible: false, |
|
|
cancelDialogVisible: false, |
|
|
cancelForm: { |
|
|
cancelForm: { |
|
|
@ -361,6 +361,9 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
onEditorRef(ref) { |
|
|
|
|
|
this.editorRef = ref |
|
|
|
|
|
}, |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
this.crud.params.libcode = this.user.fonds.fondsNo |
|
|
this.crud.params.libcode = this.user.fonds.fondsNo |
|
|
if (this.blurryTime) { |
|
|
if (this.blurryTime) { |
|
|
@ -381,12 +384,16 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 新增前 |
|
|
// 新增前 |
|
|
[CRUD.HOOK.beforeToAdd]() { |
|
|
[CRUD.HOOK.beforeToAdd]() { |
|
|
this.editorContent = '' |
|
|
|
|
|
|
|
|
// this.editorContent = '' |
|
|
}, |
|
|
}, |
|
|
// 初始化编辑时候 |
|
|
// 初始化编辑时候 |
|
|
[CRUD.HOOK.beforeToEdit](crud, form) { |
|
|
[CRUD.HOOK.beforeToEdit](crud, form) { |
|
|
form.numberLimit = form.activityPeople === 0 ? 1 : 2 |
|
|
form.numberLimit = form.activityPeople === 0 ? 1 : 2 |
|
|
this.editorContent = form.activityContent |
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
if (this.editorRef && form.activityContent) { |
|
|
|
|
|
this.editorContent = form.activityContent |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 提交前做的操作 |
|
|
// 提交前做的操作 |
|
|
[CRUD.HOOK.afterValidateCU](crud) { |
|
|
[CRUD.HOOK.afterValidateCU](crud) { |
|
|
@ -425,6 +432,7 @@ export default { |
|
|
if (!isImage) { |
|
|
if (!isImage) { |
|
|
this.$message({ message: '只可上传图片', type: 'error', offset: 8 }) |
|
|
this.$message({ message: '只可上传图片', type: 'error', offset: 8 }) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2 |
|
|
const isLt2M = file.size / 1024 / 1024 < 2 |
|
|
if (!isLt2M) { |
|
|
if (!isLt2M) { |
|
|
this.$message({ message: '图片大小不能超过2MB', type: 'error', offset: 8 }) |
|
|
this.$message({ message: '图片大小不能超过2MB', type: 'error', offset: 8 }) |
|
|
@ -432,7 +440,7 @@ export default { |
|
|
return isImage && isLt2M |
|
|
return isImage && isLt2M |
|
|
}, |
|
|
}, |
|
|
contentData(val) { |
|
|
contentData(val) { |
|
|
console.log('contentData', val) |
|
|
|
|
|
|
|
|
// console.log('contentData', val) |
|
|
this.editorContent = val |
|
|
this.editorContent = val |
|
|
}, |
|
|
}, |
|
|
getStatusText(status) { |
|
|
getStatusText(status) { |
|
|
|