Browse Source

修改文本;修改富文本样式;其他

feature/yujt_analysis_pc
yujt 6 years ago
parent
commit
3ead8a7d00
  1. 2
      src/views/modules/news/allnews-add-or-update.vue
  2. 37
      src/views/modules/news/allnews.vue
  3. 4
      src/views/modules/news/allnotice-add-or-update.vue
  4. 12
      src/views/modules/news/allnotice.vue
  5. 34
      src/views/modules/news/banner-add-or-update.vue
  6. 36
      src/views/modules/news/news-publish.vue
  7. 37
      src/views/modules/news/newsdraft.vue
  8. 4
      src/views/modules/news/notice-add-or-update.vue
  9. 302
      src/views/modules/police/police-add-or-update.vue
  10. 24
      src/views/modules/police/topic-detail.vue

2
src/views/modules/news/allnews-add-or-update.vue

@ -28,7 +28,7 @@
<el-form-item prop="newsContent" <el-form-item prop="newsContent"
label="正文编辑"> label="正文编辑">
<!-- 富文本编辑器, 容器 --> <!-- 富文本编辑器, 容器 -->
<div id="J_quillEditor"></div> <div id="J_quillEditor" class="ql-editor"></div>
<!-- 自定义上传图片功能 (使用element upload组件) --> <!-- 自定义上传图片功能 (使用element upload组件) -->
<el-upload :action="uploadUrl" <el-upload :action="uploadUrl"
:show-file-list="false" :show-file-list="false"

37
src/views/modules/news/allnews.vue

@ -11,43 +11,6 @@
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
clearable></el-cascader> clearable></el-cascader>
</el-form-item> </el-form-item>
<!--<el-form-item label="所属街道"
prop="deptId">
<el-select v-model="dataForm.streetId"
@change="changeStreet"
clearable
placeholder="所属街道">
<el-option v-for="item in streetList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属社区">
<el-select v-model="dataForm.communityId"
@change="changeCommunity"
clearable
placeholder="所属社区">
<el-option v-for="item in communityList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属网格">
<el-select v-model="dataForm.gridId"
@change="changeGrid"
clearable
placeholder="所属网格">
<el-option v-for="item in gridList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>-->
<br> <br>
<span class="demonstration">提交时间</span>&nbsp;&nbsp; <span class="demonstration">提交时间</span>&nbsp;&nbsp;
<el-date-picker @change='setRegistTime' <el-date-picker @change='setRegistTime'

4
src/views/modules/news/allnotice-add-or-update.vue

@ -7,7 +7,7 @@
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="所属机构" <el-form-item label="发布部门"
prop="allDeptIdsShow"> prop="allDeptIdsShow">
<el-form-item> <el-form-item>
{{dataForm.allDeptNames}} {{dataForm.allDeptNames}}
@ -23,7 +23,7 @@
label="通知内容"> label="通知内容">
<el-row style="height: 550px;"> <el-row style="height: 550px;">
<!-- 富文本编辑器, 容器 --> <!-- 富文本编辑器, 容器 -->
<div id="J_quillEditor" <div id="J_quillEditor" class="ql-editor"
style="height: 500px;"></div> style="height: 500px;"></div>
</el-row> </el-row>
<!-- 自定义上传图片功能 (使用element upload组件) --> <!-- 自定义上传图片功能 (使用element upload组件) -->

12
src/views/modules/news/allnotice.vue

@ -19,16 +19,6 @@
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
<!-- <el-form-item>
<el-button v-if="$hasPermission('news:notice:save')"
type="primary"
@click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('news:notice:delete')"
type="danger"
@click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item> -->
</el-form> </el-form>
<el-table v-loading="dataListLoading" <el-table v-loading="dataListLoading"
:data="dataList" :data="dataList"
@ -44,7 +34,7 @@
align="center" align="center"
width="350"></el-table-column> width="350"></el-table-column>
<el-table-column prop="deptName" <el-table-column prop="deptName"
label="通知所属部门" label="发布部门"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="readingAmount" <el-table-column prop="readingAmount"

34
src/views/modules/news/banner-add-or-update.vue

@ -30,40 +30,6 @@
clearable clearable
collapse-tags></el-cascader> collapse-tags></el-cascader>
</el-form-item> </el-form-item>
<!--<el-form-item label="所属街道"
prop="streetId">
<el-select v-model="dataForm.streetId"
@change="changeStreet"
placeholder="所属街道">
<el-option v-for="item in streetList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属社区">
<el-select v-model="dataForm.communityId"
@change="changeCommunity"
placeholder="所属社区">
<el-option v-for="item in communityList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属网格">
<el-select v-model="dataForm.gridId"
@change="changeGrid"
placeholder="所属网格">
<el-option v-for="item in gridList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>-->
<el-form-item label="banner类型" <el-form-item label="banner类型"
prop="bannerType"> prop="bannerType">
<el-select v-model="dataForm.bannerType" <el-select v-model="dataForm.bannerType"

36
src/views/modules/news/news-publish.vue

@ -15,40 +15,6 @@
clearable clearable
collapse-tags></el-cascader> collapse-tags></el-cascader>
</el-form-item> </el-form-item>
<!--<el-form-item label="所属街道"
prop="streetId">
<el-select v-model="dataForm.streetId"
@change="changeStreet"
placeholder="所属街道">
<el-option v-for="item in streetList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属社区">
<el-select v-model="dataForm.communityId"
@change="changeCommunity"
placeholder="所属社区">
<el-option v-for="item in communityList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属网格">
<el-select v-model="dataForm.gridId"
@change="changeGrid"
placeholder="所属网格">
<el-option v-for="item in gridList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>-->
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="类别" <el-form-item label="类别"
@ -81,7 +47,7 @@
<el-form-item prop="newsContent" <el-form-item prop="newsContent"
label="正文编辑"> label="正文编辑">
<!-- 富文本编辑器, 容器 --> <!-- 富文本编辑器, 容器 -->
<div id="J_quillEditor"></div> <div id="J_quillEditor" class="ql-editor"></div>
<!-- 自定义上传图片功能 (使用element upload组件) --> <!-- 自定义上传图片功能 (使用element upload组件) -->
<el-upload :action="uploadUrl" <el-upload :action="uploadUrl"
:show-file-list="false" :show-file-list="false"

37
src/views/modules/news/newsdraft.vue

@ -11,43 +11,6 @@
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
clearable></el-cascader> clearable></el-cascader>
</el-form-item> </el-form-item>
<!--<el-form-item label="所属街道"
prop="deptId">
<el-select v-model="dataForm.streetId"
clearable
@change="changeStreet"
placeholder="所属街道">
<el-option v-for="item in streetList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属社区">
<el-select v-model="dataForm.communityId"
@change="changeCommunity"
clearable
placeholder="所属社区">
<el-option v-for="item in communityList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属网格">
<el-select v-model="dataForm.gridId"
@change="changeGrid"
clearable
placeholder="所属网格">
<el-option v-for="item in gridList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>-->
<br> <br>
<span class="demonstration">提交时间</span>&nbsp;&nbsp; <span class="demonstration">提交时间</span>&nbsp;&nbsp;
<el-date-picker @change='setRegistTime' <el-date-picker @change='setRegistTime'

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

@ -7,7 +7,7 @@
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="所属机构" <el-form-item label="所属部门"
prop="allDeptIdsShow"> prop="allDeptIdsShow">
<el-cascader v-model="dataForm.allDeptIdsShow" <el-cascader v-model="dataForm.allDeptIdsShow"
:options="options" :options="options"
@ -26,7 +26,7 @@
label="内容"> label="内容">
<el-row style="height: 550px;"> <el-row style="height: 550px;">
<!-- 富文本编辑器, 容器 --> <!-- 富文本编辑器, 容器 -->
<div id="J_quillEditor" <div id="J_quillEditor" class="ql-editor"
style="height: 500px;"></div> style="height: 500px;"></div>
</el-row> </el-row>
<!-- 自定义上传图片功能 (使用element upload组件) --> <!-- 自定义上传图片功能 (使用element upload组件) -->

302
src/views/modules/police/police-add-or-update.vue

@ -47,179 +47,139 @@
</template> </template>
<script> <script>
import debounce from 'lodash/debounce' import debounce from 'lodash/debounce'
import Cookies from "js-cookie"; import Cookies from 'js-cookie'
export default { export default {
data() { data () {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: '', id: '',
policeName: '', policeName: '',
policeAvatar: '', policeAvatar: '',
policeTel: '', policeTel: '',
policeNo: '', policeNo: '',
deptName: '', deptName: '',
deptId: '', deptId: '',
displayFlag: '1', displayFlag: '1'
delFlag: '', },
revision: '', options: [],
createdBy: '', loading: false,
createdTime: '', uploadUrl: ''
updatedBy: '',
updatedTime: '',
allDeptIds: '',
allDeptNames: '',
parentDeptIds: '',
parentDeptNames: ''
},
options: [],
loading: false,
uploadUrl: '',
}
},
created() {
this.$nextTick(() => {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
})
},
computed: {
dataRule() {
return {
policeName: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
policeAvatar: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
policeTel: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
policeNo: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
deptName: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
deptId: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
displayFlag: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
delFlag: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
revision: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
createdBy: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
createdTime: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
updatedBy: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
updatedTime: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
allDeptIds: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
allDeptNames: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
parentDeptIds: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
],
parentDeptNames: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
]
}
}
},
methods: {
init() {
//
this.getByLoginUser();
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getByLoginUser() {
this.$http
.get(`/sys/user/deptOptions/getMiddleByLoginUser`)
.then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.loading = false
this.options = res.data.options
})
.catch(() => {
this.loading = false
})
},
//
getInfo() {
this.$http.get(`/property/police/${this.dataForm.id}`).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {
})
},
deptHandleChange(value) {
this.dataForm.deptId = value.slice(-1).shift();
},
handleAvatarActSuccess(res, file) {
this.loading = false
this.dataForm.policeAvatar = res.data.url
},
beforeAvatarUpload(file) {
this.loading = true
},
handelError() {
this.loading = false
},
//
dataFormSubmitHandle: debounce(function () {
this.dataForm.deptName = this.$refs['grid'].inputValue;
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/property/police/', this.dataForm).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {
})
})
}, 1000, {'leading': true, 'trailing': false})
}
} }
},
created () {
this.$nextTick(() => {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
})
},
computed: {
dataRule () {
return {
policeName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
policeAvatar: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
policeTel: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
policeNo: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
displayFlag: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
//
this.getByLoginUser()
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getByLoginUser () {
this.$http
.get(`/sys/user/deptOptions/getMiddleByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.loading = false
this.options = res.data.options
})
.catch(() => {
this.loading = false
})
},
//
getInfo () {
this.$http.get(`/property/police/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {
})
},
deptHandleChange (value) {
this.dataForm.deptId = value.slice(-1).shift()
},
handleAvatarActSuccess (res, file) {
this.loading = false
this.dataForm.policeAvatar = res.data.url
},
beforeAvatarUpload (file) {
this.loading = true
},
handelError () {
this.loading = false
},
//
dataFormSubmitHandle: debounce(function () {
this.dataForm.deptName = this.$refs['grid'].inputValue
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/property/police/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {
})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script> </script>
<style scoped> <style scoped>
.avatar-uploader .el-upload { .avatar-uploader .el-upload {

24
src/views/modules/police/topic-detail.vue

@ -174,7 +174,7 @@ export default {
this.getCommentList() this.getCommentList()
}, },
getCommentList () { getCommentList () {
this.$http.get('/property/topiccomment/comments', { params: { id: this.dataForm.id, order: this.order, orderField: this.orderField, page: this.pageIndex, limit: this.limitVal } this.$http.get('/property/topiccomment/comments', { params: { id: this.dataForm.id, order: this.order, orderField: this.orderField, page: this.pageIndex, limit: this.limitVal }
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.commentsDTOs = [] this.commentsDTOs = []
@ -188,18 +188,18 @@ export default {
deleteComment (val) { deleteComment (val) {
this.$http['post']( this.$http['post'](
'/property/topiccomment/deleteComment', { commentIds: [val] }).then(({ data: res }) => { '/property/topiccomment/deleteComment', { commentIds: [val] }).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.getCommentList()
} }
this.$message({ })
message: this.$t('prompt.success'), }).catch(() => { })
type: 'success',
duration: 500,
onClose: () => {
this.getCommentList()
}
})
}).catch(() => { })
} }
} }
} }

Loading…
Cancel
Save