@ -0,0 +1,3 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not dead
|
@ -0,0 +1,18 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
extends: [
|
||||||
|
"plugin:vue/essential",
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
parser: "@babel/eslint-parser",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
},
|
||||||
|
};
|
@ -1,11 +1,23 @@
|
|||||||
# ---> Vue
|
.DS_Store
|
||||||
# gitignore template for Vue.js projects
|
node_modules
|
||||||
#
|
/dist
|
||||||
# Recommended template: Node.gitignore
|
|
||||||
|
|
||||||
# TODO: where does this rule come from?
|
|
||||||
docs/_book
|
|
||||||
|
|
||||||
# TODO: where does this rule come from?
|
# local env files
|
||||||
test/
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
# icing-front
|
# my
|
||||||
|
|
||||||
覆冰项目
|
## Project setup
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and hot-reloads for development
|
||||||
|
```
|
||||||
|
npm run serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and minifies for production
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lints and fixes files
|
||||||
|
```
|
||||||
|
npm run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customize configuration
|
||||||
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: ["@vue/cli-plugin-babel/preset"],
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
# ---> Vue
|
||||||
|
# gitignore template for Vue.js projects
|
||||||
|
#
|
||||||
|
# Recommended template: Node.gitignore
|
||||||
|
|
||||||
|
# TODO: where does this rule come from?
|
||||||
|
docs/_book
|
||||||
|
|
||||||
|
# TODO: where does this rule come from?
|
||||||
|
test/
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
# icing-front
|
||||||
|
|
||||||
|
覆冰项目
|
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"module": "esnext",
|
||||||
|
"baseUrl": "./",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"src/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lib": [
|
||||||
|
"esnext",
|
||||||
|
"dom",
|
||||||
|
"dom.iterable",
|
||||||
|
"scripthost"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"name": "icingsystem",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"lint": "vue-cli-service lint"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"axios": "^1.6.2",
|
||||||
|
"core-js": "^3.8.3",
|
||||||
|
"echarts": "^5.4.3",
|
||||||
|
"element-ui": "^2.15.14",
|
||||||
|
"moment": "^2.29.4",
|
||||||
|
"vue": "^2.6.14",
|
||||||
|
"vue-router": "^3.5.1",
|
||||||
|
"vuex": "^3.6.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.12.16",
|
||||||
|
"@babel/eslint-parser": "^7.12.16",
|
||||||
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-router": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||||
|
"@vue/cli-service": "~5.0.0",
|
||||||
|
"eslint": "^7.32.0",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
|
"eslint-plugin-vue": "^8.0.3",
|
||||||
|
"less": "^4.1.3",
|
||||||
|
"less-loader": "^8.0.0",
|
||||||
|
"prettier": "^2.4.1",
|
||||||
|
"vue-template-compiler": "^2.6.14"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 7.9 KiB |
@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||||
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong
|
||||||
|
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
|
||||||
|
properly without JavaScript enabled. Please enable it to
|
||||||
|
continue.</strong
|
||||||
|
>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
#app {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,80 @@
|
|||||||
|
//表格样式
|
||||||
|
.el-table {
|
||||||
|
td.el-table__cell,
|
||||||
|
th.el-table__cell.is-leaf {
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
}
|
||||||
|
.el-table__header-wrapper,
|
||||||
|
.el-table__fixed-header-wrapper {
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
}
|
||||||
|
th.el-table__cell {
|
||||||
|
background: #f8f8f8 !important;
|
||||||
|
}
|
||||||
|
.el-button--text {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
.el-button + .el-button,
|
||||||
|
.el-checkbox.is-bordered + .el-checkbox.is-bordered {
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
.deleteText {
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
.deleteText:focus,
|
||||||
|
.deleteText:hover {
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-table::before,
|
||||||
|
.el-table__fixed-right::before,
|
||||||
|
.el-table__fixed::before {
|
||||||
|
height: 0px !important;
|
||||||
|
}
|
||||||
|
//分页
|
||||||
|
.pageNation {
|
||||||
|
margin-top: 8px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
//弹窗
|
||||||
|
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 8px 20px;
|
||||||
|
}
|
||||||
|
.el-dialog {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
.el-button--small {
|
||||||
|
padding: 9px 9px;
|
||||||
|
}
|
||||||
|
.el-button--default,
|
||||||
|
.el-button--primary {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
.el-dropdown [disabled] {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.el-select-dropdown__item.selected {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.el-dropdown-menu--small .el-dropdown-menu__item {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.el-select-dropdown {
|
||||||
|
margin-top: 4px !important;
|
||||||
|
}
|
||||||
|
.el-link {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.el-image-viewer__actions {
|
||||||
|
background: rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
//Brand @color
|
||||||
|
@color-primary: #1c77ac;
|
||||||
|
@color-primary-light: mix(@color-white, @color-primary, 80%);
|
||||||
|
@color-primary-lighter: mix(@color-white, @color-primary, 90%);
|
||||||
|
//Functional @color
|
||||||
|
@color-success: #67c23a;
|
||||||
|
@color-warning: #e6a23c;
|
||||||
|
@color-danger: #f56c6c;
|
||||||
|
@color-info: #909399;
|
||||||
|
@color-red: #f00;
|
||||||
|
//Font color
|
||||||
|
@color-text-primary: #303133;
|
||||||
|
@color-text-regular: #606266;
|
||||||
|
@color-text-secondary: #909399;
|
||||||
|
@color-text-placeholder: #c0c4cc;
|
||||||
|
//Border color
|
||||||
|
@border-color-base: #dcdfe6;
|
||||||
|
@border-color-light: #e4e7ed;
|
||||||
|
@border-color-lighter: #ebeef5;
|
||||||
|
@border-color-extra-light: #f2f6fc;
|
||||||
|
//Background color
|
||||||
|
@color-white: #ffffff;
|
||||||
|
@color-black: #000000;
|
||||||
|
@background-color-base: #f5f7fa;
|
||||||
|
|
||||||
|
//阴影
|
||||||
|
@box-shadow-basic: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
//网站主题颜色
|
||||||
|
|
||||||
|
//欣影橙色色
|
||||||
|
@orange-color: #f08200;
|
||||||
|
//电网绿色
|
||||||
|
@green-color: #00a096;
|
@ -0,0 +1,52 @@
|
|||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
-webkit-user-select: none; /* Safari 3.1+ */
|
||||||
|
-moz-user-select: none; /* Firefox 2+ */
|
||||||
|
-ms-user-select: none; /* IE 10+ */
|
||||||
|
user-select: none; /* Standard syntax */
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app,
|
||||||
|
.wrapper {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "PingFang SC", "Helvetica Neue", Helvetica, "microsoft yahei",
|
||||||
|
arial, STHeiTi, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表格样式*/
|
||||||
|
.el-table-column--selection .cell {
|
||||||
|
padding-left: 14px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*滚动条样式*/
|
||||||
|
/* 整个滚动条 */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 滚动条上的滚动滑块 */
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background-color: #ccc;
|
||||||
|
/* 关键代码 */
|
||||||
|
border-radius: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 滚动条轨道 */
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
border-radius: 32px;
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: "iconfont"; /* Project id */
|
||||||
|
src: url('iconfont.ttf?t=1690188947515') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-family: "iconfont" !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-paizhao:before {
|
||||||
|
content: "\e6ba";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-paizhao-xianxing:before {
|
||||||
|
content: "\e8d1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-tuiguanglishitupianjinqun:before {
|
||||||
|
content: "\e613";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-gongsi:before {
|
||||||
|
content: "\e62e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dianli:before {
|
||||||
|
content: "\e649";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dianlihangye:before {
|
||||||
|
content: "\e791";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shexiangtoulixian:before {
|
||||||
|
content: "\e7b2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-video-camera:before {
|
||||||
|
content: "\e962";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shexiangtou-lixian:before {
|
||||||
|
content: "\ef1c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shexiangtou-zaixian:before {
|
||||||
|
content: "\ef1d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shudianxianlu_2722010801:before {
|
||||||
|
content: "\efed";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-tupian_normal:before {
|
||||||
|
content: "\e681";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: "iconfont"; /* Project id */
|
||||||
|
src: url('iconfont.ttf?t=1700030201509') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-family: "iconfont" !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-1wenhe:before {
|
||||||
|
content: "\e653";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-paizhao:before {
|
||||||
|
content: "\e6ba";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-paizhao-xianxing:before {
|
||||||
|
content: "\e8d1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-tuiguanglishitupianjinqun:before {
|
||||||
|
content: "\e613";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-gongsi:before {
|
||||||
|
content: "\e62e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dianli:before {
|
||||||
|
content: "\e649";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dianlihangye:before {
|
||||||
|
content: "\e791";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shexiangtoulixian:before {
|
||||||
|
content: "\e7b2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-video-camera:before {
|
||||||
|
content: "\e962";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-qixiang:before {
|
||||||
|
content: "\e67c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shexiangtou-lixian:before {
|
||||||
|
content: "\ef1c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shexiangtou-zaixian:before {
|
||||||
|
content: "\ef1d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shudianxianlu_2722010801:before {
|
||||||
|
content: "\efed";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-tupian_normal:before {
|
||||||
|
content: "\e681";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-fubing:before {
|
||||||
|
content: "\e7ac";
|
||||||
|
}
|
||||||
|
|
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 510 KiB |
After Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 635 KiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 553 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 6.7 KiB |
@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="wrapper">
|
||||||
|
<v-head></v-head>
|
||||||
|
<div class="content-box">
|
||||||
|
<div class="content">
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import vHead from "./header.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
vHead,
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
created() {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.wrapper {
|
||||||
|
min-width: 1366px;
|
||||||
|
.content-box {
|
||||||
|
position: absolute;
|
||||||
|
left: 0px;
|
||||||
|
right: 0;
|
||||||
|
top: 60px;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
-webkit-transition: left 0.3s ease-in-out;
|
||||||
|
transition: left 0.3s ease-in-out;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
overflow-y: auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,209 @@
|
|||||||
|
<template>
|
||||||
|
<div class="sidebar">
|
||||||
|
<el-menu
|
||||||
|
:default-active="activeIndex"
|
||||||
|
class="sidebar-el-menu"
|
||||||
|
mode="horizontal"
|
||||||
|
router
|
||||||
|
>
|
||||||
|
<template v-for="item in items">
|
||||||
|
<template v-if="item.subs">
|
||||||
|
<el-submenu :index="item.index" :key="item.index">
|
||||||
|
<template slot="title">
|
||||||
|
<i :class="item.icon"></i>
|
||||||
|
<span slot="title">{{ item.title }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-for="subItem in item.subs">
|
||||||
|
<el-submenu
|
||||||
|
v-if="subItem.subs"
|
||||||
|
:index="subItem.index"
|
||||||
|
:key="subItem.index"
|
||||||
|
>
|
||||||
|
<template slot="title">{{ subItem.title }}</template>
|
||||||
|
<el-menu-item
|
||||||
|
v-for="(threeItem, i) in subItem.subs"
|
||||||
|
:key="i"
|
||||||
|
:index="threeItem.index"
|
||||||
|
>{{ threeItem.title }}</el-menu-item
|
||||||
|
>
|
||||||
|
</el-submenu>
|
||||||
|
<el-menu-item
|
||||||
|
v-else
|
||||||
|
:index="subItem.index"
|
||||||
|
:key="subItem.index"
|
||||||
|
>{{ subItem.title }}</el-menu-item
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-menu-item :index="item.index" :key="item.index">
|
||||||
|
<i :class="item.icon"></i>
|
||||||
|
<span slot="title">{{ item.title }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-menu>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeIndex: "/weather",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
icon: "iconfont icon-qixiang",
|
||||||
|
index: "/weather",
|
||||||
|
title: "气象监测",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "iconfont icon-fubing",
|
||||||
|
index: "/icing",
|
||||||
|
title: "覆冰监测",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "el-icon-s-marketing",
|
||||||
|
index: "/equipmentStatus",
|
||||||
|
title: "设备状态",
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// icon: "el-icon-files",
|
||||||
|
// index: "/property",
|
||||||
|
// title: "资产管理",
|
||||||
|
// subs: [
|
||||||
|
// {
|
||||||
|
// index: "/lineInformation",
|
||||||
|
// title: "线路管理",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// index: "/towerInformation",
|
||||||
|
// title: "杆塔管理",
|
||||||
|
// },
|
||||||
|
|
||||||
|
// {
|
||||||
|
// index: "/photographicDevice",
|
||||||
|
// title: "监测终端管理",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route() {
|
||||||
|
this.setCurrentRoute();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setCurrentRoute() {
|
||||||
|
this.activeIndex = this.$route.path; // 通过他就可以监听到当前路由状态并激活当前菜单
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.setCurrentRoute();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.sidebar {
|
||||||
|
.el-menu--horizontal {
|
||||||
|
background: #1c77ac;
|
||||||
|
|
||||||
|
.el-menu-item {
|
||||||
|
height: 56px;
|
||||||
|
line-height: 56px;
|
||||||
|
}
|
||||||
|
.el-submenu .el-submenu__title {
|
||||||
|
height: 56px;
|
||||||
|
line-height: 56px;
|
||||||
|
}
|
||||||
|
.el-submenu__title {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.el-dropdown-menu__item,
|
||||||
|
.el-menu-item,
|
||||||
|
.el-submenu__title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.el-menu-item i {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.el-menu-item.is-active {
|
||||||
|
i {
|
||||||
|
color: #1c77ac;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-submenu.is-active .el-submenu__title > i {
|
||||||
|
&:first-child {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-menu {
|
||||||
|
background: #1c77ac;
|
||||||
|
|
||||||
|
i {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.el-menu-item {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.el-submenu .el-submenu__title {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.el-menu-item:not(.is-disabled):focus,
|
||||||
|
.el-menu-item:not(.is-disabled):hover {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #0e5b87;
|
||||||
|
border-bottom: 2px solid #0e5b87;
|
||||||
|
i {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-submenu:focus .el-submenu__title,
|
||||||
|
.el-submenu:hover .el-submenu__title {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #0e5b87;
|
||||||
|
border-bottom: 2px solid #0e5b87;
|
||||||
|
i {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-menu--horizontal > .el-menu-item.is-active {
|
||||||
|
border-bottom: 2px solid #0e5b87 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #0e5b87 !important;
|
||||||
|
i {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-submenu.is-active {
|
||||||
|
.el-submenu__title {
|
||||||
|
border-bottom: 2px solid #0e5b87 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #0e5b87;
|
||||||
|
i {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .gallery-thumbs .swiper-slide-active {
|
||||||
|
// border: 3px solid #1c77ac !important;
|
||||||
|
// }
|
||||||
|
// .tags-li.active {
|
||||||
|
// border: 1px solid #1c77ac;
|
||||||
|
// background-color: #1c77ac;
|
||||||
|
// }
|
||||||
|
.el-menu-item [class^="iconfont"] {
|
||||||
|
margin-right: 5px;
|
||||||
|
width: 24px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 18px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,121 @@
|
|||||||
|
<template>
|
||||||
|
<div class="header">
|
||||||
|
<div class="logoTitle">覆冰在线监测系统</div>
|
||||||
|
|
||||||
|
<div class="menuBox">
|
||||||
|
<vSidebar></vSidebar>
|
||||||
|
<div class="userInfo">
|
||||||
|
<div class="header-user-con">
|
||||||
|
<!-- 用户头像 -->
|
||||||
|
<div class="user-avator">
|
||||||
|
<img src="../assets/img/user.jpeg" />
|
||||||
|
</div>
|
||||||
|
<!-- 用户名下拉菜单 -->
|
||||||
|
<el-dropdown
|
||||||
|
class="user-name"
|
||||||
|
trigger="click"
|
||||||
|
@command="handleCommand"
|
||||||
|
>
|
||||||
|
<span class="el-dropdown-link">
|
||||||
|
{{ userName }}
|
||||||
|
<i class="el-icon-caret-bottom"></i>
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<!-- <el-dropdown-item command="changePwd"> 修改密码</el-dropdown-item> -->
|
||||||
|
<el-dropdown-item command="loginout">退出登录</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<password-dialog ref="passwordref"></password-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import vSidebar from "./Sidebar.vue";
|
||||||
|
import passwordDialog from "../components/passwordDialog.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
vSidebar,
|
||||||
|
passwordDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userName: localStorage.getItem("userName"),
|
||||||
|
role: localStorage.getItem("role"),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 用户名下拉菜单选择事件
|
||||||
|
handleCommand(command) {
|
||||||
|
switch (command) {
|
||||||
|
case "noticeShow": //公告
|
||||||
|
console.log(command);
|
||||||
|
break;
|
||||||
|
case "changePwd": //修改密码
|
||||||
|
this.$refs.passwordref.display();
|
||||||
|
break;
|
||||||
|
case "loginout": //退出登录
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "退出成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.$store.commit("REMOVE_INFO");
|
||||||
|
this.$router.push("/login");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.header {
|
||||||
|
width: calc(100% - 32px);
|
||||||
|
height: 56px;
|
||||||
|
background: #1c77ac;
|
||||||
|
line-height: 56px;
|
||||||
|
padding: 0px 16px;
|
||||||
|
display: flex;
|
||||||
|
.logoTitle {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #fff;
|
||||||
|
padding-right: 16px;
|
||||||
|
}
|
||||||
|
.menuBox {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.userInfo {
|
||||||
|
.header-user-con {
|
||||||
|
display: flex;
|
||||||
|
height: 56px;
|
||||||
|
align-items: center;
|
||||||
|
.user-avator {
|
||||||
|
margin-left: 16px;
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-name {
|
||||||
|
margin-left: 8px;
|
||||||
|
.el-dropdown-link {
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-select {
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
class="psdDialog"
|
||||||
|
title="修改密码"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="420px"
|
||||||
|
>
|
||||||
|
<el-form :model="psdForm" :rules="rules" ref="formInfo" label-position="left" label-width="80px">
|
||||||
|
<el-form-item label="用户名:">
|
||||||
|
<el-input v-model="psdForm.userName" autocomplete="off" :disabled="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="原密码:">
|
||||||
|
<el-input v-model="psdForm.originalPsd" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="新密码:">
|
||||||
|
<el-input v-model="psdForm.newPsd" autocomplete="off"></el-input>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="密码:">
|
||||||
|
<el-input v-model="psdForm.password" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="isShow = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { updateUserApi } from "@/utils/api/index";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow:false,
|
||||||
|
psdForm: {
|
||||||
|
userName: localStorage.getItem('userName'),
|
||||||
|
originalPsd: "",
|
||||||
|
newPsd: "",
|
||||||
|
password: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "请输入用户名", trigger: "blur" },
|
||||||
|
],
|
||||||
|
password: [
|
||||||
|
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||||
|
// { min: 6, max: 8, message: '请输入6-8位字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 保存确定操作
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.formInfo.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$set(this.psdForm,'userId',localStorage.getItem('userid'))
|
||||||
|
updateUserApi(this.psdForm)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message.success("修改成功,请重新登录");
|
||||||
|
this.isShow = false
|
||||||
|
this.$store.commit("REMOVE_INFO");
|
||||||
|
this.$router.push("/login");
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
display() {
|
||||||
|
this.isShow = true;
|
||||||
|
},
|
||||||
|
hide() {
|
||||||
|
this.isShow = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,71 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
import App from "./App.vue";
|
||||||
|
import router from "./router";
|
||||||
|
import store from "./store";
|
||||||
|
//import "./utils/rem"; //设置body文字大小
|
||||||
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
|
import "../src/assets/css/theme/index.css"; //l绿色主题
|
||||||
|
import ElementUI from "element-ui";
|
||||||
|
//样式
|
||||||
|
import "./assets/css/reset.css"; //默认样式
|
||||||
|
import "./assets/css/global.less"; //全局定义颜色
|
||||||
|
import "./assets/css/element.less"; //全局定义颜色
|
||||||
|
import "./assets/fonts/iconfont.css"; //按钮
|
||||||
|
|
||||||
|
//引入Echarts;
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
Vue.prototype.$echarts = echarts;
|
||||||
|
//引入日期// 注册全局 moment
|
||||||
|
import moment from "moment";
|
||||||
|
Vue.prototype.$moment = moment;
|
||||||
|
import { message } from "@/utils/resetMessage";
|
||||||
|
// import "element-ui/lib/theme-chalk/index.css";
|
||||||
|
Vue.use(ElementUI, {
|
||||||
|
size: "small",
|
||||||
|
});
|
||||||
|
//图片懒加载
|
||||||
|
//引入插件
|
||||||
|
// import VueLazyload from "vue-lazyload";
|
||||||
|
// //注册插件
|
||||||
|
// Vue.use(VueLazyload, {
|
||||||
|
// error: require("./assets/img/nodatapic2.jpg"),
|
||||||
|
// });
|
||||||
|
|
||||||
|
//挂载弹出信息
|
||||||
|
|
||||||
|
Vue.prototype.$message = message;
|
||||||
|
//防抖
|
||||||
|
Vue.directive("noMoreClick", {
|
||||||
|
inserted(el, binding) {
|
||||||
|
el.addEventListener("click", (e) => {
|
||||||
|
el.classList.add("is-disabled");
|
||||||
|
el.disabled = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
el.disabled = false;
|
||||||
|
el.classList.remove("is-disabled");
|
||||||
|
}, 2000); //我这里设置的是2000毫秒也就是2秒
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
//使用钩子函数对路由进行权限跳转
|
||||||
|
router.beforeEach((to, from, next) => {
|
||||||
|
document.title = `${to.meta.title} | 视频监控可视化平台`;
|
||||||
|
const role = localStorage.getItem("role");
|
||||||
|
const token = localStorage.getItem("token");
|
||||||
|
console.log(role, token);
|
||||||
|
if (!token && to.path !== "/login") {
|
||||||
|
//next("/login");
|
||||||
|
next({
|
||||||
|
path: "/login",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
new Vue({
|
||||||
|
router,
|
||||||
|
store,
|
||||||
|
render: (h) => h(App),
|
||||||
|
}).$mount("#app");
|
@ -0,0 +1,69 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
import VueRouter from "vue-router";
|
||||||
|
|
||||||
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
|
const routes = [
|
||||||
|
{ path: "/", redirect: "/login" },
|
||||||
|
{
|
||||||
|
path: "/weather",
|
||||||
|
component: () => import("../components/Home.vue"),
|
||||||
|
children: [
|
||||||
|
//气象检测
|
||||||
|
{
|
||||||
|
path: "/weather",
|
||||||
|
component: () => import("../views/weather/index.vue"),
|
||||||
|
name: "weather",
|
||||||
|
meta: { title: "气象检测", icon: "", keepAlive: true },
|
||||||
|
},
|
||||||
|
//覆冰
|
||||||
|
{
|
||||||
|
path: "/icing",
|
||||||
|
component: () => import("../views/icing/index.vue"),
|
||||||
|
name: "icing",
|
||||||
|
meta: { title: "覆冰", icon: "", keepAlive: true },
|
||||||
|
},
|
||||||
|
//设备状态
|
||||||
|
{
|
||||||
|
path: "/equipmentStatus",
|
||||||
|
component: () => import("../views/equipmentStatus/index.vue"),
|
||||||
|
name: "equipmentStatus",
|
||||||
|
meta: { title: "设备状态", icon: "", keepAlive: true },
|
||||||
|
},
|
||||||
|
//线路信息管理
|
||||||
|
{
|
||||||
|
path: "/lineInformation",
|
||||||
|
component: () => import("../views/lineInformation/index.vue"),
|
||||||
|
name: "lineInformation",
|
||||||
|
meta: { title: "线路管理", icon: "", keepAlive: true },
|
||||||
|
},
|
||||||
|
//杆塔信息管理
|
||||||
|
{
|
||||||
|
path: "/towerInformation",
|
||||||
|
component: () => import("../views/towerInformation/index.vue"),
|
||||||
|
name: "towerInformation",
|
||||||
|
meta: { title: "杆塔管理", icon: "", keepAlive: true },
|
||||||
|
},
|
||||||
|
//装置管理
|
||||||
|
{
|
||||||
|
path: "/photographicDevice",
|
||||||
|
component: () => import("../views/photographicDevice/index.vue"),
|
||||||
|
name: "photographicDevice",
|
||||||
|
meta: { title: "装置管理", icon: "", keepAlive: true },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/login",
|
||||||
|
component: () => import("../views/login/index.vue"),
|
||||||
|
meta: { title: "登录" },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const router = new VueRouter({
|
||||||
|
mode: "hash",
|
||||||
|
base: process.env.BASE_URL,
|
||||||
|
routes,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default router;
|
@ -0,0 +1,79 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
import Vuex from "vuex";
|
||||||
|
|
||||||
|
Vue.use(Vuex);
|
||||||
|
|
||||||
|
export default new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
//用户登录token 存储
|
||||||
|
token: "",
|
||||||
|
userName: "",
|
||||||
|
userid: "",
|
||||||
|
role: "",
|
||||||
|
currentData: "",
|
||||||
|
channelId: "",
|
||||||
|
termId: "",
|
||||||
|
protocol: "",
|
||||||
|
cmdId: "",
|
||||||
|
channelIdList: [],
|
||||||
|
},
|
||||||
|
getters: {
|
||||||
|
token: (state) => state.token,
|
||||||
|
userName: (state) => state.userName,
|
||||||
|
role: (state) => state.role,
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
//点击获取的左侧列表
|
||||||
|
currentData(state, currentData) {
|
||||||
|
state.currentData = currentData;
|
||||||
|
console.log("保存起来currentData", state.currentData);
|
||||||
|
localStorage.setItem("currentData", JSON.stringify(currentData));
|
||||||
|
},
|
||||||
|
|
||||||
|
channelId(state, channelId) {
|
||||||
|
state.channelId = channelId;
|
||||||
|
console.log("channelId", state.channelId);
|
||||||
|
localStorage.setItem("channelId", JSON.stringify(channelId));
|
||||||
|
},
|
||||||
|
termId(state, termId) {
|
||||||
|
state.termId = termId;
|
||||||
|
console.log("termId", state.termId);
|
||||||
|
localStorage.setItem("termId", JSON.stringify(termId));
|
||||||
|
},
|
||||||
|
|
||||||
|
protocol(state, protocol) {
|
||||||
|
state.protocol = protocol;
|
||||||
|
console.log("protocol", state.protocol);
|
||||||
|
localStorage.setItem("protocol", JSON.stringify(protocol));
|
||||||
|
},
|
||||||
|
cmdId(state, cmdId) {
|
||||||
|
state.cmdId = cmdId;
|
||||||
|
console.log("protocol", state.cmdId);
|
||||||
|
localStorage.setItem("protocol", JSON.stringify(cmdId));
|
||||||
|
},
|
||||||
|
channelIdList(state, channelIdList) {
|
||||||
|
state.channelIdList = channelIdList;
|
||||||
|
console.log("channelIdList", state.channelIdList);
|
||||||
|
localStorage.setItem("channelIdList", JSON.stringify(channelIdList));
|
||||||
|
},
|
||||||
|
|
||||||
|
SET_TOKEN(state, token) {
|
||||||
|
state.token = token;
|
||||||
|
localStorage.setItem("token", state.token);
|
||||||
|
},
|
||||||
|
SET_USERINFO(state, val) {
|
||||||
|
state.userName = val.userName;
|
||||||
|
state.userid = val.id;
|
||||||
|
state.role = val.role;
|
||||||
|
localStorage.setItem("userName", state.userName);
|
||||||
|
localStorage.setItem("userid", state.userid);
|
||||||
|
localStorage.setItem("role", state.role);
|
||||||
|
},
|
||||||
|
//退出清除locastorge
|
||||||
|
REMOVE_INFO(state) {
|
||||||
|
localStorage.clear();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {},
|
||||||
|
modules: {},
|
||||||
|
});
|
@ -0,0 +1,175 @@
|
|||||||
|
import request from "../request";
|
||||||
|
//获取登录
|
||||||
|
export function loginJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/login",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//获取线路树状结构
|
||||||
|
export function getdyTreeListJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getdyTreeList",
|
||||||
|
method: "get",
|
||||||
|
params: data,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//导出数据
|
||||||
|
export function getOnlineTerminalListExcel() {
|
||||||
|
return request({
|
||||||
|
url: "/api/getOnlineTerminalListExcel",
|
||||||
|
method: "post",
|
||||||
|
responseType: "blob",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//修改用户
|
||||||
|
export function updateUserApi(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/updateUser",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取装置总数图表
|
||||||
|
// export function getTermStatistics(data) {
|
||||||
|
// return request({
|
||||||
|
// url: "/api/getTermStatistics",
|
||||||
|
// method: "get",
|
||||||
|
// params: data,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
//线路
|
||||||
|
//1.线路列表信息
|
||||||
|
export function getLineListJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getLineList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//2.添加单个或者多个线路信息
|
||||||
|
export function addLineJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/addLine",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//3.删除新路信息
|
||||||
|
export function deleteLineJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/deleteLine",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//4.修改信息
|
||||||
|
export function updateLineJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/updateLine",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//获取电压等级列表
|
||||||
|
export function getdyListJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getdyList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//杆塔信息
|
||||||
|
//1.获取杆塔列表
|
||||||
|
export function getTowerListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getTowerList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//2.获取线路编号列表
|
||||||
|
export function getLineListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getLineList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//3.新增杆塔信息
|
||||||
|
export function addTowerApi(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/addTower",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//4.修改杆塔信息
|
||||||
|
export function updateTowerApi(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/updateTower",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//5.删除杆塔信息
|
||||||
|
export function delTowerApi(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/deleteTower",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function getTerminalJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getTerminalList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//添加设备信息
|
||||||
|
export function addTerminalJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/addTerminal",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//添加设备---获取-线路-杆塔
|
||||||
|
export function getLineAndGtInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getLineAndGtList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//修改设备信息
|
||||||
|
export function updateTerminalJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/updateTerminal",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//删除设备信息
|
||||||
|
export function deleteTerminalJoggle(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/deleteTerminal",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//规约版本
|
||||||
|
export function getProtocolList(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/getProtocolList",
|
||||||
|
method: "get",
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,338 @@
|
|||||||
|
<template>
|
||||||
|
<div class="equipmentStatus">
|
||||||
|
<div class="weatherContain">
|
||||||
|
<leftTree ref="sideTree"></leftTree>
|
||||||
|
<div class="rightTable">
|
||||||
|
<div class="dataBox">
|
||||||
|
<div class="fatherTableShowBox" v-if="!childFlag">
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
height="calc(100% - 40px)"
|
||||||
|
>
|
||||||
|
<el-table-column prop="line" label="线路"></el-table-column>
|
||||||
|
<el-table-column prop="pole" label="杆塔"></el-table-column>
|
||||||
|
<el-table-column prop="terminal" label="终端"></el-table-column>
|
||||||
|
<el-table-column prop="terminalStatus" label="终端状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i
|
||||||
|
class="el-icon-success"
|
||||||
|
v-if="scope.row.terminalStatus == '在线'"
|
||||||
|
></i>
|
||||||
|
<i
|
||||||
|
class="el-icon-error"
|
||||||
|
v-if="scope.row.terminalStatus == '离线'"
|
||||||
|
></i>
|
||||||
|
<span style="margin-left: 10px">{{
|
||||||
|
scope.row.terminalStatus
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="tension" label="拉力"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="lastHeartbeatTime"
|
||||||
|
label="最后心跳时间"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="signalStrength"
|
||||||
|
label="信号强度"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="batteryVoltage"
|
||||||
|
label="蓄电池电压"
|
||||||
|
></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pageNation">
|
||||||
|
<el-pagination
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
:current-page="page"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="sizes, prev, pager, next, jumper,total"
|
||||||
|
:total="total"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="childBox" v-else>
|
||||||
|
<!-- <div class="searchBox" ref="searchref">
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
:model="formdata"
|
||||||
|
class="demo-form-inline"
|
||||||
|
>
|
||||||
|
<el-form-item label="开始日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formdata.starttime"
|
||||||
|
type="date"
|
||||||
|
placeholder="开始日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formdata.endtime"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期"
|
||||||
|
class="ml10"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div> -->
|
||||||
|
<div class="childTableShowBox">
|
||||||
|
<el-table
|
||||||
|
:data="childTableDate"
|
||||||
|
style="width: 100%"
|
||||||
|
height="calc(100% - 40px)"
|
||||||
|
>
|
||||||
|
<el-table-column prop="line" label="线路"></el-table-column>
|
||||||
|
<el-table-column prop="pole" label="杆塔"></el-table-column>
|
||||||
|
<el-table-column prop="terminal" label="终端"></el-table-column>
|
||||||
|
<el-table-column prop="terminalStatus" label="终端状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i
|
||||||
|
class="el-icon-success"
|
||||||
|
v-if="scope.row.terminalStatus == '在线'"
|
||||||
|
></i>
|
||||||
|
<i
|
||||||
|
class="el-icon-error"
|
||||||
|
v-if="scope.row.terminalStatus == '离线'"
|
||||||
|
></i>
|
||||||
|
<span style="margin-left: 10px">{{
|
||||||
|
scope.row.terminalStatus
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="tension" label="拉力"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="lastHeartbeatTime"
|
||||||
|
label="最后心跳时间"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="signalStrength"
|
||||||
|
label="信号强度"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="batteryVoltage"
|
||||||
|
label="蓄电池电压"
|
||||||
|
></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="pageNation">
|
||||||
|
<el-pagination
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
:current-page="page"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="sizes, prev, pager, next, jumper,total"
|
||||||
|
:total="total"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import leftTree from "../../components/leftTree";
|
||||||
|
import { getTerminalJoggle } from "@/utils/api/index";
|
||||||
|
export default {
|
||||||
|
name: "equipmentStatus",
|
||||||
|
components: {
|
||||||
|
leftTree,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msg: "",
|
||||||
|
childFlag: false,
|
||||||
|
tableData: [],
|
||||||
|
childTableDate: [],
|
||||||
|
formdata: {},
|
||||||
|
page: 1, // 当前页数
|
||||||
|
pageSize: 20, // 每页数量
|
||||||
|
total: 0, //总条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
var that = this;
|
||||||
|
document.onkeydown = function (e) {
|
||||||
|
var key = window.event.keyCode;
|
||||||
|
if (key === 13) {
|
||||||
|
that.onSubmit(); // 触发事件
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.terminalList();
|
||||||
|
this.$set(
|
||||||
|
this.formdata,
|
||||||
|
"starttime",
|
||||||
|
new Date(new Date().toLocaleDateString()).getTime()
|
||||||
|
);
|
||||||
|
this.$set(this.formdata, "endtime", new Date().getTime());
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getCurrentData(data) {
|
||||||
|
console.log("执行父组件", data);
|
||||||
|
if (data.dyValue) {
|
||||||
|
console.log("电压");
|
||||||
|
this.msg = "公司所有数据";
|
||||||
|
this.childFlag = false;
|
||||||
|
this.tableData = [
|
||||||
|
{
|
||||||
|
line: "线路1",
|
||||||
|
pole: "杆塔1",
|
||||||
|
terminal: "终端1",
|
||||||
|
terminalStatus: "在线",
|
||||||
|
tension: 200,
|
||||||
|
lastHeartbeatTime: "2023-05-01 10:00:00",
|
||||||
|
signalStrength: 80,
|
||||||
|
batteryVoltage: 12.5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
line: "线路2",
|
||||||
|
pole: "杆塔2",
|
||||||
|
terminal: "终端2",
|
||||||
|
terminalStatus: "离线",
|
||||||
|
tension: 180,
|
||||||
|
lastHeartbeatTime: "2023-05-01 09:30:00",
|
||||||
|
signalStrength: 65,
|
||||||
|
batteryVoltage: 12.0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
line: "线路3",
|
||||||
|
pole: "杆塔3",
|
||||||
|
terminal: "终端3",
|
||||||
|
terminalStatus: "在线",
|
||||||
|
tension: 200,
|
||||||
|
lastHeartbeatTime: "2023-05-01 10:00:00",
|
||||||
|
signalStrength: 80,
|
||||||
|
batteryVoltage: 12.5,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
} else if (data.bsManufacturer) {
|
||||||
|
this.msg = "杆塔下所有数据";
|
||||||
|
this.childFlag = false;
|
||||||
|
this.tableData = [
|
||||||
|
{
|
||||||
|
line: "线路1",
|
||||||
|
pole: "杆塔1",
|
||||||
|
terminal: "终端1",
|
||||||
|
terminalStatus: "在线",
|
||||||
|
tension: 200,
|
||||||
|
lastHeartbeatTime: "2023-05-01 10:00:00",
|
||||||
|
signalStrength: 80,
|
||||||
|
batteryVoltage: 12.5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
line: "线路2",
|
||||||
|
pole: "杆塔2",
|
||||||
|
terminal: "终端2",
|
||||||
|
terminalStatus: "离线",
|
||||||
|
tension: 180,
|
||||||
|
lastHeartbeatTime: "2023-05-01 09:30:00",
|
||||||
|
signalStrength: 65,
|
||||||
|
batteryVoltage: 12.0,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
console.log("杆塔");
|
||||||
|
this.msg = "装置当天数据";
|
||||||
|
this.childFlag = true;
|
||||||
|
this.childTableDate = [
|
||||||
|
{
|
||||||
|
line: "线路1",
|
||||||
|
pole: "杆塔1",
|
||||||
|
terminal: "终端1",
|
||||||
|
terminalStatus: "在线",
|
||||||
|
tension: 200,
|
||||||
|
lastHeartbeatTime: "2023-05-01 10:00:00",
|
||||||
|
signalStrength: 80,
|
||||||
|
batteryVoltage: 12.5,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
terminalList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.$set(this.formdata, "pageindex", this.page);
|
||||||
|
this.$set(this.formdata, "pagesize", this.pageSize);
|
||||||
|
getTerminalJoggle(this.formdata)
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
// this.terminalTableData = res.data.list;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err); //代码错误、请求失败捕获
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onSubmit() {},
|
||||||
|
//点击分页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
// this.picList = [];
|
||||||
|
// this.getPicData();
|
||||||
|
},
|
||||||
|
//每页条数
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
//this.getPicData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.equipmentStatus {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px 12px;
|
||||||
|
background: #fff;
|
||||||
|
.weatherContain {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.rightTable {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
border-left: 1px solid #ddd;
|
||||||
|
.el-icon-success {
|
||||||
|
color: #67c23a;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.el-icon-error {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.dataBox {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px 12px;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.fatherTableShowBox {
|
||||||
|
height: calc(100% - 0px);
|
||||||
|
}
|
||||||
|
.childBox {
|
||||||
|
height: 100%;
|
||||||
|
.childTableShowBox {
|
||||||
|
height: calc(100% - 0px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,330 @@
|
|||||||
|
<template>
|
||||||
|
<div class="icingBox">
|
||||||
|
<div class="icingContain">
|
||||||
|
<leftTree ref="sideTree"></leftTree>
|
||||||
|
<div class="rightTable">
|
||||||
|
<div class="dataBox">
|
||||||
|
<div class="childBox">
|
||||||
|
<div class="searchBox" ref="searchref">
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
:model="formdata"
|
||||||
|
class="demo-form-inline"
|
||||||
|
>
|
||||||
|
<el-form-item label="开始日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formdata.starttime"
|
||||||
|
type="date"
|
||||||
|
placeholder="开始日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formdata.endtime"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期"
|
||||||
|
class="ml10"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit"
|
||||||
|
>导出数据</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="childTableShowBox">
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
height="calc(100% - 40px)"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="terminalNumber"
|
||||||
|
label="监测终端编号"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column prop="time" label="时间"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="functionalUnitIdentifier"
|
||||||
|
label="功能单元识别码"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="maxPullForceKg"
|
||||||
|
label="最大拉力(Kg)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="maxPullForceWindBiasAngle"
|
||||||
|
label="最大拉力时风偏角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="maxPullForceTiltAngle"
|
||||||
|
label="最大拉力时倾斜角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="minPullForceKg"
|
||||||
|
label="最小拉力(Kg)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="minPullForceWindBiasAngle"
|
||||||
|
label="最小拉力时风偏角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="minPullForceTiltAngle"
|
||||||
|
label="最小拉力时倾斜角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="maxWindBiasAngle"
|
||||||
|
label="最大风偏角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="maxWindBiasAngleTiltAngle"
|
||||||
|
label="最大风偏角时倾斜角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="maxWindBiasAnglePullForceKg"
|
||||||
|
label="最大风偏角时拉力(Kg)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="minWindBiasAngle"
|
||||||
|
label="最小风偏角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="minWindBiasAngleTiltAngle"
|
||||||
|
label="最小风偏角时倾斜角(°)"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="minWindBiasAnglePullForceKg"
|
||||||
|
label="最小风偏角时拉力(Kg)"
|
||||||
|
></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="pageNation">
|
||||||
|
<el-pagination
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
:current-page="page"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="sizes, prev, pager, next, jumper,total"
|
||||||
|
:total="total"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import leftTree from "../../components/leftTree";
|
||||||
|
export default {
|
||||||
|
name: "icing",
|
||||||
|
components: {
|
||||||
|
leftTree,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msg: "",
|
||||||
|
childFlag: false,
|
||||||
|
tableData: [],
|
||||||
|
formdata: {},
|
||||||
|
page: 1, // 当前页数
|
||||||
|
pageSize: 20, // 每页数量
|
||||||
|
total: 0, //总条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
var that = this;
|
||||||
|
document.onkeydown = function (e) {
|
||||||
|
var key = window.event.keyCode;
|
||||||
|
if (key === 13) {
|
||||||
|
that.onSubmit(); // 触发事件
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$set(
|
||||||
|
this.formdata,
|
||||||
|
"starttime",
|
||||||
|
new Date(new Date().toLocaleDateString()).getTime()
|
||||||
|
);
|
||||||
|
this.$set(this.formdata, "endtime", new Date().getTime());
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getCurrentData(data) {
|
||||||
|
console.log("执行父组件", data);
|
||||||
|
if (data.dyValue) {
|
||||||
|
console.log("电压");
|
||||||
|
|
||||||
|
this.tableData = [
|
||||||
|
{
|
||||||
|
terminalNumber: "终端A",
|
||||||
|
time: "2023-03-15 08:00:00",
|
||||||
|
functionalUnitIdentifier: "功能单元1",
|
||||||
|
maxPullForceKg: "20Kg",
|
||||||
|
maxPullForceWindBiasAngle: "60°",
|
||||||
|
maxPullForceTiltAngle: "30°",
|
||||||
|
minPullForceKg: "5Kg",
|
||||||
|
minPullForceWindBiasAngle: "30°",
|
||||||
|
minPullForceTiltAngle: "20°",
|
||||||
|
maxWindBiasAngle: "70°",
|
||||||
|
maxWindBiasAngleTiltAngle: "45°",
|
||||||
|
maxWindBiasAnglePullForceKg: "15Kg",
|
||||||
|
minWindBiasAngle: "20°",
|
||||||
|
minWindBiasAngleTiltAngle: "30°",
|
||||||
|
minWindBiasAnglePullForceKg: "8Kg",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
terminalNumber: "终端A",
|
||||||
|
time: "2023-03-15 08:00:00",
|
||||||
|
functionalUnitIdentifier: "功能单元1",
|
||||||
|
maxPullForceKg: "20Kg",
|
||||||
|
maxPullForceWindBiasAngle: "60°",
|
||||||
|
maxPullForceTiltAngle: "30°",
|
||||||
|
minPullForceKg: "5Kg",
|
||||||
|
minPullForceWindBiasAngle: "30°",
|
||||||
|
minPullForceTiltAngle: "20°",
|
||||||
|
maxWindBiasAngle: "70°",
|
||||||
|
maxWindBiasAngleTiltAngle: "45°",
|
||||||
|
maxWindBiasAnglePullForceKg: "15Kg",
|
||||||
|
minWindBiasAngle: "20°",
|
||||||
|
minWindBiasAngleTiltAngle: "30°",
|
||||||
|
minWindBiasAnglePullForceKg: "8Kg",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
terminalNumber: "终端A",
|
||||||
|
time: "2023-03-15 08:00:00",
|
||||||
|
functionalUnitIdentifier: "功能单元1",
|
||||||
|
maxPullForceKg: "20Kg",
|
||||||
|
maxPullForceWindBiasAngle: "60°",
|
||||||
|
maxPullForceTiltAngle: "30°",
|
||||||
|
minPullForceKg: "5Kg",
|
||||||
|
minPullForceWindBiasAngle: "30°",
|
||||||
|
minPullForceTiltAngle: "20°",
|
||||||
|
maxWindBiasAngle: "70°",
|
||||||
|
maxWindBiasAngleTiltAngle: "45°",
|
||||||
|
maxWindBiasAnglePullForceKg: "15Kg",
|
||||||
|
minWindBiasAngle: "20°",
|
||||||
|
minWindBiasAngleTiltAngle: "30°",
|
||||||
|
minWindBiasAnglePullForceKg: "8Kg",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
} else if (data.bsManufacturer) {
|
||||||
|
this.tableData = [
|
||||||
|
{
|
||||||
|
terminalNumber: "终端A",
|
||||||
|
time: "2023-03-15 08:00:00",
|
||||||
|
functionalUnitIdentifier: "功能单元1",
|
||||||
|
maxPullForceKg: "20Kg",
|
||||||
|
maxPullForceWindBiasAngle: "60°",
|
||||||
|
maxPullForceTiltAngle: "30°",
|
||||||
|
minPullForceKg: "5Kg",
|
||||||
|
minPullForceWindBiasAngle: "30°",
|
||||||
|
minPullForceTiltAngle: "20°",
|
||||||
|
maxWindBiasAngle: "70°",
|
||||||
|
maxWindBiasAngleTiltAngle: "45°",
|
||||||
|
maxWindBiasAnglePullForceKg: "15Kg",
|
||||||
|
minWindBiasAngle: "20°",
|
||||||
|
minWindBiasAngleTiltAngle: "30°",
|
||||||
|
minWindBiasAnglePullForceKg: "8Kg",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
terminalNumber: "终端A",
|
||||||
|
time: "2023-03-15 08:00:00",
|
||||||
|
functionalUnitIdentifier: "功能单元1",
|
||||||
|
maxPullForceKg: "20Kg",
|
||||||
|
maxPullForceWindBiasAngle: "60°",
|
||||||
|
maxPullForceTiltAngle: "30°",
|
||||||
|
minPullForceKg: "5Kg",
|
||||||
|
minPullForceWindBiasAngle: "30°",
|
||||||
|
minPullForceTiltAngle: "20°",
|
||||||
|
maxWindBiasAngle: "70°",
|
||||||
|
maxWindBiasAngleTiltAngle: "45°",
|
||||||
|
maxWindBiasAnglePullForceKg: "15Kg",
|
||||||
|
minWindBiasAngle: "20°",
|
||||||
|
minWindBiasAngleTiltAngle: "30°",
|
||||||
|
minWindBiasAnglePullForceKg: "8Kg",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
console.log("杆塔");
|
||||||
|
this.tableData = [
|
||||||
|
{
|
||||||
|
terminalNumber: "终端A",
|
||||||
|
time: "2023-03-15 08:00:00",
|
||||||
|
functionalUnitIdentifier: "功能单元1",
|
||||||
|
maxPullForceKg: "20Kg",
|
||||||
|
maxPullForceWindBiasAngle: "60°",
|
||||||
|
maxPullForceTiltAngle: "30°",
|
||||||
|
minPullForceKg: "5Kg",
|
||||||
|
minPullForceWindBiasAngle: "30°",
|
||||||
|
minPullForceTiltAngle: "20°",
|
||||||
|
maxWindBiasAngle: "70°",
|
||||||
|
maxWindBiasAngleTiltAngle: "45°",
|
||||||
|
maxWindBiasAnglePullForceKg: "15Kg",
|
||||||
|
minWindBiasAngle: "20°",
|
||||||
|
minWindBiasAngleTiltAngle: "30°",
|
||||||
|
minWindBiasAnglePullForceKg: "8Kg",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {},
|
||||||
|
//点击分页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
// this.picList = [];
|
||||||
|
// this.getPicData();
|
||||||
|
},
|
||||||
|
//每页条数
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
//this.getPicData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.icingBox {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px 12px;
|
||||||
|
background: #fff;
|
||||||
|
.icingContain {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.rightTable {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
border-left: 1px solid #ddd;
|
||||||
|
.dataBox {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px 12px;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
// .fatherTableShowBox {
|
||||||
|
// height: calc(100% - 0px);
|
||||||
|
// }
|
||||||
|
.childBox {
|
||||||
|
height: calc(100% - 0px);
|
||||||
|
.childTableShowBox {
|
||||||
|
height: calc(100% - 91px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,135 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
class="addtowerDialogline"
|
||||||
|
title="新增杆塔"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="420px"
|
||||||
|
@close="handleclose"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
label-position="left"
|
||||||
|
label-width="92px"
|
||||||
|
ref="formLineInfo"
|
||||||
|
:rules="rules"
|
||||||
|
:model="formdata"
|
||||||
|
>
|
||||||
|
<el-form-item label="线路名称:" prop="lineId">
|
||||||
|
<el-input
|
||||||
|
v-model="formdata.lineId"
|
||||||
|
autocomplete="off"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="杆塔名称:" prop="towerName">
|
||||||
|
<el-input v-model="formdata.towerName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="杆塔地址:" prop="address">
|
||||||
|
<el-input v-model="formdata.address" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="isShow = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { addTowerApi } from "@/utils/api/index";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
lineDialogTitle: String,
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
formdata: {},
|
||||||
|
dyOptions: "",
|
||||||
|
rules: {
|
||||||
|
towerName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入杆塔名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// address: [
|
||||||
|
// { required: true, message: "请输入杆塔地址", trigger: "blur" },
|
||||||
|
// ],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//判断
|
||||||
|
getdataform(val) {
|
||||||
|
//this.formdata = val;
|
||||||
|
this.formdata = JSON.parse(JSON.stringify(val));
|
||||||
|
this.formdata.lineId = val.name;
|
||||||
|
},
|
||||||
|
// 保存确定操作
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.formLineInfo.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// 走保存请求
|
||||||
|
|
||||||
|
addTowerApi({
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
lineId: this.formdata.id,
|
||||||
|
name: this.formdata.towerName,
|
||||||
|
address: this.formdata.address,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "新增杆塔成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.$parent.lineList();
|
||||||
|
this.isShow = false;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "添加失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
display() {
|
||||||
|
this.isShow = true;
|
||||||
|
},
|
||||||
|
hide() {
|
||||||
|
this.isShow = false;
|
||||||
|
},
|
||||||
|
handleclose() {
|
||||||
|
this.$parent.lineList();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.addtowerDialogline {
|
||||||
|
.el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,252 @@
|
|||||||
|
<template>
|
||||||
|
<div class="lineInformation">
|
||||||
|
<div class="lineBox">
|
||||||
|
<div class="lineBtnGroup">
|
||||||
|
<h4>线路信息管理</h4>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleAddLine()"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lineTable">
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="lineTableData"
|
||||||
|
stripe
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
height="calc(100% - 40px)"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@row-click="handleRowClick"
|
||||||
|
v-loading="loading"
|
||||||
|
highlight-current-row
|
||||||
|
:row-key="getRowKeys"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="55"> </el-table-column> -->
|
||||||
|
<!-- <el-table-column type="index" width="55"> </el-table-column> -->
|
||||||
|
<template slot="empty">
|
||||||
|
<el-empty :image-size="160" description="暂无数据"></el-empty>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="公司名称" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.bsManufacturer
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="dyLevelname"
|
||||||
|
label="电压等级名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="120"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column
|
||||||
|
prop="id"
|
||||||
|
label="线路编号"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="120"
|
||||||
|
>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="线路名称"
|
||||||
|
min-width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="status"
|
||||||
|
label="是否启用"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="120"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.status == 1 ? "已启用" : "未启用" }}</template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click.native.stop="handleResive(scope.row)"
|
||||||
|
type="text"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button @click.native.stop="handleTower(scope.row)" type="text"
|
||||||
|
>新增杆塔</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
class="deleteText"
|
||||||
|
@click.native.stop="handleDelete(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pageNation">
|
||||||
|
<el-pagination
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
:current-page="page"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="sizes, prev, pager, next, jumper,total"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 新增线路 -->
|
||||||
|
<add-lineDialog
|
||||||
|
:lineDialogTitle="lineDialogTitle"
|
||||||
|
ref="addlineDialogref"
|
||||||
|
></add-lineDialog>
|
||||||
|
<!-- 新增杆塔 -->
|
||||||
|
<add-towerDialog ref="addTowerDialogref"></add-towerDialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getLineListJoggle, deleteLineJoggle } from "@/utils/api/index";
|
||||||
|
import addLineDialog from "./components/addLineDialog.vue";
|
||||||
|
import addTowerDialog from "./components/addTowerDialog.vue";
|
||||||
|
export default {
|
||||||
|
name: "lineInformation",
|
||||||
|
components: {
|
||||||
|
addLineDialog,
|
||||||
|
addTowerDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
lineDialogTitle: "", //弹窗标题
|
||||||
|
lineTableData: [],
|
||||||
|
//multipleSelection: [], //获取当前选中
|
||||||
|
page: 1, // 当前页数
|
||||||
|
pageSize: 20, // 每页数量
|
||||||
|
total: 0, //总条数
|
||||||
|
loading: true,
|
||||||
|
formdata: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {
|
||||||
|
this.lineList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getRowKeys(row) {
|
||||||
|
return row.id;
|
||||||
|
},
|
||||||
|
//获取线路列表数据
|
||||||
|
lineList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.$set(this.formdata, "pageindex", this.page);
|
||||||
|
this.$set(this.formdata, "pagesize", this.pageSize);
|
||||||
|
getLineListJoggle(this.formdata)
|
||||||
|
.then((res) => {
|
||||||
|
this.lineTableData = res.data.list;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
},
|
||||||
|
//点击行选中
|
||||||
|
handleRowClick(row, column, event) {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(row);
|
||||||
|
},
|
||||||
|
//获取选中的行
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新建弹窗
|
||||||
|
handleAddLine() {
|
||||||
|
this.lineDialogTitle = "新增";
|
||||||
|
this.$refs.addlineDialogref.display();
|
||||||
|
this.$refs.addlineDialogref.getdataform(null);
|
||||||
|
},
|
||||||
|
|
||||||
|
//handleResive 修改线路数据
|
||||||
|
handleResive(data) {
|
||||||
|
console.log(data);
|
||||||
|
this.lineDialogTitle = "修改";
|
||||||
|
this.$refs.addlineDialogref.display();
|
||||||
|
this.$refs.addlineDialogref.getdataform(data);
|
||||||
|
},
|
||||||
|
//新增杆塔
|
||||||
|
handleTower(data) {
|
||||||
|
console.log(data);
|
||||||
|
this.$refs.addTowerDialogref.display();
|
||||||
|
this.$refs.addTowerDialogref.getdataform(data);
|
||||||
|
},
|
||||||
|
|
||||||
|
//删除数据
|
||||||
|
handleDelete(data) {
|
||||||
|
let deleteArr = [];
|
||||||
|
deleteArr.push({
|
||||||
|
id: data.id,
|
||||||
|
});
|
||||||
|
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
deleteLineJoggle({ list: deleteArr }).then((res) => {
|
||||||
|
this.lineList(); //刷新
|
||||||
|
});
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
type: "success",
|
||||||
|
message: "删除成功!",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// this.$message({
|
||||||
|
// duration: 1500,
|
||||||
|
// showClose: true,
|
||||||
|
// type: "info",
|
||||||
|
// message: "已取消删除",
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击分页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
this.lineList();
|
||||||
|
},
|
||||||
|
//每页条数
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.lineList();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.lineInformation {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px 12px;
|
||||||
|
background: #fff;
|
||||||
|
.lineBox {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineBtnGroup {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineTable {
|
||||||
|
margin-top: 16px;
|
||||||
|
height: calc(100% - 46px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,196 @@
|
|||||||
|
<template>
|
||||||
|
<div class="login-wrap">
|
||||||
|
<div class="bs_logintop">
|
||||||
|
<span>欢迎登录</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="loginFilter">
|
||||||
|
<h3>覆冰在线监测系统</h3>
|
||||||
|
<p class="english">icing load on-line monitoring system</p>
|
||||||
|
<div class="ms-login">
|
||||||
|
<el-form
|
||||||
|
:model="userInfo"
|
||||||
|
:rules="rules"
|
||||||
|
ref="loginForm"
|
||||||
|
label-width="0px"
|
||||||
|
class="ms-content"
|
||||||
|
size="medium"
|
||||||
|
>
|
||||||
|
<el-form-item prop="userName">
|
||||||
|
<el-input v-model="userInfo.userName" placeholder="用户名">
|
||||||
|
<span slot="prepend" class="el-icon-user"></span>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input
|
||||||
|
type="password"
|
||||||
|
placeholder="密码"
|
||||||
|
show-password
|
||||||
|
v-model="userInfo.password"
|
||||||
|
@keyup.enter.native="submitForm()"
|
||||||
|
>
|
||||||
|
<span slot="prepend" class="el-icon-lock"></span>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="login-btn">
|
||||||
|
<el-button type="primary" @click="submitForm()">登录</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p class="webInfo">© 2023 覆冰在线监测系统.All right reserved.</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapMutations } from "vuex";
|
||||||
|
import { loginJoggle } from "@/utils/api/index";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {},
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
userInfo: {
|
||||||
|
userName: "",
|
||||||
|
password: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "请输入用户名", trigger: "blur" },
|
||||||
|
],
|
||||||
|
password: [
|
||||||
|
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||||
|
// { min: 6, max: 8, message: "请输入6-8位字符", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
token: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapMutations(["SET_TOKEN", "SET_USERINFO"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.loginForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
loginJoggle(this.userInfo)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中
|
||||||
|
this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中
|
||||||
|
console.log(res.data);
|
||||||
|
this.$router.push("/weather");
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "登录成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
} else {
|
||||||
|
this.$message.error("请输入账号和密码");
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getLogin() {},
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.login-wrap {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #1c77ac;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center top;
|
||||||
|
overflow: hidden;
|
||||||
|
background-size: cover;
|
||||||
|
overflow: hidden;
|
||||||
|
.bs_logintop {
|
||||||
|
height: 47px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
background: url(../../assets/img/loginbg1.png) repeat-x;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
span {
|
||||||
|
color: #fff;
|
||||||
|
line-height: 47px;
|
||||||
|
background: url(../../assets/img/loginsj.png) no-repeat 21px 16px;
|
||||||
|
text-indent: 44px;
|
||||||
|
color: #afc5d2;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginFilter {
|
||||||
|
background: url(../../assets/img/loginbg3.png) no-repeat center center;
|
||||||
|
width: 100%;
|
||||||
|
height: 585px;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute;
|
||||||
|
top: 47px;
|
||||||
|
h3 {
|
||||||
|
width: 100%;
|
||||||
|
//height: 71px;
|
||||||
|
margin-top: 120px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28px;
|
||||||
|
color: white;
|
||||||
|
font-family: "微软雅黑";
|
||||||
|
}
|
||||||
|
.english {
|
||||||
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
color: white;
|
||||||
|
font-family: "微软雅黑";
|
||||||
|
}
|
||||||
|
.ms-login {
|
||||||
|
width: 692px;
|
||||||
|
height: 373px;
|
||||||
|
margin: 0 auto;
|
||||||
|
position: relative;
|
||||||
|
background: url(../../assets/img/logininfo3.png) no-repeat;
|
||||||
|
margin-top: 32px;
|
||||||
|
.ms-content {
|
||||||
|
position: absolute;
|
||||||
|
width: 340px;
|
||||||
|
left: 283px;
|
||||||
|
top: 108px;
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.login-btn {
|
||||||
|
text-align: center;
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
height: 36px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.webInfo {
|
||||||
|
bottom: 5%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%;-50%);
|
||||||
|
position: absolute;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,145 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
class="addtowerDialog"
|
||||||
|
title="修改杆塔"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="470px"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
label-position="left"
|
||||||
|
ref="formInfo"
|
||||||
|
label-width="100px"
|
||||||
|
:rules="rules"
|
||||||
|
:model="formdata"
|
||||||
|
>
|
||||||
|
<el-form-item label="线路名称:" prop="lineId">
|
||||||
|
<el-select v-model="formdata.lineId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in lineOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="杆塔名称:" prop="name">
|
||||||
|
<el-input v-model="formdata.towerName" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="杆塔地址:" prop="address">
|
||||||
|
<el-input v-model="formdata.address" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序号:" prop="order">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="formdata.order"
|
||||||
|
:min="0"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="isShow = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getLineListApi, addTowerApi, updateTowerApi } from "@/utils/api/index";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
lineOptions: [],
|
||||||
|
formdata: {},
|
||||||
|
rules: {
|
||||||
|
towerName: [
|
||||||
|
{ required: true, message: "请输入杆塔名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
lineId: [
|
||||||
|
{ required: true, message: "请选择线路编号", trigger: "blur" },
|
||||||
|
],
|
||||||
|
// address: [
|
||||||
|
// { required: true, message: "请输入杆塔地址", trigger: "blur" },
|
||||||
|
// ],
|
||||||
|
order: [{ required: true, message: "请输入排序号", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getLineListdata();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getLineListdata() {
|
||||||
|
getLineListApi({ pageindex: 1, pagesize: 100 })
|
||||||
|
.then((res) => {
|
||||||
|
this.lineOptions = res.data.list;
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
},
|
||||||
|
//判断
|
||||||
|
getdataform(val) {
|
||||||
|
//this.formdata = val;
|
||||||
|
this.formdata.order = 0;
|
||||||
|
this.formdata = JSON.parse(JSON.stringify(val));
|
||||||
|
},
|
||||||
|
// 保存确定操作
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.formInfo.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
updateTowerApi({
|
||||||
|
id: this.formdata.towerId,
|
||||||
|
name: this.formdata.towerName,
|
||||||
|
address: null,
|
||||||
|
lineId: this.formdata.lineId,
|
||||||
|
lineName: this.formdata.lineName,
|
||||||
|
order: this.formdata.order,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.isShow = false;
|
||||||
|
//this.$message.success("修改成功");
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "修改成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.$parent.terminalList(); //刷新
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
//this.$message.error("修改失败");
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "修改失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
display() {
|
||||||
|
this.isShow = true;
|
||||||
|
},
|
||||||
|
hide() {
|
||||||
|
this.isShow = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.addtowerDialog {
|
||||||
|
.el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-input-number {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-input-number .el-input__inner {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,362 @@
|
|||||||
|
<template>
|
||||||
|
<div class="photoGraphicDevice">
|
||||||
|
<div class="photoBox">
|
||||||
|
<div class="photoGraphicBtnGroup">
|
||||||
|
<h4>监测终端管理</h4>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handleAddPhoto()"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="photoGraphicTable">
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="terminalTableData"
|
||||||
|
stripe
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
height="calc(100% - 40px)"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@row-click="handleRowClick"
|
||||||
|
v-loading="loading"
|
||||||
|
highlight-current-row
|
||||||
|
:row-key="getRowKeys"
|
||||||
|
>
|
||||||
|
<el-table-column prop="dyName" label="电压等级" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<template slot="empty">
|
||||||
|
<el-empty :image-size="160" description="暂无数据"></el-empty>
|
||||||
|
</template>
|
||||||
|
<el-table-column
|
||||||
|
prop="lineName"
|
||||||
|
label="线路名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="120"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link @click.native.stop="handleLine(scope.row)">{{
|
||||||
|
scope.row.lineName
|
||||||
|
}}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="towerName"
|
||||||
|
label="杆塔名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link @click.native.stop="handleTower(scope.row)">{{
|
||||||
|
scope.row.towerName
|
||||||
|
}}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equipName"
|
||||||
|
label="设备名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="cmdId"
|
||||||
|
label="设备编号"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="protocolName"
|
||||||
|
label="规约名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="isonline"
|
||||||
|
label="是否在线"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isonline ? "在线" : "离线" }}</template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="hasPan"
|
||||||
|
label="是否带云台"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.hasPan == 1 ? "是" : "否" }}</template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column prop="sim" label="SIM卡号" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="netType"
|
||||||
|
label="网络类型"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.netType == 1"> 移动</span>
|
||||||
|
<span v-if="scope.row.netType == 2"> 联通</span>
|
||||||
|
<span v-if="scope.row.netType == 3"> 电信</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column prop="model" label="装置型号" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="bsManufacturer"
|
||||||
|
label="装置厂家"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="workingDate"
|
||||||
|
label="投运日期"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
scope.row.workingDate == null
|
||||||
|
? ""
|
||||||
|
: $moment(scope.row.workingDate).format("yy-MM-DD")
|
||||||
|
}}</template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="status"
|
||||||
|
label="装置状态"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-if="roleUser != 2"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.status == 1 ? "运行中" : "已删除" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column fixed="right" label="操作" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click.native.stop="handleRevisePhoto(scope.row)"
|
||||||
|
type="text"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
class="deleteText"
|
||||||
|
@click.native.stop="handleDelete(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pageNation">
|
||||||
|
<el-pagination
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
:current-page="page"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="sizes, prev, pager, next, jumper,total"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<addPhotoDialog
|
||||||
|
:photoDialogTitle="photoDialogTitle"
|
||||||
|
ref="addPhotoDialogref"
|
||||||
|
></addPhotoDialog>
|
||||||
|
|
||||||
|
<!-- 新增线路 -->
|
||||||
|
<add-lineDialog ref="addlineDialogref"></add-lineDialog>
|
||||||
|
<towerDialog ref="towerDialogref"></towerDialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getTerminalJoggle, deleteTerminalJoggle } from "@/utils/api/index";
|
||||||
|
import moment from "moment";
|
||||||
|
import addPhotoDialog from "./components/addPhotoDialog.vue";
|
||||||
|
|
||||||
|
import addLineDialog from "./components/addLineDialog.vue";
|
||||||
|
import towerDialog from "./components/towerDialog.vue";
|
||||||
|
export default {
|
||||||
|
name: "photographicDevice",
|
||||||
|
components: {
|
||||||
|
addPhotoDialog,
|
||||||
|
addLineDialog,
|
||||||
|
towerDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formdata: {},
|
||||||
|
roleUser: "",
|
||||||
|
terminalTableData: [], //表格数据
|
||||||
|
photoDialog: false, //新增弹窗
|
||||||
|
photoDialogTitle: "", //弹窗标题
|
||||||
|
deleteArr: [], //删除数组
|
||||||
|
multipleSelection: [], //当前选中数组
|
||||||
|
formphotoInfo: {}, //弹窗传值
|
||||||
|
page: 1, // 当前页数
|
||||||
|
pageSize: 20, // 每页数量
|
||||||
|
total: 0, //总条数
|
||||||
|
loading: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.roleUser = localStorage.getItem("role");
|
||||||
|
console.log(this.roleUser);
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.terminalList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getRowKeys(row) {
|
||||||
|
return row.id;
|
||||||
|
},
|
||||||
|
//点击线路跳转
|
||||||
|
handleLineLink(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.$router.push({
|
||||||
|
path: "/lineInformation",
|
||||||
|
query: { lineName: val.lineName, name: val.towerName },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击杆塔跳转
|
||||||
|
handletowerLink(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.$router.push({
|
||||||
|
path: "/towerInformation",
|
||||||
|
query: { lineName: val.lineName, name: val.towerName },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取拍照装置列表数据
|
||||||
|
terminalList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.$set(this.formdata, "pageindex", this.page);
|
||||||
|
this.$set(this.formdata, "pagesize", this.pageSize);
|
||||||
|
getTerminalJoggle(this.formdata)
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.terminalTableData = res.data.list;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err); //代码错误、请求失败捕获
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击行选中当前行
|
||||||
|
handleRowClick(row, column, event) {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(row);
|
||||||
|
},
|
||||||
|
//获取选中的行
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val;
|
||||||
|
},
|
||||||
|
// 新建弹窗
|
||||||
|
handleAddPhoto() {
|
||||||
|
this.photoDialogTitle = "新增";
|
||||||
|
this.$refs.addPhotoDialogref.display();
|
||||||
|
this.$refs.addPhotoDialogref.getdataform(null);
|
||||||
|
},
|
||||||
|
handleLine(data) {
|
||||||
|
this.$refs.addlineDialogref.display();
|
||||||
|
this.$refs.addlineDialogref.getdataform(data);
|
||||||
|
},
|
||||||
|
handleTower(data) {
|
||||||
|
this.$refs.towerDialogref.display();
|
||||||
|
this.$refs.towerDialogref.getdataform(data);
|
||||||
|
},
|
||||||
|
//handleResive 修改线路数据
|
||||||
|
handleRevisePhoto(data) {
|
||||||
|
this.photoDialogTitle = "修改";
|
||||||
|
this.$refs.addPhotoDialogref.display();
|
||||||
|
this.$refs.addPhotoDialogref.getdataform(data);
|
||||||
|
console.log(data);
|
||||||
|
},
|
||||||
|
//删除数据
|
||||||
|
handleDelete(data) {
|
||||||
|
console.log(data);
|
||||||
|
this.deleteArr.push({
|
||||||
|
termid: data.id,
|
||||||
|
});
|
||||||
|
console.log(this.deleteArr);
|
||||||
|
this.$confirm("确定要关闭该装置?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
// 行设置向后台请求删除数据
|
||||||
|
deleteTerminalJoggle({ list: this.deleteArr, type: 0 }).then(
|
||||||
|
(res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.deleteArr = [];
|
||||||
|
this.terminalList(); //刷新
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
type: "success",
|
||||||
|
message: "关闭成功!",
|
||||||
|
showClose: true,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// this.$message({
|
||||||
|
// duration: 1500,
|
||||||
|
// type: "info",
|
||||||
|
// message: "已取消删除",
|
||||||
|
// showClose: true,
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//点击分页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
this.terminalList(); //刷新
|
||||||
|
},
|
||||||
|
//每页条数
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.terminalList();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.photoGraphicDevice {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px 12px;
|
||||||
|
background: #fff;
|
||||||
|
.photoBox {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
.photoGraphicBtnGroup {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.photoGraphicTable {
|
||||||
|
margin-top: 16px;
|
||||||
|
height: calc(100% - 46px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,169 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
class="addtowerDialog"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="470px"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
label-position="left"
|
||||||
|
ref="formInfo"
|
||||||
|
label-width="100px"
|
||||||
|
:rules="rules"
|
||||||
|
:model="formdata"
|
||||||
|
>
|
||||||
|
<el-form-item label="线路名称:" prop="lineId">
|
||||||
|
<el-select v-model="formdata.lineId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in lineOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="杆塔名称:" prop="name">
|
||||||
|
<el-input v-model="formdata.name" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="杆塔地址:" prop="address">
|
||||||
|
<el-input v-model="formdata.address" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序号:" prop="order">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="formdata.order"
|
||||||
|
:min="0"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="isShow = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getLineListApi, addTowerApi, updateTowerApi } from "@/utils/api/index";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
title: String,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
lineOptions: [],
|
||||||
|
formdata: {},
|
||||||
|
rules: {
|
||||||
|
name: [{ required: true, message: "请输入杆塔名称", trigger: "blur" }],
|
||||||
|
lineId: [
|
||||||
|
{ required: true, message: "请选择线路编号", trigger: "blur" },
|
||||||
|
],
|
||||||
|
// address: [
|
||||||
|
// { required: true, message: "请输入杆塔地址", trigger: "blur" },
|
||||||
|
// ],
|
||||||
|
order: [{ required: true, message: "请输入排序号", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getLineListdata();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getLineListdata() {
|
||||||
|
getLineListApi({ pageindex: 1, pagesize: 100 })
|
||||||
|
.then((res) => {
|
||||||
|
this.lineOptions = res.data.list;
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
},
|
||||||
|
//判断
|
||||||
|
getdataform(val) {
|
||||||
|
if (val == null) {
|
||||||
|
return (this.formdata = {
|
||||||
|
order: 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//this.formdata = val;
|
||||||
|
this.formdata = JSON.parse(JSON.stringify(val));
|
||||||
|
},
|
||||||
|
// 保存确定操作
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.formInfo.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.title == "新增") {
|
||||||
|
let formArr = [];
|
||||||
|
formArr.push(this.formdata);
|
||||||
|
console.log(this.formdata);
|
||||||
|
addTowerApi({ list: formArr })
|
||||||
|
.then((res) => {
|
||||||
|
this.isShow = false;
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "添加成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.$parent.deviceList();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "添加失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log(this.formdata);
|
||||||
|
updateTowerApi(this.formdata)
|
||||||
|
.then((res) => {
|
||||||
|
this.isShow = false;
|
||||||
|
//this.$message.success("修改成功");
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "修改成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.$parent.deviceList();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
//this.$message.error("修改失败");
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "修改失败",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
display() {
|
||||||
|
this.isShow = true;
|
||||||
|
},
|
||||||
|
hide() {
|
||||||
|
this.isShow = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.addtowerDialog {
|
||||||
|
.el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-input-number {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-input-number .el-input__inner {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,264 @@
|
|||||||
|
<template>
|
||||||
|
<div class="towerinfobox">
|
||||||
|
<div class="deviceBox">
|
||||||
|
<div class="deviceBtnGroup">
|
||||||
|
<h4>杆塔信息管理</h4>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click.native.stop="handleAdddevice()"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="deviceTable">
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="tableDate"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
|
height="calc(100% - 40px)"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@row-click="handleRowClick"
|
||||||
|
v-loading="loading"
|
||||||
|
highlight-current-row
|
||||||
|
:row-key="getRowKeys"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="index" width="55"> </el-table-column>
|
||||||
|
<el-table-column type="selection" width="55"> </el-table-column> -->
|
||||||
|
<template slot="empty">
|
||||||
|
<el-empty :image-size="160" description="暂无数据"></el-empty>
|
||||||
|
</template>
|
||||||
|
<!-- <el-table-column
|
||||||
|
prop="dyLevelname"
|
||||||
|
label="电压等级"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
scope.row.dyLevelname
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column
|
||||||
|
prop="lineName"
|
||||||
|
label="线路名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link @click.native.stop="handleResive(scope.row)">{{
|
||||||
|
scope.row.lineName
|
||||||
|
}}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column
|
||||||
|
prop="lineId"
|
||||||
|
label="线路编号"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column> -->
|
||||||
|
<el-table-column prop="name" label="杆塔名称" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link @click.native.stop="handleResive(scope.row)">{{
|
||||||
|
scope.row.name
|
||||||
|
}}</el-link>
|
||||||
|
</template></el-table-column
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="杆塔地址"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column prop="order" label="排序号" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.order == null ? 0 : scope.row.order }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column fixed="right" label="操作" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
@click.native.stop="handleResive(scope.row)"
|
||||||
|
type="text"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
class="deleteText"
|
||||||
|
@click.native.stop="handleDelete(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pageNation">
|
||||||
|
<el-pagination
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
:current-page="page"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="sizes, prev, pager, next, jumper,total"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 新增时间表 -->
|
||||||
|
<addDialog :title="title" ref="addDialogref"></addDialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getTowerListApi, delTowerApi, getSearchInfo } from "@/utils/api/index";
|
||||||
|
import addDialog from "./components/addDialog.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "towerInformation",
|
||||||
|
components: {
|
||||||
|
addDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: "", //弹窗标题
|
||||||
|
tableDate: [],
|
||||||
|
//multipleSelection: [], //获取当前选中
|
||||||
|
page: 1, // 当前页数
|
||||||
|
pageSize: 20, // 每页数量
|
||||||
|
total: 0, //总条数
|
||||||
|
loading: true,
|
||||||
|
formdata: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {
|
||||||
|
this.deviceList();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getRowKeys(row) {
|
||||||
|
return row.id;
|
||||||
|
},
|
||||||
|
//点击线路跳转
|
||||||
|
handleLineLink(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.$router.push({
|
||||||
|
path: "/lineInformation",
|
||||||
|
query: { lineName: val.lineName, name: val.name },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击线路跳转
|
||||||
|
handletowerLink(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.$router.push({
|
||||||
|
path: "/photographicDevice",
|
||||||
|
query: { lineName: val.lineName, name: val.name },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//获取数据列表
|
||||||
|
deviceList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.$set(this.formdata, "pageindex", this.page);
|
||||||
|
this.$set(this.formdata, "pagesize", this.pageSize);
|
||||||
|
getTowerListApi(this.formdata)
|
||||||
|
.then((res) => {
|
||||||
|
this.tableDate = res.data.list;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
},
|
||||||
|
//点击行选中
|
||||||
|
handleRowClick(row, column, event) {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(row);
|
||||||
|
},
|
||||||
|
//获取选中的行
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新建
|
||||||
|
handleAdddevice() {
|
||||||
|
this.title = "新增";
|
||||||
|
this.$refs.addDialogref.display();
|
||||||
|
this.$refs.addDialogref.getdataform(null);
|
||||||
|
},
|
||||||
|
|
||||||
|
//修改
|
||||||
|
handleResive(data) {
|
||||||
|
this.title = "修改";
|
||||||
|
this.$refs.addDialogref.display();
|
||||||
|
this.$refs.addDialogref.getdataform(data);
|
||||||
|
},
|
||||||
|
|
||||||
|
//删除数据
|
||||||
|
handleDelete(data) {
|
||||||
|
let deleteArr = [];
|
||||||
|
deleteArr.push({
|
||||||
|
id: data.id,
|
||||||
|
});
|
||||||
|
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
delTowerApi({ list: deleteArr }).then((res) => {
|
||||||
|
this.deviceList(); //刷新
|
||||||
|
});
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
type: "success",
|
||||||
|
message: "删除成功!",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
type: "info",
|
||||||
|
message: "已取消删除",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击分页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
this.deviceList();
|
||||||
|
},
|
||||||
|
//每页条数
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.deviceList();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.towerinfobox {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px 12px;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
.deviceBox {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.deviceBtnGroup {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.deviceTable {
|
||||||
|
margin-top: 16px;
|
||||||
|
height: calc(100% - 46px);
|
||||||
|
//background: #fcc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|