he wei
2023-05-19 6d6374e350f7a770d0e2e8d491ef8e45b7fe5ebb
U 新建机房省市区全部手输
5个文件已修改
524 ■■■■■ 已修改文件
src/App.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/settings.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/components/AddBattGroup.vue 519 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -38,6 +38,7 @@
    },
  },
  mounted() {
    console.log(window.webpackConfig, 'webpackConfig')
    // 启动ukey监控
    this.$store.dispatch("ukey/load", true);
    require("./assets/css/m-elementui.css");
src/layout/components/Navbar.vue
@@ -980,6 +980,7 @@
        // 通知后台 当前语种
        this.sendLang(v);
        this.sendMessage();
        document.title = v == 'US' ? 'Battery Remote O&M Management System' : '蓄电池远程监控管理平台';
      },
      immediate: true
    },
src/settings.js
@@ -3,7 +3,7 @@
const lang = config.lang.value;
module.exports = {
  title: isJstzld9 ? '\u200E' : '蓄电池远程监控管理平台',
  title: lang == 'US' ? 'Battery Remote O&M Management System' : '蓄电池远程监控管理平台',
  /**
   * @type {boolean} true | false
   * @description 是否固定头部菜单栏
src/views/dataMager/components/AddBattGroup.vue
@@ -1,13 +1,29 @@
<template>
  <div class="params-container">
    <el-form ref="ruleForm" size="mini" label-position="top" :model="params" :rules="rules"
      class="params-dialog bg-white">
    <el-form
      ref="ruleForm"
      size="mini"
      label-position="top"
      :model="params"
      :rules="rules"
      class="params-dialog bg-white"
    >
      <el-row :gutter="layout.gutter">
        <el-col :span="layout.span">
          <el-form-item :label="$t('Province')" prop="stationName1">
            <el-select v-model="params.stationName1" :placeholder="$t('form.selectMsg')" @change="provinceChange"
              :filterable="true">
              <el-option v-for="item in linkage.provinces" :key="item" :label="item" :value="item">
            <el-select
              v-model="params.stationName1"
              :placeholder="$t('form.selectMsg')"
              @change="provinceChange"
              allow-create
              :filterable="true"
            >
              <el-option
                v-for="item in linkage.provinces"
                :key="item"
                :label="item"
                :value="item"
              >
              </el-option>
              <el-option :label="$t('Other')" :value="$t('Other')"></el-option>
            </el-select>
@@ -15,9 +31,19 @@
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('City')" prop="stationName2">
            <el-select v-model="params.stationName2" :placeholder="$t('form.selectMsg')" @change="cityChange"
              :filterable="true">
              <el-option v-for="item in linkage.cities" :key="item" :label="item" :value="item">
            <el-select
              v-model="params.stationName2"
              :placeholder="$t('form.selectMsg')"
              @change="cityChange"
              allow-create
              :filterable="true"
            >
              <el-option
                v-for="item in linkage.cities"
                :key="item"
                :label="item"
                :value="item"
              >
              </el-option>
              <el-option :label="$t('Other')" :value="$t('Other')"></el-option>
            </el-select>
@@ -25,9 +51,19 @@
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('DistrictCounty')" prop="stationName5">
            <el-select v-model="params.stationName5" :placeholder="$t('form.selectMsg')" @change="countyChange"
              allow-create :filterable="true">
              <el-option v-for="item in linkage.counties" :key="item" :label="item" :value="item">
            <el-select
              v-model="params.stationName5"
              :placeholder="$t('form.selectMsg')"
              @change="countyChange"
              allow-create
              :filterable="true"
            >
              <el-option
                v-for="item in linkage.counties"
                :key="item"
                :label="item"
                :value="item"
              >
              </el-option>
              <el-option :label="$t('Other')" :value="$t('Other')"></el-option>
            </el-select>
@@ -35,9 +71,19 @@
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('EquipmentRoomName')" prop="stationName3">
            <el-select v-model="params.stationName3" :placeholder="$t('form.selectMsg')" @change="siteChange"
              :filterable="true">
              <el-option v-for="(item, index) in linkage.sites" :key="index" :label="item.label" :value="item.value">
            <el-select
              v-model="params.stationName3"
              :placeholder="$t('form.selectMsg')"
              @change="siteChange"
              allow-create
              :filterable="true"
            >
              <el-option
                v-for="(item, index) in linkage.sites"
                :key="index"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
              <el-option :label="$t('Other')" :value="$t('Other')"></el-option>
            </el-select>
@@ -70,32 +116,62 @@
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('DeviceType')" prop="fbsdeviceId">
            <el-select v-model="params.fbsdeviceId" disabled :placeholder="$t('form.selectMsg')">
              <el-option v-for="item in devTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
            <el-select
              v-model="params.fbsdeviceId"
              disabled
              :placeholder="$t('form.selectMsg')"
            >
              <el-option
                v-for="item in devTypes"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="layout.span" v-if="isInversion">
          <el-form-item :label="$t('ChargeType')">
            <el-select v-model="params.chargeType" :placeholder="$t('form.selectMsg')">
              <el-option v-for="item in chargeTypes" :key="item.value" :label="item.label"
                :value="item.value"></el-option>
            <el-select
              v-model="params.chargeType"
              :placeholder="$t('form.selectMsg')"
            >
              <el-option
                v-for="item in chargeTypes"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="layout.span" v-if="isHasBuscouple">
          <el-form-item :label="$t('BuscouplerStatus')">
            <el-select v-model="params.buscoupleState" :placeholder="$t('form.selectMsg')">
              <el-option v-for="item in buscouplestates" :key="item.value" :label="item.label"
                :value="item.value"></el-option>
            <el-select
              v-model="params.buscoupleState"
              :placeholder="$t('form.selectMsg')"
            >
              <el-option
                v-for="item in buscouplestates"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('BatteryGroupType')" prop="battGroupNum">
            <el-select v-model="params.battGroupNum" :placeholder="$t('form.selectMsg')">
              <el-option v-for="item in batteryTypes" :key="item.value" :label="$t('battTypes.' + item.label)"
                :value="item.value"></el-option>
            <el-select
              v-model="params.battGroupNum"
              :placeholder="$t('form.selectMsg')"
            >
              <el-option
                v-for="item in batteryTypes"
                :key="item.value"
                :label="$t('battTypes.' + item.label)"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
@@ -115,7 +191,10 @@
          </el-form-item>
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('FCCurrentThreshold')" prop="battFloatCurrent">
          <el-form-item
            :label="$t('FCCurrentThreshold')"
            prop="battFloatCurrent"
          >
            <el-input v-model="params.battFloatCurrent"></el-input>
          </el-form-item>
        </el-col>
@@ -166,9 +245,18 @@
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('BatteryBrand')" prop="battProducer">
            <el-select v-model="params.battProducer" :placeholder="$t('form.selectMsg')" @change="battProducerChange"
              :filterable="true">
              <el-option v-for="item in linkage.battProducers" :key="item" :label="item" :value="item">
            <el-select
              v-model="params.battProducer"
              :placeholder="$t('form.selectMsg')"
              @change="battProducerChange"
              :filterable="true"
            >
              <el-option
                v-for="item in linkage.battProducers"
                :key="item"
                :label="item"
                :value="item"
              >
              </el-option>
              <el-option :label="$t('Other')" value="-999"></el-option>
            </el-select>
@@ -181,14 +269,24 @@
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('ManufactureDate')" prop="battProductDate">
            <el-date-picker v-model="params.battProductDate" size="small" type="date" :placeholder="$t('form.selectDate')"
              value-format="yyyy-MM-dd"></el-date-picker>
            <el-date-picker
              v-model="params.battProductDate"
              size="small"
              type="date"
              :placeholder="$t('form.selectDate')"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="layout.span">
          <el-form-item :label="$t('ServiceDate')" prop="battInUseDate">
            <el-date-picker v-model="params.battInUseDate" size="small" type="date" :placeholder="$t('form.selectDate')"
              value-format="yyyy-MM-dd"></el-date-picker>
            <el-date-picker
              v-model="params.battInUseDate"
              size="small"
              type="date"
              :placeholder="$t('form.selectDate')"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="layout.span">
@@ -198,8 +296,16 @@
        </el-col>
        <el-col :span="layout.span" v-if="isLithium">
          <el-form-item :label="$t('ElectricityRateTemplate')" prop="tmpId">
            <el-select v-model="params.tmpId" :placeholder="$t('form.selectMsg')">
              <el-option v-for="item in tmpList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            <el-select
              v-model="params.tmpId"
              :placeholder="$t('form.selectMsg')"
            >
              <el-option
                v-for="item in tmpList"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
@@ -210,82 +316,139 @@
        </el-col>
      </el-row>
      <div class="form-footer">
        <three-btn @click="autoComputeIp" v-if="params.fbsdeviceId == '9100'">{{ $t('AutomaticallycalculateIP') }}</three-btn>
        <three-btn @click="submitFrom">{{ $t('operate.ok') }}</three-btn>
        <three-btn @click="autoComputeIp" v-if="params.fbsdeviceId == '9100'">{{
          $t("AutomaticallycalculateIP")
        }}</three-btn>
        <three-btn @click="submitFrom">{{ $t("operate.ok") }}</three-btn>
      </div>
    </el-form>
    <!-- 省 -->
    <el-dialog v-cloak top="0" class="dialog-center" :title="$t('form.selectMsg') + ' ' + $t('Province')" :visible.sync="province.dialogVisible" width="280px"
      append-to-body>
    <el-dialog
      v-cloak
      top="0"
      class="dialog-center"
      :title="$t('form.selectMsg') + ' ' + $t('Province')"
      :visible.sync="province.dialogVisible"
      width="280px"
      append-to-body
    >
      <el-form size="small">
        <el-form-item :label="$t('Province')">
          <el-select v-model="province.value" :placeholder="$t('form.selectMsg')" :filterable="true">
            <el-option v-for="province in province.list" :key="province.name" :label="province.name"
              :value="province.name"></el-option>
          </el-select>
        <el-form-item>
          <el-input
            v-model="province.value"
            :placeholder="$t('form.inputMsg')"
          ></el-input>
        </el-form-item>
      </el-form>
      <div style="text-align: right">
        <el-button type="primary" size="mini" @click="provinceOk">{{ $t('operate.ok') }}</el-button>
        <el-button size="mini" @click="province.dialogVisible = false">{{ $t('operate.cancel') }}</el-button>
        <el-button type="primary" size="mini" @click="provinceOk">{{
          $t("operate.ok")
        }}</el-button>
        <el-button size="mini" @click="province.dialogVisible = false">{{
          $t("operate.cancel")
        }}</el-button>
      </div>
    </el-dialog>
    <!-- 市 -->
    <el-dialog v-cloak top="0" class="dialog-center" :title="$t('form.selectMsg') + ' ' + $t('City')" :visible.sync="city.dialogVisible" width="280px"
      append-to-body>
    <el-dialog
      v-cloak
      top="0"
      class="dialog-center"
      :title="$t('form.selectMsg') + ' ' + $t('City')"
      :visible.sync="city.dialogVisible"
      width="280px"
      append-to-body
    >
      <el-form size="small">
        <el-form-item :label="$t('City')">
          <el-select v-model="city.value" :placeholder="$t('form.selectMsg')" :filterable="true">
            <el-option v-for="city in city.list" :key="city.name" :label="city.name" :value="city.name">
            </el-option>
          </el-select>
        <el-form-item>
          <el-input
            v-model="city.value"
            :placeholder="$t('form.inputMsg')"
          ></el-input>
        </el-form-item>
      </el-form>
      <div style="text-align: right">
        <el-button type="primary" size="mini" @click="cityOk">{{ $t('operate.ok') }}</el-button>
        <el-button size="mini" @click="city.dialogVisible = false">{{ $t('operate.cancel') }}</el-button>
        <el-button type="primary" size="mini" @click="cityOk">{{
          $t("operate.ok")
        }}</el-button>
        <el-button size="mini" @click="city.dialogVisible = false">{{
          $t("operate.cancel")
        }}</el-button>
      </div>
    </el-dialog>
    <!-- 区县 -->
    <el-dialog top="0" class="dialog-center" :title="$t('form.selectMsg') + ' ' + $t('DistrictCounty')" :visible.sync="county.dialogVisible" width="280px"
      append-to-body>
    <el-dialog
      top="0"
      class="dialog-center"
      :title="$t('form.selectMsg') + ' ' + $t('DistrictCounty')"
      :visible.sync="county.dialogVisible"
      width="280px"
      append-to-body
    >
      <el-form size="small">
        <el-form-item :label="$t('DistrictCounty')">
          <el-select v-model="county.value" :placeholder="$t('form.selectMsg')" :filterable="true">
            <el-option v-for="county in county.list" :key="county.name" :label="county.name"
              :value="county.name"></el-option>
          </el-select>
        <el-form-item>
          <el-input
            v-model="county.value"
            :placeholder="$t('form.inputMsg')"
          ></el-input>
        </el-form-item>
      </el-form>
      <div style="text-align: right">
        <el-button type="primary" size="mini" @click="countyOk">{{ $t('operate.ok') }}</el-button>
        <el-button size="mini" @click="county.dialogVisible = false">{{ $t('operate.cancel') }}</el-button>
        <el-button type="primary" size="mini" @click="countyOk">{{
          $t("operate.ok")
        }}</el-button>
        <el-button size="mini" @click="county.dialogVisible = false">{{
          $t("operate.cancel")
        }}</el-button>
      </div>
    </el-dialog>
    <!-- 电池品牌 -->
    <el-dialog top="0" class="dialog-center" :title="$t('form.inputMsg') + ' ' + $t('BatteryBrand')" :visible.sync="battProducer.dialogVisible" width="280px"
      append-to-body>
    <el-dialog
      top="0"
      class="dialog-center"
      :title="$t('form.inputMsg') + ' ' + $t('BatteryBrand')"
      :visible.sync="battProducer.dialogVisible"
      width="280px"
      append-to-body
    >
      <el-form size="small">
        <el-form-item :label="$t('BatteryBrand')">
          <el-input v-model="battProducer.value"></el-input>
        </el-form-item>
      </el-form>
      <div style="text-align: right">
        <el-button type="primary" size="mini" @click="battProducerOk">{{ $t('operate.ok') }}</el-button>
        <el-button size="mini" @click="battProducer.dialogVisible = false">{{ $t('operate.cancel') }}</el-button>
        <el-button type="primary" size="mini" @click="battProducerOk">{{
          $t("operate.ok")
        }}</el-button>
        <el-button size="mini" @click="battProducer.dialogVisible = false">{{
          $t("operate.cancel")
        }}</el-button>
      </div>
    </el-dialog>
    <!-- 机房 -->
    <el-dialog top="0" class="dialog-center" :title="$t('form.inputMsg') + ' ' + $t('EquipmentRoomName')" :visible.sync="site.dialogVisible" width="280px"
      append-to-body>
    <el-dialog
      top="0"
      class="dialog-center"
      :title="$t('form.inputMsg') + ' ' + $t('EquipmentRoomName')"
      :visible.sync="site.dialogVisible"
      width="280px"
      append-to-body
    >
      <el-form size="small">
        <el-form-item>
          <el-input v-model="site.value" :placeholder="$t('form.inputMsg')"></el-input>
          <el-input
            v-model="site.value"
            :placeholder="$t('form.inputMsg')"
          ></el-input>
        </el-form-item>
      </el-form>
      <div style="text-align: right">
        <el-button type="primary" size="mini" @click="siteOk">{{ $t('operate.ok') }}</el-button>
        <el-button size="mini" @click="site.dialogVisible = false">{{ $t('operate.cancel') }}</el-button>
        <el-button type="primary" size="mini" @click="siteOk">{{
          $t("operate.ok")
        }}</el-button>
        <el-button size="mini" @click="site.dialogVisible = false">{{
          $t("operate.cancel")
        }}</el-button>
      </div>
    </el-dialog>
  </div>
@@ -310,12 +473,16 @@
import const_rules from "@/assets/js/const/const_rules";
import getDevIp from "@/assets/js/tools/getDevIp";
import i18n from '../i18n/battGroupMager';
import { createI18nOption } from '@/assets/js/tools/i18n';
import battTypes from '@/assets/js/i18n/const_battery_type';
import i18nConstRules from '@/assets/js/i18n/const_rules';
import i18nConstBatt from '@/assets/js/i18n/const_battGroup';
const i18nMixin = createI18nOption(i18n, [[battTypes, 'battTypes'], [i18nConstRules, 'constRule'], [i18nConstBatt, 'rule']]);
import i18n from "../i18n/battGroupMager";
import { createI18nOption } from "@/assets/js/tools/i18n";
import battTypes from "@/assets/js/i18n/const_battery_type";
import i18nConstRules from "@/assets/js/i18n/const_rules";
import i18nConstBatt from "@/assets/js/i18n/const_battGroup";
const i18nMixin = createI18nOption(i18n, [
  [battTypes, "battTypes"],
  [i18nConstRules, "constRule"],
  [i18nConstBatt, "rule"],
]);
export default {
  mixins: [i18nMixin],
  props: {
@@ -334,7 +501,14 @@
    const vm = this;
    const subRules = {
      validator(rule, value, callback) {
        testVal(rule, value, callback, constRules.noSpecialChar, vm, 'constRule');
        testVal(
          rule,
          value,
          callback,
          constRules.noSpecialChar,
          vm,
          "constRule"
        );
      },
      trigger: "change",
    };
@@ -405,7 +579,7 @@
        stationName1: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -413,7 +587,7 @@
        stationName2: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -421,7 +595,7 @@
        stationName5: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -429,7 +603,7 @@
        stationName3: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -437,7 +611,7 @@
        stationName4: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -445,7 +619,7 @@
        fbsdeviceName: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -454,7 +628,14 @@
          {
            required: true,
            validator(rule, value, callback) {
              testVal(rule, value, callback, rules.FbsDeviceIp, vm, 'constRule');
              testVal(
                rule,
                value,
                callback,
                rules.FbsDeviceIp,
                vm,
                "constRule"
              );
            },
            trigger: "change",
          },
@@ -463,7 +644,14 @@
          {
            required: true,
            validator(rule, value, callback) {
              testVal(rule, value, callback, rules.FbsDeviceIp_YM, vm, 'constRule');
              testVal(
                rule,
                value,
                callback,
                rules.FbsDeviceIp_YM,
                vm,
                "constRule"
              );
            },
            trigger: "change",
          },
@@ -472,7 +660,14 @@
          {
            required: true,
            validator(rule, value, callback) {
              testVal(rule, value, callback, rules.FbsDeviceIp_WG, vm, 'constRule');
              testVal(
                rule,
                value,
                callback,
                rules.FbsDeviceIp_WG,
                vm,
                "constRule"
              );
            },
            trigger: "change",
          },
@@ -480,7 +675,7 @@
        groupIndexInFBSDevice: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -488,7 +683,7 @@
        tmpId: [
          {
            required: true,
            message: this.$t('electricityTemplateMsg'),
            message: this.$t("electricityTemplateMsg"),
            trigger: "change",
          },
          { ...subRules },
@@ -496,7 +691,7 @@
        battGroupNum: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -504,7 +699,7 @@
        floatVolLevel: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -512,7 +707,7 @@
        offlineVolLevel: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -520,7 +715,7 @@
        battFloatCurrent: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -528,7 +723,7 @@
        monResStd: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -536,14 +731,14 @@
        monSerStd: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
        ],
        monVolLowToAvg: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -551,7 +746,7 @@
        disCurrMax: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -559,7 +754,7 @@
        battGroupName: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -567,7 +762,7 @@
        monVolStd: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -575,7 +770,7 @@
        monCapStd: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -583,7 +778,7 @@
        loadCurr: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -591,7 +786,7 @@
        battProducer: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -599,7 +794,7 @@
        battModel: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -607,7 +802,7 @@
        battProductDate: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -615,7 +810,7 @@
        battInUseDate: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -623,7 +818,7 @@
        packCount: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -631,7 +826,7 @@
        monCount: [
          {
            required: true,
            message: this.$t('cannotbeblank'),
            message: this.$t("cannotbeblank"),
            trigger: "change",
          },
          { ...subRules },
@@ -813,11 +1008,11 @@
      this.linkage.cites = [];
      // 点击其他
      if (value == this.$t('Other')) {
        var provinces = this.linkagePlus.getProvince();
      if (value == this.$t("Other")) {
        // var provinces = this.linkagePlus.getProvince();
        this.province.dialogVisible = true;
        this.province.value = provinces[0].name;
        this.province.list = provinces;
        // this.province.value = provinces[0].name;
        // this.province.list = provinces;
        // 恢复上一次选择的内容
        this.params.stationName1 = this.linkage.province;
      } else {
@@ -850,7 +1045,7 @@
      // 获取省
      var stationName1 = this.params.stationName1;
      // 点击其他
      if (value == this.$t('Other')) {
      if (value == this.$t("Other")) {
        // 恢复上一次选择的内容
        this.params.stationName2 = this.linkage.city;
        // 未选择省
@@ -858,23 +1053,26 @@
          // 提出告警
          this.$message({
            type: "warning",
            message: this.$t('provincefirst'),
            message: this.$t("provincefirst"),
          });
          return;
        }
        var result = this.linkagePlus.getCity(stationName1);
        if (result.code == 1) {
          var cities = result.data;
          this.city.dialogVisible = true;
          this.city.value = cities[0].name;
          this.city.list = cities;
        } else {
          // 提出告警
          this.$message({
            type: "warning",
            message: result.msg,
          });
        }
        this.city.dialogVisible = true;
        // 恢复上一次选择的内容
        this.params.stationName2 = this.linkage.city;
        // var result = this.linkagePlus.getCity(stationName1);
        // if (result.code == 1) {
        //   var cities = result.data;
        //   this.city.dialogVisible = true;
        //   this.city.value = cities[0].name;
        //   this.city.list = cities;
        // } else {
        //   // 提出告警
        //   this.$message({
        //     type: "warning",
        //     message: result.msg,
        //   });
        // }
      } else {
        this.linkage.city = value;
      }
@@ -902,7 +1100,7 @@
      // 获取市
      var stationName2 = this.params.stationName2;
      // 点击其他
      if (value == this.$t('Other')) {
      if (value == this.$t("Other")) {
        // 恢复上一次选择的内容
        this.params.stationName5 = this.linkage.county;
        // 未选择省
@@ -910,7 +1108,7 @@
          // 提出告警
          this.$message({
            type: "warning",
            message: this.$t('provincefirst'),
            message: this.$t("provincefirst"),
          });
          return;
        }
@@ -920,23 +1118,24 @@
          // 提出告警
          this.$message({
            type: "warning",
            message: this.$t('cityfirst'),
            message: this.$t("cityfirst"),
          });
          return;
        }
        var result = this.linkagePlus.getCounty(stationName1, stationName2);
        if (result.code == 1) {
          var counties = result.data;
          this.county.dialogVisible = true;
          this.county.value = counties[0].name;
          this.county.list = counties;
        } else {
          // 提出告警
          this.$message({
            type: "warning",
            message: result.msg,
          });
        }
        this.county.dialogVisible = true;
        // var result = this.linkagePlus.getCounty(stationName1, stationName2);
        // if (result.code == 1) {
        //   var counties = result.data;
        //   this.county.dialogVisible = true;
        //   this.county.value = counties[0].name;
        //   this.county.list = counties;
        // } else {
        //   // 提出告警
        //   this.$message({
        //     type: "warning",
        //     message: result.msg,
        //   });
        // }
      } else {
        this.linkage.county = value;
      }
@@ -965,7 +1164,7 @@
      // 获取区
      var stationName5 = this.params.stationName5;
      // 点击其他
      if (value == this.$t('Other')) {
      if (value == this.$t("Other")) {
        // 恢复上一次选择的内容
        this.params.stationName3 = this.linkage.site;
        // 未选择省
@@ -973,7 +1172,7 @@
          // 提出告警
          this.$message({
            type: "warning",
            message: this.$t('provincefirst'),
            message: this.$t("provincefirst"),
          });
          return;
        }
@@ -983,7 +1182,7 @@
          // 提出告警
          this.$message({
            type: "warning",
            message: this.$t('cityfirst'),
            message: this.$t("cityfirst"),
          });
          return;
        }
@@ -993,7 +1192,7 @@
          // 提出告警
          this.$message({
            type: "warning",
            message: this.$t('CountyFirst'),
            message: this.$t("CountyFirst"),
          });
          return;
        }
@@ -1073,7 +1272,7 @@
          // 添加机房
          this.addHome(tmp);
        } else {
          this.$layer.msg(this.$t('form.validateMsg'));
          this.$layer.msg(this.$t("form.validateMsg"));
          return false;
        }
      });
@@ -1086,10 +1285,10 @@
        .then((res) => {
          res = res.data;
          if (res.code) {
            this.$message.success(this.$t('operate.successMsg'));
            this.$message.success(this.$t("operate.successMsg"));
            // 触发事件
          } else {
            this.$message.error(this.$t('operate.failMsg'));
            this.$message.error(this.$t("operate.failMsg"));
          }
          this.$emit("success");
          // 关闭加载框
@@ -1097,7 +1296,7 @@
        })
        .catch((error) => {
          console.log(error);
          this.$message.error(this.$t('operate.failMsg'));
          this.$message.error(this.$t("operate.failMsg"));
          // 触发事件
          this.$emit("success");
          // 关闭加载框
@@ -1174,10 +1373,14 @@
            let ipInfo = getDevIp(dev_id);
            if (ipInfo.code == 1) {
              this.$alert(
                this.$t('DeviceIP') + ':' + ipInfo.data + ", " + this.$t('AutomaticupdatedtodeviceIP'),
                this.$t('Message'),
                this.$t("DeviceIP") +
                  ":" +
                  ipInfo.data +
                  ", " +
                  this.$t("AutomaticupdatedtodeviceIP"),
                this.$t("Message"),
                {
                  confirmButtonText: this.$t('operate.ok'),
                  confirmButtonText: this.$t("operate.ok"),
                }
              );
              this.params.fbsdeviceIp = ipInfo.data;
@@ -1217,12 +1420,14 @@
    },
    monCountText() {
      let isLithiumPack = this.isLithiumPack;
      return isLithiumPack ? this.$t('LithiumBatteryPackCellQty') : this.$t('CellQty');
      return isLithiumPack
        ? this.$t("LithiumBatteryPackCellQty")
        : this.$t("CellQty");
    },
  },
  mounted() {
    // 设置省市区县的数据
    this.linkagePlus.setData(const_province_city_county);
    // this.linkagePlus.setData(const_province_city_county);
    // 初始化值
    this.initParams();
src/views/login/index.vue
@@ -234,6 +234,7 @@
      handler(v) {
        // 通知后台 当前语种
        this.sendLang(v);
        document.title = v == 'US' ? 'Battery Remote O&M Management System' : '蓄电池远程监控管理平台';
      },
      immediate: true
    },