Compare commits
No commits in common. 'd1f863ec37974e4f8a422eed176453c477fd57c0' and 'b98513b91e415682cb995d86c87ec475d8c54235' have entirely different histories.
d1f863ec37
...
b98513b91e
@ -1,26 +0,0 @@
|
|||||||
package com.flossom.common.core.constant;
|
|
||||||
|
|
||||||
public class IntegralChangTextConstants {
|
|
||||||
|
|
||||||
// 完善用户信息
|
|
||||||
public static final String COMPLETE_INFORMATION = "完善信息,获得奖励积分";
|
|
||||||
|
|
||||||
// 绑定仪器
|
|
||||||
public static final String BINDING_INSTRUMENT = "绑定成功,获得奖励积分";
|
|
||||||
|
|
||||||
// 日常打卡
|
|
||||||
public static final String DAILY_CLOCK = "打卡成功,获得奖励积分";
|
|
||||||
|
|
||||||
// 打卡活动打卡
|
|
||||||
public static final String CLOCK_ACTIVITY_CLOCK = "完成,获得奖励积分";
|
|
||||||
|
|
||||||
// 问卷活动打卡
|
|
||||||
public static final String QUESTIONNAIRE_ACTIVITY_CLOCK = "完成,获得奖励积分";
|
|
||||||
|
|
||||||
// 共创活动打卡
|
|
||||||
public static final String TOGETHER_ACTIVITY_CLOCK = "完成,获得奖励积分";
|
|
||||||
|
|
||||||
// 护理计划
|
|
||||||
public static final String NURSING_ACTIVITY_CLOCK = "完成,获得奖励积分";
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
package com.flossom.common.core.mapper;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.entity.WxInstrumentLining;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 仪器与膜布的关联Mapper接口
|
|
||||||
*
|
|
||||||
* @author flossom
|
|
||||||
* @date 2024-03-27
|
|
||||||
*/
|
|
||||||
public interface WxInstrumentLiningMapper {
|
|
||||||
/**
|
|
||||||
* 查询仪器与膜布的关联
|
|
||||||
*
|
|
||||||
* @param id 仪器与膜布的关联主键
|
|
||||||
* @return 仪器与膜布的关联
|
|
||||||
*/
|
|
||||||
public WxInstrumentLining selectWxInstrumentLiningById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询仪器与膜布的关联列表
|
|
||||||
*
|
|
||||||
* @param wxInstrumentLining 仪器与膜布的关联
|
|
||||||
* @return 仪器与膜布的关联集合
|
|
||||||
*/
|
|
||||||
public List<WxInstrumentLining> selectWxInstrumentLiningList(WxInstrumentLining wxInstrumentLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增仪器与膜布的关联
|
|
||||||
*
|
|
||||||
* @param wxInstrumentLining 仪器与膜布的关联
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertWxInstrumentLining(WxInstrumentLining wxInstrumentLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改仪器与膜布的关联
|
|
||||||
*
|
|
||||||
* @param wxInstrumentLining 仪器与膜布的关联
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateWxInstrumentLining(WxInstrumentLining wxInstrumentLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除仪器与膜布的关联
|
|
||||||
*
|
|
||||||
* @param id 仪器与膜布的关联主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteWxInstrumentLiningById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除仪器与膜布的关联
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteWxInstrumentLiningByIds(Long[] ids);
|
|
||||||
|
|
||||||
public int deleteByInstrumentId(Long instrumentId);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.flossom.common.core.mapper;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.entity.WxLining;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 膜布Mapper接口
|
|
||||||
*
|
|
||||||
* @author flossom
|
|
||||||
* @date 2024-03-26
|
|
||||||
*/
|
|
||||||
public interface WxLiningMapper {
|
|
||||||
/**
|
|
||||||
* 查询膜布
|
|
||||||
*
|
|
||||||
* @param id 膜布主键
|
|
||||||
* @return 膜布
|
|
||||||
*/
|
|
||||||
public WxLining selectWxLiningById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布列表
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 膜布集合
|
|
||||||
*/
|
|
||||||
public List<WxLining> selectWxLiningList(WxLining wxLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增膜布
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertWxLining(WxLining wxLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改膜布
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateWxLining(WxLining wxLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除膜布
|
|
||||||
*
|
|
||||||
* @param id 膜布主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteWxLiningById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除膜布
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteWxLiningByIds(Long[] ids);
|
|
||||||
}
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.flossom.common.core.mapper.WxInstrumentLiningMapper">
|
|
||||||
|
|
||||||
<resultMap type="WxInstrumentLining" id="WxInstrumentLiningResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="instrumentId" column="instrument_id" />
|
|
||||||
<result property="liningId" column="lining_id" />
|
|
||||||
<result property="status" column="status" />
|
|
||||||
<result property="createBy" column="create_by" />
|
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectWxInstrumentLiningVo">
|
|
||||||
select id, instrument_id, lining_id, status, create_by, create_time from wx_instrument_lining
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectWxInstrumentLiningList" parameterType="WxInstrumentLining" resultMap="WxInstrumentLiningResult">
|
|
||||||
<include refid="selectWxInstrumentLiningVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
|
||||||
<if test="liningId != null "> and lining_id = #{liningId}</if>
|
|
||||||
<if test="status != null "> and status = #{status}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectWxInstrumentLiningById" parameterType="Long" resultMap="WxInstrumentLiningResult">
|
|
||||||
<include refid="selectWxInstrumentLiningVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertWxInstrumentLining" parameterType="WxInstrumentLining" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into wx_instrument_lining
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="instrumentId != null">instrument_id,</if>
|
|
||||||
<if test="liningId != null">lining_id,</if>
|
|
||||||
<if test="status != null">status,</if>
|
|
||||||
<if test="createBy != null">create_by,</if>
|
|
||||||
<if test="createTime != null">create_time,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="instrumentId != null">#{instrumentId},</if>
|
|
||||||
<if test="liningId != null">#{liningId},</if>
|
|
||||||
<if test="status != null">#{status},</if>
|
|
||||||
<if test="createBy != null">#{createBy},</if>
|
|
||||||
<if test="createTime != null">#{createTime},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateWxInstrumentLining" parameterType="WxInstrumentLining">
|
|
||||||
update wx_instrument_lining
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
|
||||||
<if test="liningId != null">lining_id = #{liningId},</if>
|
|
||||||
<if test="status != null">status = #{status},</if>
|
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteWxInstrumentLiningById" parameterType="Long">
|
|
||||||
delete from wx_instrument_lining where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteWxInstrumentLiningByIds" parameterType="String">
|
|
||||||
delete from wx_instrument_lining where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteByInstrumentId" parameterType="Long">
|
|
||||||
delete from wx_instrument_lining where instrument_id = #{instrumentId}
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,109 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.flossom.common.core.mapper.WxLiningMapper">
|
|
||||||
|
|
||||||
<resultMap type="WxLining" id="WxLiningResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="code" column="code" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="desc" column="desc" />
|
|
||||||
<result property="isShowBuy" column="is_show_buy" />
|
|
||||||
<result property="skipAppid" column="skip_appid" />
|
|
||||||
<result property="skipPath" column="skip_path" />
|
|
||||||
<result property="icon" column="icon" />
|
|
||||||
<result property="status" column="status" />
|
|
||||||
<result property="createBy" column="create_by" />
|
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
<result property="updateBy" column="update_by" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectWxLiningVo">
|
|
||||||
select id, code, name, `desc`, is_show_buy, skip_appid, skip_path, icon, status, create_by, create_time, update_by, update_time from wx_lining
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectWxLiningList" parameterType="WxLining" resultMap="WxLiningResult">
|
|
||||||
<include refid="selectWxLiningVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
||||||
<if test="desc != null and desc != ''"> and `desc` = #{desc}</if>
|
|
||||||
<if test="isShowBuy != null "> and is_show_buy = #{isShowBuy}</if>
|
|
||||||
<if test="skipAppid != null and skipAppid != ''"> and skip_appid = #{skipAppid}</if>
|
|
||||||
<if test="skipPath != null and skipPath != ''"> and skip_path = #{skipPath}</if>
|
|
||||||
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
|
|
||||||
<if test="status != null "> and status = #{status}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectWxLiningById" parameterType="Long" resultMap="WxLiningResult">
|
|
||||||
<include refid="selectWxLiningVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertWxLining" parameterType="WxLining">
|
|
||||||
insert into wx_lining
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">id,</if>
|
|
||||||
<if test="code != null">code,</if>
|
|
||||||
<if test="name != null">name,</if>
|
|
||||||
<if test="desc != null">`desc`,</if>
|
|
||||||
<if test="isShowBuy != null">is_show_buy,</if>
|
|
||||||
<if test="skipAppid != null">skip_appid,</if>
|
|
||||||
<if test="skipPath != null">skip_path,</if>
|
|
||||||
<if test="icon != null">icon,</if>
|
|
||||||
<if test="status != null">status,</if>
|
|
||||||
<if test="createBy != null">create_by,</if>
|
|
||||||
<if test="createTime != null">create_time,</if>
|
|
||||||
<if test="updateBy != null">update_by,</if>
|
|
||||||
<if test="updateTime != null">update_time,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">#{id},</if>
|
|
||||||
<if test="code != null">#{code},</if>
|
|
||||||
<if test="name != null">#{name},</if>
|
|
||||||
<if test="desc != null">#{desc},</if>
|
|
||||||
<if test="isShowBuy != null">#{isShowBuy},</if>
|
|
||||||
<if test="skipAppid != null">#{skipAppid},</if>
|
|
||||||
<if test="skipPath != null">#{skipPath},</if>
|
|
||||||
<if test="icon != null">#{icon},</if>
|
|
||||||
<if test="status != null">#{status},</if>
|
|
||||||
<if test="createBy != null">#{createBy},</if>
|
|
||||||
<if test="createTime != null">#{createTime},</if>
|
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateWxLining" parameterType="WxLining">
|
|
||||||
update wx_lining
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="code != null">code = #{code},</if>
|
|
||||||
<if test="name != null">name = #{name},</if>
|
|
||||||
<if test="desc != null">`desc` = #{desc},</if>
|
|
||||||
<if test="isShowBuy != null">is_show_buy = #{isShowBuy},</if>
|
|
||||||
<if test="skipAppid != null">skip_appid = #{skipAppid},</if>
|
|
||||||
<if test="skipPath != null">skip_path = #{skipPath},</if>
|
|
||||||
<if test="icon != null">icon = #{icon},</if>
|
|
||||||
<if test="status != null">status = #{status},</if>
|
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteWxLiningById" parameterType="Long">
|
|
||||||
delete from wx_lining where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteWxLiningByIds" parameterType="String">
|
|
||||||
delete from wx_lining where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
package com.flossom.miniProgram.controller;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.R;
|
|
||||||
import com.flossom.common.core.web.controller.BaseController;
|
|
||||||
import com.flossom.miniProgram.service.IWxLiningService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 膜布Controller
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/lining")
|
|
||||||
public class WxLiningController extends BaseController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IWxLiningService wxLiningService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/list")
|
|
||||||
public R list(@RequestParam @NotNull(message = "仪器ID不能为空") Long instrumentId) {
|
|
||||||
return R.ok(wxLiningService.selectWxLiningList(instrumentId));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package com.flossom.miniProgram.service;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.entity.WxLining;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 膜布Service接口
|
|
||||||
*/
|
|
||||||
public interface IWxLiningService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布列表
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 膜布集合
|
|
||||||
*/
|
|
||||||
public List<WxLining> selectWxLiningList(Long instrumentId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,9 +1,11 @@
|
|||||||
package com.flossom.miniProgram.service;
|
package com.flossom.miniProgram.service;
|
||||||
|
|
||||||
import com.flossom.common.core.web.page.TableDataInfo;
|
import com.flossom.common.core.domain.entity.WxUserIntegralLog;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface IWxUserIntegralService {
|
public interface IWxUserIntegralService {
|
||||||
|
|
||||||
TableDataInfo obtainUserIntegral(Integer pageNum, Integer pageSize);
|
List<WxUserIntegralLog> obtainUserIntegral();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,50 +0,0 @@
|
|||||||
package com.flossom.miniProgram.service.impl;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.entity.WxInstrumentLining;
|
|
||||||
import com.flossom.common.core.domain.entity.WxLining;
|
|
||||||
import com.flossom.common.core.mapper.WxInstrumentLiningMapper;
|
|
||||||
import com.flossom.common.core.mapper.WxLiningMapper;
|
|
||||||
import com.flossom.miniProgram.service.IWxLiningService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 膜布Service业务层处理
|
|
||||||
*
|
|
||||||
* @author flossom
|
|
||||||
* @date 2024-03-26
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class WxLiningServiceImpl implements IWxLiningService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private WxLiningMapper wxLiningMapper;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private WxInstrumentLiningMapper wxInstrumentLiningMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布列表
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 膜布
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<WxLining> selectWxLiningList(Long instrumentId) {
|
|
||||||
WxInstrumentLining instrumentLiningQuery = new WxInstrumentLining();
|
|
||||||
instrumentLiningQuery.setInstrumentId(instrumentId);
|
|
||||||
List<WxInstrumentLining> wxInstrumentLiningList = wxInstrumentLiningMapper.selectWxInstrumentLiningList(instrumentLiningQuery);
|
|
||||||
if (wxInstrumentLiningList != null && wxInstrumentLiningList.size() > 0) {
|
|
||||||
List<WxLining> liningList = new ArrayList<>();
|
|
||||||
for (WxInstrumentLining wxInstrumentLining : wxInstrumentLiningList) {
|
|
||||||
liningList.add(wxLiningMapper.selectWxLiningById(wxInstrumentLining.getLiningId()));
|
|
||||||
}
|
|
||||||
return liningList;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,126 +0,0 @@
|
|||||||
package com.flossom.miniProgram.utils.shuyun;
|
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数云接口配置
|
|
||||||
*
|
|
||||||
* @author flossom
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
@RefreshScope
|
|
||||||
@ConfigurationProperties(prefix = "shuyun")
|
|
||||||
public class ShuYunConfig {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 接口地址
|
|
||||||
*/
|
|
||||||
private String url;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数云 appid
|
|
||||||
*/
|
|
||||||
private String appid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数云 security
|
|
||||||
*/
|
|
||||||
private String security;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户名
|
|
||||||
*/
|
|
||||||
private String authValue;
|
|
||||||
|
|
||||||
private String platCode;
|
|
||||||
|
|
||||||
private String shopId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户名称
|
|
||||||
*/
|
|
||||||
private String tenant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数云忠诚度卡ID
|
|
||||||
*/
|
|
||||||
private String cardPlanId;
|
|
||||||
|
|
||||||
|
|
||||||
private ActionMethod actionMethod;
|
|
||||||
|
|
||||||
|
|
||||||
public String getUrl() {
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUrl(String url) {
|
|
||||||
this.url = url;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppid() {
|
|
||||||
return appid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppid(String appid) {
|
|
||||||
this.appid = appid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSecurity() {
|
|
||||||
return security;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSecurity(String security) {
|
|
||||||
this.security = security;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionMethod getActionMethod() {
|
|
||||||
return actionMethod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActionMethod(ActionMethod actionMethod) {
|
|
||||||
this.actionMethod = actionMethod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPlatCode() {
|
|
||||||
return platCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPlatCode(String platCode) {
|
|
||||||
this.platCode = platCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getShopId() {
|
|
||||||
return shopId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShopId(String shopId) {
|
|
||||||
this.shopId = shopId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAuthValue() {
|
|
||||||
return authValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAuthValue(String authValue) {
|
|
||||||
this.authValue = authValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTenant() {
|
|
||||||
return tenant;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTenant(String tenant) {
|
|
||||||
this.tenant = tenant;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCardPlanId() {
|
|
||||||
return cardPlanId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCardPlanId(String cardPlanId) {
|
|
||||||
this.cardPlanId = cardPlanId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
@ -1,100 +0,0 @@
|
|||||||
package com.flossom.system.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.io.IOException;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.entity.WxLining;
|
|
||||||
import com.flossom.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.flossom.common.core.web.controller.BaseController;
|
|
||||||
import com.flossom.common.core.web.domain.AjaxResult;
|
|
||||||
import com.flossom.common.core.web.page.TableDataInfo;
|
|
||||||
import com.flossom.common.log.annotation.Log;
|
|
||||||
import com.flossom.common.log.enums.BusinessType;
|
|
||||||
import com.flossom.common.security.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.flossom.system.service.IWxLiningService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 膜布Controller
|
|
||||||
*
|
|
||||||
* @author flossom
|
|
||||||
* @date 2024-03-26
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/lining")
|
|
||||||
public class WxLiningController extends BaseController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IWxLiningService wxLiningService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("system:lining:list")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(WxLining wxLining) {
|
|
||||||
List<WxLining> list = wxLiningService.selectWxLiningList(wxLining);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出膜布列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("system:lining:export")
|
|
||||||
@Log(title = "膜布", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, WxLining wxLining) {
|
|
||||||
List<WxLining> list = wxLiningService.selectWxLiningList(wxLining);
|
|
||||||
ExcelUtil<WxLining> util = new ExcelUtil<WxLining>(WxLining.class);
|
|
||||||
util.exportExcel(response, list, "膜布数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取膜布详细信息
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("system:lining:query")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
||||||
return success(wxLiningService.selectWxLiningById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增膜布
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("system:lining:add")
|
|
||||||
@Log(title = "膜布", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody WxLining wxLining) {
|
|
||||||
return toAjax(wxLiningService.insertWxLining(wxLining));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改膜布
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("system:lining:edit")
|
|
||||||
@Log(title = "膜布", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody WxLining wxLining) {
|
|
||||||
return toAjax(wxLiningService.updateWxLining(wxLining));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除膜布
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("system:lining:remove")
|
|
||||||
@Log(title = "膜布", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
||||||
return toAjax(wxLiningService.deleteWxLiningByIds(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
package com.flossom.system.service;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.entity.WxLining;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 膜布Service接口
|
|
||||||
*
|
|
||||||
* @author flossom
|
|
||||||
* @date 2024-03-26
|
|
||||||
*/
|
|
||||||
public interface IWxLiningService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布
|
|
||||||
*
|
|
||||||
* @param id 膜布主键
|
|
||||||
* @return 膜布
|
|
||||||
*/
|
|
||||||
public WxLining selectWxLiningById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布列表
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 膜布集合
|
|
||||||
*/
|
|
||||||
public List<WxLining> selectWxLiningList(WxLining wxLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增膜布
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertWxLining(WxLining wxLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改膜布
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateWxLining(WxLining wxLining);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除膜布
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的膜布主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteWxLiningByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除膜布信息
|
|
||||||
*
|
|
||||||
* @param id 膜布主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteWxLiningById(Long id);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,91 +0,0 @@
|
|||||||
package com.flossom.system.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.flossom.common.core.domain.entity.WxLining;
|
|
||||||
import com.flossom.common.core.mapper.WxLiningMapper;
|
|
||||||
import com.flossom.common.core.utils.DateUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.flossom.system.service.IWxLiningService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 膜布Service业务层处理
|
|
||||||
*
|
|
||||||
* @author flossom
|
|
||||||
* @date 2024-03-26
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class WxLiningServiceImpl implements IWxLiningService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private WxLiningMapper wxLiningMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布
|
|
||||||
*
|
|
||||||
* @param id 膜布主键
|
|
||||||
* @return 膜布
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public WxLining selectWxLiningById(Long id) {
|
|
||||||
return wxLiningMapper.selectWxLiningById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询膜布列表
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 膜布
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<WxLining> selectWxLiningList(WxLining wxLining) {
|
|
||||||
return wxLiningMapper.selectWxLiningList(wxLining);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增膜布
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertWxLining(WxLining wxLining) {
|
|
||||||
wxLining.setCreateTime(DateUtils.getNowDate());
|
|
||||||
return wxLiningMapper.insertWxLining(wxLining);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改膜布
|
|
||||||
*
|
|
||||||
* @param wxLining 膜布
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateWxLining(WxLining wxLining) {
|
|
||||||
wxLining.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
return wxLiningMapper.updateWxLining(wxLining);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除膜布
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的膜布主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteWxLiningByIds(Long[] ids) {
|
|
||||||
return wxLiningMapper.deleteWxLiningByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除膜布信息
|
|
||||||
*
|
|
||||||
* @param id 膜布主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteWxLiningById(Long id) {
|
|
||||||
return wxLiningMapper.deleteWxLiningById(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询膜布列表
|
|
||||||
export function listLining(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/lining/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询膜布详细
|
|
||||||
export function getLining(id) {
|
|
||||||
return request({
|
|
||||||
url: '/system/lining/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增膜布
|
|
||||||
export function addLining(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/lining',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改膜布
|
|
||||||
export function updateLining(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/lining',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除膜布
|
|
||||||
export function delLining(id) {
|
|
||||||
return request({
|
|
||||||
url: '/system/lining/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,293 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
|
|
||||||
<el-tab-pane :label="item.code" :name="item.code" v-for="(item, index) of liningList">
|
|
||||||
<div style="width: 200px; float: left;">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
||||||
<!-- 左侧表单项 -->
|
|
||||||
<div class="form-top">
|
|
||||||
<div class="form-top--left">
|
|
||||||
<el-form-item label="膜布名称" prop="name" style="width: 500px">
|
|
||||||
<el-input v-model="item.name" placeholder="请输入膜布名称"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="购买入口是否显示" label-width="150px" prop="name" style="width: 500px">
|
|
||||||
<el-switch
|
|
||||||
v-model="item.isShowBuy == 1"
|
|
||||||
active-color="#13ce66"
|
|
||||||
inactive-color="#ff4949">
|
|
||||||
</el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="购买商城appid" label-width="150px" prop="skipAppid" style="width: 500px">
|
|
||||||
<el-input v-model="item.skipAppid" placeholder="请输入购买商城appid"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="膜布图标" prop="icon" width="150px">
|
|
||||||
<template>
|
|
||||||
<!-- 膜布图标 -->
|
|
||||||
<el-upload
|
|
||||||
ref="upload"
|
|
||||||
:action="uploadUrl"
|
|
||||||
:headers="headers"
|
|
||||||
:file-list="item.fileList"
|
|
||||||
list-type="picture-card"
|
|
||||||
accept=".jpg,.png"
|
|
||||||
:limit="1"
|
|
||||||
:class="{ hide: item.uploadHide }"
|
|
||||||
:on-remove="iconUploadRemove"
|
|
||||||
:on-success="iconUploadSuccess"
|
|
||||||
:on-error="uploadError"
|
|
||||||
:before-upload="handleBeforeUploadImage"
|
|
||||||
>
|
|
||||||
<i slot="default" class="el-icon-plus"></i>
|
|
||||||
<div slot="file" slot-scope="{ file }">
|
|
||||||
<img :src="file.url" class="el-upload-list__item-thumbnail" alt=""/>
|
|
||||||
<span class="el-upload-list__item-actions">
|
|
||||||
<span @click="iconPicturePreview(file)" class="el-upload-list__item-preview">
|
|
||||||
<i class="el-icon-zoom-in"></i>
|
|
||||||
</span>
|
|
||||||
<span v-if="!disabled" @click="iconUploadRemove(file)" class="el-upload-list__item-delete">
|
|
||||||
<i class="el-icon-delete"></i>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件</div>
|
|
||||||
</el-upload>
|
|
||||||
<!-- 预览窗口 -->
|
|
||||||
<el-dialog :visible.sync="dialogVisible" append-to-body>
|
|
||||||
<img width="100%" :src="dialogImageUrl" alt=""/>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
<!-- 右侧表单项 -->
|
|
||||||
<div class="form-top--right">
|
|
||||||
<el-form-item label="膜布描述" prop="desc" style="width: 500px">
|
|
||||||
<el-input v-model="item.desc" placeholder="请输入膜布描述"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item style="height: 36px"/>
|
|
||||||
<el-form-item label="购买商城PATH" label-width="150px" prop="skipPath" style="width: 500px">
|
|
||||||
<el-input v-model="item.skipPath" placeholder="请输入购买商城PATH"/>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer" style="margin-left: 90%;">
|
|
||||||
<el-button type="primary" @click="submitForm(item)">提 交</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {listLining, getLining, delLining, addLining, updateLining} from "@/api/system/lining";
|
|
||||||
import {getToken} from "@/utils/auth";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Lining",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 激活标签页
|
|
||||||
activeName: "M01",
|
|
||||||
/* 文件上传地址 */
|
|
||||||
uploadUrl: process.env.VUE_APP_BASE_API + '/file/upload',
|
|
||||||
headers: {
|
|
||||||
Authorization: 'Bearer ' + getToken(),
|
|
||||||
},
|
|
||||||
fileList: [
|
|
||||||
[], []
|
|
||||||
],
|
|
||||||
// 上传后是否隐藏
|
|
||||||
// uploadHide: false,
|
|
||||||
disabled: false,
|
|
||||||
dialogImageUrl: '',
|
|
||||||
dialogVisible: false,
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 膜布表格数据
|
|
||||||
liningList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
desc: null,
|
|
||||||
isShowBuy: null,
|
|
||||||
skipAppid: null,
|
|
||||||
skipPath: null,
|
|
||||||
icon: null,
|
|
||||||
status: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询膜布列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listLining().then(response => {
|
|
||||||
response?.rows?.forEach(item => {
|
|
||||||
this.liningList.push({
|
|
||||||
...item,
|
|
||||||
// 上传后是否隐藏
|
|
||||||
uploadHide: item?.icon != null,
|
|
||||||
fileList: [{
|
|
||||||
name: item?.icon,
|
|
||||||
url: item?.icon
|
|
||||||
}]
|
|
||||||
})
|
|
||||||
})
|
|
||||||
console.log(this.liningList);
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
desc: null,
|
|
||||||
isShowBuy: null,
|
|
||||||
skipAppid: null,
|
|
||||||
skipPath: null,
|
|
||||||
icon: null,
|
|
||||||
status: null,
|
|
||||||
createBy: null,
|
|
||||||
createTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
updateTime: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getLining(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改膜布";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm(item) {
|
|
||||||
this.form = item;
|
|
||||||
this.form.icon = item.fileList[0].url;
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateLining(this.form).then(response => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
} else {
|
|
||||||
this.$modal.msgError("修改失败");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addLining(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
iconUploadRemove(file, fileList) {
|
|
||||||
this.liningList.forEach(e => {
|
|
||||||
if (this.activeName === e.code) {
|
|
||||||
e.fileList = [];
|
|
||||||
e.uploadHide = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
iconUploadSuccess(response, file) {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.form.banner = response.data.url
|
|
||||||
this.liningList.forEach(e => {
|
|
||||||
if (this.activeName === e.code) {
|
|
||||||
e.fileList = [{
|
|
||||||
name: response.data.url,
|
|
||||||
url: response.data.url
|
|
||||||
}];
|
|
||||||
e.uploadHide = true;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$message.error('图片插入失败')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleBeforeUploadImage(file) {
|
|
||||||
let fileType = ['jpg', 'png', 'JPG', 'PNG']
|
|
||||||
const fileName = file.name.split('.')
|
|
||||||
const fileExt = fileName[fileName.length - 1]
|
|
||||||
const isTypeOk = fileType.indexOf(fileExt) >= 0
|
|
||||||
if (!isTypeOk) {
|
|
||||||
this.$modal.msgError(`文件类型只能为jpg格式/png格式`)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
iconPicturePreview(file) {
|
|
||||||
this.dialogImageUrl = file.url
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
/* 文件上传失败 */
|
|
||||||
uploadError() {
|
|
||||||
this.$message.error('文件上传失败')
|
|
||||||
},
|
|
||||||
handleClick(tab, event) {
|
|
||||||
console.log(tab, event);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.app-container {
|
|
||||||
.form-top {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.form-top--right {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-bottom {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .hide .el-upload--picture-card {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue