Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
md-vue-chc
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
何鹏程
md-vue-chc
Commits
42a05070
You need to sign in or sign up before continuing.
Commit
42a05070
authored
Nov 09, 2022
by
何鹏程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
bd8c8f4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
12 deletions
+40
-12
index.vue
src/page/info/index.vue
+39
-11
index.js
src/router/index.js
+1
-1
No files found.
src/page/info/index.vue
View file @
42a05070
...
...
@@ -20,11 +20,31 @@
label=
"单位全称:"
prop=
"hospitalName"
>
<el-input
<
!--
<
el-input
placeholder=
"请输入单位全称"
v-model=
"dataForm.hospitalName"
@
blur=
"blurHandle"
/>
/>
-->
<el-select
v-model=
"dataForm.hospitalName"
placeholder=
"请选择单位全称"
style=
"width: 100%"
filterable
allow-create
default-first-option
remote
:loading=
"selectLoading"
:remote-method=
"remoteMethod"
@
change=
"changeHandle"
:clearable=
"true"
>
<el-option
v-for=
"item in hospitalList"
:label=
"item.hospitalName"
:key=
"item.id"
:value=
"item.hospitalName"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -170,7 +190,10 @@ export default {
return
{
dialogVisible
:
true
,
loading
:
false
,
hospitalList
:
[],
selectLoading
:
false
,
areaList
:
[],
hospitalList
:
[],
dataForm
:
{
hospitalStep
:
''
,
area
:
''
,
...
...
@@ -232,18 +255,23 @@ export default {
}
})
},
blurHandle
()
{
if
(
!
this
.
dataForm
.
hospitalName
)
{
remoteMethod
(
query
)
{
if
(
!
query
)
{
this
.
hospitalList
=
[]
return
}
queryHospitalByName
(
this
.
dataForm
.
hospitalName
).
then
(
res
=>
{
if
(
res
.
respData
)
{
this
.
dataForm
.
hospitalStep
=
res
.
respData
.
hospitalStep
this
.
dataForm
.
area
=
res
.
respData
.
area
// this.dataForm.unitType = res.respData.unitType
}
this
.
selectLoading
=
true
;
queryHospitalByName
(
query
).
then
(
res
=>
{
this
.
hospitalList
=
res
.
respData
this
.
selectLoading
=
false
;
})
},
changeHandle
(
val
)
{
const
item
=
this
.
hospitalList
.
find
(
i
=>
i
.
hospitalName
==
val
)
console
.
log
(
item
)
this
.
dataForm
.
hospitalStep
=
item
?
item
.
hospitalStep
:
''
this
.
dataForm
.
area
=
item
?
item
.
area
:
''
this
.
dataForm
.
unitType
=
item
?
item
.
unitType
:
''
}
}
}
...
...
src/router/index.js
View file @
42a05070
...
...
@@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => {
staticRouteLength
+=
item
.
children
.
length
}
})
if
(
routers
.
length
===
staticRouteLength
)
{
if
(
routers
.
length
===
staticRouteLength
&&
menu
)
{
router
.
addRoutes
(
routeHandle
(
menu
))
next
({
...
to
,
...
...
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