| | |
| | | <template> |
| | | <div id="app" class='el-science-blue'> |
| | | <div id="app" class="el-science-blue" :class="getClass"> |
| | | <router-view ref="routerView"></router-view> |
| | | </div> |
| | | </template> |
| | |
| | | <script> |
| | | let link; |
| | | export default { |
| | | name: 'App', |
| | | name: "App", |
| | | data() { |
| | | return { |
| | | fullScreen: false, |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | "$store.state.ukey.connect"(isConnet) { |
| | | this.$store.dispatch("ukey/checkIsIn", isConnet); |
| | | }, |
| | | "$store.state.ukey.isIn"(isIn) { |
| | | this.$store.dispatch('ukey/changeId', isIn); |
| | | this.$store.dispatch("ukey/changeId", isIn); |
| | | }, |
| | | "$store.state.theme.activeSkin"(val) { |
| | | if (val == 'science-blue') { |
| | | link.href = './theme/science-blue.css'; |
| | | } else if (val == 'science-green') { |
| | | link.href = './theme/science-green.css'; |
| | | } else if (val == 'science-black') { |
| | | link.href = './theme/science-black.css'; |
| | | if (val == "science-blue") { |
| | | link.href = "./theme/science-blue.css"; |
| | | } else if (val == "science-green") { |
| | | link.href = "./theme/science-green.css"; |
| | | } else if (val == "science-black") { |
| | | link.href = "./theme/science-black.css"; |
| | | } |
| | | let iframes = this.$refs.routerView.$el.getElementsByTagName("iframe"); |
| | | for (let i = 0; i < iframes.length; i++) { |
| | | iframes[i].contentDocument.getElementById("theme").href = link.href; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // 启动ukey监控 |
| | | this.$store.dispatch('ukey/load', true); |
| | | require('./assets/css/m-elementui.css'); |
| | | this.$store.dispatch("ukey/load", true); |
| | | require("./assets/css/m-elementui.css"); |
| | | this.appenCss(); |
| | | require('./assets/css/basic.css'); |
| | | require('./assets/css/common.css'); |
| | | require("./assets/css/basic.css"); |
| | | require("./assets/css/common.css"); |
| | | }, |
| | | methods: { |
| | | appenCss() { |
| | | link = document.createElement('link'); |
| | | link.type = 'text/css'; |
| | | link = document.createElement("link"); |
| | | link.type = "text/css"; |
| | | link.id = "theme"; |
| | | link.rel = 'stylesheet'; |
| | | if (this.$store.state.theme.activeSkin == 'science-blue') { |
| | | link.href = './theme/science-blue.css'; |
| | | } else if (this.$store.state.theme.activeSkin == 'science-green') { |
| | | link.href = './theme/science-green.css'; |
| | | } else if (this.$store.state.theme.activeSkin == 'science-black') { |
| | | link.href = './theme/science-black.css'; |
| | | link.rel = "stylesheet"; |
| | | if (this.$store.state.theme.activeSkin == "science-blue") { |
| | | link.href = "./theme/science-blue.css"; |
| | | } else if (this.$store.state.theme.activeSkin == "science-green") { |
| | | link.href = "./theme/science-green.css"; |
| | | } else if (this.$store.state.theme.activeSkin == "science-black") { |
| | | link.href = "./theme/science-black.css"; |
| | | } |
| | | document.getElementsByTagName("head")[0].appendChild(link); |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | getClass() { |
| | | return { |
| | | "no-bg": this.$route.path == "/home" ? false : true, |
| | | }; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | box-sizing: border-box; |
| | | height: 100vh; |
| | | } |
| | | #app.no-bg { |
| | | background-image: none; |
| | | } |
| | | </style> |
| | |
| | | level: 1, |
| | | childrens: [ |
| | | { |
| | | label: "告警派单管理", |
| | | name: "alarmDispatch", |
| | | src: "#/alarmDispatch", |
| | | closable: true, |
| | | id: 4012, |
| | | menuId: 4, |
| | | enableduse: true, |
| | | ord: 12, |
| | | level: 2, |
| | | }, |
| | | { |
| | | label: "电源实时告警", |
| | | name: "powerRealtimeInfo", |
| | | src: "#/powerRealtimeInfo", |
| | |
| | | ord: 11, |
| | | level: 2, |
| | | } |
| | | // 最大ord=11 |
| | | // 最大ord=12 |
| | | ] |
| | | }, |
| | | { |
| | |
| | | <template> |
| | | <div |
| | | class="flex-layout" :class=getRootClass :style="getRootStyle" |
| | | class="flex-layout" |
| | | :class="getRootClass" |
| | | :style="getRootStyle" |
| | | v-loading="loading" |
| | | element-loading-text="拼命加载中" |
| | | element-loading-spinner="el-icon-loading" |
| | | element-loading-background="rgba(0, 0, 0, 0.2)"> |
| | | element-loading-background="rgba(0, 0, 0, 0.2)" |
| | | > |
| | | <div class="flex-layout-header"> |
| | | <slot name="header"></slot> |
| | | </div> |
| | |
| | | props: { |
| | | direction: { |
| | | type: String, |
| | | default: '', |
| | | default: "", |
| | | }, |
| | | height: { |
| | | type: String, |
| | |
| | | }, |
| | | noBg: { |
| | | type: Boolean, |
| | | default: false |
| | | default: false, |
| | | }, |
| | | loading: { |
| | | type: Boolean, |
| | | default: false, |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | getRootClass: function() { |
| | | return { |
| | | 'direction-row': this.direction == 'row'?true: false |
| | | "direction-row": this.direction == "row" ? true : false, |
| | | }; |
| | | }, |
| | | getRootStyle: function() { |
| | | return { |
| | | 'height': this.height, |
| | | } |
| | | height: this.height, |
| | | }; |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | background-color: #05227200; |
| | | } |
| | | </style> |
| | | |
| | | |
New file |
| | |
| | | <template> |
| | | <content-box class="page-root" title="派单管理"> |
| | | <admin-view v-if="userPower"></admin-view> |
| | | <maintncer-view v-else></maintncer-view> |
| | | </content-box> |
| | | </template> |
| | | |
| | | <script> |
| | | import ContentBox from "@/components/ContentBox"; |
| | | import AdminView from "./components/admin-view.vue"; |
| | | import maintncerView from "@/pages/alarmMager/components/maintncer-view.vue"; |
| | | export default { |
| | | components: { |
| | | ContentBox, |
| | | AdminView, |
| | | maintncerView, |
| | | }, |
| | | data() { |
| | | let userPower = sessionStorage.getItem("userPower"); |
| | | return { |
| | | userPower: 1, |
| | | }; |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
New file |
| | |
| | | <template> |
| | | <el-tabs v-model="acTabs" tab-position="left" style="height: 100%;"> |
| | | <el-tab-pane label="待派发"> |
| | | <alarm-bill-type></alarm-bill-type> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="已派发"></el-tab-pane> |
| | | <el-tab-pane label="待审核"></el-tab-pane> |
| | | <el-tab-pane label="已完成"></el-tab-pane> |
| | | </el-tabs> |
| | | </template> |
| | | |
| | | <script> |
| | | import alarmBillType from "@/pages/alarmMager/components/alarm-bill-type"; |
| | | export default { |
| | | components: { |
| | | alarmBillType, |
| | | }, |
| | | data() { |
| | | return { |
| | | acTabs: 0, |
| | | waitHandOut: { |
| | | data: [], |
| | | page: { |
| | | pageSize: 10, |
| | | pageCurr: 0, |
| | | }, |
| | | }, |
| | | handOuted: { |
| | | data: [], |
| | | page: { |
| | | pageSize: 10, |
| | | pageCurr: 0, |
| | | }, |
| | | }, |
| | | waitVerity: { |
| | | data: [], |
| | | page: { |
| | | pageSize: 10, |
| | | pageCurr: 0, |
| | | }, |
| | | }, |
| | | finishedInfo: { |
| | | data: [], |
| | | page: { |
| | | pageSize: 10, |
| | | pageCurr: 0, |
| | | }, |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | searchData() {}, |
| | | }, |
| | | mounted() {}, |
| | | beforeDestroy() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
New file |
| | |
| | | <template> |
| | | <flex-layout no-bg> |
| | | <div class="flex-page-content"> |
| | | <el-table stripe size="small" :data="data" height="100%"> |
| | | <el-table-column |
| | | prop="UDepartment" |
| | | align="center" |
| | | label="维护区" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="UDepartment" |
| | | align="center" |
| | | label="维护区" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="UDepartment" |
| | | align="center" |
| | | label="维护区" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="UDepartment" |
| | | align="center" |
| | | label="维护区" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="UDepartment" |
| | | align="center" |
| | | label="维护区" |
| | | ></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="flex-page-footer" slot="footer"> |
| | | <el-pagination |
| | | size="mini" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="page.pageCurr" |
| | | :page-sizes="[10, 20, 30, 50, 100]" |
| | | :page-size="page.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="totalNum" |
| | | ></el-pagination> |
| | | </div> |
| | | </flex-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | note: { |
| | | type: Number, |
| | | default: 1, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | data: [], |
| | | page: { |
| | | pageSize: 10, |
| | | pageCurr: 0, |
| | | }, |
| | | totalNum: 0, |
| | | }; |
| | | }, |
| | | methods: { |
| | | queryData() {}, |
| | | // 显示条数改变时 |
| | | handleSizeChange(val) { |
| | | this.page.pageSize = val; |
| | | this.queryData(); |
| | | }, |
| | | // 翻页 |
| | | handleCurrentChange(val) { |
| | | this.page.pageCurr = val; |
| | | this.queryData(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
New file |
| | |
| | | <template> |
| | | <el-tabs v-model="acTabs" tab-position="left" style="height: 100%;"> |
| | | <el-tab-pane label="全部"> </el-tab-pane> |
| | | <el-tab-pane label="待处理"> </el-tab-pane> |
| | | <el-tab-pane label="处理中"> </el-tab-pane> |
| | | <el-tab-pane label="已完成"> </el-tab-pane> |
| | | </el-tabs> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return {}; |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
New file |
| | |
| | | <template> |
| | | <el-table stripe size="small" :data="data" height="100%"> |
| | | <el-table-column |
| | | prop="battGroupId" |
| | | align="center" |
| | | label="电池组ID" |
| | | ></el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | data: [], |
| | | }; |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | |
| | | <template> |
| | | <flex-layout class="page-home"> |
| | | <flex-layout class="page-home" no-bg> |
| | | <page-header |
| | | slot="header" |
| | | :class="{ 'show-drawer': drawer }" |
| | |
| | | <div class="login_container"> |
| | | <div class="sliderCon"> |
| | | <div class="logo"> |
| | | <img :src="logoUrl" class="logoImg"> |
| | | <img :src="logoUrl" class="logoImg" /> |
| | | {{ platformName }} |
| | | </div> |
| | | <img src="../assets/images/login-img.png" class="picImg"> |
| | | <img src="../assets/images/login-img.png" class="picImg" /> |
| | | </div> |
| | | <div class="login_box"> |
| | | <div class="title">用户登录</div> |
| | | <!-- 登录表单区 --> |
| | | <el-form label-width="0px" class="login_from" :model="loginForm" ref="loginFormRef"> |
| | | <el-form |
| | | label-width="0px" |
| | | class="login_from" |
| | | :model="loginForm" |
| | | ref="loginFormRef" |
| | | > |
| | | <!-- 用户名 --> |
| | | <el-form-item prop="username"> |
| | | <el-input class="input" v-model="loginForm.username" prefix-icon="el-icon-user" |
| | | @keyup.enter.native.stop="onSubmit"></el-input> |
| | | <el-input |
| | | class="input" |
| | | v-model="loginForm.username" |
| | | prefix-icon="el-icon-user" |
| | | @keyup.enter.native.stop="onSubmit" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 密码 --> |
| | | <el-form-item prop="password"> |
| | | <el-input class="input" v-model="loginForm.password" prefix-icon="el-icon-lock" type="password" |
| | | @keyup.enter.native.stop="onSubmit"></el-input> |
| | | <el-input |
| | | class="input" |
| | | v-model="loginForm.password" |
| | | prefix-icon="el-icon-lock" |
| | | type="password" |
| | | @keyup.enter.native.stop="onSubmit" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item class="btns"> |
| | | <el-button :loading="loading" type="primary" @click="onSubmit" class="loginBtn">登录</el-button> |
| | | <el-button |
| | | :loading="loading" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | class="loginBtn" |
| | | >登录</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item v-if="!register"> |
| | | <a href="javascript:;" @click="license.show = true" |
| | | class="regBtn">平台注册</a> |
| | | <a href="javascript:;" @click="license.show = true" class="regBtn" |
| | | >平台注册</a |
| | | > |
| | | </el-form-item> |
| | | <el-form-item v-else> |
| | | <a href="javascript:;" class="regBtn">已激活</a> |
| | |
| | | </div> |
| | | <!-- license弹框输入面板 --> |
| | | <el-dialog |
| | | title="平台注册提示" width="600px" |
| | | title="平台注册提示" |
| | | width="600px" |
| | | :visible.sync="license.show" |
| | | :close-on-click-modal="false" top="0" |
| | | class="dialog-center" :modal-append-to-body="false"> |
| | | <add-license v-if="license.show" :visible.sync="license.show"></add-license> |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <add-license |
| | | v-if="license.show" |
| | | :visible.sync="license.show" |
| | | ></add-license> |
| | | </el-dialog> |
| | | <!-- 人脸登陆 --> |
| | | <el-dialog |
| | | title="人脸登陆" width="480px" |
| | | title="人脸登陆" |
| | | width="480px" |
| | | :visible.sync="face.show" |
| | | :close-on-click-modal="false" top="0" |
| | | class="dialog-center" :modal-append-to-body="false"> |
| | | <face-login v-if="face.show" :visible.sync="face.show" @success="checkServeLicense"></face-login> |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <face-login |
| | | v-if="face.show" |
| | | :visible.sync="face.show" |
| | | @success="checkServeLicense" |
| | | ></face-login> |
| | | </el-dialog> |
| | | <!-- 功能描述 --> |
| | | <el-dialog |
| | | title="配置清单" width="960px" |
| | | title="配置清单" |
| | | width="960px" |
| | | :visible.sync="config.show" |
| | | :close-on-click-modal="false" top="0" |
| | | class="dialog-center" :modal-append-to-body="false"> |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <config-info></config-info> |
| | | </el-dialog> |
| | | <!-- uKey的验证 --> |
| | | <el-dialog |
| | | title="uKey绑定" width="750px" |
| | | title="uKey绑定" |
| | | width="750px" |
| | | :visible.sync="uKey.show" |
| | | :close-on-click-modal="false" top="0" |
| | | class="dialog-center" :modal-append-to-body="false"> |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <ukey-bind v-if="uKey.show" :visible.sync="uKey.show"></ukey-bind> |
| | | </el-dialog> |
| | | <div class="tools-container"> |
| | | <div class="tools-item" :class="uKeyState" v-if="$CFG.uKey.value" @click="uKey.show=true"> |
| | | <div |
| | | class="tools-item" |
| | | :class="uKeyState" |
| | | v-if="$CFG.uKey.value" |
| | | @click="uKey.show = true" |
| | | > |
| | | <span class="iconfont el-icon-CombinedShape"></span> |
| | | </div> |
| | | <div class="tools-item" v-if="$CFG.face.value" @click="face.show=true"> |
| | | <div |
| | | class="tools-item" |
| | | v-if="$CFG.face.value" |
| | | @click="face.show = true" |
| | | > |
| | | <span class="iconfont el-icon-renlianshibie"></span> |
| | | </div> |
| | | <div class="tools-item" @click="config.show=true"> |
| | |
| | | {{copyRight.data}} |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import AddLicense from "@/pages/AddLicense"; |
| | | import FaceLogin from '@/components/face/FaceLogin'; |
| | | import FaceLogin from "@/components/face/FaceLogin"; |
| | | import { |
| | | login, |
| | | initDBPool, |
| | | checkLoginSession, uKeyLogin, getRandomFromServer, loginSignVerity |
| | | checkLoginSession, |
| | | uKeyLogin, |
| | | getRandomFromServer, |
| | | loginSignVerity, |
| | | } from "@/assets/js/api"; |
| | | import ConfigInfo from "@/pages/configInfo"; |
| | | import UkeyBind from "@/components/UKeyBind"; |
| | | import nfdw from '@/assets/images/nfdw-log.png'; |
| | | import gjdw from '@/assets/images/gjdw-log.png'; |
| | | import gjdx from '@/assets/images/gjdx-log.png'; |
| | | import qwh from '@/assets/images/qwh-logo.png'; |
| | | import yuanchange from '@/assets/images/yuanchang_logo2.png'; |
| | | import nfdw from "@/assets/images/nfdw-log.png"; |
| | | import gjdw from "@/assets/images/gjdw-log.png"; |
| | | import gjdx from "@/assets/images/gjdx-log.png"; |
| | | import qwh from "@/assets/images/qwh-logo.png"; |
| | | import yuanchange from "@/assets/images/yuanchang_logo2.png"; |
| | | import platform from "@/assets/js/config"; |
| | | import SoftUKey from "@/assets/js/tools/SoftUKey"; |
| | | import SoftKey3W from "@/assets/js/Syunew3"; |
| | |
| | | UkeyBind, |
| | | ConfigInfo, |
| | | AddLicense, |
| | | FaceLogin |
| | | FaceLogin, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | formLabelAlign: { |
| | | name: "", |
| | | region: "", |
| | | type: "" |
| | | type: "", |
| | | }, |
| | | /* 登录表单el-form 的 数据绑定 */ |
| | | loginForm: { |
| | | username: "", |
| | | password: "" |
| | | password: "", |
| | | }, |
| | | license: { |
| | | show: false |
| | | show: false, |
| | | }, |
| | | face: { |
| | | show: false |
| | | show: false, |
| | | }, |
| | | config: { |
| | | show: false |
| | | show: false, |
| | | }, |
| | | uKey: { |
| | | show: false, |
| | |
| | | platformName: "", |
| | | logoConfig: platform.logo, |
| | | copyRight: platform.copyRight, |
| | | softUKey: new SoftUKey(SoftKey3W) |
| | | softUKey: new SoftUKey(SoftKey3W), |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | /* 初始化连接池 检测后台session*/ |
| | | async woData() { |
| | | const [pool, sessions] = await Promise.all([initDBPool, checkLoginSession]) |
| | | const [pool, sessions] = await Promise.all([ |
| | | initDBPool, |
| | | checkLoginSession, |
| | | ]); |
| | | /* console.log('pool',pool); |
| | | console.log('sessions',sessions); */ |
| | | }, |
| | |
| | | if (this.loginForm.username && this.loginForm.password) { |
| | | // 开启等待框 |
| | | this.loading = true; |
| | | login(this.loginForm.username, this.loginForm.password).then(res => { |
| | | login(this.loginForm.username, this.loginForm.password) |
| | | .then((res) => { |
| | | // 对结果进行处理 |
| | | this.handleLogin(res); |
| | | }).catch(error => { |
| | | }) |
| | | .catch((error) => { |
| | | // 关闭等待 |
| | | this.loading = false; |
| | | console.log(error); |
| | |
| | | } |
| | | }, |
| | | getRandomFromServer() { |
| | | getRandomFromServer().then(res=>{ |
| | | getRandomFromServer() |
| | | .then((res) => { |
| | | let rs = JSON.parse(res.data.result); |
| | | if(rs.code == 1) { |
| | | let randomNumber = rs.data; |
| | |
| | | }else { |
| | | this.$message.error("服务器连接异常!"); |
| | | } |
| | | }).catch(error=>{ |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error("服务器连接异常!"); |
| | | }); |
| | | }, |
| | |
| | | let reg = new RegExp("&", "g"); |
| | | result.inPath = result.inPath.replace(reg, "%26"); |
| | | result.inPath = result.inPath.replace(/\\/g, "huodongwei"); |
| | | loginSignVerity(result).then(res=>{ |
| | | loginSignVerity(result) |
| | | .then((res) => { |
| | | let rs = JSON.parse(res.data.result); |
| | | if(rs.code == 1) { |
| | | this.uKeyLogin(); |
| | | }else { |
| | | this.$message.error("UKey签名校验失败!"); |
| | | } |
| | | }).catch(error=>{ |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error("服务器连接异常!"); |
| | | }); |
| | | }, |
| | |
| | | if (this.loginForm.username && this.loginForm.password) { |
| | | // 开启等待框 |
| | | this.loading = true; |
| | | uKeyLogin(this.loginForm.username, this.loginForm.password, this.$store.state.ukey.id).then(res => { |
| | | uKeyLogin( |
| | | this.loginForm.username, |
| | | this.loginForm.password, |
| | | this.$store.state.ukey.id |
| | | ) |
| | | .then((res) => { |
| | | // 对结果进行处理 |
| | | this.handleLogin(res); |
| | | }).catch(error => { |
| | | }) |
| | | .catch((error) => { |
| | | // 关闭等待 |
| | | this.loading = false; |
| | | console.log(error); |
| | |
| | | let rs = JSON.parse(res.data.result); |
| | | if (rs.code == 1) { |
| | | this.$message.success("登录成功"); |
| | | sessionStorage.setItem('username', this.loginForm.username); |
| | | sessionStorage.setItem('userId', rs.data); |
| | | sessionStorage.setItem("username", this.loginForm.username); |
| | | sessionStorage.setItem("userId", rs.data); |
| | | sessionStorage.setItem("userPower", rs.data2); |
| | | // 自动登录无法返回登录页 |
| | | if (this.$store.state.user.autoLogin) { |
| | | this.$router.replace("/home"); |
| | |
| | | } |
| | | |
| | | // 设置用户的权限 |
| | | this.$store.dispatch('user/getPermits'); |
| | | this.$store.dispatch("user/getPermits"); |
| | | } else { |
| | | this.$message.error(rs.msg); |
| | | } |
| | | }, |
| | | checkServeLicense() { |
| | | // 校验服务器是否注册 |
| | | this.$apis.license.checkServeLicense().then(res => { |
| | | this.$apis.license |
| | | .checkServeLicense() |
| | | .then((res) => { |
| | | let rs = JSON.parse(res.data.result); |
| | | if (rs.code == 1) { |
| | | this.register = true; |
| | |
| | | this.license.show = true; |
| | | this.register = false; |
| | | } |
| | | }).catch(error => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | autoLogin() { // 自动登录 |
| | | this.$apis.login.checkReferer().then(res => { |
| | | autoLogin() { |
| | | // 自动登录 |
| | | this.$apis.login |
| | | .checkReferer() |
| | | .then((res) => { |
| | | let rs = JSON.parse(res.data.result); |
| | | console.log(rs); |
| | | if (rs) { |
| | | this.$store.dispatch('user/changeAutoLogin', 1); |
| | | this.$store.dispatch("user/changeAutoLogin", 1); |
| | | this.loginForm.username = "zhdl"; |
| | | this.loginForm.password = "123456"; |
| | | this.normalLogin(); |
| | | } |
| | | }).catch(error => { |
| | | |
| | | }); |
| | | }) |
| | | .catch((error) => {}); |
| | | // let pattern = /(localhost)|(www\.sw-ht\.com)/; |
| | | // let where = document.referrer; |
| | | // if(pattern.test(where)) { |
| | |
| | | // } |
| | | }, |
| | | searchPlatformName() { |
| | | this.$apis.pageSetting.realTime.searchName().then(res=>{ |
| | | this.$apis.pageSetting.realTime |
| | | .searchName() |
| | | .then((res) => { |
| | | let rs = JSON.parse(res.data.result); |
| | | if(rs.code == 1) { |
| | | let data = rs.data[0]; |
| | |
| | | }else { |
| | | this.platformName = "蓄电池后台监控管理平台"; |
| | | } |
| | | sessionStorage.setItem('platformName', this.platformName); |
| | | }).catch(error=>{ |
| | | sessionStorage.setItem("platformName", this.platformName); |
| | | }) |
| | | .catch((error) => { |
| | | this.platformName = "蓄电池后台监控管理平台"; |
| | | sessionStorage.setItem('platformName', this.platformName); |
| | | sessionStorage.setItem("platformName", this.platformName); |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | uKeyState() { |
| | |
| | | |
| | | switch (logoConfig.fileName) { |
| | | case "nfdw": |
| | | image = nfdw |
| | | image = nfdw; |
| | | break; |
| | | case "gjdx": |
| | | image = gjdx; |
| | | break; |
| | | case 'qwh': |
| | | case "qwh": |
| | | image = qwh; |
| | | break; |
| | | case 'gjdw': |
| | | case "gjdw": |
| | | image = gjdw; |
| | | break; |
| | | } |
| | | return image; |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // 初始化user的信息 |
| | | this.$store.commit('user/init'); |
| | | this.$store.commit("user/init"); |
| | | // 初始化登录状态 |
| | | sessionStorage.setItem('username', ""); |
| | | sessionStorage.setItem("username", ""); |
| | | this.checkServeLicense(); |
| | | |
| | | // 自动登录 |
| | | this.autoLogin(); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | line-height: 48px; |
| | | } |
| | | |
| | | .el-science-blue .login_from .el-input.is-disabled .el-input__inner, .el-science-blue .login_from .el-input__inner { |
| | | .el-science-blue .login_from .el-input.is-disabled .el-input__inner, |
| | | .el-science-blue .login_from .el-input__inner { |
| | | background-color: transparent; |
| | | border-color: #e4e4e4; |
| | | color: #868686; |
| | | } |
| | | |
| | | .el-science-blue .login_from .el-input__prefix, .el-input__suffix, .el-science-blue .login_from .el-select .el-input .el-select__caret { |
| | | .el-science-blue .login_from .el-input__prefix, |
| | | .el-input__suffix, |
| | | .el-science-blue .login_from .el-select .el-input .el-select__caret { |
| | | color: #007fe1; |
| | | } |
| | | </style> |
| | |
| | | position: absolute; |
| | | bottom: 0; |
| | | right: 0; |
| | | background-color: #FFFFFF; |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .tools-container .tools-item { |
| | |
| | | } |
| | | |
| | | .tools-container .tools-item:hover { |
| | | |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | |
| | | width: 416px; |
| | | height: 376px; |
| | | } |
| | | |
| | | } |
| | | </style> |
| | | |
| | |
| | | next(); |
| | | } |
| | | }); |
| | | const routerPush = VueRouter.prototype.push |
| | | const routerPush = VueRouter.prototype.push; |
| | | VueRouter.prototype.push = function push(location) { |
| | | return routerPush.call(this, location).catch(error=> error) |
| | | } |
| | | }; |
| | | |
| | | export default router; |
| | |
| | | component: (resolve) => require(['../pages/alarmMager/batteryrTimequery.vue'], resolve) |
| | | }, |
| | | { |
| | | name: 'alarmDispatch', |
| | | path: '/alarmDispatch', |
| | | meta: {}, |
| | | component: (resolve) => require(['../pages/alarmMager//alarm-dispatch.vue'], resolve) |
| | | }, |
| | | { |
| | | name: 'powerRealtimeInfo', |
| | | path: '/powerRealtimeInfo', |
| | | /* 电源实时信息告警 */ |