diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java index 0ffe33d..234f0a8 100644 --- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java @@ -83,6 +83,16 @@ public class WxMode extends BaseEntity @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private Long status; + /** + * 使用技术 + */ + private String technologyInfo; + + /** + * 模式功效 + */ + private String effectContent; + // 展示标签 private String lockWechatTag; @@ -310,6 +320,22 @@ public class WxMode extends BaseEntity this.isCustomMode = isCustomMode; } + public String getTechnologyInfo() { + return technologyInfo; + } + + public void setTechnologyInfo(String technologyInfo) { + this.technologyInfo = technologyInfo; + } + + public String getEffectContent() { + return effectContent; + } + + public void setEffectContent(String effectContent) { + this.effectContent = effectContent; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml index fca87f6..cfb18fa 100644 --- a/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml @@ -26,6 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -33,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, instrument_type, instrument_model, mode_name, mode_desc, mode_banner, mode_video, mode_type, mode_class, is_cabin_mode, is_custom_mode, mode_time, preparation_video, began_video, pause_video, status, create_by, create_time, update_by, update_time, remark from wx_mode + select id, instrument_type, instrument_model, mode_name, mode_desc, mode_banner, mode_video, mode_type, mode_class, is_cabin_mode, is_custom_mode, mode_time, preparation_video, began_video, pause_video, status, create_by, create_time, update_by, update_time, remark, technology_info, effect_content from wx_mode @@ -97,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, update_time, remark, + technology_info + effect_content #{instrumentType}, @@ -119,6 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateBy}, #{updateTime}, #{remark}, + #{technologyInfo} + #{effectContent} @@ -145,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, + technology_info = #{technologyInfo}, + effect_content = #{effectContent}, where id = #{id} diff --git a/flossom-ui/src/views/system/mode/index.vue b/flossom-ui/src/views/system/mode/index.vue index 2fdfc82..63a347e 100644 --- a/flossom-ui/src/views/system/mode/index.vue +++ b/flossom-ui/src/views/system/mode/index.vue @@ -422,6 +422,25 @@ + +
+ +
+ + + +
+ +
+ +
+ +
@@ -639,7 +658,7 @@ export default { modeType: null, modeClass: null, isCabinMode: null, - modeTime: null, + modeTime: 0, preparationVideo: null, beganVideo: null, pauseVideo: null, @@ -648,7 +667,10 @@ export default { createTime: null, updateBy: null, updateTime: null, - remark: null + remark: null, + technologyArrayMode: null, + technologyInfo: null, + effectContent: null, }; this.resetForm("form"); this.bannerList = []; @@ -714,6 +736,10 @@ export default { // 组合查询数据剔除自身 this.combineModeList = this.combineModeList.filter(x => x.id != id); console.log('组合数据=>',this.combineModeList) + // 使用技术 + if(this.form.technologyInfo) { + this.form.technologyArrayMode = this.form.technologyInfo.split(","); + } }); }, handleFileInfo(url) { @@ -763,6 +789,17 @@ export default { this.$message.error("启动/暂停图片不能为空"); return; } + // 判断是否必填 使用技术和模式功效 + if (this.form.instrumentType == 2 && this.form.instrumentModel == 'WL200') { + if(this.form.technologyArrayMode == null || this.form.technologyArrayMode.length == 0) { + this.$message.error("使用技术不能为空"); + return; + } + if(this.form.effectContent == null|| this.form.effectContent.trim() =="") { + this.$message.error("模式功效不能为空"); + return; + } + } // 组合实体 this.form.combineData = this.combineData; let technologyFlag = false; @@ -807,6 +844,10 @@ export default { return; } } + // 使用技术 + if(this.form.technologyArray.length > 0) { + this.form.technologyInfo = this.form.technologyArrayMode.join(","); + } this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) {