Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
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
刘照晖
DC-TOM
Commits
8c9cbdb6
Commit
8c9cbdb6
authored
May 26, 2025
by
Cai Wei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(*): 除尘器总览连调
parent
b631dafc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
addDustCollectorDialog.vue
src/views/dustOverview/components/addDustCollectorDialog.vue
+1
-2
roomSettingDialog.vue
src/views/dustOverview/components/roomSettingDialog.vue
+31
-26
valveSettingDialog.vue
src/views/dustOverview/components/valveSettingDialog.vue
+0
-4
No files found.
src/views/dustOverview/components/addDustCollectorDialog.vue
View file @
8c9cbdb6
...
...
@@ -273,9 +273,8 @@ const submitForm = () => {
// 发送数据到父组件处理保存逻辑
emit
(
'save'
,
submitData
);
emit
(
'update:modelValue'
,
false
);
//
emit('update:modelValue', false);
}
else
{
console
.
error
(
'Form validation failed'
);
return
false
;
}
});
...
...
src/views/dustOverview/components/roomSettingDialog.vue
View file @
8c9cbdb6
...
...
@@ -49,11 +49,11 @@
size=
"small"
border
>
<el-table-column
prop=
"compartPositionRow"
label=
"排"
width=
"180"
>
<template
#
default=
"
{ row }">
<span>
第
{{
row
.
compartPositionRow
}}
排
</span>
<el-table-column
prop=
"compartPositionRow"
label=
"排"
width=
"180"
>
<template
#
default=
"
{ row }">
<span>
第
{{
row
.
compartPositionRow
}}
排
</span>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"compartPositionColumnNum"
label=
"仓数量"
>
<
template
#
default=
"{ row }"
>
<el-input-number
...
...
@@ -72,7 +72,11 @@
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"$emit('update:modelValue', false)"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
:disabled=
"distributionDiff > 0"
>
<el-button
type=
"primary"
@
click=
"handleConfirm"
:disabled=
"distributionDiff > 0"
>
确认
</el-button>
</span>
...
...
@@ -87,15 +91,15 @@ const props = defineProps({
modelValue
:
Boolean
,
data
:
{
type
:
Object
,
default
:
()
=>
{}
}
default
:
()
=>
{}
,
}
,
});
const
emit
=
defineEmits
([
"update:modelValue"
,
"confirm"
]);
const
roomForm
=
ref
({
totalRooms
:
0
,
rows
:
0
rows
:
0
,
});
const
distributionData
=
ref
([]);
...
...
@@ -104,13 +108,13 @@ const initializeState = () => {
if
(
props
.
data
.
deviceNo
)
{
const
{
compartNum
,
compartRowNum
,
compartHealthList
}
=
props
.
data
;
roomForm
.
value
.
totalRooms
=
compartNum
||
0
;
roomForm
.
value
.
rows
=
compartRowNum
||
0
roomForm
.
value
.
rows
=
compartRowNum
||
0
;
if
(
compartHealthList
&&
compartHealthList
.
length
>
0
)
{
roomForm
.
value
.
rows
=
compartHealthList
.
length
;
distributionData
.
value
=
compartHealthList
.
map
((
row
,
index
)
=>
({
compartPositionRow
:
index
+
1
,
compartPositionColumnNum
:
row
.
length
compartPositionColumnNum
:
row
.
length
,
}));
}
else
{
roomForm
.
value
.
rows
=
0
;
...
...
@@ -119,11 +123,15 @@ const initializeState = () => {
}
};
watch
(()
=>
props
.
data
,
(
newVal
)
=>
{
if
(
newVal
)
{
initializeState
();
}
},
{
immediate
:
true
});
watch
(
()
=>
props
.
data
,
(
newVal
)
=>
{
if
(
newVal
)
{
initializeState
();
}
},
{
immediate
:
true
}
);
const
distributionDiff
=
computed
(()
=>
{
const
total
=
distributionData
.
value
.
reduce
(
...
...
@@ -135,21 +143,18 @@ const distributionDiff = computed(() => {
const
handleRowsChange
=
(
value
)
=>
{
const
total
=
roomForm
.
value
.
totalRooms
;
console
.
log
(
'total'
,
total
,
value
);
if
(
!
total
||
!
value
)
return
;
// 计算每行的基础数量(向下取整)和余数
const
baseValue
=
Math
.
floor
(
total
/
value
);
const
remainder
=
total
%
value
;
console
.
log
(
baseValue
,
remainder
)
// 生成分布数据
distributionData
.
value
=
Array
.
from
({
length
:
value
},
(
_
,
index
)
=>
{
return
{
compartPositionRow
:
index
+
1
,
compartPositionColumnNum
:
index
<
remainder
?
baseValue
+
1
:
baseValue
compartPositionRow
:
index
+
1
,
compartPositionColumnNum
:
index
<
remainder
?
baseValue
+
1
:
baseValue
,
};
});
console
.
log
};
const
handleDistributionChange
=
()
=>
{
...
...
@@ -160,10 +165,10 @@ const handleConfirm = () => {
if
(
distributionDiff
.
value
<=
0
)
{
const
{
deviceNo
,
compartNum
}
=
props
.
data
;
emit
(
"confirm"
,
{
compartNum
,
dusterNo
:
deviceNo
,
compartRowNum
:
roomForm
.
value
.
rows
,
detailList
:
distributionData
.
value
compartNum
,
dusterNo
:
deviceNo
,
compartRowNum
:
roomForm
.
value
.
rows
,
detailList
:
distributionData
.
value
,
});
// emit("update:modelValue", false);
}
...
...
@@ -216,4 +221,4 @@ const handleConfirm = () => {
:deep
(
.distribution-table
.el-table--border
.el-table__cell
)
{
border-right
:
1px
solid
#ebeef5
!
important
;
}
</
style
>
\ No newline at end of file
</
style
>
src/views/dustOverview/components/valveSettingDialog.vue
View file @
8c9cbdb6
...
...
@@ -156,7 +156,6 @@ const validateValveCount = computed(() => {
const
initializeState
=
()
=>
{
if
(
props
.
modelValue
)
{
console
.
log
(
props
.
data
);
valveForm
.
value
.
total
=
props
.
data
.
valveNum
;
getAllocation
({
customerId
:
props
.
data
.
customerId
,
...
...
@@ -177,10 +176,8 @@ const initializeState = () => {
const
getAllocation
=
(
params
)
=>
{
getValveAllocation
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
res
.
data
.
valveList
);
if
(
res
.
code
===
1
&&
res
.
data
.
valveList
.
length
>
0
)
{
statusData
.
value
=
res
.
data
.
valveList
;
console
.
log
(
statusData
.
value
);
valveForm
.
value
.
compartNo
=
statusData
.
value
[
0
].
compartNo
;
valveForm
.
value
.
valveNum
=
statusData
.
value
[
0
].
valveNum
;
valveForm
.
value
.
bagNum
=
statusData
.
value
[
0
].
bagNum
;
...
...
@@ -237,7 +234,6 @@ const handleAverageDistribute = () => {
const
handleSave
=
()
=>
{
// 验证是否超出限制
const
validation
=
validateValveCount
.
value
;
console
.
log
(
valveForm
.
value
.
valveNum
);
if
(
!
validation
.
valid
)
{
errorMessage
.
value
=
validation
.
message
;
return
;
...
...
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