Browse Source

项目处理进展编辑,增加 满意度评价

master
zhangyongzhangyong 4 years ago
parent
commit
fd745c4559
  1. 38
      src/views/modules/events/edit-process-progress.vue
  2. 119
      src/views/modules/events/item-process-progress-list.vue

38
src/views/modules/events/edit-process-progress.vue

@ -4,12 +4,12 @@
<el-form :model="item" ref="item" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'" style="padding-bottom: 60px"> <el-form :model="item" ref="item" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'" style="padding-bottom: 60px">
<div style="padding-bottom: 20px"> <div style="padding-bottom: 20px">
<div <div
:style="{marginBottom: '10px', width: '35px', height: '20px', fontSize: '12px', borderRadius: '4px', background: item.handleType === 'project' ? '#009688': item.handleType === 'issue' || item.handleType === 'issue-project' || item.handleType === 'event-issue' ? '#ffa546' : item.handleType === 'event' || item.handleType === 'event-issue'? '#46A3FF' : '', color: '#fff', textAlign: 'center', lineHeight: '20px'}" :style="{marginBottom: '10px', width: '35px', height: '20px', fontSize: '12px', borderRadius: '4px', background: item.handleType === 'project' || item.handleType === 'project-evaluation' ? '#009688': item.handleType === 'issue' || item.handleType === 'issue-project' || item.handleType === 'event-issue' ? '#ffa546' : item.handleType === 'event' || item.handleType === 'event-issue'? '#46A3FF' : '', color: '#fff', textAlign: 'center', lineHeight: '20px'}"
style="display: inline-block !important"> style="display: inline-block !important">
{{item.handleType === 'project' ? '项目': item.handleType === 'issue' || item.handleType === 'issue-project' || item.handleType === 'event-issue' ? '议题' : item.handleType === 'event' ? '事件' : ''}} {{item.handleType === 'project' || item.handleType === 'project-evaluation' ? '项目': item.handleType === 'issue' || item.handleType === 'issue-project' || item.handleType === 'event-issue' ? '议题' : item.handleType === 'event' ? '事件' : ''}}
</div> </div>
<span style="padding-left: 36px; font-weight: bold; color: rgb(96, 98, 102);">[ {{item | formatState}} ]</span> <span style="padding-left: 36px; font-weight: bold; color: rgb(96, 98, 102);">[ {{item | formatState}} ]</span>
<span v-if="item.handleType != 'event'" style="padding-left: 36px">处理部门 {{item.handlerDept}}</span> <span v-if="item.handleType != 'event' && item.handleType != 'project-evaluation'" style="padding-left: 36px">处理部门 {{item.handlerDept}}</span>
<span v-if="item.handleType === 'event'" style="padding-left: 36px">事件内容 {{item.eventContent}}</span> <span v-if="item.handleType === 'event'" style="padding-left: 36px">事件内容 {{item.eventContent}}</span>
</div> </div>
<el-form-item :label="item.handleType != 'event' ? '操作时间' : '发布时间'"> <el-form-item :label="item.handleType != 'event' ? '操作时间' : '发布时间'">
@ -21,10 +21,14 @@
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="item.handleType === 'project' || item.handleType === 'issue-project' ? '项目处理意见' : '意见'" v-if="item.handleType != 'event'"> <el-form-item label="评价得分" v-if="item.handleType === 'project-evaluation'">
<el-input v-model="item.advice" maxlength="500" show-word-limit></el-input> <el-rate v-model="item.evaluationScore" show-text :texts="rateText" :max="3">
</el-rate>
</el-form-item> </el-form-item>
<el-form-item :label="item.handleType === 'project' || item.handleType === 'issue-project' ? '项目处理图片' : '图片'" v-if="item.handleType != 'event'"> <el-form-item :label="item.handleType === 'project' || item.handleType === 'issue-project' ? '项目处理意见' : item.handleType === 'project-evaluation' ? '评价内容' :'意见'" v-if="item.handleType != 'event'">
<el-input v-model="item.advice" maxlength="100" show-word-limit></el-input>
</el-form-item>
<el-form-item :label="item.handleType === 'project' || item.handleType === 'issue-project' ? '项目处理图片' : '图片'" v-if="item.handleType != 'event' && item.handleType != 'project-evaluation'">
<el-upload list-type="picture-card" <el-upload list-type="picture-card"
:limit=3 :limit=3
:action="uploadUrl" :action="uploadUrl"
@ -35,10 +39,10 @@
<i slot="default" class="el-icon-plus"></i> <i slot="default" class="el-icon-plus"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="回复居民意见" v-if="item.handleType != 'event' && item.handleType != 'event-issue' && item.handleType != 'issue'"> <el-form-item label="回复居民意见" v-if="item.handleType != 'event' && item.handleType != 'event-issue' && item.handleType != 'issue' && item.handleType != 'project-evaluation'">
<el-input v-model="item.outAdvice" maxlength="500" show-word-limit></el-input> <el-input v-model="item.outAdvice" maxlength="500" show-word-limit></el-input>
</el-form-item> </el-form-item>
<el-form-item label="回复居民图片" v-if="item.handleType != 'event' && item.handleType != 'event-issue' && item.handleType != 'issue'"> <el-form-item label="回复居民图片" v-if="item.handleType != 'event' && item.handleType != 'event-issue' && item.handleType != 'issue' && item.handleType != 'project-evaluation'">
<el-upload list-type="picture-card" <el-upload list-type="picture-card"
:limit=3 :limit=3
:action="uploadUrl" :action="uploadUrl"
@ -75,7 +79,13 @@ export default {
// //
processProgress: [], processProgress: [],
isDisabled: false, isDisabled: false,
isLoading: false isLoading: false,
rateText: [
'不满意',
'基本满意',
'非常满意'
],
iconClasses: ['icon-rate-face-1', 'icon-rate-face-2', 'icon-rate-face-3']
} }
}, },
filters: { filters: {
@ -114,6 +124,9 @@ export default {
} else if (item.handleType === 'event') { } else if (item.handleType === 'event') {
item.stateName = '事件发布' item.stateName = '事件发布'
return '事件发布' return '事件发布'
} else if (item.handleType === 'project-evaluation') {
item.stateName = '满意度评价'
return '满意度评价'
} }
} }
}, },
@ -316,3 +329,10 @@ export default {
} }
} }
</style> </style>
<style lang="scss" scoped>
/deep/ .el-rate__icon {
font-size: 34px;
margin-right: 40px;
}
</style>

119
src/views/modules/events/item-process-progress-list.vue

@ -15,35 +15,13 @@
> >
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="项目编号" prop="itemCode"> <el-form-item label="项目内容" prop="itemContent">
<el-input <el-input
v-model="dataForm.itemCode" v-model="dataForm.itemContent"
placeholder="请输入项目编号" placeholder="请输入项目内容"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="时间" prop="startTime">
<el-date-picker
v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="至" label-width="25px" prop="endTime">
<el-date-picker
v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间"
>
</el-date-picker>
</el-form-item>
<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>
@ -63,26 +41,27 @@
width="50" width="50"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip prop="grid"
prop="itemContent" label="所属网格"
label="项目内容"
header-align="center" header-align="center"
min-width="400" min-width="400"
align="left" align="left"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="itemCode" prop="itemState"
label="项目编号" label="项目状态"
header-align="center" header-align="center"
width="142" min-width="400"
align="center" align="left"
:formatter="showItemStateNameFormatter"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="createdTime" show-overflow-tooltip
label="转成项目时间" prop="itemContent"
label="项目内容"
header-align="center" header-align="center"
width="180" min-width="400"
align="center" align="left"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="nickName" prop="nickName"
@ -92,37 +71,6 @@
align="center" align="center"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
prop="participantsNum"
label="参与人数"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="approveNum"
label="支持人数"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="opposeNum"
label="不支持人数"
header-align="center"
width="95"
align="center"
></el-table-column>
<el-table-column
prop="commentNum"
label="评论人数"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="browseNum"
label="浏览数"
header-align="center"
align="center"
></el-table-column>
<el-table-column <el-table-column
:label="$t('handle')" :label="$t('handle')"
fixed="right" fixed="right"
@ -179,27 +127,23 @@ export default {
streetId: '', streetId: '',
communityId: '', communityId: '',
gridId: '', gridId: '',
itemCode: '' itemCode: '',
itemContent: ''
}, },
ids: [], ids: [],
options: [], options: [],
editVisible: false, editVisible: false,
pickerBeginDateBefore: { itemStateOptions: [{
disabledDate: time => { value: '0',
let beginDateVal = this.dataForm.startTime label: '处理中'
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal).getTime()
}
}
}, },
pickerBeginDateAfter: { {
disabledDate: time => { value: '5',
let EndDateVal = this.dataForm.endTime label: '已关闭'
if (EndDateVal) { }, {
return time.getTime() < new Date(EndDateVal).getTime() value: '10',
} label: '已结案'
} }]
}
} }
}, },
components: { components: {
@ -233,6 +177,15 @@ export default {
} }
}, },
methods: { methods: {
showItemStateNameFormatter: function (row, column) {
if (row.itemState) {
let dict = this.itemStateOptions.filter(item => item.value === row.itemState)[0]
if (dict) {
return dict.label
}
}
return ''
},
editAction (id) { editAction (id) {
this.editVisible = true this.editVisible = true
this.$nextTick(() => { this.$nextTick(() => {

Loading…
Cancel
Save