Commit b3195505 by changjin

修改bug,增加欢迎页

parent 45fb072a
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>智慧案场管理后台</title>
<title>智慧社区后台管理系统</title>
<!-- <link rel="shortcut icon" href="../static/img/logo.ico"/> -->
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
</head>
......
......@@ -23,13 +23,13 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="breadcrumb" v-if="pageNameList[1].pageName !== '外部系统管理'">
<div class="breadcrumb" v-if="pageNameList[1].pageName !== '外部系统管理' && pageNameList[1].pageName !== '首页'">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item track-by="$index" v-for="(page, index) in pageNameList" :key="page.pageName" v-show="index != 0" >{{page.pageName}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="breadcrumb1" v-if="pageNameList[1].pageName == '外部系统管理'">
<div class="breadcrumb1" v-if="pageNameList[1].pageName == '外部系统管理' && pageNameList[1].pageName !== '首页'">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item track-by="$index" v-for="(page, index) in pageNameList" :key="page.pageName" v-show="index != 0" >{{page.pageName}}
</el-breadcrumb-item>
......@@ -128,6 +128,11 @@ export default {
this.showAlert('请输入新密码~')
return false
}
var reg = /^[0-9a-zA-Z]+$/
if (this.data.newPassword && (this.data.newPassword.length < 6 || !reg.test(this.data.newPassword))) {
this.showAlert('新密码不能少于6位数并且不能输入中文~')
return false
}
if (!this.data.confirmPassword) {
this.showAlert('请输入确认密码~')
return false
......
......@@ -2,10 +2,10 @@
<div class="wrapper">
<v-head></v-head>
<v-sidebar></v-sidebar>
<div class="content" v-if="pageNameList[1].pageName !== '外部系统管理'">
<div class="content" v-if="pageNameList[1].pageName !== '外部系统管理' && pageNameList[1].pageName !== '首页'">
<transition name="move" mode="out-in"><router-view></router-view></transition>
</div>
<div class="content1" v-if="pageNameList[1].pageName == '外部系统管理'">
<div class="content1" v-if="pageNameList[1].pageName == '外部系统管理' || pageNameList[1].pageName == '首页'">
<transition name="move" mode="out-in"><router-view></router-view></transition>
</div>
</div>
......
......@@ -5,7 +5,7 @@
<li v-for="(menu,index) in items" v-on:click="changeMenu(menu, 1)" :class="{'cur':curMenu == menu.id}" :key="index">{{menu.name}}</li>
</ul>
</div>
<div class="sidebarLeft" v-if="pageNameList[1].pageName !== '外部系统管理'">
<div class="sidebarLeft" v-if="pageNameList[1].pageName !== '外部系统管理' && pageNameList[1].pageName !== '首页'">
<div class="sideMenu">
<el-menu theme="dark" :default-active="onRoutes" class="el-menu-demo" unique-opened router>
<template v-for="(item,index) in sideMenu">
......@@ -210,12 +210,18 @@ export default {
this.$axios.get('/baseInfo/initPersonalMenu').then((res) =>{
if(res.data.code === '0') {
this.items = res.data.data.menuResponseList
// this.changeMenu(this.items[0])
that.items.forEach(function (info, index) {
if (that.pageNameList[1].pageName === info.name) {
that.changeMenu(info)
}
})
if (that.items.length > 0) {
that.items.forEach(function (info, index) {
if (that.pageNameList[1].pageName === info.name) {
that.changeMenu(info)
}
})
} else {
this.$alert('您暂无任何权限,请联系管理员', '温馨提示', {
type: 'warning',
confirmButtonText: ''
})
}
window.sessionStorage.setItem('projectId',res.data.data.projectId)
}
})
......
......@@ -69,7 +69,7 @@
<el-table-column prop="setTime" label="报警内容" ></el-table-column>
<el-table-column prop="actualTime" label="报警时间" ></el-table-column>
</el-table>
<div class="block text-right mt20" v-if="data.page">
<div class="block text-right mt20" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -106,7 +106,7 @@
<el-table-column prop="setTime" label="报警内容" ></el-table-column>
<el-table-column prop="actualTime" label="报警时间" ></el-table-column>
</el-table>
<div class="block text-right mt20" v-if="data.page">
<div class="block text-right mt20" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -124,7 +124,7 @@
import moment from 'moment'
export default {
data: () => ({
loading: true,
loading: false,
activeName: 'first',
searchForm:{},
data:{
......@@ -188,7 +188,7 @@ export default {
</script>
<style scoped lang="less">
.tableCont{
height: calc(100vh - 50px);
height: calc(100vh - 44px);
}
.infoBox b i{width:20px;height: 20px;display: inline-block;position: relative;top: 3px;}
.upIcon{background: url(../../../../static/img/up.png) no-repeat;background-size: 100%;}
......
......@@ -49,7 +49,7 @@
<el-table-column prop="iotInfo" label="操作事件"></el-table-column>
<el-table-column prop="createTime" label="操作时间" ></el-table-column>
</el-table>
<div class="block text-right mt20" v-if="data.page">
<div class="block text-right mt20" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -63,7 +63,7 @@
<div class="title">设备列表</div>
<el-table :data="data.list" v-loading="loading">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="deviceName" label="设备名称"></el-table-column>
<el-table-column prop="nickname" label="设备名称"></el-table-column>
<el-table-column prop="iotId" label="设备ID"></el-table-column>
<el-table-column prop="deviceType" label="设备类型"></el-table-column>
<el-table-column prop="site" label="所在位置"></el-table-column>
......@@ -83,7 +83,7 @@
</template>
</el-table-column>
</el-table>
<div class="block text-right mt10" v-if="data.page">
<div class="block text-right mt10" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -186,7 +186,7 @@ export default {
</script>
<style scoped lang="less">
.tableCont{
height: calc(100vh - 45px);
height: calc(100vh - 44px);
// .el-table{
// height: calc(100vh - 67px);
// overflow-y: auto;
......
......@@ -57,7 +57,7 @@ export default {
console.log(res.data.data)
if (res.data.code === '0') {
window.sessionStorage.setItem('token',res.data.data)
this.$router.push('/equipment/list')
this.$router.push('/index')
}
}).catch(function (eMsg) {
})
......
<template>
<div class="main">
<h1 class="text-center">欢迎登录</h1>
<p class="font18 text-center mt10">智慧社区后台管理系统</p>
<div class="imgDiv"></div>
</div>
</template>
<script>
</script>
<style scoped lang="less">
.main{
position: fixed;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: 5px;
margin-top: -32px;
background: #FFFFFF url(../../../../static/img/bg.png) no-repeat center bottom;
background-size: 100% 100%;
h1{font-weight: 400;margin-top: 80px;}
.imgDiv{
width: 513px;
height: 381px;
background: url(../../../../static/img/img.png) no-repeat;
background-size: 100%;
margin: 50px auto;
}
}
</style>
......@@ -36,7 +36,7 @@
<div class="mainContent tableCont">
<div class="tabCont">
<div class="title">日志列表</div>
<el-table :data="data.list">
<el-table :data="data.list" v-loading="loading">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="accountCode" label="用户编码"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
......@@ -45,7 +45,7 @@
<el-table-column prop="logType" label="日志类型"></el-table-column>
<el-table-column prop="logTime" label="操作时间" ></el-table-column>
</el-table>
<div class="block text-right mt20" v-if="data.page">
<div class="block text-right mt20" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -62,6 +62,7 @@
import moment from 'moment'
export default {
data: () => ({
loading: true,
searchForm:{},
data:{page:'1'},
size: '10',
......@@ -84,6 +85,7 @@ export default {
}).then((res) =>{
if(res.data.code === '0') {
this.data = res.data.data
this.loading = false
}
})
},
......
......@@ -19,7 +19,7 @@
<div class="mainContent tableCont">
<div class="tabCont">
<el-button class="addBtn" v-if="isAddBtn" @click="addBtn(0)"><img src="../../../../static/img/add.png" class="addIcon"><span>新增</span></el-button>
<el-table :data="data.list">
<el-table :data="data.list" v-loading="loading">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="cityName" label="城市名称"></el-table-column>
<el-table-column prop="cityId" label="城市ID"></el-table-column>
......@@ -36,7 +36,7 @@
</template>
</el-table-column>
</el-table>
<div class="block text-right mt10" v-if="data.page">
<div class="block text-right mt10" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -102,6 +102,7 @@
export default {
data: () => ({
searchForm:{},
loading: true,
dataForm: {},
dialogVisible: false,
type: '',
......@@ -147,6 +148,7 @@ export default {
}).then((res) =>{
if(res.data.code === '0') {
this.data = res.data.data
this.loading = false
}
})
},
......@@ -156,6 +158,11 @@ export default {
that.showAlert('请输入城市名称~')
return false
}
var reg = /^[\u4E00-\u9FA5]{2,4}$/
if (that.dataForm.cityName && !reg.test(that.dataForm.cityName)) {
that.showAlert('城市名称只能输入中文~')
return false
}
if (!that.dataForm.projectName) {
that.showAlert('请输入项目名称~')
return false
......
......@@ -28,7 +28,7 @@
node-key="id"
ref="tree"
default-expand-all
:default-checked-keys = "menuIdList"
:default-checked-keys = "defaultCheckedList"
:props="defaultProps"
>
</el-tree>
......@@ -48,11 +48,14 @@
<script>
export default {
data: () => ({
data:{},
data:{
status: true
},
checked: false,
roleId: [],
menuList: [],
menuIdList: [],
defaultCheckedList: [],
defaultProps: {
children: 'childrenList',
label: 'name'
......@@ -74,7 +77,7 @@ export default {
this.data = res.data.data
let menuIdList = []
this.data.roleMenuResponseList.forEach(item=>{
if (item.isChecked == 'checked') {
if ((item.name == '接口文档' || item.name == '外部系统管理') && item.isChecked == 'checked') {
menuIdList.push(item.id)
}
if (item.childrenList.length > 0) {
......@@ -85,8 +88,8 @@ export default {
})
}
})
this.menuIdList = menuIdList
console.log(this.menuIdList)
this.defaultCheckedList = menuIdList
console.log(this.defaultCheckedList)
if (this.data.status == '0') {
this.data.status = false
} else {
......@@ -116,7 +119,8 @@ export default {
} else {
url = '/baseInfo/editRole'
}
this.menuIdList = this.$refs.tree.getCheckedKeys()
this.menuIdList = this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys())
console.log(this.menuIdList,this.menuIdList.length)
that.$axios.post(url,{
"status": that.data.status ? '1' : '0',
"name": that.data.name,
......
......@@ -19,7 +19,7 @@
<div class="mainContent tableCont">
<div class="tabCont">
<el-button class="addBtn" @click="addBtn(0)" v-if="isAddBtn"><img src="../../../../static/img/add.png" class="addIcon"><span>新增</span></el-button>
<el-table :data="data.list">
<el-table :data="data.list" v-loading="loading">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="name" label="角色名称"></el-table-column>
<el-table-column prop="isConfig" label="权限配置"></el-table-column>
......@@ -41,7 +41,7 @@
</template>
</el-table-column>
</el-table>
<div class="block text-right mt10" v-if="data.page">
<div class="block text-right mt10" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -56,6 +56,7 @@
<script>
export default {
data: () => ({
loading: true,
searchForm:{},
data:{page: '1'},
size: '10',
......@@ -102,6 +103,7 @@ export default {
roleName: this.searchForm.roleName
}).then((res) =>{
if(res.data.code === '0') {
this.loading = false
this.data = res.data.data
res.data.data.list.forEach(item => {
if (item.status == '0') {
......
......@@ -70,7 +70,9 @@
<script>
export default {
data: () => ({
data:{},
data:{
accountStatus: true
},
checked: false,
roleList: [],
projectList: [],
......@@ -136,6 +138,11 @@ export default {
that.showAlert('请输入手机号~')
return false
}
var reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (that.data.phone && (!reg.test(that.data.phone) || that.data.phone.length !== 11)) {
that.showAlert('手机号格式不正确~')
return false
}
if (!that.data.loginName) {
that.showAlert('请输入账号~')
return false
......
......@@ -41,7 +41,7 @@
<div class="mainContent tableCont">
<div class="tabCont">
<el-button class="addBtn" @click="addBtn(0)" v-if="isAddBtn"><img src="../../../../static/img/add.png" class="addIcon"><span>新增</span></el-button>
<el-table :data="data.list">
<el-table :data="data.list" v-loading="loading">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="accountCode" label="用户编码"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
......@@ -74,7 +74,7 @@
</template>
</el-table-column>
</el-table>
<div class="block text-right mt10" v-if="data.page">
<div class="block text-right mt10" v-if="data.page && data.count > 0">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -89,6 +89,7 @@
<script>
export default {
data: () => ({
loading: true,
searchForm:{},
data:{
page: '1',
......@@ -152,6 +153,7 @@ export default {
keyWord: this.searchForm.keyWord
}).then((res) =>{
if(res.data.code === '0') {
this.loading = false
this.data = res.data.data
res.data.data.list.forEach(item => {
if (item.accountStatus == '0') {
......
......@@ -12,6 +12,7 @@ import 'element-ui/lib/theme-chalk/index.css';
require('../static/css/index.css')
Vue.use(uploader)
// Vue.prototype.baseURL = 'http://172.16.2.69:8088/'
Vue.prototype.baseURL = 'http://39.97.169.207:9200/' // 测试
// Vue.prototype.baseURL = 'https://witcase.chinajinmao.cn' // 正式
......
......@@ -15,6 +15,14 @@ export default new Router({
name: 'home',
component: resolve => require(['../components/common/Home.vue'], resolve),
children: [
{
path: '/index',
name: 'index',
meta: {
pageName: '首页'
},
component: resolve => require(['../components/page/index/index.vue'], resolve),
},
{
path: '/equipment/list',
name: '/equipment',
......

30 KB | W: | H:

105 KB | W: | H:

static/img/img.png
static/img/img.png
static/img/img.png
static/img/img.png
  • 2-up
  • Swipe
  • Onion skin
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 sign in to comment