Files
2026-09-08 19:49:21 +08:00

391 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 type="flex" justify="center" align="middle" class="query-row">
<el-col :span="8">
<span>教代会:</span>
<el-select v-model="pageForm.meetingId" placeholder="请选择教代会" @change="meetingChange"
filterable style="width: 80%">
<el-option
v-for="item in meetingOptions"
:label="item.jdhallname"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
style="width: 90%" @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-col>
<el-col :span="8">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword2"
style="width: 90%" @keyup.enter.native="doSearch">
<el-select v-model="pageForm.searchName2" slot="prepend" placeholder="查询类型"
style="width: 100px;">
<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 type="flex" align="middle" class="query-row">
<el-col class="query-row-title">提案状态:</el-col>
<el-col class="query-row-content">
<el-select v-model="pageForm.stateCode" filterable clearable placeholder="请选择提案状态"
style="width: 400px" @change="doSearch()">
<el-option v-for="item in stateOptions"
:key="item.stateCode"
:label="item.stateName"
:value="item.stateCode">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">提案类型:</el-col>
<el-col class="query-row-content">
<el-tag
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;"
v-for="item in typeOptions"
:key="item.id"
:type="item.typeName"
:effect="pageForm.proposalTypes.includes(item.id)?'dark':'plain'"
@click="checkProposalType(item.id)">
{{ item.typeName }}
</el-tag>
<el-link type="danger" v-if="typeOptions.length&&pageForm.proposalTypes.length"
:underline="false" @click="pageForm.proposalTypes=[];doSearch()">清空
</el-link>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<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 v-model="pageForm.delegationId" filterable clearable placeholder="所属代表团"
style="width: 350px" @change="delegationChange">
<el-option v-for="item in delegationOptions"
:key="item.id"
:label="item.dbtname"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<span>所属工会:</span>
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" @change="unionChange"
filterable clearable style="width: 350px">
<el-option
v-for="item in unionOptions"
:key="item.id"
:label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="8">
<span>所属单位:</span>
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位会" @change="doSearch"
filterable clearable style="width: 350px">
<el-option
v-for="item in unitOptions"
:key="item.id"
:label="item.name"
:value="item.id">
</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 shadow="never" class="mt20">
<el-table :data="tableData" align="center" header-align="center" row-key="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
: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 label="操作" header-align="center" label="操作"
fixed="right" width="130px">
<template scope="{row}">
<el-button size="mini" icon="el-icon-printer" type="primary"
@click="oneProposalExport(row.id)">导出提案
</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>
var 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: '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.open(loc() + '/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) {
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 proposal.getAllMeeting()
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>
<!--#
}
#-->