两委委员推选-代表团推选改成分工会推选

This commit is contained in:
=
2025-11-17 08:58:59 +08:00
parent 51a417ea20
commit b7996979a2
19 changed files with 237 additions and 125 deletions
@@ -198,7 +198,7 @@ const basicForm = {
</template>
</el-table-column>
<el-table-column :label="trainType + '人员'" prop="courseName">
<el-table-column label="活动名称" prop="courseName">
<template v-slot="{row}">
<el-input size="small" v-model="row.courseName"
:placeholder="'请输入' + trainType + '名称'"></el-input>
@@ -280,7 +280,7 @@ const basicForm = {
<el-table-column :label="trainType + '时间'">
<template v-slot="scope">
<el-button @click="openSetUpCourseTime(scope.$index)" type="text">设置{{ trainType
}}交友联谊时间
}}时间
</el-button>
</template>
</el-table-column>
@@ -141,6 +141,17 @@ const customForm = {
</el-col>
</el-row>
<!-- 添加条件构造器 -->
<el-row :gutter="50" type="flex">
<el-col :span="4">
<span>可选条件</span>
</el-col>
<el-col :span="20">
<el-button size="mini" type="primary"
@click="openCnd(moreInfoIndex)">设置可选条件 </el-button>
</el-col>
</el-row>
<el-row :gutter="50" type="flex">
<el-col :span="4">
<span>详细信息</span>
@@ -149,7 +160,7 @@ const customForm = {
<text-editor v-model="formData.courseList[moreInfoIndex].introduce"></text-editor>
</el-col>
</el-row>
<div style="text-align: right">
<el-button @click="moreInfoDrawer = false">取 消</el-button>
<el-button type="primary" @click="moreInfoDrawer = false">保 存</el-button>
@@ -162,7 +173,16 @@ const customForm = {
<el-button type="primary" @click="mapDialog = false">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="conditionStructureDialogVisible" title="条件构造器" :append-to-body="true">
<condition-group :group="conditionGroup" :field_options="fieldOptions"
@remove="removeRootGroup"></condition-group>
<div slot="footer">
<el-button @click="conditionStructureDialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirmCnd">确定</el-button>
</div>
</el-dialog>
<union-form ref="unionFormRef"></union-form>
</div>
`,
@@ -177,13 +197,73 @@ const customForm = {
mapDialog: false,
mapIndex: 0,
// 条件构造器相关
conditionStructureDialogVisible: false,
// 可选字段列表
fieldOptions: [
{label: "姓名", value: "username"},
{label: "工号", value: "loginname"},
{label: "性别", value: "sex"},
{label: "年龄", value: "age"},
{label: "婚姻状况", value: "marriage"},
{label: "在职状态", value: "userState"},
{label: "编制类别", value: "preparedBy"},
{label: "教职工类别", value: "personType"},
],
conditionGroup: {
logic: "AND",
conditions: [],
groups: []
},
// 条件构造器相关
currentCourseIndex: -1, // 当前编辑的课程索引
subjectMoneyIndex: null,
hospitalIndex: null
}
},
components: {
"union-form": unionForm,
"map-container": httpVueLoader("/components/plugins/mapContainer/MapContainer.vue?v=1.0.1")
"map-container": httpVueLoader("/components/plugins/mapContainer/MapContainer.vue?v=1.0.1"),
},
methods: {
removeRootGroup() {
// 重置根条件组
this.conditionGroup = {
logic: "AND",
conditions: [],
groups: []
}
},
openCnd(moreInfoIndex) {
this.currentCourseIndex = moreInfoIndex;
this.conditionStructureDialogVisible = true
const currentCourse = this.formData.courseList[moreInfoIndex];
if (currentCourse.matchCnd) {
this.conditionGroup = JSON.parse(JSON.stringify(currentCourse.matchCnd));
} else {
this.conditionGroup = {
logic: "AND",
conditions: [],
groups: []
}
}
// this.$refs.conditionStructureDialog.onOpen(row.matchCnd ? row.matchCnd : null)
},
// 条件构造器确认
confirmCnd() {
if (this.currentCourseIndex >= 0) {
this.$set(
this.formData.courseList[this.currentCourseIndex],
'matchCnd',
JSON.parse(JSON.stringify(this.conditionGroup))
);
}
this.conditionStructureDialogVisible = false;
this.currentCourseIndex = -1;
},
openMap(index) {
this.mapIndex = index
this.mapDialog = true
@@ -198,6 +278,18 @@ const customForm = {
this.unionList = await this.$businessTool.listUnion()
this.moreInfoDrawer = true
},
addCondition(val) {
// 保存条件到对应的课程
if (this.currentCourseIndex >= 0) {
this.$set(
this.formData.courseList[this.currentCourseIndex],
'matchCnd',
val
);
}
this.currentCourseIndex = -1;
}
},
created() {
if(!this.formData.courseList) {
@@ -205,6 +297,6 @@ const customForm = {
}
},
style: /*language=CSS*/ `
`
}
@@ -11,7 +11,7 @@ layout("/layouts/platform.html"){
<table-tool>
<!-- <el-button size="mini" type="primary" @click="exportAllInfo">导出全部</el-button>-->
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column
:index="indexMethod"
@@ -58,7 +58,7 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: '#app',
mixins: [initTableMixins],
@@ -94,8 +94,9 @@ layout("/layouts/platform.html"){
// "&projectName=" + projectName)
},
openView(row) {
this.$refs.guava.view()
this.$refs.viewInfo.openView(row.id)
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
exportInfo(id) {
this.$downLoad('/platform/leadThought/query/exportInfo', {id})
@@ -4,7 +4,7 @@ const DELEGATION_ONE_PUSH_FORMAL_DIALOG = {
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="团长推选委员"
title="分工会推选委员"
width="70%"
>
@@ -24,7 +24,7 @@ const DELEGATION_ONE_PUSH_FORMAL_DIALOG = {
<div slot-scope="{ option }">
<div class="transfer-item">
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName
}} - {{option.unitName}}
}} - {{option.unitName}} - {{option.unionName}}
</div>
<div class="transfer-item-details">
<span class="detail-item">
@@ -4,7 +4,7 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="团长最终投票"
title="分工会最终投票"
width="70%"
>
@@ -36,7 +36,7 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
</div>
</el-transfer>
<span slot="footer">
<span style="color:red;font-size: 15px; display:flex;text-align: right;">投票名额:{{delegationQuotaCount}}个</span>
<span style="color:red;font-size: 15px; display:flex;text-align: right;">投票名额:{{committeeQuotaCount}}个</span>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button>
@@ -53,7 +53,7 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
rightChecked: [],
attendanceRightChecked: [],
teacherMeetId: null,
delegationQuotaCount: 0
committeeQuotaCount: 0
}
},
methods: {
@@ -70,7 +70,7 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
data.userData.forEach(v => {
this.userData.push({userId: v.userId, ...v})
})
this.delegationQuotaCount = data.delegationQuotaCount
this.committeeQuotaCount = data.committeeQuotaCount
this.dialogVisible = true
} else {
this.$message.error(msg)
@@ -32,9 +32,9 @@ layout("/layouts/platform.html"){
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 prop="unionQuotaCount" label="分工会推荐总数">
<el-input-number v-model="formData.unionQuotaCount"
placeholder="请填写分工会推荐名额总数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="committeeQuotaCount" label="委员会预选人数">
<el-input-number v-model="formData.committeeQuotaCount"
@@ -63,8 +63,8 @@ layout("/layouts/platform.html"){
></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">
<table-tool label="分工会名额分配"></table-tool>
<el-table :data="formData.unionQuotaList" show-summar size="mini" max-height="500">
<el-table-column
align="center"
header-align="center"
@@ -108,20 +108,20 @@ layout("/layouts/platform.html"){
mixins: [initTableMixins],
data() {
return {
teacherMeets:[],
teacherMeets: [],
pageForm: {
sessionId: ''
},
tableColumns: [
{prop: 'delegationName', label: '代表团名称', sortable: true},
{prop: 'dbCount', label: '代表人数', sortable: true},
{prop: 'unionName', 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']}],
unionQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
firstTime: [{required: true, message: '必填', trigger: ['blur']}],
secondTime: [{required: true, message: '必填', trigger: ['blur']}]
}
@@ -154,9 +154,9 @@ layout("/layouts/platform.html"){
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)
const total = this.formData.unionQuotaList.reduce((sum, item) => sum + (item.quotaCount || 0), 0)
if (total > this.formData.unionQuotaCount) {
this.$message.warning('各分工会名额分配数之和不能超过' + this.formData.unionQuotaCount)
return
}
if (this.formData.firstTime && this.formData.firstTime.length > 1) {
@@ -168,7 +168,7 @@ layout("/layouts/platform.html"){
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))
this.$set(this.formData, 'unionQuotaList', JSON.stringify(this.formData.unionQuotaList))
const resp = await this.$axios.post('/platform/executiveCommittee/executiveCommitteeConfig/onHandle', this.formData)
if (resp.code === 0) {
await this.fetchConfig()