Files
UNION_NSI/target/classes/views/platform/proposal/transact/feedback.html
T
2026-09-08 19:49:21 +08:00

364 lines
17 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<proposal-search :page="pageForm" @search="doSearch" title="反馈"></proposal-search>
<el-card shadow="never" class="mt20">
<table-tool label="反馈评价" :app="this">
<template #func>
<!-- <el-button @click="oneKeyRemind" size="small" type="primary"-->
<!-- v-if="(${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')} && pageForm.isAudit==false)"-->
<!-- >一键提醒-->
<!-- </el-button>-->
</template>
</table-tool>
<el-table :data="tableData" align="center" header-align="center" :row-key="(row)=>{row.id}"
:size="tableSize"
@sort-change="pageOrder">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:label="column.label"
:width="column.width"
:prop="column.prop"
:sortable="column.sortable"
>
<template v-if="column.prop=='proposalName'" scope="{row}">
<el-link type="primary" @click="openView(row)">{{row.proposalName}}</el-link>
</template>
<template v-else-if="column.prop=='determineTypeCode'" scope="{row}">
{{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'?
'普通':'否'}}
</template>
<template v-else-if="column.prop=='isConjoin'" scope="{row}">
{{row.isConjoin?'是':'否'}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini">查看</el-button>
<el-button v-if="[proposal.FEEDBACKSCORE].includes(row.stateCode)"
@click="openFeedback(row)" size="mini" type="primary">反馈
</el-button>
<!-- <el-button @click="doExport(row)" type="primary" size="mini"-->
<!-- v-if="row.resultCode=='determine'&&row.stateCode==900">-->
<!-- 导出反馈单-->
<!-- </el-button>-->
<!-- <el-button v-if="row.canRollBack" @click="doWithdraw(row)" size="mini"-->
<!-- type="danger">撤回-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<proposal-info ref="audit" label="反馈评分" handle>
<template #handle>
<el-form :model="formData" ref="auditForm" :rules="formRules" label-width="150px">
<vi-title title="反馈评分信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="反馈人">
<el-input v-model="formData.username" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="feedbackTime" label="反馈时间">
<el-input v-model="formData.feedbackTime" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="feedbackCodeByUnderTake" label="承办单位办理态度">
<el-radio-group v-model="formData.feedbackCodeByUnderTake">
<el-radio v-for="item in feedbackOptionsByUnderTakeOptions" :label="item.code" border>
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="feedbackCode" label="办理结果评价">
<el-radio-group v-model="formData.feedbackCode">
<el-radio v-for="item in feedbackOptions" :label="item.code" border>{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="feedbackOpinion" label="反馈意见" class="is-required">
<div id="feedbackEditor"></div>
</el-form-item>
<!-- <el-form-item prop="files" label="附件上传">-->
<!-- <file-upload card :files.sync="formData.files"></file-upload>-->
<!-- </el-form-item>-->
<el-form-item v-if="isSign()" prop="scoreSign" label="签&emsp;&emsp;字">
<sign prefix="proposal" :qz.sync="formData.scoreSign"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button @click="$refs.guava.index()">取消</el-button>
<el-button type="primary" :disabled="submitDisabled" @click="doFeedback">提交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
<el-dialog :visible.sync="oneKeyRemindDialogVisible" title="一键提醒" width="60%" :close-on-click-modal="false"
top="50px">
<el-table :data="oneKeyTableData" ref="oneKeyRemindTable" size="small" max-height="500px">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="proposalCode" label="提案编号" show-overflow-tooltip></el-table-column>
<el-table-column prop="proposalName" label="提案名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="username" label="提案人" show-overflow-tooltip></el-table-column>
</el-table>
<el-row type="flex" justify="end" class="mt20">
<el-button @click="oneKeyRemindDialogVisible = false">取消</el-button>
<el-button @click="confirmOneKeyRemind" type="primary">确定</el-button>
</el-row>
</el-dialog>
</div>
<script>
let E = window.wangEditor
let feedbackEditor = null
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue')
},
data() {
let replyContentBrief = (rule, value, callback) => {
if (!this.formData.feedbackOpinion || !dd3s.html2txt(this.formData.feedbackOpinion)) {
// callback(new Error('请填写反馈意见'));
callback();
} else {
callback();
}
};
return {
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(700)
},
tableColumns: [
{prop: 'proposalCode', label: '提案编号', width: "120", sortable: true, disabled: true},
{prop: 'proposalName', label: '提案名称', width: "300", disabled: true},
{prop: 'username', label: '提案人', disabled: true},
{prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0},
{prop: 'typeName', label: '提案类型', sortable: true},
{prop: 'mannerCode', label: '提案方式编码', sortable: true, checked: 0},
{prop: 'mannerName', label: '提案方式', sortable: true},
{prop: 'resultName', label: '立案结果', sortable: true},
{prop: 'meetingName', label: '届次', sortable: true, checked: 0},
{prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
{prop: 'delegationName', label: '代表团', sortable: true, checked: 0},
{prop: 'isConjoin', label: '是否并案'},
// {prop: 'determineTypeCode', label: '是否重点'},
{prop: 'stateName', label: '提案状态', sortable: true},
],
organizerOptions: [],
feedbackOptions: [],
feedbackOptionsByUnderTakeOptions: [],
submitDisabled: false,
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
feedbackTime: moment().format('YYYY-MM-DD'),
feedbackCode: 'satisfied',
feedbackCodeByUnderTake: '很好'
},
formRules: {
// feedbackOpinion: [{validator: replyContentBrief, trigger: ['blur', 'change']}],
feedbackOpinion: [{required: false, trigger: ['blur', 'change']}],
feedbackCode: [{required: true, message: '请选择对办理结果的评价', trigger: ['blur', 'change']}],
feedbackCodeByUnderTake: [{
required: true,
message: '请选择对承办单位办理态度的评价',
trigger: ['blur', 'change']
}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
},
oneKeyRemindDialogVisible: false,
oneKeyTableData: []
}
},
methods: {
async oneKeyRemind() {
const {meetingId} = this.pageForm
if (!meetingId) {
this.notifyWarning('请先选择教代会届次')
return
}
const resp = await $.get(loc() + '/selectReadySendMsgUsers', {meetingId})
if (resp.code === 0) {
this.oneKeyRemindDialogVisible = true
this.oneKeyTableData = resp.data
} else {
this.notifyWarning(resp.msg)
}
},
async confirmOneKeyRemind() {
const selection = this.$refs.oneKeyRemindTable.selection
if (selection.length === 0) {
this.notifyWarning('请选择需要提醒的提案')
return
}
const confirm = await this.$confirm('确认要一键提醒未反馈评价的提案人吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (!confirm) return
const proposalIds = selection.map(v => v.id)
const resp = await $.post(loc() + '/oneKeyRemind', {proposalIds: JSON.stringify(proposalIds)})
if (resp.code === 0) {
this.oneKeyRemindDialogVisible = false
this.oneKeyTableData = []
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
},
dropdownCommand(command) {
const {type, data} = command
switch (type) {
case 'view':
this.openView(data);
break;
case 'audit':
this.openFeedback(data);
break;
case 'withdraw':
this.doWithdraw(data);
break;
}
},
doExport(row) {
window.open(loc() + "/doExport?proposalId=" + row.id)
},
async doWithdraw(row) {
const confirm = await this.$confirm('您是否需要撤回该提案?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doWithdraw', {
proposalId: row.id
})
loading.close()
this.submitDisabled = false
if(resp.code===0){
this.notifySuccess(resp.msg)
this.pageData()
this.$refs.guava.index()
}else{
this.notifyWarning(resp.msg)
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async openFeedback(row) {
this.formData.proposalId = row.id
this.organizerOptions = await proposal.findOrganizer(row.id)
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
setTimeout(() => {
$("#feedbackEditor").html("")
feedbackEditor = new E("#feedbackEditor")
feedbackEditor.config.onchange = (html) => {
this.formData.feedbackOpinion = html
}
feedbackEditor.create()
},500)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
async doFeedback() {
this.$refs["auditForm"].validate(async (valid) => {
if (valid) {
const confirm = await this.$confirm('您是否提交反馈?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
this.submitDisabled = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + '/doFeedback', {
feedback: JSON.stringify(this.formData),
scoreSign: this.formData.scoreSign
})
loading.close()
this.submitDisabled = false
if(resp.code===0){
this.notifySuccess(resp.msg)
this.pageData()
this.$refs.guava.index()
}else{
this.notifyWarning(resp.msg)
}
}
}
});
}
},
async created() {
await proposal.initData(this)
this.feedbackOptions = await getDictByCode("proposal_feedback")
this.feedbackOptionsByUnderTakeOptions = await getDictByCode('proposal_feedback_underTake')
}
})
</script>
<!--#
}
#-->