Commit 02ebc25a authored by renhanxue's avatar renhanxue

Merge branch 'dev' of http://39.105.40.203/root/web-monitor into dev_rhx

parents dfd41f97 98b401fb
<template> <template>
<el-breadcrumb class="app-breadcrumb" separator="/"> <el-breadcrumb class="app-breadcrumb" separator=">">
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path"> <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span> <span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
const first = matched[0] const first = matched[0]
if (!this.isDashboard(first)) { if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
} }
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
</template> </template>
<script> <script>
export default { export default {
name: 'AppMain', name: 'AppMain',
computed: { computed: {
...@@ -19,6 +20,10 @@ export default { ...@@ -19,6 +20,10 @@ export default {
<style scoped> <style scoped>
.app-main { .app-main {
margin: 0 20px 20px 20px;
padding: 20px;
background: #fff;
border-radius: 8px;
/*50 = navbar */ /*50 = navbar */
min-height: calc(100vh - 50px); min-height: calc(100vh - 50px);
width: 100%; width: 100%;
......
...@@ -3,22 +3,30 @@ ...@@ -3,22 +3,30 @@
<navbar /> <navbar />
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<div :class="{sidebarHide: sidebar.hide}" class="main-container"> <div :class="{sidebarHide: sidebar.hide}" class="main-container">
<orgTree style="float:left" />
<div class="flex_clo">
<Breadcrumb />
<app-main /> <app-main />
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import Breadcrumb from '@/components/Breadcrumb'
import { Navbar, Sidebar, AppMain, Topbar } from './components' import { Navbar, Sidebar, AppMain, Topbar } from './components'
import ResizeMixin from './mixin/ResizeHandler' import ResizeMixin from './mixin/ResizeHandler'
import orgTree from '@/components/orgTree.vue'
export default { export default {
name: 'Layout', name: 'Layout',
components: { components: {
Breadcrumb,
Navbar, Navbar,
Sidebar, Sidebar,
AppMain, AppMain,
Topbar Topbar,
orgTree
}, },
mixins: [ResizeMixin], mixins: [ResizeMixin],
computed: { computed: {
......
...@@ -58,12 +58,22 @@ export const constantRoutes = [ ...@@ -58,12 +58,22 @@ export const constantRoutes = [
path: '/alarm', path: '/alarm',
component: Layout, component: Layout,
redirect: '/dashboard', redirect: '/dashboard',
children: [{ name: '监测实时状态',
path: 'alarm', meta: { title: '告警管理', icon: 'dashboard' },
name: 'Alarm', children: [
component: () => import('@/views/dashboard/index'), {
meta: { title: '告警管理', icon: 'dashboard' } path: 'leakageCable',
}] name: '漏缆实时状态',
component: () => import('@/views/monitor/leakageCable'),
meta: { title: '漏缆监测告警' }
},
{
path: 'equipment',
name: '设备实时状态',
component: () => import('@/views/monitor/equipment'),
meta: { title: '设备连接告警' }
}
]
}, },
{ {
path: '/setting', path: '/setting',
...@@ -131,12 +141,14 @@ export const constantRoutes = [ ...@@ -131,12 +141,14 @@ export const constantRoutes = [
{ {
path: '/history', path: '/history',
component: Layout, component: Layout,
redirect: '/dashboard', redirect: '/history/historyStatus/historyStatus',
children: [{
path: 'history',
name: 'History', name: 'History',
component: () => import('@/views/dashboard/index'), meta: { title: 'History', icon: 'example' },
meta: { title: '历史数据', icon: 'dashboard' } children: [{
path: 'historyStatus',
name: '历史数据状态',
component: () => import('@/views/history/historyStatus/historyStatus.vue'),
meta: { title: '历史数据状态' }
}] }]
}, },
{ {
......
...@@ -13,3 +13,7 @@ ...@@ -13,3 +13,7 @@
.ml20 { .ml20 {
margin-left: 20px; margin-left: 20px;
} }
.flex_clo {
display: flex;
flex-direction: column;
}
\ No newline at end of file
#app { #app {
.main-container { .main-container {
background-color: #F9F9F9;
min-height: 100%; min-height: 100%;
transition: margin-left .28s; transition: margin-left .28s;
// margin-left: $sideBarWidth; // margin-left: $sideBarWidth;
......
<template> <template>
<div class="dashboard-container"> <div class="dashboard-container">
<OrgTree /> <!-- <OrgTree /> -->
</div> </div>
</template> </template>
......
<template>
<div>
<h1>会搜发的随风</h1>
</div>
</template>
<script>
import {mapGetters,mapActions} from 'vuex';
export default {
props: [],
components: {},
data() {
return {
beginItem: 1,
endItem: 10,
total: 0,
currentPage: 1,
pageSize: 10,
historyStatusList:[
{
stationName:'STATION2未开通',
alarmObj:'漏缆FSU2_R1下行方向',
alarmInfo:'距离:0米 驻波比:8.72',
alarmInfo2:'距离:18米 驻波比:1.07',
alarmInfo3:'距离:42米 驻波比:1.02',
firstTime:'2022/12/18 11:51:12'
},
{
stationName:'STATION2未开通',
alarmObj:'漏缆FSU2_R1下行方向',
alarmInfo:'距离:0米 驻波比:8.72',
alarmInfo2:'距离:18米 驻波比:1.07',
alarmInfo3:'距离:42米 驻波比:1.02',
firstTime:'2022/12/18 11:51:12'
}, {
stationName:'STATION2未开通',
alarmObj:'漏缆FSU2_R1下行方向',
alarmInfo:'距离:0米 驻波比:8.72',
alarmInfo2:'距离:18米 驻波比:1.07',
alarmInfo3:'距离:42米 驻波比:1.02',
firstTime:'2022/12/18 11:51:12'
}, {
stationName:'STATION2未开通',
alarmObj:'漏缆FSU2_R1下行方向',
alarmInfo:'距离:0米 驻波比:8.72',
alarmInfo2:'距离:18米 驻波比:1.07',
alarmInfo3:'距离:42米 驻波比:1.02',
firstTime:'2022/12/18 11:51:12'
}, {
stationName:'STATION2未开通',
alarmObj:'漏缆FSU2_R1下行方向',
alarmInfo:'距离:0米 驻波比:8.72',
alarmInfo2:'距离:18米 驻波比:1.07',
alarmInfo3:'距离:42米 驻波比:1.02',
firstTime:'2022/12/18 11:51:12'
}, {
stationName:'STATION2未开通',
alarmObj:'漏缆FSU2_R1下行方向',
alarmInfo:'距离:0米 驻波比:8.72',
alarmInfo2:'距离:18米 驻波比:1.07',
alarmInfo3:'距离:42米 驻波比:1.02',
firstTime:'2022/12/18 11:51:12'
},
],
};
},
computed: {
...mapGetters({}),
},
methods: {
...mapActions({}),
getTableData() {
this.tableData = this.historyStatusList.slice(
(this.currentPage - 1) * this.pageSize,
this.currentPage * this.pageSize
);
this.total = this.historyStatusList.length;
},
currentChange(val) {
this.currentPage = val;
this.getTableData();
},
sizeChange(val) {
console.log("改变每页多少条,当前一页多少条数据", val);
this.pageSize = val;
this.currentPage = 1;
this.getTableData();
},
},
mounted() {},
};
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button> <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button>
<div class="tips"> <!-- <div class="tips">
<span style="margin-right:20px;">username: admin</span> <span style="margin-right:20px;">username: admin</span>
<span> password:任意6位</span> <span> password:任意6位</span>
</div> </div> -->
</el-form> </el-form>
</div> </div>
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
return { return {
loginForm: { loginForm: {
username: 'admin', username: 'admin',
password: '111111' password: '123456'
}, },
loginRules: { loginRules: {
username: [{ required: true, trigger: 'blur', validator: validateUsername }], username: [{ required: true, trigger: 'blur', validator: validateUsername }],
...@@ -114,11 +114,19 @@ export default { ...@@ -114,11 +114,19 @@ export default {
}, },
handleLogin() { handleLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate(valid => {
if (valid) { if (valid) {
this.loading = true this.loading = true
this.$store.dispatch('user/login', this.loginForm).then(() => { this.$store.dispatch('user/login', this.loginForm).then(() => {
if (this.loginForm.password=='123456') {
this.$router.push({ path: this.redirect || '/' }) this.$router.push({ path: this.redirect || '/' })
this.loading = false this.loading = false
}
else{
alert('密码错误')
this.loading = false
return false
}
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
......
<template> <template>
<div class="oneself"> <div class="oneself">
<Breadcrumb />
<div class="oneself-title">温馨提示:系统如无异常,请勿操作此界面</div> <div class="oneself-title">温馨提示:系统如无异常,请勿操作此界面</div>
<el-form ref="form1" :model="formData1" :rules="rules1" label-width="200px" class="oneself-form"> <el-form ref="form1" :model="formData1" :rules="rules1" label-width="200px" class="oneself-form">
<el-form-item label="服务器IP地址" prop="ip"> <el-form-item label="服务器IP地址" prop="ip">
...@@ -53,7 +52,7 @@ ...@@ -53,7 +52,7 @@
</el-radio> </el-radio>
</el-row> </el-row>
</el-radio-group> </el-radio-group>
<el-button class="btn" style="width: 120px" type="primary" :loading="loading3" @click="sendContent">发送查询内容</el-button> <el-button size="mini" class="btn" style="width: 120px" type="primary" :loading="loading3" @click="sendContent">发送查询内容</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form ref="form3" :model="formData3" :rules="rules3" label-width="200px" class="oneself-form"> <el-form ref="form3" :model="formData3" :rules="rules3" label-width="200px" class="oneself-form">
...@@ -66,7 +65,7 @@ ...@@ -66,7 +65,7 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
<el-button style="width: 120px" class="btn" type="primary" :loading="loading2" @click="sendData">发送数据</el-button> <el-button size="mini" style="width: 120px" class="btn" type="primary" :loading="loading2" @click="sendData">发送数据</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="oneself-tips">当前未向服务器下发指令!</div> <div class="oneself-tips">当前未向服务器下发指令!</div>
...@@ -74,9 +73,7 @@ ...@@ -74,9 +73,7 @@
</template> </template>
<script> <script>
import Breadcrumb from '@/components/Breadcrumb'
export default { export default {
components: { Breadcrumb },
data() { data() {
return { return {
baseStationList: [], baseStationList: [],
......
<template> <template>
<div class="parameter"> <div class="parameter">
<Breadcrumb />
<div class="parameter-title"> <div class="parameter-title">
温馨提示:告警门限参数设置,数据如无异常,请勿修改告警门限参数! 温馨提示:告警门限参数设置,数据如无异常,请勿修改告警门限参数!
</div> </div>
...@@ -48,9 +47,7 @@ ...@@ -48,9 +47,7 @@
</template> </template>
<script> <script>
import Breadcrumb from '@/components/Breadcrumb'
export default { export default {
components: { Breadcrumb },
data() { data() {
return { return {
loading: false, loading: false,
......
<template> <template>
<!-- 漏缆实时状态 --> <!-- 漏缆实时状态 -->
<div class="leakage-cable"> <div class="leakage-cable">
<breadcrumb />
<div class="leakage-top"> <div class="leakage-top">
<div> <div>
共6条数据 共6条数据
...@@ -31,11 +30,10 @@ ...@@ -31,11 +30,10 @@
</template> </template>
<script> <script>
import Breadcrumb from '@/components/Breadcrumb'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
export default { export default {
components: { Pagination, Breadcrumb }, components: { Pagination },
data() { data() {
return { return {
searchForm: { searchForm: {
......
<template> <template>
<!-- 漏缆实时状态 --> <!-- 漏缆实时状态 -->
<div class="leakage-cable"> <div class="leakage-cable">
<breadcrumb />
<div class="leakage-top"> <div class="leakage-top">
<div style="color: #666666"> <div style="color: #666666">
共6条数据 共6条数据
...@@ -49,11 +48,10 @@ ...@@ -49,11 +48,10 @@
</template> </template>
<script> <script>
import Breadcrumb from '@/components/Breadcrumb'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
export default { export default {
components: { Pagination, Breadcrumb }, components: { Pagination },
data() { data() {
return { return {
searchForm: { searchForm: {
......
<template> <template>
<div class="add"> <div class="add">
<breadcrumb />
<div class="add-tab"> <div class="add-tab">
<el-tabs v-model="activeName" :stretc="true"> <el-tabs v-model="activeName" :stretc="true">
<el-tab-pane <el-tab-pane
...@@ -37,9 +36,7 @@ ...@@ -37,9 +36,7 @@
</template> </template>
<script> <script>
import Breadcrumb from '@/components/Breadcrumb'
export default { export default {
components: { Breadcrumb },
data() { data() {
return { return {
activeName: '0', activeName: '0',
......
<template> <template>
<div class="statistics"> <div class="statistics">
<Breadcrumb />
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<!-- <el-tabs v-model="activeName" type="border-card"> <!-- <el-tabs v-model="activeName" type="border-card">
...@@ -86,9 +85,8 @@ ...@@ -86,9 +85,8 @@
<script> <script>
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import Breadcrumb from '@/components/Breadcrumb'
export default { export default {
components: { Pagination, Breadcrumb }, components: { Pagination },
data() { data() {
return { return {
searchForm: { searchForm: {
......
<template> <template>
<div> <div>
<breadcrumb />
<div class="update-user-container"> <div class="update-user-container">
<div class="header"> <div class="header">
<div class="tab"> <div class="tab">
...@@ -16,11 +15,10 @@ ...@@ -16,11 +15,10 @@
</template> </template>
<script> <script>
import Breadcrumb from '@/components/Breadcrumb'
import baseInfo from '../updateUser/components/baseInfo.vue' import baseInfo from '../updateUser/components/baseInfo.vue'
import Password from '../updateUser/components/password.vue' import Password from '../updateUser/components/password.vue'
export default { export default {
components: { Breadcrumb, baseInfo, Password }, components: { baseInfo, Password },
data() { data() {
return { return {
options: [{ options: [{
......
<template> <template>
<div> <div>
<breadcrumb />
<el-row class="header"> <el-row class="header">
<el-col :span="4"> <el-col :span="4">
<div class="message"><span>{{ total }}</span>条数据</div> <div class="message"><span>{{ total }}</span>条数据</div>
...@@ -43,12 +42,10 @@ ...@@ -43,12 +42,10 @@
<script> <script>
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import Breadcrumb from '@/components/Breadcrumb'
export default { export default {
components: { components: {
Pagination, Pagination
Breadcrumb
}, },
data() { data() {
return { return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment