This commit is contained in:
=
2026-06-15 10:39:56 +08:00
parent 5b1e9cc85c
commit a0a93985d7
4 changed files with 19 additions and 2 deletions
@@ -691,7 +691,8 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
return Map.of(false, "未找到对应年度疗休养配置,请联系管理员");
}
if (StrUtil.isNotBlank(loginName) && loginName.startsWith("2025")) {
// 账号以当前年份开头视为当年新入职人员,按规则禁止报名。
if (StrUtil.isNotBlank(loginName) && loginName.startsWith(String.valueOf(DateUtil.thisYear()))) {
return Map.of(false, "抱歉,您是今年新入职,不能报名!");
}
@@ -527,6 +527,10 @@ module.exports = {
type: Boolean,
default: false
},
downloadOnly: {
type: Boolean,
default: false
},
del: {
type: Boolean,
default: true
@@ -571,6 +575,10 @@ module.exports = {
* 查看资源
*/
showSource(showItem, index, e,files) {
if (this.downloadOnly) {
this.downLoadFile(showItem)
return
}
const picArray = files.filter(o => [1,2,3].includes(this.resolvingShowByFileName(o.filename)))
const viewFileParent = $(e.target).closest(".viewFile")
@@ -796,6 +804,10 @@ module.exports = {
handlePreview(file) {
if (file.data) {
const {filename, id} = file.data
if (this.downloadOnly) {
this.downLoadFile(file.data)
return
}
preview(filename, id)
}
},
@@ -145,7 +145,10 @@ layout("/mobile/platform.html"){
pjaxReplace('/platform/mobile/theRapyRecuperation/mobileLineListPage')
},
async getConfigData() {
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
// 首页按当前年度读取配置,避免未重新提交的存量配置因 latestConfig 未标记而取不到服务须知文件。
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne', {
year: new Date().getFullYear().toString()
})
this.$set(this, 'configData', resp.data || {})
},
downloadNoticeFile(file) {
@@ -294,6 +294,7 @@ layout("/layouts/platform.html"){
<file-upload :files.sync="formData.files"
:max="5"
:type="['doc','docx','pdf']"
:download-only="true"
></file-upload>
</el-form-item>