Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhmes-agecal
Commits
0158886c
Commit
0158886c
authored
Nov 03, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 托盘和板子绑定 和 解绑处理,涉及到的 老化数据清理。
parent
949911b8
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
422 additions
and
129 deletions
+422
-129
PalletDeviceBindingController.java
...b/controller/equipment/PalletDeviceBindingController.java
+35
-0
PalletDeviceBindingMapper.java
...a/com/zehong/system/mapper/PalletDeviceBindingMapper.java
+8
-0
TTrayInfoMapper.java
...c/main/java/com/zehong/system/mapper/TTrayInfoMapper.java
+4
-0
IPalletDeviceBindingService.java
...om/zehong/system/service/IPalletDeviceBindingService.java
+9
-0
ITTrayInfoService.java
...ain/java/com/zehong/system/service/ITTrayInfoService.java
+2
-0
PalletDeviceBindingServiceImpl.java
...g/system/service/impl/PalletDeviceBindingServiceImpl.java
+90
-0
TTrayInfoServiceImpl.java
.../com/zehong/system/service/impl/TTrayInfoServiceImpl.java
+5
-0
PalletDeviceBindingMapper.xml
...ain/resources/mapper/system/PalletDeviceBindingMapper.xml
+64
-5
TTrayInfoMapper.xml
...stem/src/main/resources/mapper/system/TTrayInfoMapper.xml
+9
-0
binding.js
zhmes-agecal-web/src/api/palletDeviceBinding/binding.js
+30
-0
TrayBinding.vue
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
+164
-124
TrayInformation.vue
...gecal-web/src/views/screen/components/TrayInformation.vue
+2
-0
No files found.
zhmes-agecal-admin/src/main/java/com/zehong/web/controller/equipment/PalletDeviceBindingController.java
View file @
0158886c
...
@@ -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
);
}
/**
/**
* 删除托盘绑定的设备列
* 删除托盘绑定的设备列
*/
*/
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/PalletDeviceBindingMapper.java
View file @
0158886c
...
@@ -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
);
/**
/**
* 删除托盘绑定的设备列
* 删除托盘绑定的设备列
*
*
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/TTrayInfoMapper.java
View file @
0158886c
...
@@ -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
);
/**
/**
* 删除托盘信息
* 删除托盘信息
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/IPalletDeviceBindingService.java
View file @
0158886c
...
@@ -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
);
/**
/**
* 批量删除托盘绑定的设备列
* 批量删除托盘绑定的设备列
*
*
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/ITTrayInfoService.java
View file @
0158886c
...
@@ -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
);
/**
/**
* 批量删除托盘信息
* 批量删除托盘信息
*
*
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/PalletDeviceBindingServiceImpl.java
View file @
0158886c
...
@@ -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
();
}
}
}
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/TTrayInfoServiceImpl.java
View file @
0158886c
...
@@ -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
());
}
/**
/**
* 批量删除托盘信息
* 批量删除托盘信息
*
*
...
...
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceBindingMapper.xml
View file @
0158886c
...
@@ -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_
un
binding_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.
un
bindingTime},#{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}
</foreach>
</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}
WHERE f_pallet_device_binding_id = #{item.palletDeviceBindingId}
</foreach>
</foreach>
</update>
</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}
...
...
zhmes-agecal-system/src/main/resources/mapper/system/TTrayInfoMapper.xml
View file @
0158886c
...
@@ -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
...
...
zhmes-agecal-web/src/api/palletDeviceBinding/binding.js
View file @
0158886c
...
@@ -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
({
...
...
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
View file @
0158886c
...
@@ -30,93 +30,98 @@
...
@@ -30,93 +30,98 @@
style=
"align-items: center;"
style=
"align-items: center;"
v-if=
"trayStatus !== '1'"
v-if=
"trayStatus !== '1'"
>
>
<input
<input
type=
"text"
type=
"text"
class=
"scan-input"
class=
"scan-input"
:placeholder=
"scanPlaceholder"
:placeholder=
"scanPlaceholder"
v-model=
"deviceInput"
v-model=
"deviceInput"
@
keyup
.
enter=
"addDevice"
@
keyup
.
enter=
"addDevice"
ref=
"deviceInput"
ref=
"deviceInput"
:disabled=
"trayStatus === '1'"
:disabled=
"trayStatus === '1'"
>
>
<div
class=
"status-bar"
>
<div
class=
"status-bar"
>
<i
class=
"fas fa-info-circle"
></i>
<i
class=
"fas fa-info-circle"
></i>
<span
v-if=
"trayStatus === '0'"
>
已绑定设备:
<span
class=
"filled-count"
>
{{
filledCount
}}
</span>
/72
</span>
<span
v-if=
"trayStatus === '0'"
>
已绑定设备:
<span
class=
"filled-count"
>
{{
filledCount
}}
</span>
/72
</span>
<span
v-if=
"trayStatus === '3'"
>
待处理异常设备:
<span
class=
"filled-count"
>
{{
abnormalCount
}}
</span>
/
{{
initialAbnormalCount
}}
</span>
<span
v-if=
"trayStatus === '3'"
>
待处理异常设备:
<span
class=
"filled-count"
>
{{
abnormalCount
}}
</span>
/
{{
initialAbnormalCount
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 设备矩阵区域 -->
<!-- 设备矩阵区域 -->
<div
class=
"devices-grid-container"
>
<div
class=
"devices-grid-container"
>
<div
class=
"devices-grid"
>
<div
class=
"devices-grid"
>
<div
<div
v-for=
"(device, index) in devices"
v-for=
"(device, index) in devices"
:key=
"index"
:key=
"index"
class=
"device-cell"
class=
"device-cell"
:class=
"
{
:class=
"
{
'active': activeCell === index,
'active': activeCell === index,
'empty': !device.deviceCode,
'empty': !device.deviceCode,
'error': device.deviceCode
&&
(device.status === '0' || device.status === '5')
'error': device.deviceCode
&&
(device.status === '0' || device.status === '5')
}"
}"
@click="setActiveCell(index)"
@click="setActiveCell(index)"
>
>
<div
class=
"device-id"
>
<div
class=
"device-id"
>
{{
device
.
deviceCode
||
'+'
}}
{{
device
.
deviceCode
||
'+'
}}
<!-- 添加错误状态图标 -->
<!-- 添加错误状态图标 -->
<i
v-if=
"device.deviceCode && device.status === '0'"
class=
"error-icon fas fa-exclamation-circle"
></i>
<i
v-if=
"device.deviceCode && device.status === '0'"
class=
"error-icon fas fa-exclamation-circle"
></i>
</div>
</div>
<div
class=
"position-indicator"
>
<div
class=
"position-indicator"
>
{{
getPositionLabel
(
index
)
}}
{{
getPositionLabel
(
index
)
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 操作按钮区域 -->
<!-- 操作按钮区域 -->
<div
class=
"binding-controls"
>
<div
class=
"binding-controls"
>
<button
<button
class=
"reset-btn"
v-if=
"trayStatus === '0'"
@
click=
"resetAll"
class=
"reset-btn"
>
@
click=
"resetAll"
<i
class=
"fas fa-redo"
></i>
重置所有
>
</button>
<i
class=
"fas fa-redo"
></i>
重置所有
<button
</button>
class=
"bind-btn"
<button
@
click=
"bindTray"
v-if=
"trayStatus === '0' || trayStatus === '4'"
:disabled=
"bindButtonDisabled"
class=
"bind-btn"
>
@
click=
"bindTray"
<i
class=
"fas fa-paper-plane"
></i>
:disabled=
"bindButtonDisabled"
{{
trayStatus
===
'3'
?
'提交修复'
:
'提交绑定'
}}
>
</button>
<i
class=
"fas fa-paper-plane"
></i>
<!-- 一键解绑按钮 - 仅status=3时显示 -->
{{
'提交绑定'
}}
<button
</button>
v-if=
"trayStatus === '3'"
<!-- 一键解绑按钮 - 仅status=3时显示 -->
class=
"unbind-btn"
<button
@
click=
"unbindAll"
v-if=
"trayStatus === '3'"
>
class=
"unbind-btn"
<i
class=
"fas fa-unlink"
></i>
一键解绑
@
click=
"unbindAll"
</button>
>
</div>
<i
class=
"fas fa-unlink"
></i>
一键解绑
</button>
</div>
<!-- 使用说明区域 -->
<!-- 使用说明区域 -->
<div
class=
"instructions"
>
<div
class=
"instructions"
>
<h3><i
class=
"fas fa-lightbulb"
></i>
使用说明
</h3>
<h3><i
class=
"fas fa-lightbulb"
></i>
使用说明
</h3>
<ul>
<ul>
<li
v-if=
"trayStatus === '0'"
>
点击矩阵中的单元格或按顺序扫描
<span
class=
"highlight"
>
设备条码
</span>
(扫描枪自动识别)
</li>
<li
v-if=
"trayStatus === '0'"
>
点击矩阵中的单元格或按顺序扫描
<span
class=
"highlight"
>
设备条码
</span>
(扫描枪自动识别)
</li>
<li
v-if=
"trayStatus === '0'"
>
设备条码会自动填充到当前激活的单元格中
</li>
<li
v-if=
"trayStatus === '0'"
>
设备条码会自动填充到当前激活的单元格中
</li>
<li
v-if=
"trayStatus === '3'"
>
请扫描异常设备条码进行修复处理
</li>
<li
v-if=
"trayStatus === '3'"
>
请扫描设备条码进行解绑
</li>
<li
v-if=
"trayStatus === '3'"
>
每修复一个异常设备,待处理数量将减少
</li>
<li
v-if=
"trayStatus === '3'"
>
每解绑一个异常设备,待处理数量将减少
</li>
<li>
可以手动点击任何单元格进行修改或重新扫描
</li>
<li>
可以手动点击任何单元格进行修改或重新扫描
</li>
<li>
完成操作后,点击
<span
class=
"highlight"
>
{{
trayStatus
===
'3'
?
'提交修复'
:
'提交绑定'
}}
</span>
按钮
</li>
<li><i
class=
"fas fa-bolt scanner-icon"
></i>
提示:使用扫描枪时,请确保输入框获得焦点
</li>
<li><i
class=
"fas fa-bolt scanner-icon"
></i>
提示:使用扫描枪时,请确保输入框获得焦点
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getAllBinding
,
batchAdd
,
batchUpdateDeviceCode
}
from
"@/api/palletDeviceBinding/binding"
import
{
batchAdd
,
unbindSingleDevice
,
getAllExcludeUnbindingTimeByTrayId
,
unbindAllDevice
,
batchUpdateDeviceCodeAndUnbindingTime
}
from
"@/api/palletDeviceBinding/binding"
import
{
resetAll
}
from
"@/api/palletDeviceBinding/binding"
import
{
resetAll
}
from
"@/api/palletDeviceBinding/binding"
export
default
{
export
default
{
name
:
"TrayBinding"
,
name
:
"TrayBinding"
,
...
@@ -197,7 +202,7 @@ export default {
...
@@ -197,7 +202,7 @@ export default {
// 计算绑定按钮是否禁用
// 计算绑定按钮是否禁用
bindButtonDisabled
()
{
bindButtonDisabled
()
{
if
(
this
.
trayStatus
===
'0'
)
{
if
(
this
.
trayStatus
===
'0'
||
this
.
trayStatus
===
'4'
)
{
return
this
.
filledCount
===
0
||
!
this
.
fTrayCode
;
return
this
.
filledCount
===
0
||
!
this
.
fTrayCode
;
}
else
if
(
this
.
trayStatus
===
'3'
)
{
}
else
if
(
this
.
trayStatus
===
'3'
)
{
return
this
.
abnormalCount
>
0
;
return
this
.
abnormalCount
>
0
;
...
@@ -211,7 +216,8 @@ export default {
...
@@ -211,7 +216,8 @@ export default {
'0'
:
'success'
,
// 空闲 - 绿色
'0'
:
'success'
,
// 空闲 - 绿色
'1'
:
'primary'
,
// 运行中 - 黄色
'1'
:
'primary'
,
// 运行中 - 黄色
'2'
:
'danger'
,
// 老化完成 - 红色
'2'
:
'danger'
,
// 老化完成 - 红色
'3'
:
'warning'
// 标定完成
'3'
:
'warning'
,
// 标定完成
'4'
:
'info'
// 标定完成
};
};
return
map
[
this
.
trayStatus
]
||
'info'
;
return
map
[
this
.
trayStatus
]
||
'info'
;
},
},
...
@@ -222,7 +228,8 @@ export default {
...
@@ -222,7 +228,8 @@ export default {
'0'
:
'空闲'
,
'0'
:
'空闲'
,
'1'
:
'运行中'
,
'1'
:
'运行中'
,
'2'
:
'老化完成'
,
'2'
:
'老化完成'
,
'3'
:
'标定完成'
'3'
:
'标定完成'
,
'4'
:
'已绑定'
};
};
return
map
[
this
.
trayStatus
]
||
'未知状态'
;
return
map
[
this
.
trayStatus
]
||
'未知状态'
;
},
},
...
@@ -230,17 +237,14 @@ export default {
...
@@ -230,17 +237,14 @@ export default {
// 扫描输入框提示语
// 扫描输入框提示语
scanPlaceholder
()
{
scanPlaceholder
()
{
return
this
.
trayStatus
===
'3'
return
this
.
trayStatus
===
'3'
?
'
扫描异常
设备条码...'
?
'
解绑
设备条码...'
:
'扫描设备条码...'
;
:
'扫描设备条码...'
;
}
}
},
},
methods
:
{
methods
:
{
getAllBindingData
(
trayId
)
{
getAllBindingData
(
trayId
)
{
const
query
=
{
trayId
:
trayId
}
this
.
devices
=
[];
this
.
devices
=
[];
getAll
Binding
(
query
).
then
(
res
=>
{
getAll
ExcludeUnbindingTimeByTrayId
(
trayId
).
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
.
length
>
0
)
{
if
(
res
.
code
===
200
&&
res
.
data
.
length
>
0
)
{
this
.
devices
=
res
.
data
;
this
.
devices
=
res
.
data
;
...
@@ -308,31 +312,19 @@ export default {
...
@@ -308,31 +312,19 @@ export default {
if
(
this
.
deviceInput
)
{
if
(
this
.
deviceInput
)
{
// 标定完成状态下的特殊处理
// 标定完成状态下的特殊处理
- 改为解绑操作
if
(
this
.
trayStatus
===
'3'
)
{
if
(
this
.
trayStatus
===
'3'
)
{
// 检查扫描的设备是否
是异常设备
// 检查扫描的设备是否
存在
const
deviceIndex
=
this
.
devices
.
findIndex
(
const
deviceIndex
=
this
.
devices
.
findIndex
(
d
=>
d
.
deviceCode
===
this
.
deviceInput
&&
(
d
.
status
===
'0'
||
d
.
status
===
'5'
)
d
=>
d
.
deviceCode
===
this
.
deviceInput
);
);
if
(
deviceIndex
!==
-
1
)
{
if
(
deviceIndex
!==
-
1
)
{
// 找到异常设备,进行修复
// 找到设备,确认解绑
this
.
devices
[
deviceIndex
].
status
=
'1'
;
// 标记为已修复
this
.
confirmUnbind
(
deviceIndex
);
this
.
abnormalCount
--
;
// 减少异常设备计数
// 提示修复成功
this
.
$message
.
success
(
`设备
${
this
.
deviceInput
}
修复成功!`
);
// 自动移动到下一个单元格
// if (this.activeCell
<
71
)
{
// this.activeCell++;
// } else {
// this.activeCell = 0;
// }
this
.
activeCell
=
deviceIndex
;
}
else
{
}
else
{
//
非异常设备
提示
//
设备不存在
提示
this
.
$message
.
warning
(
`设备
${
this
.
deviceInput
}
不
是异常设备或不存在
`
);
this
.
$message
.
warning
(
`设备
${
this
.
deviceInput
}
不
存在或未绑定
`
);
}
}
}
else
{
}
else
{
// 空闲状态下的正常处理
// 空闲状态下的正常处理
...
@@ -350,13 +342,63 @@ export default {
...
@@ -350,13 +342,63 @@ export default {
}
}
},
},
// 确认解绑设备
confirmUnbind
(
deviceIndex
)
{
const
device
=
this
.
devices
[
deviceIndex
];
this
.
$confirm
(
`确认解绑设备
${
device
.
deviceCode
}
吗?`
,
'解绑确认'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
// 用户确认解绑
this
.
executeUnbind
(
deviceIndex
);
}).
catch
(()
=>
{
// 用户取消解绑
this
.
$message
.
info
(
'已取消解绑操作'
);
});
},
// 执行解绑操作
executeUnbind
(
deviceIndex
)
{
const
device
=
this
.
devices
[
deviceIndex
];
// 调用解绑方法,传递设备信息和palletDeviceBindingId
this
.
unbindDevice
(
device
.
deviceCode
,
device
.
palletDeviceBindingId
,
deviceIndex
);
},
// 解绑单个设备
unbindDevice
(
deviceCode
,
palletDeviceBindingId
,
deviceIndex
)
{
// 这里调用您的后台解绑逻辑
// 示例:假设您有一个解绑接口
let
palletDeviceBinding
=
{
deviceCode
:
deviceCode
,
palletDeviceBindingId
:
palletDeviceBindingId
}
unbindSingleDevice
(
palletDeviceBinding
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
// 解绑成功后的处理
this
.
devices
[
deviceIndex
].
deviceCode
=
''
;
// 如果是异常设备,减少异常计数
if
(
this
.
devices
[
deviceIndex
].
status
===
'0'
||
this
.
devices
[
deviceIndex
].
status
===
'5'
)
{
this
.
abnormalCount
--
;
}
this
.
$message
.
success
(
`设备
${
deviceCode
}
解绑成功`
);
}
else
{
this
.
$message
.
error
(
"解绑失败"
);
}
})
},
// 获取位置标签 (行-列)
// 获取位置标签 (行-列)
getPositionLabel
(
index
)
{
getPositionLabel
(
index
)
{
const
row
=
Math
.
floor
(
index
/
9
)
+
1
;
const
row
=
Math
.
floor
(
index
/
9
)
+
1
;
const
col
=
(
index
%
9
)
+
1
;
const
col
=
(
index
%
9
)
+
1
;
return
`
${
row
}
-
${
col
}
`
;
return
`
${
row
}
-
${
col
}
`
;
},
},
// 一键解绑所有设备
// 一键解绑所有设备
unbindAll
()
{
unbindAll
()
{
this
.
$confirm
(
'确定要解绑当前托盘下所有设备吗?'
,
'警告'
,
{
this
.
$confirm
(
'确定要解绑当前托盘下所有设备吗?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -366,25 +408,26 @@ export default {
...
@@ -366,25 +408,26 @@ export default {
// 调用解绑接口(假设后端有对应的解绑接口,若无则需根据实际逻辑调整)
// 调用解绑接口(假设后端有对应的解绑接口,若无则需根据实际逻辑调整)
// 这里复用现有resetAll接口或替换为实际解绑接口
// 这里复用现有resetAll接口或替换为实际解绑接口
this
.
$message
.
success
(
"好的,已经解绑了"
);
unbindAllDevice
(
this
.
fTrayId
).
then
(
res
=>
{
// resetAll(this.fTrayId).then(res =>
{
if
(
res
.
code
===
200
)
{
// if (res.code === 200) {
// 解绑成功后重置设备矩阵
// // 解绑成功后重置设备矩阵
this
.
devices
=
this
.
devices
.
map
(
d
=>
({
...
d
,
deviceCode
:
''
,
status
:
'1'
}));
// this.devices = this.devices.map(d => ({ ...d, deviceCode: '', status: '0' }));
this
.
abnormalCount
=
this
.
devices
.
length
;
// 重置异常计数为总设备数
// this.abnormalCount = this.devices.length; // 重置异常计数为总设备数
this
.
initialAbnormalCount
=
this
.
abnormalCount
;
// this.initialAbnormalCount = this.abnormalCount
;
this
.
deviceInput
=
''
;
// this.deviceInput = ''
;
this
.
activeCell
=
0
;
// this.activeCell = 0
;
this
.
trayStatus
=
'0'
;
//
this.$message.success("一键解绑成功");
this
.
$message
.
success
(
"一键解绑成功"
);
//
} else {
}
else
{
//
this.$message.error("解绑失败");
this
.
$message
.
error
(
"解绑失败"
);
//
}
}
//
})
})
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
// 绑定托盘
// 绑定托盘
bindTray
:
function
()
{
bindTray
:
function
()
{
if
(
this
.
trayStatus
===
'0'
)
{
if
(
this
.
trayStatus
===
'0'
||
this
.
trayStatus
===
'4'
)
{
// 空闲状态 - 绑定设备
// 空闲状态 - 绑定设备
const
palletDeviceBindingId
=
this
.
devices
[
0
].
palletDeviceBindingId
;
const
palletDeviceBindingId
=
this
.
devices
[
0
].
palletDeviceBindingId
;
if
(
this
.
filledCount
>
0
)
{
if
(
this
.
filledCount
>
0
)
{
...
@@ -397,9 +440,12 @@ export default {
...
@@ -397,9 +440,12 @@ export default {
}
}
})
})
}
else
{
}
else
{
batchUpdateDeviceCode
(
this
.
devices
).
then
(
res
=>
{
batchUpdateDeviceCode
AndUnbindingTime
(
this
.
devices
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
"绑定成功"
);
this
.
msgSuccess
(
"绑定成功"
);
if
(
this
.
trayStatus
===
'0'
)
{
this
.
trayStatus
=
'4'
;
}
}
else
{
}
else
{
this
.
msgError
(
"绑定失败"
);
this
.
msgError
(
"绑定失败"
);
}
}
...
@@ -407,17 +453,11 @@ export default {
...
@@ -407,17 +453,11 @@ export default {
}
}
}
}
}
else
if
(
this
.
trayStatus
===
'3'
)
{
}
else
if
(
this
.
trayStatus
===
'3'
)
{
// 标定完成状态 - 提交修复
// 标定完成状态 - 不再需要提交修复,改为解绑操作
batchUpdateDeviceCode
(
this
.
devices
).
then
(
res
=>
{
// 这里可以保留或移除,根据实际需求
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
"修复信息提交成功"
);
this
.
abnormalCount
=
0
;
// 重置异常计数
}
else
{
this
.
msgError
(
"提交失败"
);
}
})
}
}
},
},
// 重置所有数据
// 重置所有数据
resetAll
()
{
resetAll
()
{
this
.
$confirm
(
'确定要重置所有数据吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要重置所有数据吗?'
,
'提示'
,
{
...
...
zhmes-agecal-web/src/views/screen/components/TrayInformation.vue
View file @
0158886c
...
@@ -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'
;
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment