Browse Source

bug修改

master
王金鹏 6 years ago
parent
commit
a699dbf4f9
  1. 5
      src/views/modules/events/eventcategory-add-or-update.vue
  2. 6
      src/views/modules/events/issue-detail.vue
  3. 31
      src/views/modules/events/item-deal-detail.vue
  4. 4
      src/views/modules/events/item-detail.vue

5
src/views/modules/events/eventcategory-add-or-update.vue

@ -2,7 +2,7 @@
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="dataForm.categoryName" placeholder="分类名称"></el-input>
<el-input v-model="dataForm.categoryName" placeholder="不能超过10个字"></el-input>
</el-form-item>
<el-form-item label="类别编码" prop="categoryCode">
<el-select v-model="dataForm.categoryCode" placeholder="请选择">
@ -82,6 +82,9 @@ export default {
if (!valid) {
return false
}
if (this.dataForm.categoryName.length > 10) {
return this.$message.error('分类名称不得超过10个字')
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/events/eventcategory/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)

6
src/views/modules/events/issue-detail.vue

@ -35,11 +35,9 @@
<el-collapse v-for="(commentsDTO, index) in commentsDTOs" :key="index" :name="index">
<el-collapse-item>
<template slot="title" style="height: 100px">
<span>
{{commentsDTO.content}}
</span>
<span>{{commentsDTO.user.userName + ':'}}{{commentsDTO.content}}</span>
</template>
<div>{{commentsDTO.replyComment ? commentsDTO.replyComment.content : ''}}</div>
<div>{{commentsDTO.replyComment ? commentsDTO.replyComment.userName + ':' : ''}}{{commentsDTO.replyComment ? commentsDTO.replyComment.content : ''}}</div>
</el-collapse-item>
<el-button @click="deleteComment(commentsDTO.commentId)">屏蔽评论</el-button>
</el-collapse>

31
src/views/modules/events/item-deal-detail.vue

@ -1,6 +1,6 @@
<template>
<el-dialog :visible.sync="visible" :title="$t('deal')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '180px' : '140px'">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '180px' : '140px'">
<el-form-item label="发布人:" prop="nickName">
<div>{{dataForm.nickName}}</div>
</el-form-item>
@ -30,10 +30,10 @@
</el-timeline-item>
</el-timeline>
</el-form-item>
<el-form-item label="处理意见(内部):" prop="handleAdvice" :required="true">
<el-form-item label="处理意见(内部):" prop="handleAdvice">
<el-input v-model="postDataForm.handleAdvice" placeholder="不超过500字"></el-input>
</el-form-item>
<el-form-item label="处理意见(外部):" prop="outHandleAdvice" :required="true">
<el-form-item label="处理意见(外部):" prop="outHandleAdvice">
<el-input v-model="postDataForm.outHandleAdvice" placeholder="不超过500字"></el-input>
</el-form-item>
<el-form-item label="处理:" prop="handleCategory" :required="true">
@ -112,7 +112,25 @@ export default {
evaluateDeptDTOSVisible: false
}
},
computed: {
dataRule () {
return {
handleAdvice: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
outHandleAdvice: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
watch: {
'postDataForm.handleAdvice': function (val) {
this.dataForm.handleAdvice = val
},
'postDataForm.outHandleAdvice': function (val) {
this.dataForm.outHandleAdvice = val
},
'postDataForm.handleCategory': function (val) {
if (val === 1) {
this.deptResultDTOSVisible = true
@ -169,7 +187,6 @@ export default {
//
dataFormSubmitHandle: debounce(function () {
this.postDataForm.id = this.dataForm.id
this.postDataForm.evaluateDeptDTOS = this.dataForm.evaluateDeptDTOS
if (this.postDataForm.handleAdvice === '') {
return this.$message.error('内部处理意见不能为空')
}
@ -189,12 +206,16 @@ export default {
if (this.postDataForm.deptResultDTOS === undefined || this.postDataForm.deptResultDTOS.length <= 0) {
return this.$message.error('请选择流转对象')
}
this.postDataForm.evaluateDeptDTOS = []
} else {
this.postDataForm.deptResultDTOS = []
}
if (this.postDataForm.evaluateDeptDTOSVisible) {
this.postDataForm.evaluateDeptDTOS = this.dataForm.evaluateDeptDTOS
if (this.postDataForm.evaluateDeptDTOS.length !== this.dataForm.evaluateDeptDTOS.length) {
return this.$message.error('请完善满意度调查')
}
} else {
this.postDataForm.evaluateDeptDTOS = []
}
this.$http['post'](
'/events/item/itemHandleSubmit', this.postDataForm).then(({ data: res }) => {

4
src/views/modules/events/item-detail.vue

@ -35,9 +35,9 @@
<el-collapse v-for="(commentsDTO, index) in commentsDTOs" :key="index" :name="index">
<el-collapse-item>
<template slot="title">
{{commentsDTO.content}}
{{commentsDTO.user.userName + ':'}}{{commentsDTO.content}}
</template>
<div>{{commentsDTO.replyComment ? commentsDTO.replyComment.content : ''}}</div>
<div>{{commentsDTO.replyComment.userName + ':'}}{{commentsDTO.replyComment ? commentsDTO.replyComment.content : ''}}</div>
</el-collapse-item>
<el-button @click="deleteComment(commentsDTO.commentId)">屏蔽评论</el-button>
</el-collapse>

Loading…
Cancel
Save