Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 272bd506
authored
Oct 29, 2026
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
指定数据穿梭框增加有效时间/剩余天数
1 parent
b162fdcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
21 deletions
src/views/user/index.vue
src/views/user/select.vue
src/views/user/index.vue
View file @
272bd50
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<glsx-dialog
:show=
"showDialog"
<glsx-dialog
:show=
"showDialog"
title=
"指定数据"
title=
"指定数据"
@
close=
"closeDialog()"
@
close=
"closeDialog()"
width=
"
90
0px"
>
width=
"
108
0px"
>
<div>
<div>
<assign-info
ref=
"assignInfo"
<assign-info
ref=
"assignInfo"
v-if=
"showDialog"
v-if=
"showDialog"
...
@@ -873,6 +873,10 @@ export default {
...
@@ -873,6 +873,10 @@ export default {
.el-tree-node
>
.el-tree-node__children
{
.el-tree-node
>
.el-tree-node__children
{
overflow
:
initial
!important
;
overflow
:
initial
!important
;
}
}
/* 指定数据弹窗:内容高度恒定(卡片内列表自行滚动),取消公共组件 600px 上限带来的整体滚动条,仅作用于本页 glsx-dialog */
.system-container
.glsx_dialog
.dialog_content
{
max-height
:
82vh
;
}
</
style
>
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.auth_link
{
.auth_link
{
...
...
src/views/user/select.vue
View file @
272bd50
...
@@ -61,7 +61,10 @@
...
@@ -61,7 +61,10 @@
<el-scrollbar
ref=
"scrollbar"
class=
"el_scroll"
v-loading=
"rightLoading"
>
<el-scrollbar
ref=
"scrollbar"
class=
"el_scroll"
v-loading=
"rightLoading"
>
<el-checkbox-group
class=
"el_checkbox_group"
v-model=
"rightCheckList"
>
<el-checkbox-group
class=
"el_checkbox_group"
v-model=
"rightCheckList"
>
<el-checkbox
v-for=
"(item,index) in showCheckList"
:key=
"index"
:label=
"item.id"
>
<el-checkbox
v-for=
"(item,index) in showCheckList"
:key=
"index"
:label=
"item.id"
>
<span
class=
"checkbox_label"
:title=
"`$
{item.label}/${item.label1}`">
{{
showLabels
(
item
)
}}
</span>
<span
class=
"checkbox_label"
:title=
"showLabels(item)"
>
<span
class=
"cb_main"
>
{{
item
.
label
||
'--'
}}
/
{{
item
.
label1
||
'--'
}}
</span>
<span
class=
"cb_sub"
>
{{
formatValidCore
(
item
)
}}
</span>
</span>
</el-checkbox>
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
</el-scrollbar>
</el-scrollbar>
...
@@ -338,20 +341,36 @@ export default {
...
@@ -338,20 +341,36 @@ export default {
};
};
},
},
// 展示数据
// 展示数据
(用于 title 完整串,按规范 3.5.3 拼接)
showLabels
(
row
)
{
showLabels
(
row
)
{
if
(
!
row
)
{
if
(
!
row
)
{
return
""
;
return
""
;
}
}
let
str
=
""
;
let
vin
=
row
.
label
||
"--"
;
let
vin
=
row
.
label
||
'--'
;
let
_label
=
row
.
label1
||
"--"
;
let
_name
=
row
.
label1
||
'--'
;
return
vin
+
"/"
+
_label
+
"/"
+
this
.
formatValidCore
(
row
);
let
_label
=
_name
||
'--'
;
},
// if (_name && _name.length >= 10) {
// _label = _name.split(0, 5) + "...";
// 有效时间/剩余天数 核心文案(3.5.3 + 后端契约)
// }
// 后端 GET_USER_ASSIGN_INFO(/trialdrive/vehicle/permit/assigndetails)每条记录返回:
str
=
vin
+
"/"
+
_label
;
// - permitDays:授权天数,0 表示长期
return
str
;
// - remainingDays:剩余天数,长期授权时为空
formatValidCore
(
row
)
{
if
(
!
row
)
return
""
;
const
pd
=
row
.
permitDays
;
const
rd
=
row
.
remainingDays
;
// 无授权天数(手动勾选尚未导入配置 / 历史数据无字段)→ 默认「长期」,不显示 --
if
(
pd
==
null
||
pd
===
""
||
isNaN
(
Number
(
pd
)))
{
return
"有效时间:长期--剩余:长期"
;
}
const
numPd
=
Number
(
pd
);
// 长期:permitDays 为 0(remainingDays 为空,不参与剩余扣减)
if
(
numPd
===
0
)
{
return
"有效时间:长期--剩余:长期"
;
}
// 数字型(1-999 天),剩余天数缺失时默认等于授权天数(避免 --)
const
numRd
=
(
rd
==
null
||
rd
===
""
||
isNaN
(
Number
(
rd
)))
?
numPd
:
Number
(
rd
);
return
`有效时间:
${
numPd
}
天--剩余:
${
numRd
}
天`
;
},
},
// 保存数据
// 保存数据
...
@@ -545,21 +564,22 @@ export default {
...
@@ -545,21 +564,22 @@ export default {
}
}
.device_box
{
.device_box
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
stretch
;
gap
:
12px
;
.middle_box
{
.middle_box
{
padding
:
0
10px
;
flex-shrink
:
0
;
width
:
56px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
.btn
{
.btn
{
margin
:
10
px
0
;
margin
:
8
px
0
;
}
}
}
}
.card_box
{
.card_box
{
//
flex
:
1
;
flex
:
1
1
0
;
width
:
380px
;
min-width
:
0
;
flex-shrink
:
0
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.head
{
.head
{
height
:
54px
;
height
:
54px
;
...
@@ -592,9 +612,8 @@ export default {
...
@@ -592,9 +612,8 @@ export default {
border-top
:
1px
solid
#eee
;
border-top
:
1px
solid
#eee
;
.el_scroll
{
.el_scroll
{
padding
:
10px
0
;
padding
:
10px
0
;
height
:
3
4
0px
;
height
:
3
8
0px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
overflow-y
:
auto
;
}
}
}
}
}
}
...
@@ -607,7 +626,43 @@ export default {
...
@@ -607,7 +626,43 @@ export default {
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
.el-checkbox
{
.el-checkbox
{
margin
:
4px
0
;
margin
:
0
;
padding
:
10px
0
12px
;
border-bottom
:
1px
solid
#ebeef5
;
&:last-child
{
border-bottom
:
none
;
padding-bottom
:
4px
;
}
display
:
flex
;
align-items
:
flex-start
;
height
:
auto
;
white-space
:
normal
;
::v-deep
.el-checkbox__label
{
white-space
:
normal
;
line-height
:
1.5
;
vertical-align
:
top
;
padding-left
:
6px
;
}
::v-deep
.el-checkbox__input
{
vertical-align
:
top
;
line-height
:
1.5
;
}
}
}
.checkbox_label
{
display
:
inline-flex
;
flex-direction
:
column
;
line-height
:
1.5
;
white-space
:
normal
;
word-break
:
break-word
;
.cb_main
{
font-weight
:
500
;
color
:
#303133
;
}
.cb_sub
{
margin-top
:
1px
;
font-size
:
12px
;
color
:
#929294
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment