diff --git a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/index.html b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/index.html index 68bc93dd..61a1a000 100644 --- a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/index.html @@ -23,7 +23,7 @@ layout("/layouts/platform.html"){ - + @@ -32,7 +32,7 @@ layout("/layouts/platform.html"){ icon="el-icon-plus" size="small" type="primary" - @click="$refs.pushFormalRef.onOpen(pageForm.sessionId,pageForm.unionId)" + @click="doPushFormal" >正式代表预选 - + @@ -252,10 +252,27 @@ layout("/layouts/platform.html"){ writeDialog: false, isRead: false, - userId: null + userId: null, + + // 当前分工会的最大推选人员 + maxPush: 0, + // 剩余正式代表推选名额 + formalPush: 0 } }, methods: { + doPushFormal() { + if (this.tableData.length >= this.maxPush) { + this.$message.warning("当前正式代表已超过最大推选人员数,如需调整请在表格数据列中选中【删除】按钮") + return + } + + this.$refs.pushFormalRef.onOpen(this.pageForm.sessionId, this.pageForm.unionId) + }, + setMaxCount(data) { + debugger + this.maxPush = data + }, doSearch() { this.pageData() const fullName = this.sessionOptions.find(v => v.id === this.pageForm.sessionId)?.fullName; @@ -303,9 +320,22 @@ layout("/layouts/platform.html"){ } } }) - } + }, + async pageData() { + try { + const resp = await this.$axios.post("/platform/teacherCongress/delegate/push/pageData", this.pageForm) + if (resp.code === 0) { + this.tableData = resp.data.list + this.pageForm.totalCount = resp.data.totalCount + this.formalPush = this.maxPush - this.tableData.length + } + } catch (e) { + console.log(e) + } + } }, created() { + this.pageData() this.listUnion() this.listSession() } diff --git a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-formal-dialog.js b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-formal-dialog.js index 98b8e9f2..e9c06640 100644 --- a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-formal-dialog.js +++ b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-formal-dialog.js @@ -13,6 +13,7 @@ const pushFormalDialog = { :props="{key: 'id',label: 'name'}" :titles="['可报人员名单', '当前选择']" filterable + @change="onTransferChange" >
@@ -35,6 +36,9 @@ const pushFormalDialog = { `, + props: { + maxPush: { type: Number, default: 1} + }, data() { return { dialogVisible: false, @@ -42,10 +46,23 @@ const pushFormalDialog = { userData: [], rightChecked: [], attendanceRightChecked: [], - sessionId: null + sessionId: null, } }, methods: { + onTransferChange(targetKeys, direction, movedKeys) { + // targetKeys 是新的 userValue + if (targetKeys.length > this.maxPush) { + this.$message.warning("剩余正式代表名额为【" + this.maxPush + "】人,请合理调配!"); + + // 只保留前 maxSelectCount 个(或根据业务逻辑决定保留哪些) + const validKeys = targetKeys.slice(0, this.maxPush); + + // 更新 model 值(注意:避免无限触发 change) + this.userValue = validKeys; + + } + }, async onOpen(sessionId, unionId) { this.dialogVisible = true this.sessionId = sessionId diff --git a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-progress.js b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-progress.js index 665c1ace..7123fef4 100644 --- a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-progress.js +++ b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegate/push/push-progress.js @@ -426,8 +426,13 @@ const pushProgress = {
- 正式代表完成信息填写后才能进行上报,列席代表可直接上报且不计入名额 + 正式代表完成信息填写后才能进行上报,列席代表可直接上报且不计入名额
+ +
+
+ 当前代表为预推选,不计入代表总额,需等待党委书记审核后方才记录 +
@@ -540,6 +545,7 @@ const pushProgress = { if (code === 0) { if (data) { this.metrics = data + this.$emit('max-count', this.metrics.total.target) } else { this.$message.error('暂未分配名额') } diff --git a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegation/headForm.js b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegation/headForm.js index 1e0d7798..94545124 100644 --- a/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegation/headForm.js +++ b/src/main/resources/views/platform/zhgh/democratic/teachercongress/delegation/headForm.js @@ -65,7 +65,7 @@ const HEAD_FORM_TEMPLATE = { code: [{required: true, message: "必填", trigger: ["change", "blur"]}], userId: [{required: true, message: "必填", trigger: ["change", "blur"]}], viceUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}], - contactUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}] + // contactUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}] } } }, diff --git a/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/index.html b/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/index.html index 2dbecdf5..cc6a420b 100644 --- a/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/index.html @@ -43,7 +43,9 @@ layout("/layouts/platform.html"){ - + diff --git a/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/manualAllocationDialog.js b/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/manualAllocationDialog.js index 751ddbfc..45318c1a 100644 --- a/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/manualAllocationDialog.js +++ b/src/main/resources/views/platform/zhgh/democratic/teachercongress/prepare/quotaAllocation/manualAllocationDialog.js @@ -74,7 +74,9 @@ const MANUAL_ALLOCATION_DIALOG = { - +