Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
jinmao-community-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
63dde948
authored
Apr 16, 2021
by
changjin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调外部系统管理接口
parent
a2a0bc5c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
257 additions
and
103 deletions
+257
-103
src/components/common/Sidebar.vue
+26
-26
src/components/page/equipment/deviceAlert.vue
+42
-20
src/components/page/equipment/events.vue
+34
-25
src/components/page/equipment/list.vue
+3
-7
src/components/page/index/externalSystem.vue
+120
-19
src/components/page/system/project.vue
+31
-5
src/router/index.js
+1
-1
No files found.
src/components/common/Sidebar.vue
View file @
63dde948
...
...
@@ -9,7 +9,7 @@
<div
class=
"sideMenu"
>
<el-menu
theme=
"dark"
:default-active=
"onRoutes"
class=
"el-menu-demo"
unique-opened
router
>
<template
v-for=
"(item,index) in sideMenu"
>
<el-menu-item
:class=
"
{'is-active':menuActive==item.name}" :index="item.
u
rl" v-on:click="menuActive = item.name" :key="index">
<el-menu-item
:class=
"
{'is-active':menuActive==item.name}" :index="item.
webU
rl" v-on:click="menuActive = item.name" :key="index">
<span
class=
"icon icon1"
v-if=
"item.name == '全部设备'"
></span>
<span
class=
"icon icon2"
v-if=
"item.name == '设备报警'"
></span>
<span
class=
"icon icon3"
v-if=
"item.name == '车辆审核'"
></span>
...
...
@@ -53,7 +53,7 @@ export default {
name
:
'设备管理'
,
id
:
1
,
url
:
'/equipment/list'
,
child
Nodes
:[
child
renList
:[
{
name
:
'全部设备'
,
url
:
'/equipment/list'
,
...
...
@@ -84,7 +84,7 @@ export default {
name
:
'车辆管理'
,
id
:
2
,
url
:
'/vehicle/list'
,
child
Nodes
:[
child
renList
:[
{
name
:
'车辆审核'
,
url
:
'/vehicle/vehicleAudit'
,
...
...
@@ -111,7 +111,7 @@ export default {
name
:
'IOC后台管理'
,
id
:
3
,
url
:
'/IOC/notice'
,
child
Nodes
:[
child
renList
:[
{
name
:
'公告管理'
,
url
:
'/IOC/notice'
,
...
...
@@ -158,7 +158,7 @@ export default {
name
:
'系统设置'
,
id
:
5
,
url
:
'/system/project'
,
child
Nodes
:[
child
renList
:[
{
name
:
'项目管理'
,
url
:
'/system/project'
,
...
...
@@ -200,32 +200,32 @@ export default {
},
created
()
{
var
that
=
this
this
.
changeMenu
(
this
.
items
[
0
])
that
.
items
.
forEach
(
function
(
info
,
index
)
{
if
(
that
.
pageNameList
[
1
].
pageName
===
info
.
name
)
{
that
.
changeMenu
(
info
)
}
})
//
this.getData()
//
this.changeMenu(this.items[0])
//
that.items.forEach(function (info, index) {
//
if (that.pageNameList[1].pageName === info.name) {
//
that.changeMenu(info)
//
}
//
})
this
.
getData
()
this
.
menuActive
=
this
.
pageNameList
[
this
.
pageNameList
.
length
-
1
].
pageName
},
update
(){
var
that
=
this
//
this.getData()
this
.
changeMenu
(
this
.
items
[
0
])
that
.
items
.
forEach
(
function
(
info
,
index
)
{
if
(
that
.
pageNameList
[
1
].
pageName
===
info
.
name
)
{
that
.
changeMenu
(
info
)
}
})
this
.
getData
()
//
this.changeMenu(this.items[0])
//
that.items.forEach(function (info, index) {
//
if (that.pageNameList[1].pageName === info.name) {
//
that.changeMenu(info)
//
}
//
})
this
.
menuActive
=
this
.
pageNameList
[
this
.
pageNameList
.
length
-
1
].
pageName
},
methods
:
{
getData
()
{
this
.
$axios
.
get
(
'/baseInfo/initPersonalMenu'
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
items
=
res
.
data
.
data
.
menu
Map
console
.
log
(
this
.
items
.
MenuResponse
)
this
.
items
=
res
.
data
.
data
.
menu
ResponseList
this
.
changeMenu
(
this
.
items
[
0
]
)
window
.
sessionStorage
.
setItem
(
'projectId'
,
res
.
data
.
data
.
projectId
)
}
})
...
...
@@ -235,20 +235,20 @@ export default {
console
.
log
(
menu
.
name
)
if
(
menu
.
name
==
'外部系统管理'
)
{
this
.
menuActive
=
menu
.
name
this
.
$router
.
push
({
path
:
menu
.
u
rl
})
this
.
$router
.
push
({
path
:
menu
.
webU
rl
})
this
.
sideMenu
=
[]
this
.
curMenu
=
menu
.
id
}
else
{
this
.
menuActive
=
menu
.
child
Nodes
[
0
].
name
this
.
$router
.
push
({
path
:
menu
.
child
Nodes
[
0
].
u
rl
})
this
.
sideMenu
=
menu
.
child
Nodes
this
.
menuActive
=
menu
.
child
renList
[
0
].
name
this
.
$router
.
push
({
path
:
menu
.
child
renList
[
0
].
webU
rl
})
this
.
sideMenu
=
menu
.
child
renList
this
.
curMenu
=
menu
.
id
}
}
else
{
this
.
sideMenu
=
[]
this
.
curMenu
=
menu
.
id
this
.
menuActive
=
menu
.
name
this
.
sideMenu
=
menu
.
child
Nodes
this
.
sideMenu
=
menu
.
child
renList
}
},
}
...
...
src/components/page/equipment/deviceAlert.vue
View file @
63dde948
...
...
@@ -4,19 +4,22 @@
<div
class=
"searchBox"
>
<el-row>
<el-form
label-width=
"70px"
:model=
"searchForm"
>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
7
"
>
<el-form-item
label=
"设备类型"
>
<el-select
v-model=
"searchForm.blockId"
placeholder=
"请选择"
>
<el-option
label=
"不限"
value=
""
></el-option>
<el-option
label=
"男"
value=
"MAN"
></el-option>
<el-option
label=
"女"
value=
"WOMAN"
></el-option>
<el-option
label=
"未知"
value=
"SECRECY"
></el-option>
<el-select
v-model=
"searchForm.groupId"
placeholder=
"请选择"
>
<el-option
value=
""
label=
"全部"
>
全部
</el-option>
<el-option
v-for=
"item in typeList"
:key=
"item.groupId"
:label=
"item.groupName"
:value=
"item.groupId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
7
"
>
<el-form-item
label=
"报警类型"
>
<el-select
v-model=
"searchForm.
blockId
"
placeholder=
"请选择"
>
<el-select
v-model=
"searchForm.
warnState
"
placeholder=
"请选择"
>
<el-option
label=
"不限"
value=
""
></el-option>
<el-option
label=
"男"
value=
"MAN"
></el-option>
<el-option
label=
"女"
value=
"WOMAN"
></el-option>
...
...
@@ -24,18 +27,13 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
6
"
>
<el-form-item
label=
"设备名称"
>
<el-input
v-model=
"searchForm.
customer
Name"
placeholder=
"请输入设备名称"
></el-input>
<el-input
v-model=
"searchForm.
device
Name"
placeholder=
"请输入设备名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<p
class=
"font12 prompt"
><i
class=
"icon"
></i>
当前数据已发生变化,请手动刷新
<i
class=
"closeIcon"
></i></p>
</el-col>
<el-col
:span=
"16"
class=
"text-right"
>
<el-button
@
click=
"getData()"
>
查询
</el-button>
<!--
<el-button
class=
"mt5 ml10"
@
click=
"reset()"
>
重置
</el-button>
-->
<el-button
type=
"primary"
@
click=
"allotBtn(0)"
>
刷新
</el-button>
<el-col
:span=
"3"
:offset=
"1"
>
<el-button
@
click=
"getData()"
class=
"mt5"
>
查询
</el-button>
</el-col>
</el-form>
</el-row>
...
...
@@ -127,18 +125,42 @@ export default {
data
:
()
=>
({
loading
:
false
,
activeName
:
'first'
,
value1
:
''
,
searchForm
:{
},
searchForm
:{},
data
:{
page
:
'1'
,
list
:[]
},
size
:
'10'
,
typeList
:
[]
}),
created
()
{
this
.
projectId
=
window
.
sessionStorage
.
getItem
(
'projectId'
)
this
.
projectId
=
'beijing'
this
.
getTypeList
(
this
.
projectId
)
this
.
getData
()
},
methods
:
{
getData
(){
this
.
$axios
.
post
(
'/deviceVehicle/findAlarmList'
,{
p
:
this
.
data
.
page
,
c
:
this
.
size
,
groupId
:
this
.
searchForm
.
groupId
,
deviceName
:
this
.
searchForm
.
deviceName
,
warnState
:
this
.
searchForm
.
warnState
,
projectId
:
this
.
projectId
,
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
data
=
res
.
data
.
data
}
})
},
getTypeList
(
projectId
)
{
this
.
$axios
.
get
(
'/deviceVehicle/findProductTypeList?projectId='
+
projectId
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
typeList
=
res
.
data
.
data
}
})
},
handleClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
);
},
...
...
src/components/page/equipment/events.vue
View file @
63dde948
...
...
@@ -7,7 +7,7 @@
<el-col
:span=
"10"
>
<el-form-item
label=
"操作时间"
>
<el-date-picker
v-model=
"
value1
"
v-model=
"
searchForm.date
"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
...
...
@@ -17,36 +17,37 @@
</el-col>
<el-col
:span=
"13"
:offset=
"1"
>
<el-button
class=
"mt5 ml10"
@
click=
"getData()"
>
查询
</el-button>
<el-button
type=
"primary"
class=
"mt5"
@
click=
"allotBtn(0)"
>
刷新
</el-button>
<el-button
@
click=
"goBack()"
class=
"lightBtn ml10 mt5"
>
返回
</el-button>
</el-col>
<el-col
:span=
"8"
class=
"clear"
>
<p
class=
"font12 prompt"
><i
class=
"icon"
></i>
当前数据已发生变化,请手动刷新
<i
class=
"closeIcon"
></i></p>
</el-col>
</el-form>
</el-row>
</div>
<div
class=
"infoBox"
>
<el-row>
<el-col
:span=
"6"
class=
"text-left ml20 rightLine"
>
<p>
设备名称
<b
class=
"ml10"
>
门禁001
</b></p>
<p>
设备名称
<b
class=
"ml10"
>
{{
deviceName
}}
</b></p>
</el-col>
<el-col
:span=
"6"
class=
"text-center rightLine"
>
<p>
所在位置
<b
class=
"ml10"
>
1号楼东北角
</b></p>
<p>
所在位置
<b
class=
"ml10"
>
{{
site
}}
</b></p>
</el-col>
<el-col
:span=
"6"
class=
"text-center rightLine"
>
<p>
在线状态
<b
class=
"ml10 green"
>
在线
</b></p>
<p>
在线状态
<b
class=
"ml10 red"
v-if=
"status === 'DISABLE'"
>
禁用
</b>
<b
class=
"ml10 gray"
v-if=
"status === 'OFFLINE'"
>
离线
</b>
<b
class=
"ml10 green"
v-if=
"status === 'ONLINE'"
>
在线
</b>
<b
class=
"ml10 red"
v-if=
"status === 'UNACTIVE'"
>
未激活
</b>
</p>
</el-col>
</el-row>
</div>
</div>
<div
class=
"mainContent tableCont"
>
<div
class=
"tabCont"
>
<div
class=
"title"
>
门禁001
操作记录
</div>
<div
class=
"title"
>
{{
deviceName
}}
操作记录
</div>
<el-table
:data=
"data.list"
>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"
name
"
label=
"操作事件"
></el-table-column>
<el-table-column
prop=
"
actual
Time"
label=
"操作时间"
></el-table-column>
<el-table-column
prop=
"
iotInfo
"
label=
"操作事件"
></el-table-column>
<el-table-column
prop=
"
create
Time"
label=
"操作时间"
></el-table-column>
</el-table>
<div
class=
"block text-right mt20"
v-if=
"data.page"
>
<el-pagination
...
...
@@ -62,27 +63,39 @@
</
template
>
<
script
>
import
moment
from
'moment'
export
default
{
data
:
()
=>
({
loading
:
false
,
searchForm
:{
},
searchForm
:{},
data
:{
page
:
'1'
,
list
:[
{
name
:
'监控摄像001'
,
id
:
'MZ902'
,
type
:
'监控设备'
}
]
},
size
:
'10'
,
value1
:
''
deviceName
:
''
,
status
:
''
,
site
:
''
}),
created
()
{
this
.
getData
()
this
.
deviceName
=
this
.
$route
.
params
.
name
this
.
site
=
this
.
$route
.
params
.
site
this
.
status
=
this
.
$route
.
params
.
status
},
methods
:
{
getData
()
{
this
.
$axios
.
post
(
'/deviceVehicle/findDeviceClickInfoById'
,{
p
:
this
.
data
.
page
,
c
:
this
.
size
,
iotId
:
this
.
$route
.
params
.
iotId
,
beginTime
:
this
.
searchForm
.
date
?
moment
(
new
Date
(
this
.
searchForm
.
date
[
0
]).
getTime
()).
format
(
'YYYY-MM-DD'
+
' 00:00:00'
)
:
null
,
endTime
:
this
.
searchForm
.
date
?
moment
(
new
Date
(
this
.
searchForm
.
date
[
1
]).
getTime
()).
format
(
'YYYY-MM-DD'
+
' 23:59:59'
)
:
null
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
data
=
res
.
data
.
data
}
})
},
goBack
()
{
this
.
$router
.
go
(
-
1
)
},
...
...
@@ -94,10 +107,6 @@ export default {
this
.
data
.
page
=
val
this
.
getData
()
},
reset
()
{
this
.
searchForm
=
{}
this
.
getData
(
1
)
},
showAlert
:
function
(
cont
)
{
this
.
$alert
(
cont
,
'温馨提示'
,
{
confirmButtonText
:
'确定'
...
...
src/components/page/equipment/list.vue
View file @
63dde948
...
...
@@ -66,7 +66,7 @@
<el-table-column
prop=
"deviceName"
label=
"设备名称"
></el-table-column>
<el-table-column
prop=
"iotId"
label=
"设备ID"
></el-table-column>
<el-table-column
prop=
"deviceType"
label=
"设备类型"
></el-table-column>
<el-table-column
prop=
"
ipAddress
"
label=
"所在位置"
></el-table-column>
<el-table-column
prop=
"
site
"
label=
"所在位置"
></el-table-column>
<el-table-column
prop=
"status"
label=
"是否在线"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.status === 'DISABLE'"
>
禁用
</span>
...
...
@@ -79,7 +79,7 @@
<el-table-column
label=
"操作"
width=
"160"
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"'/equipment/attribute/' + scope.row.iotId"
class=
"line"
>
属性
</router-link>
<router-link
:to=
"'/equipment/events/' + scope.row.iotId"
class=
"line ml10"
>
事件
</router-link>
<router-link
:to=
"'/equipment/events/' + scope.row.iotId
+ '/' + scope.row.deviceName + '/' +scope.row.site+ '/' + scope.row.status
"
class=
"line ml10"
>
事件
</router-link>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -112,7 +112,7 @@ export default {
this
.
projectId
=
window
.
sessionStorage
.
getItem
(
'projectId'
)
this
.
projectId
=
'beijing'
this
.
getTypeList
(
this
.
projectId
)
this
.
getData
(
this
.
projectId
)
this
.
getData
()
},
methods
:
{
getData
(){
...
...
@@ -154,10 +154,6 @@ export default {
this
.
data
.
page
=
val
this
.
getData
()
},
reset
()
{
this
.
searchForm
=
{}
this
.
getData
(
1
)
},
showAlert
:
function
(
cont
)
{
this
.
$alert
(
cont
,
'温馨提示'
,
{
confirmButtonText
:
'确定'
...
...
src/components/page/index/externalSystem.vue
View file @
63dde948
<
template
>
<div
class=
"mainContent"
>
<div
class=
"btnBox"
>
<el-button
class=
"addBtn"
@
click=
"addBtn"
><img
src=
"../../../../static/img/add.png"
class=
"addIcon"
><span>
新增
</span></el-button>
<el-button
class=
"addBtn"
@
click=
"addBtn
(0)
"
><img
src=
"../../../../static/img/add.png"
class=
"addIcon"
><span>
新增
</span></el-button>
</div>
<div
class=
"mainBox"
>
<div
class=
"left boxDiv"
>
<div
class=
"imgDiv"
><img
src=
"../../../../static/img/img.png
"
></div>
<p
class=
"text-center font14"
>
监控后台管理系统
</p>
<div
class=
"operateDiv text-center font12 mt
2
0"
>
<span
class=
"line green pointer"
@
click=
"addBtn()"
><img
src=
"../../../../static/img/edit.png"
>
修改
</span>
<span
class=
"line red ml15 pointer"
><img
src=
"../../../../static/img/del.png"
>
删除
</span>
<div
class=
"left boxDiv"
v-for=
"item in data"
>
<div
class=
"imgDiv"
><img
:src=
"item.photoUrl
"
></div>
<p
class=
"text-center font14"
>
{{
item
.
name
}}
</p>
<div
class=
"operateDiv text-center font12 mt
1
0"
>
<span
class=
"line green pointer"
@
click=
"addBtn(
1,item
)"
><img
src=
"../../../../static/img/edit.png"
>
修改
</span>
<span
class=
"line red ml15 pointer"
@
click=
"delBtn(item.id)"
><img
src=
"../../../../static/img/del.png"
>
删除
</span>
</div>
<el-button
class=
"lightBtn"
>
进入系统
</el-button>
<el-button
class=
"lightBtn"
@
click=
"goBtn(item.url)"
>
进入系统
</el-button>
</div>
</div>
<el-dialog
title=
"新增外部系统
"
:visible
.
sync=
"dialogVisible"
width=
"35%"
>
<el-dialog
:title=
"title
"
:visible
.
sync=
"dialogVisible"
width=
"35%"
>
<el-row
class=
"searchBox"
>
<el-form
label-width=
"100px"
>
<el-form
label-width=
"100px"
:model=
"dataForm"
>
<el-col
:span=
"18"
:offset=
"1"
>
<el-form-item
label=
"系统名称"
required
>
<el-input
v-model=
"data
.oldPwd"
placeholder=
"
"
></el-input>
<el-input
v-model=
"data
Form.name
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"18"
:offset=
"1"
>
<el-form-item
label=
"URL链接"
required
>
<el-input
v-model=
"data
.newPwd"
placeholder=
"
"
></el-input>
<el-input
v-model=
"data
Form.url
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"18"
:offset=
"1"
>
<el-form-item
label=
"上传封面"
required
>
<el-upload
class=
"avatar-uploader"
action=
"https://jsonplaceholder.typicode.com/posts/
"
:action=
"this.baseURL + 'baseInfo/uploadPhoto'
"
:show-file-list=
"false"
:headers=
"headers"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"
imageUrl"
:src=
"image
Url"
class=
"avatar"
>
<img
v-if=
"
photoUrl"
:src=
"photo
Url"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
<span
class=
"red span"
>
仅支持JPG/PNG格式,不得大于4M
</span>
...
...
@@ -55,22 +56,121 @@
export
default
{
data
:
()
=>
({
dialogVisible
:
false
,
data
:
{},
imageUrl
:
''
data
:
[],
photoUrl
:
''
,
dataForm
:
{},
token
:
''
,
title
:
''
}),
created
()
{
this
.
getData
()
},
computed
:
{
headers
(){
return
{
"token"
:
window
.
sessionStorage
.
getItem
(
'token'
)
}
}
},
methods
:
{
addBtn
()
{
getData
()
{
this
.
$axios
.
get
(
'/baseInfo/findAllOutProject'
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
data
=
res
.
data
.
data
}
})
},
//进入系统
goBtn
(
url
)
{
window
.
open
(
url
);
},
submit
()
{
let
that
=
this
if
(
!
that
.
dataForm
.
name
)
{
that
.
showAlert
(
'请输入系统名称~'
)
return
false
}
if
(
!
that
.
dataForm
.
url
)
{
that
.
showAlert
(
'请输入URL链接~'
)
return
false
}
let
reUrl
=
/
(
http|https
)
:
\/\/([\w
.
]
+
\/?)\S
*/
if
(
that
.
dataForm
.
url
&&
reUrl
.
test
(
that
.
dataForm
.
url
)
===
false
)
{
that
.
showAlert
(
'URL链接格式不对~'
)
return
false
}
if
(
!
that
.
photoUrl
)
{
that
.
showAlert
(
'请上传封面~'
)
return
false
}
let
url
if
(
this
.
type
===
0
)
{
url
=
'/baseInfo/addOutProject'
}
else
{
url
=
'/baseInfo/editOutProject'
}
that
.
$axios
.
post
(
url
,{
"name"
:
that
.
dataForm
.
name
,
"photoUrl"
:
that
.
photoUrl
,
"url"
:
that
.
dataForm
.
url
,
"id"
:
that
.
dataForm
.
id
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
if
(
this
.
type
===
0
)
{
this
.
$message
({
message
:
'新增成功~'
,
type
:
'success'
});
}
else
{
this
.
$message
({
message
:
'修改成功~'
,
type
:
'success'
});
}
this
.
dialogVisible
=
false
that
.
getData
()
}
else
{
if
(
this
.
type
===
0
)
{
this
.
$message
({
message
:
'新增失败~'
,
type
:
'error'
});
}
else
{
this
.
$message
({
message
:
'修改失败~'
,
type
:
'error'
});
}
}
})
},
delBtn
(
id
)
{
this
.
$confirm
(
'确定删除当前系统?'
,
'温馨提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$axios
.
get
(
'/baseInfo/deleteOutProjectById?id='
+
id
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
$message
({
message
:
'删除成功~'
,
type
:
'success'
});
this
.
getData
()
}
else
{
this
.
$message
({
message
:
'删除失败~'
,
type
:
'error'
});
}
})
}).
catch
(()
=>
{})
},
addBtn
(
type
,
item
)
{
this
.
dialogVisible
=
true
this
.
type
=
type
if
(
type
===
0
)
{
this
.
title
=
'新增外部系统'
this
.
dataForm
=
{}
this
.
photoUrl
=
''
}
else
{
this
.
title
=
'修改外部系统'
this
.
photoUrl
=
item
.
photoUrl
this
.
dataForm
=
{
"name"
:
item
.
name
,
"url"
:
item
.
url
,
"id"
:
item
.
id
}
}
},
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
this
.
photoUrl
=
res
.
data
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
'image/png'
;
const
isLt4M
=
file
.
size
/
1024
/
1024
<
4
;
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传头像图片只能是 JPG/PNG 格式!'
);
}
...
...
@@ -108,6 +208,7 @@
margin
:
0
10px
10px
0
;
.imgDiv{
width
:
182px
;
height
:
110px
;
margin
:
8px
auto
;
img{
width
:
100%
;
height
:
100%
;}
}
...
...
src/components/page/system/project.vue
View file @
63dde948
...
...
@@ -18,7 +18,7 @@
</div>
<div
class=
"mainContent tableCont"
>
<div
class=
"tabCont"
>
<el-button
class=
"addBtn"
@
click=
"addBtn(0)"
><img
src=
"../../../../static/img/add.png"
class=
"addIcon"
><span>
新增
</span></el-button>
<el-button
class=
"addBtn"
v-if=
"isAddBtn"
@
click=
"addBtn(0)"
><img
src=
"../../../../static/img/add.png"
class=
"addIcon"
><span>
新增
</span></el-button>
<el-table
:data=
"data.list"
>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"cityName"
label=
"城市名称"
></el-table-column>
...
...
@@ -29,10 +29,10 @@
<el-table-column
prop=
"massif"
label=
"地块名称"
></el-table-column>
<el-table-column
prop=
"massifId"
label=
"地块ID"
></el-table-column>
<el-table-column
prop=
"massifCode"
label=
"地块编码"
></el-table-column>
<el-table-column
label=
"操作"
width=
"160"
>
<el-table-column
label=
"操作"
width=
"160"
v-if=
"isEditBtn && isDelBtn"
>
<template
slot-scope=
"scope"
>
<span
class=
"green line pointer"
@
click=
"addBtn(1,scope.row)"
>
修改
</span>
<span
class=
"red line ml10 pointer"
@
click=
"delBtn(scope.row.id)"
>
删除
</span>
<span
class=
"green line pointer"
v-if=
"isEditBtn"
@
click=
"addBtn(1,scope.row)"
>
修改
</span>
<span
class=
"red line ml10 pointer"
v-if=
"isDelBtn"
@
click=
"delBtn(scope.row.id)"
>
删除
</span>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -108,12 +108,37 @@ export default {
id
:
''
,
data
:{
page
:
'1'
},
size
:
'10'
,
title
:
''
title
:
''
,
isAddBtn
:
false
,
isEditBtn
:
false
,
isDelBtn
:
false
}),
created
()
{
this
.
getData
()
this
.
getPermissionsBtn
()
},
methods
:
{
getPermissionsBtn
()
{
this
.
$axios
.
get
(
'/baseInfo/initPersonalMenu'
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
res
.
data
.
data
.
menuResponseList
.
forEach
(
item
=>
{
item
.
childrenList
.
forEach
(
info
=>
{
info
.
childrenList
.
forEach
(
btn
=>
{
if
(
btn
.
id
===
'1003-01-001-003'
)
{
this
.
isDelBtn
=
true
}
if
(
btn
.
id
===
'1003-01-001-002'
)
{
this
.
isEditBtn
=
true
}
if
(
btn
.
id
===
'1003-01-001-001'
)
{
this
.
isAddBtn
=
true
}
})
})
})
}
})
},
getData
()
{
this
.
$axios
.
post
(
'/baseInfo/findProjectPageInfo'
,{
p
:
this
.
data
.
page
,
...
...
@@ -205,6 +230,7 @@ export default {
this
.
type
=
type
if
(
type
===
0
)
{
this
.
title
=
'新增项目'
this
.
dataForm
=
{}
}
else
{
this
.
title
=
'修改项目'
this
.
id
=
item
.
id
...
...
src/router/index.js
View file @
63dde948
...
...
@@ -51,7 +51,7 @@ export default new Router({
require
([
'../components/page/equipment/attribute.vue'
],
resolve
),
},
{
path
:
'/equipment/events/:id'
,
path
:
'/equipment/events/:id
/:name/:site/:status
'
,
name
:
'equipmentEvents'
,
meta
:
{
pageName
:
'操作事件'
...
...
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