Commit 45fb072a by changjin

修改bug

parent 3a5ead4a
...@@ -47,7 +47,8 @@ exports.cssLoaders = function (options) { ...@@ -47,7 +47,8 @@ exports.cssLoaders = function (options) {
if (options.extract) { if (options.extract) {
return ExtractTextPlugin.extract({ return ExtractTextPlugin.extract({
use: loaders, use: loaders,
fallback: 'vue-style-loader' fallback: 'vue-style-loader',
publicPath: '../../'
}) })
} else { } else {
return ['vue-style-loader'].concat(loaders) return ['vue-style-loader'].concat(loaders)
......
...@@ -3458,6 +3458,11 @@ ...@@ -3458,6 +3458,11 @@
"integrity": "sha1-RYrBscXHYM6IEaFtK/vZfsMLr7g=", "integrity": "sha1-RYrBscXHYM6IEaFtK/vZfsMLr7g=",
"dev": true "dev": true
}, },
"element-theme-chalk": {
"version": "2.15.1",
"resolved": "https://registry.npm.taobao.org/element-theme-chalk/download/element-theme-chalk-2.15.1.tgz?cache=0&sync_timestamp=1614084802955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-theme-chalk%2Fdownload%2Felement-theme-chalk-2.15.1.tgz",
"integrity": "sha1-irpyfYjcwWkT+frMYzNFT+BgAtQ="
},
"element-ui": { "element-ui": {
"version": "2.15.1", "version": "2.15.1",
"resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.15.1.tgz?cache=0&sync_timestamp=1614082623756&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-ui%2Fdownload%2Felement-ui-2.15.1.tgz", "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.15.1.tgz?cache=0&sync_timestamp=1614082623756&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-ui%2Fdownload%2Felement-ui-2.15.1.tgz",
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"babel-plugin-transform-vue-jsx": "^3.7.0", "babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"echarts": "^4.2.1", "echarts": "^4.2.1",
"element-theme-chalk": "^2.15.1",
"element-ui": "^2.15.1", "element-ui": "^2.15.1",
"hchs-vue-charts": "^1.2.8", "hchs-vue-charts": "^1.2.8",
"less": "^2.7.3", "less": "^2.7.3",
......
...@@ -35,22 +35,22 @@ ...@@ -35,22 +35,22 @@
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<el-dialog title="修改密码" :visible.sync="dialogVisible" width="40%"> <el-dialog title="修改密码" :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%">
<el-row class="searchBox"> <el-row class="searchBox">
<el-form label-width="100px"> <el-form label-width="100px">
<el-col :span="18" :offset="1"> <el-col :span="18" :offset="1">
<el-form-item label="旧密码" required> <el-form-item label="旧密码" required>
<el-input type="password" v-model="data.oldPassword" placeholder="请输入旧密码"></el-input> <el-input type="password" auto-complete="new-password" v-model="data.oldPassword" placeholder="请输入旧密码"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18" :offset="1"> <el-col :span="18" :offset="1">
<el-form-item label="新密码" required> <el-form-item label="新密码" required>
<el-input type="password" v-model="data.newPassword" placeholder="请输入新密码"></el-input> <el-input type="password" auto-complete="new-password" v-model="data.newPassword" placeholder="请输入新密码"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18" :offset="1"> <el-col :span="18" :offset="1">
<el-form-item label="确认新密码" required> <el-form-item label="确认新密码" required>
<el-input type="password" v-model="data.confirmPassword" placeholder="再次输入新密码"></el-input> <el-input type="password" auto-complete="new-password" v-model="data.confirmPassword" placeholder="再次输入新密码"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -117,6 +117,7 @@ export default { ...@@ -117,6 +117,7 @@ export default {
}, },
changePwd () { changePwd () {
this.dialogVisible = true this.dialogVisible = true
this.data = {}
}, },
submit () { submit () {
if (!this.data.oldPassword) { if (!this.data.oldPassword) {
......
...@@ -5,7 +5,7 @@ ...@@ -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> <li v-for="(menu,index) in items" v-on:click="changeMenu(menu, 1)" :class="{'cur':curMenu == menu.id}" :key="index">{{menu.name}}</li>
</ul> </ul>
</div> </div>
<div class="sidebarLeft" v-if="sideMenu && sideMenu.length > 0"> <div class="sidebarLeft" v-if="pageNameList[1].pageName !== '外部系统管理'">
<div class="sideMenu"> <div class="sideMenu">
<el-menu theme="dark" :default-active="onRoutes" class="el-menu-demo" unique-opened router> <el-menu theme="dark" :default-active="onRoutes" class="el-menu-demo" unique-opened router>
<template v-for="(item,index) in sideMenu"> <template v-for="(item,index) in sideMenu">
...@@ -199,33 +199,23 @@ export default { ...@@ -199,33 +199,23 @@ export default {
} }
}, },
created () { created () {
var that = this
// this.changeMenu(this.items[0])
// that.items.forEach(function (info, index) {
// if (that.pageNameList[1].pageName === info.name) {
// that.changeMenu(info)
// }
// })
this.getData() this.getData()
this.menuActive = this.pageNameList[this.pageNameList.length - 1].pageName
}, },
update (){ update (){
var that = this
this.getData() this.getData()
// this.changeMenu(this.items[0])
// that.items.forEach(function (info, index) {
// if (that.pageNameList[1].pageName === info.name) {
// that.changeMenu(info)
// }
// })
this.menuActive = this.pageNameList[this.pageNameList.length - 1].pageName
}, },
methods: { methods: {
getData () { getData () {
let that = this
this.$axios.get('/baseInfo/initPersonalMenu').then((res) =>{ this.$axios.get('/baseInfo/initPersonalMenu').then((res) =>{
if(res.data.code === '0') { if(res.data.code === '0') {
this.items = res.data.data.menuResponseList this.items = res.data.data.menuResponseList
this.changeMenu(this.items[0]) // this.changeMenu(this.items[0])
that.items.forEach(function (info, index) {
if (that.pageNameList[1].pageName === info.name) {
that.changeMenu(info)
}
})
window.sessionStorage.setItem('projectId',res.data.data.projectId) window.sessionStorage.setItem('projectId',res.data.data.projectId)
} }
}) })
......
...@@ -7,36 +7,24 @@ ...@@ -7,36 +7,24 @@
<el-row> <el-row>
<el-col class="border grayBg" :span="3">设备类型</el-col> <el-col class="border grayBg" :span="3">设备类型</el-col>
<el-col class="border" :span="5"><span v-for="info in data.deviceType">{{info}}</span></el-col> <el-col class="border" :span="5"><span v-for="info in data.deviceType">{{info}}</span></el-col>
<el-col class="border grayBg" :span="3">ProductKey</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col>
<el-col class="border grayBg" :span="3">地域</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col>
</el-row>
<el-row>
<el-col class="border grayBg" :span="3">节点类型</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col>
<el-col class="border grayBg" :span="3">DeviceName</el-col> <el-col class="border grayBg" :span="3">DeviceName</el-col>
<el-col class="border" :span="5">{{data.nickname}}</el-col> <el-col class="border" :span="5">{{data.deviceName}}</el-col>
<el-col class="border grayBg" :span="3">认证方式</el-col> <el-col class="border grayBg" :span="3">地域</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col> <el-col class="border" :span="5">{{data.site}}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col class="border grayBg" :span="3">备注名称</el-col> <el-col class="border grayBg" :span="3">备注名称</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col> <el-col class="border" :span="5">{{data.nickname}}</el-col>
<el-col class="border grayBg" :span="3">IP地址</el-col> <el-col class="border grayBg" :span="3">地址</el-col>
<el-col class="border" :span="5">{{data.ipAddress}}</el-col> <el-col class="border" :span="5">{{data.ipAddress}}</el-col>
<el-col class="border grayBg" :span="3">固件版本</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col>
</el-row>
<el-row>
<el-col class="border grayBg" :span="3">创建时间</el-col> <el-col class="border grayBg" :span="3">创建时间</el-col>
<el-col class="border" :span="5">{{data.gmtCreate}}</el-col> <el-col class="border" :span="5">{{data.gmtCreate}}</el-col>
</el-row>
<el-row class="borderB">
<el-col class="border grayBg" :span="3">激活时间</el-col> <el-col class="border grayBg" :span="3">激活时间</el-col>
<el-col class="border" :span="5">{{data.gmtActive}}</el-col> <el-col class="border" :span="5">{{data.gmtActive}}</el-col>
<el-col class="border grayBg" :span="3">最后上线时间</el-col> <el-col class="border grayBg" :span="3">最后上线时间</el-col>
<el-col class="border" :span="5">{{data.gmtOnline}}</el-col> <el-col class="border" :span="5">{{data.gmtOnline}}</el-col>
</el-row>
<el-row class="borderB">
<el-col class="border grayBg" :span="3">当前状态</el-col> <el-col class="border grayBg" :span="3">当前状态</el-col>
<el-col class="border" :span="5"> <el-col class="border" :span="5">
<span v-if="data.status === 'DISABLE'">禁用</span> <span v-if="data.status === 'DISABLE'">禁用</span>
...@@ -44,10 +32,6 @@ ...@@ -44,10 +32,6 @@
<span v-if="data.status === 'ONLINE'">在线</span> <span v-if="data.status === 'ONLINE'">在线</span>
<span v-if="data.status === 'UNACTIVE'">未激活</span> <span v-if="data.status === 'UNACTIVE'">未激活</span>
</el-col> </el-col>
<el-col class="border grayBg" :span="3">实时延迟</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col>
<el-col class="border grayBg" :span="3">设备本地日志上报</el-col>
<el-col class="border" :span="5">{{data.site}}</el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<div class="title">报警列表</div> <div class="title">报警列表</div>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="当日报警" name="first"> <el-tab-pane label="当日报警" name="first">
<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 type="index" label="序号"></el-table-column>
<el-table-column prop="customerName" label="设备名称"></el-table-column> <el-table-column prop="customerName" label="设备名称"></el-table-column>
<el-table-column prop="allocateName" label="设备类型"></el-table-column> <el-table-column prop="allocateName" label="设备类型"></el-table-column>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<el-col :span="10"> <el-col :span="10">
<el-form-item label="报警时间"> <el-form-item label="报警时间">
<el-date-picker <el-date-picker
v-model="value1" v-model="searchForm.date"
type="datetimerange" type="datetimerange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<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 type="index" label="序号"></el-table-column>
<el-table-column prop="customerName" label="设备名称"></el-table-column> <el-table-column prop="customerName" label="设备名称"></el-table-column>
<el-table-column prop="allocateName" label="设备类型"></el-table-column> <el-table-column prop="allocateName" label="设备类型"></el-table-column>
...@@ -121,9 +121,10 @@ ...@@ -121,9 +121,10 @@
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment'
export default { export default {
data: () => ({ data: () => ({
loading: false, loading: true,
activeName: 'first', activeName: 'first',
searchForm:{}, searchForm:{},
data:{ data:{
...@@ -151,6 +152,7 @@ export default { ...@@ -151,6 +152,7 @@ export default {
}).then((res) =>{ }).then((res) =>{
if(res.data.code === '0') { if(res.data.code === '0') {
this.data = res.data.data this.data = res.data.data
this.loading = false
} }
}) })
}, },
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<div class="mainContent tableCont"> <div class="mainContent tableCont">
<div class="tabCont"> <div class="tabCont">
<div class="title">{{deviceName}}操作记录</div> <div class="title">{{deviceName}}操作记录</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 type="index" label="序号"></el-table-column>
<el-table-column prop="iotInfo" label="操作事件"></el-table-column> <el-table-column prop="iotInfo" label="操作事件"></el-table-column>
<el-table-column prop="createTime" label="操作时间" ></el-table-column> <el-table-column prop="createTime" label="操作时间" ></el-table-column>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
import moment from 'moment' import moment from 'moment'
export default { export default {
data: () => ({ data: () => ({
loading: false, loading: true,
searchForm:{}, searchForm:{},
data:{ data:{
page: '1', page: '1',
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
}).then((res) =>{ }).then((res) =>{
if(res.data.code === '0') { if(res.data.code === '0') {
this.data = res.data.data this.data = res.data.data
this.loading = false
} }
}) })
}, },
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div class="mainContent tableCont"> <div class="mainContent tableCont">
<div class="tabCont"> <div class="tabCont">
<div class="title">设备列表</div> <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 type="index" label="序号"></el-table-column>
<el-table-column prop="deviceName" label="设备名称"></el-table-column> <el-table-column prop="deviceName" label="设备名称"></el-table-column>
<el-table-column prop="iotId" label="设备ID"></el-table-column> <el-table-column prop="iotId" label="设备ID"></el-table-column>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<script> <script>
export default { export default {
data: () => ({ data: () => ({
loading: false, loading: true,
searchForm:{}, searchForm:{},
data:{ data:{
page: '1', page: '1',
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
isAttribute:false isAttribute:false
}), }),
created () { created () {
this.projectId = window.sessionStorage.getItem('projectId') // this.projectId = window.sessionStorage.getItem('projectId')
this.projectId = 'beijing' this.projectId = 'beijing'
this.getPermissionsBtn() this.getPermissionsBtn()
this.getTypeList(this.projectId) this.getTypeList(this.projectId)
...@@ -147,6 +147,7 @@ export default { ...@@ -147,6 +147,7 @@ export default {
}).then((res) =>{ }).then((res) =>{
if(res.data.code === '0') { if(res.data.code === '0') {
this.data = res.data.data this.data = res.data.data
this.loading = false
} }
}) })
this.$axios.post('/deviceVehicle/findDeviceStatusCount',{ this.$axios.post('/deviceVehicle/findDeviceStatusCount',{
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
photoUrl: '', photoUrl: '',
dataForm: {}, dataForm: {},
token: '', token: '',
title: '' title: '',
}), }),
created () { created () {
this.getData() this.getData()
......
...@@ -7,11 +7,12 @@ import router from './router' ...@@ -7,11 +7,12 @@ import router from './router'
import axios from 'axios' import axios from 'axios'
import 'babel-polyfill' import 'babel-polyfill'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
require('element-ui/lib/theme-chalk/index.css') import 'element-theme-chalk';
import 'element-ui/lib/theme-chalk/index.css';
require('../static/css/index.css') require('../static/css/index.css')
Vue.use(uploader) Vue.use(uploader)
Vue.prototype.baseURL = 'http://39.97.169.207:9200' // 测试 Vue.prototype.baseURL = 'http://39.97.169.207:9200/' // 测试
// Vue.prototype.baseURL = 'https://witcase.chinajinmao.cn' // 正式 // Vue.prototype.baseURL = 'https://witcase.chinajinmao.cn' // 正式
axios.defaults.baseURL = Vue.prototype.baseURL axios.defaults.baseURL = Vue.prototype.baseURL
...@@ -36,8 +37,12 @@ axios.interceptors.response.use(function (response) { ...@@ -36,8 +37,12 @@ axios.interceptors.response.use(function (response) {
if (response.data.code === '0') { if (response.data.code === '0') {
return response return response
} else if (response.data.code === 'BASE_00004') { } else if (response.data.code === 'BASE_00004') {
alert('登录失效,请重新登录', '温馨提示') alert('登录失效,请重新登录', '温馨提示', {
router.push('/login') confirmButtonText: '确定',
callback: action => {
router.push('/login')
}
});
} else { } else {
// 在添加其他的错误码判断 // 在添加其他的错误码判断
if (response.data.msg) { if (response.data.msg) {
......
...@@ -198,12 +198,13 @@ a{text-decoration: none;color: #455467;} ...@@ -198,12 +198,13 @@ a{text-decoration: none;color: #455467;}
border-color: #BF0008!important; border-color: #BF0008!important;
} }
.el-button--default,.el-button--default:hover,.el-button--default:focus{ .el-button--default,.el-button--default:hover,.el-button--default:focus{
background-color: #FFFFFF; background-color:#FFFFFF!important;
color: #DF9F01!important; color: #DF9F01!important;
border-color: #DF9F01!important; border-color: #DF9F01!important;
} }
.el-button--primary:hover,.el-button--primary:focus{ .el-button--primary:hover,.el-button--primary:focus{
color: #FFFFFF!important; color: #FFFFFF!important;
background-color:#DF9F01!important;
} }
.lightBtn{ .lightBtn{
border-color: #9FA8B4!important; border-color: #9FA8B4!important;
...@@ -329,7 +330,7 @@ background-color:#bbb!important; ...@@ -329,7 +330,7 @@ background-color:#bbb!important;
} }
.el-date-editor .el-range-separator{line-height: 24px!important;} .el-date-editor .el-range-separator{line-height: 24px!important;}
.el-input__icon{line-height: 0!important;} .el-input__icon{line-height: 0!important;}
.el-tabs__header{margin: -10px 25px 15px 25px;} .el-tabs__header{margin: -10px 25px 15px 15px!important;}
.el-tabs__item{font-weight: normal!important;} .el-tabs__item{font-weight: normal!important;}
.el-switch__core{width: 36px!important;height: 10px!important;} .el-switch__core{width: 36px!important;height: 10px!important;}
.el-switch__core:after{top: -4px!important;left: -1px!important;box-shadow: 0px 2px 4px rgba(159, 168, 180, 0.6);} .el-switch__core:after{top: -4px!important;left: -1px!important;box-shadow: 0px 2px 4px rgba(159, 168, 180, 0.6);}
...@@ -395,21 +396,21 @@ background-color:#bbb!important; ...@@ -395,21 +396,21 @@ background-color:#bbb!important;
} }
} }
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9!important;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF!important;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
width: 178px; width: 178px!important;
height: 108px; height: 108px!important;
line-height: 108px; line-height: 108px!important;
text-align: center; text-align: center;
} }
.avatar { .avatar {
......
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