diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java index 578c2ee..ce141dd 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java @@ -9,10 +9,12 @@ import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; import org.nutz.dao.entity.Record; +import org.nutz.dao.sql.Sql; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; /** * @Author: 1V @@ -76,8 +78,15 @@ public class LxyCommon { @At @ViReturn - public Object getHdList() { - return lxyHdService.list(Sqls.create("SELECT id,`name` FROM `lxy_hd` ORDER BY hdcjsj desc ")); + public Object getHdList(@Param(value = "year", required = false) Integer year) { + Sql sql = Sqls.create("SELECT id,`name` FROM `lxy_hd` $condition"); + Cnd cnd = Cnd.NEW(); + if (year != null) { + cnd.and(new org.nutz.dao.util.cri.Static("YEAR(hdcjsj) = " + year)); + } + cnd.desc("hdcjsj"); + sql.setCondition(cnd); + return lxyHdService.list(sql); } @At @@ -88,8 +97,16 @@ public class LxyCommon { @At @ViReturn - public Object getNowHdList() { - return lxyHdService.list(Sqls.create("SELECT id,`name` FROM `lxy_hd` WHERE now() < bmjzsj ORDER BY hdcjsj desc ")); + public Object getNowHdList(@Param(value = "year", required = false) Integer year) { + Sql sql = Sqls.create("SELECT id,`name` FROM `lxy_hd` $condition"); + Cnd cnd = Cnd.NEW(); + cnd.and(new org.nutz.dao.util.cri.Static("now() >= bmkssj AND now() < bmjzsj")); + if (year != null) { + cnd.and(new org.nutz.dao.util.cri.Static("YEAR(hdcjsj) = " + year)); + } + cnd.desc("hdcjsj"); + sql.setCondition(cnd); + return lxyHdService.list(sql); } } diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java index 1847678..407739d 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java @@ -101,6 +101,7 @@ public class LxyFghShController { cnd.and(new Static("bm.bmzt = 1 ")); cnd.and(new Static("bm.bmlx = 2 ")); + cnd.and(new Static("(hd.activityGroupId IS NULL OR u.id IN (SELECT userId FROM activity_user_scope WHERE groupId = hd.activityGroupId))")); if (Strings.isNotBlank(hdid)) { cnd.and("bm.hdid", "=", hdid); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java index bb1f971..367f536 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java @@ -16,6 +16,7 @@ import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.lxy.model.Lxy_bm; import io.v.nutz.zhgh.lxy.model.Lxy_grxx; +import io.v.nutz.zhgh.lxy.model.Lxy_hd; import io.v.nutz.zhgh.lxy.model.Lxy_mefp; import io.v.nutz.zhgh.lxy.service.LxyBmService; import io.v.nutz.zhgh.lxy.service.LxyGrxxService; @@ -119,7 +120,7 @@ public class LxyGhbmController { """); Cnd cnd = Cnd.NEW(); - cnd.and(new Static("now() < hd.bmjzsj")); + cnd.and(new Static("now() >= hd.bmkssj AND now() < hd.bmjzsj")); cnd.and("mefp.hdid", "=", hdid); cnd.andEX("un.id", "=", unionId); @@ -182,6 +183,7 @@ public class LxyGhbmController { Cnd cnd = Cnd.NEW(); cnd.and("member", "=", 1); cnd.and("unit.unionid", "=", unionid); + addActivityScopeCnd(cnd, "u", hdid); cnd.and(new Static("u.id NOT IN ( SELECT bm.userid FROM lxy_bm bm WHERE bm.hdid = '" + hdid + "' OR hdid = '1' ) ")); if (checks != null && checks.length > 0) { for (String check : checks) { @@ -241,6 +243,13 @@ public class LxyGhbmController { return Result.error("未获取到报名数据,请选择人员报名"); } + if (!checkActivitySignUpTime(bmList.get(0).getHdid())) { + return Result.error("当前不在报名时间范围内"); + } + + if (!checkActivityUserScope(bmList.get(0).getHdid(), bmList.stream().map(Lxy_bm::getUserid).collect(Collectors.toList()))) { + return Result.error("存在不在活动人员范围内的人员,请重新选择"); + } String unionId = Vi.getUnionId(); Lxy_mefp meNum = dao.fetch(Lxy_mefp.class, Cnd.where("hdid", "=", bmList.get(0).getHdid()).and("ghid", "=", unionId)); @@ -384,6 +393,9 @@ public class LxyGhbmController { try { lock.lock(); String unionId = Vi.getUnionId(); + if (!checkActivitySignUpTime(projectId)) { + return Result.error("当前不在报名时间范围内"); + } // 已经报名的,排除审核未通过 int count = dao.count(Lxy_bm.class, Cnd.where("hdid", "=", projectId).and("ghid", "=", unionId) .and(Cnd.exps("bmzt", "in", List.of("1", "3", "5", "6")).or("bmzt", "is", null))); @@ -416,6 +428,7 @@ public class LxyGhbmController { List sourUserIdList = sourceList.stream().map(Lxy_bm::getUserid).collect(Collectors.toList()); String today = cn.hutool.core.date.DateUtil.today(); + Integer activityGroupId = getActivityGroupId(projectId); // 要插入的数据 List bmList = new ArrayList<>(); @@ -440,6 +453,12 @@ public class LxyGhbmController { continue; } + if (activityGroupId != null && dao.count("activity_user_scope", Cnd.where("groupId", "=", activityGroupId).and("userId", "=", user.getId())) == 0) { + temp.setRemark("此人员不在活动人员范围内"); + errorInfos.add(temp); + continue; + } + if (lastJoinUserIds.contains(user.getId())) { temp.setRemark("此教师参加过以往疗休养,请更换人员上报"); errorInfos.add(temp); @@ -506,4 +525,33 @@ public class LxyGhbmController { } } + + private void addActivityScopeCnd(Cnd cnd, String userAlias, String hdid) { + Integer activityGroupId = getActivityGroupId(hdid); + if (activityGroupId != null) { + cnd.and(new Static(userAlias + ".id IN (SELECT userId FROM activity_user_scope WHERE groupId = " + activityGroupId + ")")); + } + } + + private boolean checkActivityUserScope(String hdid, List userIds) { + Integer activityGroupId = getActivityGroupId(hdid); + if (activityGroupId == null) { + return true; + } + List ids = userIds.stream().filter(Strings::isNotBlank).distinct().collect(Collectors.toList()); + if (ids.size() != userIds.size()) { + return false; + } + return dao.count("activity_user_scope", Cnd.where("groupId", "=", activityGroupId).and("userId", "in", ids)) == ids.size(); + } + + private boolean checkActivitySignUpTime(String hdid) { + return lxyHdService.count(Cnd.where("id", "=", hdid) + .and(new Static("now() >= bmkssj AND now() < bmjzsj"))) > 0; + } + + private Integer getActivityGroupId(String hdid) { + Lxy_hd hd = lxyHdService.fetch(hdid); + return hd == null ? null : hd.getActivityGroupId(); + } } diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java index 8e472d1..1e77890 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java @@ -107,6 +107,7 @@ public class LxyGrBmController { cnd.and(new Static("now() < hd.bmjzsj")); cnd.and(new Static("bm.bmlx = 2 ")); + cnd.and(new Static("(hd.activityGroupId IS NULL OR u.id IN (SELECT userId FROM activity_user_scope WHERE groupId = hd.activityGroupId))")); if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin"})) { cnd.and("u.id", "=", ShiroUtil.getPrincipalProperty("id")); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java index 2879d0c..0ad4b74 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java @@ -74,8 +74,12 @@ public class LxyHdCon { CndPlus cnd = CndPlus.create(); cnd.andEx("YEAR(hdcjsj)", "=", year); - cnd.andEx("id", "=", hdcd); - cnd.andEx("id", "=", pastQuota); + if (Strings.isNotBlank(hdcd)) { + cnd.and("id", "=", hdcd); + } + if (Strings.isNotBlank(pastQuota)) { + cnd.and("id", "=", pastQuota); + } if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) { cnd.where().andLike(searchName, searchKeyword); } @@ -94,9 +98,13 @@ public class LxyHdCon { @AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"}) @ViReturn @RequiresPermissions("zgfw.lxy.hdmange") - public Object doAdd(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, Lxy_mefp[] mefp) throws IOException { + public Object doAdd(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, Lxy_mefp[] mefp, + @Param(value = "activityGroupId", required = false) Integer activityGroupId, + @Param(value = "activityGroupName", required = false) String activityGroupName) throws IOException { hd.setHdcjsj(new Date()); + hd.setActivityGroupId(activityGroupId); + hd.setActivityGroupName(Strings.isBlank(activityGroupName) ? "全部教职工" : activityGroupName); hd = lxyHdService.insert(hd); for (Lxy_mefp lxyMefp : mefp) { @@ -136,8 +144,16 @@ public class LxyHdCon { @AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"}) @ViReturn @RequiresPermissions("zgfw.lxy.hdmange") - public Object doEdit(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, String[] delFiles) throws IOException { + public Object doEdit(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, String[] delFiles, + @Param(value = "activityGroupId", required = false) Integer activityGroupId, + @Param(value = "activityGroupName", required = false) String activityGroupName) throws IOException { + hd.setActivityGroupId(activityGroupId); + hd.setActivityGroupName(Strings.isBlank(activityGroupName) ? "全部教职工" : activityGroupName); lxyHdService.updateIgnoreNull(hd); + baseService.dao().update(Lxy_hd.class, + Chain.make("activityGroupId", activityGroupId) + .add("activityGroupName", hd.getActivityGroupName()), + Cnd.where("id", "=", hd.getId())); for (TempFile file : files) { String rid = R.UU32(); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java index 3b94986..996b33f 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java @@ -80,6 +80,7 @@ public class LxyMetjController { if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "SchoolUnionAdmin"})) { cnd.and(new Static("mefp.ghid in " + vi.getMangeUnionStr())); + cnd.and(new Static("(hd.activityGroupId IS NULL OR EXISTS (SELECT 1 FROM activity_user_scope aus LEFT JOIN sys_user u ON u.id = aus.userId WHERE aus.groupId = hd.activityGroupId AND u.unionid = mefp.ghid))")); } if (year != null) { @@ -141,6 +142,7 @@ public class LxyMetjController { "FROM\n" + "\tsys_user u\n" + "\tLEFT JOIN lxy_bm bm ON bm.userid = u.id AND bm.hdid = '" + hdid + "'\n" + + "\tLEFT JOIN lxy_hd hd ON hd.id = '" + hdid + "'\n" + "\tLEFT JOIN sys_unit unit ON u.unitid = unit.id\n" + "\tLEFT JOIN ry_rygl_gr ry ON ry.userid = u.id\n" + "\tLEFT JOIN sys_union un ON unit.unionid = un.id $condition"); @@ -148,6 +150,7 @@ public class LxyMetjController { Cnd cnd = Cnd.NEW(); cnd.and("unit.unionid", "=", unionid); + cnd.and(new Static("(hd.activityGroupId IS NULL OR u.id IN (SELECT userId FROM activity_user_scope WHERE groupId = hd.activityGroupId))")); if (sign == 0) { cnd.and(new Static("u.id not in (SELECT bm.userid from lxy_bm bm WHERE bm.bmlx=2 AND bm.hdid = '" + hdid + "')")); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java b/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java index 2050b79..8dc207c 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java @@ -54,6 +54,16 @@ public class Lxy_hd { @ColDefine(type = ColType.VARCHAR, width = 30) private String hdcd; + @Column + @Comment("面向对象") + @ColDefine(type = ColType.INT) + private Integer activityGroupId; + + @Column + @Comment("面向对象名称") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String activityGroupName; + @Column @Comment("活动注意事项") @ColDefine(type = ColType.TEXT) diff --git a/src/main/resources/static/assets/platform/js/v.js b/src/main/resources/static/assets/platform/js/v.js index 200a4f9..2692196 100644 --- a/src/main/resources/static/assets/platform/js/v.js +++ b/src/main/resources/static/assets/platform/js/v.js @@ -305,8 +305,8 @@ const getGzzllx = async () => { * 获取疗休养活动 * @returns {Promise<*>} */ -const getLxyHd = async () => { - const { data } = await $.get("/platform/zgfw/lxy/common/getHdList") +const getLxyHd = async (year) => { + const { data } = await $.get("/platform/zgfw/lxy/common/getHdList", { year }) return data } const getlxyHdCd = async () => { @@ -314,8 +314,8 @@ const getlxyHdCd = async () => { return data } -const getNowLxyHd = async () => { - const { data } = await $.get("/platform/zgfw/lxy/common/getNowHdList") +const getNowLxyHd = async (year) => { + const { data } = await $.get("/platform/zgfw/lxy/common/getNowHdList", { year }) return data } diff --git a/src/main/resources/views/mobile/welfare/mine/address.html b/src/main/resources/views/mobile/welfare/mine/address.html index 3d03a5a..99c5a99 100644 --- a/src/main/resources/views/mobile/welfare/mine/address.html +++ b/src/main/resources/views/mobile/welfare/mine/address.html @@ -44,6 +44,7 @@ layout("/mobile/platform.html"){ mixins: [mobileMixins, welfareMixins], data() { return { + projectId: GetQueryString("projectId"), chosenAddressId: null } }, @@ -56,16 +57,27 @@ layout("/mobile/platform.html"){ } }, onAdd() { - pjaxReplace("/mobile/welfare/mine/addressEdit") + if (this.projectId) { + pjaxReplace("/mobile/welfare/mine/addressEdit?projectId=" + this.projectId) + } else { + pjaxReplace("/mobile/welfare/mine/addressEdit") + } }, onEdit(item, index) { - pjaxReplace("/mobile/welfare/mine/addressEdit?id=" + item.id) + if (this.projectId) { + pjaxReplace("/mobile/welfare/mine/addressEdit?id=" + item.id + "&projectId=" + this.projectId) + } else { + pjaxReplace("/mobile/welfare/mine/addressEdit?id=" + item.id) + } } }, async created() { this.startLoading() - await this.selectAddressList() - this.closeLoading() + try { + await this.selectAddressList() + } finally { + this.closeLoading() + } } }) diff --git a/src/main/resources/views/mobile/welfare/mine/address_edit.html b/src/main/resources/views/mobile/welfare/mine/address_edit.html index fd2fef0..790170a 100644 --- a/src/main/resources/views/mobile/welfare/mine/address_edit.html +++ b/src/main/resources/views/mobile/welfare/mine/address_edit.html @@ -101,8 +101,12 @@ layout("/mobile/platform.html"){ duration: 0 }) content.userName = content.name - const resp = await $.post("/mobile/welfare/mine/doSaveUserAddress", content) - loading.close() + let resp = {} + try { + resp = await $.post("/mobile/welfare/mine/doSaveUserAddress", content) + } finally { + this.closeToastLoading(loading) + } if (resp.code === 0) { this.$toast.success(resp.msg) this.$nextTick(() => { @@ -117,14 +121,28 @@ layout("/mobile/platform.html"){ overlay: true, duration: 0 }) - const resp = await $.post("/mobile/welfare/mine/deleteAddress", { id: content.id }) - loading.close() + let resp = {} + try { + resp = await $.post("/mobile/welfare/mine/deleteAddress", { id: content.id }) + } finally { + this.closeToastLoading(loading) + } if (resp.code === 0) { this.$toast.success(resp.msg) this.$nextTick(() => { this.back() }) } + }, + closeToastLoading(loading) { + if (loading && typeof loading.clear === "function") { + loading.clear() + } else if (loading && typeof loading.close === "function") { + loading.close() + } + if (this.$toast && typeof this.$toast.clear === "function") { + this.$toast.clear() + } } }, async created() { diff --git a/src/main/resources/views/platform/lxy/dialogView.html b/src/main/resources/views/platform/lxy/dialogView.html index 309f088..29c8a90 100644 --- a/src/main/resources/views/platform/lxy/dialogView.html +++ b/src/main/resources/views/platform/lxy/dialogView.html @@ -93,14 +93,20 @@ var now = new Date().getTime() var hdkssj = moment(row.hdkssj.valueOf()) var hdjssj = moment(row.hdjssj.valueOf()) + var bmkssj = moment(row.bmkssj.valueOf()) var bmjzsj = moment(row.bmjzsj.valueOf()) - if (now < bmjzsj) { + if (now < bmkssj) { + return { + class: 'text-info', + name: '报名未开始' + } + } else if (bmkssj <= now && now < bmjzsj) { return { class: 'text-success', name: '活动报名中' } - } else if (bmjzsj < now && now < hdkssj) { + } else if (bmjzsj <= now && now < hdkssj) { return { class: 'text-info', name: '报名已截止' diff --git a/src/main/resources/views/platform/welfare/addressManage.html b/src/main/resources/views/platform/welfare/addressManage.html index bca3b68..056046c 100644 --- a/src/main/resources/views/platform/welfare/addressManage.html +++ b/src/main/resources/views/platform/welfare/addressManage.html @@ -142,24 +142,26 @@ layout("/layouts/platform.html"){ function ensureAddressDzOption(options, row) { const provinceTemplate = chengShiList.find((c) => c.label === row.province) const cityTemplate = provinceTemplate?.children?.find((c) => c.label === row.city) - if (!provinceTemplate || !cityTemplate) { + if (!row.province || !row.city) { return options } const nextOptions = JSON.parse(JSON.stringify(options)) let province = nextOptions.find((c) => c.label === row.province) if (!province) { - province = {...provinceTemplate, children: []} + province = provinceTemplate ? {...provinceTemplate, children: []} : {label: row.province, value: row.province, children: []} nextOptions.push(province) } let city = province.children.find((c) => c.label === row.city) if (!city) { - city = {...cityTemplate, children: []} + city = cityTemplate ? {...cityTemplate, children: []} : {label: row.city, value: row.city, children: []} province.children.push(city) } if (row.county) { - const countyTemplate = cityTemplate.children?.find((c) => c.label === row.county) + const countyTemplate = cityTemplate?.children?.find((c) => c.label === row.county) if (countyTemplate && !city.children.find((c) => c.label === row.county)) { city.children.push(countyTemplate) + } else if (!countyTemplate && !city.children.find((c) => c.label === row.county)) { + city.children.push({label: row.county, value: row.areaCode || row.county}) } } return nextOptions @@ -209,16 +211,19 @@ layout("/layouts/platform.html"){ ) }, handleChange(val) { - if (val) { + if (val && val.length > 0) { let provinceName = "" let cityName = "" let countyName = "" const province = this.dzOptions.find((c) => c.value === val[0]) + if (!province) return provinceName = province.label const city = province.children.find((p) => p.value === val[1]) + if (!city) return cityName = city.label if (val.length === 3) { const county = city.children.find((p) => p.value === val[2]) + if (!county) return countyName = county.label this.$set(this.formData, "areaCode", county.value) } else { @@ -275,17 +280,23 @@ layout("/layouts/platform.html"){ }, openEdit(row) { this.dzOptions = ensureAddressDzOption(getWelfareReceiveDzOptions(), row) - row.addressList = [] + const addressList = [] const province = this.dzOptions.find((c) => c.label === row.province) - row.addressList.push(province.value) - const city = province.children.find((p) => p.label === row.city) - row.addressList.push(city.value) - if (row.county) { + if (province) { + addressList.push(province.value) + } + const city = province?.children?.find((p) => p.label === row.city) + if (city) { + addressList.push(city.value) + } + if (row.county && city) { const county = city.children.find((p) => p.label === row.county) - row.addressList.push(county.value) + if (county) { + addressList.push(county.value) + } } - this.formData = { ...row } + this.formData = { ...row, addressList } this.formData.isDefault = this.formData.isDefault ? "1" : "0" this.dialogVisible = true }, diff --git a/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html b/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html index 2cf1be0..8a738a5 100644 --- a/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html +++ b/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html @@ -48,7 +48,13 @@ layout("/layouts/platform.html"){
- +
@@ -121,8 +127,8 @@ layout("/layouts/platform.html"){ 查看报名 - 导入 - 报名 + 导入 + 报名 @@ -583,6 +589,12 @@ display: -webkit-box; "file-import": httpVueLoader("/components/plugins/FileImport.vue") }, methods: { + isSignUpTime(row) { + const now = new Date().getTime() + const bmkssj = moment(row.bmkssj.valueOf()) + const bmjzsj = moment(row.bmjzsj.valueOf()) + return bmkssj <= now && now < bmjzsj + }, openImport() { this.importDialog = true this.$nextTick(() => { @@ -750,6 +762,11 @@ display: -webkit-box; const { data } = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", { id }) return data }, + async hdSearch() { + this.lxyHd = await getNowLxyHd(this.pageForm.year) + this.pageForm.hdid = this.lxyHd.length > 0 ? this.lxyHd[0].id : "" + this.doSearch() + }, async openViewXx(row) { this.viewData = await this.getLxyBmInfo(row.id) this.pageForm.hdid = row.hdid @@ -831,8 +848,8 @@ display: -webkit-box; }, async created() { this.unions = await getUnions() - this.lxyHd = await getNowLxyHd() - this.pageForm.hdid = this.lxyHd[0].id + this.lxyHd = await getNowLxyHd(this.pageForm.year) + this.pageForm.hdid = this.lxyHd.length > 0 ? this.lxyHd[0].id : "" this.pageData() this.unionList = await getUnions() this.nationList = nation diff --git a/src/main/resources/views/platform/zgfw/lxy/HdMange.html b/src/main/resources/views/platform/zgfw/lxy/HdMange.html index b61c3ad..43b5496 100644 --- a/src/main/resources/views/platform/zgfw/lxy/HdMange.html +++ b/src/main/resources/views/platform/zgfw/lxy/HdMange.html @@ -43,12 +43,26 @@ layout("/layouts/platform.html"){
- +
-
+ +
+