模式管理

master
382696293@qq.com 2 years ago
parent a4fcca3362
commit 580bf92fd4

@ -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)

@ -26,6 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="technologyInfo" column="technology_info" />
<result property="effectContent" column="effect_content" />
</resultMap>
<resultMap type="WxMode" id="WxModeNewResult" extends="WxModeResult">
@ -33,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWxModeVo">
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
</sql>
<select id="selectWxModeList" parameterType="WxMode" resultMap="WxModeResult">
@ -54,6 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="beganVideo != null and beganVideo != ''"> and began_video = #{beganVideo}</if>
<if test="pauseVideo != null and pauseVideo != ''"> and pause_video = #{pauseVideo}</if>
<if test="status != null "> and status = #{status}</if>
<if test="technologyInfo != null "> and technology_info = #{technologyInfo}</if>
<if test="effectContent != null "> and effect_content = #{effectContent}</if>
</where>
order by create_time desc
</select>
@ -97,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="technologyInfo != null "> technology_info</if>
<if test="effectContent != null "> effect_content</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentType != null">#{instrumentType},</if>
@ -119,6 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="technologyInfo != null "> #{technologyInfo}</if>
<if test="effectContent != null "> #{effectContent}</if>
</trim>
</insert>
@ -145,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="technologyInfo != null "> technology_info = #{technologyInfo}, </if>
<if test="effectContent != null "> effect_content = #{effectContent}, </if>
</trim>
where id = #{id}
</update>

@ -422,6 +422,25 @@
</el-form-item>
</div>
</el-form-item>
<el-form-item v-if="form.instrumentModel == 'WL200'" label="使用技术" prop="technologyArrayMode" label-width="110px" style="margin-top: 10px">
<div style="position: relative; left: 30px">
<i class="little-red-heart2 el-icon-star-on"></i>
</div>
<el-select v-model="form.technologyArrayMode" placeholder="请选择技术" clearable multiple style="width: 240px">
<el-option
v-for="dict in dict.type.instrument_technology"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="form.instrumentModel == 'WL200'" label="模式功效" prop="effectContent" label-width="110px" style="margin-top: 10px">
<div style="position: relative; left: 30px">
<i class="little-red-heart2 el-icon-star-on"></i>
</div>
<el-input v-model="form.effectContent" placeholder="请输入模式功效" maxlength="50"/>
</el-form-item>
<el-form-item label="解锁小程序标签" prop="showWechatTagId" label-width="120px">
<treeselect v-model="form.lockWechatTagArray" :options="chatTagOptions" :multiple="true" :show-count="true" placeholder="请选择小程序标签" :disable-branch-nodes="true" />
</el-form-item>
@ -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) {

Loading…
Cancel
Save