Files
UNION_HUTB/target/classes/views/platform/proposal/statistics/progress.html
T
2026-09-09 09:14:28 +08:00

394 lines
18 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.query-row {
height: 70px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.query-row:not(:last-child) {
border-bottom: 1px dashed rgb(230, 230, 230);
}
.query-row-title {
width: 120px;
}
.el-table-container {
padding-top: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<!-- <el-row type="flex" justify="center">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
style="width: 50%" @keyup.enter.native="doSearch">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 110px;">
<el-option label="提案名称" value="proposalName"></el-option>
<el-option label="提案编号" value="proposalCode"></el-option>
</el-select>
</el-input>
</el-row>-->
<el-row align="middle" class="query-row" justify="center" type="flex">
<el-col :span="8">
<span>教代会:</span>
<el-select @change="meetingChange" filterable placeholder="请选择教代会"
style="width: 80%" v-model="pageForm.meetingId">
<el-option
:label="item.jdhallname"
:value="item.id"
v-for="item in meetingOptions">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 110px;"
v-model="pageForm.searchName">
<el-option label="提案名称" value="proposalName"></el-option>
<el-option label="提案编号" value="proposalCode"></el-option>
</el-select>
</el-input>
</el-col>
<el-col :span="8">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword2">
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
v-model="pageForm.searchName2">
<el-option label="提案人" value="su.username"></el-option>
<!-- <el-option label="附议人" value="seconded.username"></el-option>-->
</el-select>
</el-input>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" style="margin-top: 10px">
<el-row align="middle" class="query-row" type="flex">
<el-col class="query-row-title">提案状态:</el-col>
<el-col class="query-row-content">
<el-select @change="doSearch()" clearable filterable placeholder="请选择提案状态"
style="width: 400px" v-model="pageForm.stateCode">
<el-option :key="item.stateCode"
:label="item.stateName"
:value="item.stateCode"
v-for="item in stateOptions">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row align="middle" class="query-row" type="flex">
<el-col class="query-row-title">提案类型:</el-col>
<el-col class="query-row-content">
<el-tag
:effect="pageForm.proposalTypes.includes(item.id)?'dark':'plain'"
:key="item.id"
:type="item.typeName"
@click="checkProposalType(item.id)"
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;"
v-for="item in typeOptions">
{{ item.typeName }}
</el-tag>
<el-link :underline="false" @click="pageForm.proposalTypes=[];doSearch()"
type="danger" v-if="typeOptions.length&&pageForm.proposalTypes.length">清空
</el-link>
</el-col>
</el-row>
<el-row align="middle" class="query-row" type="flex">
<el-col class="query-row-title">&ensp;&ensp;团:</el-col>
<el-col class="query-row-content">
<el-row>
<el-col :span="8"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('tamanage')||@shiro.hasRole('jdhdbt01')}">
<!-- <span>代表团:</span>-->
<el-select @change="delegationChange" clearable filterable placeholder="所属代表团"
style="width: 350px" v-model="pageForm.delegationId">
<el-option :key="item.id"
:label="item.dbtname"
:value="item.id"
v-for="item in delegationOptions">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<span>所属工会:</span>
<el-select @change="unionChange" clearable filterable
placeholder="请选择所属工会" style="width: 350px" v-model="pageForm.unionId">
<el-option
:key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in unionOptions">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<span>所属单位:</span>
<el-select @change="doSearch" clearable filterable
placeholder="请选择所属单位会" style="width: 350px" v-model="pageForm.unitId">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row class="query-row" type="flex">
<el-col class="query-row-title">征集状态:</el-col>
<el-col class="query-row-content">
<el-tag
:effect="pageForm.levyStates.includes(item.value)?'dark':'plain'"
:key="item.value"
:type="item.label"
@click="checkLevyState(item.value)"
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;"
v-for="item in levyAuditOptions">
{{ item.label }}
</el-tag>
<el-link :underline="false" @click="pageForm.levyStates=[];doSearch()"
type="danger" v-if="levyAuditOptions.length&&pageForm.levyStates.length">清空
</el-link>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" style="margin-top: 10px">
<table-tool :app="this" label="提案信息">
<template #func>
<el-button :disabled="!pageForm.meetingId" @click="manualRemind" size="small" type="primary">
一键提醒
</el-button>
</template>
</table-tool>
<el-card class="mt20" shadow="never">
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" align="center"
header-align="center"
row-key="id"
>
<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
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
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>
</el-table-column>
<el-table-column fixed="right" header-align="center" label="操作"
label="操作" width="130px">
<template scope="{row}">
<el-button @click="oneProposalExport(row.id)" icon="el-icon-printer" size="mini"
type="primary">导出提案
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<proposal-info ref="info"></proposal-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
resultOptions: [],
typeOptions: [],
meetingOptions: [],
stateOptions: [],
delegationOptions: [],
unionOptions: [],
unitOptions: [],
pageForm: {
searchName: "proposalName",
searchName2: "su.username",
searchKeyword2: '',
stateCode: '',
meetingId: '',
delegationId: '',
proposalResult: [],
proposalTypes: [],
levyStates: []
},
tableColumns: [
{prop: 'oldProposalCode', label: '草案编号', width: "120", checked: 0},
{prop: 'proposalCode', label: '提案编号', width: "120", sortable: true, disabled: true},
{prop: 'proposalName', label: '提案名称', width: "300", disabled: true},
{prop: 'username', label: '提案人', disabled: true},
{prop: 'mobile', label: '联系方式', disabled: true},
{prop: 'unitname', label: '单位', disabled: true},
{prop: 'delegationName', label: '代表团', sortable: true},
// {prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0},
{prop: 'typeName', label: '提案类型', sortable: true},
// {prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0},
{prop: 'mannerName', label: '提交方式', sortable: true},
{prop: 'secondedNum', label: '附议人数量', sortable: true},
{prop: 'secondedAgreeNum', label: '已附议', sortable: true},
{prop: 'delegationAudit', label: '团长审核', sortable: true},
],
levyAuditOptions: [
{label: '未提交', value: 0},
{label: '未附议', value: 1},
{label: '附议中', value: 2},
{label: '待团长审核', value: 3},
{label: '团长已审核', value: 4},
]
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue'),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue'),
},
methods: {
async manualRemind() {
const confirm = await this.$confirm('请确认是否一键提醒?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === 'confirm') {
const resp = await $.post(loc() + '/remindProposalCreator', {teacherMeetingId: this.pageForm.meetingId})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
this.notifyError(resp.msg)
}
}
},
oneProposalExport(id) {
window.location.href = "/platform/proposal/statistics/summary/oneProposalExport?proposalId=" + id
},
async meetingChange(val) {
this.pageForm.delegationId = null
this.delegationOptions = await getDelegation(val)
this.doSearch()
},
async delegationChange(val) {
this.pageForm.unionId = null
this.unionOptions = await getUnions(val)
this.doSearch()
},
async unionChange(val) {
this.pageForm.unitId = null
this.unitOptions = await getUnits(val)
this.doSearch()
},
checkProposalResult(result) {
let idx = this.pageForm.proposalResult.indexOf(result)
if (idx !== -1) {
this.pageForm.proposalResult.splice(idx, 1)
} else {
this.pageForm.proposalResult.push(result)
}
this.doSearch()
},
checkProposalType(type) {
let idx = this.pageForm.proposalTypes.indexOf(type)
if (idx !== -1) {
this.pageForm.proposalTypes.splice(idx, 1)
} else {
this.pageForm.proposalTypes.push(type)
}
this.doSearch()
},
checkLevyState(type) {
this.pageForm.levyStates = [type]
// let idx = this.pageForm.levyStates.indexOf(type)
// if (idx !== -1) {
// this.pageForm.levyStates.splice(idx, 1)
// } else {
// this.pageForm.levyStates.push(type)
// }
this.doSearch()
},
openView(row) {
this.$refs.guava.view()
this.$refs.info.openView(row.id)
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.proposalTypes = JSON.stringify(pageForm.proposalTypes)
pageForm.proposalResult = JSON.stringify(pageForm.proposalResult)
pageForm.levyStates = JSON.stringify(pageForm.levyStates)
$.post(loc() + "/pageData", pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code === 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
}
},
async created() {
this.meetingOptions = await getAllJdh()
this.pageForm.meetingId = this.meetingOptions.length ? this.meetingOptions[0].id : ''
this.stateOptions = await getOpenProposalState()
this.typeOptions = await getProposalType()
this.resultOptions = await getDictOptions("proposal_result")
this.delegationOptions = await getDelegation(this.pageForm.meetingId)
this.unionOptions = await getUnions(null)
this.unitOptions = await getUnits(null)
this.pageData();
}
})
</script>
<!--#
}
#-->