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
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 @@
...
@@ -20,11 +20,31 @@
label=
"单位全称:"
label=
"单位全称:"
prop=
"hospitalName"
prop=
"hospitalName"
>
>
<el-input
<
!--
<
el-input
placeholder=
"请输入单位全称"
placeholder=
"请输入单位全称"
v-model=
"dataForm.hospitalName"
v-model=
"dataForm.hospitalName"
@
blur=
"blurHandle"
@
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-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -170,7 +190,10 @@ export default {
...
@@ -170,7 +190,10 @@ export default {
return
{
return
{
dialogVisible
:
true
,
dialogVisible
:
true
,
loading
:
false
,
loading
:
false
,
hospitalList
:
[],
selectLoading
:
false
,
areaList
:
[],
areaList
:
[],
hospitalList
:
[],
dataForm
:
{
dataForm
:
{
hospitalStep
:
''
,
hospitalStep
:
''
,
area
:
''
,
area
:
''
,
...
@@ -232,18 +255,23 @@ export default {
...
@@ -232,18 +255,23 @@ export default {
}
}
})
})
},
},
blurHandle
()
{
remoteMethod
(
query
)
{
if
(
!
this
.
dataForm
.
hospitalName
)
{
if
(
!
query
)
{
this
.
hospitalList
=
[]
return
return
}
}
queryHospitalByName
(
this
.
dataForm
.
hospitalName
).
then
(
res
=>
{
this
.
selectLoading
=
true
;
if
(
res
.
respData
)
{
queryHospitalByName
(
query
).
then
(
res
=>
{
this
.
dataForm
.
hospitalStep
=
res
.
respData
.
hospitalStep
this
.
hospitalList
=
res
.
respData
this
.
dataForm
.
area
=
res
.
respData
.
area
this
.
selectLoading
=
false
;
// this.dataForm.unitType = res.respData.unitType
}
})
})
},
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) => {
...
@@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => {
staticRouteLength
+=
item
.
children
.
length
staticRouteLength
+=
item
.
children
.
length
}
}
})
})
if
(
routers
.
length
===
staticRouteLength
)
{
if
(
routers
.
length
===
staticRouteLength
&&
menu
)
{
router
.
addRoutes
(
routeHandle
(
menu
))
router
.
addRoutes
(
routeHandle
(
menu
))
next
({
next
({
...
to
,
...
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