Browse Source

项目管理

master
王金鹏 6 years ago
parent
commit
c0fce5e244
  1. 12
      src/views/modules/events/item-close.vue
  2. 58
      src/views/modules/events/item-deal-detail.vue
  3. 136
      src/views/modules/events/item-detail.vue

12
src/views/modules/events/item-close.vue

@ -68,7 +68,7 @@
<el-table-column prop="browseNum" label="浏览数" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('events:item:look')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('look') }}</el-button>
<el-button v-if="$hasPermission('events:item:look')" type="text" size="small" @click="detailAction(scope.row.id)">{{ $t('look') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -81,12 +81,14 @@
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<detail v-if="detailVisible" ref="detail" @refreshDataList="getDataList"></detail>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import Detail from './item-detail'
export default {
mixins: [mixinViewModule],
data () {
@ -126,11 +128,19 @@ export default {
}
},
components: {
Detail
},
created: function () {
this.getStreetList()
},
methods: {
detailAction (id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.detail.dataForm.id = id
this.$refs.detail.init()
})
},
getStreetList () {
this.$http.get(`/sys/dept/sublist/1169154711480528897`).then(({ data: res }) => {
if (res.code !== 0) {

58
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" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '130px' : '90px'">
<el-form-item label="发布人" prop="nickName">
<p>{{dataForm.nickName}}</p>
</el-form-item>
@ -40,6 +40,19 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="流转对象" prop="deptResultDTOS" v-if="deptResultDTOSVisible">
<el-checkbox-group v-model="this.deptResultDTOSForm">
<el-checkbox v-for="deptResultDTO in dataForm.deptResultDTOS" :label="deptResultDTO" :key="deptResultDTO.deptName">{{deptResultDTO.deptName}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="满意度评价" prop="evaluateDeptDTOS" v-if="evaluateDeptDTOSVisible">
<div v-for="evaluateDeptDTO in dataForm.evaluateDeptDTOS" :key="evaluateDeptDTO.deptName">
<label>{{evaluateDeptDTO.deptName}}</label><br>
<el-select @change="changeHandler($event,evaluateDeptDTO)" v-model="evaluateDeptDTO.evaluationLevel">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
@ -61,7 +74,21 @@ export default {
handleCategory: '',
deptResultDTOS: [],
evaluateDeptDTOS: []
}
},
options: [{
value: '2',
label: '满意'
}, {
value: '1',
label: '基本满意'
}, {
value: '0',
label: '不满意'
}],
deptResultDTOSVisible: false,
evaluateDeptDTOSVisible: false,
deptResultDTOSForm: [],
evaluateDeptDTOSForm: []
}
},
computed: {
@ -79,6 +106,23 @@ export default {
}
}
},
watch: {
'dataForm.handleCategory': function (val) {
if (val === 1) {
this.deptResultDTOSVisible = true
this.evaluateDeptDTOSVisible = false
} else if (val === 10) {
if (this.dataForm.evaluateDeptDTOS.length === 0) {
return
}
this.evaluateDeptDTOSVisible = true
this.deptResultDTOSVisible = false
} else {
this.evaluateDeptDTOSVisible = false
this.deptResultDTOSVisible = false
}
}
},
methods: {
init () {
this.visible = true
@ -89,6 +133,10 @@ export default {
}
})
},
changeHandler (event, index) {
console.log(event)
console.log(index)
},
//
getInfo () {
this.$http.get(`/events/item/${this.dataForm.id}`).then(({ data: res }) => {
@ -99,6 +147,12 @@ export default {
...this.dataForm,
...res.data
}
for (let index = 0; index < res.data.handleResultDTOS.length; index++) {
const handleResultDTO = res.data.handleResultDTOS[index]
if (handleResultDTO.select === true) {
this.dataForm.handleCategory = handleResultDTO.processResult
}
}
}).catch(() => {})
},
//

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

@ -0,0 +1,136 @@
<template>
<el-dialog :visible.sync="visible" :title="$t('look')" :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' ? '120px' : '80px'">
<el-form-item label="发布人">
<p>{{dataForm.nickName}}</p>
</el-form-item>
<el-form-item label="发布时间">
<p>{{dataForm.distributeTime}}</p>
</el-form-item>
<el-form-item label="议题内容">
<p>{{dataForm.itemContent}}</p>
</el-form-item>
<el-form-item>
<span>支持 {{dataForm.approveNum}}</span>
<span>反对 {{dataForm.opposeNum}}</span>
<span>评论 {{dataForm.commentNum}}</span>
</el-form-item>
<el-form-item label="工作反馈">
<el-timeline :reverse="false">
<el-timeline-item v-for="(handleProgressResultDTO, index) in dataForm.handleProgressResultDTOS" :key="index" :timestamp="handleProgressResultDTO.createdTime" placement="top">
<el-card>
<p>{{handleProgressResultDTO.progressName}}{{handleProgressResultDTO.createdTime}}</p>
<p>{{handleProgressResultDTO.advice}}</p>
</el-card>
</el-timeline-item>
</el-timeline>
</el-form-item>
<el-form-item label="评论">
<el-collapse v-for="(commentsDTO, index) in commentsDTOs" :key="index" :name="index">
<el-collapse-item>
<template slot="title">
{{commentsDTO.content}}
</template>
<div>{{commentsDTO.replyComment ? commentsDTO.replyComment.content : ''}}</div>
</el-collapse-item>
<el-button @click="deleteComment(commentsDTO.commentId)">屏蔽评论</el-button>
</el-collapse>
<el-pagination
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="limitVal"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew">
</el-pagination>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
</template>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
nickName: '',
distributeTime: '',
itemContent: '',
handleProgressResultDTOS: []
},
order: '',
orderField: '',
pageIndex: 1,
limitVal: 10,
total: 0,
commentsDTOs: []
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
this.getCommentList()
}
})
},
deleteComment (val) {
this.$http['post'](
'/events/item/deleteComment', { commentIds: [val] }).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.getCommentList()
}
})
}).catch(() => {})
},
getInfo () {
this.$http.get(`/events/item/contentDetail/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
pageSizeChangeHandleNew (val) {
this.pageIndex = 1
this.limitVal = val
this.getCommentList()
},
pageCurrentChangeHandleNew (val) {
this.pageIndex = val
this.getCommentList()
},
getCommentList () {
this.$http.get('/events/item/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 = []
this.total = 0
return this.$message.error(res.msg)
}
this.commentsDTOs = res.data.list
this.total = res.data.total
}).catch(() => {})
}
}
}
</script>
Loading…
Cancel
Save