This commit is contained in:
2025-08-28 11:29:13 +08:00
parent 0df2345b11
commit f364119414
116 changed files with 10189 additions and 850 deletions
@@ -0,0 +1,194 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="关键字">
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
<el-select
slot="prepend"
v-model="pageForm.searchName"
placeholder="查询"
style="width: 100px;"
>
<el-option label="工号" value="t1.loginName"></el-option>
<el-option label="姓名" value="t1.userName"></el-option>
</el-select>
</el-input>
</search-item>
<search-item label="教代会">
<el-select
v-model="pageForm.teacherMeetId"
filterable
placeholder="请选择教代会"
style="width:100%;"
@change="doSearch"
>
<el-option
v-for="item in teacherMeets"
:key="item.id"
:label="item.fullName"
:value="item.id"
></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="所属工会" style="width: 100%" v-model="pageForm.unionId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="上报列表">
<el-button
icon="el-icon-check"
size="small"
type="primary"
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
>委员推选
</el-button>
</table-tool>
<el-table
ref="tableRef"
:data="tableData"
row-key="id"
@sort-change="pageOrder"
>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="50"></el-table-column>
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
<el-table-column align="center" label="操作" width="100" fixed="right">
<template scope="{row}">
<el-button
size="mini"
type="danger"
@click="onDelete(row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
</guava>
<delegation-one-push-formal-dialog ref="onePushFormalRef" @refresh="doSearch"></delegation-one-push-formal-dialog>
</div>
<script>
<!--#include("onePushFormalDialog.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/executiveCommittee/delegationOnePush/pageData",
pageForm: {
searchName: 't1.userName',
teacherMeetId: null,
unionId: null
},
teacherMeets: [],
unionOptions: [],
delegations: []
}
},
components: {
"delegation-one-push-formal-dialog": DELEGATION_ONE_PUSH_FORMAL_DIALOG
},
async created() {
this.unionOptions = await this.$businessTool.listUnion()
await this.getAllJdh()
},
methods: {
getAllDelegation(id) {
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
if (resp.code === 0) {
this.delegations = resp.data
}
})
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.teacherMeets = resp.data
if (this.teacherMeets && this.teacherMeets.length > 0) {
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
this.getAllDelegation(this.teacherMeets[0].id)
this.pageData()
}
}
})
},
onDelete(row) {
this.$confirm('确定要删除该条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/doDelete', {id: row.id})
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
}
})
},
}
})
</script>
<style>
.pushFormDialog .el-transfer-panel__item.el-checkbox {
height: auto;
display: block;
margin-right: 0;
padding: 0 15px;
}
.pushFormDialog .el-checkbox__input {
vertical-align: top;
margin-top: 5px;
}
.pushFormDialog .transfer-item {
padding: 5px;
font-size: 12px;
border-bottom: 1px solid #f0f0f0;
}
.pushFormDialog .el-transfer-panel {
height: 60vh;
width: unset !important;
flex: 2 !important;
}
.pushFormDialog .el-transfer-panel__body {
height: calc(100% - 40px) !important;
display: flex;
flex-direction: column;
}
.pushFormDialog .el-transfer-panel__list.is-filterable {
flex: 1;
}
</style>
<!--#
}
#-->
@@ -0,0 +1,95 @@
const DELEGATION_ONE_PUSH_FORMAL_DIALOG = {
template: /*language=HTML*/ `
<div class="pushFormDialog">
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="执委会委员推选"
width="70%"
>
<el-transfer
ref="transfer"
v-model="userValue"
:data="userData"
:filter-method="filterMethod"
:props="{key: 'userId',label: 'name'}"
:right-default-checked="rightChecked"
:titles="['可推选人员名单', '当前选择']"
filterable
class="transfer-high"
>
<div slot-scope="{ option }">
<div class="transfer-item">
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName }}</div>
<div class="transfer-item-details">
<span class="detail-item">
{{option.sex}}
</span>
<span class="detail-item">{{ option.age }}岁</span>
<span class="detail-item">{{ option.jobTitle }}</span>
</div>
</div>
</div>
</el-transfer>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
`,
data() {
return {
dialogVisible: false,
userValue: [],
userData: [],
rightChecked: [],
attendanceRightChecked: [],
teacherMeetId: null
}
},
methods: {
async onOpen(teacherMeetId) {
this.teacherMeetId = teacherMeetId
this.userValue = []
this.userData = []
const {
code,
msg,
data
} = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/getDelegationUser', {teacherMeetId: teacherMeetId})
if (code === 0) {
data.userData.forEach(v => {
this.userData.push({userId: v.userId, ...v})
})
this.dialogVisible = true
}else{
this.$message.error(msg)
}
},
filterMethod(query, item) {
return item.userName.indexOf(query) > -1
},
async onConfirm() {
const {
code,
msg
} = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/addOnePush', {
userValue: JSON.stringify(this.userValue),
teacherMeetId: this.teacherMeetId
})
if (code === 0) {
this.dialogVisible = false
this.$message.success(msg)
this.$emit('refresh')
}else{
this.$message.error(msg)
}
}
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,193 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="关键字">
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
<el-select
slot="prepend"
v-model="pageForm.searchName"
placeholder="查询"
style="width: 100px;"
>
<el-option label="工号" value="t1.loginName"></el-option>
<el-option label="姓名" value="t1.userName"></el-option>
</el-select>
</el-input>
</search-item>
<search-item label="教代会">
<el-select
v-model="pageForm.teacherMeetId"
filterable
placeholder="请选择教代会"
style="width:100%;"
@change="doSearch"
>
<el-option
v-for="item in teacherMeets"
:key="item.id"
:label="item.fullName"
:value="item.id"
></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="所属工会" style="width: 100%" v-model="pageForm.unionId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="上报列表">
<el-button
icon="el-icon-check"
size="small"
type="primary"
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
>委员推选
</el-button>
</table-tool>
<el-table
ref="tableRef"
:data="tableData"
row-key="id"
@sort-change="pageOrder"
>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="50"></el-table-column>
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
<el-table-column align="center" label="操作" width="100" fixed="right">
<template scope="{row}">
<el-button
size="mini"
type="danger"
@click="onDelete(row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
</guava>
<delegation-two-push-formal-dialog ref="onePushFormalRef" @refresh="doSearch"></delegation-two-push-formal-dialog>
</div>
<script>
<!--#include("twoPushFormalDialog.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/executiveCommittee/delegationTwoPush/pageData",
pageForm: {
searchName: 't1.userName',
teacherMeetId: null,
unionId: null
},
teacherMeets: [],
unionOptions: [],
delegations: []
}
},
components: {
"delegation-two-push-formal-dialog": DELEGATION_TWO_PUSH_FORMAL_DIALOG
},
async created() {
this.unionOptions = await this.$businessTool.listUnion()
await this.getAllJdh()
},
methods: {
getAllDelegation(id) {
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
if (resp.code === 0) {
this.delegations = resp.data
}
})
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.teacherMeets = resp.data
if (this.teacherMeets && this.teacherMeets.length > 0) {
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
this.getAllDelegation(this.teacherMeets[0].id)
this.pageData()
}
}
})
},
onDelete(row) {
this.$confirm('确定要删除该条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await this.$axios.post('/platform/executiveCommittee/delegationTwoPush/doDelete', {id: row.id})
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
}
})
},
}
})
</script>
<style>
.pushFormDialog .el-transfer-panel__item.el-checkbox {
height: auto;
display: block;
margin-right: 0;
padding: 0 15px;
}
.pushFormDialog .el-checkbox__input {
vertical-align: top;
margin-top: 5px;
}
.pushFormDialog .transfer-item {
padding: 5px;
font-size: 12px;
border-bottom: 1px solid #f0f0f0;
}
.pushFormDialog .el-transfer-panel {
height: 60vh;
width: unset !important;
flex: 2 !important;
}
.pushFormDialog .el-transfer-panel__body {
height: calc(100% - 40px) !important;
display: flex;
flex-direction: column;
}
.pushFormDialog .el-transfer-panel__list.is-filterable {
flex: 1;
}
</style>
<!--#
}
#-->
@@ -0,0 +1,142 @@
const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
template: /*language=HTML*/ `
<div class="pushFormDialog">
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="团长二次推选"
width="70%"
>
<el-transfer
ref="transfer"
v-model="userValue"
:data="userData"
:filter-method="filterMethod"
:props="{key: 'userId',label: 'name'}"
:right-default-checked="rightChecked"
:titles="['可推选人员名单', '当前选择']"
filterable
class="transfer-high"
>
<div slot-scope="{ option }">
<div class="transfer-item">
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName }}</div>
<div class="transfer-item-details">
<span class="detail-item">
{{option.sex}}
</span>
<span class="detail-item">{{ option.age }}岁</span>
<span class="detail-item">{{ option.jobTitle }}</span>
</div>
</div>
</div>
</el-transfer>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
`,
data() {
return {
dialogVisible: false,
userValue: [],
userData: [],
rightChecked: [],
attendanceRightChecked: [],
teacherMeetId: null
}
},
methods: {
async onOpen(teacherMeetId) {
this.teacherMeetId = teacherMeetId
this.userValue = []
this.userData = []
const {
code,
msg,
data
} = await this.$axios.post('/platform/executiveCommittee/delegationTwoPush/getDelegationUser', {teacherMeetId: teacherMeetId})
if (code === 0) {
data.userData.forEach(v => {
this.userData.push({userId: v.userId, ...v})
})
this.dialogVisible = true
}else{
this.$message.error(msg)
}
},
filterMethod(query, item) {
return item.userName.indexOf(query) > -1
},
async onConfirm() {
const {
code,
msg
} = await this.$axios.post('/platform/executiveCommittee/delegationTwoPush/addOnePush', {
userValue: JSON.stringify(this.userValue),
teacherMeetId: this.teacherMeetId
})
if (code === 0) {
this.dialogVisible = false
this.$message.success(msg)
this.$emit('refresh')
}else{
this.$message.error(msg)
}
}
},
style: /*language=CSS*/ `
.pushFormDialog .el-transfer-panel__item.el-checkbox {
height: auto;
display: block;
margin-right: 0;
padding: 0 15px;
}
.pushFormDialog .el-checkbox__input {
vertical-align: top;
margin-top: 5px;
}
.pushFormDialog .transfer-item {
padding: 5px;
font-size: 12px;
border-bottom: 1px solid #f0f0f0;
}
.pushFormDialog .transfer-item-name {
font-weight: bold;
margin-bottom: 3px;
color: #303133;
}
.pushFormDialog .transfer-item-details {
display: flex;
flex-wrap: wrap;
gap: 6px;
color: #606266;
}
.pushFormDialog .detail-item {
display: inline-flex;
align-items: center;
}
.pushFormDialog .el-transfer-panel {
height: 60vh;
}
.pushFormDialog .el-transfer-panel__body {
height: calc(100% - 40px) !important;
display: flex;
flex-direction: column;
}
.pushFormDialog .el-transfer-panel__list.is-filterable {
flex: 1;
}
`
}
@@ -0,0 +1,176 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会届次">
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="基础信息"></table-tool>
<el-form ref="form" label-width="140px" :model="formData" :rules="formRules">
<el-form-item prop="prepareGroupQuotaCount" label="筹备组推荐名额数">
<el-input-number v-model="formData.prepareGroupQuotaCount" placeholder="请填写筹备组推荐名额数"
style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="committeeQuotaCount" label="委员会预选人数">
<el-input-number v-model="formData.committeeQuotaCount"
placeholder="请填写委员会预选人数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="delegationQuotaCount" label="代表团推荐总数">
<el-input-number v-model="formData.delegationQuotaCount"
placeholder="请填写代表团推荐名额总数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="firstTime" label="第一次预选时间">
<el-date-picker
v-model="formData.firstTime"
style="width: 100%"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
></el-date-picker>
</el-form-item>
<el-form-item prop="secondTime" label="第二次预选时间">
<el-date-picker
v-model="formData.secondTime"
style="width: 100%"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
></el-date-picker>
</el-form-item>
</el-form>
<table-tool label="代表团名额分配"></table-tool>
<el-table :data="formData.delegationQuotaList" show-summar size="mini" max-height="500">
<el-table-column
align="center"
header-align="center"
type="index"
:index="indexMethod"
label="序号"
width="80px"
></el-table-column>
<el-table-column
v-for="column in tableColumns"
:key="column.prop"
align="center"
header-align="center"
:label="column.label"
:prop="column.prop"
show-overflow-tooltip
>
<template v-if="column.prop === 'quotaCount'" #default="{ row }">
<el-input-number
v-model="row.quotaCount"
:precision="0"
:step="1"
:min="0"
:max="100"
></el-input-number>
</template>
</el-table-column>
</el-table>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" @click="onHandle">提 交</el-button>
</el-row>
</el-card>
</guava>
</div>
<script>
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
openJdhList:[],
pageForm: {
sessionId: ''
},
tableColumns: [
{prop: 'delegationName', label: '代表团名称', sortable: true},
{prop: 'memberCount', label: '会员人数', sortable: true},
{prop: 'quotaCount', label: '分配人数', sortable: true}
],
formData: {},
formRules: {
prepareGroupQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
committeeQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
delegationQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
firstTime: [{required: true, message: '必填', trigger: ['blur']}],
secondTime: [{required: true, message: '必填', trigger: ['blur']}]
}
}
},
methods: {
async fetchConfig() {
const resp = await this.$axios.post("/platform/executiveCommittee/executiveCommitteeConfig/fetchConfig", {sessionId: this.pageForm.sessionId})
this.$set(resp.data, 'firstTime', [resp.data.firstStartTime || '', resp.data.firstEndTime || ''])
this.$set(resp.data, 'secondTime', [resp.data.secondStartTime || '', resp.data.secondEndTime || ''])
this.formData = resp.data
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.openJdhList = resp.data
if (this.openJdhList.length > 0) {
this.pageForm.sessionId = this.openJdhList[0].id
this.fetchConfig()
}
}
})
},
onHandle() {
this.$refs['form'].validate(async (valid) => {
if (valid) {
this.$confirm('您确定要提交吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const total = this.formData.delegationQuotaList.reduce((sum, item) => sum + (item.quotaCount || 0), 0)
if (total > this.formData.delegationQuotaCount) {
this.$message.warning('各代表团名额分配数之和不能超过' + this.formData.delegationQuotaCount)
return
}
if (this.formData.firstTime && this.formData.firstTime.length > 1) {
this.$set(this.formData, 'firstStartTime', this.formData.firstTime[0])
this.$set(this.formData, 'firstEndTime', this.formData.firstTime[1])
}
if (this.formData.secondTime && this.formData.secondTime.length > 1) {
this.$set(this.formData, 'secondStartTime', this.formData.secondTime[0])
this.$set(this.formData, 'secondEndTime', this.formData.secondTime[1])
}
this.$set(this.formData, 'teacherMeetId', this.pageForm.sessionId)
this.$set(this.formData, 'delegationQuotaList', JSON.stringify(this.formData.delegationQuotaList))
const resp = await this.$axios.post('/platform/executiveCommittee/executiveCommitteeConfig/onHandle', this.formData)
if (resp.code === 0) {
await this.fetchConfig()
this.$message.success(resp.msg)
}
}).catch(() => {
})
}
})
}
},
async created() {
this.getAllJdh()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,192 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="关键字">
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
<el-select
slot="prepend"
v-model="pageForm.searchName"
placeholder="查询"
style="width: 100px;"
>
<el-option label="工号" value="t1.loginName"></el-option>
<el-option label="姓名" value="t1.userName"></el-option>
</el-select>
</el-input>
</search-item>
<search-item label="教代会">
<el-select
v-model="pageForm.teacherMeetId"
filterable
placeholder="请选择教代会"
style="width:100%;"
>
<el-option
v-for="item in teacherMeets"
:key="item.id"
:label="item.fullName"
:value="item.id"
></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="所属工会" style="width: 100%"
v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable style="width: 100%"
placeholder="请选择所属单位" v-model="pageForm.unitId">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in unitOptions">
</el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="名单列表">
<el-button
size="small"
type="primary"
@click="doExportExcel"
>导出名单
</el-button>
</table-tool>
<el-table
ref="tableRef"
:data="tableData"
row-key="id"
@sort-change="pageOrder"
>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="50"></el-table-column>
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
<el-table-column align="center" label="所属代表团" prop="delegationName"></el-table-column>
<el-table-column align="center" label="票数" prop="pushCount"></el-table-column>
<el-table-column align="center" label="操作" width="130" fixed="right">
<template scope="{row}">
<el-button
size="mini"
type="primary"
@click="openView(row)"
>推选详情
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog title="投票详情" :close-on-click-modal="false" :visible.sync="infoDialogVisible" top="50px"
width="60%">
<el-table :data="chooseUserTableData" max-height="500">
<el-table-column align="center" header-align="center" label="序号" type="index" width="60px"></el-table-column>
<el-table-column align="center" header-align="center" prop="pushUserName" label="推选人"></el-table-column>
<el-table-column align="center" header-align="center" prop="pushLoginName" label="推选人工号"></el-table-column>
<el-table-column align="center" header-align="center" prop="sex" label="性别"></el-table-column>
<el-table-column align="center" header-align="center" prop="mobile" label="联系方式"></el-table-column>
<el-table-column align="center" header-align="center" prop="unitName" label="所属单位"></el-table-column>
<el-table-column align="center" header-align="center" prop="delegationName" label="所属代表团"></el-table-column>
<el-table-column align="center" header-align="center" prop="pushDate" label="推选时间">
<template #default="{row}">
{{ $moment(row.pushDate).format('YYYY-MM-DD') }}
</template>
</el-table-column>
</el-table>
<el-row class="mt20" justify="end" type="flex">
<el-button type="primary" @click="infoDialogVisible = false">确定</el-button>
</el-row>
</el-dialog>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/executiveCommittee/executiveCommitteeMember/pageData",
pageForm: {
searchName: 't1.userName',
},
teacherMeets: [],
unionOptions: [],
unitOptions: [],
chooseUserTableData: [],
infoDialogVisible: false,
}
},
components: {},
async created() {
this.unionOptions = await this.$businessTool.listUnion()
this.unitOptions = await this.$businessTool.listUnit()
await this.getAllJdh()
},
methods: {
doExportExcel() {
this.$downLoad("/platform/executiveCommittee/executiveCommitteeMember/doExportExcel", {
data: JSON.stringify(this.pageForm)
})
},
openView(row) {
this.$axios.post('/platform/executiveCommittee/executiveCommitteeMember/onView', {
teacherMeetId: this.pageForm.teacherMeetId,
userId: row.userId
}).then(res => {
if (res.code === 0) {
this.chooseUserTableData = res.data
this.infoDialogVisible = true
}
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.unitOptions = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.unitOptions = data
})
}
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.teacherMeets = resp.data
if (this.teacherMeets && this.teacherMeets.length > 0) {
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
this.pageData()
}
}
})
},
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,208 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="关键字">
<el-input v-model="pageForm.searchKeyword" placeholder="请填写内容">
<el-select
slot="prepend"
v-model="pageForm.searchName"
placeholder="查询"
style="width: 100px;"
>
<el-option label="工号" value="t1.loginName"></el-option>
<el-option label="姓名" value="t1.userName"></el-option>
</el-select>
</el-input>
</search-item>
<search-item label="教代会">
<el-select
v-model="pageForm.teacherMeetId"
filterable
placeholder="请选择教代会"
style="width:100%;"
@change="teacherMeetChange(pageForm.teacherMeetId)"
>
<el-option
v-for="item in teacherMeets"
:key="item.id"
:label="item.fullName"
:value="item.id"
></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="所属工会" style="width: 100%"
v-model="pageForm.unionId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
<search-item label="代表团">
<el-select clearable filterable placeholder="代表团" style="width: 100%"
v-model="pageForm.delegationId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in delegations"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="上报列表">
<el-button
icon="el-icon-check"
size="small"
type="primary"
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
>委员推选
</el-button>
</table-tool>
<el-table
ref="tableRef"
:data="tableData"
row-key="id"
@sort-change="pageOrder"
>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="50"></el-table-column>
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
<el-table-column align="center" label="所属代表团" prop="delegationName"></el-table-column>
<el-table-column align="center" label="操作" width="100" fixed="right">
<template scope="{row}">
<el-button
size="mini"
type="danger"
@click="onDelete(row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
</guava>
<push-formal-dialog ref="onePushFormalRef" @refresh="doSearch"></push-formal-dialog>
</div>
<script>
<!--#include("pushFormalDialog.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageDataUrl: "/platform/executiveCommittee/preparatoryGroupPush/pageData",
pageForm: {
searchName: 't1.userName',
teacherMeetId: null,
unionId: null
},
teacherMeets: [],
unionOptions: [],
delegations: []
}
},
components: {
"push-formal-dialog": PUSH_FORMAL_DIALOG
},
async created() {
this.unionOptions = await this.$businessTool.listUnion()
await this.getAllJdh()
},
methods: {
async teacherMeetChange(val) {
this.$set(this.pageForm, 'delegationId', null)
this.getAllDelegation(val)
this.doSearch()
},
getAllDelegation(id) {
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
if (resp.code === 0) {
this.delegations = resp.data
}
})
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.teacherMeets = resp.data
if (this.teacherMeets && this.teacherMeets.length > 0) {
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
this.getAllDelegation(this.teacherMeets[0].id)
this.pageData()
}
}
})
},
onDelete(row) {
this.$confirm('确定要删除该条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await this.$axios.post('/platform/executiveCommittee/delegationOnePush/doDelete', {id: row.id})
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
}
})
},
}
})
</script>
<style>
.pushFormDialog .el-transfer-panel__item.el-checkbox {
height: auto;
display: block;
margin-right: 0;
padding: 0 15px;
}
.pushFormDialog .el-checkbox__input {
vertical-align: top;
margin-top: 5px;
}
.pushFormDialog .transfer-item {
padding: 5px;
font-size: 12px;
border-bottom: 1px solid #f0f0f0;
}
.pushFormDialog .el-transfer-panel {
height: 60vh;
width: unset !important;
flex: 2 !important;
}
.pushFormDialog .el-transfer-panel__body {
height: calc(100% - 40px) !important;
display: flex;
flex-direction: column;
}
.pushFormDialog .el-transfer-panel__list.is-filterable {
flex: 1;
}
</style>
<!--#
}
#-->
@@ -0,0 +1,87 @@
const PUSH_FORMAL_DIALOG = {
template: /*language=HTML*/ `
<div class="pushFormDialog">
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="执委会委员推选"
width="70%"
>
<el-transfer
ref="transfer"
v-model="userValue"
:data="userData"
:filter-method="filterMethod"
:props="{key: 'userId',label: 'name'}"
:right-default-checked="rightChecked"
:titles="['可推选人员名单', '当前选择']"
filterable
class="transfer-high"
>
<div slot-scope="{ option }">
<div class="transfer-item">
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName }}</div>
<div class="transfer-item-details">
<span class="detail-item">
{{option.sex}}
</span>
<span class="detail-item">{{ option.age }}岁</span>
<span class="detail-item">{{ option.jobTitle }}</span>
</div>
</div>
</div>
</el-transfer>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
`,
data() {
return {
dialogVisible: false,
userValue: [],
userData: [],
rightChecked: [],
attendanceRightChecked: [],
teacherMeetId: null
}
},
methods: {
async onOpen(teacherMeetId) {
this.dialogVisible = true
this.teacherMeetId = teacherMeetId
this.userValue = []
this.userData = []
const {
code,
data
} = await this.$axios.post('/platform/executiveCommittee/preparatoryGroupPush/getDelegationUser', {teacherMeetId: teacherMeetId})
if (code === 0) {
data.userData.forEach(v => {
this.userData.push({userId: v.userId, ...v})
})
}
},
filterMethod(query, item) {
return item.userName.indexOf(query) > -1
},
async onConfirm() {
const {
code,
msg
} = await this.$axios.post('/platform/executiveCommittee/preparatoryGroupPush/addOnePush', {
userValue: JSON.stringify(this.userValue),
teacherMeetId: this.teacherMeetId
})
if (code === 0) {
this.dialogVisible = false
this.$message.success(msg)
this.$emit('refresh')
}
}
},
}
@@ -0,0 +1,110 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select
v-model="pageForm.sessionId"
filterable
placeholder="请选择教代会"
style="width:100%;"
@change="doSearch"
>
<el-option
v-for="item in sessionOptions"
:key="item.id"
:label="item.fullName"
:value="item.id"
></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="所属工会" style="width: 100%" v-model="pageForm.unionId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="名额分配列表">
<el-button
size="small"
type="primary"
@click="openManual"
>分配名额
</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50" :index="indexMethod" label="序号"></el-table-column>
<el-table-column prop="unionName" label="工会名称"></el-table-column>
<el-table-column prop="memberCount" label="会员人数"></el-table-column>
<el-table-column prop="dbCount" label="代表人数"></el-table-column>
<el-table-column prop="allocationNum" label="名额分配人数"></el-table-column>
<el-table-column prop="seniorTeaNum" label="高级职称专任教师代表数"></el-table-column>
<el-table-column prop="ordinaryTeaNum" label="专任教师代表数"></el-table-column>
<el-table-column prop="femaleNum" label="女代表数"></el-table-column>
<el-table-column prop="less45Num" label="45岁以下代表数"></el-table-column>
</el-table>
</el-card>
<manual-allocation-dialog ref="manualAllocationDialog" @refresh="doSearch"></manual-allocation-dialog>
</div>
<script>
<!--#include("manualAllocationDialog.js"){}#-->
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
sessionOptions: [],
unionOptions: [],
}
},
components: {
"manual-allocation-dialog": MANUAL_ALLOCATION_DIALOG
},
methods: {
openManual() {
this.$refs.manualAllocationDialog.onOpen(this.pageForm.sessionId)
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/teacherCongress/prepare/quotaAllocation/pageData", this.pageForm).then(resp => {
this.tableLoading = false
if (resp.code === 0) {
this.tableData = resp.data
} else {
this.$message.error(resp.msg)
}
})
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.sessionOptions = resp.data
if (this.sessionOptions && this.sessionOptions.length > 0) {
this.$set(this.pageForm, 'sessionId', this.sessionOptions[0].id)
this.pageData()
}
}
})
},
},
async created() {
this.unionOptions = await this.$businessTool.listUnion()
await this.getAllJdh()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,190 @@
const MANUAL_ALLOCATION_DIALOG = {
template: /*language=HTML*/ `
<el-dialog :visible.sync="manualAllocationDialog" title="手动分配名额" width="80%" :close-on-click-modal="false"
top="50px">
<table-tool label="比例设置">
一键比例:
<el-input-number
style="width: 150px"
v-model="unionUserNumOneKeyRatio"
:precision="0"
:step="1"
:min="0"
placeholder="请输入一键比例"
size="small"
:max="100"
></el-input-number>
<el-button
size="small"
type="primary"
style="margin-left: 6px"
@click="applyScaleSettings"
>应用比例设置
</el-button>
</table-tool>
<el-table :data="unionLimit" max-height="500">
<el-table-column prop="unionName" label="分工会"></el-table-column>
<el-table-column prop="memberCount" label="会员人数"></el-table-column>
<el-table-column align="center" prop="ratio" label="比例(%)">
<template v-slot="{$index,row}">
<el-input-number
style="width: 100%"
v-model="row.ratio"
:precision="0"
:step="1"
:min="0"
:max="100"
@change="(val) => ratioChange(val, $index)"
></el-input-number>
</template>
</el-table-column>
<el-table-column prop="allocationNum" label="分配人数">
<template v-slot="{row}">
<el-input-number
style="width: 100%"
v-model="row.allocationNum"
:precision="0"
:step="1"
:min="0"
:max="row.memberCount"
></el-input-number>
</template>
</el-table-column>
<el-table-column prop="seniorTeaNum" label="高级职称专任教师代表数">
<template v-slot="{row}">
<el-input-number
style="width: 100%"
v-model="row.seniorTeaNum"
:precision="0"
:step="1"
:min="0"
:max="row.quota"
></el-input-number>
</template>
</el-table-column>
<el-table-column prop="ordinaryTeaNum" label="专任教师代表数">
<template v-slot="{row}">
<el-input-number
style="width: 100%"
v-model="row.ordinaryTeaNum"
:precision="0"
:step="1"
:min="0"
:max="row.quota"
></el-input-number>
</template>
</el-table-column>
<el-table-column prop="femaleNum" label="女代表数">
<template v-slot="{row}">
<el-input-number
style="width: 100%"
v-model="row.femaleNum"
:precision="0"
:step="1"
:min="0"
:max="row.quota"
></el-input-number>
</template>
</el-table-column>
<el-table-column prop="less45Num" label="45岁以下代表数">
<template v-slot="{row}">
<el-input-number
style="width: 100%"
v-model="row.less45Num"
:precision="0"
:step="1"
:min="0"
:max="row.quota"
></el-input-number>
</template>
</el-table-column>
</el-table>
<el-row class="mt20" justify="end" type="flex">
<el-button type="danger" @click="clearUnionLimit">清空当前已分配</el-button>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="manualAllocationDialog = false">取 消</el-button>
<el-button type="primary" @click="doManualAllocationSub">确 定</el-button>
</span>
</el-dialog>
`,
data() {
return {
unionUserNumOneKeyRatio: null,
sessionId: "",
unionLimit: [],
manualAllocationDialog: false,
}
},
methods: {
async doManualAllocationSub() {
const hasNull = this.unionLimit.some(v => v.allocationNum === undefined)
if (hasNull) {
this.$message.warning('还有未设置的数据!')
return
}
const confirm = await this.$confirm('您确定要分配吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).catch(err => err)
if (confirm === 'confirm') {
const {
code,
msg
} = await this.$axios.post('/platform/teacherCongress/prepare/quotaAllocation/doQuotaAllocation', {
list: JSON.stringify(this.unionLimit),
sessionId: this.sessionId
})
if (code === 0) {
this.manualAllocationDialog = false
this.$message.success(msg)
this.$emit('refresh')
}
}
},
async clearUnionLimit() {
const confirm = await this.$confirm('确定要清空分工会人数限制吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).catch(err => err)
if (confirm === 'confirm') {
this.unionLimit = []
this.unionUserNumOneKeyRatio = null
await this.getUnionUsers()
}
},
applyScaleSettings() {
this.unionLimit.forEach(v => {
v.ratio = this.unionUserNumOneKeyRatio
if (v.ratio) {
const num = parseFloat((v.memberCount * v.ratio / 100).toFixed(0))
v.allocationNum = (num === 0 ? 1 : num)
}
})
},
ratioChange(val, index) {
const v = this.unionLimit[index]
const num = parseFloat((v.memberCount * v.ratio / 100).toFixed(0))
v.allocationNum = (num === 0 ? 1 : num)
this.$forceUpdate()
},
getUnionUsers() {
this.$axios.post('/platform/teacherCongress/prepare/quotaAllocation/getUnionLimit', {sessionId: this.sessionId}).then(resp => {
if (resp.code === 0) {
this.unionLimit = resp.data
}
})
},
async onOpen(sessionId) {
this.sessionId = sessionId
this.manualAllocationDialog = true
this.getUnionUsers()
}
}
}