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. 14
      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. 304
      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"
label="正文编辑">
<!-- 富文本编辑器, 容器 -->
<div id="J_quillEditor"></div>
<div id="J_quillEditor" class="ql-editor"></div>
<!-- 自定义上传图片功能 (使用element upload组件) -->
<el-upload :action="uploadUrl"
:show-file-list="false"

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

@ -11,43 +11,6 @@
:props="{ checkStrictly: true }"
clearable></el-cascader>
</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>
<span class="demonstration">提交时间</span>&nbsp;&nbsp;
<el-date-picker @change='setRegistTime'

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

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

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

@ -10,7 +10,7 @@
:options="options"
:props="{ checkStrictly: true }"
clearable></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item>
<el-input v-model="dataForm.noticeTitle"
placeholder="通知标题"
@ -19,16 +19,6 @@
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</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-table v-loading="dataListLoading"
:data="dataList"
@ -44,7 +34,7 @@
align="center"
width="350"></el-table-column>
<el-table-column prop="deptName"
label="通知所属部门"
label="发布部门"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="readingAmount"

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

@ -30,40 +30,6 @@
clearable
collapse-tags></el-cascader>
</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类型"
prop="bannerType">
<el-select v-model="dataForm.bannerType"

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

@ -15,40 +15,6 @@
clearable
collapse-tags></el-cascader>
</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-form-item label="类别"
@ -81,7 +47,7 @@
<el-form-item prop="newsContent"
label="正文编辑">
<!-- 富文本编辑器, 容器 -->
<div id="J_quillEditor"></div>
<div id="J_quillEditor" class="ql-editor"></div>
<!-- 自定义上传图片功能 (使用element upload组件) -->
<el-upload :action="uploadUrl"
:show-file-list="false"

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

@ -11,43 +11,6 @@
:props="{ checkStrictly: true }"
clearable></el-cascader>
</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>
<span class="demonstration">提交时间</span>&nbsp;&nbsp;
<el-date-picker @change='setRegistTime'

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

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

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

@ -47,179 +47,139 @@
</template>
<script>
import debounce from 'lodash/debounce'
import Cookies from "js-cookie";
import debounce from 'lodash/debounce'
import Cookies from 'js-cookie'
export default {
data() {
return {
visible: false,
dataForm: {
id: '',
policeName: '',
policeAvatar: '',
policeTel: '',
policeNo: '',
deptName: '',
deptId: '',
displayFlag: '1',
delFlag: '',
revision: '',
createdBy: '',
createdTime: '',
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})
}
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
policeName: '',
policeAvatar: '',
policeTel: '',
policeNo: '',
deptName: '',
deptId: '',
displayFlag: '1'
},
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' }
]
}
}
},
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>
<style scoped>
.avatar-uploader .el-upload {
@ -248,4 +208,4 @@
height: 178px;
display: block;
}
</style>
</style>

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

@ -174,7 +174,7 @@ export default {
this.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 }) => {
if (res.code !== 0) {
this.commentsDTOs = []
@ -188,18 +188,18 @@ export default {
deleteComment (val) {
this.$http['post'](
'/property/topiccomment/deleteComment', { commentIds: [val] }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
if (res.code !== 0) {
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'),
type: 'success',
duration: 500,
onClose: () => {
this.getCommentList()
}
})
}).catch(() => { })
})
}).catch(() => { })
}
}
}

Loading…
Cancel
Save