first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -0,0 +1,484 @@
<!--#
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 class="mt20" shadow="never">
<table-tool :app="this" label="答复列表">
<template #tips>
<!-- <span>温馨提醒:协</span>-->
</template>
<template #func>
<el-button :disabled="proTableSelection.length===0" @click="forwardReply" size="small"
type="primary"
v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}">转交答复
</el-button>
</template>
</table-tool>
<el-table :data="tableData"
:size="tableSize" :tree-props="{children: 'children'}"
@selection-change="handleSelectionChange" @sort-change="pageOrder"
align="center"
header-align="center"
ref="proTable" row-key="replyId">
<el-table-column
:selectable="(row)=>{return !row.isReply}"
reserve-selection
type="selection"
v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}"
width="55">
</el-table-column>
<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="column.align?column.align:'center'"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='proposalName'">
<el-link @click="openView(row)" type="primary">{{ row.proposalName }}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='isReply'">
<span class="text-success" v-if="row.isReply">已答复</span>
<span class="text-danger" v-else>未答复</span>
</template>
<template scope="{row}" v-else-if="column.prop=='determineTypeCode'">
{{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'?
'普通':'否'}}
</template>
<template scope="{row}" v-else-if="column.prop=='isConjoin'">
{{row.isConjoin?'是':'否'}}
</template>
<template scope="{row}" v-else-if="column.prop==='isForward'">
<span class="text-primary" v-if="row.isForward">是({{row.proxyReplyUserName}}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column :width="200" align="center" fixed="right"
header-align="center"
label="操作">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<!-- <el-button @click="doHandleExport(row)" type="primary" size="mini"-->
<!-- v-if="pageForm.isAudit==null">-->
<!-- 导出办理单-->
<!-- </el-button>-->
<el-button @click="openAudit(row)" size="mini" type="primary" v-if="!row.isReply">答复
</el-button>
<!-- <el-button @click="doReplyExport(row)" type="primary" size="mini"-->
<!-- v-if="!pageForm.isAudit&&row.isReply">导出回复书-->
<!-- </el-button>-->
<el-button
@click="doRollBack(row)"
size="mini" type="danger"
v-if="row.isReply && ([proposal.LEADERAUDIT, proposal.UNITREPLY].includes(row.stateCode)) && row.leaderId == null">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit_func>
<el-button :disabled="submitDisabled" @click="doReply(true)" type="primary">保 存</el-button>
<el-button :disabled="submitDisabled" @click="doReply(false)" type="primary">提 交</el-button>
</template>
<template #edit>
<proposal-info handle label="答复信息" ref="audit">
<template #handle>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
<vi-title :title="proTableData.length > 1 ? '并案信息' : '提案信息'"></vi-title>
<el-form-item>
<el-table :data="proTableData" style="width: 100%"
tooltip-effect="dark">
<el-table-column align="left" header-align="left" label="提案编号"
prop="proposalCode"></el-table-column>
<el-table-column align="left" header-align="left" label="提案人"
prop="username"
show-overflow-tooltip></el-table-column>
<el-table-column align="left" header-align="left" label="提案名称" prop="proposalName"
show-overflow-tooltip>
<template slot-scope="{row}">
<span @click="openView(row)"
style="color: #236eb4; cursor: pointer; text-decoration: underline">{{row.proposalName}}</span>
</template>
</el-table-column>
</el-table>
</el-form-item>
<vi-title title="答复信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="答复人" prop="username">
<el-input readonly v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="答复时间" prop="replyTime">
<el-input readonly v-model="formData.replyTime"></el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="currentRowResultCode==='determine'">
<el-form-item label="落实情况" prop="implementState">
<el-radio-group v-model="formData.implementState">
<el-radio :label="o.name" border v-for="o in implementStates">{{o.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item class="is-required" label="答复内容" prop="replyContent">
<div id="replyContentEditor"></div>
</el-form-item>
<el-form-item label="附件上传" prop="files">
<file-upload :files.sync="formData.replyFiles" card></file-upload>
</el-form-item>
<el-form-item label="签&emsp;&emsp;字" prop="replySign" v-if="isSign()">
<sign :qz.sync="formData.replySign" prefix="proposal"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right">
<el-button :disabled="submitDisabled" @click="doReply(true)" type="primary">保 存</el-button>
<el-button :disabled="submitDisabled" @click="doReply(false)" type="primary">提 交</el-button>
</el-row>
</el-form>
</template>
</proposal-info>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
<el-dialog :close-on-click-modal="false" :visible.sync="forwardDialog" title="转交答复" top="50px" width="60%">
<vi-title title="已选提案"></vi-title>
<el-table :data="proTableSelection" max-height="350">
<el-table-column label="提案编号" prop="proposalCode"></el-table-column>
<el-table-column label="提案名称" prop="proposalName"></el-table-column>
<el-table-column label="承办单位" prop="underTakeName"></el-table-column>
<el-table-column label="承办类型" prop="undertakeType"></el-table-column>
<el-table-column label="转交情况" prop="isForward">
<template scope="{row}">
<span class="text-primary" v-if="row.isForward">是({{row.proxyReplyUserName}}</span>
<span v-else></span>
</template>
</el-table-column>
</el-table>
<vi-title class="mt10" title="转交用户"></vi-title>
<el-select
:remote-method="findSameUnitUser"
clearable
filterable
placeholder="请输入关键词"
remote
reserve-keyword
v-model="forwardUserSelection"
>
<el-option
:key="item.id"
:label="item.username+'('+item.loginname+')'"
:value="item.id"
v-for="item in forwardUserList">
</el-option>
</el-select>
<el-row class="mt20" justify="end" type="flex">
<el-button @click="forwardDialog = false">取消</el-button>
<el-button @click="confirmForwardReply" type="primary">确定</el-button>
</el-row>
</el-dialog>
</div>
<script>
<!--#include("/platform/proposal/include/proposal_include.js"){}#-->
let E = window.wangEditor
let replyContentEditor = null
const 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.replyContent || !dd3s.html2txt(this.formData.replyContent)) {
callback(new Error('请填写答复内容'));
} else {
callback();
}
};
return {
implementStates: [],
proTableData: [],
isSign: () => {
return proposal.needSignState.map(v => v.stateCode).includes(500)
},
conJoinProposalName: "",
conJoinProposal: [],
tableColumns: [
{prop: 'oldProposalCode', label: '草案编号', width: "120", checked: 0, sortable: true},
{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, checked: 0},
{prop: 'mannerCode', label: '提案方式编码', sortable: true, checked: 0},
{prop: 'mannerName', label: '提案方式', sortable: true, checked: 0},
{prop: 'meetingName', label: '届次', sortable: true, checked: 0},
{prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
{prop: 'delegationName', label: '代表团', sortable: true, checked: 0},
{prop: 'resultName', label: '立案结果', sortable: true},
{prop: 'isConjoin', label: '是否并案'},
{prop: 'determineTypeCode', label: '是否重点'},
{prop: 'underTakeName', label: '承办单位', sortable: false},
{prop: 'undertakeType', label: '承办类型', sortable: false},
{prop: 'replyNumber', label: '答复次数', width: "80", sortable: false},
{prop: 'stateName', label: '提案状态', sortable: true},
{prop: 'isForward', label: '转交答复', sortable: true},
// {prop: 'proxyReplyUserName', label: '转交答复人', sortable: true},
{prop: 'isReply', label: '答复状态', sortable: false},
],
submitDisabled: false,
pageForm: {searchName: 'proposalName', isAudit: false},
formData: {
username: "${@shiro.getPrincipalProperty('username')}",
replyTime: moment().format('YYYY-MM-DD'),
implementState: '',
replySign: '',
proposalName: '',
proposalCode: '',
createUser: ''
},
formRules: {
replyContent: [{validator: replyContentBrief, trigger: ['blur', 'change']}],
implementState: [{required: true, message: '请选择落实情况', trigger: ['blur', 'change']}],
sign: [{required: true, message: '请扫描二维码进行签字', trigger: ['blur', 'change']}]
},
proTableSelection: [],
forwardDialog: false,
forwardUserList: [],
forwardUserSelection: null,
currentRowResultCode: null
}
},
methods: {
handleSelectionChange(val) {
this.proTableSelection = val
},
async findSameUnitUser(val) {
const resp = await $.get(loc() + '/findSameUnitUser/' + val)
if (resp.code === 0) {
this.forwardUserList = resp.data
// const d = resp.data.filter(x => {
// return !this.forwardUserList.map(v => v.id).includes(x.id)
// })
// this.forwardUserList = this.forwardUserList.concat(d)
}
},
forwardReply() {
this.forwardDialog = true
},
async confirmForwardReply() {
const params = this.proTableSelection.map(v => {
return {replyId: v.replyId, proposalId: v.id, proxyReplyUserId: this.forwardUserSelection}
})
const resp = await $.post(loc() + '/doForwardReply', {data: JSON.stringify(params)})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.$refs['proTable'].clearSelection()
this.doSearch()
this.forwardDialog = false
} else {
this.notifyError(resp.msg)
}
},
rollBack(row) {
if (row.isReply && ([proposal.LEADERAUDIT, proposal.UNITREPLY].includes(row.stateCode)) && row.leaderId == null) {
return true
}
},
doHandleExport(row) {
window.open(loc() + "/doHandleExport?proposalId=" + row.id)
},
doReplyExport(row) {
window.open(loc() + "/doReplyExport?proposalId=" + row.id)
},
async doRollBack(row) {
const confirm = await this.$confirm('正在撤回该提案的答复信息,请确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm) {
const resp = await $.post(loc() + "/doRollBack", {proposalId: row.id, replyUnitId: row.replyUnitId})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
}
}
},
dropdownCommand(command) {
const {type, data} = command
switch (type) {
case 'view':
this.openView(data)
break
case 'audit':
this.openAudit(data)
break
}
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
async checkCanReply(proposalId, underTakeId) {
return await $.get(loc() + '/checkCanReply', {proposalId, underTakeId})
},
async openAudit(row) {
const {id, replyNumber, replyId, replyUnitId, leaderId, resultCode, replyContent, implementState} = row
this.currentRowResultCode = resultCode
const resp = await this.checkCanReply(id, replyUnitId)
if (resp.data.valid !== 0) {
this.notifyWarning(resp.data.msg)
return
}
const res = await $.get('/platform/proposal/common/findConjoinProposal', {proposalId: row.id})
this.proTableData = res.data.filter(o => {
return o.id !== row.id
})
this.proTableData.unshift(row)
const {data} = await $.post(loc() + "/getConJoinInfoList", {proposalId: id})
this.conJoinProposalName = data.map(v => v.proposalName).toString()
this.conJoinProposal = data
/*if (!leaderId && resultCode == "determine") {
this.$notify({
title: '警告',
message: '校领导暂未批示,领导批示后方可答复',
type: 'warning'
});
return
}*/
this.formData.proposalId = id
this.formData.id = replyId
this.formData.replyNumber = replyNumber
this.formData.implementState = implementState
this.formData.replyContent = replyContent
this.formData.replyUnitId = replyUnitId
this.formData.proposalName = row.proposalName
this.formData.createUser = row.username
this.formData.proposalCode = row.proposalCode
this.$nextTick(() => {
$("#replyContentEditor").html("")
replyContentEditor = new E("#replyContentEditor")
replyContentEditor.config.onchange = (html) => {
this.formData.replyContent = html
}
replyContentEditor.create()
if (replyContent) {
replyContentEditor.txt.html(replyContent)
} else {
if (resultCode === 'opinion') {
replyContentEditor.txt.html('建议已收悉,将作为相关工作的建议或参考')
this.formData.replyContent = '建议已收悉,将作为相关工作的建议或参考'
}
}
})
this.$refs.guava.edit()
this.$refs.audit.openView(row.id)
if (this.$refs['auditForm']) {
this.$refs['auditForm'].resetFields()
}
},
async doReply(isSave) {
try {
const valid = await this.$refs["auditForm"].validate()
if (!valid) {
return
}
const msg = this.conJoinProposal.length > 1 ? '提案' + this.conJoinProposalName + '已并案您只需答复一次,请确认?' : '您是否提交该提案的答复内容,请确认?'
const confirm = await this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) {
return
}
this.submitDisabled = true
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
})
const params = clone(this.formData)
params.isSave = isSave
const resp = await $.post(loc() + "/audit", params)
if (resp.code === 0) {
this.$notify.success({title: '成功', message: resp.msg});
this.pageData()
this.$refs.guava.index()
} else {
this.$notify.error({title: '失败', message: resp.msg});
}
loading.close()
this.submitDisabled = false
} catch (e) {
console.log(e)
}
}
},
async created() {
this.implementStates = await getDictByCode("proposal_implementState")
await proposal.initData(this)
}
})
</script>
<!--#
}
#-->