Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-vue
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-vue
Commits
87bf3c94
Commit
87bf3c94
authored
Sep 25, 2023
by
裴梁博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/v1/plb' into 'new/java/master'
添加地图选择 See merge request
!1
parents
b14db3e2
c4e83e56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
5 deletions
+77
-5
src/store/modules/permission.js
+0
-1
src/views/hispotalManage/hospital/index.vue
+76
-3
vue.config.js
+1
-1
No files found.
src/store/modules/permission.js
View file @
87bf3c94
...
...
@@ -122,7 +122,6 @@ export function filterDynamicRoutes(routes) {
}
export
const
loadView
=
(
view
)
=>
{
console
.
log
(
view
,
"=======loadView"
)
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
(
resolve
)
=>
require
([
`@/views/
${
view
}
`
],
resolve
)
}
else
{
...
...
src/views/hispotalManage/hospital/index.vue
View file @
87bf3c94
...
...
@@ -2,7 +2,7 @@
* @Author: ‘巴博尔’ 2164119982@qq.com
* @Date: 2023-09-07 16:09:29
* @LastEditors: ‘巴博尔’ 2164119982@qq.com
* @LastEditTime: 2023-09-2
0 14:33:53
* @LastEditTime: 2023-09-2
5 09:37:51
* @FilePath: \peizhen-vue\src\views\hispotalManage\hospital\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -293,11 +293,20 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"地址"
prop=
"mapAddress"
>
<div
@
click=
"clickOpenCheckAddress"
>
<el-input
v-model=
"form.mapAddress"
placeholder=
"请选择地址"
readonly=
""
/>
</div>
</el-form-item>
<el-form-item
label=
"经度"
prop=
"lng"
>
<el-input
v-model=
"form.lng"
placeholder=
"请输入经度"
/>
<div
@
click=
"clickOpenCheckAddress"
>
<el-input
v-model=
"form.lng"
placeholder=
"请选择经度"
readonly=
""
/>
</div>
</el-form-item>
<el-form-item
label=
"纬度"
prop=
"lat"
>
<el-input
v-model=
"form.lat"
placeholder=
"请输入纬度"
/>
<div
@
click=
"clickOpenCheckAddress"
>
<el-input
v-model=
"form.lat"
placeholder=
"请选择纬度"
readonly=
""
/>
</div>
</el-form-item>
<el-form-item
label=
"类别"
prop=
"category"
>
<el-select
...
...
@@ -341,6 +350,24 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
title=
"选择区域"
:modal-append-to-body=
"true"
:destroy-on-close=
"true"
center
:visible
.
sync=
"openAddress"
width=
"60%"
>
<iframe
width=
"100%"
style=
"height: 60vh; width: 100%; border: none"
:src=
"map_src"
></iframe>
<span
slot=
"footer"
>
<el-button
@
click=
"openAddress = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"openAddress = false"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
...
...
@@ -412,13 +439,58 @@ export default {
cityId
:
[{
required
:
true
,
message
:
"请选择城市"
,
trigger
:
"change"
}],
name
:
[{
required
:
true
,
message
:
"请选择城市"
,
trigger
:
"blur"
}],
},
map_src
:
""
,
openAddress
:
false
,
map_data
:
{
url
:
"https://mapapi.qq.com/web/mapComponents/locationPicker/v/index.html?search=1&type=1&key=RQOBZ-K2GCA-I6NKY-CPX4H-WBQAO-4SFSQ&referer=appname"
,
address
:
""
,
lng
:
""
,
lat
:
""
,
},
};
},
created
()
{
let
that
=
this
;
window
.
addEventListener
(
"message"
,
function
(
event
)
{
// 接收位置信息,用户选择确认位置点后选点组件会触发该事件,回传用户的位置信息
var
loc
=
event
.
data
;
if
(
loc
&&
loc
.
module
==
"locationPicker"
)
{
//防止其他应用也会向该页面post信息,需判断module是否为'locationPicker'
//{
// module:'locationPicker',
// latlng: {
// lat: 39.998766,
// lng: 116.273938
// },
// poiaddress: "北京市海淀区新建宫门路19号",
// poiname: "颐和园",
// cityname: "北京市"
//}
that
.
map_data
.
address
=
loc
.
poiaddress
;
that
.
map_data
.
lat
=
loc
.
latlng
.
lat
;
that
.
map_data
.
lng
=
loc
.
latlng
.
lng
;
console
.
log
(
that
.
map_data
,
"=======that.map_data"
);
that
.
$set
(
that
.
form
,
"mapAddress"
,
loc
.
poiaddress
);
that
.
$set
(
that
.
form
,
"lng"
,
loc
.
latlng
.
lng
);
that
.
$set
(
that
.
form
,
"lat"
,
loc
.
latlng
.
lat
);
}
},
false
);
this
.
getList
();
this
.
getDeptTree
();
},
methods
:
{
clickOpenCheckAddress
(
lat
,
lng
)
{
let
mat_url
=
this
.
map_data
.
url
;
if
(
lat
&&
lng
)
{
mat_url
+=
"&coord="
+
lat
+
","
+
lng
;
}
this
.
map_src
=
mat_url
;
this
.
openAddress
=
true
;
},
/** 查询部门下拉树结构 */
getDeptTree
()
{
listDepartment
().
then
((
response
)
=>
{
...
...
@@ -470,6 +542,7 @@ export default {
updateTime
:
undefined
,
delFlag
:
undefined
,
status
:
undefined
,
mapAddress
:
undefined
,
};
this
.
resetForm
(
"form"
);
},
...
...
vue.config.js
View file @
87bf3c94
...
...
@@ -39,7 +39,7 @@ module.exports = {
target
:
`https://peizheng.shanpeikj.com/api`
,
// target: `http://192.168.0.169:8089`,
// target: `http://192.168.0.137:8089`,
// target: `http://192.168.0.1
70
:8089`,
// target: `http://192.168.0.1
25
:8089`,
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
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