From ceec8eb09564c148879e55b1777b7e35ce6212fa Mon Sep 17 00:00:00 2001 From: zhangrui Date: Fri, 30 Oct 2026 19:02:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E4=BC=9A=E3=80=81=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ActivitySportsServiceImpl.java | 115 ++++++++++--- .../examine/ClubExamineApplyController.java | 18 +- .../examine/ClubExamineMineController.java | 2 +- .../budwk/app/zhgh/club/model/SysClub.java | 4 +- .../club/model/SysClubExamineRegister.java | 4 +- .../club/service/SysClubExamineService.java | 15 ++ .../impl/SysClubExamineServiceImpl.java | 44 +++++ .../platform/plugins/form-create/index.umd.js | 2 +- .../components/module/activity/UserScope.vue | 101 ++++++++---- .../components/plugins/sysSignature/pc.vue | 1 + .../views/layouts/v4/baseLayout.html | 2 +- .../resources/views/layouts/v4/home/act.js | 2 +- .../views/layouts/v4/home/index.html | 63 +++++++ .../sports/ActivityResults/index.html | 12 +- .../activity/sports/infoManage/addActivity.js | 63 ++++--- .../zhgh/club/common/clubInfoComponent.js | 11 +- .../zhgh/club/examine/apply/index.html | 156 ++++++++++-------- .../zhgh/club/examine/common/examineInfo.js | 2 +- .../platform/zhgh/club/join/list/index.html | 2 +- .../zhgh/club/join/mineclub/index.html | 2 +- .../club/register/apply/clubRegisterForm.js | 13 +- .../zhgh/club/register/officeAudit/index.html | 2 +- .../platform/zhghh5/club/mineclub/index.html | 2 +- 23 files changed, 466 insertions(+), 172 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsServiceImpl.java b/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsServiceImpl.java index dd8ec1a..358d5ca 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/activity/sports/service/impl/ActivitySportsServiceImpl.java @@ -4,12 +4,14 @@ package com.budwk.app.zhgh.activity.sports.service.impl; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import com.budwk.app.base.exception.BaseException; import com.budwk.app.base.service.impl.BaseServiceImpl; import com.budwk.app.base.utils.CommonDownloadUtil; import com.budwk.app.base.utils.DateUtil; import com.budwk.app.sys.models.Sys_home_activity; import com.budwk.app.sys.models.Sys_home_template; import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.activity.basic.models.ActivityEvent; import com.budwk.app.zhgh.activity.basic.models.ActivityBasicUnit; import com.budwk.app.zhgh.activity.basic.models.ActivityBasicUnion; import com.budwk.app.zhgh.activity.culture.models.ActivityTissue; @@ -28,6 +30,7 @@ import org.nutz.dao.entity.Record; import org.nutz.dao.sql.Sql; import org.nutz.ioc.aop.Aop; import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.json.Json; import org.nutz.lang.Lang; import org.nutz.lang.Strings; @@ -55,6 +58,7 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl i @Override @Aop(TransAop.READ_COMMITTED) public String doAdd(ActivitySchool activitySchool, ActivitySchoolEvent[] events) { + events = validateAndApplySingleEventLimits(events); ActivityBasicUnit activityBasicUnit = dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", SecurityUtil.getUserId())); if (activitySchool.getActivityLevel() == 40002) { @@ -101,6 +105,7 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl i @Override @Aop(TransAop.READ_COMMITTED) public void doEdit(ActivitySchool activitySchool, ActivitySchoolEvent[] events) { + events = validateAndApplySingleEventLimits(events); ActivitySchool school = dao().fetch(ActivitySchool.class, activitySchool.getId()); if (school.getActivityLevel() == 40002) { school.setBelongUnionId(SecurityUtil.getUnionId()); @@ -161,6 +166,56 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl i dao().insertOrUpdate(sysHomeActivity); } + /** + * 校验单项人数限制,并在具体单项未设置限制时应用“所有单项”的默认值。 + * + * @param events 页面提交的项目配置,允许包含 eventId 为 allItems 的默认配置 + * @return 已移除 allItems 临时配置、可直接持久化的项目配置数组 + */ + private ActivitySchoolEvent[] validateAndApplySingleEventLimits(ActivitySchoolEvent[] events) { + if (events == null || events.length == 0) { + return new ActivitySchoolEvent[0]; + } + + ActivitySchoolEvent allItems = Arrays.stream(events) + .filter(event -> event != null && "allItems".equals(event.getEventId())) + .findFirst() + .orElse(null); + List result = new ArrayList<>(); + for (ActivitySchoolEvent event : events) { + if (event == null || "allItems".equals(event.getEventId())) { + continue; + } + ActivityEvent activityEvent = dao().fetch(ActivityEvent.class, event.getEventId()); + if (activityEvent != null && "1".equals(activityEvent.getProjectType())) { + applySingleEventDefaultLimit(event, allItems); + } + result.add(event); + } + return result.toArray(new ActivitySchoolEvent[0]); + } + + /** + * 单项的两个限制必须同时设置;均未设置或均为0时继承“所有单项”的对应值。 + */ + private void applySingleEventDefaultLimit(ActivitySchoolEvent event, ActivitySchoolEvent allItems) { + Integer athletesMaxNum = event.getAthletesMaxNum(); + Integer restrictRegNumber = event.getRestrictRegNumber(); + if ((athletesMaxNum == null) != (restrictRegNumber == null)) { + throw new BaseException("每队(项)运动员最多人数和每人限报项目必须同时设置"); + } + + boolean useDefault = athletesMaxNum == null || (athletesMaxNum == 0 && restrictRegNumber == 0); + if (!useDefault) { + return; + } + if (allItems == null || allItems.getAthletesMaxNum() == null || allItems.getRestrictRegNumber() == null) { + throw new BaseException("请先设置所有单项的运动员最多人数和每人限报项目"); + } + event.setAthletesMaxNum(allItems.getAthletesMaxNum()); + event.setRestrictRegNumber(allItems.getRestrictRegNumber()); + } + @Aop(TransAop.READ_COMMITTED) private void addTeam(String schoolId, ActivitySchoolEvent[] events) { if (events.length > 0) { @@ -271,33 +326,19 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl i WHERE app.activityId = @id and app.status = 2 - $cnd + and (@filterUnion = 0 or app.activityUnionId = @unionId) ORDER BY ev.allName DESC, u.unionname DESC, app.`team` asc - """).setParam("id", id) - .setVar("cnd", ""); - if (Strings.isNotBlank(unionId)) { - sql.setVar("cnd", "and u.unionid = @unionId"); - sql.setParam("unionId", unionId); - } + """).setParam("id", id); + // 参数必须声明在原始SQL中;setVar追加的字符串不会再次解析其中的@参数。 + // 未选择分工会时导出整个活动,选择时按报名记录中的活动分工会过滤。 + sql.setParam("filterUnion", Strings.isNotBlank(unionId) ? 1 : 0); + sql.setParam("unionId", Strings.isNotBlank(unionId) ? unionId : ""); List list = list(sql); - String activityName; - if (Lang.isNotEmpty(list)) { - activityName = list.get(0).getString("activityName"); - } else { - activityName = "暂无人员"; - } - List excels = new ArrayList<>(); - - list.forEach(z -> { - ActivitySchoolApply schoolApply = z.toPojo(ActivitySchoolApply.class); - String s = schoolApply.getIdentity().stream().map(personType::getName).toList().toString(); - schoolApply.setSf(s); - excels.add(schoolApply); - }); + list.forEach(record -> excels.add(toActivitySchoolApplyExport(record))); ExportParams exportParams = new ExportParams(); exportParams.setType(ExcelType.XSSF); @@ -305,10 +346,42 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl i CommonDownloadUtil.download(getUnionApplyExportFileName(unionId), workbook, response); } catch (Exception e) { e.printStackTrace(); + throw new BaseException("导出报名信息失败:" + e.getMessage()); } } + /** + * 将原生SQL查询结果转换为报名信息导出对象。 + * identity 是数据库JSON文本,需要显式转换为身份编码集合,避免 Record.toPojo 自动转换失败导致整表无数据。 + * + * @param record 导出SQL返回的一行报名数据 + * @return EasyPoi 使用的 ActivitySchoolApply 导出对象 + */ + private ActivitySchoolApply toActivitySchoolApplyExport(Record record) { + ActivitySchoolApply schoolApply = new ActivitySchoolApply(); + schoolApply.setUnionname(record.getString("unionname")); + schoolApply.setTeam(record.getString("team")); + schoolApply.setAllName(record.getString("allName")); + schoolApply.setLoginname(record.getString("loginname")); + schoolApply.setUsername(record.getString("username")); + schoolApply.setMobile(record.getString("mobile")); + schoolApply.setIdCard(record.getString("idCard")); + schoolApply.setProfessionalLevel(record.getString("professionalLevel")); + schoolApply.setSex(record.getString("sex")); + + String identityJson = record.getString("identity"); + List identities = Strings.isBlank(identityJson) + ? new ArrayList<>() + : Json.fromJsonAsList(String.class, identityJson); + String identityName = identities.stream() + .map(personType::getName) + .filter(Strings::isNotBlank) + .collect(Collectors.joining("、")); + schoolApply.setSf(identityName); + return schoolApply; + } + private String getUnionApplyExportFileName(String unionId) { String unionName = "分工会"; if (Strings.isNotBlank(unionId)) { diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java index 6f037b9..46da49c 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java @@ -17,7 +17,6 @@ import com.budwk.app.flow.enums.ProcessInstanceStateEnum; import com.budwk.app.flow.enums.ProcessSubmitTypeEnum; import com.budwk.app.flow.service.FlowCommonService; import com.budwk.app.web.commons.auth.utils.SecurityUtil; -import com.budwk.app.zhgh.club.model.ClubUser; import com.budwk.app.zhgh.club.model.SysClub; import com.budwk.app.zhgh.club.model.SysClubExamineRegister; import com.budwk.app.zhgh.club.service.SysClubExamineService; @@ -119,10 +118,7 @@ public class ClubExamineApplyController { if(StrUtil.isBlank(clubId)) { return Result.error("社团信息为空,请核查"); } - int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)); - SysClub club = dao.fetch(SysClub.class, clubId); - int money = count * (club.getDue() != null ? Integer.parseInt(club.getDue()) : 0); - return Result.success(money); + return Result.success(sysClubExamineService.getClubMemberMoney(clubId)); } @At @@ -175,6 +171,10 @@ public class ClubExamineApplyController { public Result save(@Param("data") SysClubExamineRegister examineRegister, @Param("incomeDetailed") String incomeDetailed, @Param("incomeCensus") String incomeCensus) { + String validateMessage = sysClubExamineService.validateActivityRequired(examineRegister); + if (validateMessage != null) { + return Result.error(validateMessage); + } if (StrUtil.isBlank(examineRegister.getId())) { sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus); } else { @@ -190,6 +190,10 @@ public class ClubExamineApplyController { public Result submit(@Param("data") SysClubExamineRegister examineRegister, @Param("incomeDetailed") String incomeDetailed, @Param("incomeCensus") String incomeCensus) { + String validateMessage = sysClubExamineService.validateActivityRequired(examineRegister); + if (validateMessage != null) { + return Result.error(validateMessage); + } SysClubExamineRegister reg; if (StrUtil.isBlank(examineRegister.getId())) { reg = sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus); @@ -221,6 +225,10 @@ public class ClubExamineApplyController { @Param("incomeDetailed") String incomeDetailed, @Param("incomeCensus") String incomeCensus, @Param("taskId") Long taskId) { + String validateMessage = sysClubExamineService.validateActivityRequired(examineRegister); + if (validateMessage != null) { + return Result.error(validateMessage); + } if (StrUtil.isBlank(examineRegister.getId())) { sysClubExamineService.doAdd(examineRegister, incomeDetailed, incomeCensus); } else { diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java index 045c156..68016bc 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java @@ -86,7 +86,7 @@ public class ClubExamineMineController { //nutMap.setv("schoolName", Globals.MyConfig.getString("AppName")); nutMap.setv("clubName", register.getClubName()); nutMap.setv("create_time", register.getFoundTime()); - nutMap.setv("dues_standard", register.getDue()); + nutMap.setv("dues_standard", register.getDue() == null ? "--" : register.getDue() + "元/年"); // 生成材料中的年度与列表展示的登记年度保持一致。 nutMap.setv("year", register.getYear()); nutMap.setv("registerDate", register.getRegisterDate()); diff --git a/src/main/java/com/budwk/app/zhgh/club/model/SysClub.java b/src/main/java/com/budwk/app/zhgh/club/model/SysClub.java index 32a27cc..fec262e 100644 --- a/src/main/java/com/budwk/app/zhgh/club/model/SysClub.java +++ b/src/main/java/com/budwk/app/zhgh/club/model/SysClub.java @@ -91,8 +91,8 @@ public class SysClub extends BaseModel { @Column @Comment("会费标准") - @ColDefine(type = ColType.VARCHAR, width = 50) - private String due; + @ColDefine(type = ColType.DOUBLE, width = 10, precision = 2) + private Double due; @Column @Comment("附件") diff --git a/src/main/java/com/budwk/app/zhgh/club/model/SysClubExamineRegister.java b/src/main/java/com/budwk/app/zhgh/club/model/SysClubExamineRegister.java index a672c7b..3c34325 100644 --- a/src/main/java/com/budwk/app/zhgh/club/model/SysClubExamineRegister.java +++ b/src/main/java/com/budwk/app/zhgh/club/model/SysClubExamineRegister.java @@ -57,8 +57,8 @@ public class SysClubExamineRegister extends BaseModel { @Column @Comment("会费标准") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String due; + @ColDefine(type = ColType.DOUBLE, width = 10, precision = 2) + private Double due; @Column @Comment("年度活动情况") diff --git a/src/main/java/com/budwk/app/zhgh/club/service/SysClubExamineService.java b/src/main/java/com/budwk/app/zhgh/club/service/SysClubExamineService.java index 1a96c47..69309c7 100644 --- a/src/main/java/com/budwk/app/zhgh/club/service/SysClubExamineService.java +++ b/src/main/java/com/budwk/app/zhgh/club/service/SysClubExamineService.java @@ -24,6 +24,21 @@ public interface SysClubExamineService extends BaseService getJgUser(@Valid String clubId); + /** + * 计算指定社团的年度会费收入。 + * + * @param clubId 社团ID,用于查询当前会员数量和社团会费标准 + * @return 会员数量乘以会费标准后的金额;社团或会费标准为空时返回0 + */ + Double getClubMemberMoney(@Valid String clubId); + + /** + * 校验考核登记的两组活动明细。 + * @param examineRegister 页面data参数对应的登记实体,yearActivityList为本年度活动,plans为下一年度计划 + * @return String类型;通过返回null,否则返回缺失的明细行号及字段提示 + */ + String validateActivityRequired(SysClubExamineRegister examineRegister); + SysClubExamineRegister doAdd(SysClubExamineRegister examineRegister, String incomeDetailed, String incomeCensus); SysClubExamineRegister doEdit(SysClubExamineRegister examineRegister, String incomeDetailed, String incomeCensus); diff --git a/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java b/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java index 505a5b5..cb9202f 100644 --- a/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java @@ -13,6 +13,7 @@ import com.budwk.app.flow.enums.ProcessInstanceStateEnum; import com.budwk.app.flow.enums.ProcessTaskStateEnum; import com.budwk.app.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.club.model.ClubUser; import com.budwk.app.zhgh.club.model.SysClub; import com.budwk.app.zhgh.club.model.SysClubExamineRegister; import com.budwk.app.zhgh.club.model.SysClubExamineRegisterDetailed; @@ -50,6 +51,15 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl rows, String label, String[] fields, String[] names) { + if (rows == null || rows.isEmpty()) { + return label + "至少填写一条"; + } + for (int i = 0; i < rows.size(); i++) { + JSONObject row = rows.get(i); + for (int j = 0; j < fields.length; j++) { + if (row == null || StrUtil.isBlank(row.getStr(fields[j]))) { + return label + "第" + (i + 1) + "条:" + names[j] + "不能为空"; + } + } + } + return null; + } + @Override public SysClubExamineRegister doAdd(SysClubExamineRegister examineRegister, String incomeDetailed, String incomeCensus) { // JSON转换为实体列表(空值判断避免转换异常) diff --git a/src/main/resources/static/assets/platform/plugins/form-create/index.umd.js b/src/main/resources/static/assets/platform/plugins/form-create/index.umd.js index 741867a..0531bfb 100644 --- a/src/main/resources/static/assets/platform/plugins/form-create/index.umd.js +++ b/src/main/resources/static/assets/platform/plugins/form-create/index.umd.js @@ -45,7 +45,7 @@ export default { } } } -<\/script>`}function Fp(s,n){const r=s.split("."),i=n.split("."),t=Math.min(r.length,i.length);for(var a=0;a0)return 1;if(f<0)return-1}return r.length===i.length?0:r.lengths.indexOf(n)===r)}function yu({t:s}){return[{type:"input",field:">formName",value:"",title:s("form.formName")},{type:"radio",field:"labelPosition",value:"left",title:s("form.labelPosition"),options:kt(s,[{value:"left",label:"left"},{value:"right",label:"right"},{value:"top",label:"top"}])},{type:"radio",field:"size",value:"small",title:s("form.size"),options:kt(s,[{value:"large",label:"large"},{value:"default",label:"default"},{value:"small",label:"small"}])},{type:"input",field:"labelSuffix",value:"",title:s("form.labelSuffix"),style:{width:"150px"}},{type:"SizeInput",field:"labelWidth",value:"125px",title:s("form.labelWidth")},{type:"switch",field:"hideRequiredAsterisk",value:!1,title:s("form.hideRequiredAsterisk")},{type:"switch",field:"showMessage",value:!0,title:s("form.showMessage")},{type:"switch",field:"inlineMessage",value:!1,title:s("form.inlineMessage")},{type:"switch",field:"_submitBtn>show",value:!0,title:s("form.submitBtn")},{type:"switch",field:"_resetBtn>show",value:!1,title:s("form.resetBtn")},{type:"FnConfig",field:">_event",info:{native:!0,effect:"light",align:"left",children:[{type:"div",domProps:{innerHTML:s("form.controlDocument",{doc:''+s("form.document")+""})}}]},value:{},col:{show:!0},props:{eventConfig:[{name:"onSubmit",info:s("form.onSubmit"),args:["formData","api"]},{name:"onReset",info:s("form.onReset"),args:["api"]},{name:"onCreated",info:s("form.onCreated"),args:["api"]},{name:"onMounted",info:s("form.onMounted"),args:["api"]},{name:"onReload",info:s("form.onReload"),args:["api"]},{name:"onChange",info:s("form.onChange"),args:["field","value","options"]},{name:"beforeFetch",info:s("form.beforeFetch"),args:["config","data"]}]},title:s("form.event")}]}function Ar({t:s}){return[{type:"FieldInput",field:"field",value:"",title:s("form.field")},{type:"LanguageInput",field:"title",value:"",title:s("form.title")},{type:"LanguageInput",field:"info",value:"",title:s("form.info")},{type:"SizeInput",field:"formCreateWrap>labelWidth",value:"",title:s("form.labelWidth")},{type:"Struct",field:"_control",name:"control",value:[],title:s("form.control"),info:{native:!0,effect:"light",align:"left",children:[{type:"div",domProps:{innerHTML:s("form.controlDocument",{doc:''+s("form.document")+""})}}]},props:{defaultValue:[],validate(n){return Array.isArray(n)?n.length?!n.some(({rule:r})=>!Array.isArray(r)):!0:!1}}}]}function Bp({t:s}){return[{type:"input",title:"ID",field:"id",wrap:{labelWidth:"45px"}},{type:"input",title:"Class",field:"class",wrap:{labelWidth:"45px"}},{type:"StyleConfig",field:"style",title:"",value:{}}]}function bu({t:s}){return[{type:"Required",field:"$required",title:s("validate.required")},{type:"validate",field:"validate",title:s("validate.rule"),value:[]}]}let Pp=0;function Ve(){const s=370+ ++Pp;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+s.toString(36)+"c"}const Hp="单选框",$a="radio",jp={menu:"main",icon:"icon-radio",label:Hp,name:$a,event:["change"],validate:["string","number"],rule({t:s}){return{type:$a,field:Ve(),title:s("com.radio.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:In(s("props.option"),{label:"label",value:"value"},1)}},props(s,{t:n}){return Be(n,$a+".props",[Wi(n,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{type:"ColorPicker",field:"textColor"},{type:"ColorPicker",field:"fill"}])}},$p="多选框",za="checkbox",zp={menu:"main",icon:"icon-checkbox",label:$p,name:za,event:["change"],validate:["array"],rule({t:s}){return{type:za,field:Ve(),title:s("com.checkbox.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:In(s("props.option"),{label:"label",value:"value"},1)}},props(s,{t:n}){return Be(n,za+".props",[Wi(n,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{field:"min",type:"inputNumber",props:{min:0}},{field:"max",type:"inputNumber",props:{min:0}},{type:"ColorPicker",field:"textColor"},{type:"ColorPicker",field:"fill"}])}},Wp="输入框",Wa="input",Up={menu:"main",icon:"icon-input",label:Wp,name:Wa,event:["blur","focus","change","input","clear"],validate:["string","url","email"],rule({t:s}){return{type:Wa,field:Ve(),title:s("com.input.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Wa+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"select",field:"type",options:kt(n,[{label:"text",value:"text"},{label:"number",value:"number"},{label:"time",value:"time"},{label:"date",value:"date"},{label:"month",value:"month"},{label:"datetime-local",value:"datetime-local"}])},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])}},Vp="多行输入框",wu="textarea",Gp={menu:"main",icon:"icon-textarea",label:Vp,name:wu,event:["blur","focus","change","input"],validate:["string"],rule({t:s}){return{type:"input",field:Ve(),title:s("com.textarea.name"),info:"",$required:!1,props:{type:"textarea"}}},props(s,{t:n}){return Be(n,wu+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"switch",field:"showWordLimit"},{type:"input",field:"placeholder"},{type:"inputNumber",field:"rows",props:{min:0}},{type:"switch",field:"autosize"}])}},Kp="密码输入框",xu="password",Qp={menu:"main",icon:"icon-password",label:Kp,name:xu,event:["blur","focus","change","input","clear"],validate:["string"],rule({t:s}){return{type:"input",field:Ve(),title:s("com.password.name"),info:"",$required:!1,props:{type:"password"}}},props(s,{t:n}){return Be(n,xu+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])}},Yp="计数器",Ua="inputNumber",Xp={menu:"main",icon:"icon-number",label:Yp,name:Ua,event:["blur","focus","change"],validate:["number","integer","float"],rule({t:s}){return{type:Ua,field:Ve(),title:s("com.inputNumber.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ua+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"},{type:"inputNumber",title:"precision",field:"precision"},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"stepStrictly"},{type:"switch",field:"controls",value:!0},{type:"select",field:"controlsPosition",options:kt(n,[{label:n("props.default"),value:""},{label:"right",value:"right"}])},{type:"input",field:"placeholder"}])}},qp="选择器",Va="select",Jp={menu:"main",icon:"icon-select",label:qp,name:Va,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule({t:s}){return{type:Va,field:Ve(),title:s("com.select.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:In(s("props.option"),{label:"label",value:"value"},1)}},watch:{multiple({rule:s}){s.key=Ve()}},props(s,{t:n}){return Be(n,Va+".props",[Wi(n,"options"),{type:"switch",field:"multiple"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"switch",field:"collapseTags"},{type:"inputNumber",field:"multipleLimit",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"filterable"},{type:"switch",field:"remote"},{type:"FnInput",field:"remoteMethod",props:{body:!0,button:!0,fnx:!0,name:"remoteMethod",args:[Si(n)]}},{type:"switch",field:"allowCreate"},{type:"input",field:"noMatchText"},{type:"input",field:"noDataText"},{type:"switch",field:"reserveKeyword"},{type:"switch",field:"defaultFirstOption"}])}},Zp="开关",Ga="switch",eh={menu:"main",icon:"icon-switch",label:Zp,name:Ga,event:["change"],rule({t:s}){return{type:Ga,field:Ve(),title:s("com.switch.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ga+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"width",props:{min:0}},{type:"input",field:"activeText"},{type:"input",field:"inactiveText"},{type:"input",field:"activeValue"},{type:"input",field:"inactiveValue"},{type:"ColorPicker",field:"activeColor"},{type:"ColorPicker",field:"inactiveColor"}])}},th="滑块",Ka="slider",nh={menu:"main",icon:"icon-slider",label:th,name:Ka,event:["change","input"],validate:["number","array"],rule({t:s}){return{type:Ka,field:Ve(),title:s("com.slider.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ka+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"range"},{type:"inputNumber",field:"min",props:{min:0}},{type:"inputNumber",field:"max",props:{min:0}},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"showInput"},{type:"switch",field:"showInputControls",value:!0},{type:"switch",field:"showStops"},{type:"switch",field:"vertical"},{type:"input",field:"height"}])}},ih="时间",Qa="timePicker",rh={menu:"main",icon:"icon-time",label:ih,name:Qa,event:["change","blur","focus"],rule({t:s}){return{type:Qa,field:Ve(),title:s("com.timePicker.name"),info:"",$required:!1,props:{}}},watch:{isRange({rule:s}){s.key=Ve()}},props(s,{t:n}){return Be(n,Qa+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"isRange"},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])}},oh={menu:"main",icon:"icon-time-range",label:"时间区间",name:"timeRange",event:["change","blur","focus"],rule({t:s}){return{type:"timePicker",field:Ve(),title:s("com.timeRange.name"),info:"",$required:!1,props:{isRange:!0}}},props(s,{t:n}){return Be(n,"timePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])}},ah="日期",Ya="datePicker",sh={menu:"main",icon:"icon-date",label:ah,name:Ya,event:["change","blur","focus"],rule({t:s}){return{type:Ya,field:Ve(),title:s("com.datePicker.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ya+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:kt(n,[{label:"year",value:"year"},{label:"month",value:"month"},{label:"date",value:"date"},{label:"dates",value:"dates"},{label:"week",value:"week"},{label:"datetime",value:"datetime"},{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])}},lh={menu:"main",icon:"icon-date-range",label:"日期区间",name:"dateRange",event:["change","blur","focus"],rule({t:s}){return{type:"datePicker",field:Ve(),title:s("com.dateRange.name"),info:"",$required:!1,props:{type:"datetimerange"}}},props(s,{t:n}){return Be(n,"datePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:kt(n,[{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])}},uh="评分",Xa="rate",ch={menu:"main",icon:"icon-rate",label:uh,name:Xa,event:["change"],validate:["number"],rule({t:s}){return{type:Xa,field:Ve(),title:s("com.rate.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Xa+".props",[{type:"inputNumber",field:"max",props:{min:0}},{type:"switch",field:"disabled"},{type:"switch",field:"allowHalf"},{type:"ColorPicker",field:"voidColor"},{type:"ColorPicker",field:"disabledVoidColor"},{type:"input",field:"voidIconClass"},{type:"input",field:"disabledVoidIconClass"},{type:"switch",field:"showScore"},{type:"ColorPicker",field:"textColor"},{type:"input",field:"scoreTemplate"}])}},fh="颜色选择器",qa="colorPicker",dh={menu:"main",icon:"icon-color",label:fh,name:qa,event:["change","activeChange"],validate:["string"],rule({t:s}){return{type:qa,field:Ve(),title:s("com.colorPicker.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,qa+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"showAlpha"},{type:"select",field:"colorFormat",options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},{type:"tableOptions",field:"predefine",props:{column:[{label:n("props.value"),key:"value"}],valueType:"string"}}])}},ph="栅格布局",Ja="fcRow",hh={menu:"layout",icon:"icon-row",label:ph,name:Ja,mask:!1,children:"col",childrenLen:2,rule(){return{type:Ja,props:{},children:[]}},props(s,{t:n}){return Be(n,Ja+".props",[{type:"inputNumber",field:"gutter",props:{min:0}},{type:"switch",field:"type",props:{activeValue:"flex",inactiveValue:"default"}},{type:"select",field:"justify",options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}]},{type:"select",field:"align",options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}]}])}},Za="col",Au={xs:"<768px",sm:"≥768px",md:"≥992px",lg:"≥1200px",xl:"≥1920px"},vh={name:Za,label:"格子",drag:!0,dragBtn:!1,inside:!0,mask:!1,rule(){return{type:Za,props:{span:12},children:[]}},props(s,{t:n}){return Be(n,Za+".props",[{type:"slider",field:"span",value:12,props:{min:0,max:24}},{type:"slider",field:"offset",props:{min:0,max:24}},{type:"slider",field:"push",props:{min:0,max:24}},{type:"slider",field:"pull",props:{min:0,max:24}},{type:"ConfigItem",props:{label:n("props.reactive")},children:[{type:"elTabs",style:{width:"100%"},slot:"append",children:Object.keys(Au).map(r=>({type:"elTabPane",props:{label:Au[r]},style:"padding:0 10px;",children:[{type:"slider",field:r+">span",title:n("com.col.props.span"),value:12,props:{min:0,max:24}},{type:"slider",field:r+">offset",title:n("com.col.props.offset"),props:{min:0,max:24}},{type:"slider",field:r+">push",title:n("com.col.props.push"),props:{min:0,max:24}},{type:"slider",field:r+">pull",title:n("com.col.props.pull"),props:{min:0,max:24}}]}))}]}])}},gh="分割线",es="elDivider",mh={menu:"aide",icon:"icon-divider",label:gh,name:es,rule({t:s}){return{type:es,props:{},style:{display:"flex"},children:[s("com.elDivider.name")]}},props(s,{t:n}){return Be(n,es+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"contentPosition",options:kt(n,[{label:"left",value:"left"},{label:"right",value:"right"},{label:"center",value:"center"}])}])}},_h="级联选择器",Co="cascader",yh={menu:"main",icon:"icon-cascader",label:_h,name:Co,event:["change","expandChange","blur","focus","visibleChange","removeTag"],validate:["string","number","array"],rule({t:s}){return{type:Co,field:Ve(),title:s("com.cascader.name"),info:"",effect:{fetch:""},$required:!1,props:{options:In(s("props.option"),{label:"label",value:"value"},3)}}},props(s,{t:n}){return Be(n,Co+".props",[Ui(n,"props.options"),{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"input",field:"placeholder"},{type:"Object",field:"props",props:{rule:Be(n,Co+".propsOpt",[{type:"switch",field:"multiple"},{type:"select",field:"expandTrigger",options:kt(n,[{label:"click",value:"click"},{label:"hover",value:"hover"}])},{type:"switch",field:"checkStrictly"},{type:"switch",field:"emitPath",value:!0},{type:"input",field:"value",value:"value"},{type:"input",field:"label",value:"label"},{type:"input",field:"children",value:"children"},{type:"input",field:"disabled",value:"disabled"},{type:"input",field:"leaf"}])}},{type:"switch",field:"showAllLevels",value:!0},{type:"switch",field:"collapseTags"},{type:"input",field:"separator"},{type:"switch",field:"filterable"}])}},bh="上传",ts="upload",wh={menu:"main",icon:"icon-upload",label:bh,name:ts,event:[],validate:["array"],rule({t:s}){return{type:ts,field:Ve(),title:s("com.upload.name"),info:"",$required:!1,props:{action:"/",uploadType:"image",onSuccess:new Function("res","file","file.url = res.data.url;")}}},props(s,{t:n}){return Be(n,ts+".props",[{type:"switch",field:"disabled"},{type:"select",field:"uploadType",options:[{label:n("props.image"),value:"image"},{label:n("props.file"),value:"file"}]},{type:"switch",field:"multiple"},{type:"input",field:"action"},{type:"FnInput",field:"beforeUpload",props:{args:["file"],name:"beforeUpload"}},{type:"FnInput",field:"onRemove",props:{body:!0,button:!0,fnx:!0,args:[Si(n)],name:"onRemove"}},{type:"FnInput",field:"onSuccess",info:n("com.upload.info"),props:{args:["res","file"],name:"onSuccess",button:!0}},{type:"FnInput",field:"onPreview",props:{body:!0,button:!0,fnx:!0,args:[Si(n)],name:"onPreview"}},{type:"TableOptions",field:"headers",props:{column:[{label:n("props.key"),key:"label"},{label:n("props.value"),key:"value"}],valueType:"object"}},{type:"TableOptions",field:"data",props:{column:[{label:n("props.key"),key:"label"},{label:n("props.value"),key:"value"}],valueType:"object"}},{type:"input",field:"name"},{type:"switch",field:"withCredentials"},{type:"input",field:"accept"},{type:"switch",field:"autoUpload",value:!0},{type:"inputNumber",field:"limit",props:{min:0}}])}},xh="穿梭框",ns="elTransfer",Ah={menu:"main",icon:"icon-transfer",label:xh,name:ns,event:["change","leftCheckChange","rightCheckChange"],validate:["string","number","array"],rule({t:s}){return{type:ns,field:Ve(),title:s("com.elTransfer.name"),info:"",$required:!1,props:{data:In(s("props.option"),{label:"label",value:"key"},1)}}},props(s,{t:n}){return Be(n,ns+".props",[Ui(n,"props.data","label","key"),{type:"switch",field:"filterable"},{type:"input",field:"filterPlaceholder"},{type:"select",field:"targetOrder",info:n("com.elTransfer.targetOrderInfo"),options:[{label:"original",value:"original"},{label:"push",value:"push"},{label:"unshift",value:"unshift"}]},{type:"TableOptions",field:"titles",props:{column:[{label:n("props.value"),key:"value"}],valueType:"string",max:2}},{type:"TableOptions",field:"buttonTexts",props:{column:[{label:n("props.value"),key:"value"}],valueType:"string",max:2}}])}},Ch="树形控件",is="tree",Sh={menu:"main",icon:"icon-tree",label:Ch,name:is,event:["nodeClick","nodeContextmenu","checkChange","check","currentChange","nodeExpand","nodeCollapse","nodeDragStart","nodeDragEnter","nodeDragLeave","nodeDragOver","nodeDragEnd","nodeDrop"],validate:["string","number","array"],rule({t:s}){return{type:is,field:Ve(),title:s("com.tree.name"),info:"",effect:{fetch:""},$required:!1,props:{props:{label:"label"},showCheckbox:!0,nodeKey:"id",data:In(s("props.option"),{label:"label",value:"id"},3)}}},props(s,{t:n}){return Be(n,is+".props",[Ui(n,"props.data","label","id"),{type:"input",field:"emptyText"},{type:"TableOptions",field:"props",props:{column:[{label:n("props.key"),key:"label"},{label:n("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"renderAfterExpand",value:!0},{type:"switch",field:"defaultExpandAll"},{type:"switch",field:"expandOnClickNode",value:!0},{type:"switch",field:"checkOnClickNode"},{type:"switch",field:"autoExpandParent",value:!0},{type:"switch",field:"checkStrictly"},{type:"switch",field:"accordion"},{type:"inputNumber",field:"indent"},{type:"input",field:"nodeKey"}])}},Eh="提示",rs="elAlert",kh={menu:"aide",icon:"icon-alert",label:Eh,name:rs,event:["close"],rule({t:s}){return{type:rs,props:{title:s("com.elAlert.name"),description:s("com.elAlert.description"),type:"success",effect:"dark"},children:[]}},props(s,{t:n}){return Be(n,rs+".props",[{type:"input",field:"title"},{type:"select",field:"type",options:[{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"info",value:"info"},{label:"error",value:"error"}]},{type:"input",field:"description"},{type:"switch",field:"closable",value:!0},{type:"switch",field:"center",value:!0},{type:"input",field:"closeText"},{type:"switch",field:"showIcon"},{type:"select",field:"effect",options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]}])}},Th="文字",Cu="text",Oh={menu:"aide",icon:"icon-span",label:Th,name:Cu,rule({t:s}){return{type:"div",title:"",native:!0,style:{whiteSpace:"pre-line",width:"100%"},children:[s("com.text.name")]}},watch:{formCreateNative({value:s,rule:n}){s&&(n.title="")}},props(s,{t:n}){return Be(n,Cu+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild",props:{type:"textarea"}}])}},Rh="间距",Su="space",Dh={menu:"layout",icon:"icon-space",label:Rh,name:Su,rule(){return{type:"div",wrap:{show:!1},native:!0,style:{width:"100%",height:"20px"},children:[]}},props(s,{t:n}){return[{type:"object",field:"formCreateStyle",native:!0,props:{rule:Be(n,Su+".props",[{type:"input",field:"height",title:"height"}])}}]}},Nh="标签页",os="elTabs",Mh={menu:"layout",icon:"icon-tab",label:Nh,name:os,mask:!1,event:["tabClick","tabChange","tabRemove","tabAdd","edit"],children:"elTabPane",rule(){return{type:os,style:{width:"100%"},children:[]}},props(s,{t:n}){return Be(n,os+".props",[{type:"select",field:"type",options:[{label:"card",value:"card"},{label:"border-card",value:"border-card"}]},{type:"switch",field:"closable"},{type:"select",field:"tabPosition",options:kt(n,[{label:"top",value:"top"},{label:"right",value:"right"},{label:"left",value:"left"}])},{type:"switch",field:"stretch"}])}},Lh="选项卡",as="elTabPane",Ih={label:Lh,name:as,inside:!0,drag:!0,dragBtn:!1,mask:!1,rule({t:s}){return{type:as,props:{label:s("com.elTabPane.name")},children:[]}},props(s,{t:n}){return Be(n,as+".props",[{type:"input",field:"label"},{type:"switch",field:"disabled"},{type:"input",field:"name"},{type:"switch",field:"lazy"}])}},Fh="按钮",ss="elButton",Bh={menu:"aide",icon:"icon-button",label:Fh,name:ss,mask:!0,event:["click"],rule({t:s}){return{type:ss,props:{},children:[s("com.elButton.name")]}},props(s,{t:n}){return Be(n,ss+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"size",options:kt(n,[{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"switch",field:"plain"},{type:"switch",field:"round"},{type:"switch",field:"circle"},{type:"switch",field:"loading"},{type:"switch",field:"disabled"}])}},Ph="富文本框",ls="fcEditor",Hh={menu:"main",icon:"icon-editor",label:Ph,name:ls,event:["change"],validate:["string"],rule({t:s}){return{type:ls,field:Ve(),title:s("com.fcEditor.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,ls+".props",[{type:"switch",field:"disabled"}])}},jh="子表单",Eu="group",$h={menu:"subform",icon:"icon-subform",label:jh,name:Eu,inside:!1,drag:!0,dragBtn:!0,mask:!1,event:["change"],subForm:"array",loadRule(s){s.children=s.props.rule||[],s.type="FcRow",delete s.props.rule},parseRule(s){s.props.rule=s.children,s.type="group",delete s.children,delete s.props.mode},rule({t:s}){return{type:"fcRow",field:Ve(),title:s("com.group.name"),info:"",$required:!1,props:{},children:[]}},props(s,{t:n}){return Be(n,Eu+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0},{type:"switch",field:"button",value:!0},{type:"switch",field:"sortBtn",value:!0},{type:"inputNumber",field:"expand"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"}])}},zh="分组",ku="subForm",Wh={menu:"subform",icon:"icon-group",label:zh,name:ku,inside:!1,drag:!0,dragBtn:!0,mask:!1,subForm:"object",event:["change"],loadRule(s){s.children=s.props.rule||[],s.type="FcRow",delete s.props.rule},parseRule(s){s.props.rule=s.children,s.type="subForm",delete s.children},rule({t:s}){return{type:"fcRow",field:Ve(),title:s("com.subForm.name"),info:"",$required:!1,props:{},children:[]}},props(s,{t:n}){return Be(n,ku+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0}])}},Uh="卡片",us="elCard",Vh={menu:"layout",icon:"icon-card",label:Uh,name:us,drag:!0,inside:!1,mask:!1,rule({t:s}){return{type:us,props:{header:s("com.elCard.props.header")},style:{width:"100%"},children:[]}},props(s,{t:n}){return Be(n,us+".props",[{type:"input",field:"header"},{type:"select",field:"shadow",value:"always",options:kt(n,[{label:"always",value:"always"},{label:"never",value:"never"},{label:"hover",value:"hover"}])}])}},Gh="折叠面板",cs="elCollapse",Kh={menu:"layout",icon:"icon-collapse",label:Gh,name:cs,mask:!1,children:"elCollapseItem",event:["change"],rule(){return{type:cs,props:{},style:{width:"100%"},children:[]}},props(s,{t:n}){return Be(n,cs+".props",[{type:"switch",field:"accordion"}])}},Qh="面板",fs="elCollapseItem",Yh={icon:"icon-cell",label:Qh,name:fs,drag:!0,dragBtn:!1,inside:!0,mask:!1,rule({t:s}){return{type:fs,props:{title:s("com.elCollapseItem.name")},style:{},children:[]}},props(s,{t:n}){return Be(n,fs+".props",[{type:"input",field:"title"},{type:"input",field:"name"},{type:"switch",field:"disabled"}])}},Xh="标签",ds="elTag",qh={menu:"aide",icon:"icon-tag",label:Xh,name:ds,mask:!0,event:["click","close"],rule({t:s}){return{type:ds,title:"",native:!0,children:[s("com.elTag.name")]}},watch:{formCreateNative({value:s,rule:n}){s&&(n.title="")}},props(s,{t:n}){return Be(n,ds+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild"},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"select",field:"size",options:kt(n,[{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"effect",options:[{label:"dark",value:"dark"},{label:"light",value:"light"},{label:"plain",value:"plain"}]},{type:"switch",field:"closable"},{type:"switch",field:"disableTransitions"},{type:"switch",field:"hit"},{type:"ColorPicker",field:"color"}])}},Jh="HTML",ps="html",Zh={menu:"aide",icon:"icon-html",label:Jh,name:ps,rule(){return{type:ps,title:"",native:!0,attrs:{innerHTML:""},style:{display:"block",width:"100%"},children:[`
+<\/script>`}function Fp(s,n){const r=s.split("."),i=n.split("."),t=Math.min(r.length,i.length);for(var a=0;a0)return 1;if(f<0)return-1}return r.length===i.length?0:r.lengths.indexOf(n)===r)}function yu({t:s}){return[{type:"input",field:">formName",value:"",title:s("form.formName")},{type:"radio",field:"labelPosition",value:"left",title:s("form.labelPosition"),options:kt(s,[{value:"left",label:"left"},{value:"right",label:"right"},{value:"top",label:"top"}])},{type:"radio",field:"size",value:"small",title:s("form.size"),options:kt(s,[{value:"large",label:"large"},{value:"default",label:"default"},{value:"small",label:"small"}])},{type:"input",field:"labelSuffix",value:"",title:s("form.labelSuffix"),style:{width:"150px"}},{type:"SizeInput",field:"labelWidth",value:"125px",title:s("form.labelWidth")},{type:"switch",field:"hideRequiredAsterisk",value:!1,title:s("form.hideRequiredAsterisk")},{type:"switch",field:"showMessage",value:!0,title:s("form.showMessage")},{type:"switch",field:"inlineMessage",value:!1,title:s("form.inlineMessage")},{type:"switch",field:"_submitBtn>show",value:!0,title:s("form.submitBtn")},{type:"switch",field:"_resetBtn>show",value:!1,title:s("form.resetBtn")},{type:"FnConfig",field:">_event",info:{native:!0,effect:"light",align:"left",children:[{type:"div",domProps:{innerHTML:s("form.controlDocument",{doc:''+s("form.document")+""})}}]},value:{},col:{show:!0},props:{eventConfig:[{name:"onSubmit",info:s("form.onSubmit"),args:["formData","api"]},{name:"onReset",info:s("form.onReset"),args:["api"]},{name:"onCreated",info:s("form.onCreated"),args:["api"]},{name:"onMounted",info:s("form.onMounted"),args:["api"]},{name:"onReload",info:s("form.onReload"),args:["api"]},{name:"onChange",info:s("form.onChange"),args:["field","value","options"]},{name:"beforeFetch",info:s("form.beforeFetch"),args:["config","data"]}]},title:s("form.event")}]}function Ar({t:s}){return[{type:"FieldInput",field:"field",value:"",title:s("form.field")},{type:"LanguageInput",field:"title",value:"",title:s("form.title")},{type:"LanguageInput",field:"info",value:"",title:s("form.info")},{type:"SizeInput",field:"formCreateWrap>labelWidth",value:"",title:s("form.labelWidth")},{type:"Struct",field:"_control",name:"control",value:[],title:s("form.control"),info:{native:!0,effect:"light",align:"left",children:[{type:"div",domProps:{innerHTML:s("form.controlDocument",{doc:''+s("form.document")+""})}}]},props:{defaultValue:[],validate(n){return Array.isArray(n)?n.length?!n.some(({rule:r})=>!Array.isArray(r)):!0:!1}}}]}function Bp({t:s}){return[{type:"input",title:"ID",field:"id",wrap:{labelWidth:"45px"}},{type:"input",title:"Class",field:"class",wrap:{labelWidth:"45px"}},{type:"StyleConfig",field:"style",title:"",value:{}}]}function bu({t:s}){return[{type:"Required",field:"$required",title:s("validate.required")},{type:"validate",field:"validate",title:s("validate.rule"),value:[]}]}let Pp=0;function Ve(){const s=370+ ++Pp;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+s.toString(36)+"c"}const Hp="单选框",$a="radio",jp={menu:"main",icon:"icon-radio",label:Hp,name:$a,event:["change"],validate:["string","number"],rule({t:s}){return{type:$a,field:Ve(),title:s("com.radio.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:In(s("props.option"),{label:"label",value:"value"},1)}},props(s,{t:n}){return Be(n,$a+".props",[Wi(n,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{type:"ColorPicker",field:"textColor"},{type:"ColorPicker",field:"fill"}])}},$p="多选框",za="checkbox",zp={menu:"main",icon:"icon-checkbox",label:$p,name:za,event:["change"],validate:["array"],rule({t:s}){return{type:za,field:Ve(),title:s("com.checkbox.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:In(s("props.option"),{label:"label",value:"value"},1)}},props(s,{t:n}){return Be(n,za+".props",[Wi(n,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{field:"min",type:"inputNumber",props:{min:0}},{field:"max",type:"inputNumber",props:{min:0}},{type:"ColorPicker",field:"textColor"},{type:"ColorPicker",field:"fill"}])}},Wp="输入框",Wa="input",Up={menu:"main",icon:"icon-input",label:Wp,name:Wa,event:["blur","focus","change","input","clear"],validate:["string","url","email"],rule({t:s}){return{type:Wa,field:Ve(),title:s("com.input.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Wa+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"select",field:"type",options:kt(n,[{label:"text",value:"text"},{label:"number",value:"number"},{label:"time",value:"time"},{label:"date",value:"date"},{label:"month",value:"month"},{label:"datetime-local",value:"datetime-local"}])},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])}},Vp="多行输入框",wu="textarea",Gp={menu:"main",icon:"icon-textarea",label:Vp,name:wu,event:["blur","focus","change","input"],validate:["string"],rule({t:s}){return{type:"input",field:Ve(),title:s("com.textarea.name"),info:"",$required:!1,props:{type:"textarea"}}},props(s,{t:n}){return Be(n,wu+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"switch",field:"showWordLimit"},{type:"input",field:"placeholder"},{type:"inputNumber",field:"rows",props:{min:0}},{type:"switch",field:"autosize"}])}},Kp="密码输入框",xu="password",Qp={menu:"main",icon:"icon-password",label:Kp,name:xu,event:["blur","focus","change","input","clear"],validate:["string"],rule({t:s}){return{type:"input",field:Ve(),title:s("com.password.name"),info:"",$required:!1,props:{type:"password"}}},props(s,{t:n}){return Be(n,xu+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])}},Yp="计数器",Ua="inputNumber",Xp={menu:"main",icon:"icon-number",label:Yp,name:Ua,event:["blur","focus","change"],validate:["number","integer","float"],rule({t:s}){return{type:Ua,field:Ve(),title:s("com.inputNumber.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ua+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"},{type:"inputNumber",title:"precision",field:"precision"},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"stepStrictly"},{type:"switch",field:"controls",value:!0},{type:"select",field:"controlsPosition",options:kt(n,[{label:n("props.default"),value:""},{label:"right",value:"right"}])},{type:"input",field:"placeholder"}])}},qp="选择器",Va="select",Jp={menu:"main",icon:"icon-select",label:qp,name:Va,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule({t:s}){return{type:Va,field:Ve(),title:s("com.select.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:In(s("props.option"),{label:"label",value:"value"},1)}},watch:{multiple({rule:s}){s.key=Ve()}},props(s,{t:n}){return Be(n,Va+".props",[Wi(n,"options"),{type:"switch",field:"multiple"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"switch",field:"collapseTags"},{type:"inputNumber",field:"multipleLimit",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"filterable"},{type:"switch",field:"remote"},{type:"FnInput",field:"remoteMethod",props:{body:!0,button:!0,fnx:!0,name:"remoteMethod",args:[Si(n)]}},{type:"switch",field:"allowCreate"},{type:"input",field:"noMatchText"},{type:"input",field:"noDataText"},{type:"switch",field:"reserveKeyword"},{type:"switch",field:"defaultFirstOption"}])}},Zp="开关",Ga="switch",eh={menu:"main",icon:"icon-switch",label:Zp,name:Ga,event:["change"],rule({t:s}){return{type:Ga,field:Ve(),title:s("com.switch.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ga+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"width",props:{min:0}},{type:"input",field:"activeText"},{type:"input",field:"inactiveText"},{type:"input",field:"activeValue"},{type:"input",field:"inactiveValue"},{type:"ColorPicker",field:"activeColor"},{type:"ColorPicker",field:"inactiveColor"}])}},th="滑块",Ka="slider",nh={menu:"main",icon:"icon-slider",label:th,name:Ka,event:["change","input"],validate:["number","array"],rule({t:s}){return{type:Ka,field:Ve(),title:s("com.slider.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ka+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"range"},{type:"inputNumber",field:"min",props:{min:0}},{type:"inputNumber",field:"max",props:{min:0}},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"showInput"},{type:"switch",field:"showInputControls",value:!0},{type:"switch",field:"showStops"},{type:"switch",field:"vertical"},{type:"input",field:"height"}])}},ih="时间",Qa="timePicker",rh={menu:"main",icon:"icon-time",label:ih,name:Qa,event:["change","blur","focus"],rule({t:s}){return{type:Qa,field:Ve(),title:s("com.timePicker.name"),info:"",$required:!1,props:{}}},watch:{isRange({rule:s}){s.key=Ve()}},props(s,{t:n}){return Be(n,Qa+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"isRange"},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])}},oh={menu:"main",icon:"icon-time-range",label:"时间区间",name:"timeRange",event:["change","blur","focus"],rule({t:s}){return{type:"timePicker",field:Ve(),title:s("com.timeRange.name"),info:"",$required:!1,props:{isRange:!0}}},props(s,{t:n}){return Be(n,"timePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])}},ah="日期",Ya="datePicker",sh={menu:"main",icon:"icon-date",label:ah,name:Ya,event:["change","blur","focus"],rule({t:s}){return{type:Ya,field:Ve(),title:s("com.datePicker.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Ya+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:kt(n,[{label:"year",value:"year"},{label:"month",value:"month"},{label:"date",value:"date"},{label:"dates",value:"dates"},{label:"week",value:"week"},{label:"datetime",value:"datetime"},{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])}},lh={menu:"main",icon:"icon-date-range",label:"日期区间",name:"dateRange",event:["change","blur","focus"],rule({t:s}){return{type:"datePicker",field:Ve(),title:s("com.dateRange.name"),info:"",$required:!1,props:{type:"datetimerange"}}},props(s,{t:n}){return Be(n,"datePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:kt(n,[{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"Struct",field:"pickerOptions",props:{defaultValue:{}}},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:kt(n,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])}},uh="评分",Xa="rate",ch={menu:"main",icon:"icon-rate",label:uh,name:Xa,event:["change"],validate:["number"],rule({t:s}){return{type:Xa,field:Ve(),title:s("com.rate.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,Xa+".props",[{type:"inputNumber",field:"max",props:{min:0}},{type:"switch",field:"disabled"},{type:"switch",field:"allowHalf"},{type:"ColorPicker",field:"voidColor"},{type:"ColorPicker",field:"disabledVoidColor"},{type:"input",field:"voidIconClass"},{type:"input",field:"disabledVoidIconClass"},{type:"switch",field:"showScore"},{type:"ColorPicker",field:"textColor"},{type:"input",field:"scoreTemplate"}])}},fh="颜色选择器",qa="colorPicker",dh={menu:"main",icon:"icon-color",label:fh,name:qa,event:["change","activeChange"],validate:["string"],rule({t:s}){return{type:qa,field:Ve(),title:s("com.colorPicker.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,qa+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"showAlpha"},{type:"select",field:"colorFormat",options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},{type:"tableOptions",field:"predefine",props:{column:[{label:n("props.value"),key:"value"}],valueType:"string"}}])}},ph="栅格布局",Ja="fcRow",hh={menu:"layout",icon:"icon-row",label:ph,name:Ja,mask:!1,children:"col",childrenLen:2,rule(){return{type:Ja,props:{},children:[]}},props(s,{t:n}){return Be(n,Ja+".props",[{type:"inputNumber",field:"gutter",props:{min:0}},{type:"switch",field:"type",props:{activeValue:"flex",inactiveValue:"default"}},{type:"select",field:"justify",options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}]},{type:"select",field:"align",options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}]}])}},Za="col",Au={xs:"<768px",sm:"≥768px",md:"≥992px",lg:"≥1200px",xl:"≥1920px"},vh={name:Za,label:"格子",drag:!0,dragBtn:!1,inside:!0,mask:!1,rule(){return{type:Za,props:{span:12},children:[]}},props(s,{t:n}){return Be(n,Za+".props",[{type:"slider",field:"span",value:12,props:{min:0,max:24}},{type:"slider",field:"offset",props:{min:0,max:24}},{type:"slider",field:"push",props:{min:0,max:24}},{type:"slider",field:"pull",props:{min:0,max:24}},{type:"ConfigItem",props:{label:n("props.reactive")},children:[{type:"elTabs",style:{width:"100%"},slot:"append",children:Object.keys(Au).map(r=>({type:"elTabPane",props:{label:Au[r]},style:"padding:0 10px;",children:[{type:"slider",field:r+">span",title:n("com.col.props.span"),value:12,props:{min:0,max:24}},{type:"slider",field:r+">offset",title:n("com.col.props.offset"),props:{min:0,max:24}},{type:"slider",field:r+">push",title:n("com.col.props.push"),props:{min:0,max:24}},{type:"slider",field:r+">pull",title:n("com.col.props.pull"),props:{min:0,max:24}}]}))}]}])}},gh="分割线",es="elDivider",mh={menu:"aide",icon:"icon-divider",label:gh,name:es,rule({t:s}){return{type:es,props:{},style:{display:"flex"},children:[s("com.elDivider.name")]}},props(s,{t:n}){return Be(n,es+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"contentPosition",options:kt(n,[{label:"left",value:"left"},{label:"right",value:"right"},{label:"center",value:"center"}])}])}},_h="级联选择器",Co="cascader",yh={menu:"main",icon:"icon-cascader",label:_h,name:Co,event:["change","expandChange","blur","focus","visibleChange","removeTag"],validate:["string","number","array"],rule({t:s}){return{type:Co,field:Ve(),title:s("com.cascader.name"),info:"",effect:{fetch:""},$required:!1,props:{options:In(s("props.option"),{label:"label",value:"value"},3)}}},props(s,{t:n}){return Be(n,Co+".props",[Ui(n,"props.options"),{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"input",field:"placeholder"},{type:"Object",field:"props",props:{rule:Be(n,Co+".propsOpt",[{type:"switch",field:"multiple"},{type:"select",field:"expandTrigger",options:kt(n,[{label:"click",value:"click"},{label:"hover",value:"hover"}])},{type:"switch",field:"checkStrictly"},{type:"switch",field:"emitPath",value:!0},{type:"input",field:"value",value:"value"},{type:"input",field:"label",value:"label"},{type:"input",field:"children",value:"children"},{type:"input",field:"disabled",value:"disabled"},{type:"input",field:"leaf"}])}},{type:"switch",field:"showAllLevels",value:!0},{type:"switch",field:"collapseTags"},{type:"input",field:"separator"},{type:"switch",field:"filterable"}])}},bh="上传",ts="upload",wh={menu:"main",icon:"icon-upload",label:bh,name:ts,event:[],validate:["array"],rule({t:s}){return{type:ts,field:Ve(),title:s("com.upload.name"),info:"",$required:!1,props:{action:"/platform/sys/file/uploadDynamicReturnUrl",uploadType:"image",onSuccess:new Function("res","file","file.url = res.data.url;")}}},props(s,{t:n}){return Be(n,ts+".props",[{type:"switch",field:"disabled"},{type:"select",field:"uploadType",options:[{label:n("props.image"),value:"image"},{label:n("props.file"),value:"file"}]},{type:"switch",field:"multiple"},{type:"input",field:"action",props:{disabled:!0}},{type:"FnInput",field:"beforeUpload",props:{args:["file"],name:"beforeUpload"}},{type:"FnInput",field:"onRemove",props:{body:!0,button:!0,fnx:!0,args:[Si(n)],name:"onRemove"}},{type:"FnInput",field:"onSuccess",info:n("com.upload.info"),props:{args:["res","file"],name:"onSuccess",button:!0}},{type:"FnInput",field:"onPreview",props:{body:!0,button:!0,fnx:!0,args:[Si(n)],name:"onPreview"}},{type:"TableOptions",field:"headers",props:{column:[{label:n("props.key"),key:"label"},{label:n("props.value"),key:"value"}],valueType:"object"}},{type:"TableOptions",field:"data",props:{column:[{label:n("props.key"),key:"label"},{label:n("props.value"),key:"value"}],valueType:"object"}},{type:"input",field:"name"},{type:"switch",field:"withCredentials"},{type:"input",field:"accept"},{type:"switch",field:"autoUpload",value:!0},{type:"inputNumber",field:"limit",props:{min:0}}])}},xh="穿梭框",ns="elTransfer",Ah={menu:"main",icon:"icon-transfer",label:xh,name:ns,event:["change","leftCheckChange","rightCheckChange"],validate:["string","number","array"],rule({t:s}){return{type:ns,field:Ve(),title:s("com.elTransfer.name"),info:"",$required:!1,props:{data:In(s("props.option"),{label:"label",value:"key"},1)}}},props(s,{t:n}){return Be(n,ns+".props",[Ui(n,"props.data","label","key"),{type:"switch",field:"filterable"},{type:"input",field:"filterPlaceholder"},{type:"select",field:"targetOrder",info:n("com.elTransfer.targetOrderInfo"),options:[{label:"original",value:"original"},{label:"push",value:"push"},{label:"unshift",value:"unshift"}]},{type:"TableOptions",field:"titles",props:{column:[{label:n("props.value"),key:"value"}],valueType:"string",max:2}},{type:"TableOptions",field:"buttonTexts",props:{column:[{label:n("props.value"),key:"value"}],valueType:"string",max:2}}])}},Ch="树形控件",is="tree",Sh={menu:"main",icon:"icon-tree",label:Ch,name:is,event:["nodeClick","nodeContextmenu","checkChange","check","currentChange","nodeExpand","nodeCollapse","nodeDragStart","nodeDragEnter","nodeDragLeave","nodeDragOver","nodeDragEnd","nodeDrop"],validate:["string","number","array"],rule({t:s}){return{type:is,field:Ve(),title:s("com.tree.name"),info:"",effect:{fetch:""},$required:!1,props:{props:{label:"label"},showCheckbox:!0,nodeKey:"id",data:In(s("props.option"),{label:"label",value:"id"},3)}}},props(s,{t:n}){return Be(n,is+".props",[Ui(n,"props.data","label","id"),{type:"input",field:"emptyText"},{type:"TableOptions",field:"props",props:{column:[{label:n("props.key"),key:"label"},{label:n("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"renderAfterExpand",value:!0},{type:"switch",field:"defaultExpandAll"},{type:"switch",field:"expandOnClickNode",value:!0},{type:"switch",field:"checkOnClickNode"},{type:"switch",field:"autoExpandParent",value:!0},{type:"switch",field:"checkStrictly"},{type:"switch",field:"accordion"},{type:"inputNumber",field:"indent"},{type:"input",field:"nodeKey"}])}},Eh="提示",rs="elAlert",kh={menu:"aide",icon:"icon-alert",label:Eh,name:rs,event:["close"],rule({t:s}){return{type:rs,props:{title:s("com.elAlert.name"),description:s("com.elAlert.description"),type:"success",effect:"dark"},children:[]}},props(s,{t:n}){return Be(n,rs+".props",[{type:"input",field:"title"},{type:"select",field:"type",options:[{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"info",value:"info"},{label:"error",value:"error"}]},{type:"input",field:"description"},{type:"switch",field:"closable",value:!0},{type:"switch",field:"center",value:!0},{type:"input",field:"closeText"},{type:"switch",field:"showIcon"},{type:"select",field:"effect",options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]}])}},Th="文字",Cu="text",Oh={menu:"aide",icon:"icon-span",label:Th,name:Cu,rule({t:s}){return{type:"div",title:"",native:!0,style:{whiteSpace:"pre-line",width:"100%"},children:[s("com.text.name")]}},watch:{formCreateNative({value:s,rule:n}){s&&(n.title="")}},props(s,{t:n}){return Be(n,Cu+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild",props:{type:"textarea"}}])}},Rh="间距",Su="space",Dh={menu:"layout",icon:"icon-space",label:Rh,name:Su,rule(){return{type:"div",wrap:{show:!1},native:!0,style:{width:"100%",height:"20px"},children:[]}},props(s,{t:n}){return[{type:"object",field:"formCreateStyle",native:!0,props:{rule:Be(n,Su+".props",[{type:"input",field:"height",title:"height"}])}}]}},Nh="标签页",os="elTabs",Mh={menu:"layout",icon:"icon-tab",label:Nh,name:os,mask:!1,event:["tabClick","tabChange","tabRemove","tabAdd","edit"],children:"elTabPane",rule(){return{type:os,style:{width:"100%"},children:[]}},props(s,{t:n}){return Be(n,os+".props",[{type:"select",field:"type",options:[{label:"card",value:"card"},{label:"border-card",value:"border-card"}]},{type:"switch",field:"closable"},{type:"select",field:"tabPosition",options:kt(n,[{label:"top",value:"top"},{label:"right",value:"right"},{label:"left",value:"left"}])},{type:"switch",field:"stretch"}])}},Lh="选项卡",as="elTabPane",Ih={label:Lh,name:as,inside:!0,drag:!0,dragBtn:!1,mask:!1,rule({t:s}){return{type:as,props:{label:s("com.elTabPane.name")},children:[]}},props(s,{t:n}){return Be(n,as+".props",[{type:"input",field:"label"},{type:"switch",field:"disabled"},{type:"input",field:"name"},{type:"switch",field:"lazy"}])}},Fh="按钮",ss="elButton",Bh={menu:"aide",icon:"icon-button",label:Fh,name:ss,mask:!0,event:["click"],rule({t:s}){return{type:ss,props:{},children:[s("com.elButton.name")]}},props(s,{t:n}){return Be(n,ss+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"size",options:kt(n,[{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"switch",field:"plain"},{type:"switch",field:"round"},{type:"switch",field:"circle"},{type:"switch",field:"loading"},{type:"switch",field:"disabled"}])}},Ph="富文本框",ls="fcEditor",Hh={menu:"main",icon:"icon-editor",label:Ph,name:ls,event:["change"],validate:["string"],rule({t:s}){return{type:ls,field:Ve(),title:s("com.fcEditor.name"),info:"",$required:!1,props:{}}},props(s,{t:n}){return Be(n,ls+".props",[{type:"switch",field:"disabled"}])}},jh="子表单",Eu="group",$h={menu:"subform",icon:"icon-subform",label:jh,name:Eu,inside:!1,drag:!0,dragBtn:!0,mask:!1,event:["change"],subForm:"array",loadRule(s){s.children=s.props.rule||[],s.type="FcRow",delete s.props.rule},parseRule(s){s.props.rule=s.children,s.type="group",delete s.children,delete s.props.mode},rule({t:s}){return{type:"fcRow",field:Ve(),title:s("com.group.name"),info:"",$required:!1,props:{},children:[]}},props(s,{t:n}){return Be(n,Eu+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0},{type:"switch",field:"button",value:!0},{type:"switch",field:"sortBtn",value:!0},{type:"inputNumber",field:"expand"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"}])}},zh="分组",ku="subForm",Wh={menu:"subform",icon:"icon-group",label:zh,name:ku,inside:!1,drag:!0,dragBtn:!0,mask:!1,subForm:"object",event:["change"],loadRule(s){s.children=s.props.rule||[],s.type="FcRow",delete s.props.rule},parseRule(s){s.props.rule=s.children,s.type="subForm",delete s.children},rule({t:s}){return{type:"fcRow",field:Ve(),title:s("com.subForm.name"),info:"",$required:!1,props:{},children:[]}},props(s,{t:n}){return Be(n,ku+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0}])}},Uh="卡片",us="elCard",Vh={menu:"layout",icon:"icon-card",label:Uh,name:us,drag:!0,inside:!1,mask:!1,rule({t:s}){return{type:us,props:{header:s("com.elCard.props.header")},style:{width:"100%"},children:[]}},props(s,{t:n}){return Be(n,us+".props",[{type:"input",field:"header"},{type:"select",field:"shadow",value:"always",options:kt(n,[{label:"always",value:"always"},{label:"never",value:"never"},{label:"hover",value:"hover"}])}])}},Gh="折叠面板",cs="elCollapse",Kh={menu:"layout",icon:"icon-collapse",label:Gh,name:cs,mask:!1,children:"elCollapseItem",event:["change"],rule(){return{type:cs,props:{},style:{width:"100%"},children:[]}},props(s,{t:n}){return Be(n,cs+".props",[{type:"switch",field:"accordion"}])}},Qh="面板",fs="elCollapseItem",Yh={icon:"icon-cell",label:Qh,name:fs,drag:!0,dragBtn:!1,inside:!0,mask:!1,rule({t:s}){return{type:fs,props:{title:s("com.elCollapseItem.name")},style:{},children:[]}},props(s,{t:n}){return Be(n,fs+".props",[{type:"input",field:"title"},{type:"input",field:"name"},{type:"switch",field:"disabled"}])}},Xh="标签",ds="elTag",qh={menu:"aide",icon:"icon-tag",label:Xh,name:ds,mask:!0,event:["click","close"],rule({t:s}){return{type:ds,title:"",native:!0,children:[s("com.elTag.name")]}},watch:{formCreateNative({value:s,rule:n}){s&&(n.title="")}},props(s,{t:n}){return Be(n,ds+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild"},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"select",field:"size",options:kt(n,[{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"effect",options:[{label:"dark",value:"dark"},{label:"light",value:"light"},{label:"plain",value:"plain"}]},{type:"switch",field:"closable"},{type:"switch",field:"disableTransitions"},{type:"switch",field:"hit"},{type:"ColorPicker",field:"color"}])}},Jh="HTML",ps="html",Zh={menu:"aide",icon:"icon-html",label:Jh,name:ps,rule(){return{type:ps,title:"",native:!0,attrs:{innerHTML:""},style:{display:"block",width:"100%"},children:[`
html html html html html html html html html
`]}},watch:{formCreateNative({value:s,rule:n}){s&&(n.title="")}},props(s,{t:n}){return Be(n,ps+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"HtmlEditor",field:"formCreateChild"}])}},ev="表格布局",hs="fcTable",tv={menu:"layout",icon:"icon-table",label:ev,name:hs,inside:!1,mask:!1,rule(){return{type:hs,props:{rule:{row:3,col:4,style:{},class:{},layout:[]}},children:[]}},props(s,{t:n}){return Be(n,hs+".props",[{type:"switch",field:"border",value:!0},{type:"ColorPicker",field:"borderColor"},{type:"input",field:"borderWidth"}])}},nv="图片",vs="elImage",iv={menu:"aide",icon:"icon-image",label:nv,name:vs,inline:!0,rule(){return{type:vs,title:"",style:{width:"100px",height:"100px"},props:{src:"https://static.form-create.com/example.png"}}},props(s,{t:n}){return Be(n,vs+".props",[{type:"input",field:"src"}])}},rv="表格表单",gs="tableForm",ov={menu:"subform",icon:"icon-table-form",label:rv,name:gs,mask:!1,subForm:"array",event:["change","add","delete"],children:"tableFormColumn",loadRule(s){s.props||(s.props={});const n=s.props.columns||[];s.children=n.map(r=>({type:"tableFormColumn",_fc_drag_tag:"tableFormColumn",props:{label:r.label,required:r.required||!1,width:r.style.width||"",color:r.style.color||""},children:r.rule||[]})),delete s.props.columns},parseRule(s){const n=s.children||[];s.props.columns=n.map(r=>({label:r.props.label,required:r.props.required,style:{width:r.props.width,color:r.props.color},rule:r.children||[]})),s.children=[]},rule({t:s}){return{type:gs,field:Ve(),title:s("com.tableForm.name"),info:"",props:{},children:[]}},props(s,{t:n}){return Be(n,gs+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"filterEmptyColumn",value:!0},{type:"inputNumber",field:"max",props:{min:0}}])}},ms="tableFormColumn",Tu=[Up,Gp,Qp,Xp,jp,zp,Jp,eh,ch,rh,oh,nh,sh,lh,dh,yh,wh,Ah,Sh,Hh,$h,Wh,ov,{icon:"icon-cell",name:ms,aide:!0,drag:!0,dragBtn:!1,mask:!1,style:!1,rule({t:s}){return{type:ms,props:{label:s("com.tableFormColumn.label"),width:"auto"},children:[]}},props(s,{t:n}){return Be(n,ms+".props",[{type:"input",field:"label"},{type:"switch",field:"required"},{type:"input",field:"width"},{type:"ColorInput",field:"color"}])}},kh,Bh,Oh,Zh,mh,qh,iv,hh,tv,Dh,Mh,Ih,Vh,Kh,vh,Yh];function av(s){return{icon:s.field?"icon-input":"icon-cell",label:s.field||s.type,name:"_",mask:!0,handleBtn:["delete"],rule(){return s},props(){return[]}}}/**! * Sortable 1.10.2 diff --git a/src/main/resources/static/components/module/activity/UserScope.vue b/src/main/resources/static/components/module/activity/UserScope.vue index d1693b6..294c822 100644 --- a/src/main/resources/static/components/module/activity/UserScope.vue +++ b/src/main/resources/static/components/module/activity/UserScope.vue @@ -380,7 +380,7 @@ 取消 - 确定 + 确定 @@ -646,7 +646,7 @@ module.exports = { doSearch(showFullLoading = false) { this.tableKey = new Date().getTime() this.pageForm.pageNumber = 1 - this.pageData(showFullLoading === true) + return this.pageData(showFullLoading === true) }, async pageData(showFullLoading = false) { this.tableLoading = true @@ -679,43 +679,74 @@ module.exports = { } } }, - async doSetActivityUser() { - const valid = await this.$refs.setForm.validate() - if (!valid) { + doSetActivityUser() { + // 方法级状态保护与整页遮罩共同阻止慢请求期间的重复确认。 + if (this.settingLoading) { return } - if (this.formData.groupType !== 2 && this.tableData.length === 0) { - this.$message.warning("请先指定筛选条件!") - return - } - - const confirm = await this.$confirm("是否将符合搜索条件的用户设为活动人员?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }) - - if (confirm === "confirm") { - this.settingLoading = true - const pageForm = this.normalizePageForm(this.pageForm) - Object.assign(pageForm, this.formData) - const resp = await $.post("/platform/activity/basic/scope/doSetActivityUser", { - data: JSON.stringify(pageForm) - }) - if (resp.code === 0) { - this.setDialogVisible = false - await this.getActivityGroup() - this.doSearch() - this.$message.success(resp.msg) - this.formData = this.getDefaultFormData() - } else { - this.$message.error(resp.msg) + this.$refs.setForm.validate((valid) => { + if (!valid) { + return } - this.settingLoading = false - this.$emit("update:group_id", resp.data) - this.$emit("group_change") - } + + if (this.formData.groupType !== 2 && this.tableData.length === 0) { + this.$message.warning("请先指定筛选条件!") + return + } + + this.$confirm("是否将符合搜索条件的用户设为活动人员?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + if (this.settingLoading) { + return + } + + this.settingLoading = true + const loading = this.$loading({ + lock: true, + text: "正在设置活动人员,请稍候...", + spinner: "el-icon-loading", + background: "rgba(255, 255, 255, 0.65)" + }) + const pageForm = this.normalizePageForm(this.pageForm) + Object.assign(pageForm, this.formData) + + $.post("/platform/activity/basic/scope/doSetActivityUser", { + data: JSON.stringify(pageForm) + }).then((resp) => { + if (resp.code !== 0) { + // 将后端业务错误转入统一失败分支,直接展示接口返回的真实原因。 + throw new Error(resp.msg || "设置活动人员失败") + } + + this.setDialogVisible = false + // 设置成功后等待分组和人员列表刷新完成,再解除整页操作锁定。 + return this.getActivityGroup() + .then(() => this.doSearch()) + .then(() => { + this.$message.success(resp.msg) + this.formData = this.getDefaultFormData() + this.$emit("update:group_id", resp.data) + this.$emit("group_change") + }) + }).then(null, (error) => { + // 兼容业务错误、权限异常和网络异常,避免请求失败后页面持续加载。 + const response = error && error.responseJSON ? error.responseJSON : null + const errorMessage = response && response.msg + ? response.msg + : error && error.message + ? error.message + : "设置活动人员失败" + this.$message.error(errorMessage) + }).always(() => { + this.settingLoading = false + loading.close() + }) + }) + }) }, async getActivityGroup() { const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup") diff --git a/src/main/resources/static/components/plugins/sysSignature/pc.vue b/src/main/resources/static/components/plugins/sysSignature/pc.vue index 865f0f7..730d926 100644 --- a/src/main/resources/static/components/plugins/sysSignature/pc.vue +++ b/src/main/resources/static/components/plugins/sysSignature/pc.vue @@ -52,6 +52,7 @@ module.exports = { */ init() { this.signatureAddress = origin + "/platform/signature/scanPcCode?id=" + this.id + console.log(this.signatureAddress) return this.$axios.post("/platform/signature/get") .then((res) => { if (this._isBeingDestroyed || this._isDestroyed) { diff --git a/src/main/resources/views/layouts/v4/baseLayout.html b/src/main/resources/views/layouts/v4/baseLayout.html index 5aecf89..6d23de0 100644 --- a/src/main/resources/views/layouts/v4/baseLayout.html +++ b/src/main/resources/views/layouts/v4/baseLayout.html @@ -75,7 +75,7 @@ - + diff --git a/src/main/resources/views/layouts/v4/home/act.js b/src/main/resources/views/layouts/v4/home/act.js index 6e8a35b..2ed2ca0 100644 --- a/src/main/resources/views/layouts/v4/home/act.js +++ b/src/main/resources/views/layouts/v4/home/act.js @@ -139,7 +139,7 @@ const act = { } if (act.url === "/platform/activity/apply" && !this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_WENTI_SPORTS"])) { - return this.$message.warning("PC端暂未开放报名,请前往移动端报名!") + return this.$message.warning("温馨提示:您没有参加该活动的权限!") } window.open(act.url) diff --git a/src/main/resources/views/layouts/v4/home/index.html b/src/main/resources/views/layouts/v4/home/index.html index 347e226..60e7f4e 100644 --- a/src/main/resources/views/layouts/v4/home/index.html +++ b/src/main/resources/views/layouts/v4/home/index.html @@ -116,6 +116,69 @@ layout("/layouts/v4/baseLayout.html"){ object-fit: contain; } + /* 最新活动的作用域样式会在组件挂载后注入,首屏先固定布局和图片尺寸,避免刷新时放大闪烁。 */ + #v4-home-app .act-card .activity-section-wrapper, + #v4-home-app .act-card .section-act, + #v4-home-app .act-card .activity-swiper { + width: 100%; + min-width: 0; + max-width: 100%; + box-sizing: border-box; + overflow: hidden; + } + + #v4-home-app .act-card .activity-swiper-container { + position: relative; + width: 100%; + min-width: 0; + max-width: 100%; + box-sizing: border-box; + padding: 9px 54px 12px; + overflow: hidden; + } + + #v4-home-app .act-card .activity-swiper .swiper-slide { + width: 100%; + height: auto; + min-width: 0; + flex-shrink: 0; + margin-right: 18px; + } + + #v4-home-app .act-card .activity-swiper .img-box { + width: 100%; + height: 128px; + border-radius: 8px; + overflow: hidden; + } + + #v4-home-app .act-card .activity-swiper .img-box img { + display: block; + width: 100% !important; + height: 100% !important; + max-width: 100% !important; + max-height: 128px !important; + object-fit: fill !important; + } + + @media (min-width: 768px) { + #v4-home-app .act-card .activity-swiper .swiper-slide { + width: calc((100% - 18px) / 2); + } + } + + @media (min-width: 1024px) { + #v4-home-app .act-card .activity-swiper .swiper-slide { + width: calc((100% - 54px) / 4); + } + } + + @media (min-width: 1200px) { + #v4-home-app .act-card .activity-swiper .swiper-slide { + width: calc((100% - 72px) / 5); + } + } +
diff --git a/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html b/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html index 1255c3e..43faa7f 100644 --- a/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html +++ b/src/main/resources/views/platform/zhgh/activity/sports/ActivityResults/index.html @@ -221,8 +221,7 @@ layout("/layouts/platform.html"){ placeholder="请输入姓名" filterable clearable style="width: 100%" size="small" v-if="awardsMode==1"> @@ -721,10 +720,15 @@ layout("/layouts/platform.html"){ } return score; }, + getSelectableUserList(row) { + // 其他行已经选择的人员不再显示,当前行人员保留用于姓名正常回显。 + const selectedUserIds = this.userData + .map(item => item.userId) + .filter(userId => userId) + return this.userList.filter(item => item.id === row.userId || !selectedUserIds.includes(item.id)) + }, userDetailsChange(val, row) { - const useridArr = this.userData.map(v => v.userId) this.userList.forEach(v => { - v.disabled = useridArr.includes(v.id) if (row && row.userId === v.id) { const o = { unionId: v.unionId, diff --git a/src/main/resources/views/platform/zhgh/activity/sports/infoManage/addActivity.js b/src/main/resources/views/platform/zhgh/activity/sports/infoManage/addActivity.js index eb3f902..ec8d828 100644 --- a/src/main/resources/views/platform/zhgh/activity/sports/infoManage/addActivity.js +++ b/src/main/resources/views/platform/zhgh/activity/sports/infoManage/addActivity.js @@ -601,6 +601,8 @@ eventForm: { isLeader: false }, + // 独立记录当前编辑项目,避免下拉框切换后丢失切换前项目标识。 + currentEventId: "", eventsIds: [], rightChecked: [], checkedEventInfo: [], @@ -778,8 +780,10 @@ this.checkedEventInfo = this.checkedEvents.map((v) => { v.eventId = v.id if (v.projectType === "1") { - v.athletesMaxNum = 3 - v.restrictRegNumber = 2 + // “所有单项”保存默认值,具体单项以0表示尚未个性化设置。 + const isAllItems = v.eventId === "allItems" + v.athletesMaxNum = isAllItems ? 3 : 0 + v.restrictRegNumber = isAllItems ? 2 : 0 v.leanderNum = 0 v.coachNum = 0 v.applyUserModel = 1 @@ -791,7 +795,23 @@ return v }) }, + cacheCurrentEventForm() { + if (!this.currentEventId || !this.eventForm) { + return + } + const current = clone(this.eventForm) + current.checkedEventId = this.currentEventId + current.eventId = this.currentEventId + + const index = this.checkedEventInfo.findIndex((item) => item.eventId === this.currentEventId) + if (index >= 0) { + this.checkedEventInfo.splice(index, 1, current) + } else { + this.checkedEventInfo.push(current) + } + }, async eventChange(val) { + this.cacheCurrentEventForm() const data = this.checkedEventInfo.find((v) => v.eventId === val) const resp = await $.get("/platform/activity/sports/common/getEventData", { id: val }) await this.$nextTick() @@ -804,10 +824,10 @@ projectType: resp.data.projectType, leanderNum: 0, coachNum: 0, - athletesMaxNum: resp.data.projectType === 1 ? 3 : null, + athletesMaxNum: resp.data.projectType === 1 ? 0 : null, restrictTotalTeam: 1, substituteNum: 0, - restrictRegNumber: resp.data.projectType === 1 ? 2 : null, + restrictRegNumber: resp.data.projectType === 1 ? 0 : null, isLeader: false, applyUserModel: 1 } @@ -815,33 +835,27 @@ this.projectType = resp.data.projectType } this.$set(this.eventForm, "checkedEventId", val) + this.currentEventId = val }, - async saveEvent() { + saveEvent() { const data = clone(this.eventForm) if (data.checkedEventId === "allItems") { - this.checkedEventInfo.forEach((v) => { - if (v.projectType === "1") { - v.applyUserModel = this.eventForm.applyUserModel - v.athletesMaxNum = data.athletesMaxNum - v.restrictRegNumber = data.restrictRegNumber - v.unionLimit = data.unionLimit - } - }) + const allItemsIndex = this.checkedEventInfo.findIndex((v) => v.eventId === "allItems") + if (allItemsIndex >= 0) { + this.checkedEventInfo.splice(allItemsIndex, 1, data) + } } else { const info = this.checkedEventInfo.find((v) => v.eventId === data.checkedEventId) if (info != null) { const index = this.checkedEventInfo.findIndex((v) => v.eventId === data.checkedEventId) this.checkedEventInfo.splice(index, 1) - if (info.projectType === "1") { - this.$set(this.eventForm, "athletesMaxNum", data.athletesMaxNum) - this.$set(this.eventForm, "restrictRegNumber", data.restrictRegNumber) - } - this.$set(this.eventForm, "checkedEventId", info.eventId) } data.eventId = data.checkedEventId this.checkedEventInfo.push(data) } - await this.doSave() + this.eventForm = clone(data) + this.currentEventId = data.checkedEventId + return this.doSave() }, prev() { this.active-- @@ -949,6 +963,7 @@ this.copyTemplateMode = false this.copyTemplateName = "" this.pushTodoFlag = false + this.currentEventId = "" this.events = await this.getEvents(2) await this.getActivityGroup() this.active = 0 @@ -1028,6 +1043,7 @@ async openEdit(row, flag, copyTemplateMode = false) { this.copyTemplateMode = !!copyTemplateMode this.pushTodoFlag = false + this.currentEventId = "" this.active = flag ? 0 : this.active await this.getActivityGroup() const { id } = row @@ -1184,7 +1200,8 @@ } if (this.eventForm.checkedEventId == "allItems") { - events = events.filter((v) => v.projectType == 1 && v.id != "allItems") + // “所有单项”配置随具体单项提交,由后端统一校验并补齐继承值。 + events = events.filter((v) => v.projectType == 1) } else { this.$set(this.eventForm, "activityId", this.formData.id) this.$set(this.eventForm, "eventId", this.eventForm.checkedEventId) @@ -1192,9 +1209,10 @@ this.$set(this.eventForm, "startAgeDate", this.eventForm.ageDate[0]) this.$set(this.eventForm, "endAgeDate", this.eventForm.ageDate[1]) } - events = this.eventForm + const allItems = this.checkedEventInfo.find((v) => v.eventId === "allItems") + events = allItems ? [clone(allItems), this.eventForm] : [this.eventForm] if (this.copyTemplateMode) { - this.cleanCopyTemplateData(null, [events]) + this.cleanCopyTemplateData(null, events) } } const loading = this.$loading({ @@ -1215,6 +1233,7 @@ this.copyTemplateMode = false } await this.openEdit(formData, false) + this.currentEventId = this.eventForm.checkedEventId || "" this.$message.success(resp.msg) } else { this.$message.error(resp.msg) diff --git a/src/main/resources/views/platform/zhgh/club/common/clubInfoComponent.js b/src/main/resources/views/platform/zhgh/club/common/clubInfoComponent.js index 98263f8..44f02f5 100644 --- a/src/main/resources/views/platform/zhgh/club/common/clubInfoComponent.js +++ b/src/main/resources/views/platform/zhgh/club/common/clubInfoComponent.js @@ -1,4 +1,11 @@ const REGISTER_INFO_COMPONENT = { + // 默认展示换届报告,仅由不需要查看该字段的业务页面显式关闭。 + props: { + hideReplaceReport: { + type: Boolean, + default: false + } + }, template: `
@@ -36,7 +43,7 @@ const REGISTER_INFO_COMPONENT = { {{viewData.createTime}} - {{viewData.due}} + {{ viewData.due === null || viewData.due === undefined ? "--" : viewData.due + " 元/年" }} @@ -66,7 +73,7 @@ const REGISTER_INFO_COMPONENT = { - + diff --git a/src/main/resources/views/platform/zhgh/club/examine/apply/index.html b/src/main/resources/views/platform/zhgh/club/examine/apply/index.html index ed4547f..87dc565 100644 --- a/src/main/resources/views/platform/zhgh/club/examine/apply/index.html +++ b/src/main/resources/views/platform/zhgh/club/examine/apply/index.html @@ -68,10 +68,12 @@ layout("/layouts/platform.html"){ + + > + + @@ -146,7 +150,7 @@ layout("/layouts/platform.html"){ 说明:非赛事活动无需填写赛事举办单位、获奖情况。 item.id === val); // 更新社团基础信息 - this.formData.due = club?.due || ""; + this.formData.due = club && club.due !== null && club.due !== undefined ? club.due : null; this.formData.foundTime = club?.foundTime ? this.$moment(club.foundTime).format("YYYY-MM-DD") : this.$moment().format("YYYY-MM-DD"); @@ -1161,73 +1191,63 @@ layout("/layouts/platform.html"){ // 步骤前进 this.step++; }, - // 保存 - async handleSave() { - try { - this.recalculateCensus(); - const resp = await this.$axios.post("/platform/club/examine/apply/save", { - data: JSON.stringify(this.formData), - incomeDetailed: JSON.stringify(this.financeData.incomeDetailed), - incomeCensus: JSON.stringify(this.financeData.incomeCensus) - }); - if (resp.code === 0) { - this.$message.success(resp.msg); - commonUtil.pjaxPush('/platform/club/examine/mine'); + // 三个操作共用基础信息校验,失败时返回第一步展示行号和必填字段。 + validateBaseBeforeAction(action) { + if (this.formLoading) return; + this.$refs.baseForm.validate((valid, fields) => { + if (!valid) { + this.step = 0; + const firstError = Object.values(fields || {}).flat()[0]; + this.$message.warning('温馨提示:' + (firstError ? firstError.message : '请补全基础信息必填项')); + return; } - } catch (error) { - this.handleError(error, "保存失败"); - } + action(); + }); }, - // 提交(新增) - async handleSubmit() { - try { - this.recalculateCensus(); - await this.$confirm("确定要提交此申请吗?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "info" + // 仅接收本页三个固定操作的接口后缀;data为登记实体JSON,另两项为财务数组JSON。 + // 接口返回{code,msg,data},code为0时保存成功,否则展示后端校验提示。 + requestExamineAction(action) { + if (this.formLoading) return; + this.recalculateCensus(); + const params = { + data: JSON.stringify(this.formData), + incomeDetailed: JSON.stringify(this.financeData.incomeDetailed), + incomeCensus: JSON.stringify(this.financeData.incomeCensus) + }; + if (action === 'submitAgain') params.taskId = this.taskId; + this.formLoading = true; + return this.$axios.post('/platform/club/examine/apply/' + action, params) + .then((resp) => { + if (resp.code === 0) { + this.$message.success(resp.msg); + commonUtil.pjaxPush('/platform/club/examine/mine'); + } else { + this.$message.warning(resp.msg); + } + }) + .catch(() => { + // 后端校验和网络异常已由全局axios拦截器提示,此处仅结束失败请求,避免再次弹窗。 + }) + .finally(() => { + this.formLoading = false; }); - const resp = await this.$axios.post("/platform/club/examine/apply/submit", { - data: JSON.stringify(this.formData), - incomeDetailed: JSON.stringify(this.financeData.incomeDetailed), - incomeCensus: JSON.stringify(this.financeData.incomeCensus) - }); - if (resp.code === 0) { - this.$message.success(resp.msg); - commonUtil.pjaxPush('/platform/club/examine/mine'); - } else { - this.$message.warning(resp.msg); - } - } catch (error) { - if (error !== "cancel") { - this.handleError(error, "提交失败"); - } - } }, - // 提交(任务处理) - async handleFinishTask() { - try { - this.recalculateCensus(); - await this.$confirm("您确定要提交吗?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }); - const resp = await this.$axios.post('/platform/club/examine/apply/submitAgain', { - data: JSON.stringify(this.formData), - incomeDetailed: JSON.stringify(this.financeData.incomeDetailed), - incomeCensus: JSON.stringify(this.financeData.incomeCensus), - taskId: this.taskId - }); - if (resp.code === 0) { - this.$message.success(resp.msg); - commonUtil.pjaxPush('/platform/club/examine/mine'); - } - } catch (error) { - if (error !== "cancel") { - this.handleError(error, "提交失败"); - } - } + handleSave() { + this.validateBaseBeforeAction(() => this.requestExamineAction('save')); + }, + handleSubmit() { + this.validateBaseBeforeAction(() => { + this.$confirm('确定要提交此申请吗?', '提示', { + confirmButtonText: '确定', cancelButtonText: '取消', type: 'info' + }).then(() => this.requestExamineAction('submit')).catch(() => {}); + }); + }, + handleFinishTask() { + this.validateBaseBeforeAction(() => { + this.$confirm('您确定要提交吗?', '提示', { + confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' + }).then(() => this.requestExamineAction('submitAgain')).catch(() => {}); + }); } } }); diff --git a/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js b/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js index 32cc0fb..4946d11 100644 --- a/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js +++ b/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js @@ -10,7 +10,7 @@ {{ viewData.clubName }} {{ viewData.foundTime }} - {{ viewData.due }} + {{ viewData.due === null || viewData.due === undefined ? "--" : viewData.due + " 元/年" }} diff --git a/src/main/resources/views/platform/zhgh/club/join/list/index.html b/src/main/resources/views/platform/zhgh/club/join/list/index.html index 28f1fbf..d65a8b9 100644 --- a/src/main/resources/views/platform/zhgh/club/join/list/index.html +++ b/src/main/resources/views/platform/zhgh/club/join/list/index.html @@ -73,7 +73,7 @@ layout("/layouts/platform.html"){ {{viewData.concatPersonEmail}} - {{viewData.due}} + {{ viewData.due === null || viewData.due === undefined ? "--" : viewData.due + " 元/年" }} diff --git a/src/main/resources/views/platform/zhgh/club/join/mineclub/index.html b/src/main/resources/views/platform/zhgh/club/join/mineclub/index.html index 90a9c5e..908a7a1 100644 --- a/src/main/resources/views/platform/zhgh/club/join/mineclub/index.html +++ b/src/main/resources/views/platform/zhgh/club/join/mineclub/index.html @@ -63,7 +63,7 @@ layout("/layouts/platform.html"){ {{viewData.clubCode}} {{viewData.typeName}} {{viewData.sponsorName}} - {{viewData.due}} + {{ viewData.due === null || viewData.due === undefined ? "--" : viewData.due + " 元/年" }} {{viewData.currentPeopleNum}} diff --git a/src/main/resources/views/platform/zhgh/club/register/apply/clubRegisterForm.js b/src/main/resources/views/platform/zhgh/club/register/apply/clubRegisterForm.js index ca42848..b640e31 100644 --- a/src/main/resources/views/platform/zhgh/club/register/apply/clubRegisterForm.js +++ b/src/main/resources/views/platform/zhgh/club/register/apply/clubRegisterForm.js @@ -24,7 +24,13 @@ const CLUB_FORM_TEMPLATE = { - + @@ -156,12 +162,15 @@ const CLUB_FORM_TEMPLATE = { return { formData: { clubName: "", - clubType: "" + clubType: "", + due: null }, formRules: { clubName: [{ required: true, message: "请填写社团名称", trigger: ["blur", "change"] }], clubCode: [{ required: false, message: "请填写社团编码", trigger: ["blur", "change"] }], clubType: [{ required: true, message: "请选择社团类型", trigger: ["blur", "change"] }], + // 会费标准只保存数字,单位“元/年”由页面统一展示。 + due: [{ type: "number", min: 0, message: "会费标准必须为不小于0的数字", trigger: ["blur", "change"] }], //concatPerson: [{ required: true, message: "请选择社团联系人", trigger: ["blur", "change"] }], foundTime: [{ required: true, message: "请选择成立时间", trigger: ["blur", "change"] }] } diff --git a/src/main/resources/views/platform/zhgh/club/register/officeAudit/index.html b/src/main/resources/views/platform/zhgh/club/register/officeAudit/index.html index 96132b3..c898837 100644 --- a/src/main/resources/views/platform/zhgh/club/register/officeAudit/index.html +++ b/src/main/resources/views/platform/zhgh/club/register/officeAudit/index.html @@ -73,7 +73,7 @@ layout("/layouts/platform.html"){