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
aab0fa09
Commit
aab0fa09
authored
Jul 06, 2021
by
何鹏程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增权限 详情 图片等
parent
4b1436f0
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
371 additions
and
63 deletions
+371
-63
index.js
config/index.js
+2
-2
dist.zip
dist.zip
+0
-0
index.vue
src/components/FormItem/index.vue
+5
-0
main.js
src/main.js
+8
-3
emergencyCarDialog.vue
src/page/emergencyCar/components/emergencyCarDialog.vue
+91
-2
index.vue
src/page/emergencyCar/index.vue
+4
-0
saveDialog.vue
src/page/expert/components/saveDialog.vue
+20
-2
index.vue
src/page/expert/index.vue
+8
-1
saveDialog.vue
src/page/greenWay/components/saveDialog.vue
+21
-2
index.vue
src/page/greenWay/index.vue
+8
-1
saveDialog.vue
src/page/medical/components/saveDialog.vue
+20
-2
index.vue
src/page/medical/index.vue
+8
-1
saveDialog.vue
src/page/rescue/components/saveDialog.vue
+20
-1
index.vue
src/page/rescue/index.vue
+8
-1
siteDialog.vue
src/page/sitePage/components/siteDialog.vue
+19
-2
index.vue
src/page/sitePage/index.vue
+8
-1
index.vue
src/page/siteQuery/index.vue
+45
-41
permission.js
src/util/permission.js
+9
-0
yarn.lock
yarn.lock
+67
-1
No files found.
config/index.js
View file @
aab0fa09
...
...
@@ -6,8 +6,8 @@ module.exports = {
assetsPublicPath
:
'/'
,
proxyTable
:
{
'/api'
:
{
target
:
'http://172.16.15.117:8084/'
,
// 开发环境地址
//
target: 'http://172.16.15.100:801',
// target: 'http://172.16.15.117:8084/',
// 开发环境地址
target
:
'http://172.16.15.100:801'
,
// target: 'http://122.51.94.140/teamwork', // 测试环境
changeOrigin
:
true
,
pathRewrite
:
{
...
...
dist.zip
deleted
100644 → 0
View file @
4b1436f0
File deleted
src/components/FormItem/index.vue
View file @
aab0fa09
...
...
@@ -4,6 +4,7 @@
size=
"small"
:label-width=
"labelWidth"
v-loading=
"loading"
:disabled=
"disabled"
>
<dynamic-form
v-for=
"item in formItemList"
...
...
@@ -34,6 +35,10 @@ export default {
default
:
function
()
{
return
[]
}
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
...
...
src/main.js
View file @
aab0fa09
...
...
@@ -8,23 +8,28 @@ import ElementUI from 'element-ui';
import
Echarts
from
'echarts'
;
import
store
from
'./store'
import
axios
from
'./util/ajax'
import
checkPermission
from
'./util/permission'
import
'sysStatic/css/theme-default-new.scss'
//import '../mock/index.js'
import
'./components/install'
import
{
message
}
from
'./util/resetMessage'
;
import
{
message
}
from
'./util/resetMessage'
;
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$axios
=
axios
;
Vue
.
prototype
.
$echarts
=
Echarts
;
Vue
.
use
(
ElementUI
)
Vue
.
prototype
.
$message
=
message
;
Vue
.
prototype
.
checkPermission
=
checkPermission
/* eslint-disable no-new */
new
Vue
({
el
:
'#app'
,
router
,
axios
,
store
,
components
:
{
App
},
components
:
{
App
},
template
:
'<App/>'
})
src/page/emergencyCar/components/emergencyCarDialog.vue
View file @
aab0fa09
<
template
>
<el-dialog
title=
"武汉市医疗急救车辆信息填写
"
:title=
"title
"
:visible
.
sync=
"dialogVisible"
width=
"1200px"
@
closed=
"closedHandler"
...
...
@@ -13,8 +13,36 @@
size=
"small"
label-width=
"300px"
:rules=
"rules"
:disabled=
"formDisabled"
v-loading=
"loading"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"车辆图片"
prop=
"emergencyCarUrl"
>
<el-upload
class=
"avatar-uploader"
:action=
"uploadUrl"
:show-file-list=
"false"
accept=
"image/jpg, image/jpeg, image/png"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"dataForm.emergencyCarUrl"
:src=
"dataForm.emergencyCarUrl"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
...
...
@@ -265,6 +293,19 @@ import { getDic } from '../../../util/dict'
import
{
saveOrUpdateEmergencyCar
,
queryTeamEmergencyCarInfo
}
from
'@/api/emergencyCar'
export
default
{
name
:
'emergencyCarDialog'
,
computed
:
{
title
:
function
()
{
let
str
=
'武汉市医疗急救车辆信息'
if
(
this
.
type
===
'add'
)
{
str
+=
'填写'
}
else
if
(
this
.
type
===
'update'
)
{
str
+=
'修改'
}
else
if
(
this
.
type
===
'detail'
)
{
str
+=
'详情'
}
return
str
}
},
data
()
{
const
checkVechieUseStatus
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
3
&&
!
(
this
.
dataForm
.
otherStatus
))
{
...
...
@@ -284,6 +325,8 @@ export default {
return
{
dialogVisible
:
false
,
loading
:
false
,
uploadUrl
:
'/api/team/car/uploadEmergencyImage'
,
formDisabled
:
false
,
dataForm
:
{
vehicleUsingUnit
:
''
,
area
:
''
,
...
...
@@ -306,6 +349,9 @@ export default {
vehicleUsingUnit
:
[
{
required
:
true
,
message
:
'请输入车辆使用单位'
},
],
emergencyCarUrl
:
[
{
required
:
true
,
message
:
'请上传车辆图片'
},
],
area
:
[
{
required
:
true
,
message
:
'请选择辖区'
},
],
...
...
@@ -389,7 +435,8 @@ export default {
this
.
dialogVisible
=
true
this
.
loading
=
true
this
.
type
=
type
if
(
type
===
'update'
)
{
this
.
formDisabled
=
type
===
'detail'
if
(
type
===
'update'
||
type
===
'detail'
)
{
if
(
!
id
)
{
this
.
$message
.
error
(
'救护车id不能为空'
)
return
...
...
@@ -415,6 +462,25 @@ export default {
},
closedHandler
()
{
this
.
$refs
.
dataForm
.
resetFields
()
},
handleAvatarSuccess
(
res
,
file
)
{
if
(
res
.
msg
===
201
)
{
this
.
$set
(
this
.
dataForm
,
'emergencyCarUrl'
,
res
.
respData
)
}
else
{
this
.
$message
.
error
(
res
.
content
)
}
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/jpg'
||
file
.
type
===
'image/png'
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
console
.
log
(
file
.
type
)
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传车辆图片只能是 jpg/jpeg/png 格式!'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 2MB!'
);
}
return
isJPG
&&
isLt2M
;
}
}
}
...
...
@@ -426,5 +492,28 @@ export default {
.el-input
{
// width: 200px;
}
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409eff
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
178px
;
height
:
178px
;
line-height
:
178px
;
text-align
:
center
;
}
.avatar
{
width
:
178px
;
height
:
178px
;
display
:
block
;
}
}
</
style
>
src/page/emergencyCar/index.vue
View file @
aab0fa09
...
...
@@ -103,6 +103,10 @@
min-width=
"200px"
>
<template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"showEmergencyCarDialog('detail',scope.row.id)"
>
查看详情
</el-link>
<el-link
type=
"primary"
@
click=
"showEmergencyCarDialog('update', scope.row.id)"
...
...
src/page/expert/components/saveDialog.vue
View file @
aab0fa09
<
template
>
<el-dialog
title=
"武汉市医院急救专家资源信息填写
"
:title=
"title
"
:visible
.
sync=
"dialogVisible"
width=
"500px"
@
closed=
"closedHandler"
...
...
@@ -12,6 +12,7 @@
size=
"small"
label-width=
"150px"
:rules=
"rules"
:disabled=
"formDisabled"
v-loading=
"loading"
>
<el-form-item
...
...
@@ -81,6 +82,7 @@
<formItem
labelWidth=
"150px"
ref=
"formItem"
:disabled=
"formDisabled"
:formItemList=
"formItemList"
/>
<span
...
...
@@ -104,10 +106,25 @@
import
{
queryEmergencyHospitalList
,
queryExtendConfig
}
from
'@/api/common'
import
{
queryInfoById
,
addOrUpdateEmergencyExpert
}
from
'@/api/expert'
export
default
{
computed
:
{
title
:
function
()
{
let
str
=
'武汉市医院急救专家资源信息'
if
(
this
.
type
===
'add'
)
{
str
+=
'填写'
}
else
if
(
this
.
type
===
'update'
)
{
str
+=
'修改'
}
else
if
(
this
.
type
===
'detail'
)
{
str
+=
'详情'
}
return
str
}
},
data
()
{
return
{
dialogVisible
:
false
,
loading
:
false
,
formDisabled
:
false
,
type
:
'add'
,
dataForm
:
{
hospitalCode
:
''
,
expertName
:
''
,
...
...
@@ -147,7 +164,8 @@ export default {
this
.
dialogVisible
=
true
this
.
loading
=
true
this
.
type
=
type
if
(
type
===
'update'
)
{
this
.
formDisabled
=
type
===
'detail'
if
(
type
===
'update'
||
type
===
'detail'
)
{
if
(
!
id
)
{
this
.
$message
.
error
(
'id不能为空'
)
return
...
...
src/page/expert/index.vue
View file @
aab0fa09
...
...
@@ -46,6 +46,7 @@
type=
"primary"
size=
"small"
@
click=
"showSaveDialog()"
v-if=
"!checkPermission()"
>
新增
</el-button>
</div>
<table-mixin
...
...
@@ -92,17 +93,23 @@
min-width=
"200px"
>
<template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"showSaveDialog('detail', scope.row.id)"
>
查看详情
</el-link>
<el-link
type=
"primary"
@
click=
"showSaveDialog('update', scope.row.id)"
v-if=
"!checkPermission()"
>
修改
</el-link>
<el-link
type=
"primary"
@
click=
"delHandler(scope.row.id)"
v-if=
"checkPermission()"
>
删除
</el-link>
<el-link
type=
"primary"
v-if=
"scope.row.auditStatus === 1"
v-if=
"scope.row.auditStatus === 1
&& checkPermission()
"
@
click=
"auditHandler(scope.row.id)"
>
审核
</el-link>
</
template
>
...
...
src/page/greenWay/components/saveDialog.vue
View file @
aab0fa09
<
template
>
<el-dialog
title=
"武汉市医疗急救绿道信息填写
"
:title=
"title
"
:visible
.
sync=
"dialogVisible"
width=
"900px"
@
closed=
"closedHandler"
...
...
@@ -11,6 +11,7 @@
:model=
"dataForm"
size=
"small"
label-width=
"300px"
:disabled=
"formDisabled"
:rules=
"rules"
v-loading=
"loading"
>
...
...
@@ -121,6 +122,7 @@
<formItem
labelWidth=
"300px"
ref=
"formItem"
:disabled=
"formDisabled"
:formItemList=
"formItemList"
/>
<span
...
...
@@ -145,6 +147,20 @@ import { queryEmergencyHospitalList, queryExtendConfig } from '@/api/common'
import
{
queryInfoById
,
saveOrUpdateEmergencyGreenway
}
from
'@/api/greenWay'
import
{
getDic
}
from
'@/util/dict'
export
default
{
computed
:
{
title
:
function
()
{
let
str
=
'武汉市医疗急救绿道信息'
console
.
log
(
this
.
type
)
if
(
this
.
type
===
'add'
)
{
str
+=
'填写'
}
else
if
(
this
.
type
===
'update'
)
{
str
+=
'修改'
}
else
if
(
this
.
type
===
'detail'
)
{
str
+=
'详情'
}
return
str
}
},
data
()
{
const
checkGreenCenter
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
indexOf
(
'5'
)
>
-
1
&&
!
(
this
.
dataForm
.
other
))
{
...
...
@@ -156,6 +172,7 @@ export default {
return
{
dialogVisible
:
false
,
loading
:
false
,
formDisabled
:
false
,
dataForm
:
{
hospitalCode
:
''
,
unitType
:
''
,
...
...
@@ -170,6 +187,7 @@ export default {
areaList
:
[],
hospitalGradeList
:
[],
hospitalClassList
:
[],
type
:
'add'
,
rules
:
{
hospitalCode
:
[
{
required
:
true
,
message
:
'请选择医院'
},
...
...
@@ -218,7 +236,8 @@ export default {
this
.
dialogVisible
=
true
this
.
loading
=
true
this
.
type
=
type
if
(
type
===
'update'
)
{
this
.
formDisabled
=
type
===
'detail'
if
(
type
===
'update'
||
type
===
'detail'
)
{
if
(
!
id
)
{
this
.
$message
.
error
(
'id不能为空'
)
return
...
...
src/page/greenWay/index.vue
View file @
aab0fa09
...
...
@@ -57,6 +57,7 @@
<el-button
type=
"primary"
size=
"small"
v-if=
"!checkPermission()"
@
click=
"showSaveDialog()"
>
新增
</el-button>
</div>
...
...
@@ -103,17 +104,23 @@
min-width=
"200px"
>
<template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"showSaveDialog('detail', scope.row.id)"
>
查看详情
</el-link>
<el-link
type=
"primary"
@
click=
"showSaveDialog('update', scope.row.id)"
v-if=
"!checkPermission()"
>
修改
</el-link>
<el-link
type=
"primary"
v-if=
"checkPermission()"
@
click=
"delHandler(scope.row.id)"
>
删除
</el-link>
<el-link
type=
"primary"
v-if=
"scope.row.auditStatus === 1"
v-if=
"scope.row.auditStatus === 1
&& checkPermission()
"
@
click=
"auditHandler(scope.row.id)"
>
审核
</el-link>
</
template
>
...
...
src/page/medical/components/saveDialog.vue
View file @
aab0fa09
<
template
>
<el-dialog
title=
"武汉市医院急救药品耗材资源信息填写
"
:title=
"title
"
:visible
.
sync=
"dialogVisible"
width=
"500px"
@
closed=
"closedHandler"
...
...
@@ -12,6 +12,7 @@
size=
"small"
label-width=
"150px"
:rules=
"rules"
:disabled=
"formDisabled"
v-loading=
"loading"
>
<el-form-item
...
...
@@ -72,6 +73,7 @@
<formItem
labelWidth=
"150px"
ref=
"formItem"
:disabled=
"formDisabled"
:formItemList=
"formItemList"
/>
<span
...
...
@@ -95,10 +97,25 @@
import
{
queryEmergencyHospitalList
,
queryExtendConfig
}
from
'@/api/common'
import
{
queryInfoById
,
addOrUpdateEmergencyMedical
}
from
'@/api/medical'
export
default
{
computed
:
{
title
:
function
()
{
let
str
=
'武汉市医院急救药品耗材资源信息'
if
(
this
.
type
===
'add'
)
{
str
+=
'填写'
}
else
if
(
this
.
type
===
'update'
)
{
str
+=
'修改'
}
else
if
(
this
.
type
===
'detail'
)
{
str
+=
'详情'
}
return
str
}
},
data
()
{
return
{
dialogVisible
:
false
,
loading
:
false
,
formDisabled
:
false
,
type
:
'add'
,
dataForm
:
{
hospitalCode
:
''
,
materialType
:
''
,
...
...
@@ -144,7 +161,8 @@ export default {
this
.
dialogVisible
=
true
this
.
loading
=
true
this
.
type
=
type
if
(
type
===
'update'
)
{
this
.
formDisabled
=
type
===
'detail'
if
(
type
===
'update'
||
type
===
'detail'
)
{
if
(
!
id
)
{
this
.
$message
.
error
(
'id不能为空'
)
return
...
...
src/page/medical/index.vue
View file @
aab0fa09
...
...
@@ -56,6 +56,7 @@
type=
"primary"
size=
"small"
@
click=
"showSaveDialog()"
v-if=
"!checkPermission()"
>
新增
</el-button>
</div>
<table-mixin
...
...
@@ -103,15 +104,21 @@
<template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"showSaveDialog('detail', scope.row.id)"
>
查看详情
</el-link>
<el-link
type=
"primary"
v-if=
"!checkPermission()"
@
click=
"showSaveDialog('update', scope.row.id)"
>
修改
</el-link>
<el-link
type=
"primary"
@
click=
"delHandler(scope.row.id)"
v-if=
"checkPermission()"
>
删除
</el-link>
<el-link
type=
"primary"
v-if=
"scope.row.auditStatus === 1"
v-if=
"scope.row.auditStatus === 1
&& checkPermission()
"
@
click=
"auditHandler(scope.row.id)"
>
审核
</el-link>
</
template
>
...
...
src/page/rescue/components/saveDialog.vue
View file @
aab0fa09
<
template
>
<el-dialog
title=
"武汉市医院急诊科资源信息填写
"
:title=
"title
"
:visible
.
sync=
"dialogVisible"
width=
"500px"
@
closed=
"closedHandler"
...
...
@@ -12,6 +12,7 @@
size=
"small"
label-width=
"150px"
:rules=
"rules"
:disabled=
"formDisabled"
v-loading=
"loading"
>
<el-form-item
...
...
@@ -91,6 +92,7 @@
<formItem
labelWidth=
"150px"
ref=
"formItem"
:disabled=
"formDisabled"
:formItemList=
"formItemList"
/>
<span
...
...
@@ -114,10 +116,25 @@
import
{
queryEmergencyHospitalList
,
queryExtendConfig
}
from
'@/api/common'
import
{
queryInfoById
,
addOrUpdateEmergencyRescue
}
from
'@/api/rescue'
export
default
{
computed
:
{
title
:
function
()
{
let
str
=
'武汉市医院急诊科资源信息'
console
.
log
(
this
.
type
)
if
(
this
.
type
===
'add'
)
{
str
+=
'填写'
}
else
if
(
this
.
type
===
'update'
)
{
str
+=
'修改'
}
else
if
(
this
.
type
===
'detail'
)
{
str
+=
'详情'
}
return
str
}
},
data
()
{
return
{
dialogVisible
:
false
,
loading
:
false
,
formDisabled
:
false
,
dataForm
:
{
hospitalCode
:
''
,
icuBedCount
:
''
,
...
...
@@ -127,6 +144,7 @@ export default {
operateRoomCount
:
''
,
operateRoomFreeCount
:
''
},
type
:
'add'
,
hospitalList
:
[],
formItemList
:
[],
rules
:
{
...
...
@@ -173,6 +191,7 @@ export default {
this
.
dialogVisible
=
true
this
.
loading
=
true
this
.
type
=
type
this
.
formDisabled
=
type
===
'detail'
if
(
type
===
'update'
)
{
if
(
!
id
)
{
this
.
$message
.
error
(
'id不能为空'
)
...
...
src/page/rescue/index.vue
View file @
aab0fa09
...
...
@@ -45,6 +45,7 @@
<el-button
type=
"primary"
size=
"small"
v-if=
"!checkPermission()"
@
click=
"showSaveDialog()"
>
新增
</el-button>
</div>
...
...
@@ -91,17 +92,23 @@
min-width=
"200px"
>
<template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"showSaveDialog('detail', scope.row.id)"
>
查看详情
</el-link>
<el-link
type=
"primary"
@
click=
"showSaveDialog('update', scope.row.id)"
v-if=
"!checkPermission()"
>
修改
</el-link>
<el-link
type=
"primary"
@
click=
"delHandler(scope.row.id)"
v-if=
"checkPermission()"
>
删除
</el-link>
<el-link
type=
"primary"
v-if=
"scope.row.auditStatus === 1"
v-if=
"scope.row.auditStatus === 1
&& checkPermission()
"
@
click=
"auditHandler(scope.row.id)"
>
审核
</el-link>
</
template
>
...
...
src/page/sitePage/components/siteDialog.vue
View file @
aab0fa09
<
template
>
<el-dialog
title=
"武汉市医疗急救站点信息填写
"
:title=
"title
"
:visible
.
sync=
"dialogVisible"
width=
"600px"
@
closed=
"closedHandler"
...
...
@@ -12,6 +12,7 @@
size=
"small"
label-width=
"300px"
:rules=
"rules"
:disabled=
"formDisabled"
v-loading=
"loading"
>
<el-form-item
...
...
@@ -116,10 +117,25 @@ import { queryEmergencySiteDtoById, saveOrUpdateEmergencySite } from '@/api/site
import
{
queryEmergencyHospitalList
}
from
'@/api/common'
import
{
getDic
}
from
'@/util/dict'
export
default
{
computed
:
{
title
:
function
()
{
let
str
=
'武汉市医疗急救站点信息'
if
(
this
.
type
===
'add'
)
{
str
+=
'填写'
}
else
if
(
this
.
type
===
'update'
)
{
str
+=
'修改'
}
else
if
(
this
.
type
===
'detail'
)
{
str
+=
'详情'
}
return
str
}
},
data
()
{
return
{
dialogVisible
:
false
,
loading
:
false
,
formDisabled
:
false
,
type
:
'add'
,
dataForm
:
{
siteName
:
''
,
area
:
''
,
...
...
@@ -158,7 +174,8 @@ export default {
this
.
dialogVisible
=
true
this
.
loading
=
true
this
.
type
=
type
if
(
type
===
'update'
)
{
this
.
formDisabled
=
type
===
'detail'
if
(
type
===
'update'
||
type
===
'detail'
)
{
if
(
!
id
)
{
this
.
$message
.
error
(
'救护车id不能为空'
)
return
...
...
src/page/sitePage/index.vue
View file @
aab0fa09
...
...
@@ -56,6 +56,7 @@
type=
"primary"
size=
"small"
@
click=
"showSaveDialog()"
v-if=
"!checkPermission()"
>
新增
</el-button>
</div>
<table-mixin
...
...
@@ -102,17 +103,23 @@
min-width=
"200px"
>
<template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"showSaveDialog('detail', scope.row.id)"
>
查看详情
</el-link>
<el-link
type=
"primary"
@
click=
"showSaveDialog('update', scope.row.id)"
v-if=
"!checkPermission()"
>
修改
</el-link>
<el-link
type=
"primary"
@
click=
"delHandler(scope.row.id)"
v-if=
"checkPermission()"
>
删除
</el-link>
<el-link
type=
"primary"
v-if=
"scope.row.auditStatus === 1"
v-if=
"scope.row.auditStatus === 1
&& checkPermission()
"
@
click=
"auditHandler(scope.row.id)"
>
审核
</el-link>
</
template
>
...
...
src/page/siteQuery/index.vue
View file @
aab0fa09
...
...
@@ -14,12 +14,14 @@
ak=
"OdRZ7iA9KGrKwFqufVTI3eTHOHDriGV7"
>
</baidu-map>
-->
<div
class=
"map"
>
<div
class=
"map"
id=
"allmap"
style=
"width: 100%; height: 100%"
>
</div>
</div>
</el-col>
<el-col
style=
"height: 100%"
...
...
@@ -137,79 +139,84 @@ export default {
return
{
center
:
{
lng
:
114.3162
,
lat
:
30.581084
},
zoom
:
12
,
BMap
:
null
,
map
:
null
,
areaName
:
'武汉市'
,
siteName
:
''
,
siteListData
:
[],
carListData
:
[],
allData
:
[],
vechieTypeList
:
[]
vechieTypeList
:
[],
map
:
null
}
},
mounted
()
{
var
map
=
new
BMapGL
.
map
(
'allmap'
)
map
.
centerAndZoom
(
new
BMapGL
.
Point
(
defaultCenterPoint
[
0
],
defaultCenterPoint
[
1
]))
map
.
enableScrollWheelZoom
(
true
);
var
darkStyle
=
[
{
featureType
:
'land'
,
elementType
:
'ge'
}
]
map
.
setOptions
({
style
:
'default'
,
styleUrl
:
''
})
this
.
init
()
console
.
log
(
'mounted'
)
},
methods
:
{
handler
({
BMap
,
map
}
)
{
init
(
)
{
//划分出行政区
console
.
log
(
'init'
)
const
map
=
new
BMapGL
.
Map
(
'allmap'
)
map
.
centerAndZoom
(
new
BMapGL
.
Point
(
defaultCenterPoint
[
0
],
defaultCenterPoint
[
1
]),
11
)
this
.
map
=
map
map
.
enableScrollWheelZoom
(
true
);
getDic
([
'area'
,
'vechie_type'
,
'vechie_special_purpose'
]).
then
(
res
=>
{
this
.
vechieTypeList
=
res
.
vechie_type
this
.
vechieSpecialPurposeList
=
res
.
vechie_special_purpose
if
(
res
.
area
&&
res
.
area
.
length
>
0
)
{
res
.
area
.
forEach
(
item
=>
{
this
.
getBoundary
(
item
.
name
,
BMap
,
map
)
})
}
// if (res.area && res.area.length > 0) {
// console.log('areaList', res.area)
// res.area.forEach(item => {
// this.getBoundary(item.name, map)
// })
// }
})
// 地图上打点
queryEmergencySiteList
().
then
(
res
=>
{
if
(
res
.
msg
===
201
)
{
console
.
log
(
res
.
respData
)
if
(
res
.
respData
&&
res
.
respData
.
length
>
0
)
{
this
.
allData
=
res
.
respData
this
.
siteListData
=
res
.
respData
res
.
respData
.
forEach
(
item
=>
{
if
(
item
.
siteLatitude
&&
item
.
siteLongitude
)
{
const
point
=
new
BMap
.
Point
(
item
.
siteLongitude
,
item
.
siteLatitude
)
const
marker
=
new
BMap
.
Marker
(
point
)
const
point
=
new
BMap
GL
.
Point
(
item
.
siteLongitude
,
item
.
siteLatitude
)
const
marker
=
new
BMap
GL
.
Marker
(
point
)
map
.
addOverlay
(
marker
)
}
marker
.
addEventListener
(
'click'
,
()
=>
{
console
.
log
(
'click'
,
item
)
this
.
getSiteListData
(
item
.
areaName
)
this
.
$nextTick
(()
=>
{
const
dataList
=
this
.
allData
.
filter
(
i
=>
i
.
id
===
item
.
id
)
||
[]
this
.
$refs
.
siteListData
.
setCurrentRow
(
dataList
[
0
]);
})
map
.
centerAndZoom
(
new
BMapGL
.
Point
(
item
.
siteLongitude
,
item
.
siteLatitude
),
18
)
})
this
.
allData
=
res
.
respData
this
.
siteListData
=
res
.
respData
if
(
res
.
respData
&&
res
.
respData
[
0
])
{
this
.
$refs
.
siteListData
.
setCurrentRow
(
res
.
respData
[
0
]);
}
})
// if (res.respData && res.respData[0]) {
// this.$refs.siteListData.setCurrentRow(res.respData[0]);
// }
}
}
else
{
this
.
$message
.
error
(
res
.
content
)
}
})
},
getBoundary
(
districtName
,
BMap
,
map
)
{
const
bdary
=
new
BMap
.
Boundary
()
getBoundary
(
districtName
,
map
)
{
const
bdary
=
new
BMap
GL
.
Boundary
()
const
that
=
this
bdary
.
get
(
districtName
,
function
(
rs
)
{
//获取行政区域
var
count
=
rs
.
boundaries
.
length
;
//行政区域的点有多少个
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
var
ply
=
new
BMap
.
Polygon
(
rs
.
boundaries
[
i
],
{
var
ply
=
new
BMap
GL
.
Polygon
(
rs
.
boundaries
[
i
],
{
fillColor
:
'#'
+
(
Math
.
random
()
*
0xFFFFFF
<<
0
).
toString
(
16
),
fillOpacity
:
0.3
});
//建立多边形覆盖物
map
.
addOverlay
(
ply
);
//添加覆盖物
ply
.
addEventListener
(
'click'
,
()
=>
{
console
.
log
(
'1111'
)
that
.
getSiteListData
(
districtName
)
})
}
...
...
@@ -220,7 +227,7 @@ export default {
const
dataList
=
this
.
allData
.
filter
(
i
=>
i
.
areaName
===
districtName
)
this
.
siteListData
=
dataList
||
[]
if
(
dataList
&&
dataList
[
0
])
{
this
.
$refs
.
siteListData
.
setCurrentRow
(
dataList
[
0
]);
//
this.$refs.siteListData.setCurrentRow(dataList[0]);
}
else
{
this
.
siteName
=
''
this
.
carListData
=
[]
...
...
@@ -239,6 +246,7 @@ export default {
this
.
$message
.
error
(
res
.
content
)
}
})
this
.
map
.
centerAndZoom
(
new
BMapGL
.
Point
(
val
.
siteLongitude
,
val
.
siteLatitude
),
18
)
},
vechieTypeFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
vechieType
=
this
.
vechieTypeList
.
find
(
i
=>
i
.
val
===
cellValue
)
...
...
@@ -252,10 +260,6 @@ export default {
const
vechieSpecialPurpose
=
this
.
vechieSpecialPurposeList
.
find
(
i
=>
i
.
val
===
cellValue
)
return
vechieSpecialPurpose
?
vechieSpecialPurpose
.
name
:
''
},
vechieSpecialPurposeFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
vechieSpecialPurpose
=
this
.
vechieSpecialPurposeList
.
find
(
i
=>
i
.
val
===
cellValue
)
return
vechieSpecialPurpose
?
vechieSpecialPurpose
.
name
:
''
},
isPreHospitalVechieFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
isPreHospitalVechieList
=
[
''
,
'是'
,
'否'
]
return
isPreHospitalVechieList
[
cellValue
]
||
''
...
...
src/util/permission.js
0 → 100644
View file @
aab0fa09
import
store
from
'@/store'
/**
* @returns {Boolean}
*/
export
default
function
checkPermission
()
{
const
userInfo
=
store
.
getters
&&
store
.
getters
.
userInfo
return
userInfo
&&
userInfo
.
roleId
&&
userInfo
.
roleId
===
1
}
yarn.lock
View file @
aab0fa09
...
...
@@ -1215,6 +1215,33 @@ bluebird@^3.1.1, bluebird@^3.4.7, bluebird@^3.5.1:
resolved "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha1-nyKcFb4nJFT/qXOs4NvueaGww28=
bmaplib.curveline@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/bmaplib.curveline/download/bmaplib.curveline-1.0.0.tgz#826eb0bf1c59fad1b23142be66fc360cf009aea2"
integrity sha1-gm6wvxxZ+tGyMUK+Zvw2DPAJrqI=
bmaplib.heatmap@^1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/bmaplib.heatmap/download/bmaplib.heatmap-1.0.4.tgz#30161262771fe78af35705ff92457725de5d9850"
integrity sha1-MBYSYncf54rzVwX/kkV3Jd5dmFA=
bmaplib.lushu@^1.0.7:
version "1.0.7"
resolved "https://registry.npm.taobao.org/bmaplib.lushu/download/bmaplib.lushu-1.0.7.tgz#77c17dcf7148d30c46e8430c7ff86b20e418b8b8"
integrity sha1-d8F9z3FI0wxG6EMMf/hrIOQYuLg=
bmaplib.markerclusterer@^1.0.13:
version "1.0.13"
resolved "https://registry.npm.taobao.org/bmaplib.markerclusterer/download/bmaplib.markerclusterer-1.0.13.tgz#442d71a6c40844ee47d01f6db2166b54530b5bd1"
integrity sha1-RC1xpsQIRO5H0B9tshZrVFMLW9E=
dependencies:
bmaplib.texticonoverlay "^1.0.2"
bmaplib.texticonoverlay@^1.0.2:
version "1.0.2"
resolved "https://registry.npm.taobao.org/bmaplib.texticonoverlay/download/bmaplib.texticonoverlay-1.0.2.tgz#d78546ea0f036d9fe964983796315b6c112a05bf"
integrity sha1-14VG6g8DbZ/pZJg3ljFbbBEqBb8=
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9:
version "4.12.0"
resolved "https://registry.npm.taobao.org/bn.js/download/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
...
...
@@ -2720,7 +2747,7 @@ enhanced-resolve@^3.4.0:
object-assign "^4.0.1"
tapable "^0.2.7"
entities@^1.1.1:
entities@^1.1.1
, entities@~1.1.1
:
version "1.1.2"
resolved "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz?cache=0&sync_timestamp=1611535326982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
integrity sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=
...
...
@@ -4652,6 +4679,13 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
linkify-it@^2.0.0:
version "2.2.0"
resolved "https://registry.npm.taobao.org/linkify-it/download/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf"
integrity sha1-47VGl+eL+RXHCjis14/QngBYsc8=
dependencies:
uc.micro "^1.0.1"
load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
...
...
@@ -4825,6 +4859,17 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"
markdown-it@^8.4.0:
version "8.4.2"
resolved "https://registry.nlark.com/markdown-it/download/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54"
integrity sha1-OG+YmY3BWjdyKqdyIIT0Agvdm1Q=
dependencies:
argparse "^1.0.7"
entities "~1.1.1"
linkify-it "^2.0.0"
mdurl "^1.0.1"
uc.micro "^1.0.5"
math-expression-evaluator@^1.2.14:
version "1.3.7"
resolved "https://registry.nlark.com/math-expression-evaluator/download/math-expression-evaluator-1.3.7.tgz#1b62225db86af06f7ea1fd9576a34af605a5b253"
...
...
@@ -4849,6 +4894,11 @@ mdn-data@2.0.4:
resolved "https://registry.nlark.com/mdn-data/download/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b"
integrity sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs=
mdurl@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/mdurl/download/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
...
...
@@ -7880,6 +7930,11 @@ typedarray@^0.0.6:
resolved "https://registry.nlark.com/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.6"
resolved "https://registry.npm.taobao.org/uc.micro/download/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
integrity sha1-nEEagCpAmpH8bPdAgbq6NLJEmaw=
uglify-es@^3.3.4:
version "3.3.9"
resolved "https://registry.npm.taobao.org/uglify-es/download/uglify-es-3.3.9.tgz?cache=0&sync_timestamp=1614860098333&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-es%2Fdownload%2Fuglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
...
...
@@ -8123,6 +8178,17 @@ vm-browserify@^1.0.1:
resolved "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha1-eGQcSIuObKkadfUR56OzKobl3aA=
vue-baidu-map@^0.21.22:
version "0.21.22"
resolved "https://registry.npm.taobao.org/vue-baidu-map/download/vue-baidu-map-0.21.22.tgz#6b76a91ef34f18a782d732ab0f541a1a3aa069e0"
integrity sha1-a3apHvNPGKeC1zKrD1QaGjqgaeA=
dependencies:
bmaplib.curveline "^1.0.0"
bmaplib.heatmap "^1.0.4"
bmaplib.lushu "^1.0.7"
bmaplib.markerclusterer "^1.0.13"
markdown-it "^8.4.0"
vue-eslint-parser@^2.0.3:
version "2.0.3"
resolved "https://registry.nlark.com/vue-eslint-parser/download/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1"
...
...
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