Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
53858352
Commit
53858352
authored
Jun 21, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改百分百
parent
4a5d1278
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
46 deletions
+56
-46
device-manager-ui/admin/src/views/sitestat/list.vue
device-manager-ui/admin/src/views/sitestat/list.vue
+56
-46
No files found.
device-manager-ui/admin/src/views/sitestat/list.vue
View file @
53858352
...
...
@@ -8,9 +8,17 @@
<el-button
style=
"float: right"
@
click=
"switchStat"
type=
"text"
>
切换为地图模式
</el-button>
</div>
<el-scrollbar
style=
"height: 100%"
>
<el-tree
size=
"mini"
ref=
"siteTree"
:data=
"areaData"
id=
"el-tree"
node-key=
"id"
indent=
"4"
:props=
"treeProps"
:load=
"loadNode"
highlight-current
default-expand-all
:expand-on-click-node=
"false"
:render-content=
"renderContent"
@
node-click=
"handleNodeClick"
>
<el-tree
size=
"mini"
ref=
"siteTree"
:data=
"areaData"
id=
"el-tree"
node-key=
"id"
indent=
"4"
:props=
"treeProps"
:load=
"loadNode"
highlight-current
default-expand-all
:expand-on-click-node=
"false"
:render-content=
"renderContent"
@
node-click=
"handleNodeClick"
>
</el-tree>
</el-scrollbar>
</el-card>
...
...
@@ -21,14 +29,15 @@
<el-row>
<LayoutTable
ref=
"layoutTable"
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"doExport"
:disabled=
"isExport"
>
导出
</el-button>
:disabled=
"isExport"
>
导出
</el-button>
</LayoutTable>
</el-row>
</el-card>
</el-col>
</el-row>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
</
template
>
...
...
@@ -37,44 +46,47 @@
import
dialogShow
from
"
./dialogshow
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
tree
from
"
@/assets/mixins/tree
"
;
export
default
{
name
:
"
Sitestat
"
,
components
:
{
dialogShow
},
components
:
{
dialogShow
},
mixins
:
[
table
,
tree
],
created
()
{
this
.
$get
(
"
/sitestat/siteTree
"
,
{}).
then
(({
data
})
=>
{
// this.areaData = data.siteTree;
this
.
$get
(
"
/sitestat/siteTree
"
,
{}).
then
(({
data
})
=>
{
// this.areaData = data.siteTree;
this
.
areaData
=
data
.
data
;
console
.
log
(
"
areaData1
"
,
data
.
data
)
});
},
methods
:
{
/** 下载模板操作 */
downloadTemplate
()
{
this
.
isExport
=
true
;
this
.
$download
(
"
/sitestat/downloadTemplate
"
,
{},
{
type
:
"
excel
"
})
.
then
(()
=>
(
this
.
isExport
=
false
))
.
catch
((
error
)
=>
{
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
this
.
$download
(
"
/sitestat/downloadTemplate
"
,
{},
{
type
:
"
excel
"
})
.
then
(()
=>
(
this
.
isExport
=
false
))
.
catch
((
error
)
=>
{
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
},
/** 导出Excel */
doExport
()
{
this
.
isExport
=
true
;
this
.
$download
(
"
/sitestat/exportExcel
"
,
{
siteId
:
this
.
$route
.
query
[
"
siteId
"
],
siteName
:
this
.
$route
.
query
[
"
siteName
"
],
},
{
type
:
"
excel
"
}
"
/sitestat/exportExcel
"
,
{
siteId
:
this
.
$route
.
query
[
"
siteId
"
],
siteName
:
this
.
$route
.
query
[
"
siteName
"
],
},
{
type
:
"
excel
"
}
)
.
then
(()
=>
(
this
.
isExport
=
false
))
.
catch
((
error
)
=>
{
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
.
then
(()
=>
(
this
.
isExport
=
false
))
.
catch
((
error
)
=>
{
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
},
/** 重写新增方法 */
...
...
@@ -91,7 +103,7 @@ export default {
//进入设备列表页面
this
.
$router
.
push
({
path
:
"
/device/list
"
,
query
:
{
sitestatId
:
row
.
id
,
siteId
:
row
.
siteId
},
query
:
{
sitestatId
:
row
.
id
,
siteId
:
row
.
siteId
},
});
},
...
...
@@ -110,17 +122,16 @@ export default {
if
(
node
.
id
.
search
(
"
,
"
)
>
-
1
)
{
//this.query = { siteId: node.id.split(",")[0] ,siteIdList:node.id.split(",")}
this
.
query
=
{
siteIdList
:
node
.
id
.
split
(
"
,
"
).
map
((
i
)
=>
parseInt
(
i
)),
};
}
else
{
this
.
query
=
{
siteId
:
node
.
id
};
this
.
query
=
{
siteId
:
node
.
id
};
}
this
.
getData
();
}
else
if
(
node
.
type
===
"
area
"
)
{
this
.
query
=
{
areaCode
:
node
.
areaCode
};
this
.
query
=
{
areaCode
:
node
.
areaCode
};
this
.
getData
();
}
...
...
@@ -148,13 +159,12 @@ export default {
type
:
"
index
"
,
align
:
"
center
"
,
label
:
"
序号
"
,
align
:
"
center
"
,
width
:
50
,
},
{
label
:
"
站点名称
"
,
align
:
"
center
"
,
prop
:
"
siteName
"
},
{
label
:
"
站点名称
"
,
align
:
"
center
"
,
prop
:
"
siteName
"
},
{
label
:
"
站点编号
"
,
align
:
"
center
"
,
prop
:
"
siteCode
"
},
{
label
:
"
站点编号
"
,
align
:
"
center
"
,
prop
:
"
siteCode
"
},
{
label
:
"
设备总数
"
,
...
...
@@ -196,15 +206,15 @@ export default {
width
:
240
,
formatter
:
(
row
)
=>
{
return
(
<
table
-
buttons
noAdd
noEdit
noDel
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
table
-
buttons
noAdd
noEdit
noDel
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
},
},
...
...
@@ -239,17 +249,17 @@ export default {
}
.
mytree
:
:
v-deep
{
.
el-tree--highlight-current
:
:
v-deep
.
el-tree-node
.
is-checked
>
.
el-tree-node__content
{
.
el-tree--highlight-current
:
:
v-deep
.
el-tree-node
.
is-checked
>
.
el-tree-node__content
{
background-color
:
rgb
(
255
,
255
,
255
);
color
:
rgb
(
64
,
158
,
255
);
}
.
el-tree--highlight-current
:
:
v-deep
.
el-tree-node
.
is-current
>
.
el-tree-node__content
{
.
el-tree--highlight-current
:
:
v-deep
.
el-tree-node
.
is-current
>
.
el-tree-node__content
{
background-color
:
rgb
(
255
,
255
,
255
);
color
:
rgb
(
64
,
158
,
255
);
}
.el-tree
>
.el-tree-node
:after
{
.el-tree
>
.el-tree-node
:after
{
border-top
:
none
;
}
...
...
@@ -271,11 +281,11 @@ export default {
height
:
38px
;
}
.el-tree
>
.el-tree-node
:before
{
.el-tree
>
.el-tree-node
:before
{
border-left
:
none
;
}
.el-tree
>
.el-tree-node
:after
{
.el-tree
>
.el-tree-node
:after
{
border-top
:
none
;
}
...
...
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