New file |
| | |
| | | import Vue from 'vue'; |
| | | const Bus = new Vue(); |
| | | export default Bus; |
| | |
| | | break; |
| | | } |
| | | // 请求接口 |
| | | serverLang(_lang).catch(err => { |
| | | serverLang(_lang).then(() => { |
| | | this.$bus.$emit('langChanged'); |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | |
| | | import G from './global' |
| | | Vue.prototype.$G = G; |
| | | |
| | | import bus from './assets/js/bus'; |
| | | Vue.prototype.$bus = bus; |
| | | |
| | | |
| | | Vue.config.productionTip = false |
| | | |
| | |
| | | this.sessionSite(); /* 机房站点 */ |
| | | this.batterJque(); /* 蓄电池组 */ |
| | | this.historyArlm(); /* 历史告警记录 */ |
| | | this.$bus.$on('langChanged', () => { |
| | | this.historyArlm(); |
| | | }); |
| | | }, |
| | | computed: { |
| | | alarmTotal() { |
| | |
| | | DispatchForm |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('langChanged', () => { |
| | | this.sendMessage(); |
| | | }); |
| | | // 根据告警类型勾选筛选条件 |
| | | let alarmType = this.$route.query.alarmType; |
| | | if (alarmType) { |
| | |
| | | this.skinActive = localStorage.getItem("activeSkin"); |
| | | this.changeSkin(); |
| | | }, |
| | | "$store.state.settings.lang": { |
| | | handler(v) { |
| | | // this.$i18n.locale = v; |
| | | // this.$root.$i18n.locale = v; |
| | | this.sendMessage(); |
| | | }, |
| | | immediate: true |
| | | }, |
| | | // "$store.state.settings.lang": { |
| | | // handler(v) { |
| | | // // this.$i18n.locale = v; |
| | | // // this.$root.$i18n.locale = v; |
| | | // this.sendMessage(); |
| | | // }, |
| | | // immediate: true |
| | | // }, |
| | | }, |
| | | computed: { |
| | | alarmTotal() { |
| | |
| | | <template> |
| | | <flex-layout> |
| | | <div slot="header"> |
| | | <number-total-labels |
| | | :total="alarmTotal" |
| | | :level1="levelRes.one" |
| | | :level2="levelRes.two" |
| | | :level3="levelRes.three" |
| | | <number-total-labels :total="alarmTotal" :level1="levelRes.one" :level2="levelRes.two" :level3="levelRes.three" |
| | | :level4="levelRes.four"></number-total-labels> |
| | | <div class="table-layout filter-box-table"> |
| | | <div class="table-row"> |
| | | <div class="table-cell text-right">维护区:</div> |
| | | <div class="table-cell text-right">{{ $t('MaintenanceArea') }}:</div> |
| | | <div class="table-cell"> |
| | | <el-select |
| | | v-model="selectValue1" |
| | | @change="changeSelect1" |
| | | :placeholder="this.selectPlace1" |
| | | class="weihu" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in devss" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | <el-select v-model="selectValue1" @change="changeSelect1" :placeholder="this.selectPlace1" class="weihu" |
| | | size="small"> |
| | | <el-option v-for="(item, idx) in devss" :key="item.value" :label="0 == idx ? $tc('form.allCount', item.label) : item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="table-cell text-right">机房名称:</div> |
| | | <div class="table-cell text-right">{{ $t('EquipmentRoomName') }}:</div> |
| | | <div class="table-cell"> |
| | | <el-select |
| | | v-model="selectValue2" |
| | | class="rooms" |
| | | @change="alramData" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in opt" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | <el-select v-model="selectValue2" class="rooms" @change="alramData" size="small"> |
| | | <el-option v-for="(item, idx) in opt" :key="item.value" :label="0 == idx ? $tc('form.allCount', item.label) : item.label" :value="item.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="table-cell text-right">操作记录时间段:</div> |
| | | <div class="table-cell text-right">{{ $t('OperationRecordTime') }}:</div> |
| | | <div class="table-cell"> |
| | | <el-date-picker |
| | | v-model="valueTime1" |
| | | size="small" |
| | | class="time_box" |
| | | :picker-options="pickerOptions0" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | 至 |
| | | <el-date-picker |
| | | v-model="valueTime2" |
| | | size="small" |
| | | class="time_box" |
| | | :picker-options="pickerOptions1" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="valueTime1" size="small" class="time_box" :picker-options="pickerOptions0" |
| | | type="date" :placeholder="$t('form.selectDate')" value-format="yyyy-MM-dd"></el-date-picker> |
| | | - |
| | | <el-date-picker v-model="valueTime2" size="small" class="time_box" :picker-options="pickerOptions1" |
| | | type="date" :placeholder="$t('form.selectDate')" value-format="yyyy-MM-dd"></el-date-picker> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <!-- 表单 --> |
| | | <div class="flex-page-content"> |
| | | <el-table |
| | | stripe |
| | | size="small" |
| | | :data="table.datas" |
| | | height="100%" |
| | | class="tableCent" |
| | | tooltip-effect="light" |
| | | > |
| | | <el-table-column type="index" label="编号" width="50"> |
| | | <el-table stripe size="small" :data="table.datas" height="100%" class="tableCent" tooltip-effect="light"> |
| | | <el-table-column type="index" :label="$t('Num')" width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-for="header in table.headers" |
| | | :key="header.prop" |
| | | :prop="header.prop" |
| | | :label="header.label" |
| | | :min-width="header.width" |
| | | align="center" |
| | | show-overflow-tooltip |
| | | > |
| | | <el-table-column v-for="header in table.headers" :key="header.prop" :prop="header.prop" :label="$t(header.label)" |
| | | :min-width="header.width" align="center" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div> |
| | | <div v-if="header.prop == 'isalarm1'"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cztime" |
| | | fixed="right" |
| | | width="180px" |
| | | align="center" |
| | | label="操作" |
| | | > |
| | | <el-table-column prop="cztime" fixed="right" width="210px" align="center" :label="$t('operate.operation')"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" size="mini" @click="goRealTime(scope.row)">实时</el-button> |
| | | <el-button |
| | | :disabled="!isCanDel" |
| | | type="danger" |
| | | size="mini" |
| | | @click="deleteUser(scope.row)" |
| | | >删除</el-button |
| | | > |
| | | <el-button type="primary" size="mini" @click="goRealTime(scope.row)">{{ $t('Realtime') }}</el-button> |
| | | <el-button :disabled="!isCanDel" type="danger" size="mini" @click="deleteUser(scope.row)">{{ $t('Delete') |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <!-- 底部分页 --> |
| | | <div class="flex-page-footer" slot="footer"> |
| | | <div class="el-pagination-btns"> |
| | | <el-button |
| | | type="primary" |
| | | @click="alramData" |
| | | round |
| | | size="mini" |
| | | icon="el-icon-search" |
| | | >查询</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | round |
| | | size="mini" |
| | | icon="el-icon-wallet" |
| | | @click="exportFile" |
| | | >导出</el-button |
| | | > |
| | | <el-button type="primary" @click="alramData" round size="mini" icon="el-icon-search">{{ $t('operate.search') |
| | | }}</el-button> |
| | | <el-button type="primary" round size="mini" icon="el-icon-wallet" @click="exportFile">{{ $t('operate.export') |
| | | }}</el-button> |
| | | </div> |
| | | <el-pagination |
| | | class="pagess" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="queryInfo.pageCurr" |
| | | :page-sizes="[10, 20, 30, 50, 100]" |
| | | :page-size="queryInfo.pagesize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | ></el-pagination> |
| | | <!-- <el-button type="primary" round size="mini" icon="el-icon-wallet">全部选中</el-button> --> |
| | | <el-pagination class="pagess" @size-change="handleSizeChange" @current-change="handleCurrentChange" |
| | | :current-page="queryInfo.pageCurr" :page-sizes="[10, 20, 30, 50, 100]" :page-size="queryInfo.pagesize" |
| | | layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> |
| | | </div> |
| | | </flex-layout> |
| | | </template> |
| | |
| | | import get_county_station from "@/assets/js/tools/get_county_station"; |
| | | import getSearch from "@/assets/js/tools/getSearch"; |
| | | const { types, levels } = getDevAlarm(); |
| | | import i18n from './i18n/deviceHistoryquery'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | import i18nGetDevAlarm from '@/assets/js/i18n/getDevAlarm'; |
| | | const i18nMixin = createI18nOption(i18n, [[i18nGetDevAlarm, 'alarm']]); |
| | | export default { |
| | | name: 'deviceHistoryquery', |
| | | components: {NumberTotalLabels}, |
| | | components: { NumberTotalLabels }, |
| | | mixins: [i18nMixin], |
| | | data() { |
| | | let permits = this.$store.state.user.permits; |
| | | let isCanDel = isHasPermit("dev_alm_delete_permit", permits); |
| | |
| | | headers: [ |
| | | { |
| | | prop: "devId", |
| | | label: "设备ID", |
| | | label: "devId", |
| | | width: 100, |
| | | }, |
| | | { |
| | | prop: "devName", |
| | | label: "设备名", |
| | | label: "devName", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "devIp", |
| | | label: "设备IP", |
| | | label: "devIp", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "stationNamex", |
| | | label: "机房名称", |
| | | label: "EquipmentRoomName", |
| | | width: 320, |
| | | }, |
| | | { |
| | | prop: "alarmLevelName", |
| | | label: "告警事件", |
| | | label: "alarmLevelName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | prop: "almTypeName", |
| | | label: "告警等级", |
| | | width: 100, |
| | | label: "almTypeName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | prop: "almStartTime", |
| | | label: "告警开始时间", |
| | | label: "almStartTime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "isalarm1", |
| | | label: "告警确认", |
| | | width: 80, |
| | | label: "ConfirmAlarm", |
| | | width: 140, |
| | | }, |
| | | { |
| | | prop: "almConfirmedTime", |
| | | label: "告警确认时间", |
| | | width: 160, |
| | | label: "almConfirmedTime", |
| | | width: 170, |
| | | }, |
| | | { |
| | | prop: "almEndTime", |
| | | label: "告警结束时间", |
| | | label: "almEndTime", |
| | | width: "160", |
| | | }, |
| | | ], |
| | |
| | | computed: { |
| | | alarmTotal() { |
| | | let levelRes = this.levelRes; |
| | | return levelRes.one+levelRes.two+levelRes.three+levelRes.four; |
| | | return levelRes.one + levelRes.two + levelRes.three + levelRes.four; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.deviceList(); /* 维护区 */ |
| | | this.sesston(); /* 机房站点 */ |
| | | this.alramData(); /* 告警记录 */ |
| | | this.$bus.$on('langChanged', () => { |
| | | this.alramData(); |
| | | }); |
| | | }, |
| | | methods: { |
| | | // 导出表格 |
| | |
| | | }); |
| | | let list = this.table.datas; |
| | | let excelData = formatJson(filterVal, list); |
| | | export_json_to_excel(tHeader, excelData, "设备告警历史数据"); |
| | | export_json_to_excel(tHeader, excelData, this.$t('DeviceAlarmHistoryData')); |
| | | }, |
| | | /* 维护区 */ |
| | | async deviceList() { |
| | |
| | | }); |
| | | let len = res.data.length; |
| | | devss.unshift({ |
| | | label: `全部(共${len}种)`, |
| | | label: len, |
| | | value: "", |
| | | }); |
| | | this.devss = devss; |
| | | this.selectPlace1 = `全部(共${len}种)`; |
| | | this.selectPlace1 = ''; |
| | | } |
| | | }, |
| | | /* 机房站点 */ |
| | |
| | | }); |
| | | let len = res.data.length; |
| | | sesionsNews.unshift({ |
| | | label: `全部(共${len}种)`, |
| | | label: len, |
| | | value: "", |
| | | }); |
| | | this.opt = sesionsNews; |
| | | this.selectPlace2 = `全部(共${len}种)`; |
| | | this.selectPlace2 = ''; |
| | | if (status == 1) { |
| | | this.alramData(); |
| | | } |
| | |
| | | }, |
| | | stationName: this.selectValue2, |
| | | stationName1: this.selectValue1, |
| | | }).then(res=>{ |
| | | }).then(res => { |
| | | res = res.data; |
| | | console.log(res, "res44========="); |
| | | // console.log(res, "res44========="); |
| | | let levelRes = res.data2; |
| | | this.levelRes.one = levelRes[0]; |
| | | this.levelRes.two = levelRes[1]; |
| | |
| | | let isalarm1 = !!item.almIsConfirmed; |
| | | item.stationNamex = get_county_station(item.stationName); |
| | | item.isalarm1 = isalarm1; |
| | | item.isalarm2 = isalarm1 ? "是" : "否"; |
| | | item.isalarm2 = isalarm1 ? this.$t('form.yes') : this.$t('form.no'); |
| | | item.almConfirmedTime = isalarm1 ? item.almConfirmedTime : ""; |
| | | item.alarmLevelName = getLabelByValue(item.almLevel, this.levels); |
| | | item.almTypeName = getLabelByValue(item.almType, this.types); |
| | | item.alarmLevelName = this.$t('alarm.' + getLabelByValue(item.almLevel, this.levels)); |
| | | item.almTypeName = this.$t('alarm.' + getLabelByValue(item.almType, this.types)); |
| | | return item; |
| | | }); |
| | | total = res.data.total; |
| | |
| | | this.table.datas = list; |
| | | this.total = total; |
| | | this.$layer.close(loading); |
| | | }).catch(error=>{ |
| | | }).catch(error => { |
| | | this.$layer.close(loading); |
| | | console.log(error); |
| | | }); |
| | |
| | | /* 删除 */ |
| | | async deleteUser(value) { |
| | | const confirmResult = await this.$confirm( |
| | | "确定删除这条告警记录吗, 是否继续?", |
| | | "提示", |
| | | this.$t('deletealarmMsg'), |
| | | this.$t('message'), |
| | | { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | confirmButtonText: this.$t('operate.ok'), |
| | | cancelButtonText: this.$t('operate.cancel'), |
| | | type: "warning", |
| | | } |
| | | ).catch((err) => err); |
| | |
| | | }); |
| | | let res = wa.data; |
| | | if (res.code) { |
| | | this.$message.success("删除成功"); |
| | | this.$message.success(this.$t('operate.successMsg')); |
| | | this.alramData(); |
| | | } else { |
| | | return this.$message.error("删除失败"); |
| | | return this.$message.error(this.$t('operate.failMsg')); |
| | | } |
| | | }, |
| | | //维护区改变事件 |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | </style> |
| | | <style lang="less" scoped></style> |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | MaintenanceArea: '维护区', |
| | | EquipmentRoomName: '机房名称', |
| | | Num: '编号', |
| | | deletealarmMsg: '确定删除这条告警记录吗, 是否继续?', |
| | | message: '提示', |
| | | devId: "设备ID", |
| | | devName: "设备名", |
| | | devIp: "设备IP", |
| | | Delete: '删除', |
| | | almTypeName: "告警事件", |
| | | alarmLevelName: "告警等级", |
| | | almStartTime: "告警开始时间", |
| | | almConfirmedTime: "告警确认时间", |
| | | almEndTime: '告警结束时间', |
| | | ConfirmAlarm: '确认告警', |
| | | OperationRecordTime: '操作记录时间段', |
| | | Realtime: '实时', |
| | | DeviceAlarmHistoryData: '设备告警历史数据', |
| | | }, |
| | | US: { |
| | | MaintenanceArea: 'Maintenance Area', |
| | | EquipmentRoomName: 'Equipment Room Name', |
| | | Num: 'No.', |
| | | deletealarmMsg: 'Confirm to delete this alarm record? Continue?', |
| | | message: 'Message', |
| | | devId: "Device ID", |
| | | devName: "Device Name", |
| | | devIp: "Device IP", |
| | | Delete: 'Delete', |
| | | almTypeName: "Alarm Event", |
| | | alarmLevelName: "Alarm Level", |
| | | almStartTime: "Alarm Start Time", |
| | | almConfirmedTime: "Alarm Confirm Time", |
| | | almEndTime: 'Alarm Finish Time', |
| | | ConfirmAlarm: 'Confirm Alarm', |
| | | OperationRecordTime: 'Operation Record Time', |
| | | Realtime: 'Real-time', |
| | | DeviceAlarmHistoryData: 'Device Alarm History Data', |
| | | } |
| | | } |
| | | } |
| | |
| | | <div class="auto-login-loading" v-if="isAutoLogin"> |
| | | <img src="../../assets/images/login_loading.gif" /> |
| | | </div> |
| | | <div v-else class="login-wrapper" |
| | | v-loading="loading" |
| | | :element-loading-text="$t('loading')" |
| | | element-loading-spinner="el-icon-loading" |
| | | element-loading-background="rgba(0, 0, 0, 0.2)"> |
| | | <div |
| | | class="login_container" |
| | | :style="{ |
| | | background: 'url(' + backgroundImg + ') 0 0 no-repeat', |
| | | backgroundSize: '100% 100%' |
| | | }" |
| | | > |
| | | <div v-else class="login-wrapper" v-loading="loading" :element-loading-text="$t('loading')" |
| | | element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.2)"> |
| | | <div class="login_container" :style="{ |
| | | background: 'url(' + backgroundImg + ') 0 0 no-repeat', |
| | | backgroundSize: '100% 100%' |
| | | }"> |
| | | <div class="sliderCon"> |
| | | <div class="logo" v-if="$CFG.clientName.name != 'jstzLd9'"> |
| | | <img :src="logoUrl" class="logoImg" /> |
| | |
| | | <div class="login_box"> |
| | | <div class="title">{{ $t('UserLogin') }}</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 v-if="sysConfig.verifyCode.value && !$CFG.uKey.value"> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="14"> |
| | | <el-input |
| | | class="input" |
| | | :placeholder="$t('VerificationCode')" |
| | | v-model="loginForm.verify" |
| | | @keyup.enter.native.stop="onSubmit" |
| | | ></el-input> |
| | | <el-input class="input" :placeholder="$t('VerificationCode')" v-model="loginForm.verify" |
| | | @keyup.enter.native.stop="onSubmit"></el-input> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <v-sidentify |
| | | :identifyCode="verifyCode" |
| | | @click="changeVerifyCode" |
| | | ></v-sidentify> |
| | | <v-sidentify :identifyCode="verifyCode" @click="changeVerifyCode"></v-sidentify> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item class="btns"> |
| | | <el-button |
| | | :loading="loading" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | class="loginBtn" |
| | | >{{ $t('Login') }}</el-button |
| | | > |
| | | <el-button :loading="loading" type="primary" @click="onSubmit" class="loginBtn">{{ $t('Login') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item v-if="!register"> |
| | | <a href="javascript:;" @click="license.show = true" class="regBtn" |
| | | >{{ $t('PlatformRegister') }}</a |
| | | > |
| | | <a href="javascript:;" @click="license.show = true" class="regBtn">{{ $t('PlatformRegister') }}</a> |
| | | </el-form-item> |
| | | <el-form-item v-else> |
| | | <a href="javascript:;" class="regBtn">{{ $t('Activated') }}</a> |
| | |
| | | </el-form> |
| | | </div> |
| | | <!-- license弹框输入面板 --> |
| | | <el-dialog |
| | | :title="$t('PlatformRegistrationPrompt')" |
| | | width="860px" |
| | | :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> |
| | | <el-dialog :title="$t('PlatformRegistrationPrompt')" width="860px" :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> |
| | | </el-dialog> |
| | | <!-- 人脸登陆 --> |
| | | <!-- <el-dialog |
| | |
| | | ></face-login> |
| | | </el-dialog> --> |
| | | <!-- 功能描述 --> |
| | | <el-dialog |
| | | :title="$t('ConfigurationList')" |
| | | width="960px" |
| | | :visible.sync="config.show" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <el-dialog :title="$t('ConfigurationList')" width="960px" :visible.sync="config.show" :close-on-click-modal="false" |
| | | top="0" class="dialog-center" :modal-append-to-body="false"> |
| | | <config-info></config-info> |
| | | </el-dialog> |
| | | <!-- uKey的验证 --> |
| | |
| | | <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"> |
| | |
| | | </div> |
| | | <div class="copy-right" v-if="copyRight.value"> |
| | | {{ copyRight.data }} |
| | | </div> |
| | | <!-- lang --> |
| | | <div class="wrap-lang"> |
| | | <el-select class="lang" size="mini" v-model="lang" @change="langChange"> |
| | | <el-option v-for="(lang, idx) in langList" :key="'lang_' + idx" :label="lang.label" |
| | | :value="lang.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | VSidentify |
| | | }, |
| | | data() { |
| | | const langList = [ |
| | | { |
| | | label: 'English', |
| | | value: 'US' |
| | | }, |
| | | { |
| | | label: '中文', |
| | | value: 'CN' |
| | | } |
| | | ]; |
| | | let lang = this.$store.state.settings.lang; |
| | | return { |
| | | langList, |
| | | lang, |
| | | register: false, |
| | | sysConfig, |
| | | loading: false, |
| | |
| | | }, |
| | | watch: { |
| | | $route: { |
| | | handler: function(route) { |
| | | handler: function (route) { |
| | | this.redirect = route.query && route.query.redirect; |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | langChange(lang) { |
| | | // this.$i18n.locale = lang; |
| | | // console.log(this.$i18n, '===i18n'); |
| | | this.$store.dispatch('settings/changeSetting', { key: 'lang', value: lang }); |
| | | }, |
| | | onSubmit() { |
| | | if (!this.register && process.env.NODE_ENV != "dev") { |
| | | this.$layer.msg(this.$t('notReg')); |
| | |
| | | }); |
| | | console.log(error); |
| | | }); |
| | | }else { |
| | | } else { |
| | | this.isAutoLogin = false; |
| | | } |
| | | // let pattern = /(localhost)|(www\.sw-ht\.com)/; |
| | |
| | | */ |
| | | setQRCode() { |
| | | let token = sessionStorage.getItem("qrToken"); |
| | | if(!token) { |
| | | qrCode.login().then(res=>{ |
| | | if (!token) { |
| | | qrCode.login().then(res => { |
| | | let rs = res.data; |
| | | if(rs.code == 200) { |
| | | if (rs.code == 200) { |
| | | sessionStorage.setItem("qrToken", rs.token); |
| | | }else { |
| | | } else { |
| | | sessionStorage.setItem("qrToken", ""); |
| | | } |
| | | }).catch(error=>{ |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }); |
| | | } |
| | |
| | | |
| | | this.$store.dispatch("user/changeAutoLogin", 0); |
| | | |
| | | if(sysConfig.clientName.name == "sxty") { |
| | | if (sysConfig.clientName.name == "sxty") { |
| | | this.setQRCode(); |
| | | } |
| | | this.changeVerifyCode(); |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | /* 登录大盒子背景 */ |
| | | .login_container { |
| | | width: 100%; |
| | |
| | | align-items: center; |
| | | background-color: #e7ebef; |
| | | } |
| | | .wrap-lang { |
| | | position: fixed; |
| | | left: 1.6em; |
| | | bottom: 1.6em; |
| | | } |
| | | </style> |