南大三十年教职工疗休养

This commit is contained in:
2026-06-25 20:54:58 +08:00
parent f39dad393f
commit a1547b133e
16 changed files with 328 additions and 62 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

@@ -238,13 +238,16 @@ layout("/layouts/v4/baseLayout.html"){
const bounds = this.getTourHomeFloatBounds(width, height)
this.tourHomeFloatEntries = (rows || []).map((item, index) => {
const offset = index * 28
const backendVx = Number(item.vx)
const backendVy = Number(item.vy)
const startRight = item.startCorner === "rightTop"
return Object.assign({}, item, {
width: width,
height: height,
x: Math.min(bounds.minX + offset, bounds.maxX),
x: startRight ? Math.max(bounds.maxX - offset, bounds.minX) : Math.min(bounds.minX + offset, bounds.maxX),
y: Math.min(bounds.minY + offset, bounds.maxY),
vx: (index % 2 === 0 ? 1 : -1) * (0.028 + index * 0.004),
vy: (index % 3 === 0 ? 1 : -1) * (0.022 + index * 0.003)
vx: Number.isFinite(backendVx) && backendVx !== 0 ? backendVx : (index % 2 === 0 ? 1 : -1) * (0.028 + index * 0.004),
vy: Number.isFinite(backendVy) && backendVy !== 0 ? backendVy : (index % 3 === 0 ? 1 : -1) * (0.022 + index * 0.003)
})
})
if (this.tourHomeFloatEntries.length > 0) {
@@ -26,6 +26,11 @@ layout("/layouts/platform.html"){
<el-option v-for="item in pageMatterOptions" :key="item.matterId" :label="matterOptionLabel(item)" :value="item.matterId"></el-option>
</el-select>
</search-item>
<search-item label="出行时间段">
<el-select v-model="pageForm.periodId" clearable filterable placeholder="请选择出行时间段" style="width: 100%">
<el-option v-for="item in pagePeriodOptions" :key="item.id" :label="item.label || item.periodName" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="人员类型">
<el-select v-model="pageForm.personType" clearable placeholder="请选择人员类型" style="width: 100%">
<el-option label="正式人员" value="FORMAL"></el-option>
@@ -69,7 +74,7 @@ layout("/layouts/platform.html"){
<el-table-column label="所在单位" prop="unitName" min-width="180" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="线路" prop="lineName" min-width="200" sortable="custom" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="出行时间" prop="travelPeriod" min-width="180" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="出行时" prop="travelPeriod" min-width="180" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="出行时" prop="periodName" min-width="180" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="乘车地点" prop="boardingPlace" min-width="140" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="已上传图片数量" width="140" align="center" header-align="center">
<template slot-scope="{row}">
@@ -426,6 +431,7 @@ layout("/layouts/platform.html"){
return {
settingOptions: [],
pageMatterOptions: [],
pagePeriodOptions: [],
assignSettingOptions: [],
assignMatterOptions: [],
assignPeriodOptions: [],
@@ -473,6 +479,7 @@ layout("/layouts/platform.html"){
year: currentYear,
settingId: "",
matterId: "",
periodId: "",
personType: "",
keyword: ""
},
@@ -548,6 +555,7 @@ layout("/layouts/platform.html"){
this.pageForm.year = currentYear
this.pageForm.settingId = ""
this.pageForm.matterId = ""
this.pageForm.periodId = ""
this.pageForm.personType = ""
this.pageForm.keyword = ""
this.loadSettingOptions()
@@ -555,24 +563,38 @@ layout("/layouts/platform.html"){
pageYearChange() {
this.pageForm.settingId = ""
this.pageForm.matterId = ""
this.pageForm.periodId = ""
this.pageMatterOptions = []
this.pagePeriodOptions = []
this.loadSettingOptions()
},
pageSettingChange() {
this.pageForm.matterId = ""
this.pageForm.periodId = ""
this.loadPageMatterOptions()
this.loadPageTravelPeriodOptions()
},
loadSettingOptions() {
this.$axios.post(loc() + "/settingOptions", {year: this.pageForm.year}).then((res) => {
if (res.code === 0) {
this.settingOptions = res.data || []
const hasCurrentSetting = this.settingOptions.some(item => item.id === this.pageForm.settingId)
if (this.pageForm.settingId && !hasCurrentSetting) {
this.pageForm.settingId = ""
this.pageForm.matterId = ""
this.pageForm.periodId = ""
}
// 主页面默认选择当前年度第一条配置,避免进入页面后查询范围为空。
if (!this.pageForm.settingId && this.settingOptions.length > 0) {
this.pageForm.settingId = this.settingOptions[0].id
}
if (this.pageForm.settingId) {
this.loadPageMatterOptions()
this.loadPageTravelPeriodOptions()
this.doSearch()
} else {
this.pageMatterOptions = []
this.pagePeriodOptions = []
this.doSearch()
}
}
@@ -589,9 +611,28 @@ layout("/layouts/platform.html"){
}
})
},
loadPageTravelPeriodOptions() {
if (!this.pageForm.settingId) {
this.pagePeriodOptions = []
this.pageForm.periodId = ""
return
}
this.$axios.post(loc() + "/travelPeriodOptions", {settingId: this.pageForm.settingId}).then((res) => {
if (res.code === 0) {
this.pagePeriodOptions = res.data || []
const hasCurrentPeriod = this.pagePeriodOptions.some(item => item.id === this.pageForm.periodId)
if (this.pageForm.periodId && !hasCurrentPeriod) {
this.pageForm.periodId = ""
}
} else {
this.pagePeriodOptions = []
this.pageForm.periodId = ""
}
})
},
exportData() {
const params = new URLSearchParams()
;["year", "settingId", "matterId", "personType", "keyword", "pageOrderName", "pageOrderBy"].forEach(key => {
;["year", "settingId", "matterId", "periodId", "personType", "keyword", "pageOrderName", "pageOrderBy"].forEach(key => {
const value = this.pageForm[key]
if (value !== undefined && value !== null && value !== "") {
params.append(key, value)
@@ -26,6 +26,11 @@ layout("/layouts/platform.html"){
<el-option v-for="item in pageMatterOptions" :key="item.matterId" :label="matterOptionLabel(item)" :value="item.matterId"></el-option>
</el-select>
</search-item>
<search-item label="出行时间段">
<el-select v-model="pageForm.periodId" clearable filterable placeholder="请选择出行时间段" style="width: 100%">
<el-option v-for="item in pagePeriodOptions" :key="item.id" :label="item.label || item.periodName" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属分工会">
<el-select v-model="pageForm.unionId" clearable filterable placeholder="请选择分工会" style="width: 100%">
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
@@ -87,6 +92,7 @@ layout("/layouts/platform.html"){
<el-table-column label="所在单位" prop="unitName" min-width="180" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="线路" prop="lineName" min-width="200" sortable="custom" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="出行时间" prop="travelPeriod" min-width="180" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="出行时段" prop="periodName" min-width="180" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="乘车地点" prop="boardingPlace" min-width="140" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="已上传图片数量" width="140" align="center" header-align="center">
<template slot-scope="{row}">
@@ -195,7 +201,7 @@ layout("/layouts/platform.html"){
<el-select v-model="candidateForm.unionId" clearable filterable placeholder="所属分工会" style="width: 220px" @change="candidateSearch">
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select v-model="candidateForm.summerJoined" clearable placeholder="今年是否已参加暑期疗休养" style="width: 230px" @change="candidateSearch">
<el-select v-model="candidateForm.summerJoined" clearable placeholder="今年是否已暑期疗休养台账" style="width: 230px" @change="candidateSearch">
<el-option label="否" value="false"></el-option>
<el-option label="是" value="true"></el-option>
</el-select>
@@ -424,6 +430,7 @@ layout("/layouts/platform.html"){
return {
settingOptions: [],
pageMatterOptions: [],
pagePeriodOptions: [],
assignSourceOptions: [
{label: "校工会分配", value: "SCHOOL_UNION"},
{label: "分工会分配", value: "BRANCH_UNION"}
@@ -468,6 +475,7 @@ layout("/layouts/platform.html"){
year: currentYear,
settingId: "",
matterId: "",
periodId: "",
unionId: "",
personType: "",
assignSource: "SCHOOL_UNION",
@@ -548,6 +556,7 @@ layout("/layouts/platform.html"){
this.pageForm.year = currentYear
this.pageForm.settingId = ""
this.pageForm.matterId = ""
this.pageForm.periodId = ""
this.pageForm.unionId = ""
this.pageForm.personType = ""
// 页面打开和重置后默认查看校工会分配,清空该筛选项时后端会查询全部来源。
@@ -559,24 +568,38 @@ layout("/layouts/platform.html"){
pageYearChange() {
this.pageForm.settingId = ""
this.pageForm.matterId = ""
this.pageForm.periodId = ""
this.pageMatterOptions = []
this.pagePeriodOptions = []
this.loadSettingOptions()
},
pageSettingChange() {
this.pageForm.matterId = ""
this.pageForm.periodId = ""
this.loadPageMatterOptions()
this.loadPageTravelPeriodOptions()
},
loadSettingOptions() {
this.$axios.post(loc() + "/settingOptions", {year: this.pageForm.year}).then((res) => {
if (res.code === 0) {
this.settingOptions = res.data || []
const hasCurrentSetting = this.settingOptions.some(item => item.id === this.pageForm.settingId)
if (this.pageForm.settingId && !hasCurrentSetting) {
this.pageForm.settingId = ""
this.pageForm.matterId = ""
this.pageForm.periodId = ""
}
// 主页面查询条件默认选择当前年度第一条配置,并以该配置刷新列表。
if (!this.pageForm.settingId && this.settingOptions.length > 0) {
this.pageForm.settingId = this.settingOptions[0].id
}
if (this.pageForm.settingId) {
this.loadPageMatterOptions()
this.loadPageTravelPeriodOptions()
this.doSearch()
} else {
this.pageMatterOptions = []
this.pagePeriodOptions = []
this.doSearch()
}
}
@@ -593,6 +616,25 @@ layout("/layouts/platform.html"){
}
})
},
loadPageTravelPeriodOptions() {
if (!this.pageForm.settingId) {
this.pagePeriodOptions = []
this.pageForm.periodId = ""
return
}
this.$axios.post(loc() + "/travelPeriodOptions", {settingId: this.pageForm.settingId}).then((res) => {
if (res.code === 0) {
this.pagePeriodOptions = res.data || []
const hasCurrentPeriod = this.pagePeriodOptions.some(item => item.id === this.pageForm.periodId)
if (this.pageForm.periodId && !hasCurrentPeriod) {
this.pageForm.periodId = ""
}
} else {
this.pagePeriodOptions = []
this.pageForm.periodId = ""
}
})
},
loadUnionOptions() {
this.$axios.post(loc() + "/unionOptions").then((res) => {
if (res.code === 0) {
@@ -617,7 +659,7 @@ layout("/layouts/platform.html"){
},
exportData() {
const params = new URLSearchParams()
;["year", "settingId", "matterId", "unionId", "personType", "assignSource", "cancelled", "keyword", "pageOrderName", "pageOrderBy"].forEach(key => {
;["year", "settingId", "matterId", "periodId", "unionId", "personType", "assignSource", "cancelled", "keyword", "pageOrderName", "pageOrderBy"].forEach(key => {
const value = this.pageForm[key]
if (value !== undefined && value !== null && value !== "") {
params.append(key, value)
@@ -627,7 +669,7 @@ layout("/layouts/platform.html"){
},
buildCurrentQueryParams() {
const params = {}
;["year", "settingId", "matterId", "unionId", "personType", "assignSource", "cancelled", "keyword", "pageOrderName", "pageOrderBy"].forEach(key => {
;["year", "settingId", "matterId", "periodId", "unionId", "personType", "assignSource", "cancelled", "keyword", "pageOrderName", "pageOrderBy"].forEach(key => {
const value = this.pageForm[key]
if (value !== undefined && value !== null && value !== "") {
params[key] = value
@@ -491,8 +491,8 @@ layout("/layouts/platform.html"){
</el-table-column>
<el-table-column label="已分配合计" width="150" align="center" header-align="center">
<template slot-scope="{row}">
<span :class="periodQuotaRowTotal(row.unionId) > toNonNegativeInteger(row.formalQuota) ? 'text-danger' : 'text-success'">
{{ periodQuotaRowTotal(row.unionId) }} / {{ toNonNegativeInteger(row.formalQuota) }}
<span :class="periodQuotaRowTotal(row.unionId) > periodQuotaAvailable(row.unionId) ? 'text-danger' : 'text-success'">
{{ periodQuotaRowTotal(row.unionId) }} / {{ periodQuotaAvailable(row.unionId) }}
</span>
</template>
</el-table-column>
@@ -742,7 +742,8 @@ layout("/layouts/platform.html"){
return Object.assign({}, item, {
formalQuota: this.toNonNegativeInteger(item.formalQuota),
backupQuota: this.toNonNegativeInteger(item.backupQuota),
memberCount: this.toNonNegativeInteger(item.memberCount)
memberCount: this.toNonNegativeInteger(item.memberCount),
schoolFormalAssignedCount: this.toNonNegativeInteger(item.schoolFormalAssignedCount)
})
})
},
@@ -908,10 +909,16 @@ layout("/layouts/platform.html"){
return sum + this.toNonNegativeInteger(item.formalQuota)
}, 0)
},
periodQuotaRemaining(unionId) {
periodQuotaAvailable(unionId) {
const unionRow = (this.formData.unionQuotas || []).find((item) => item.unionId === unionId)
const formalQuota = unionRow ? this.toNonNegativeInteger(unionRow.formalQuota) : 0
const remaining = formalQuota - this.periodQuotaRowTotal(unionId)
const schoolAssignedCount = unionRow ? this.toNonNegativeInteger(unionRow.schoolFormalAssignedCount) : 0
// Time-period quota can only distribute the branch quota left after school-union assignment.
const availableQuota = formalQuota - schoolAssignedCount
return availableQuota > 0 ? availableQuota : 0
},
periodQuotaRemaining(unionId) {
const remaining = this.periodQuotaAvailable(unionId) - this.periodQuotaRowTotal(unionId)
return remaining > 0 ? remaining : 0
},
buildPeriodQuotasForSubmit() {
@@ -1448,10 +1455,10 @@ layout("/layouts/platform.html"){
const rows = this.formData.unionQuotas || []
for (let i = 0; i < rows.length; i++) {
const row = rows[i]
const formalQuota = this.toNonNegativeInteger(row.formalQuota)
const formalQuota = this.periodQuotaAvailable(row.unionId)
const usedQuota = this.periodQuotaRowTotal(row.unionId)
if (usedQuota > formalQuota) {
this.$message.warning("分工会【" + row.unionName + "】时间段名额合计 " + usedQuota + ",不能大于正式名额 " + formalQuota)
this.$message.warning("分工会【" + row.unionName + "】时间段名额合计 " + usedQuota + ",不能大于扣除校工会已分配后的可分配正式名额 " + formalQuota)
return false
}
}