Commit 0158886c authored by wanghao's avatar wanghao

1 托盘和板子绑定 和 解绑处理,涉及到的 老化数据清理。

parent 949911b8
...@@ -52,6 +52,15 @@ public class PalletDeviceBindingController extends BaseController ...@@ -52,6 +52,15 @@ public class PalletDeviceBindingController extends BaseController
return AjaxResult.success(palletDeviceBindingService.selectPalletDeviceBindingList(palletDeviceBinding)); return AjaxResult.success(palletDeviceBindingService.selectPalletDeviceBindingList(palletDeviceBinding));
} }
/**
* 获取所有托盘绑定的设备列列表(排除已解除绑定的设备)
*/
@GetMapping("/getAllExcludeUnbindingTimeByTrayId/{trayId}")
public AjaxResult getAllExcludeUnbindingTimeByTrayId(@PathVariable("trayId") Long trayId) {
return AjaxResult.success(palletDeviceBindingService.getAllExcludeUnbindingTimeByTrayId(trayId));
}
/** /**
* 导出托盘绑定的设备列列表 * 导出托盘绑定的设备列列表
*/ */
...@@ -109,6 +118,12 @@ public class PalletDeviceBindingController extends BaseController ...@@ -109,6 +118,12 @@ public class PalletDeviceBindingController extends BaseController
return toAjax(palletDeviceBindingService.batchUpdateDeviceCode(palletDeviceBindings)); return toAjax(palletDeviceBindingService.batchUpdateDeviceCode(palletDeviceBindings));
} }
@PostMapping("/batchUpdateDeviceCodeAndUnbindingTime")
public AjaxResult batchUpdateDeviceCodeAndUnbindingTime(@RequestBody List<PalletDeviceBinding> palletDeviceBindings) {
return toAjax(palletDeviceBindingService.batchUpdateDeviceCodeAndUnbindingTime(palletDeviceBindings));
}
/** /**
* 修改托盘绑定的设备列 * 修改托盘绑定的设备列
*/ */
...@@ -118,6 +133,26 @@ public class PalletDeviceBindingController extends BaseController ...@@ -118,6 +133,26 @@ public class PalletDeviceBindingController extends BaseController
return toAjax(palletDeviceBindingService.updatePalletDeviceBinding(palletDeviceBinding)); return toAjax(palletDeviceBindingService.updatePalletDeviceBinding(palletDeviceBinding));
} }
/**
* 解绑设备
* @param palletDeviceBinding p
* @return l
*/
@PostMapping("/unbindDevice")
public AjaxResult unbindDevice(@RequestBody PalletDeviceBinding palletDeviceBinding) {
return palletDeviceBindingService.unbindDevice(palletDeviceBinding);
}
/**
* 解绑所有设备
* @param trayId t
* @return l
*/
@GetMapping("/unbindAllDevice/{trayId}")
public AjaxResult unbindAllDevice(@PathVariable("trayId") Long trayId) {
return palletDeviceBindingService.unbindAllDevice(trayId);
}
/** /**
* 删除托盘绑定的设备列 * 删除托盘绑定的设备列
*/ */
......
...@@ -36,6 +36,8 @@ public interface PalletDeviceBindingMapper ...@@ -36,6 +36,8 @@ public interface PalletDeviceBindingMapper
*/ */
public List<PalletDeviceBinding> selectPalletDeviceBindingList(PalletDeviceBinding palletDeviceBinding); public List<PalletDeviceBinding> selectPalletDeviceBindingList(PalletDeviceBinding palletDeviceBinding);
public List<PalletDeviceBinding> getAllExcludeUnbindingTimeByTrayId(Long trayId);
public int countErrorByTrayId(Long trayId); public int countErrorByTrayId(Long trayId);
/** /**
...@@ -60,8 +62,14 @@ public interface PalletDeviceBindingMapper ...@@ -60,8 +62,14 @@ public interface PalletDeviceBindingMapper
*/ */
public int updatePalletDeviceBinding(PalletDeviceBinding palletDeviceBinding); public int updatePalletDeviceBinding(PalletDeviceBinding palletDeviceBinding);
public int unbindDevice(Long palletDeviceBindingId);
public int batchUpdateDeviceCode(@Param("palletDeviceBindingList") List<PalletDeviceBinding> palletDeviceBindingList); public int batchUpdateDeviceCode(@Param("palletDeviceBindingList") List<PalletDeviceBinding> palletDeviceBindingList);
public int batchUpdateDeviceCodeAndUnbindingTime(@Param("palletDeviceBindingList") List<PalletDeviceBinding> palletDeviceBindingList);
public int unbindAllDevice(Long trayId);
/** /**
* 删除托盘绑定的设备列 * 删除托盘绑定的设备列
* *
......
...@@ -55,6 +55,10 @@ public interface TTrayInfoMapper ...@@ -55,6 +55,10 @@ public interface TTrayInfoMapper
public int updateStatusByTrayCode(TTrayInfo tTrayInfo); public int updateStatusByTrayCode(TTrayInfo tTrayInfo);
public int updateStatusByTrayId(TTrayInfo tTrayInfo);
public int updateToBoundWhenStateIsIdle(Long trayId);
public int unbindByCode(TTrayInfo tTrayInfo); public int unbindByCode(TTrayInfo tTrayInfo);
/** /**
* 删除托盘信息 * 删除托盘信息
......
...@@ -29,6 +29,8 @@ public interface IPalletDeviceBindingService ...@@ -29,6 +29,8 @@ public interface IPalletDeviceBindingService
*/ */
public List<PalletDeviceBinding> selectPalletDeviceBindingList(PalletDeviceBinding palletDeviceBinding); public List<PalletDeviceBinding> selectPalletDeviceBindingList(PalletDeviceBinding palletDeviceBinding);
public List<PalletDeviceBinding> getAllExcludeUnbindingTimeByTrayId(Long trayId);
/** /**
* 新增托盘绑定的设备列 * 新增托盘绑定的设备列
* *
...@@ -42,6 +44,9 @@ public interface IPalletDeviceBindingService ...@@ -42,6 +44,9 @@ public interface IPalletDeviceBindingService
public int batchInsertPalletDeviceBinding(List<PalletDeviceBinding> palletDeviceBindingList); public int batchInsertPalletDeviceBinding(List<PalletDeviceBinding> palletDeviceBindingList);
public int batchUpdateDeviceCode(List<PalletDeviceBinding> palletDeviceBindingList); public int batchUpdateDeviceCode(List<PalletDeviceBinding> palletDeviceBindingList);
public int batchUpdateDeviceCodeAndUnbindingTime(List<PalletDeviceBinding> palletDeviceBindingList);
/** /**
* 修改托盘绑定的设备列 * 修改托盘绑定的设备列
* *
...@@ -50,6 +55,10 @@ public interface IPalletDeviceBindingService ...@@ -50,6 +55,10 @@ public interface IPalletDeviceBindingService
*/ */
public int updatePalletDeviceBinding(PalletDeviceBinding palletDeviceBinding); public int updatePalletDeviceBinding(PalletDeviceBinding palletDeviceBinding);
public AjaxResult unbindDevice(PalletDeviceBinding palletDeviceBinding);
public AjaxResult unbindAllDevice(Long trayId);
/** /**
* 批量删除托盘绑定的设备列 * 批量删除托盘绑定的设备列
* *
......
...@@ -46,6 +46,8 @@ public interface ITTrayInfoService ...@@ -46,6 +46,8 @@ public interface ITTrayInfoService
public int updateStatusByTrayCode(TTrayInfo tTrayInfo); public int updateStatusByTrayCode(TTrayInfo tTrayInfo);
public int updateStatusByTrayId(TTrayInfo tTrayInfo);
/** /**
* 批量删除托盘信息 * 批量删除托盘信息
* *
......
...@@ -4,6 +4,8 @@ import java.util.List; ...@@ -4,6 +4,8 @@ import java.util.List;
import com.zehong.common.core.domain.AjaxResult; import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TTrayInfo;
import com.zehong.system.mapper.TTrayInfoMapper; import com.zehong.system.mapper.TTrayInfoMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.PalletDeviceBindingMapper; import com.zehong.system.mapper.PalletDeviceBindingMapper;
...@@ -51,6 +53,18 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi ...@@ -51,6 +53,18 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
return palletDeviceBindingMapper.selectPalletDeviceBindingList(palletDeviceBinding); return palletDeviceBindingMapper.selectPalletDeviceBindingList(palletDeviceBinding);
} }
/**
* 获取所有未解除绑定的托盘绑定的设备列
*
* @param trayId 托盘ID
* @return 列表
*/
@Override
public List<PalletDeviceBinding> getAllExcludeUnbindingTimeByTrayId(Long trayId) {
return palletDeviceBindingMapper.getAllExcludeUnbindingTimeByTrayId(trayId);
}
/** /**
* 新增托盘绑定的设备列 * 新增托盘绑定的设备列
* *
...@@ -98,6 +112,12 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi ...@@ -98,6 +112,12 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
palletDeviceBinding.setCreateTime(DateUtils.getNowDate()); palletDeviceBinding.setCreateTime(DateUtils.getNowDate());
palletDeviceBinding.setBindingTime(DateUtils.getNowDate()); palletDeviceBinding.setBindingTime(DateUtils.getNowDate());
}); });
TTrayInfo tTrayInfo = new TTrayInfo();
tTrayInfo.setfTrayId(palletDeviceBindingList.get(0).getTrayId());
tTrayInfo.setfStatus("4");
tTrayInfoMapper.updateStatusByTrayId(tTrayInfo);
return palletDeviceBindingMapper.batchInsertPalletDeviceBinding(palletDeviceBindingList); return palletDeviceBindingMapper.batchInsertPalletDeviceBinding(palletDeviceBindingList);
} }
...@@ -107,9 +127,24 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi ...@@ -107,9 +127,24 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
palletDeviceBinding.setStatus("1"); palletDeviceBinding.setStatus("1");
palletDeviceBinding.setUpdateTime(DateUtils.getNowDate()); palletDeviceBinding.setUpdateTime(DateUtils.getNowDate());
}); });
tTrayInfoMapper.updateToBoundWhenStateIsIdle(palletDeviceBindingList.get(0).getTrayId());
return palletDeviceBindingMapper.batchUpdateDeviceCode(palletDeviceBindingList); return palletDeviceBindingMapper.batchUpdateDeviceCode(palletDeviceBindingList);
} }
@Override
public int batchUpdateDeviceCodeAndUnbindingTime(List<PalletDeviceBinding> palletDeviceBindingList) {
palletDeviceBindingList.forEach(palletDeviceBinding -> {
palletDeviceBinding.setStatus("1");
palletDeviceBinding.setUpdateTime(DateUtils.getNowDate());
});
tTrayInfoMapper.updateToBoundWhenStateIsIdle(palletDeviceBindingList.get(0).getTrayId());
return palletDeviceBindingMapper.batchUpdateDeviceCodeAndUnbindingTime(palletDeviceBindingList);
}
/** /**
* 修改托盘绑定的设备列 * 修改托盘绑定的设备列
* *
...@@ -145,4 +180,59 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi ...@@ -145,4 +180,59 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
{ {
return palletDeviceBindingMapper.deletePalletDeviceBindingById(palletDeviceBindingId); return palletDeviceBindingMapper.deletePalletDeviceBindingById(palletDeviceBindingId);
} }
/**
* 批量解绑所有设备
*
* @param trayId 托盘ID
* @return 删除结果
*/
@Override
public AjaxResult unbindAllDevice(Long trayId) {
if(trayId == null) {
return AjaxResult.error("参数错误");
}
int i = palletDeviceBindingMapper.unbindAllDevice(trayId);
if(i <=0) {
return AjaxResult.error("无设备绑定");
}
int i1 = tTrayInfoMapper.initStatusByTrayId(trayId);
if(i1 <=0) {
return AjaxResult.error("更新托盘状态失败");
}
return AjaxResult.success();
}
/**
* 解绑设备
*
* @param palletDeviceBinding 托盘绑定的设备列ID
* @return 删除结果
*/
@Override
public AjaxResult unbindDevice(PalletDeviceBinding palletDeviceBinding) {
if(palletDeviceBinding.getPalletDeviceBindingId() == null || StringUtils.isBlank(palletDeviceBinding.getDeviceCode())) {
return AjaxResult.error("参数错误");
}
PalletDeviceBinding palletDeviceBindingDb = palletDeviceBindingMapper.selectPalletDeviceBindingById(palletDeviceBinding.getPalletDeviceBindingId());
if(palletDeviceBindingDb == null) {
return AjaxResult.error("数据不存在");
}
if(!palletDeviceBindingDb.getDeviceCode().equals(palletDeviceBinding.getDeviceCode())) {
return AjaxResult.error("设备码错误");
}
int i = palletDeviceBindingMapper.unbindDevice(palletDeviceBindingDb.getPalletDeviceBindingId());
if (i > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
}
} }
...@@ -84,6 +84,11 @@ public class TTrayInfoServiceImpl implements ITTrayInfoService ...@@ -84,6 +84,11 @@ public class TTrayInfoServiceImpl implements ITTrayInfoService
return tTrayInfoMapper.updateStatusByTrayCode(tTrayInfo); return tTrayInfoMapper.updateStatusByTrayCode(tTrayInfo);
} }
@Override
public int updateStatusByTrayId(TTrayInfo tTrayInfo) {
return tTrayInfoMapper.initStatusByTrayId(tTrayInfo.getfTrayId());
}
/** /**
* 批量删除托盘信息 * 批量删除托盘信息
* *
......
...@@ -70,6 +70,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -70,6 +70,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null "> and palDeviceBinding.f_create_time = #{createTime}</if> <if test="createTime != null "> and palDeviceBinding.f_create_time = #{createTime}</if>
<if test="status != null and status != '' "> and palDeviceBinding.f_status = #{status}</if> <if test="status != null and status != '' "> and palDeviceBinding.f_status = #{status}</if>
</where> </where>
order by palDeviceBinding.f_index asc
</select>
<select id="getAllExcludeUnbindingTimeByTrayId" parameterType="long" resultMap="PalletDeviceBindingResult">
<include refid="selectPalletDeviceBindingVo"/>
where palDeviceBinding.f_tray_id = #{trayId}
order by palDeviceBinding.f_index asc
</select> </select>
<select id="selectPalletDeviceBindingById" parameterType="Long" resultMap="PalletDeviceBindingResult"> <select id="selectPalletDeviceBindingById" parameterType="Long" resultMap="PalletDeviceBindingResult">
...@@ -108,13 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -108,13 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<insert id="batchInsertPalletDeviceBinding" parameterType="list"> <insert id="batchInsertPalletDeviceBinding" parameterType="list">
insert into t_pallet_device_binding (f_tray_id, f_device_code,f_row,f_col,f_index,f_binding_time,f_unbinding_time, insert into t_pallet_device_binding (f_tray_id, f_device_code,f_row,f_col,f_index,f_binding_time,f_binding_time,
f_create_time,f_status) f_create_time,f_status)
values values
<foreach collection="palletDeviceBindingList" item="item" index="index" separator=","> <foreach collection="palletDeviceBindingList" item="item" index="index" separator=",">
( (
#{item.trayId}, #{item.deviceCode}, #{item.row}, #{item.col}, #{item.index},#{item.bindingTime}, #{item.trayId}, #{item.deviceCode}, #{item.row}, #{item.col}, #{item.index},#{item.bindingTime},
#{item.unbindingTime},#{item.createTime},#{item.status} #{item.bindingTime},#{item.createTime},#{item.status}
) )
</foreach> </foreach>
</insert> </insert>
...@@ -161,11 +167,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -161,11 +167,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<update id="unbindDevice" parameterType="long">
update t_pallet_device_binding
set f_device_code = null,
f_unbinding_time = NOW(),
f_record_year = null,
f_record_month = null,
f_record_date = null,
f_record_hour = null,
f_record_minute = null,
f_write_time_status = null,
f_adjustment_zero_ad = null,
f_calibration_ad = null,
f_concentration = null
where f_pallet_device_binding_id = #{palletDeviceBindingId}
</update>
<update id="updatePalletDeviceBinding" parameterType="PalletDeviceBinding"> <update id="updatePalletDeviceBinding" parameterType="PalletDeviceBinding">
update t_pallet_device_binding update t_pallet_device_binding
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="trayId != null">f_tray_id = #{trayId},</if> <if test="trayId != null">f_tray_id = #{trayId},</if>
<if test="deviceCode != null">f_device_code = #{deviceCode},</if> <if test="deviceCode != null">f_device_code = #{deviceCode},</if>
<if test="deviceCode == null">f_device_code = null,</if>
<if test="row != null">f_row = #{row},</if> <if test="row != null">f_row = #{row},</if>
<if test="col != null">f_col = #{col},</if> <if test="col != null">f_col = #{col},</if>
<if test="index != null">f_index = #{index},</if> <if test="index != null">f_index = #{index},</if>
...@@ -189,12 +211,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -189,12 +211,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="batchUpdateDeviceCode" parameterType="list"> <update id="batchUpdateDeviceCode" parameterType="list">
<foreach collection="palletDeviceBindingList" item="item" index="index" separator=";"> <foreach collection="palletDeviceBindingList" item="item" index="index" separator=";">
UPDATE t_pallet_device_binding UPDATE t_pallet_device_binding
<set> <trim prefix="SET" suffixOverrides=",">
f_device_code = #{item.deviceCode} <if test="item.deviceCode != null">f_device_code = #{item.deviceCode},</if>
</set> <if test="item.deviceCode == null">f_device_code = null,</if>
</trim>
WHERE f_pallet_device_binding_id = #{item.palletDeviceBindingId} WHERE f_pallet_device_binding_id = #{item.palletDeviceBindingId}
</foreach> </foreach>
</update> </update>
<update id="batchUpdateDeviceCodeAndUnbindingTime" parameterType="list">
<foreach collection="palletDeviceBindingList" item="item" index="index" separator=";">
UPDATE t_pallet_device_binding
<trim prefix="SET" suffixOverrides=",">
f_unbinding_time = null,
f_binding_time = NOW(),
f_record_year = null,
f_record_month = null,
f_record_date = null,
f_record_hour = null,
f_record_minute = null,
f_write_time_status = null,
f_adjustment_zero_ad = null,
f_calibration_ad = null,
f_concentration = null,
<if test="item.deviceCode != null">f_device_code = #{item.deviceCode},</if>
</trim>
WHERE f_pallet_device_binding_id = #{item.palletDeviceBindingId}
</foreach>
</update>
<update id="unbindAllDevice" parameterType="long">
update t_pallet_device_binding
set f_device_code = null,
f_unbinding_time = NOW(),
f_status = '1',
f_record_year = null,
f_record_month = null,
f_record_date = null,
f_record_hour = null,
f_record_minute = null,
f_write_time_status = null,
f_adjustment_zero_ad = null,
f_calibration_ad = null,
f_concentration = null
where f_tray_id = #{trayId}
</update>
<delete id="deletePalletDeviceBindingById" parameterType="Long"> <delete id="deletePalletDeviceBindingById" parameterType="Long">
delete from t_pallet_device_binding where f_pallet_device_binding_id = #{palletDeviceBindingId} delete from t_pallet_device_binding where f_pallet_device_binding_id = #{palletDeviceBindingId}
......
...@@ -94,6 +94,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -94,6 +94,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set f_status = #{fStatus} set f_status = #{fStatus}
where f_storey_code = #{fStoreyCode} where f_storey_code = #{fStoreyCode}
</update> </update>
<update id="updateStatusByTrayId" parameterType="TTrayInfo">
update t_tray_info
set f_status = #{fStatus}
where f_tray_id = #{fTrayId}
</update>
<update id="updateToBoundWhenStateIsIdle" parameterType="long">
update t_tray_info
set f_status = '4' where f_status = '0' and f_tray_id = #{fTrayId}
</update>
<update id="clearStoreyCodeByStoreyCode" parameterType="string"> <update id="clearStoreyCodeByStoreyCode" parameterType="string">
update t_tray_info update t_tray_info
set f_storey_code = null set f_storey_code = null
......
...@@ -18,6 +18,13 @@ export function getAllBinding(query) { ...@@ -18,6 +18,13 @@ export function getAllBinding(query) {
}) })
} }
export function getAllExcludeUnbindingTimeByTrayId(trayId) {
return request({
url: '/palletDevice/binding/getAllExcludeUnbindingTimeByTrayId/' + trayId,
method: 'get'
})
}
// 查询托盘绑定的设备列详细 // 查询托盘绑定的设备列详细
export function getBinding(palletDeviceBindingId) { export function getBinding(palletDeviceBindingId) {
return request({ return request({
...@@ -44,6 +51,21 @@ export function batchAdd(data) { ...@@ -44,6 +51,21 @@ export function batchAdd(data) {
}) })
} }
export function unbindSingleDevice(data){
return request({
url: '/palletDevice/binding/unbindDevice/',
method: 'post',
data: data
})
}
export function unbindAllDevice(trayId){
return request({
url: '/palletDevice/binding/unbindAllDevice/' + trayId,
method: 'get'
})
}
// 修改托盘绑定的设备列 // 修改托盘绑定的设备列
export function updateBinding(data) { export function updateBinding(data) {
return request({ return request({
...@@ -62,6 +84,14 @@ export function batchUpdateDeviceCode(data) { ...@@ -62,6 +84,14 @@ export function batchUpdateDeviceCode(data) {
}) })
} }
export function batchUpdateDeviceCodeAndUnbindingTime(data) {
return request({
url: '/palletDevice/binding/batchUpdateDeviceCodeAndUnbindingTime',
method: 'post',
data: data
})
}
// 删除托盘绑定的设备列 // 删除托盘绑定的设备列
export function delBinding(palletDeviceBindingId) { export function delBinding(palletDeviceBindingId) {
return request({ return request({
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<el-tag :type="statusTagType(scope.row.fStatus)" v-if="scope.row.fStatus === '1'" class="status-tag">运行中</el-tag> <el-tag :type="statusTagType(scope.row.fStatus)" v-if="scope.row.fStatus === '1'" class="status-tag">运行中</el-tag>
<el-tag :type="statusTagType(scope.row.fStatus)" v-else-if="scope.row.fStatus === '2'" class="status-tag">老化完成</el-tag> <el-tag :type="statusTagType(scope.row.fStatus)" v-else-if="scope.row.fStatus === '2'" class="status-tag">老化完成</el-tag>
<el-tag :type="statusTagType(scope.row.fStatus)" v-else-if="scope.row.fStatus === '3'" class="status-tag">标定完成</el-tag> <el-tag :type="statusTagType(scope.row.fStatus)" v-else-if="scope.row.fStatus === '3'" class="status-tag">标定完成</el-tag>
<el-tag :type="statusTagType(scope.row.fStatus)" v-else-if="scope.row.fStatus === '4'" class="status-tag">已绑定</el-tag>
<el-tag :type="statusTagType(scope.row.fStatus)" v-else class="status-tag">空闲</el-tag> <el-tag :type="statusTagType(scope.row.fStatus)" v-else class="status-tag">空闲</el-tag>
</template> </template>
</el-table-column> </el-table-column>
...@@ -180,6 +181,7 @@ export default { ...@@ -180,6 +181,7 @@ export default {
'2': 'warning', '2': 'warning',
'3': 'warning', '3': 'warning',
'1': 'primary', '1': 'primary',
'4': 'info',
}; };
return statusMap[status] || 'info'; return statusMap[status] || 'info';
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment