Browse Source

修改消息通知不能换行 不能发图片

master
曲树通 6 years ago
parent
commit
dbe152171f
  1. 20
      src/views/modules/news/notice-add-or-update.vue

20
src/views/modules/news/notice-add-or-update.vue

@ -7,13 +7,12 @@
:rules="dataRule"
ref="dataForm"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="所属机构" prop="allDeptIdsShow">
<el-cascader
v-model="dataForm.allDeptIdsShow"
:options="options"
:props="{ checkStrictly: true }"
clearable
></el-cascader>
<el-form-item label="所属机构"
prop="allDeptIdsShow">
<el-cascader v-model="dataForm.allDeptIdsShow"
:options="options"
:props="{ checkStrictly: true }"
clearable></el-cascader>
</el-form-item>
<el-form-item label="通知标题"
prop="noticeTitle">
@ -122,7 +121,7 @@ export default {
}
this.options = res.data.options
})
.catch(() => {})
.catch(() => { })
// 1169154711480528897 ID
this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))
},
@ -206,13 +205,12 @@ export default {
}).catch(() => { })
},
removeHTMLTag (str) {
str = str.replace(/<\/?[^>]*>/g, '')
str = str.replace(/[|]*\n/g, '\n')
str = str.replace(/&nbsp;/gi, '')
str = str.replace('<p><br></p>', '')
return str
},
//
dataFormSubmitHandle: debounce(function () {
console.log(this.dataForm.noticeContent)
if (this.dataForm.noticeContent != null && this.dataForm.noticeContent !== undefined) {
this.dataForm.noticeContent = this.removeHTMLTag(this.dataForm.noticeContent)
if ((this.dataForm.noticeContent).length > 10000) {

Loading…
Cancel
Save