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
e52fc160
Commit
e52fc160
authored
Dec 03, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 托盘解绑调整
parent
be4cf4ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
32 deletions
+11
-32
TrayBinding.vue
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
+11
-32
No files found.
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
View file @
e52fc160
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
:class=
"
{
:class=
"
{
'active': activeCell === index,
'active': activeCell === index,
'empty': !device.deviceCode,
'empty': !device.deviceCode,
'error': isDeviceError(device),
// 使用新的判断方法
'error': isDeviceError(device),
'duplicate': device.isDuplicate
'duplicate': device.isDuplicate
}"
}"
@click="setActiveCell(index)"
@click="setActiveCell(index)"
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<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=
"
isDeviceError(device)
"
class=
"error-icon fas fa-exclamation-circle"
></i>
<!-- 添加重复状态图标 -->
<!-- 添加重复状态图标 -->
<i
v-if=
"device.isDuplicate"
class=
"duplicate-icon fas fa-exclamation-triangle"
></i>
<i
v-if=
"device.isDuplicate"
class=
"duplicate-icon fas fa-exclamation-triangle"
></i>
</div>
</div>
...
@@ -186,7 +186,6 @@ export default {
...
@@ -186,7 +186,6 @@ export default {
const
col
=
(
i
%
9
)
+
1
;
// 1-9列
const
col
=
(
i
%
9
)
+
1
;
// 1-9列
let
number
;
let
number
;
// 计算属于第几段(0,1,2)
// 计算属于第几段(0,1,2)
const
segment
=
Math
.
floor
((
row
-
1
)
/
3
);
// 0:1-3行, 1:4-6行, 2:7-8行
const
segment
=
Math
.
floor
((
row
-
1
)
/
3
);
// 0:1-3行, 1:4-6行, 2:7-8行
...
@@ -291,6 +290,7 @@ export default {
...
@@ -291,6 +290,7 @@ export default {
return
device
.
status
===
'0'
||
device
.
status
===
'5'
;
return
device
.
status
===
'0'
||
device
.
status
===
'5'
;
}
}
},
},
getAllBindingData
(
trayId
)
{
getAllBindingData
(
trayId
)
{
this
.
devices
=
[];
this
.
devices
=
[];
getAllExcludeUnbindingTimeByTrayId
(
trayId
).
then
(
res
=>
{
getAllExcludeUnbindingTimeByTrayId
(
trayId
).
then
(
res
=>
{
...
@@ -302,13 +302,7 @@ export default {
...
@@ -302,13 +302,7 @@ export default {
// 计算初始异常设备数量(标定完成状态)
// 计算初始异常设备数量(标定完成状态)
if
(
this
.
trayStatus
===
'3'
)
{
if
(
this
.
trayStatus
===
'3'
)
{
this
.
abnormalCount
=
this
.
devices
.
filter
(
this
.
abnormalCount
=
this
.
devices
.
filter
(
d
=>
this
.
isDeviceError
(
d
)).
length
;
d
=>
d
.
deviceCode
&&
(
d
.
status
!==
'1'
||
d
.
realTimeStatus
===
'0'
||
d
.
calibrationConcentrationStatus
!==
'4'
||
d
.
writeTimeStatus
===
'0'
||
d
.
runTimeStatus
===
'0'
)
).
length
;
this
.
initialAbnormalCount
=
this
.
abnormalCount
;
this
.
initialAbnormalCount
=
this
.
abnormalCount
;
}
}
...
@@ -403,8 +397,8 @@ export default {
...
@@ -403,8 +397,8 @@ export default {
);
);
if
(
deviceIndex
!==
-
1
)
{
if
(
deviceIndex
!==
-
1
)
{
// 找到设备,
确认解绑
// 找到设备,
直接解绑(不弹确认对话框)
this
.
confirm
Unbind
(
deviceIndex
);
this
.
execute
Unbind
(
deviceIndex
);
}
else
{
}
else
{
// 设备不存在提示
// 设备不存在提示
this
.
$message
.
warning
(
`设备
${
this
.
deviceInput
}
不存在或未绑定`
);
this
.
$message
.
warning
(
`设备
${
this
.
deviceInput
}
不存在或未绑定`
);
...
@@ -497,23 +491,7 @@ export default {
...
@@ -497,23 +491,7 @@ 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
)
{
executeUnbind
(
deviceIndex
)
{
const
device
=
this
.
devices
[
deviceIndex
];
const
device
=
this
.
devices
[
deviceIndex
];
...
@@ -525,6 +503,8 @@ export default {
...
@@ -525,6 +503,8 @@ export default {
unbindSingleDevice
(
palletDeviceBinding
).
then
(
res
=>
{
unbindSingleDevice
(
palletDeviceBinding
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
// 解绑成功后的处理
// 解绑成功后的处理
const
wasErrorDevice
=
this
.
isDeviceError
(
this
.
devices
[
deviceIndex
]);
this
.
devices
[
deviceIndex
].
deviceCode
=
''
;
this
.
devices
[
deviceIndex
].
deviceCode
=
''
;
// 清除重复标记
// 清除重复标记
...
@@ -533,8 +513,8 @@ export default {
...
@@ -533,8 +513,8 @@ export default {
// 重新检查重复状态
// 重新检查重复状态
this
.
checkDuplicateDevices
();
this
.
checkDuplicateDevices
();
// 如果是异常设备,减少异常计数
// 如果是异常设备,减少异常计数
(使用完整的异常判断逻辑)
if
(
this
.
devices
[
deviceIndex
].
status
===
'0'
||
this
.
devices
[
deviceIndex
].
status
===
'5'
)
{
if
(
wasErrorDevice
)
{
this
.
abnormalCount
--
;
this
.
abnormalCount
--
;
}
}
...
@@ -653,7 +633,6 @@ export default {
...
@@ -653,7 +633,6 @@ export default {
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
/* 添加托盘信息容器样式 */
/* 添加托盘信息容器样式 */
.tray-info
{
.tray-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