| | |
| | | export default { |
| | | workstates: ["停止", "暂停放电", "正在放电", "暂停充电", "正在充电", "等待充电", "等待放电"], |
| | | cmd: { |
| | | startDisCharge: 0x25, // 启动放电 |
| | | stopDisCharge: 0x23, // 停止放电 |
| | | workstates: ["stop", "DischargePause", "Discharging", "PauseCharge", "Charging", "Waitforcharging", "Waitfordischarging"], |
| | | cmd: { |
| | | startDisCharge: 0x25, // 启动放电 |
| | | stopDisCharge: 0x23, // 停止放电 |
| | | startCharge: 0xb1, // 启动充电 |
| | | stopCharge: 0xb3, // 停止充电 |
| | | set: 40, // 设置参数 |
| | | get: 41, // 获取参数 |
| | | }, |
| | | disType: [ |
| | | { |
| | | label: '离线放电', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '在线放电', |
| | | value: 1 |
| | | } |
| | | ], |
| | | set: 40, // 设置参数 |
| | | get: 41, // 获取参数 |
| | | }, |
| | | testType: [ |
| | | { |
| | | label: '恒流', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '恒功率', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: '恒阻', |
| | | value: 2 |
| | | } |
| | | ], |
| | | actionType: [ |
| | | { |
| | | label: '停止', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '继续', |
| | | value: 1 |
| | | } |
| | | ], |
| | | // 活化开始 |
| | | cycleStart: [ |
| | | { |
| | | label: '放电', |
| | | label: 'cCurrent', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '充电', |
| | | label: 'cPower', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: 'cResistance', |
| | | value: 2 |
| | | } |
| | | ], |
| | | actionType: [ |
| | | { |
| | | label: 'stop', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: 'continue', |
| | | value: 1 |
| | | } |
| | | ], |
| | | // 活化开始 |
| | | cycleStart: [ |
| | | { |
| | | label: 'discharge', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: 'charge', |
| | | value: 1 |
| | | } |
| | | ], |
| | | hourRate: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], |
| | | rules: { |
| | | disPower: { // 预放功率 |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 999.9, |
| | | msg: '取值范围0~999.9(保留1位小数)' |
| | | }, |
| | | rules: { |
| | | disPower: { // 预放功率 |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 999.9, |
| | | msg: '取值范围0~999.9(保留1位小数)' |
| | | }, |
| | | disCurr: { // 放电电流2-999.9 |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 2, |
| | | max: 999.9, |
| | | msg: '取值范围2~999.9(保留1位小数)' |
| | | }, |
| | | disTime: { // 核容时长 |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 6000, |
| | | msg: '取值范围1~6000(整数)' |
| | | }, |
| | | disCap: { // 核容容量 |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 9999, |
| | | msg: '取值范围1~9999(整数)' |
| | | }, |
| | | groupVol_Low: { // 组端电压下限 |
| | | pattern: /^[0-9]{2}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 40, |
| | | max: 58, |
| | | msg: '取值范围40~58(保留1位小数)' |
| | | }, |
| | | monomerVol_Low: { // 单体电压下限 |
| | | pattern: /^[0-9]{1,2}(\.[0-9]{0,2})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 17, |
| | | msg: '取值范围0~17(保留2位小数)' |
| | | }, |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 2, |
| | | max: 999.9, |
| | | msg: '取值范围2~999.9(保留1位小数)' |
| | | }, |
| | | disTime: { // 核容时长 |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 6000, |
| | | msg: '取值范围1~6000(整数)' |
| | | }, |
| | | disCap: { // 核容容量 |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 9999, |
| | | msg: '取值范围1~9999(整数)' |
| | | }, |
| | | groupVol_Low: { // 组端电压下限 |
| | | pattern: /^[0-9]{2}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 40, |
| | | max: 58, |
| | | msg: '取值范围40~58(保留1位小数)' |
| | | }, |
| | | monomerVol_Low: { // 单体电压下限 |
| | | pattern: /^[0-9]{1,2}(\.[0-9]{0,2})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 17, |
| | | msg: '取值范围0~17(保留2位小数)' |
| | | }, |
| | | monVolHightLimit: { // 单体电压上限 |
| | | pattern: /^[0-9]{1,2}(\.[0-9]{0,2})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 17, |
| | | msg: '取值范围0~17(保留2位小数)' |
| | | }, |
| | | pattern: /^[0-9]{1,2}(\.[0-9]{0,2})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 17, |
| | | msg: '取值范围0~17(保留2位小数)' |
| | | }, |
| | | monomertmpHigh: { // 单体温度上限 |
| | | pattern: /^[0-9]{1,2}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 60, |
| | | msg: '取值范围1~60(保留1位小数)' |
| | | }, |
| | | pattern: /^[0-9]{1,2}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 60, |
| | | msg: '取值范围1~60(保留1位小数)' |
| | | }, |
| | | onlinevolLow: { // 在线阈值 |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 999.9, |
| | | msg: '取值范围0~999.9(保留1位小数)' |
| | | }, |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 999.9, |
| | | msg: '取值范围0~999.9(保留1位小数)' |
| | | }, |
| | | cellDiffVolHigh: { // 压差上限 |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 1000, |
| | | msg: '取值范围1~1000' |
| | | }, |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 1000, |
| | | msg: '取值范围1~1000' |
| | | }, |
| | | monomerLowCount: { // 单体下限个数 |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 1000, |
| | | msg: '取值范围1~1000' |
| | | }, |
| | | SOCLow: { // SOC下限 |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 100, |
| | | msg: '取值范围0~100(保留1位小数)' |
| | | }, |
| | | pattern: /^[0-9]{1,4}$/, |
| | | regVal: true, |
| | | min: 1, |
| | | max: 1000, |
| | | msg: '取值范围1~1000' |
| | | }, |
| | | SOCLow: { // SOC下限 |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 100, |
| | | msg: '取值范围0~100(保留1位小数)' |
| | | }, |
| | | SOCHigh: { // SOC上限 |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 100, |
| | | msg: '取值范围0~100(保留1位小数)' |
| | | } |
| | | }, |
| | | stateList: [ |
| | | { |
| | | id: 1, |
| | | name: "workState", |
| | | type: "", |
| | | icon: "", |
| | | text: "设备工作状态:", |
| | | value: "在线浮充", |
| | | show: false |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: "connect", |
| | | type: "", |
| | | icon: "el-icon-tongxun", |
| | | text: "汇集器通讯:", |
| | | value: "正常", |
| | | show: false |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: "devTemp", |
| | | type: "", |
| | | icon: "el-icon-wendu", |
| | | text: "设备温度:", |
| | | value: "正常", |
| | | show: false |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: "contact", |
| | | type: "", |
| | | icon: "el-icon-fenxiang", |
| | | text: "干接点:", |
| | | value: "正常", |
| | | show: false |
| | | }, |
| | | { |
| | | id: 7, |
| | | name: "resDay", |
| | | type: "", |
| | | icon: "", |
| | | text: "剩余天数:", |
| | | value: "0", |
| | | notShow: true, |
| | | show: false |
| | | }, |
| | | { |
| | | id: 8, |
| | | name: "workMode", |
| | | type: "", |
| | | icon: "", |
| | | text: "工作模式:", |
| | | value: "停止", |
| | | notShow: true, |
| | | show: false |
| | | }, |
| | | { |
| | | id: 9, |
| | | name: "groupVol", |
| | | type: "", |
| | | icon: "", |
| | | text: "组端电压:", |
| | | value: "0", |
| | | unit: "V", |
| | | notShow: true, |
| | | show: false |
| | | }, |
| | | { |
| | | id: 10, |
| | | name: "peakVol", |
| | | type: "", |
| | | icon: "", |
| | | text: "峰值电压:", |
| | | value: "0", |
| | | unit: "V", |
| | | notShow: true, |
| | | show: false |
| | | }, |
| | | // { |
| | | // id: 110, |
| | | // name: "xuHang", |
| | | // type: "", |
| | | // icon: "", |
| | | // text: "预估续航时长:", |
| | | // value: "???", |
| | | // show: true |
| | | // }, |
| | | ], |
| | | historyStateList: [ |
| | | // { |
| | | // id: 5, |
| | | // name: "stopReason", |
| | | // type: "", |
| | | // icon: "", |
| | | // text: "核容终止原因:", |
| | | // value: "未知", |
| | | // show: false |
| | | // }, |
| | | { |
| | | id: 6, |
| | | name: "failReason", |
| | | type: "", |
| | | icon: "", |
| | | text: "操作失败原因:", |
| | | value: "未知", |
| | | show: false |
| | | } |
| | | ], |
| | | lastCapacityTest: [ |
| | | { |
| | | id: 11, |
| | | name: 'test_starttime', |
| | | type: '', |
| | | icon: '', |
| | | text: '开始时间:', |
| | | value: '未知', |
| | | show: true |
| | | }, |
| | | { |
| | | id: 12, |
| | | name: 'test_cap', |
| | | type: '', |
| | | icon: '', |
| | | text: '测试容量:', |
| | | value: '未知', |
| | | show: true |
| | | }, |
| | | { |
| | | id: 13, |
| | | name: 'test_timelong', |
| | | type: '', |
| | | icon: '', |
| | | text: '测试时长:', |
| | | value: '未知', |
| | | show: true |
| | | }, |
| | | { |
| | | id: 14, |
| | | name: 're_cap', |
| | | type: '', |
| | | icon: '', |
| | | text: '剩余容量:', |
| | | value: '未知', |
| | | show: true |
| | | }, |
| | | { |
| | | id: 15, |
| | | name: 'endurance_time', |
| | | type: '', |
| | | icon: '', |
| | | text: '续航时长:', |
| | | value: '未知', |
| | | show: true |
| | | }, |
| | | { |
| | | id: 16, |
| | | name: "stopReason", |
| | | type: "", |
| | | icon: "", |
| | | text: "终止原因:", |
| | | value: "未知", |
| | | show: true |
| | | pattern: /^[0-9]{1,3}(\.[0-9]{0,1})?$/, |
| | | regVal: true, |
| | | min: 0, |
| | | max: 100, |
| | | msg: '取值范围0~100(保留1位小数)' |
| | | } |
| | | ], |
| | | getItemByName(name, list) { |
| | | let result = false; |
| | | for(let i=0; i<list.length; i++) { |
| | | let item = list[i]; |
| | | if(item.name == name) { |
| | | result = item; |
| | | break; |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | }, |
| | | getItemByName(name, list) { |
| | | let result = false; |
| | | for (let i = 0; i < list.length; i++) { |
| | | let item = list[i]; |
| | | if (item.name == name) { |
| | | result = item; |
| | | break; |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | }; |
New file |
| | |
| | | export default { |
| | | CN: { |
| | | markLine: { |
| | | low: '低告警', |
| | | high: '高告警', |
| | | }, |
| | | form: { |
| | | validateMsg: '存在校验未通过的数据', |
| | | } |
| | | }, |
| | | US: { |
| | | markLine: { |
| | | low: 'Low Alarm', |
| | | high: 'High Alarm', |
| | | }, |
| | | form: { |
| | | validateMsg: 'Verify failed data existed', |
| | | } |
| | | } |
| | | } |
| | |
| | | import Vue from 'vue' |
| | | import VueI18n from 'vue-i18n' |
| | | import store from '@/store'; |
| | | |
| | | import elementEnLocale from 'element-ui/lib/locale/lang/en' |
| | | import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN' |
| | | |
| | | import Base from '@/assets/js/i18n/base'; |
| | | |
| | | const messages = { |
| | | US: { |
| | | ...elementEnLocale, |
| | | ...Base.US, |
| | | }, |
| | | CN: { |
| | | ...elementZhLocale, |
| | | ...Base.CN, |
| | | } |
| | | }; |
| | | const LANGS = ['US', 'CN']; |
| | | // const LANGS = ['US', 'CN']; |
| | | |
| | | /** |
| | | * 创建 i18n 配置 |
| | |
| | | return new VueI18n(i18nOptions) |
| | | } |
| | | |
| | | function createI18nOption(msgObj) { |
| | | /** |
| | | * |
| | | * @param {*} msgObj 主要的语言包 |
| | | * @param {*} msgOtherList [[msgObj, nameSpace]]其他语言包数组 |
| | | * @returns |
| | | */ |
| | | function createI18nOption(msgObj, msgOtherList) { |
| | | let msg = JSON.parse(JSON.stringify(messages)); |
| | | if (msgOtherList && Object.prototype.toString.call(msgOtherList) === '[object Array]') { |
| | | msgOtherList.forEach((v) => { |
| | | let {CN, US} = v[0].messages; |
| | | let nameSpace = v[1]; |
| | | msg.US[nameSpace] = US; |
| | | msg.CN[nameSpace] = CN; |
| | | }); |
| | | } |
| | | return { |
| | | i18n: { |
| | | messages: msgObj.messages, |
| | | sharedMessages: messages, |
| | | sharedMessages: msg, |
| | | }, |
| | | watch: { |
| | | "$store.state.settings.lang": { |
| | | handler(v) { |
| | | this.$i18n.locale = v; |
| | | this.$root.$i18n.locale = v; |
| | | // console.log('mixin===', msgObj) |
| | | }, |
| | | immediate: true |
| | | }, |
| | |
| | | } |
| | | } |
| | | |
| | | const translate = (localeKey) => { |
| | | const locale = store.state.settings.lang; |
| | | const i18n = Vue.prototype.$$i18n; |
| | | const hasKey = i18n.te(localeKey, locale); |
| | | const translatedStr = i18n.t(localeKey); |
| | | if (hasKey) { |
| | | return translatedStr; |
| | | } |
| | | return localeKey; |
| | | } |
| | | |
| | | export { |
| | | initI18n, |
| | | messages, |
| | | createI18nOption, |
| | | translate, |
| | | } |
| | |
| | | function getMarkLineData() { |
| | | let arr = [ |
| | | { |
| | | name1: 'low', |
| | | name: '低告警', |
| | | yAxis: 0, |
| | | lineStyle: { |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name1: 'high', |
| | | name: '高告警', |
| | | yAxis: 0, |
| | | lineStyle: { |
| | |
| | | props: { |
| | | text: { |
| | | type: String, |
| | | default: '未知文本' |
| | | default: '' |
| | | }, |
| | | value: { |
| | | type: Number, |
| | |
| | | </progress-state> |
| | | <progress-state icon="el-icon-dianchi" :state="processInfo.behind" |
| | | :content="processBehindMsg"></progress-state> |
| | | <progress-state icon="el-icon-gaojing" @click.native="alarmAlert()" :state="processInfo.alarm" |
| | | :content="processAlarmMsg"></progress-state> |
| | | <!-- <progress-state icon="el-icon-gaojing" @click.native="alarmAlert()" :state="processInfo.alarm" |
| | | :content="processAlarmMsg"></progress-state> --> |
| | | <progress-state icon="el-icon-jihua" :state="processInfo.displan" |
| | | :content="processDisplanMsg"></progress-state> |
| | | <progress-state icon="el-icon-tingdian" :state="processInfo.power" |
| | |
| | | :content="processControlMsg"></progress-state> |
| | | <progress-state icon="el-icon-pifu" :state="1" :content="themeInfo" |
| | | @handleClick="handleClick"></progress-state> |
| | | <progress-state icon="el-icon-dapingzhanshi_active" :state="1" content="大屏展示" |
| | | @handleClick="showBigScreen"></progress-state> |
| | | <!-- <progress-state icon="el-icon-dapingzhanshi_active" :state="1" content="大屏展示" |
| | | @handleClick="showBigScreen"></progress-state> --> |
| | | </div> |
| | | <!-- <weather-component--> |
| | | <!-- v-if="weatherState"--> |
| | | <!-- ></weather-component>--> |
| | | </div> |
| | | <div class="data-totals"> |
| | | <hdw-badge-btn v-if="inUseMenu.monitorWarn" :text="$t('powerWarn')" :value="numbers.powerWarn" |
| | | <!-- <hdw-badge-btn v-if="inUseMenu.monitorWarn" :text="$t('powerWarn')" :value="numbers.powerWarn" |
| | | @click="goPages('powerWarn')"> |
| | | </hdw-badge-btn> |
| | | </hdw-badge-btn> --> |
| | | <hdw-badge-btn v-if="false" :text="$t('powerOff')" :value="numbers.powerOff" @click="goPages('powerOff')"> |
| | | </hdw-badge-btn> |
| | | <hdw-badge-btn v-if="inUseMenu.eleWarn" :text="$t('battWarn')" :value="numbers.battWarn" |
| | |
| | | <!-- no-value--> |
| | | <!-- ></hdw-badge-btn>--> |
| | | <div class="term-date" v-show="termDateShow"> |
| | | <span>有效期:</span> |
| | | <span>{{ $t('validity') }}</span> |
| | | <span class="term-date-value">{{ termDate }}</span> |
| | | <span>天</span> |
| | | <span>{{ $tc('days', termDate) }}</span> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="system-tools">--> |
| | |
| | | }}<i class="el-icon-arrow-down el-icon--right" v-if="!$store.state.user.autoLogin"></i> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown" v-if="!$store.state.user.autoLogin"> |
| | | <el-dropdown-item command="passwordChange">密码修改</el-dropdown-item> |
| | | <el-dropdown-item command="outSystem">安全退出</el-dropdown-item> |
| | | <el-dropdown-item command="passwordChange">{{ $t('PasswordModify') }}</el-dropdown-item> |
| | | <el-dropdown-item command="outSystem">{{ $t('SafeExit') }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <img v-if="showLogo" src="../../assets/images/fuguang_logo.jpg" class="fuguang-logo" /> |
| | |
| | | </div> |
| | | </flex-layout> |
| | | </div> |
| | | <el-drawer title="我是标题" :visible.sync="pifuDrawer" size="360px" :with-header="false" :modal-append-to-body="false"> |
| | | <el-drawer :visible.sync="pifuDrawer" size="360px" :with-header="false" :modal-append-to-body="false"> |
| | | <pifu-list></pifu-list> |
| | | </el-drawer> |
| | | <el-drawer title="我的常用功能" :visible.sync="usefulToolsDrawer" size="240px" custom-class="useful-tools" |
| | | :with-header="false" :modal-append-to-body="false"> |
| | | <el-drawer :visible.sync="usefulToolsDrawer" size="240px" custom-class="useful-tools" :with-header="false" |
| | | :modal-append-to-body="false"> |
| | | <useful-tools @close="closeUsefulTools"></useful-tools> |
| | | </el-drawer> |
| | | <!-- 密码修改 --> |
| | | <el-dialog title="密码修改" width="400px" :visible.sync="pwd.show" :close-on-click-modal="false" top="0" |
| | | <el-dialog :title="$t('PasswordModify')" width="530px" :visible.sync="pwd.show" :close-on-click-modal="false" top="0" |
| | | class="dialog-center" :modal-append-to-body="false"> |
| | | <pwd-change v-if="pwd.show" :visible.sync="pwd.show"></pwd-change> |
| | | </el-dialog> |
| | | <!-- 短信猫和声光告警的配置 --> |
| | | <el-dialog title="短信猫和声光告警的配置" width="600px" :visible.sync="alarmAlertStatus" :close-on-click-modal="false" top="0" |
| | | <!-- <el-dialog title="短信猫和声光告警的配置" width="600px" :visible.sync="alarmAlertStatus" :close-on-click-modal="false" top="0" |
| | | class="dialog-center" :modal-append-to-body="false"> |
| | | <alarm-alert v-if="alarmAlertStatus" :visible.sync="alarmAlertStatus"></alarm-alert> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | <big-screen-page @close="closeBigScreen" v-if="bigScreenState"></big-screen-page> |
| | | <div class="dragging-box" v-if="!usefulToolsDrawer"> |
| | | <div class="dragging-box" v-if="false"> |
| | | <div class="drag-box-content" @click="usefulToolsDrawer = true"> |
| | | <div>我的</div> |
| | | <div>菜单</div> |
| | |
| | | import BigScreenPage from "@/components/bigScreenPage/big_screen_page.vue"; |
| | | import VueDraggableResizable from 'vue-draggable-resizable'; |
| | | import UsefulTools from "@/layout/components/UsefulTools.vue"; |
| | | import i18n from './i18n'; |
| | | import i18n from './i18n/navbar'; |
| | | import pifuI18n from './i18n/pifuList'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | const i18nMixin = createI18nOption(i18n, [[pifuI18n, 'pifu']]); |
| | | export default { |
| | | bMapTools: new BMapTools(BMap), |
| | | components: { |
| | |
| | | serverInfo: { |
| | | disk: { |
| | | progress: 0, |
| | | message: "服务器数据磁盘总量:未知;剩余:未知" |
| | | // message: "服务器数据磁盘总量:未知;剩余:未知" |
| | | message: this.$t('DiskTotal') + ":" + this.$t('unknown') + ";" + this.$t('remaining') + ":" + this.$t('unknown') |
| | | }, |
| | | cpu: { |
| | | progress: 0, |
| | | message: "TM:未知" |
| | | message: "TM:" + this.$t('unknown') |
| | | }, |
| | | memory: { |
| | | progress: 0, |
| | | message: "FM:未知" |
| | | message: "FM:" + this.$t('unknown') |
| | | }, |
| | | linkNum: { |
| | | progress: 0, |
| | | message: "DBC:未知" |
| | | message: "DBC:" + this.$t('unknown') |
| | | } |
| | | }, |
| | | processInfo: { |
| | |
| | | pwd: { |
| | | show: false |
| | | }, |
| | | platformName: platformName ? platformName : "蓄电池后台监控管理平台", |
| | | platformName: platformName ? platformName : "", |
| | | inUseMenu: { |
| | | monitorWarn: true, // 电源告警数 |
| | | powerDown: true, // 停电告警数 |
| | |
| | | this.passwordChange(); |
| | | break; |
| | | default: |
| | | this.$layer.msg("该功能暂未开放!"); |
| | | this.$layer.msg(this.$t('notopened')); |
| | | break; |
| | | } |
| | | }, |
| | |
| | | }, |
| | | sendMessage() { |
| | | let userId = sessionStorage.getItem("userId"); |
| | | if (!userId || !this.isWSOpen) { |
| | | return false; |
| | | } |
| | | this.SOCKET.send(Number(userId)); |
| | | }, |
| | | onWSMessage(res) { |
| | |
| | | // 设置服务器磁盘信息 |
| | | this.serverInfo.disk.progress = data.diskRate; |
| | | this.serverInfo.disk.message = |
| | | "服务器数据磁盘总量" + |
| | | this.$t('DiskTotal') + |
| | | (data.totalDiscSpace - data.freeDiscSpace) + |
| | | "G/" + |
| | | data.totalDiscSpace + |
| | |
| | | // 设置服务器cpu信息 |
| | | this.serverInfo.cpu.progress = data.serverCpuRate; |
| | | this.serverInfo.cpu.message = |
| | | "CPU使用率:" + data.serverCpuRate + "/100"; |
| | | "CPU" + this.$t('Utilization') + ":" + data.serverCpuRate + "/100"; |
| | | |
| | | // 设置服务器内存的信息 |
| | | this.serverInfo.memory.progress = data.memRate; |
| | | this.serverInfo.memory.message = |
| | | "服务器内存:" + |
| | | this.$t('ServerInternalMemory') + ":" + |
| | | (data.totalMem - data.freeMen).toHold(2) + |
| | | "G/" + |
| | | data.totalMem + |
| | |
| | | case "powerOff": |
| | | message.params = { |
| | | pageInfo: { |
| | | label: "机房状态查询", |
| | | label: this.$t('EquipmentRoomStatusSearch'), |
| | | name: "powercutMager", |
| | | src: "#/dataMager/powercut", |
| | | closable: true |
| | |
| | | this.$router.push("/alarmMager/powerRealtimeInfo"); |
| | | break; |
| | | case "powerBoxAlarm": |
| | | message.params = { |
| | | pageInfo: { |
| | | label: "通讯电源实时告警", |
| | | name: "powerBoxAlarm", |
| | | src: "#/powerBoxAlarm?level=1", |
| | | closable: true |
| | | } |
| | | }; |
| | | // message.params = { |
| | | // pageInfo: { |
| | | // label: "通讯电源实时告警", |
| | | // name: "powerBoxAlarm", |
| | | // src: "#/powerBoxAlarm?level=1", |
| | | // closable: true |
| | | // } |
| | | // }; |
| | | //通讯电源实时告警 |
| | | // this.$router.push('/powerBoxAlarm') |
| | | break; |
| | |
| | | break; |
| | | default: |
| | | message = false; |
| | | this.$layer.msg("该功能暂未开放!"); |
| | | this.$layer.msg(this.$t('notopened')); |
| | | break; |
| | | } |
| | | }, |
| | |
| | | }, |
| | | computed: { |
| | | processAlarmMsg() { |
| | | let result = "未知"; |
| | | let result = this.$t('unknown'); |
| | | switch (this.processInfo.alarm) { |
| | | case 0: |
| | | result = "告警监测线程:异常"; |
| | | result = this.$t('AlarmMonitorThread') + ":" + this.$t('Abnormal'); |
| | | break; |
| | | case 1: |
| | | result = "告警监测线程:正常"; |
| | | result = this.$t('AlarmMonitorThread') + ":" + this.$t('Normal'); |
| | | break; |
| | | case 2: |
| | | result = "告警监测线程:未启用"; |
| | | result = this.$t('AlarmMonitorThread') + ":" + this.$t('NotEnabled'); |
| | | break; |
| | | } |
| | | return result; |
| | | }, |
| | | processBehindMsg() { |
| | | let result = "未知"; |
| | | let result = this.$t('unknown'); |
| | | switch (this.processInfo.behind) { |
| | | case 0: |
| | | result = "落后单体监测线程:异常"; |
| | | result = this.$t('LaggingCellMonitorThread') + ":" + this.$t('Abnormal'); |
| | | break; |
| | | case 1: |
| | | result = "落后单体监测线程:正常"; |
| | | result = this.$t('LaggingCellMonitorThread') + ":" + this.$t('Normal'); |
| | | break; |
| | | case 2: |
| | | result = "落后单体监测线程:未启用"; |
| | | result = this.$t('LaggingCellMonitorThread') + ":" + this.$t('NotEnabled'); |
| | | break; |
| | | } |
| | | return result; |
| | | }, |
| | | processDisplanMsg() { |
| | | let result = "未知"; |
| | | let result = this.$t('unknown'); |
| | | switch (this.processInfo.displan) { |
| | | case 0: |
| | | result = "放电计划监测线程:异常"; |
| | | result = this.$t('dischargePlanMonitorThread') + ":" + this.$t('Abnormal'); |
| | | break; |
| | | case 1: |
| | | result = "放电计划监测线程:正常"; |
| | | result = this.$t('dischargePlanMonitorThread') + ":" + this.$t('Normal'); |
| | | break; |
| | | case 2: |
| | | result = "放电计划监测线程:未启用"; |
| | | result = this.$t('dischargePlanMonitorThread') + ":" + this.$t('NotEnabled'); |
| | | break; |
| | | } |
| | | return result; |
| | | }, |
| | | processPowerMsg() { |
| | | let result = "未知"; |
| | | let result = this.$t('unknown'); |
| | | switch (this.processInfo.power) { |
| | | case 0: |
| | | result = "机房停电监测线程:异常"; |
| | | result = this.$t('powerOutageMonitorThread') + ":" + this.$t('Abnormal'); |
| | | break; |
| | | case 1: |
| | | result = "机房停电监测线程:正常"; |
| | | result = this.$t('powerOutageMonitorThread') + ":" + this.$t('Normal'); |
| | | break; |
| | | case 2: |
| | | result = "机房停电监测线程:未启用"; |
| | | result = this.$t('powerOutageMonitorThread') + ":" + this.$t('NotEnabled'); |
| | | break; |
| | | } |
| | | return result; |
| | | }, |
| | | processControlMsg() { |
| | | let result = "未知"; |
| | | let result = this.$t('unknown'); |
| | | switch (this.processInfo.control) { |
| | | case 0: |
| | | result = "线程监控程序运行:异常"; |
| | | result = this.$t('ThreadMonitorProgramRunning') + ":" + this.$t('Abnormal'); |
| | | break; |
| | | case 1: |
| | | result = "线程监控程序运行:正常"; |
| | | result = this.$t('ThreadMonitorProgramRunning') + ":" + this.$t('Normal'); |
| | | break; |
| | | case 2: |
| | | result = "线程监控程序运行:未启用"; |
| | | result = this.$t('ThreadMonitorProgramRunning') + ":" + this.$t('NotEnabled'); |
| | | break; |
| | | } |
| | | return result; |
| | | }, |
| | | processSqlMsg() { |
| | | let result = "未知"; |
| | | let result = this.$t('unknown'); |
| | | switch (this.processInfo.sql) { |
| | | case 0: |
| | | result = "服务器实时更新数据:异常"; |
| | | result = this.$t('Serverrealtimedataupdates') + ":" + this.$t('Abnormal'); |
| | | break; |
| | | case 1: |
| | | result = "服务器实时更新数据:正常"; |
| | | result = this.$t('Serverrealtimedataupdates') + ":" + this.$t('Normal'); |
| | | break; |
| | | } |
| | | return result; |
| | | }, |
| | | processLinkMsg() { |
| | | let result = "未知"; |
| | | let result = this.$t('unknown'); |
| | | switch (this.processInfo.link) { |
| | | case 0: |
| | | result = "服务器连接:异常"; |
| | | result = this.$t('ServerConnection') + ":" + this.$t('Abnormal'); |
| | | break; |
| | | case 1: |
| | | result = "服务器连接:正常"; |
| | | result = this.$t('ServerConnection') + ":" + this.$t('Normal'); |
| | | break; |
| | | } |
| | | return result; |
| | | }, |
| | | themeInfo() { |
| | | return "当前主题:" + this.$store.state.theme.themeName; |
| | | return this.$t('CurrentTheme') + ":" + this.$t("pifu." + this.$store.state.theme.themeName); |
| | | }, |
| | | logoUrl() { |
| | | let logoConfig = this.logoConfig; |
| | |
| | | this.skinActive = localStorage.getItem("activeSkin"); |
| | | this.showProgress = false; |
| | | this.changeSkin(); |
| | | } |
| | | }, |
| | | "$store.state.settings.lang": { |
| | | handler(v) { |
| | | // this.$i18n.locale = v; |
| | | // this.$root.$i18n.locale = v; |
| | | this.sendMessage(); |
| | | }, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | | console.log(this.$i18n) |
| | | // 启动请求 |
| | | // this.startSearch(); |
| | | |
| | |
| | | .lang { |
| | | width: 4.4em; |
| | | margin-right: 0.4em; |
| | | }</style> |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | </el-image> |
| | | </div> |
| | | <div class="pifu-item-txt">{{ item.name }}</div> |
| | | <div class="pifu-item-txt">{{ $t(item.name) }}</div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import i18n from './i18n/pifuList'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | export default { |
| | | name: "PifuList", |
| | | mixins: [i18nMixin], |
| | | data() { |
| | | return { |
| | | fullScreen: false, |
| | |
| | | skinList: [ |
| | | { |
| | | img: require("@/assets/images/theme/science.png"), |
| | | name: "科技蓝", |
| | | name: 'Blue', |
| | | skin: "science-blue" |
| | | }, |
| | | { |
| | | img: require("@/assets/images/theme/science2.png"), |
| | | name: "荧光绿", |
| | | name: "Green", |
| | | skin: "science-green" |
| | | }, |
| | | { |
| | | img: require("@/assets/images/theme/science3.png"), |
| | | name: "优雅黑", |
| | | name: "Black", |
| | | skin: "science-black" |
| | | }, |
| | | { |
| | | img: require("@/assets/images/theme/science4.png"), |
| | | name: "木槿紫", |
| | | name: "Purple", |
| | | skin: "science-purple" |
| | | }, |
| | | { |
| | | img: require("@/assets/images/theme/science5.png"), |
| | | name: "紫罗兰", |
| | | name: "Violet", |
| | | skin: "science-ziluolan" |
| | | }, |
| | | { |
| | | img: require("@/assets/images/theme/science6.png"), |
| | | name: "靛青色", |
| | | name: "Indigo", |
| | | skin: "science-skyBlue" |
| | | } |
| | | ] |
| | |
| | | }, |
| | | content: { |
| | | type: String, |
| | | default: '未知' |
| | | default: '' |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | <template> |
| | | <div class="params-container"> |
| | | <el-form ref="ruleForm" size="mini" label-position="top" :model="params" :rules="rules" class="params-dialog"> |
| | | <el-form-item label="旧密码" prop="oldPwd"> |
| | | <el-form-item :label="$t('oldPwd')" prop="oldPwd"> |
| | | <el-input type="password" v-model="params.oldPwd"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="新密码" prop="newPwd"> |
| | | <el-form-item :label="$t('newPwd')" prop="newPwd"> |
| | | <el-input type="password" v-model="params.newPwd"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="确认密码" prop="enPwd"> |
| | | <el-form-item :label="$t('confirmPwd')" prop="enPwd"> |
| | | <el-input type="password" v-model="params.enPwd"></el-input> |
| | | </el-form-item> |
| | | <div class="form-footer"> |
| | | <three-btn @click="submitForm">确定</three-btn> |
| | | <three-btn @click="close">取消</three-btn> |
| | | <three-btn @click="submitForm">{{ $t('ok') }}</three-btn> |
| | | <three-btn @click="close">{{ $t('cancel') }}</three-btn> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import { checkUserPwd, updateUserPwd } from "@/views/login/js/api" |
| | | import i18n from './i18n/PwdChange'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | export default { |
| | | name: "PwdChange", |
| | | mixins: [i18nMixin], |
| | | props: { |
| | | visible: { |
| | | type: Boolean, |
| | |
| | | if (pwdRegex.test(value)) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('您的密码复杂度太低(密码中必须包含字母、数字、至少6位)')); |
| | | callback(new Error(this.$t('pwdMsg'))); |
| | | } |
| | | }; |
| | | return { |
| | |
| | | }, |
| | | rules: { |
| | | oldPwd: [ |
| | | { required: true, message: '不能为空', trigger: 'blur' }, |
| | | { required: true, message: this.$t('emptyMsg'), trigger: 'blur' }, |
| | | ], |
| | | newPwd: [ |
| | | { required: true, message: '不能为空', trigger: 'blur' }, |
| | | { required: true, message: this.$t('emptyMsg'), trigger: 'blur' }, |
| | | { validator: validatePass, trigger: 'blur' } |
| | | ], |
| | | enPwd: [ |
| | | { required: true, message: '不能为空', trigger: 'blur' }, |
| | | { required: true, message: this.$t('emptyMsg'), trigger: 'blur' }, |
| | | { validator: validatePass, trigger: 'blur' } |
| | | ], |
| | | }, |
| | |
| | | // 校验旧密码 |
| | | this.checkUserPwd(); |
| | | } else { |
| | | this.$layer.msg('存在校验未通过的数据!'); |
| | | this.$layer.msg(this.$t('form.validateMsg')); |
| | | return false; |
| | | } |
| | | }); |
| | |
| | | <span>{{ menu.label }}</span> |
| | | </template> |
| | | <el-menu-item v-for="child in menu.childrens" :key="child.name" :index="child.name" @click="select(child)"> |
| | | {{ child.label }} |
| | | {{ 'CN' == $store.state.settings.lang ? child.label : child.lableEnUs }} |
| | | </el-menu-item> |
| | | </el-submenu> |
| | | <el-menu-item v-else :index="menu.name" :key="menu.name" @click="select(menu)"> |
| | |
| | | for (let i = 0; i < list.length; i++) { |
| | | if (menu.id == list[i].id) { |
| | | item = list[i]; |
| | | menu.lableEnUs = item.lableEnUs; |
| | | break; |
| | | } |
| | | } |
| | |
| | | for (let i = 0; i < menu.childrens.length; i++) { |
| | | let item2 = menu.childrens[i]; |
| | | if (item2.id == children.id) { |
| | | item2.lableEnUs = children.lableEnUs; |
| | | item2.enableduse = children.enableduse; |
| | | break; |
| | | } |
| | |
| | | computed: { |
| | | permitMenu() { |
| | | let permits = this.$store.state.user.permits; |
| | | let lang = this.$store.state.settings.lang; |
| | | let menus = this.menus.map((item) => { |
| | | let tmp = { |
| | | label: item.label, |
| | | label: 'US' == lang ? item.lableEnUs : item.label, |
| | | name: item.name, |
| | | src: item.src, |
| | | icon: item.icon, |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | oldPwd: '旧密码', |
| | | newPwd: '新密码', |
| | | confirmPwd: '确认密码', |
| | | ok: '确定', |
| | | cancel: '取消', |
| | | emptyMsg: '不能为空', |
| | | pwdMsg: '您的密码复杂度太低(密码中必须包含字母、数字、至少6位)', |
| | | }, |
| | | US: { |
| | | oldPwd: 'Old Password', |
| | | newPwd: 'New Password', |
| | | confirmPwd: 'Confirm Password', |
| | | ok: 'Ok', |
| | | cancel: 'Cancel', |
| | | emptyMsg: 'Cannot be blank', |
| | | pwdMsg: 'Low password complexity! (it must contain letters, numbers, and at least 6 characters)', |
| | | }, |
| | | }, |
| | | } |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | // ...CN, |
| | | powerWarn: '电源告警数', |
| | | powerOff: '机房停电数', |
| | | battWarn: '电池告警数', |
| | | devWarn: '设备告警数', |
| | | CapacityTester: '核容测试设备', |
| | | // bigScreen: '大屏展示', |
| | | validity: '有效期', |
| | | days: '天', |
| | | PasswordModify: '密码修改', |
| | | SafeExit: '安全退出', |
| | | DiskTotal: '服务器数据磁盘总量', |
| | | remaining: '剩余', |
| | | unknown: '未知', |
| | | notopened: '该功能暂未开放', |
| | | ServerInfo: '服务器信息', |
| | | Utilization: '使用率', |
| | | ServerInternalMemory: '服务器内存', |
| | | EquipmentRoomStatusSearch: '机房状态查询', |
| | | AlarmMonitorThread: '告警监测线程', |
| | | Abnormal: '异常', |
| | | Normal: '正常', |
| | | NotEnabled: '未启用', |
| | | LaggingCellMonitorThread: '落后单体监测线程', |
| | | dischargePlanMonitorThread: '放电计划监测线程', |
| | | powerOutageMonitorThread: '机房停电监测线程', |
| | | ThreadMonitorProgramRunning: '线程监控程序运行', |
| | | Serverrealtimedataupdates: '服务器实时更新数据', |
| | | ServerConnection: '服务器连接', |
| | | CurrentTheme: '当前主题', |
| | | }, |
| | | US: { |
| | | // ...US, |
| | | powerWarn: 'Power Alarm', |
| | | powerOff: 'Room Outage', |
| | | battWarn: 'Battery Alarm', |
| | | devWarn: 'Device Alarm', |
| | | CapacityTester: 'Capacity Tester', |
| | | // bigScreen: '大屏展示', |
| | | validity: 'Validity Period', |
| | | days: 'day | day | days', |
| | | PasswordModify: 'Password Modify', |
| | | SafeExit: 'Safe Exit', |
| | | DiskTotal: 'Server Data Disk Total Memory', |
| | | remaining: 'Remaining', |
| | | unknown: 'Unknown', |
| | | notopened: 'The function is not opened', |
| | | ServerInfo: 'Server Info', |
| | | Utilization: 'Utilization', |
| | | ServerInternalMemory: 'Server Internal Memory', |
| | | EquipmentRoomStatusSearch: 'Equipment Room Status Search', |
| | | AlarmMonitorThread: 'Alarm Monitor Thread', |
| | | Abnormal: 'Abnormal', |
| | | Normal: 'Normal', |
| | | NotEnabled: 'Not Enabled', |
| | | LaggingCellMonitorThread: 'Lagging Cell Monitor Thread', |
| | | dischargePlanMonitorThread: 'Discharge Plan Monitor Thread', |
| | | powerOutageMonitorThread: 'Power Outage Monitor Thread', |
| | | ThreadMonitorProgramRunning: 'Thread Monitor Program Running', |
| | | Serverrealtimedataupdates: 'Server real-time data updates', |
| | | ServerConnection: 'Server Connection', |
| | | CurrentTheme: 'Current Theme', |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | ThemeSetting: '主题设置', |
| | | Blue: '科技蓝', |
| | | Green: '荧光绿', |
| | | Black: '优雅黑', |
| | | Purple: '木槿紫', |
| | | Violet: '紫罗兰', |
| | | Indigo: '靛青色', |
| | | }, |
| | | US: { |
| | | ThemeSetting: 'Theme Setting', |
| | | Blue: 'Blue', |
| | | Green: 'Green', |
| | | Black: 'Black', |
| | | Purple: 'Purple', |
| | | Violet: 'Violet', |
| | | Indigo: 'Indigo', |
| | | }, |
| | | }, |
| | | } |
| | |
| | | import { initI18n } from './assets/js/tools/i18n' |
| | | const i18n = initI18n(store.state.settings.lang, 'US') |
| | | |
| | | Vue.prototype.$$i18n = i18n; |
| | | |
| | | Vue.use(ElementUI, { |
| | | zIndex: 99, |
| | | i18n: (key, value) => i18n.t(key, value) |
| | |
| | | <div class="dev-state-list"> |
| | | <dev-type-item |
| | | :state="dischargeState" |
| | | text="放电:" |
| | | :text="$t('discharge') + ':'" |
| | | :on="dischargeOn" |
| | | :off="dischargeOff" |
| | | ></dev-type-item> |
| | | <dev-type-item |
| | | :state="chargeState" |
| | | text="充电:" |
| | | :text="$t('charge') + ':'" |
| | | :on="chargeOn" |
| | | :off="chargeOff" |
| | | ></dev-type-item> |
| | |
| | | import dischargeOn from "./images/dischargeOn.png"; |
| | | import dischargeOff from "./images/dischargeOff.png"; |
| | | import DevTypeItem from "./DevTypeItem"; |
| | | import i18n from './i18n'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | export default { |
| | | name: "DevStateList", |
| | | mixins: [i18nMixin], |
| | | components: { DevTypeItem }, |
| | | props: { |
| | | state: { |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | discharge: '放电', |
| | | charge: '充电', |
| | | }, |
| | | US: { |
| | | discharge: 'Discharge', |
| | | charge: 'Charge', |
| | | } |
| | | } |
| | | } |
| | |
| | | import circuitDiagram from "./js/circuitDiagram"; |
| | | import diagramStates from "./js/diagramStates"; |
| | | import DevStateList from "@/views/dataTest/components/DevStateList/devStateFbo4831"; |
| | | import {regEquipType} from "@/assets/js/tools"; |
| | | import i18n from './js/i18n'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | let diagram; |
| | | export default { |
| | | mixins: [i18nMixin], |
| | | components: { |
| | | DevStateList, |
| | | insideParams, |
| | |
| | | diagram.stop(); |
| | | } |
| | | }, |
| | | "$store.state.settings.lang": { |
| | | handler(v) { |
| | | // this.$i18n.locale = v; |
| | | // this.$root.$i18n.locale = v; |
| | | // console.log('watch===???') |
| | | // debugger; |
| | | this.$nextTick(() => { |
| | | diagram.setOption( |
| | | "battGroupTxt", |
| | | "text", |
| | | this.batt.cellShowType == 1 ? this.$t('battLi') : this.$t('batt') |
| | | ); |
| | | diagram.setOption( |
| | | "fboName", |
| | | "text", |
| | | this.$t('fboName') |
| | | ); |
| | | diagram.setOption( |
| | | "powerName", |
| | | "text", |
| | | this.$t('powerName') |
| | | ); |
| | | diagram.setOption( |
| | | "loaderName", |
| | | "text", |
| | | this.$t('loaderName') |
| | | ); |
| | | }); |
| | | }, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | methods: { |
| | | init() { |
| | |
| | | diagram.setOption("groupCurr", "text", this.battCurr + "A"); |
| | | // diagram.setOption("devTemp", "text", "设备温度:" + this.devTemp + "℃"); |
| | | |
| | | diagram.setOption( |
| | | "battGroupTxt", |
| | | "text", |
| | | this.batt.cellShowType == 1 ? "锂电池组" : "铅酸蓄电池组" |
| | | ); |
| | | // diagram.setOption( |
| | | // "battGroupTxt", |
| | | // "text", |
| | | // this.batt.cellShowType == 1 ? "锂电池组" : "铅酸蓄电池组" |
| | | // ); |
| | | |
| | | // 设置更新状态 |
| | | if (!this.update) { |
| | |
| | | ] |
| | | }); |
| | | |
| | | // 线条1 |
| | | // let line1 = diagram.line({ |
| | | // id: 'line1', |
| | | // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // batteryImage.right, |
| | | // [batteryImage.right[0] + splitWidth, batteryImage.right[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // 监控主机 |
| | | // let doubleDcdcImage = diagram.drawImage({ |
| | | // id: 'doubleDcdcImage', |
| | | // flush: false, |
| | | // url: doubleDcdc, |
| | | // point: [line1[1][0], line1[1][1] - 898 / 4], |
| | | // width: 640/2, |
| | | // height: 898/2, |
| | | // }); |
| | | |
| | | // 线条2 |
| | | // let line2 = diagram.line({ |
| | | // id: 'line2', |
| | | // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // doubleDcdcImage.right, |
| | | // [doubleDcdcImage.right[0] + splitWidth * 3 / 4, doubleDcdcImage.right[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // 绘制整流电源 |
| | | // let powerImage = diagram.drawImage({ |
| | | // id: 'powerImage', |
| | | // flush: false, |
| | | // url: power, |
| | | // point: [doubleDcdcImage.right[0] + splitWidth * 1.2, doubleDcdcImage.right[1] - imageHt / 2], |
| | | // width: 970 * imageHt / 598, |
| | | // height: imageHt, |
| | | // }); |
| | | |
| | | // // 线条3 |
| | | // let line3 = diagram.line({ |
| | | // id: 'line3', |
| | | // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line2[1], |
| | | // [line2[1][0], line2[1][1] - splitWidth * 2] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条4 |
| | | // let powerImageOffset = 60; |
| | | // let line4Start = [powerImage.top[0] - powerImageOffset, powerImage.top[1]]; |
| | | // let line4 = diagram.line({ |
| | | // id: 'line4', |
| | | // // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line4Start, |
| | | // [line4Start[0], line3[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条5 |
| | | // let line5 = diagram.line({ |
| | | // id: 'line5', |
| | | // // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line3[1], |
| | | // line4[1] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 用电负载 |
| | | // let loaderImageHt = imageHt * 5 / 3; |
| | | // let loaderImageWidth = 439 * loaderImageHt / 709; |
| | | // let loaderImage = diagram.drawImage({ |
| | | // id: 'loaderImage', |
| | | // flush: false, |
| | | // url: loader, |
| | | // point: [1500 - end - loaderImageWidth, doubleDcdcImage.top[1] - loaderImageHt + imageHt * 3], |
| | | // width: loaderImageWidth, |
| | | // height: loaderImageHt, |
| | | // }); |
| | | |
| | | // // 线条6 |
| | | // let line6 = diagram.line({ |
| | | // id: 'line6', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // loaderImage.top, |
| | | // [loaderImage.top[0], line5[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条7 |
| | | // let line7 = diagram.line({ |
| | | // id: 'line7', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line5[1], |
| | | // line6[1] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条8 |
| | | // let line8 = diagram.line({ |
| | | // id: 'line8', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // loaderImage.bottom, |
| | | // [loaderImage.bottom[0], loaderImage.bottom[1] + splitWidth] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条9 |
| | | // let line9Start = [powerImage.bottom[0] + powerImageOffset, powerImage.bottom[1]]; |
| | | // let line9 = diagram.line({ |
| | | // id: 'line9', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line9Start, |
| | | // [line9Start[0], line8[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条10 |
| | | // let line10 = diagram.line({ |
| | | // id: 'line10', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line8[1], |
| | | // line9[1] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条11 |
| | | // let doubleDcdcOffset = 80; |
| | | // let line11 = diagram.line({ |
| | | // id: 'line11', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line10[1], |
| | | // [doubleDcdcImage.bottom[0] + doubleDcdcOffset, line10[1][1]] |
| | | |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条12 |
| | | // let line12 = diagram.line({ |
| | | // id: 'line12', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line11[1], |
| | | // [line11[1][0], doubleDcdcImage.bottom[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // dcdc下的圆圈 |
| | | // let arc1 = diagram.arc({ |
| | | // point: [line12[1][0], line12[1][1] + lineWidth], |
| | | // flush: false, |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: '#50cef5', |
| | | // radius: lineWidth * 2, |
| | | // type: 'fill' |
| | | // }); |
| | | |
| | | // // 线条13 |
| | | // let line13 = diagram.line({ |
| | | // id: 'line13', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // [doubleDcdcImage.bottom[0] - doubleDcdcOffset, doubleDcdcImage.bottom[1]], |
| | | // [doubleDcdcImage.bottom[0] - doubleDcdcOffset, line11[1][1]], |
| | | // ] |
| | | // }); |
| | | |
| | | // let arc2 = diagram.arc({ |
| | | // point: [line13[0][0], line13[0][1] + lineWidth], |
| | | // flush: false, |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: '#50cef5', |
| | | // radius: lineWidth * 2, |
| | | // type: 'fill' |
| | | // }); |
| | | |
| | | // // 线条14 |
| | | // let line14 = diagram.line({ |
| | | // id: 'line14', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line13[1], |
| | | // [batteryImage.bottom[0], line13[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条15 |
| | | // let line15 = diagram.line({ |
| | | // id: 'line15', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line14[1], |
| | | // batteryImage.bottom |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条16 |
| | | // let line16 = diagram.line({ |
| | | // id: 'line16', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // batteryImage.top, |
| | | // [batteryImage.top[0], line5[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条17 |
| | | // let line17 = diagram.line({ |
| | | // id: 'line17', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line16[1], |
| | | // [line13[0][0], line16[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条18 |
| | | // let line18 = diagram.line({ |
| | | // id: 'line18', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line17[1], |
| | | // [line17[1][0], doubleDcdcImage.top[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条19 |
| | | // let line19 = diagram.line({ |
| | | // id: 'line19', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // [line12[0][0], doubleDcdcImage.top[1]], |
| | | // [line12[0][0], line5[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条20 |
| | | // let line20 = diagram.line({ |
| | | // id: 'line20', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line19[1], |
| | | // line5[0] |
| | | // ] |
| | | // }); |
| | | |
| | | // 设置文本 |
| | | setDiagramTexts(diagram); |
| | | |
| | |
| | | id: 'battGroupTxt', |
| | | flush: true, |
| | | baseline: 'bottom', |
| | | align: 'right', |
| | | align: 'left', |
| | | fontSize: textFont, |
| | | point: [groupVolPoint[0] - offsetTop, groupVolPoint[1]], |
| | | text: '锂电池组' |
| | | point: [groupVolPoint[0] + offsetTop, groupVolPoint[1]], |
| | | text: '' |
| | | }); |
| | | diagram.text({ |
| | | id: 'groupVol', |
| | |
| | | baseline: 'bottom', |
| | | align: 'left', |
| | | fontSize: textFont, |
| | | point: [groupVolPoint[0] + offsetTop, groupVolPoint[1]], |
| | | point: [groupVolPoint[0] + offsetTop, groupVolPoint[1]-34], |
| | | text: '0.00V' |
| | | }); |
| | | diagram.text({ |
| | |
| | | baseline: 'bottom', |
| | | align: 'left', |
| | | fontSize: textFont, |
| | | point: [groupVolPoint[0] + offsetTop, groupVolPoint[1] - 34], |
| | | point: [groupVolPoint[0] + offsetTop, groupVolPoint[1] - 68], |
| | | text: '0.00A' |
| | | }); |
| | | |
| | |
| | | let doubleDcdcImage = diagram.getOption('doubleDcdcImage'); |
| | | let dcdcPoint = [doubleDcdcImage.point[0] + doubleDcdcImage.width / 2, doubleDcdcImage.point[1] - offsetTop]; |
| | | diagram.text({ |
| | | flush: false, |
| | | id: 'fboName', |
| | | flush: true, |
| | | baseline: 'bottom', |
| | | align: 'center', |
| | | fontSize: textFont, |
| | | point: dcdcPoint, |
| | | text: '监控主机' |
| | | text: '' |
| | | }); |
| | | |
| | | // 整流电源 |
| | | let powerImage = diagram.getOption('powerImage'); |
| | | let powerPoint = [powerImage.point[0] + powerImage.width / 2, powerImage.point[1] - offsetTop]; |
| | | // let powerImage = diagram.getOption('powerImage'); |
| | | let line6 = diagram.getOption('line6').points; |
| | | let powerPoint = [line6[1][0] + 10, line6[1][1] - 10]; |
| | | diagram.text({ |
| | | flush: false, |
| | | id: 'powerName', |
| | | flush: true, |
| | | baseline: 'bottom', |
| | | align: 'center', |
| | | align: 'left', |
| | | fontSize: textFont, |
| | | point: powerPoint, |
| | | text: "整流电源" |
| | | text: "" |
| | | }); |
| | | |
| | | // 用电负载 |
| | | let loaderImage = diagram.getOption('loaderImage'); |
| | | let loaderPoint = [loaderImage.point[0] + loaderImage.width / 2 + 8, loaderImage.point[1] - offsetTop]; |
| | | diagram.text({ |
| | | flush: false, |
| | | id: 'loaderName', |
| | | flush: true, |
| | | baseline: 'bottom', |
| | | align: 'left', |
| | | fontSize: textFont, |
| | | point: loaderPoint, |
| | | text: "实际用电负载" |
| | | text: "" |
| | | }); |
| | | |
| | | // 设置电路图类型 |
| | | // diagram.text({ |
| | | // id: 'type', |
| | | // flush: true, |
| | | // fontSize: textFont, |
| | | // align: 'center', |
| | | // point: [diagram.width / 2, 10], |
| | | // text: '设备未连接', |
| | | // }); |
| | | |
| | | // let line17 = diagram.getOption("line17").points; |
| | | // diagram.text({ |
| | | // id: 'devTemp', |
| | | // flush: true, |
| | | // fontSize: textFont, |
| | | // align: 'center', |
| | | // point: [line17[0][0] + (line17[1][0] - line17[0][0]) / 2, line17[0][1] + 16], |
| | | // text: '设备温度:0℃', |
| | | // }); |
| | | |
| | | let line5 = diagram.getOption("line5").points; |
| | | diagram.text({ |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | battLi: '锂电池组', |
| | | batt: '铅酸蓄电池组', |
| | | fboName: '监控主机', |
| | | powerName: '整流电源', |
| | | loaderName: '实际用电负载', |
| | | }, |
| | | US: { |
| | | battLi: 'Lithium Battery Group', |
| | | batt: 'Lead-Acid Battery Group', |
| | | fboName: 'Monitor Main Unit', |
| | | powerName: 'Rectifying Power Supply', |
| | | loaderName: 'Actual Electricity load', |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <el-form ref="ruleForm" size="mini" label-position="top" :model="params" class="params-dialog"> |
| | | <el-form-item label="电池组名称"> |
| | | <el-form-item :label="$t('batteryGroupName')"> |
| | | <el-input v-model="otherParams.groupName" readonly></el-input> |
| | | </el-form-item> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="设备ID"> |
| | | <el-form-item :label="$t('devId')"> |
| | | <el-input v-model="otherParams.fbsdeviceId" readonly></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-form-item label="电池组信息"> |
| | | <el-form-item :label="$t('groupInfo')"> |
| | | <el-input v-model="otherParams.groupInfo" readonly></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | <el-tabs v-model="acTabs" type="border-card" class="flex-layout noborder" @tab-click="tabClick"> |
| | | <el-tab-pane label="放电" name="discharge"> |
| | | <el-tab-pane :label="$t('discharge')" name="discharge"> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="放电模式"> |
| | | <el-select v-model="params.testCmd" :disabled="readOnly || pReadOnly" placeholder="请选择"> |
| | | <el-option v-for="item in testType" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | <el-form-item :label="$t('testType')"> |
| | | <el-select v-model="params.testCmd" :disabled="readOnly || pReadOnly" :placeholder="$t('selectMsg')"> |
| | | <el-option v-for="item in testType" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="小时率"> |
| | | <el-select v-model="params.hourRate" :disabled="readOnly || pReadOnly" placeholder="请选择"> |
| | | <el-form-item :label="$t('hourRate')"> |
| | | <el-select v-model="params.hourRate" :disabled="readOnly || pReadOnly" :placeholder="$t('selectMsg')"> |
| | | <el-option v-for="item in hourRate" :key="'rate_' + item" :label="item" :value="item"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="预放功率(KW)" prop="disPower"> |
| | | <el-form-item :label="$t('disPower') + '(KW)'" prop="disPower"> |
| | | <el-input v-model="params.disPower" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="预放电流(A)" prop="disCurr"> |
| | | <el-form-item :label="$t('disCurr') + '(A)'" prop="disCurr"> |
| | | <el-input v-model="params.disCurr" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="放电容量(AH)" prop="disCap"> |
| | | <el-form-item :label="$t('disCap') + '(AH)'" prop="disCap"> |
| | | <el-input v-model="params.disCap" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="预放阻值(Ω)" prop="disPreRes"> |
| | | <el-form-item :label="$t('disPreRes') + '(Ω)'" prop="disPreRes"> |
| | | <el-input v-model="params.disPreRes" :disabled="params.onlineVolLowAction != 2" |
| | | :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="单体温度上限(℃)" prop="monomertmpHigh"> |
| | | <el-input v-model="params.monomertmpHigh" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | <el-col :span="8"> |
| | | <el-form-item label="放电时长(min)" prop="disTime"> |
| | | <el-form-item :label="$t('disTime') + '(min)'" prop="disTime"> |
| | | <el-input v-model="params.disTime" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="单体下限个数" prop="monomerLowCount"> |
| | | <el-form-item :label="$t('monomerLowCount')" prop="monomerLowCount"> |
| | | <el-input v-model="params.monomerLowCount" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="充电" name="charge"> |
| | | <el-tab-pane :label="$t('charge')" name="charge"> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="预充容量(AH)" prop="charCap"> |
| | | <el-form-item :label="$t('charCap') + '(AH)'" prop="charCap"> |
| | | <el-input v-model="params.charCap" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="预充时间(分钟)" prop="charTimeLong"> |
| | | <el-form-item :label="$t('charTimeLong') + '(min)'" prop="charTimeLong"> |
| | | <el-input v-model="params.charTimeLong" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="截止电流(A)" prop="charSotpCurr"> |
| | | <el-form-item :label="$t('charSotpCurr') + '(A)'" prop="charSotpCurr"> |
| | | <el-input v-model="params.charSotpCurr" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="活化" name="activate"> |
| | | <el-tab-pane :label="$t('activation')" name="activate"> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="活化开始"> |
| | | <el-form-item :label="$t('offLineYHOnceCycle')"> |
| | | <!-- 放电 充电 --> |
| | | <el-select v-model="params.offLineYHOnceCycle" :disabled="readOnly || pReadOnly" placeholder="请选择"> |
| | | <el-select v-model="params.offLineYHOnceCycle" :disabled="readOnly || pReadOnly" |
| | | :placeholder="$t('selectMsg')"> |
| | | <el-option v-for="item in cycleStart" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="循环次数(次)" prop="offLineYHTimes"> |
| | | <el-form-item :label="$t('offLineYHTimes') + '(' + $t('times') + ')'" prop="offLineYHTimes"> |
| | | <el-input v-model="params.offLineYHTimes" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="充完静置(分钟)" prop="disWaitTime"> |
| | | <el-form-item :label="$t('disWaitTime') + '(min)'" prop="disWaitTime"> |
| | | <el-input v-model="params.disWaitTime" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="放完静置(分钟)" prop="charWaitTime"> |
| | | <el-form-item :label="$t('charWaitTime') + '(min)'" prop="charWaitTime"> |
| | | <el-input v-model="params.charWaitTime" :readonly="readOnly || pReadOnly"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-tabs> |
| | | <div class="form-footer"> |
| | | <template v-if="!pReadOnly"> |
| | | <three-btn @click="getParams(true)">读取</three-btn> |
| | | <three-btn @click="getParams(true)">{{ $t('read') }}</three-btn> |
| | | </template> |
| | | <three-btn @click="$emit('close')">关闭</three-btn> |
| | | <three-btn @click="$emit('close')">{{ $t('close') }}</three-btn> |
| | | </div> |
| | | </el-form> |
| | | </template> |
| | |
| | | import { testVal } from "@/assets/js/tools"; |
| | | import CheckFace from "@/components/checkFace"; |
| | | |
| | | import config from "@/assets/js/config"; |
| | | import { |
| | | getFBO4831Param as getParams, |
| | | } from "../js/realTime"; |
| | | import { checkUserPwd } from "@/views/login/js/api"; |
| | | |
| | | import i18n from './i18n/fbo4831DischargeParams'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | export default { |
| | | components: { CheckFace }, |
| | | mixins: [i18nMixin], |
| | | props: { |
| | | batt: { |
| | | type: Object, |
| | |
| | | } |
| | | }, |
| | | data() { |
| | | let { cmd, testType, disType, actionType, hourRate, rules, cycleStart } = const_fbo4831; |
| | | let { cmd, testType, hourRate, rules, cycleStart } = const_fbo4831; |
| | | |
| | | // let batt = this.batt; |
| | | // 修改单体下限个数的取值范围 |
| | | rules.monomerLowCount.max = this.maxMon; |
| | | rules.monomerLowCount.msg = |
| | | "取值范围" + |
| | | this.$t('range') + |
| | | rules.monomerLowCount.min + |
| | | "~" + |
| | | rules.monomerLowCount.max; |
| | |
| | | startFaceShow: false, |
| | | cmd, |
| | | testType, |
| | | disType, |
| | | actionType, |
| | | hourRate, |
| | | readOnly: true, |
| | | ranges: { |
| | | groupvolLow: { |
| | | name: "组端电压下限", |
| | | name: this.$t('groupvolLow'), |
| | | unit: "V", |
| | | min: rules.groupVol_Low.min, |
| | | max: rules.groupVol_Low.max, |
| | | }, |
| | | monomervolLow: { |
| | | name: "单体电压下限", |
| | | name: this.$t('monomervolLow'), |
| | | unit: "V", |
| | | min: rules.monomerVol_Low.min, |
| | | max: rules.monomerVol_Low.max, |
| | | }, |
| | | monVolHightLimit: { |
| | | name: "单体电压上限", |
| | | name: this.$t('monVolHightLimit'), |
| | | unit: "V", |
| | | min: rules.monVolHightLimit.min, |
| | | max: rules.monVolHightLimit.max, |
| | |
| | | // 设置的命令和devId |
| | | this.params.num = this.cmd.set; |
| | | this.params.devId = this.batt.fbsdeviceId; |
| | | this.$layer.msg("读取成功!"); |
| | | this.$layer.msg(this.$t('readSucc')); |
| | | } else { |
| | | // 初始化参数 |
| | | this.initParams(); |
| | | this.$layer.msg("读取失败!"); |
| | | this.$layer.msg(this.$t('readFail')); |
| | | } |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | |
| | | this.initParams(); |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | | this.$layer.msg("读取失败,读取请求异常!"); |
| | | this.$layer.msg(this.$t('readFail')); |
| | | }); |
| | | }, |
| | | }, |
| | |
| | | otherParams() { |
| | | let batt = this.batt; |
| | | let groupInfo = |
| | | "单体数量:" + |
| | | this.$t('monNum') + ':' + |
| | | this.batt.monCount + |
| | | ";电压(V):" + |
| | | ";" + this.$t('voltage') + "(V):" + |
| | | this.batt.monVolStd + |
| | | ";容量(AH):" + |
| | | ";" + this.$t('cap') + "(AH):" + |
| | | this.batt.monCapStd; |
| | | return { |
| | | groupName: batt.stationName + "-" + batt.battGroupName, |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | batteryGroupName: '电池组名称', |
| | | devId: '设备ID', |
| | | groupInfo: '电池组信息', |
| | | discharge: '放电', |
| | | testType: '放电模式', |
| | | selectMsg: '请选择', |
| | | hourRate: '小时率', |
| | | disPower: '预放功率', |
| | | disCurr: '预放电流', |
| | | disCap: '放电容量', |
| | | disPreRes: '预放阻值', |
| | | disTime: '放电时长', |
| | | monomerLowCount: '单体下限个数', |
| | | charge: '充电', |
| | | charCap: '预充容量', |
| | | charTimeLong: '预充时间', |
| | | charSotpCurr: '截止电流', |
| | | activation: '活化', |
| | | activationStart: '活化开始', |
| | | offLineYHTimes: '循环次数', |
| | | disWaitTime: '充完静置', |
| | | charWaitTime: '放完静置', |
| | | read: '读取', |
| | | close: '关闭', |
| | | range: '取值范围', |
| | | groupvolLow: '组端电压下限', |
| | | monomervolLow: '单体电压下限', |
| | | monVolHightLimit: '单体电压上限', |
| | | readSucc: '读取成功', |
| | | readFail: '读取失败', |
| | | monNum: '单体数量', |
| | | voltage: '电压', |
| | | cap: '容量', |
| | | times: '次数', |
| | | cCurrent: '恒流', |
| | | cPower: '恒功率', |
| | | cResistance: '恒阻', |
| | | stop: '停止', |
| | | continue: '继续', |
| | | }, |
| | | US: { |
| | | batteryGroupName: 'Battery Group Name', |
| | | devId: 'Device ID', |
| | | groupInfo: 'Battery Group Info', |
| | | discharge: 'Discharge', |
| | | testType: 'Discharge Mode', |
| | | selectMsg: 'Please select', |
| | | hourRate: 'Discharge C-rate', |
| | | disPower: 'Discharge Power', |
| | | disCurr: 'Discharge Current', |
| | | disCap: 'Discharge Capacity', |
| | | disPreRes: 'Discharge Resistance', |
| | | disTime: 'Discharge Time', |
| | | monomerLowCount: 'Cell Low Limit', |
| | | charge: 'Charge', |
| | | charCap: 'Charge Capacity', |
| | | charTimeLong: 'Charge Time', |
| | | charSotpCurr: 'End Current', |
| | | activation: 'Activation', |
| | | activationStart: 'Activation Start', |
| | | offLineYHTimes: 'Cycle Times', |
| | | disWaitTime: 'Cooling Time (after charging)', |
| | | charWaitTime: 'Cooling Time (after discharging)', |
| | | read: 'Read', |
| | | close: 'Close', |
| | | range: 'Range', |
| | | groupvolLow: 'String Low Limit', |
| | | monomervolLow: 'Cell Low Limit', |
| | | monVolHightLimit: 'Cell Up Limit', |
| | | readSucc: 'Read Successful', |
| | | readFail: 'Read Failed', |
| | | monNum: 'Cell Qty', |
| | | voltage: 'Voltage', |
| | | cap: 'Capacity', |
| | | times: 'Times', |
| | | cCurrent: 'C-Current', |
| | | cPower: 'C-Power', |
| | | cResistance: 'C-Resistance', |
| | | stop: 'Stop', |
| | | continue: 'Continue', |
| | | } |
| | | } |
| | | } |
| | |
| | | clearSuccessfully: '清除设备告警成功!', |
| | | clearFailed: '清除设备告警失败!', |
| | | stop: '停止', |
| | | DischargePause: '暂停放电', |
| | | Discharging: '正在放电', |
| | | PauseCharge: '暂停充电', |
| | | Charging: '正在充电', |
| | | Waitforcharging: '等待充电', |
| | | Waitfordischarging: '等待放电', |
| | | maintenance: '养护', |
| | | desulfation: '除硫', |
| | | cell: '单体', |
| | |
| | | clearSuccessfully: 'Clear device alarm successfully!', |
| | | clearFailed: 'Failed to clear device alarm.', |
| | | stop: 'Stop', |
| | | DischargePause: 'Discharge Pause', |
| | | Discharging: 'Discharging', |
| | | PauseCharge: 'Pause Charge', |
| | | Charging: 'Charging', |
| | | Waitforcharging: 'Wait for charging', |
| | | Waitfordischarging: 'Wait for discharging', |
| | | maintenance: 'Maintenance', |
| | | desulfation: 'Desulfation', |
| | | cell: 'Cell', |
| | |
| | | this.resize(); |
| | | }); |
| | | }, |
| | | "$store.state.settings.lang": { |
| | | handler(v) { |
| | | this.$nextTick(() => { |
| | | this.sendMessage(); |
| | | vol.series[0].markLine.data.map((v) => { |
| | | if('low' == v.name1) { |
| | | v.name = this.$t('markLine.low'); |
| | | } |
| | | if('high' == v.name1) { |
| | | v.name = this.$t('markLine.high'); |
| | | } |
| | | }); |
| | | this.setChart(); |
| | | }); |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | data() { |
| | | let permits = this.$store.state.user.permits; |
| | |
| | | this.devWorkstate = data.devWorkstate; |
| | | // 电路图类型 |
| | | let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知']; |
| | | this.workState = (const_fbo4831.workstates[data.devWorkstate] || this.$t('unknown')) + (data.a059AcvolLowFlag ? '(' + this.$t('emergencyStop') + ')' : ''); |
| | | this.workState = (this.$t(const_fbo4831.workstates[data.devWorkstate]) || this.$t('unknown')) + (data.a059AcvolLowFlag ? '(' + this.$t('emergencyStop') + ')' : ''); |
| | | this.devTesttype = { 0: this.$t('discharge'), 1: this.$t('charge'), 2: this.$t('activation'), 3: this.$t('onlineMonitoring'), 255: this.$t('stoped') }[data.devTesttype] || this.$t('unknown'); |
| | | this.diagram.desc = ""; |
| | | let battstate = this.inputs.battState; |
| | |
| | | this.table.datas, |
| | | batt.stationName + "-" + this.$t('battRTData') + "(" + time + ")" |
| | | ); |
| | | }, |
| | | activate() { |
| | | console.log(1) |
| | | }, |
| | | }, |
| | | computed: { |
| | |
| | | </div> |
| | | <div v-else class="login-wrapper" |
| | | v-loading="loading" |
| | | element-loading-text="页面装载中" |
| | | :element-loading-text="$t('loading')" |
| | | element-loading-spinner="el-icon-loading" |
| | | element-loading-background="rgba(0, 0, 0, 0.2)"> |
| | | <div |
| | |
| | | <img :src="loginImg" class="picImg" /> |
| | | </div> |
| | | <div class="login_box"> |
| | | <div class="title">用户登录</div> |
| | | <div class="title">{{ $t('UserLogin') }}</div> |
| | | <!-- 登录表单区 --> |
| | | <el-form |
| | | label-width="0px" |
| | |
| | | <el-col :span="14"> |
| | | <el-input |
| | | class="input" |
| | | placeholder="验证码" |
| | | :placeholder="$t('VerificationCode')" |
| | | v-model="loginForm.verify" |
| | | @keyup.enter.native.stop="onSubmit" |
| | | ></el-input> |
| | |
| | | type="primary" |
| | | @click="onSubmit" |
| | | class="loginBtn" |
| | | >登录</el-button |
| | | >{{ $t('Login') }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item v-if="!register"> |
| | | <a href="javascript:;" @click="license.show = true" class="regBtn" |
| | | >平台注册</a |
| | | >{{ $t('PlatformRegistero') }}</a |
| | | > |
| | | </el-form-item> |
| | | <el-form-item v-else> |
| | | <a href="javascript:;" class="regBtn">已激活</a> |
| | | <a href="javascript:;" class="regBtn">{{ $t('Activated') }}</a> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- license弹框输入面板 --> |
| | | <el-dialog |
| | | title="平台注册提示" |
| | | :title="$t('PlatformRegistrationPrompt')" |
| | | width="600px" |
| | | :visible.sync="license.show" |
| | | :close-on-click-modal="false" |
| | |
| | | ></add-license> |
| | | </el-dialog> |
| | | <!-- 人脸登陆 --> |
| | | <el-dialog |
| | | <!-- <el-dialog |
| | | title="人脸登陆" |
| | | width="480px" |
| | | :visible.sync="face.show" |
| | |
| | | :visible.sync="face.show" |
| | | @success="checkServeLicense" |
| | | ></face-login> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | <!-- 功能描述 --> |
| | | <el-dialog |
| | | title="配置清单" |
| | | :title="$t('ConfigurationList')" |
| | | width="960px" |
| | | :visible.sync="config.show" |
| | | :close-on-click-modal="false" |
| | |
| | | <config-info></config-info> |
| | | </el-dialog> |
| | | <!-- uKey的验证 --> |
| | | <el-dialog |
| | | <!-- <el-dialog |
| | | title="uKey绑定" |
| | | width="750px" |
| | | :visible.sync="uKey.show" |
| | |
| | | :modal-append-to-body="false" |
| | | > |
| | | <ukey-bind v-if="uKey.show" :visible.sync="uKey.show"></ukey-bind> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | <div class="tools-container"> |
| | | <div |
| | | class="tools-item" |
| | |
| | | import ziluolanBg from "@/assets/images/login-bg-ziluolan.jpg"; |
| | | import ziluolanImg from "@/assets/images/login-img-ziluolan.png"; |
| | | import qrCode from "@/assets/js/outside/qrCode"; |
| | | import i18n from './js/i18n'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | export default { |
| | | mixins: [i18nMixin], |
| | | components: { |
| | | UkeyBind, |
| | | ConfigInfo, |
| | |
| | | methods: { |
| | | onSubmit() { |
| | | if (!this.register && process.env.NODE_ENV != "dev") { |
| | | this.$layer.msg("平台未注册,请先注册平台!"); |
| | | this.$layer.msg(this.$t('notReg')); |
| | | return; |
| | | } |
| | | if (this.loading) { |
| | |
| | | // 关闭等待 |
| | | this.loading = false; |
| | | console.log(error); |
| | | this.$message.error("网络异常"); |
| | | this.$message.error(this.$t('NetworkError')); |
| | | }); |
| | | } else { |
| | | this.$message.error("用户名或密码不能为空"); |
| | | this.$message.error(this.$t('UserName') + ' ' + this.$t('or') + ' ' + this.$t('Password') + ' ' + this.$t('emptyMsg')); |
| | | } |
| | | }, |
| | | changeVerifyCode() { |
New file |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | loading: '页面装载中', |
| | | UserLogin: '用户登录', |
| | | VerificationCode: '验证码', |
| | | Login: '登录', |
| | | PlatformRegister: '平台注册', |
| | | Activated: '已激活', |
| | | PlatformRegistrationPrompt: '平台注册提示', |
| | | FacialLogin: '人脸登陆', |
| | | ConfigurationList: '配置清单', |
| | | Binding: '绑定', |
| | | notReg: '平台未注册,请先注册平台', |
| | | NetworkError: '网络异常', |
| | | // pwdMsg: '用户名或密码不能为空', |
| | | connectErr: '服务器连接异常', |
| | | // signErr: '签名校验失败', |
| | | // pwdMsg: '请先安装uKey客户端服务', |
| | | // pwdMsg: '请先插入uKey', |
| | | pwdMsg: '登录成功', |
| | | pwdMsg: '错误', |
| | | pwdMsg: '输入信息无效,请手动登录', |
| | | pwdMsg: '蓄电池后台监控管理平台', |
| | | UserName: '用户名', |
| | | or: '或', |
| | | Password: '密码', |
| | | emptyMsg: '不能为空', |
| | | }, |
| | | US: { |
| | | loading: 'Page loading…', |
| | | UserLogin: 'User Login', |
| | | VerificationCode: 'Verification Code', |
| | | Logino: 'Login', |
| | | PlatformRegister: 'Platform Register', |
| | | Activated: 'Activated', |
| | | PlatformRegistrationPrompt: 'Platform Registration Prompt', |
| | | FacialLogin: 'Facial Login', |
| | | ConfigurationList: 'Configuration List', |
| | | Binding: 'Binding', |
| | | notReg: '平台未注册,请先注册平台', |
| | | NetworkError: 'Network Error', |
| | | connectErr: '服务器连接异常', |
| | | // signErr: '签名校验失败', |
| | | UserName: 'User Name', |
| | | or: 'or', |
| | | Password: 'Password', |
| | | emptyMsg: 'Cannot be blank', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | ttt: '', |
| | | }, |
| | | }, |
| | | } |