Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agcs2.0-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
liang
agcs2.0-web
Commits
640f40c9
Commit
640f40c9
authored
Jun 06, 2023
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加医联体授权全部按钮,取消懒加载
parent
52c048f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
14 deletions
+51
-14
Form.vue
src/components/DialogComponents/Form.vue
+16
-1
index.vue
src/views/systems/user/index.vue
+35
-13
No files found.
src/components/DialogComponents/Form.vue
View file @
640f40c9
...
@@ -162,7 +162,22 @@
...
@@ -162,7 +162,22 @@
v-el-select-loadmore=
"loadmore"
v-el-select-loadmore=
"loadmore"
@
change=
"item.func ? item.func($event) : {}"
@
change=
"item.func ? item.func($event) : {}"
>
>
<!--禁用all的条件: value有值,并且值不是all-->
<el-option
<el-option
:key=
"'all'"
label=
"全部"
value=
"all"
:disabled=
"
form[item.prop]
? form[item.prop].length > 0 &&
form[item.prop].indexOf('all') < 0
: false
"
></el-option>
<!--禁用非all条件: form[item.prop]为all-->
<el-option
:disabled=
"form[item.prop] == 'all'"
v-for=
"(opt, optIndex) in item.opts"
v-for=
"(opt, optIndex) in item.opts"
:key=
"optIndex"
:key=
"optIndex"
:label=
"opt.label"
:label=
"opt.label"
...
@@ -368,7 +383,7 @@ export default {
...
@@ -368,7 +383,7 @@ export default {
},
},
methods
:
{
methods
:
{
loadmore
()
{
loadmore
()
{
this
.
$emit
(
"
loadMore
"
,
this
.
current
+
1
)
//
this.$emit("loadMore", this.current + 1)
},
},
open
()
{
open
()
{
this
.
visible
=
true
this
.
visible
=
true
...
...
src/views/systems/user/index.vue
View file @
640f40c9
...
@@ -439,6 +439,7 @@ export default {
...
@@ -439,6 +439,7 @@ export default {
rules
:
[
rules
:
[
{
required
:
true
,
message
:
"
请选择医联体
"
,
trigger
:
"
change
"
},
{
required
:
true
,
message
:
"
请选择医联体
"
,
trigger
:
"
change
"
},
],
],
func
:
this
.
valueChange
,
multiple
:
true
,
multiple
:
true
,
},
},
],
],
...
@@ -459,6 +460,13 @@ export default {
...
@@ -459,6 +460,13 @@ export default {
this
.
loadMore
()
this
.
loadMore
()
},
},
methods
:
{
methods
:
{
valueChange
(
val
)
{
console
.
log
(
val
)
if
(
val
.
includes
(
"
all
"
))
{
// this.unionIds = this.consortiaList.map((e) => e.id)
console
.
log
(
this
.
consortiaDataRole
[
0
].
opts
)
}
},
// 修改启用状态
// 修改启用状态
// 启用状态
// 启用状态
openChage
(
data
,
index
)
{
openChage
(
data
,
index
)
{
...
@@ -478,7 +486,7 @@ export default {
...
@@ -478,7 +486,7 @@ export default {
let
params
=
{
let
params
=
{
current
:
current
,
current
:
current
,
unionName
:
this
.
searchQuery
?
this
.
searchQuery
:
undefined
,
unionName
:
this
.
searchQuery
?
this
.
searchQuery
:
undefined
,
size
:
2
0
,
size
:
1000
0
,
}
}
medicalunionList
(
params
).
then
((
res
)
=>
{
medicalunionList
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
===
1
)
{
if
(
res
.
code
===
1
)
{
...
@@ -509,19 +517,29 @@ export default {
...
@@ -509,19 +517,29 @@ export default {
this
.
options
=
[]
this
.
options
=
[]
}
}
},
},
// 授权医联体
handleConsortiaConfirm
(
unionIds
)
{
handleConsortiaConfirm
(
unionIds
)
{
console
.
log
(
unionIds
,
this
.
rowId
)
let
unionIdList
=
unionIds
.
consortiaList
if
(
unionIds
.
consortiaList
.
includes
(
"
all
"
))
{
unionIdList
=
this
.
consortiaDataRole
[
0
].
opts
.
map
((
e
)
=>
e
.
value
)
}
const
data
=
{
const
data
=
{
userId
:
this
.
rowId
,
userId
:
this
.
rowId
,
unionIds
:
unionId
s
.
consortia
List
,
unionIds
:
unionIdList
,
}
}
baseUnion
(
data
).
then
((
res
)
=>
{
baseUnion
(
data
)
if
(
res
.
code
===
1
)
{
.
then
((
res
)
=>
{
this
.
$message
.
success
(
"
授权成功
"
)
if
(
res
.
code
===
1
)
{
this
.
handleSearch
()
this
.
$message
.
success
(
"
授权成功
"
)
this
.
$refs
.
consortiaRole
.
close
()
this
.
handleSearch
()
}
this
.
$refs
.
consortiaRole
.
close
()
})
}
else
{
this
.
$refs
.
consortiaRole
.
loading
=
false
}
})
.
catch
(()
=>
{
this
.
$refs
.
consortiaRole
.
loading
=
false
})
},
},
orgChange
(
orgId
)
{
orgChange
(
orgId
)
{
const
list
=
[]
const
list
=
[]
...
@@ -594,6 +612,7 @@ export default {
...
@@ -594,6 +612,7 @@ export default {
}
}
})
})
},
},
// 医联体授权弹窗
handleConsortia
({
id
})
{
handleConsortia
({
id
})
{
this
.
rowId
=
id
this
.
rowId
=
id
this
.
$refs
.
consortiaRole
.
open
()
this
.
$refs
.
consortiaRole
.
open
()
...
@@ -604,10 +623,13 @@ export default {
...
@@ -604,10 +623,13 @@ export default {
res
.
data
.
unionList
.
map
((
item
)
=>
{
res
.
data
.
unionList
.
map
((
item
)
=>
{
consortiaList
.
push
(
item
.
id
)
consortiaList
.
push
(
item
.
id
)
})
})
if
(
consortiaList
.
length
==
this
.
consortiaDataRole
[
0
].
opts
.
length
)
{
this
.
consortiaList
=
[...
consortiaList
]
this
.
consortiaList
=
[
"
all
"
]
}
else
{
this
.
consortiaList
=
consortiaList
}
this
.
$refs
.
consortiaRole
.
initFields
({
this
.
$refs
.
consortiaRole
.
initFields
({
consortiaList
:
consortiaList
,
consortiaList
:
this
.
consortiaList
,
})
})
}
}
})
})
...
...
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