Merge remote-tracking branch 'origin/feature-20240104' into feature-20240104

master
elliott 2 years ago
commit 9dc2281203

@ -96,6 +96,8 @@ public class WxMode extends BaseEntity
private List<Long> lockCompanyTagArray = new ArrayList<Long>();
private Integer isNew;
public void setId(Long id)
{
@ -289,6 +291,14 @@ public class WxMode extends BaseEntity
this.combineData = combineData;
}
public Integer getIsNew() {
return isNew;
}
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -33,6 +33,11 @@ public class WxNursingLog extends BaseEntity {
*/
private String instrumentName;
/**
* 1 2iot
*/
private Integer instrumentType;
/**
* 线1线2线
*/
@ -161,4 +166,12 @@ public class WxNursingLog extends BaseEntity {
public void setModeImage(String modeImage) {
this.modeImage = modeImage;
}
public Integer getInstrumentType() {
return instrumentType;
}
public void setInstrumentType(Integer instrumentType) {
this.instrumentType = instrumentType;
}
}

@ -50,8 +50,8 @@ public class WxUserInstrument extends BaseEntity
/** 保修到期时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "保修到期时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "保修到期时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date guaranteeEndtime;
/** 绑定状态1未绑定2已解绑 */

@ -10,7 +10,7 @@ public class WxInstrumentSerialExportVm {
private Long id;
/** 仪器名称 */
@Excel(name = "仪器名称")
@Excel(name = "仪器")
private String instrumentName;
/** 来源 */
@ -26,7 +26,7 @@ public class WxInstrumentSerialExportVm {
private String validStatus;
/** 创建时间 */
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
public Long getId() {

@ -23,7 +23,7 @@ public class WxInstrumentSerialImportVm {
private String serial;
/** 序列号有效状态1有效0无效 */
@Excel(name = "有效状态",type = Type.IMPORT)
@Excel(name = "有效状态:1有效0无效",type = Type.IMPORT, combo = {"1","0"})
private String validStatus;

@ -9,6 +9,7 @@ import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -83,9 +84,9 @@ public class WxModeRet {
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "模式时长", width = 30, dateFormat = "yyyy-MM-dd")
private Date modeTime;
@JsonFormat(pattern = "HH:mm:ss")
@Excel(name = "模式时长", width = 30, dateFormat = "HH:mm:ss")
private LocalTime modeTime;
/**
*
@ -130,6 +131,8 @@ public class WxModeRet {
// 组合实体类
private List<WxModeCombineInfo> combineData;
private Integer isNew;
private List<Long> lockWechatTagArray = new ArrayList<Long>();
@ -216,11 +219,11 @@ public class WxModeRet {
return isCabinMode;
}
public void setModeTime(Date modeTime) {
public void setModeTime(LocalTime modeTime) {
this.modeTime = modeTime;
}
public Date getModeTime() {
public LocalTime getModeTime() {
return modeTime;
}
@ -319,4 +322,12 @@ public class WxModeRet {
public void setCombineData(List<WxModeCombineInfo> combineData) {
this.combineData = combineData;
}
public Integer getIsNew() {
return isNew;
}
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
}

@ -66,4 +66,6 @@ public interface WxUserInstrumentMapper
List<WxUserInstrument> selectListByUserIdAndInstrumentId(WxUserInstrument wxUserInstrument);
void deleteByUserId(@Param("userId") Long userId);
List<WxUserInstrument> selectListByCondition(WxUserInstrument wxUserInstrument);
}

@ -27,6 +27,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" />
</resultMap>
<resultMap type="WxMode" id="WxModeNewResult" extends="WxModeResult">
<result property="isNew" column="is_new" />
</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, mode_time, preparation_video, began_video, pause_video, status, create_by, create_time, update_by, update_time, remark from wx_mode
</sql>
@ -51,9 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectListByInstrumentId" parameterType="Long" resultMap="WxModeResult">
<select id="selectListByInstrumentId" parameterType="Long" resultMap="WxModeNewResult">
SELECT
DISTINCT mo.*, imo.mode_sort
DISTINCT mo.*, imo.mode_sort, imo.is_new
FROM
wx_mode mo
LEFT JOIN `wx_instrument_mode` imo ON imo.mode_id = mo.id

@ -26,6 +26,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, user_id, serial, instrument_id, instrument_name, serial_image, guarantee, guarantee_endtime, binding_status, status, create_by, create_time, update_by, update_time, remark from wx_user_instrument
</sql>
<select id="selectListByCondition" parameterType="WxUserInstrument" resultMap="WxUserInstrumentResult">
<include refid="selectWxUserInstrumentVo"/>
<where>
<if test="serial != null and serial != ''"> and serial like concat('%', #{serial}, '%')</if>
<if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if>
<if test="instrumentIds != null">
and instrument_id in
<foreach item="instrumentId" collection="instrumentIds.split(',')" open="(" separator="," close=")">
#{instrumentId}
</foreach>
</if>
<if test="userIds != null and userIds !=''">
and user_id in
<foreach collection="userIds.split(',')" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="instrumentId != null "> and instrument_id like concat('%', #{instrumentId}, '%')</if>
<if test="startTime != null and endTime != null">
and create_time &gt;= #{startTime}
</if>
<if test="startTime != null and endTime != null">
and create_time &lt;= #{endTime}
</if>
</where>
order by create_time desc
</select>
<select id="selectWxUserInstrumentList" parameterType="WxUserInstrument" resultMap="WxUserInstrumentResult">
<include refid="selectWxUserInstrumentVo"/>
<where>

@ -140,7 +140,7 @@ public class GlobalExceptionHandler
{
log.error(e.getMessage(), e);
String message = e.getAllErrors().get(0).getDefaultMessage();
return AjaxResult.error(message);
return AjaxResult.error("参数格式不正确");
}
/**

@ -3,12 +3,14 @@ package com.flossom.miniProgram.controller;
import com.flossom.common.core.constant.Constants;
import com.flossom.common.core.domain.R;
import com.flossom.common.core.domain.SysFile;
import com.flossom.common.core.domain.entity.WxClockLog;
import com.flossom.common.core.domain.entity.WxClockStatistics;
import com.flossom.common.core.domain.req.WxClockLogReq;
import com.flossom.common.core.domain.ret.WxClockLogRet;
import com.flossom.common.core.exception.ServiceException;
import com.flossom.common.core.web.controller.BaseController;
import com.flossom.common.core.web.page.TableDataInfo;
import com.flossom.common.security.utils.SecurityUtils;
import com.flossom.miniProgram.service.IWxClockLogService;
import com.flossom.system.api.RemoteFileService;
import org.apache.commons.lang3.StringUtils;
@ -18,8 +20,13 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.YearMonth;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Controller
@ -58,10 +65,13 @@ public class WxClockLogController extends BaseController {
*
*/
@GetMapping("/list")
public TableDataInfo list() {
startPage();
List<WxClockLogRet> list = wxClockLogService.selectWxClockLogList();
return getDataTable(list);
public R list(@RequestParam(value = "year") Integer year, @RequestParam(value = "month") Integer month) {
WxClockLog queryClockLog = new WxClockLog();
queryClockLog.setUserId(SecurityUtils.getLoginUser().getWxUserMember().getId());
YearMonth targetYearMonth = YearMonth.of(year, month);
queryClockLog.getParams().put("beginTime", targetYearMonth.atDay(1).atStartOfDay());
queryClockLog.getParams().put("endTime", targetYearMonth.atEndOfMonth().atTime(LocalTime.MAX));
return R.ok(wxClockLogService.selectWxClockLogList(queryClockLog));
}
/**

@ -98,6 +98,11 @@ public class LoginUserVo {
*/
private String integralText;
/**
*
*/
private Integer devicesNum;
public LoginUserVo() {
}
@ -248,4 +253,12 @@ public class LoginUserVo {
public void setExpireCredit(Integer expireCredit) {
this.expireCredit = expireCredit;
}
public Integer getDevicesNum() {
return devicesNum;
}
public void setDevicesNum(Integer devicesNum) {
this.devicesNum = devicesNum;
}
}

@ -15,7 +15,7 @@ public interface IWxClockLogService {
WxClockLogRet latestClockRecord();
List<WxClockLogRet> selectWxClockLogList();
List<WxClockLogRet> selectWxClockLogList(WxClockLog queryClockLog);
List<WxClockStatistics> clockStatistics(Integer year);

@ -226,9 +226,7 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
}
@Override
public List<WxClockLogRet> selectWxClockLogList() {
WxClockLog queryClockLog = new WxClockLog();
queryClockLog.setUserId(SecurityUtils.getLoginUser().getWxUserMember().getId());
public List<WxClockLogRet> selectWxClockLogList(WxClockLog queryClockLog) {
List<WxClockLogRet> list = wxClockLogMapper.selectWxClockImgRetList(queryClockLog);
if (list != null && list.size() > 0) {
for (WxClockLogRet wxClockLogRet : list) {

@ -170,6 +170,7 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
WxUserInstrument userBindInstrumentQuery = new WxUserInstrument();
userBindInstrumentQuery.setUserId(wxUserMember.getId());
userBindInstrumentQuery.setInstrumentId(wxInstrumentSerial.getInstrumentId());
userBindInstrumentQuery.setBindingStatus(BindingStatusEnums.BINDED.getCode());
userBindInstrumentQuery.setStatus(Status.OK.getCode().longValue());
List<WxUserInstrument> wxUserInstrumentList = wxUserInstrumentMapper.selectListByUserIdAndInstrumentId(userBindInstrumentQuery);
// 2.1、当前用户绑定过序列号对应的仪器ID
@ -213,6 +214,8 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
logger.info("仪器({})被隐藏了,无法绑定", wxInstrumentSerial.getInstrumentId());
throw new ServiceReturnCodeException(InstrumentHttpCodeEnum.TWO_HUNDRED_AND_SIX.getInfo(), InstrumentHttpCodeEnum.TWO_HUNDRED_AND_SIX.getCode());
}
// 构建 用户仪器关联对象
WxUserInstrument saveEntity = new WxUserInstrument();
saveEntity.setUserId(wxUserMember.getId());
saveEntity.setSerial(serial);
@ -226,11 +229,26 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
}
saveEntity.setBindingStatus(BindingStatusEnums.BINDED.getCode());
saveEntity.setStatus(Status.OK.getCode().longValue());
saveEntity.setCreateBy(wxUserMember.getNickname());
saveEntity.setCreateTime(DateUtils.getNowDate());
saveEntity.setUpdateBy(wxUserMember.getNickname());
saveEntity.setUpdateTime(DateUtils.getNowDate());
wxUserInstrumentMapper.insertWxUserInstrument(saveEntity);
// 判断仪器是不是自己绑定过的,就是已解绑状态
WxUserInstrument myBindingInstrumentQuery = new WxUserInstrument();
myBindingInstrumentQuery.setUserId(wxUserMember.getId());
myBindingInstrumentQuery.setInstrumentId(wxInstrumentSerial.getInstrumentId());
myBindingInstrumentQuery.setBindingStatus(BindingStatusEnums.UN_BOUND.getCode());
myBindingInstrumentQuery.setStatus(Status.OK.getCode().longValue());
List<WxUserInstrument> myBindingInstrumentList = wxUserInstrumentMapper.selectListByUserIdAndInstrumentId(myBindingInstrumentQuery);
if (myBindingInstrumentList != null && myBindingInstrumentList.size() > 0) {
// 解绑状态的仪器,重新绑定
WxUserInstrument wxUserInstrument = myBindingInstrumentList.get(0);
saveEntity.setId(wxUserInstrument.getId());
wxUserInstrumentMapper.updateWxUserInstrument(saveEntity);
} else {
saveEntity.setCreateBy(wxUserMember.getNickname());
saveEntity.setCreateTime(DateUtils.getNowDate());
wxUserInstrumentMapper.insertWxUserInstrument(saveEntity);
}
// 更新仪器序列号绑定状态
WxInstrumentSerial saveSerial = new WxInstrumentSerial();
@ -262,6 +280,8 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
WxUserMember updateDevicesNum = new WxUserMember();
updateDevicesNum.setId(wxUserMember.getId());
updateDevicesNum.setDevicesNum(wxUserMember.getDevicesNum() + 1);
// 仪器绑定积分
updateDevicesNum.setCredit(wxUserMember.getCredit() + wxInstrument.getBindingCredit());
wxUserMemberMapper.updateWxUserMember(updateDevicesNum);
// 绑定成功发送消息
@ -283,7 +303,7 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
}
/**
* TODO:
* TODO:
*/
}
}
@ -428,6 +448,7 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
WxModeRet wxModeRet = new WxModeRet();
BeanUtils.copyProperties(wxMode, wxModeRet);
wxModeRet.setLock(false);
wxModeRet.setModeTime(LocalTime.of(0, 10));
// 查询 模式组合
WxModeCombineInfo query = new WxModeCombineInfo();

@ -92,6 +92,11 @@ public class WxNursingLogServiceImpl implements IWxNursingLogService {
if (wxMode != null) {
nursingLog.setModeImage(wxMode.getModeBanner());
}
WxInstrument wxInstrument = wxInstrumentMapper.selectWxInstrumentById(nursingLog.getInstrumentId());
if (wxInstrument != null) {
nursingLog.setInstrumentType(wxInstrument.getType());
nursingLog.setInstrumentName(wxInstrument.getName());
}
}
}
return wxNursingLogList;

@ -10,6 +10,9 @@ import com.flossom.common.core.domain.entity.WxUserInstrument;
import com.flossom.common.core.domain.req.WxInstrumentSerialExportVm;
import com.flossom.common.core.domain.req.WxInstrumentSerialImportVm;
import com.flossom.common.core.domain.req.WxUserInstrumentExportVm;
import com.flossom.common.core.exception.ServiceException;
import com.flossom.common.core.exception.UtilException;
import com.flossom.common.core.utils.StringUtils;
import com.flossom.common.core.utils.poi.ExcelUtil;
import com.flossom.common.core.web.controller.BaseController;
import com.flossom.common.core.web.domain.AjaxResult;
@ -118,7 +121,7 @@ public class WxInstrumentSerialController extends BaseController
*/
@RequiresPermissions("system:instrumentSerial:remove")
@Log(title = "仪器序列号关联", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(wxInstrumentSerialService.deleteWxInstrumentSerialByIds(ids));
@ -160,12 +163,19 @@ public class WxInstrumentSerialController extends BaseController
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
String fileName = file.getOriginalFilename();
String suffix = fileName.substring(fileName.lastIndexOf("."));
if (!(StringUtils.equals(suffix, ".xls") || StringUtils.equals(suffix, ".xlsx"))) {
throw new ServiceException("请使用模板文件导入数据");
}
ExcelUtil<WxInstrumentSerialImportVm> util = new ExcelUtil<WxInstrumentSerialImportVm>(WxInstrumentSerialImportVm.class);
List<WxInstrumentSerialImportVm> WxInstrumentSerialImportList = util.importExcel(file.getInputStream());
String message = wxInstrumentSerialService.handleImportData(WxInstrumentSerialImportList);
// String operName = SecurityUtils.getUsername();
// String message = userService.importUser(userList, updateSupport, operName);
return success(message);
if(WxInstrumentSerialImportList == null ||WxInstrumentSerialImportList.isEmpty() || WxInstrumentSerialImportList.get(0) == null) {
throw new ServiceException("数据格式不正确,请检查模板数据");
}
String result = wxInstrumentSerialService.handleImportData(WxInstrumentSerialImportList);
return success(result);
}
}

@ -1,19 +1,16 @@
package com.flossom.system.controller;
import java.util.List;
import java.io.IOException;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.flossom.common.core.domain.entity.WxInstrument;
import com.flossom.common.core.domain.entity.WxUserInstrument;
import com.flossom.common.core.domain.entity.WxUserMember;
import com.flossom.common.core.domain.req.WxUserInstrumentExportVm;
import com.flossom.common.core.domain.req.WxUserMemberExportVm;
import com.flossom.common.core.domain.ret.WxUserMemberRet;
import com.flossom.common.core.domain.vo.WxUserMemberVo;
import com.flossom.common.core.exception.ServiceException;
import com.flossom.common.core.domain.req.WxUserMemberVm;
import com.flossom.common.core.utils.poi.ExcelUtil;
import com.flossom.common.core.web.controller.BaseController;
import com.flossom.common.core.web.domain.AjaxResult;
@ -58,6 +55,19 @@ public class WxUserInstrumentController extends BaseController
@GetMapping("/list")
public TableDataInfo list(WxUserInstrument wxUserInstrument)
{
// 用户相关信息
WxUserMemberVm wxUserMemberVm = new WxUserMemberVm();
wxUserMemberVm.setNickname(wxUserInstrument.getNickName());
if(wxUserInstrument.getUserIdArray() != null && wxUserInstrument.getUserIdArray().size() > 0) {
wxUserMemberVm.setId(wxUserInstrument.getUserIdArray().stream().map(String::valueOf).collect(Collectors.joining(",")));
}
wxUserMemberVm.setMobile(wxUserInstrument.getUserPhone());
List<WxUserMember> wxUserMemberList = wxUserMemberService.selectWxUserMemberList(wxUserMemberVm);
if(wxUserMemberList != null && wxUserMemberList.size() > 0) {
String collect = wxUserMemberList.stream().map(WxUserMember::getId).map(String::valueOf).collect(Collectors.joining(","));
wxUserInstrument.setUserIds(collect);
}
startPage();
List<WxUserInstrument> list = wxUserInstrumentService.selectWxUserInstrumentList(wxUserInstrument);
//循环查询对应的信息

@ -1,7 +1,5 @@
package com.flossom.system.service.impl;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
@ -11,14 +9,12 @@ import com.flossom.common.core.domain.req.WxUserInstrumentExportVm;
import com.flossom.common.core.enums.BindingStatusEnums;
import com.flossom.common.core.mapper.*;
import com.flossom.common.core.utils.DateUtils;
import com.flossom.common.core.utils.StringUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxUserInstrumentService;
import org.springframework.util.CollectionUtils;
import org.springframework.util.unit.DataUnit;
/**
* Service
@ -37,6 +33,7 @@ public class WxUserInstrumentServiceImpl implements IWxUserInstrumentService
private WxInstrumentMapper wxInstrumentMapper;
@Autowired
private WxInstrumentSerialMapper instrumentSerialMapper;
@Autowired
private WxInstrumentSerialLogMapper instrumentSerialLogMapper;
@Autowired
private WxUserInstrumentLogMapper wxUserInstrumentLogMapper;
@ -62,47 +59,6 @@ public class WxUserInstrumentServiceImpl implements IWxUserInstrumentService
@Override
public List<WxUserInstrument> selectWxUserInstrumentList(WxUserInstrument wxUserInstrument)
{
// 处理用户昵称
if (StringUtils.isNotEmpty(wxUserInstrument.getNickName())){
WxUserMember userMember = new WxUserMember();
userMember.setNickname(wxUserInstrument.getNickName());
List<WxUserMember> wxUserMembersList = wxUserMemberMapper.selectWxUserMemberList(userMember);
if (!CollectionUtils.isEmpty(wxUserMembersList)) {
String userIds = (wxUserMembersList.stream().map(WxUserMember::getId).collect(Collectors.toList())).stream().map(String::valueOf).collect(Collectors.joining(","));
wxUserInstrument.setUserIds(userIds);
}
}
// 处理用户ID
if (!CollectionUtils.isEmpty(wxUserInstrument.getUserIdArray())){
String userIds =wxUserInstrument.getUserIdArray().stream().map(String::valueOf).collect(Collectors.joining(","));
if (StringUtils.isNotEmpty(wxUserInstrument.getUserIds())) {
wxUserInstrument.setUserIds(wxUserInstrument.getUserIds()+","+userIds);
} else {
wxUserInstrument.setUserIds(userIds);
}
}
// 处理手机号码
if (StringUtils.isNotEmpty(wxUserInstrument.getUserPhone())){
List<Long> userIdList = Lists.newArrayList();
// 获取手机集合
List<String> mobileList = Arrays.asList(wxUserInstrument.getUserPhone().split(",")).stream().map(String::valueOf).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(mobileList)) {
for (String mobile: mobileList) {
List<WxUserMember> wxUserMembers = wxUserMemberMapper.selectWxUserMemberByMobile(mobile);
if (!CollectionUtils.isEmpty(wxUserMembers)) {
userIdList.add(wxUserMembers.get(0).getId());
}
}
}
if(!CollectionUtils.isEmpty(userIdList)) {
String userIds = userIdList.stream().map(String::valueOf).collect(Collectors.joining(","));
if (StringUtils.isNotEmpty(wxUserInstrument.getUserIds())) {
wxUserInstrument.setUserIds(wxUserInstrument.getUserIds()+","+userIds);
} else {
wxUserInstrument.setUserIds(userIds);
}
}
}
// 处理仪器字段
if (!CollectionUtils.isEmpty(wxUserInstrument.getInstrumentIdArray())) {
String instrumentIds = wxUserInstrument.getInstrumentIdArray().stream().map(String::valueOf).collect(Collectors.joining(","));
@ -114,7 +70,7 @@ public class WxUserInstrumentServiceImpl implements IWxUserInstrumentService
wxUserInstrument.setMapperBindStatus(bindStatus);
}
return wxUserInstrumentMapper.selectWxUserInstrumentList(wxUserInstrument);
return wxUserInstrumentMapper.selectListByCondition(wxUserInstrument);
}
/**

@ -77,6 +77,12 @@ export default {
dailyClockCredit: [
{ required: true, message: "日常打卡奖励不能为空", trigger: "blur" }
],
extraClockCredit: [
{ required: true, message: "额外打卡奖励积分不能为空", trigger: "blur" }
],
timeRange: [
{ required: true, message: "额外打卡时间段不能为空", trigger: "blur" }
],
}
};
},
@ -166,7 +172,7 @@ export default {
this.$modal.msgError("额外打卡奖励积分仅能输入数字");
return;
}
if (!this.form.extraClockCredit) {
if (this.form.extraClockCredit == null && this.form.extraClockCredit == undefined) {
this.$modal.msgError("积分不能为空");
return;
}

@ -612,7 +612,7 @@
/>
</el-form-item>
<el-form-item label="初次护理弹窗">
<el-form-item label="初次护理弹窗" prop="firstNurse">
<el-button size="small" type="primary" @click="addNurse()"
>添加规则
</el-button>
@ -684,7 +684,7 @@
</el-table>
</el-form-item>
<el-form-item label="仪器介绍">
<el-form-item label="仪器介绍" prop="instrumentIntroduce">
<el-button size="small" type="primary" @click="addIntroduce()"
>添加介绍
</el-button>
@ -1514,8 +1514,9 @@ export default {
listInstrument(this.queryParams).then((response) => {
this.instrumentList = response.rows
this.total = response.total
this.loading = false
})
}).finally(() => {
this.loading = false
})
},
//
cancel() {
@ -1819,18 +1820,21 @@ export default {
let temp = []
for (let i = 0; i < this.form.modeIdsValue.length; i++) {
let filterModeArr = this.mode.modeIdsOptions.filter(
(item) => item.id == this.form.modeIdsValue[i]
(item) => item !== undefined && this.form.modeIdsValue[i] === item.id
)
temp.push(filterModeArr[0])
if(filterModeArr !== undefined && filterModeArr.length > 0) {
temp.push(filterModeArr[0])
}
}
this.newModeOptionList = temp
if(temp !== undefined && temp.length > 0) {
this.newModeOptionList = temp
}
}
})
})
},
/** 提交按钮 */
submitForm() {
console.log(this.form.modeIdsValue)
this.form.nurseList = this.nurseList
this.form.introduceList = this.introduceList
this.$refs['form'].validate((valid) => {
@ -2162,7 +2166,6 @@ export default {
},
handleNurseDelete(item) {
this.nurseList.splice(item.$index, 1)
console.log('handleNurseDelete', item)
},
addNurseFile(index) {
this.nurseIndex = index
@ -2174,7 +2177,6 @@ export default {
let files = e.target.files
if (files.length) {
let data = await this.commonFileUpload(files[0])
console.log('data', data)
this.nurseList[this.nurseIndex].file = data.url
let type = files[0].type
let isImage = this.imageFileType.some((item) => type.includes(item))
@ -2197,7 +2199,6 @@ export default {
},
handleIntroduceDelete(item) {
this.introduceList.splice(item.$index, 1)
console.log('handleIntroduceDelete', item)
},
addIntroduceFile(index) {
this.introduceIndex = index
@ -2284,7 +2285,6 @@ export default {
}
},
saveInstrumentName(item) {
console.log(item)
if (item.id != null) {
updateRelate(item).then((response) => {
this.$modal.msgSuccess('修改成功')

@ -35,7 +35,7 @@
<el-option label="全部" value="" />
<el-option label="已绑定" value="0" />
<el-option label="未绑定" value="1" />
<el-option label="已解绑" value="1" />
<el-option label="已解绑" value="2" />
</el-select>
</el-form-item>
<el-form-item label="有效状态" prop="validStatus">
@ -136,7 +136,7 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" />
<el-table-column label="序列号" align="center" prop="serial" />
<el-table-column label="仪器" align="center" prop="instrumentName" />
<el-table-column label="仪器名称" align="center" prop="instrumentName" />
<el-table-column label="绑定状态" align="center" prop="bindingStatus" >
<template slot-scope="scope">
<span v-show="scope.row.bindingStatus == 0"></span>
@ -153,7 +153,7 @@
<el-table-column label="来源" align="center" prop="source" />
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -264,7 +264,7 @@
<el-dialog :title="detailTitle" :visible.sync="detailOpen" width="880px" append-to-body>
<el-table v-loading="loading" :data="userInstrumentLogList">
<el-table-column label="序号" align="center" prop="id" />
<el-table-column label="会员昵称" align="center" prop="wxUserMember.nickName" />
<el-table-column label="会员昵称" align="center" prop="wxUserMember.nickname" />
<el-table-column label="手机号码" align="center" prop="wxUserMember.mobile" />
<el-table-column label="用户编号" align="center" prop="wxUserMember.id" />
<el-table-column label="仪器名称" align="center" prop="instrumentName" />
@ -278,7 +278,7 @@
</el-table-column>
<el-table-column label="操作时间" align="center" prop="createTime" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
</el-table>
@ -602,7 +602,8 @@ export default {
},
//
batchOperate() {
if (this.batchOperateValue == null) {
console.log(this.batchOperateValue)
if (this.batchOperateValue == null || this.batchOperateValue == '') {
this.$message.error("请选择您的操作");
return;
}

@ -219,6 +219,7 @@
:before-upload="beforeBannerUpload"
:on-remove="handleRemoveBanner">
<i class="el-icon-plus"></i>
<div slot="tip" class="el-upload__tip">只能上传jpg/png图片</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">

@ -221,7 +221,7 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="仪器信息" prop="instrumentId" v-if="form.messageType == 3">
<el-form-item label="仪器名称" prop="instrumentId" v-if="form.messageType == 3">
<el-select v-model="form.instrumentId">
<!-- <el-option label="仪器1" :value="0" :key="0"></el-option>-->
<!-- <el-option label="仪器2" :value="1" :key="1"></el-option>-->
@ -361,6 +361,9 @@ export default {
type: [
{ required: true, message: "跳转类型不能为空", trigger: "blur" }
],
instrumentId: [
{ required: true, message: "请选择仪器"}
],
link: [
{ required: true, message: "参数不能为空", trigger: "blur" }
],

@ -56,8 +56,8 @@
clearable
>
<el-option label="全部" value="" />
<el-option label="未绑定" value="1" />
<el-option label="已绑定" value="0" />
<el-option label="已解绑" value="2" />
</el-select>
</el-form-item>
<el-form-item label="仪器ID" prop="instrumentId">
@ -137,7 +137,7 @@
<el-table-column label="保修年限" align="center" prop="guarantee" />
<el-table-column label="保修到期时间" align="center" prop="guaranteeEndtime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.guaranteeEndtime, '{y}-{m}-{d} {h}:{m}') }}</span>
<span>{{ parseTime(scope.row.guaranteeEndtime, '{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
<el-table-column label="绑定状态" align="center" prop="bindingStatus" >
@ -694,7 +694,7 @@ export default {
},
//
batchOperate() {
if (this.batchOperateValue == null) {
if (this.batchOperateValue == null || this.batchOperateValue == '') {
this.$message.error("请选择您的操作");
return;
}

Loading…
Cancel
Save