he wei
2024-01-15 d592480beb70716a59b6ec5a00c73e92ff6ea986
U 国际化
6个文件已添加
14个文件已修改
961 ■■■■■ 已修改文件
src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/i18n/base.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/btnList.vue 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/contextMenu.vue 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/fileInfo.vue 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/i18n/contextMenu.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/i18n/fileInfo.js 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menuList.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabsBar.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/compare.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/contact.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/data.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/i18n/compare.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/i18n/contact.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/i18n/data.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/i18n/xmlResult.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/others.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/xmlResult.vue 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/i18n.js 130 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/routes.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -103,7 +103,7 @@
  data() {
    return {
      loading: false,
      loadingStr: '拼命加载中...',
      loadingStr: this.$t('other.loading'),
      clickObj: {},
      // fileInfoVisible: false,
      fileData: {},
src/assets/js/i18n/base.js
@@ -39,7 +39,7 @@
    },
    other: {
      Welcome: '欢迎使用福光内阻测试分析软件',
      loading: '拼命加载中',
      loading: '拼命加载中...',
      hours: '小时 | 小时 | 小时',
      mins: '分钟 | 分钟 | 分钟',
      ReferenceTime: '基准时间',
src/components/btnList.vue
@@ -1,56 +1,61 @@
<template>
  <div class="btn-list">
    <div :class="['btn-item', item.icon, {disabled: item.disabled}]" v-for="(item, idx) in list" :key="'btn_' + idx" :title="item.title" @click="itemClick(item)">
    </div>
    <div
      :class="['btn-item', item.icon, { disabled: item.disabled }]"
      v-for="(item, idx) in list"
      :key="'btn_' + idx"
      :title="item.title"
      @click="itemClick(item)"
    ></div>
  </div>
</template>
<script>
import i18n from "./i18n/menuList";
import { createI18nOption } from "@/assets/js/tools/i18n";
const i18nMixin = createI18nOption(i18n);
export default {
  name: "",
  mixins: [i18nMixin],
  data() {
    const list = [
      {
        title: '打开文件',
        icon: 'open',
        method: 'openFile'
        title: this.$t('OpenFile'),
        icon: "open",
        method: "openFile",
      },
      {
        title: '生成报告',
        icon: 'export',
        method: 'exportReport',
        disabled: true
        title: this.$t('GenerateReport'),
        icon: "export",
        method: "exportReport",
        disabled: true,
      },
      {
        title: '查看属性',
        icon: 'view',
        method: 'viewProp',
        disabled: true
        title: this.$t('ViewProperties'),
        icon: "view",
        method: "viewProp",
        disabled: true,
      },
      {
        title: '分级评价',
        icon: 'report',
        method: 'setAlarmValue'
        title: this.$t('GradedEvaluation'),
        icon: "report",
        method: "setAlarmValue",
      },
      {
        title: '窗口配置',
        icon: 'window-confirm',
        method: 'windowConfirm'
      }
        title: this.$t('WindowConfiguration'),
        icon: "window-confirm",
        method: "windowConfirm",
      },
    ];
    return {
      list
      list,
    };
  },
  watch: {
    $route(n) {
      this.list[1].disabled = !["compare", "result"].includes(
        n.name
      );
      this.list[2].disabled = !["result"].includes(
        n.name
      );
      this.list[1].disabled = !["compare", "result"].includes(n.name);
      this.list[2].disabled = !["result"].includes(n.name);
    },
  },
  components: {},
@@ -72,14 +77,14 @@
      this.$bus.$emit("export");
    },
    viewProp() {
      this.$bus.$emit('viewProp');
      this.$bus.$emit("viewProp");
    },
    setAlarmValue() {
      this.$bus.$emit('setAlarmValue');
      this.$bus.$emit("setAlarmValue");
    },
    windowConfirm() {
      this.$bus.$emit('windowConfirm');
    }
      this.$bus.$emit("windowConfirm");
    },
  },
  mounted() {},
@@ -99,22 +104,22 @@
      margin-left: 4px;
    }
    &.open {
      background: url('~@/assets/open.png') center / contain no-repeat;
      background: url("~@/assets/open.png") center / contain no-repeat;
    }
    &.export {
      background: url('~@/assets/export.png') center / contain no-repeat;
      background: url("~@/assets/export.png") center / contain no-repeat;
    }
    &.view {
      background: url('~@/assets/view.png') center / contain no-repeat;
      background: url("~@/assets/view.png") center / contain no-repeat;
    }
    &.report {
      background: url('~@/assets/report.png') center / contain no-repeat;
      background: url("~@/assets/report.png") center / contain no-repeat;
    }
    &.window-confirm {
      background: url('~@/assets/window-confirm.png') center / contain no-repeat;
      background: url("~@/assets/window-confirm.png") center / contain no-repeat;
    }
    &:hover {
      background-color: rgba(200, 200, 200, .4);
      background-color: rgba(200, 200, 200, 0.4);
    }
    &.disabled.disabled {
      background-color: #999;
@@ -123,4 +128,4 @@
    }
  }
}
</style>
</style>
src/components/contextMenu.vue
@@ -44,15 +44,15 @@
      append-to-body
      width="30%"
    >
      <el-input v-model="stationName" placeholder="请输入..."></el-input>
      <el-input v-model="stationName" :placeholder="$t('form.inputMsg')"></el-input>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="stationNameOk">确 定</el-button>
        <el-button @click="dialogVisible = false">{{ $t('operate.cancel') }}</el-button>
        <el-button type="primary" @click="stationNameOk">{{ $t('operate.ok') }}</el-button>
      </span>
    </el-dialog>
    <!-- 文件属性 -->
    <el-dialog
      title="属性"
      :title="$t('Properties')"
      class="file-info"
      :visible.sync="fileInfoVisible"
      append-to-body
@@ -74,6 +74,10 @@
<script>
import FileInfo from "@/components/fileInfo";
import i18n from './i18n/contextMenu';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
import {
  addStation,
  addFileInStation,
@@ -85,6 +89,7 @@
} from "@/apis";
export default {
  name: "ContextMenu",
  mixins: [i18nMixin],
  model: {
    prop: "visible",
    event: "change",
@@ -112,26 +117,26 @@
    const menuList = [
      {
        id: 0,
        title: "打开文件",
        title: this.$t('OpenFile'),
        method: "openFile",
        disabled: false,
        visible: false,
      },
      {
        id: 1,
        title: "新建",
        title: this.$t('New'),
        disabled: false,
        visible: false,
        children: [
          {
            id: 11,
            title: "新建根文件",
            title: this.$t('NewRootFile'),
            method: "addRootStation",
            disabled: false,
          },
          {
            id: 12,
            title: "新建子文件",
            title: this.$t('NewSubFile'),
            method: "addSubStation",
            disabled: false,
          },
@@ -139,19 +144,19 @@
      },
      {
        id: 2,
        title: "添加",
        title: this.$t('New1'),
        disabled: false,
        visible: false,
        children: [
          {
            id: 13,
            title: "指定目录下所有文件",
            title: this.$t('Allfilesinthespecifieddirectory'),
            method: "selectDir",
            disabled: false,
          },
          {
            id: 14,
            title: "单一文件",
            title: this.$t('SingleFile'),
            method: "selectFile",
            disabled: false,
          },
@@ -159,14 +164,14 @@
      },
      {
        id: 3,
        title: "重命名",
        title: this.$t('Rename'),
        method: "rename",
        disabled: false,
        visible: false,
      },
      {
        id: 4,
        title: "删除",
        title: this.$t('Delete'),
        method: "deleteItem",
        disabled: false,
        visible: false,
@@ -177,7 +182,6 @@
      dialogTitle: "",
      dialogVisible: false,
      stationName: "",
      // 操作类型 'rename', 'add'
      type: "",
      fileInfoVisible: false,
      fileData: {},
@@ -248,7 +252,7 @@
          this.currFile.fileId = fileId;
          this.fileInfoVisible = true;
        } else {
          this.$message.error("文件解析失败");
          this.$message.error(this.$t('FileParsingFailed'));
        }
      });
    },
@@ -278,20 +282,20 @@
      // console.log(this.menuList, this.disabledList, 9090);
    },
    addRootStation() {
      this.dialogTitle = "新建根文件名称";
      this.dialogTitle = this.$t('NewRootFileName');
      this.stationName = "";
      this.type = "add";
      this.dialogVisible = true;
    },
    addSubStation() {
      this.dialogTitle = "新建子文件名称";
      this.dialogTitle = this.$t('NewSubFileName');
      this.stationName = "";
      this.type = "add";
      this.dialogVisible = true;
    },
    stationNameOk() {
      if ("" == this.stationName.trim()) {
        this.$message.error("名称不能为空");
        this.$message.error(this.$t('Thenamecannotbeblank'));
        return false;
      }
      if (this.type == "add") {
@@ -321,10 +325,10 @@
        const { code, data } = res.data;
        if (code && data) {
          this.dialogVisible = false;
          this.$message.success("添加成功");
          this.$message.success(this.$t('AddSuccessfully'));
          this.reload();
        } else {
          this.$message.error("操作失败");
          this.$message.error(this.$t('OperationFailed'));
        }
      });
    },
@@ -356,17 +360,17 @@
    deleteItem() {
      let { label, parent, level } = this.contextData;
      if (level == 3) {
        this.$confirm("此操作将从站点移除该文件, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
        this.$confirm(this.$t('Thefilewillberemovedfromthesitewhethertocontinue'), this.$t('Note'), {
          confirmButtonText: this.$t('operate.ok'),
          cancelButtonText: this.$t('operate.cancel'),
          type: "warning",
        }).then(() => {
          this.deleteFile();
        });
      } else {
        this.$confirm("此操作将删除该站点, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
        this.$confirm(this.$t('Thesitewillbedeletedcontinuetheoperation'), this.$t('Note'), {
          confirmButtonText: this.$t('operate.ok'),
          cancelButtonText: this.$t('operate.cancel'),
          type: "warning",
        }).then(() => {
          this.deleteStation();
@@ -408,16 +412,16 @@
      delFileFromStation(params).then((res) => {
        const { code, data, data2 } = res.data;
        if (code && data) {
          this.$message.success("操作成功");
          this.$message.success(this.$t('OperationSuccessfully'));
          this.reload();
        } else {
          this.$message.error("操作失败");
          this.$message.error(this.$t('OperationFailed'));
        }
      });
    },
    // 重命名现只针对台站 (文件是否重命名需要确认需求)
    rename() {
      this.dialogTitle = "修改站点名称";
      this.dialogTitle = this.$t('ModifySiteName');
      this.stationName = this.contextData.label;
      this.type = "rename";
      this.dialogVisible = true;
@@ -447,10 +451,10 @@
        const { code, data } = res.data;
        if (code && data) {
          this.dialogVisible = false;
          this.$message.success("操作成功");
          this.$message.success(this.$t('OperationSuccessfully'));
          this.reload();
        } else {
          this.$message.error("操作失败");
          this.$message.error(this.$t('OperationFailed'));
        }
      });
    },
@@ -462,9 +466,9 @@
      updateFileParam(this.currFile.stationId, data).then((res) => {
        const { code, data } = res.data;
        if (code && data) {
          this.$message.success('修改成功');
          this.$message.success(this.$t('ModifySuccessfully'));
        } else {
          this.$message.error('修改失败');
          this.$message.error(this.$t('ModifyFailed'));
        }
      });
      this.toRes();
src/components/fileInfo.vue
@@ -10,80 +10,83 @@
    >
      <el-row :gutter="40">
        <el-col :span="12">
          <el-form-item label="区域">
          <el-form-item :label="$t('Region')">
            <el-input
              v-model="info.battStation"
              placeholder="请输入站点名称"
              :placeholder="$t('Pleaseenterthetestsitename')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="系统" prop="battGroupName">
          <el-form-item :label="$t('System')" prop="battGroupName">
            <el-input
              v-model="info.battGroupName"
              placeholder="请输入系统名称"
              :placeholder="$t('Pleaseenterthesystemname')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="电池品牌">
          <el-form-item :label="$t('BatteryBrand')">
            <el-input
              v-model="info.battBrand"
              placeholder="请输入电池品牌"
              :placeholder="$t('Pleaseenterthebatterybrand')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="电池型号">
          <el-form-item :label="$t('BatteryModel')">
            <el-input
              v-model="info.battModel"
              placeholder="请输入电池型号"
              :placeholder="$t('Pleaseenterthebatterymodel')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="电池类型(V)" prop="battVol">
          <el-form-item :label="$t('BatteryType') + '(V)'" prop="battVol">
            <el-input
              type="number"
              v-model="info.battVol"
              placeholder="请输入电池类型"
              :placeholder="$t('Pleaseenterthebatterytype')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="电池数量(节)" prop="battCount">
          <el-form-item :label="$t('CellQty')" prop="battCount">
            <el-input
              type="number"
              v-model="info.battCount"
              placeholder="请输入电池数量"
              :placeholder="$t('Pleaseenterthecellquantity')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="标称容量(Ah)" prop="battCap">
          <el-form-item :label="$t('RatedCapacity') + '(Ah)'" prop="battCap">
            <el-input
              type="number"
              v-model="info.battCap"
              placeholder="请输入标称容量"
              :placeholder="$t('Pleaseentertheratedcapacity')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="参考内阻(mΩ)" prop="battRes">
          <el-form-item
            :label="$t('ReferenceResistance') + '(mΩ)'"
            prop="battRes"
          >
            <el-input
              type="number"
              v-model="info.battRes"
              placeholder="请输入参考内阻"
              :placeholder="$t('Pleaseenterthereferenceresistance')"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="连接条(μΩ)" prop="chainRes">
          <el-form-item :label="$t('ConnectionBar') + '(μΩ)'" prop="chainRes">
            <el-input type="number" v-model="info.chainRes"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="安装时间">
          <el-form-item :label="$t('InstallationTime')">
            <el-date-picker
              v-model="info.battBatch"
              format="yyyy-MM-dd"
@@ -91,28 +94,29 @@
              type="date"
              :editable="false"
              :clearable="false"
              placeholder="请选择安装时间"
              :placeholder="$t('Pleaseselecttheinstallationtime')"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="外观标记">
        <el-radio-group
          v-model="info.battErrflag"
          size="medium"
        >
          <el-radio border class="good" :label="0">良好</el-radio>
          <el-radio border :label="1">鼓包/漏液/开裂</el-radio>
      <el-form-item :label="$t('AppearanceMark')">
        <el-radio-group v-model="info.battErrflag" size="medium">
          <el-radio border class="good" :label="0">{{ $t("Good") }}</el-radio>
          <el-radio border :label="1"
            >{{ $t("Bulging") }}/{{ $t("Leaking") }}/{{
              $t("Cracking")
            }}</el-radio
          >
        </el-radio-group>
      </el-form-item>
    </el-form>
    <div class="footer">
      <el-button type="primary" class="btn" @click="editOk">确认</el-button>
      <el-button type="primary" class="btn" @click="editOk">{{ $t('operate.ok') }}</el-button>
      <!-- <el-button type="warning" class="btn" @click="editCancel"
        >取消修改</el-button
      > -->
      <el-button type="info" class="btn" @click="quit">退出</el-button>
      <el-button type="info" class="btn" @click="quit">{{ $t('Exit') }}</el-button>
    </div>
  </div>
</template>
@@ -121,9 +125,15 @@
import CONST from "@/assets/js/const";
import testVal from "@/assets/js/testVal";
import i18n from './i18n/fileInfo';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
const O_rules = CONST.rules;
export default {
  name: "FileInfo",
  mixins: [i18nMixin],
  props: {
    info: {
      type: Object,
@@ -132,8 +142,7 @@
      },
    },
  },
  computed: {
  },
  computed: {},
  data() {
    let R_chainRes = {
      validator(rule, value, callback) {
@@ -143,22 +152,22 @@
    };
    const rules = {
      battStation: [
        { required: true, message: "请输入站点名称", trigger: "blur" },
        { required: true, message: this.$t('Pleaseenterthetestsitename'), trigger: "blur" },
      ],
      battlineName: [
        { required: true, message: "请输入线路名称", trigger: "blur" },
      ],
      // battlineName: [
      //   { required: true, message: "请输入线路名称", trigger: "blur" },
      // ],
      battGroupName: [
        { required: true, message: "请输入系统名称", trigger: "blur" },
        { required: true, message: this.$t('Pleaseenterthesystemname'), trigger: "blur" },
      ],
      battBrand: [
        { required: true, message: "请输入电池品牌", trigger: "blur" },
        { required: true, message: this.$t('Pleaseenterthebatterybrand'), trigger: "blur" },
      ],
      battModel: [
        { required: true, message: "请输入电池型号", trigger: "blur" },
        { required: true, message: this.$t('Pleaseenterthebatterymodel'), trigger: "blur" },
      ],
      battVol: [
        { required: true, message: "请输入电池类型", trigger: "blur" },
        { required: true, message: this.$t('Pleaseenterthebatterytype'), trigger: "blur" },
        {
          validator(rule, value, callback) {
            testVal(rule, value, callback, O_rules.battVol);
@@ -167,7 +176,7 @@
        },
      ],
      battCount: [
        { required: true, message: "请输入电池数量", trigger: "blur" },
        { required: true, message: this.$t('Pleaseenterthecellquantity'), trigger: "blur" },
        {
          validator(rule, value, callback) {
            testVal(rule, value, callback, O_rules.battCount);
@@ -176,11 +185,11 @@
        },
      ],
      battCap: [
        { required: true, message: "请输入标称容量", trigger: "blur" },
        { required: true, message: this.$t('Pleaseentertheratedcapacity'), trigger: "blur" },
        R_chainRes,
      ],
      battRes: [
        { required: true, message: "请输入参考内阻", trigger: "blur" },
        { required: true, message: this.$t('Pleaseenterthereferenceresistance'), trigger: "blur" },
        {
          validator(rule, value, callback) {
            testVal(rule, value, callback, O_rules.battRes);
@@ -189,7 +198,7 @@
        },
      ],
      chainRes: [
        { required: true, message: "请输入连接条参考电阻", trigger: "blur" },
        { required: true, message: this.$t('Pleaseentertheconnectionbarreferenceresistance'), trigger: "blur" },
        R_chainRes,
      ],
    };
@@ -205,7 +214,7 @@
        if (valid) {
          this.$emit("ok", this.info);
        } else {
          this.$message.error("存在校验未通过的数据!");
          this.$message.error(this.$t('Thereexistsunverifieddata'));
          return false;
        }
      });
src/components/i18n/contextMenu.js
New file
@@ -0,0 +1,54 @@
export default {
  messages: {
    CN: {
      Properties: "属性",
      OpenFile: "打开文件",
      New: "新建",
      NewRootFile: "新建根文件",
      NewSubFile: "新建子文件",
      New1: "添加",
      Allfilesinthespecifieddirectory: "指定目录下所有文件",
      SingleFile: "单一文件",
      Rename: "重命名",
      Delete: "删除",
      FileParsingFailed: "文件解析失败",
      NewRootFileName: "新建根文件名称",
      NewSubFileName: "新建子文件名称",
      Thenamecannotbeblank: "名称不能为空",
      AddSuccessfully: "添加成功",
      OperationFailed: "操作失败",
      Thefilewillberemovedfromthesitewhethertocontinue: "此操作将从站点移除该文件, 是否继续?",
      Note: "提示",
      Thesitewillbedeletedcontinuetheoperation: "此操作将删除该站点, 是否继续?",
      OperationSuccessfully: "操作成功",
      ModifySiteName: "修改站点名称",
      ModifySuccessfully: "修改成功",
      ModifyFailed: "修改失败",
    },
    US: {
      Properties: "Properties",
      OpenFile: "Open File",
      New: "New",
      NewRootFile: "New Root File",
      NewSubFile: "New Sub-File",
      New1: "New",
      Allfilesinthespecifieddirectory: "All files in the specified directory",
      SingleFile: "Single File",
      Rename: "Rename",
      Delete: "Delete",
      FileParsingFailed: "File Parsing Failed",
      NewRootFileName: "New Root File Name",
      NewSubFileName: "New Sub-File Name",
      Thenamecannotbeblank: "The name cannot be blank",
      AddSuccessfully: "Add Successfully",
      OperationFailed: "Operation Failed",
      Thefilewillberemovedfromthesitewhethertocontinue: "The file will be removed from the site, whether to continue?",
      Note: "Note",
      Thesitewillbedeletedcontinuetheoperation: "The site will be deleted, continue the operation?",
      OperationSuccessfully: "Operation Successfully",
      ModifySiteName: "Modify Site Name",
      ModifySuccessfully: "Modify Successfully",
      ModifyFailed: "Modify Failed",
    },
  },
};
src/components/i18n/fileInfo.js
New file
@@ -0,0 +1,62 @@
export default {
  messages: {
    CN: {
      Region: "区域",
      Pleaseenterthetestsitename: "请输入站点名称",
      System: "系统",
      Pleaseenterthesystemname: "请输入系统名称",
      BatteryBrand: "电池品牌",
      Pleaseenterthebatterybrand: "请输入电池品牌",
      BatteryModel: "电池型号",
      Pleaseenterthebatterymodel: "请输入电池型号",
      BatteryType: "电池类型",
      Pleaseenterthebatterytype: "请输入电池类型",
      CellQty: "电池数量(节)",
      Pleaseenterthecellquantity: "请输入电池数量",
      RatedCapacity: "标称容量",
      Pleaseentertheratedcapacity: "请输入标称容量",
      ReferenceResistance: "参考内阻",
      Pleaseenterthereferenceresistance: "请输入参考内阻",
      ConnectionBar: "连接条",
      InstallationTime: "安装时间",
      Pleaseselecttheinstallationtime: "请选择安装时间",
      AppearanceMark: "外观标记",
      Good: "良好",
      Bulging: "鼓包",
      Leaking: "漏液",
      Cracking: "开裂",
      Exit: "退出",
      Pleaseentertheconnectionbarreferenceresistance: "请输入连接条参考电阻",
      Thereexistsunverifieddata: "存在校验未通过的数据!",
    },
    US: {
      Region: "Region",
      Pleaseenterthetestsitename: "Please enter the test site name",
      System: "System",
      Pleaseenterthesystemname: "Please enter the system name",
      BatteryBrand: "Battery Brand",
      Pleaseenterthebatterybrand: "Please enter the battery brand",
      BatteryModel: "Battery Model",
      Pleaseenterthebatterymodel: "Please enter the battery model",
      BatteryType: "Battery Type",
      Pleaseenterthebatterytype: "Please enter the battery type",
      CellQty: "Cell Qty",
      Pleaseenterthecellquantity: "Please enter the cell quantity",
      RatedCapacity: "Rated Capacity",
      Pleaseentertheratedcapacity: "Please enter the rated capacity",
      ReferenceResistance: "Reference Resistance",
      Pleaseenterthereferenceresistance: "Please enter the reference resistance",
      ConnectionBar: "Connection Bar",
      InstallationTime: "Installation Time",
      Pleaseselecttheinstallationtime: "Please select the installation time",
      AppearanceMark: "Appearance Mark",
      Good: "Good",
      Bulging: "Bulging",
      Leaking: "Leaking",
      Cracking: "Cracking",
      Exit: "Exit",
      Pleaseentertheconnectionbarreferenceresistance: "Please enter the connection bar reference resistance",
      Thereexistsunverifieddata: "There exists unverified data!",
    },
  },
};
src/components/menuList.vue
@@ -460,12 +460,12 @@
import { versionBig } from "@/assets/js/util";
import config from "@/assets/js/config.js";
import i18n from './i18n/menuList';
import { createI18nOption } from '@/assets/js/tools/i18n';
import i18n from "./i18n/menuList";
import { createI18nOption } from "@/assets/js/tools/i18n";
const i18nMixin = createI18nOption(i18n);
const { isStandard } = config;
const { isStandard, lang } = config;
const O_rules = CONST.rules;
export default {
@@ -550,7 +550,7 @@
    ];
    // 标准版帮助菜单
    if (isStandard) {
      menuList[3].children = [
      const menu0 = [
        {
          title: this.$t("AnalyzerManual"),
          method: "instructionBook",
@@ -567,6 +567,8 @@
          title: this.$t("Update"),
          method: "checkForUpdate",
        },
      ];
      const menu1 = [
        {
          title: this.$t("Support"),
          method: "contact",
@@ -576,6 +578,16 @@
          method: "others",
        },
      ];
      if (lang == "US") {
        menuList[3].children = [...menu1];
      } else {
        menuList[3].children = [...menu0, ...menu1];
      }
    } else {
      if (lang == "US") {
        menuList.pop();
      }
    }
    const p_params = {
      // chainResChange
@@ -1172,7 +1184,7 @@
            });
          });
          this.$message.error({
            message: this.$t('Thereexistsunverifieddata') + errStr,
            message: this.$t("Thereexistsunverifieddata") + errStr,
            duration: 5000,
          });
          return false;
@@ -1181,7 +1193,7 @@
    },
    fileParseOk() {
      if (!this.fileUrl) {
        this.$message.warning(this.$t('Pleaseselectthefiletoanalyze'));
        this.$message.warning(this.$t("Pleaseselectthefiletoanalyze"));
        return false;
      }
      // console.log(this.fileUrl);
src/components/tabsBar.vue
@@ -63,10 +63,10 @@
        page.fullPath = newRoute.fullPath;
      } else if (!page) {
        // 如果新增的是文件结果或对比页面 则清除同类
        if (newRoute.name == "result" || newRoute.name == 'compare') {
        if (newRoute.name == "result" || newRoute.name == "compare") {
          // 清除缓存
          const clearPages = this.pageList.filter(
            (item) => item.name == "result" || item.name == 'compare'
            (item) => item.name == "result" || item.name == "compare"
          );
          this.$bus.$emit(
            "clearCaches",
@@ -149,7 +149,9 @@
    },
    pageName(page) {
      // console.log(page, "pageName");
      return page.title;
      return page.name == "result"
        ? page.title
        : this.$t("router." + page.title);
    },
    /**
     * 添加监听器
@@ -390,4 +392,4 @@
    }
  }
}
</style>
</style>
src/pages/compare.vue
@@ -19,12 +19,12 @@
                  'icon-tuichuquanping': fullScreen,
                },
              ]"
              :title="fullScreen ? '还原' : '全屏'"
              :title="fullScreen ? $t('Restore') : $t('FullScreen')"
              @click="toggleScreen(item)"
            ></div>
            <div
              class="btn iconfont icon-guanbi"
              title="关闭"
              :title="$t('operate.close')"
              @click="closeItem(item)"
            ></div>
          </div>
@@ -56,12 +56,12 @@
                  'icon-tuichuquanping': fullScreen,
                },
              ]"
              :title="fullScreen ? '还原' : '全屏'"
              :title="fullScreen ? $t('Restore') : $t('FullScreen')"
              @click="toggleScreen(item)"
            ></div>
            <div
              class="btn iconfont icon-guanbi"
              title="关闭"
              :title="$t('operate.close')"
              @click="closeItem(item)"
            ></div>
          </div>
@@ -113,29 +113,34 @@
import { comparedList, testCompareReport } from "@/apis";
import { mapGetters } from "vuex";
import { toFixed } from "@/assets/js/util";
import i18n from './i18n/compare';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
// 保留三位小数
const BIT = 3;
export default {
  name: "",
  mixins: [i18nMixin],
  data() {
    const titles = {
      resChart: "内阻(mΩ)",
      volChart: "电压(V)",
      resTable: "数据表(内阻/mΩ)",
      volTable: "数据表(电压/V)",
      resChart: this.$t("Resistance") + "(mΩ)",
      volChart: this.$t("Voltage") + "(V)",
      resTable: this.$t("DataSheet") + "(" + this.$t("Resistance") + "/mΩ)",
      volTable: this.$t("DataSheet") + "(" + this.$t("Voltage") + "/V)",
    };
    const marks = {
      resChart: [
        {
          name: "内阻告警",
          name: this.$t("ResistanceAlarm"),
          y: 0,
          type: "high",
          color: "#ff0",
        },
        {
          name: "内阻更换",
          name: this.$t("ResistanceFail"),
          y: 0,
          type: "high",
          color: "#d9001b",
@@ -143,13 +148,13 @@
      ],
      volChart: [
        {
          name: "高压告警",
          name: this.$t("HighvoltageAlarm"),
          y: 0,
          type: "high",
          color: "#d9001b",
        },
        {
          name: "低压告警",
          name: this.$t("LowvoltageAlarm"),
          y: 0,
          type: "low",
          color: "#ff0",
@@ -246,13 +251,13 @@
          if (!this.marks.volChart.length) {
            this.marks.volChart = [
              {
                name: "高压告警",
                name: this.$t("HighvoltageAlarm"),
                y: 0,
                type: "high",
                color: "#d9001b",
              },
              {
                name: "低压告警",
                name: this.$t("LowvoltageAlarm"),
                y: 0,
                type: "low",
                color: "#ff0",
@@ -284,7 +289,7 @@
            this.initChart();
          });
        } else {
          this.$message.error("文件解析失败");
          this.$message.error(this.$t("FileParsingFailed"));
        }
      });
    },
@@ -404,16 +409,16 @@
      resTableData.push(
        { name: time1, balanceRate: resBalanceRate[0] },
        { name: time2, balanceRate: resBalanceRate[1] },
        { name: "变化率", balanceRate: resChangeRate.pop() }
        { name: this.$t("ChangeRate"), balanceRate: resChangeRate.pop() }
      );
      volTableData.push(
        { name: time1, balanceRate: volBalanceRate[0] },
        { name: time2, balanceRate: volBalanceRate[1] },
        { name: "变化率", balanceRate: volChangeRate.pop() }
        { name: this.$t("ChangeRate"), balanceRate: volChangeRate.pop() }
      );
      headers.push({
        prop: "name",
        label: "数据",
        label: this.$t("Data"),
        minWidth: 180,
        fixed: "left",
      });
@@ -486,7 +491,7 @@
        this.toggleScreen(item);
      }
      if (this.windowList.length <= 1) {
        this.$message.warning("最少保留一个模块");
        this.$message.warning(this.$t("Keepatleastonemodule"));
        return;
      }
      const idx = this.windowList.indexOf(item);
@@ -564,7 +569,7 @@
          const matchRes = /filename=(.*)/.exec(headers["content-disposition"]);
          const fileName = matchRes
            ? decodeURI(matchRes[1].trim())
            : "未知文件名.xls";
            : this.$t("UnknownFileName") + ".xls";
          let link = document.createElement("a");
          link.style.display = "none";
          link.href = url;
@@ -574,7 +579,7 @@
          document.body.removeChild(link);
          window.URL.revokeObjectURL(url);
        } else {
          this.$message.error("操作失败");
          this.$message.error(this.$t('OperationFailed'));
        }
      });
    },
src/pages/contact.vue
@@ -1,16 +1,20 @@
<template>
  <div class="contact">
    <div class="title">如需技术支持, 请与我联系</div>
    <div class="">福州福光电子有限公司</div>
    <div class="">地址: 福州市仓山区建新镇金岩路168号B栋</div>
    <div class="">电话: 0591-83305876</div>
    <div class="title">{{ $t("contactus") }}</div>
    <div class="">{{ $t("FuguangElectronics") }}</div>
    <div class="">{{ $t("Address") }}</div>
    <div class="">{{ $t("Tel") }}</div>
  </div>
</template>
<script>
import i18n from "./i18n/contact";
import { createI18nOption } from "@/assets/js/tools/i18n";
const i18nMixin = createI18nOption(i18n);
export default {
  name: "",
  mixins: [i18nMixin],
  data() {
    return {};
  },
@@ -33,4 +37,4 @@
    margin-bottom: 0.4em;
  }
}
</style>
</style>
src/pages/data.vue
@@ -2,11 +2,11 @@
  <div class="contain">
    <div class="row-filter">
      <el-form ref="form" size="mini" label-width="80px">
        <el-form-item label="日期">
        <el-form-item :label="$t('Date')">
          <el-col :span="11">
            <el-date-picker
              type="date"
              placeholder="选择起始日期"
              :placeholder="$t('Selectthestartdate')"
              v-model="startDate"
              value-format="yyyy-MM-dd"
              style="width: 100%"
@@ -16,54 +16,54 @@
          <el-col :span="11">
            <el-date-picker
              type="date"
              placeholder="选择截止日期"
              :placeholder="$t('Selecttheexpirydate')"
              v-model="endDate"
              value-format="yyyy-MM-dd"
              style="width: 100%"
            ></el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="电池类型">
        <el-form-item :label="$t('BatteryType')">
          <el-select v-model="battType">
            <el-option label="全部" :value="0"></el-option>
            <el-option :label="$t('All')" :value="0"></el-option>
            <el-option label="1.2V" :value="1.2"></el-option>
            <el-option label="2V" :value="2"></el-option>
            <el-option label="6V" :value="6"></el-option>
            <el-option label="12V" :value="12"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="属性">
        <el-form-item :label="$t('Properties')">
          <el-select v-model="propType">
            <el-option label="内阻" value="res"></el-option>
            <el-option label="电压" value="vol"></el-option>
            <el-option label="电导" value="cond"></el-option>
            <el-option label="连接条" value="chain"></el-option>
            <el-option :label="$t('Resistance')" value="res"></el-option>
            <el-option :label="$t('Voltage')" value="vol"></el-option>
            <el-option :label="$t('Conductance')" value="cond"></el-option>
            <el-option :label="$t('ConnectionBar')" value="chain"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="评价">
        <el-form-item :label="$t('Evaluation')">
          <el-select v-model="estimate">
            <el-option label="全部" :value="0"></el-option>
            <el-option label="优" :value="3"></el-option>
            <el-option label="良" :value="2"></el-option>
            <el-option label="差" :value="1"></el-option>
            <el-option :label="$t('All')" :value="0"></el-option>
            <el-option :label="$t('excellent')" :value="3"></el-option>
            <el-option :label="$t('Good')" :value="2"></el-option>
            <el-option :label="$t('bad')" :value="1"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div class="btn-grp">
        <el-button size="mini" type="primary" class="btn" @click="getDatas"
          >查询</el-button
          >{{ $t('operate.search') }}</el-button
        >
        <el-popconfirm
          class="btn"
          title="导入操作将覆盖数据库记录,确定导入吗?"
          :title="$t('importmessage')"
          @confirm="dbImport"
        >
          <el-button slot="reference" size="mini" type="primary"
            >导入</el-button
            >{{ $t('import') }}</el-button
          >
        </el-popconfirm>
        <el-button size="mini" class="btn" type="primary" @click="dbExport"
          >导出</el-button
          >{{ $t('export') }}</el-button
        >
      </div>
    </div>
@@ -94,15 +94,15 @@
            align="center"
            width="100"
            fixed="right"
            label="操作"
            :label="$t('operate.operation')"
          >
            <template slot-scope="scope">
              <el-popconfirm
                title="删除后将删除数据库记录后对应的站内关联,确定删除吗?"
                :title="$t('deleteMessage')"
                @confirm="handleDelete(scope.row)"
              >
                <el-button slot="reference" size="mini" type="danger"
                  >删除</el-button
                  >{{ $t('operate.delete') }}</el-button
                >
              </el-popconfirm>
            </template>
@@ -125,40 +125,45 @@
<script>
import { getDatas, deleteData } from "@/apis";
import i18n from './i18n/data';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
export default {
  name: "",
  mixins: [i18nMixin],
  data() {
    const header0 = [
      {
        prop: "battStation",
        label: "站点",
        label: this.$t('TestSite'),
        minWidth: 180,
        fixed: "left",
      },
      {
        prop: "battGroupName",
        label: "系统",
        label: this.$t('System'),
        minWidth: 180,
      },
      {
        prop: "testTime",
        label: "测试时间",
        label: this.$t('TestTime'),
        minWidth: 180,
      },
      {
        prop: "battVol",
        label: "电池类型",
        label: this.$t('BatteryType'),
        minWidth: 80,
      },
      {
        prop: "battCount",
        label: "电池节数",
        label: this.$t('CellQty'),
        minWidth: 80,
      },
      {
        prop: "brJudge",
        label: "评价",
        label: this.$t('Evaluation'),
        minWidth: 80,
      },
    ];
@@ -194,28 +199,28 @@
          case "res":
            arr.push({
              prop: "res" + idx,
              label: `#${idx}内阻`,
              label: `#${idx}` + this.$t('Resistance'),
              minWidth: 100,
            });
            break;
          case "vol":
            arr.push({
              prop: "vol" + idx,
              label: `#${idx}电压`,
              label: `#${idx}` + this.$t('Voltage'),
              minWidth: 100,
            });
            break;
          case "cond":
            arr.push({
              prop: "cond" + idx,
              label: `#${idx}电导`,
              label: `#${idx}` + this.$t('Conductance'),
              minWidth: 100,
            });
            break;
          case "chain":
            arr.push({
              prop: "chain" + idx,
              label: `#${idx}连接条`,
              label: `#${idx}` + this.$t('ConnectionBar'),
              minWidth: 100,
            });
            break;
@@ -299,17 +304,17 @@
      deleteData(params).then((res) => {
        let { code } = res.data;
        if (code) {
          this.$message.success("操作成功");
          this.$message.success(this.$t('OperationSuccessfully'));
          this.getDatas();
          this.$bus.$emit("stationReload");
        } else {
          this.$message.error("操作失败");
          this.$message.error(this.$t('OperationFailed'));
        }
      });
    },
    // 数据库导入
    dbImport() {
      this.$bus.$emit("loading", "请不要关闭程序, 等待程序自动重启");
      this.$bus.$emit("loading", this.$t('closeMessage'));
      window.api.send("db-import");
    },
    // 数据库导出
src/pages/i18n/compare.js
New file
@@ -0,0 +1,38 @@
export default {
  messages: {
    CN: {
      Voltage: '电压',
      Resistance: '内阻',
      Restore: '还原',
      FullScreen: '全屏',
      DataSheet: '数据表',
      ResistanceAlarm: '内阻告警',
      ResistanceFail: '内阻更换',
      HighvoltageAlarm: '高压告警',
      LowvoltageAlarm: '低压告警',
      FileParsingFailed: '文件解析失败',
      ChangeRate: '变化率',
      Data: '数据',
      Keepatleastonemodule: '最少保留一个模块',
      UnknownFileName: '未知文件名',
      OperationFailed: '操作失败',
    },
    US: {
      Voltage: 'Voltage',
      Resistance: 'Resistance',
      Restore: 'Restore',
      FullScreen: 'Full Screen',
      DataSheet: 'Data Sheet',
      ResistanceAlarm: 'Resistance Alarm',
      ResistanceFail: 'Resistance Fail',
      HighvoltageAlarm: 'High-voltage Alarm',
      LowvoltageAlarm: 'Low-voltage Alarm',
      FileParsingFailed: 'File Parsing Failed',
      ChangeRate: 'Change Rate',
      Data: 'Data',
      Keepatleastonemodule: 'Keep at least one module',
      UnknownFileName: 'Unknown File Name',
      OperationFailed: 'Operation Failed',
    }
  }
}
src/pages/i18n/contact.js
New file
@@ -0,0 +1,16 @@
export default {
  messages: {
    CN: {
      contactus: '如需技术支持, 请与我联系',
      FuguangElectronics: '福州福光电子有限公司',
      Address: '地址: 福州市仓山区建新镇金岩路168号B栋',
      Tel: '电话: 0591-83305876',
    },
    US: {
      contactus: 'If you need technical support, please contact us',
      FuguangElectronics: 'Fuzhou Fuguang Electronics Co., Ltd.',
      Address: 'Address: Bldg. B, No. 168 Jinyan Rd., Cangshan Dist., Fuzhou',
      Tel: 'Tel: 0591-83305876',
    }
  }
}
src/pages/i18n/data.js
New file
@@ -0,0 +1,58 @@
export default {
  messages: {
    CN: {
      Date: '日期',
      Selectthestartdate: '选择起始日期',
      Selecttheexpirydate: '选择截止日期',
      BatteryType: '电池类型',
      All: '全部',
      Properties: '属性',
      Resistance: '内阻',
      Voltage: '电压',
      Conductance: '电导',
      ConnectionBar: '连接条',
      Evaluation: '评价',
      excellent: '优',
      Good: '良',
      bad: '差',
      import: '导入',
      export: '导出',
      importmessage: '导入操作将覆盖数据库记录,确定导入吗?',
      deleteMessage: '删除后将删除数据库记录后对应的站内关联,确定删除吗?',
      TestSite: '站点',
      System: '系统',
      TestTime: '测试时间',
      CellQty: '电池节数',
      OperationSuccessfully: '操作成功',
      OperationFailed: '操作失败',
      closeMessage: '请不要关闭程序, 等待程序自动重启',
    },
    US: {
      Date: 'Date',
      Selectthestartdate: 'Select the start date',
      Selecttheexpirydate: 'Select the expiry date',
      BatteryType: 'Battery Type',
      All: 'All',
      Properties: 'Properties',
      Resistance: 'Resistance',
      Voltage: 'Voltage',
      Conductance: 'Conductance',
      ConnectionBar: 'Connection Bar',
      Evaluation: 'Evaluation',
      excellent: 'excellent',
      Good: 'Good',
      bad: 'bad',
      import: 'import',
      export: 'export',
      importmessage: 'The import operation will overwrite the database records. Are you sure to import?',
      deleteMessage: 'After deletion, the corresponding intra-site association after the database record will be deleted. Are you sure to delete it?',
      TestSite: 'Test Site',
      System: 'System',
      TestTime: 'Test Time',
      CellQty: 'Cell Qty',
      OperationSuccessfully: 'Operation Successfully',
      OperationFailed: 'Operation Failed',
      closeMessage: 'Please do not close the program and wait for the program to restart automatically',
    }
  }
}
src/pages/i18n/xmlResult.js
New file
@@ -0,0 +1,38 @@
export default {
  messages: {
    CN: {
      Properties: '属性',
      Capacity: '容量',
      ConnectionBar: '连接条',
      Conductance: '电导',
      DataSheet: '数据表格',
      average: '平均值',
      ConnectionBarAlarm: '连接条告警',
      ConnectionBarFail: '连接条更换',
      Battery: '电池',
      estimatedCapacity: '预估容量',
      Dataqueryfailure: '查询数据失败',
      ModifySuccessfully: '修改成功',
      ModifyFailed: '修改失败',
      Failedtoreadthefile: '读取文件失败',
      Parameterreadfailure: '获取参数失败',
    },
    US: {
      Properties: 'Properties',
      Capacity: 'Capacity',
      ConnectionBar: 'Connection Bar',
      Conductance: 'Conductance',
      DataSheet: 'Data Sheet',
      average: 'average',
      ConnectionBarAlarm: 'Connection Bar Alarm',
      ConnectionBarFail: 'Connection Bar Fail',
      Battery: 'Battery',
      estimatedCapacity: 'estimated Capacity',
      Dataqueryfailure: 'Data query failure',
      ModifySuccessfully: 'Modify Successfully',
      ModifyFailed: 'Modify Failed',
      Failedtoreadthefile: 'Failed to read the file',
      Parameterreadfailure: 'Parameter read failure',
    }
  }
}
src/pages/others.vue
@@ -3,25 +3,25 @@
</template>
<script>
import config from "@/assets/js/config.js";
const { lang } = config;
export default {
  name: "",
  data() {
    return {
      url: 'https://www.fuguang.com/list_case_195.aspx'
      url:
        lang == "US"
          ? "https://www.batterytest-china.com/"
          : "https://www.fuguang.com/list_case_195.aspx",
    };
  },
  computed: {
  },
  components: {
  },
  methods: {
  },
  computed: {},
  components: {},
  methods: {},
  mounted() {
  },
  mounted() {},
};
</script>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>
src/pages/xmlResult.vue
@@ -20,12 +20,12 @@
                  'icon-tuichuquanping': fullScreen,
                },
              ]"
              :title="fullScreen ? '还原' : '全屏'"
              :title="fullScreen ? $t('Restore') : $t('FullScreen')"
              @click="toggleScreen(item)"
            ></div>
            <div
              class="btn iconfont icon-guanbi"
              title="关闭"
              :title="$t('operate.close')"
              @click="closeItem(item)"
            ></div>
          </div>
@@ -79,7 +79,7 @@
    ></chart-context-menu>
    <!-- 文件属性 -->
    <el-dialog
      title="属性"
      :title="$t('result.Properties')"
      class="file-info"
      :visible.sync="fileInfoVisible"
      append-to-body
@@ -113,37 +113,44 @@
  updateFileParam,
} from "@/apis";
import { toFixed } from "@/assets/js/util";
import i18n from "./i18n/compare";
import { createI18nOption } from "@/assets/js/tools/i18n";
import xmlResult from "./i18n/xmlResult";
const i18nMixin = createI18nOption(i18n, [[xmlResult, "result"]]);
// 保留三位小数
const BIT = 3;
export default {
  name: "",
  mixins: [i18nMixin],
  data() {
    const titles = {
      resVisiable: "内阻(mΩ)",
      volVisiable: "电压(V)",
      capVisiable: "容量(Ah)",
      chainVisiable: "连接条(uΩ)",
      condVisiable: "电导(S)",
      tableVisiable: "数据表格",
      resVisiable: this.$t("Resistance") + "(mΩ)",
      volVisiable: this.$t("Voltage") + "(V)",
      capVisiable: this.$t("result.Capacity") + "(Ah)",
      chainVisiable: this.$t("result.ConnectionBar") + "(uΩ)",
      condVisiable: this.$t("result.Conductance") + "(S)",
      tableVisiable: this.$t("result.DataSheet"),
    };
    const marks = {
      resVisiable: [
        {
          name: "内阻告警",
          name: this.$t("ResistanceAlarm"),
          y: 0,
          type: "high",
          color: "#ff0",
        },
        {
          name: "内阻更换",
          name: this.$t("ResistanceFail"),
          y: 0,
          type: "high",
          color: "#d9001b",
        },
        {
          name: "平均值",
          name: this.$t("result.average"),
          y: 0,
          type: "agv",
          color: "#0f0",
@@ -151,19 +158,19 @@
      ],
      volVisiable: [
        {
          name: "高压告警",
          name: this.$t("HighvoltageAlarm"),
          y: 0,
          type: "high",
          color: "#d9001b",
        },
        {
          name: "低压告警",
          name: this.$t("LowvoltageAlarm"),
          y: 0,
          type: "low",
          color: "#ff0",
        },
        {
          name: "平均值",
          name: this.$t("result.average"),
          y: 0,
          type: "agv",
          color: "#0f0",
@@ -171,19 +178,19 @@
      ],
      chainVisiable: [
        {
          name: "连接条告警",
          name: this.$t("result.ConnectionBarAlarm"),
          y: 0,
          type: "high",
          color: "#ff0",
        },
        {
          name: "连接条更换",
          name: this.$t("result.ConnectionBarFail"),
          y: 0,
          type: "high",
          color: "#d9001b",
        },
        {
          name: "平均值",
          name: this.$t("result.average"),
          y: 0,
          type: "agv",
          color: "#0f0",
@@ -200,8 +207,8 @@
      // stdDevCr: "",
      resPic: "",
      volPic: "",
      chainPic: '',
      condPic: '',
      chainPic: "",
      condPic: "",
      fileParam: undefined,
      stationInfo: undefined,
      marks,
@@ -215,32 +222,32 @@
      headers: [
        {
          prop: "monNum",
          label: "电池",
          label: this.$t("result.Battery"),
          minWidth: 80,
        },
        {
          prop: "bv",
          label: "电压(V)",
          label: this.$t("Voltage") + "(V)",
          minWidth: 100,
        },
        {
          prop: "estimatedCap",
          label: "预估容量(Ah)",
          label: this.$t("result.estimatedCapacity") + "(Ah)",
          minWidth: 100,
        },
        {
          prop: "br",
          label: "内阻(mΩ)",
          label: this.$t("Resistance") + "(mΩ)",
          minWidth: 100,
        },
        {
          prop: "cr",
          label: "连接条(μΩ)",
          label: this.$t("result.ConnectionBar") + "(μΩ)",
          minWidth: 120,
        },
        {
          prop: "bs",
          label: "电导(S)",
          label: this.$t("result.Conductance") + "(S)",
          minWidth: 100,
        },
      ],
@@ -285,7 +292,11 @@
        condData.push(v.bs);
        // capData.push() TODO
        chainData.push(v.cr);
        tableData.push({ ...v, estimatedCap: toFixed(v.estimatedCap, 1), monNum: "#" + v.monNum });
        tableData.push({
          ...v,
          estimatedCap: toFixed(v.estimatedCap, 1),
          monNum: "#" + v.monNum,
        });
      });
      return {
        xLabel,
@@ -374,19 +385,19 @@
          if (!this.marks.volVisiable.length) {
            this.marks.volVisiable = [
              {
                name: "高压告警",
                name: this.$t("HighvoltageAlarm"),
                y: 0,
                type: "high",
                color: "#d9001b",
              },
              {
                name: "低压告警",
                name: this.$t("LowvoltageAlarm"),
                y: 0,
                type: "low",
                color: "#ff0",
              },
              {
                name: "平均值",
                name: this.$t('result.average'),
                y: 0,
                type: "agv",
                color: "#0f0",
@@ -413,7 +424,7 @@
            default:
              this.marks.volVisiable = [
                {
                  name: "平均值",
                  name: this.$t('result.average'),
                  y: 0,
                  type: "agv",
                  color: "#0f0",
@@ -443,7 +454,7 @@
            this.initChart();
          });
        } else {
          this.$message.error("查询数据失败");
          this.$message.error(this.$t('result.Dataqueryfailure'));
        }
      });
    },
@@ -484,19 +495,19 @@
          if (!this.marks.volVisiable.length) {
            this.marks.volVisiable = [
              {
                name: "高压告警",
                name: this.$t("HighvoltageAlarm"),
                y: 0,
                type: "high",
                color: "#d9001b",
              },
              {
                name: "低压告警",
                name: this.$t("LowvoltageAlarm"),
                y: 0,
                type: "low",
                color: "#ff0",
              },
              {
                name: "平均值",
                name: this.$t('result.average'),
                y: 0,
                type: "agv",
                color: "#0f0",
@@ -523,7 +534,7 @@
            default:
              this.marks.volVisiable = [
                {
                  name: "平均值",
                  name: this.$t('result.average'),
                  y: 0,
                  type: "agv",
                  color: "#0f0",
@@ -558,7 +569,7 @@
            this.initChart();
          });
        } else {
          this.$message.error("文件解析失败");
          this.$message.error(this.$t("FileParsingFailed"));
        }
      });
    },
@@ -716,7 +727,7 @@
        this.toggleScreen(item);
      }
      if (this.windowList.length <= 1) {
        this.$message.warning("最少保留一个模块");
        this.$message.warning(this.$t("Keepatleastonemodule"));
        return;
      }
      const idx = this.windowList.indexOf(item);
@@ -752,11 +763,11 @@
      updateFileParam(this.stationId, data).then((res) => {
        const { code, data } = res.data;
        if (code && data) {
          this.$message.success("修改成功");
          this.$message.success(this.$t('result.ModifySuccessfully'));
          this.refreshPage();
          this.fileInfoVisible = false;
        } else {
          this.$message.error("修改失败");
          this.$message.error(this.$t('result.ModifyFailed'));
        }
      });
    },
@@ -778,7 +789,7 @@
            this.fileData = data2.fileParam;
            this.fileInfoVisible = true;
          } else {
            this.$message.error("读取文件失败");
            this.$message.error(this.$t('result.Failedtoreadthefile'));
          }
        });
        return false;
@@ -789,7 +800,7 @@
          this.fileData = data2;
          this.fileInfoVisible = true;
        } else {
          this.$message.error("获取参数失败");
          this.$message.error(this.$t('result.Parameterreadfailure'));
        }
      });
    },
@@ -844,7 +855,7 @@
          const matchRes = /filename=(.*)/.exec(headers["content-disposition"]);
          const fileName = matchRes
            ? decodeURI(matchRes[1].trim())
            : "未知文件名.xls";
            : this.$t("UnknownFileName") + ".xls";
          let link = document.createElement("a");
          link.style.display = "none";
@@ -855,7 +866,7 @@
          document.body.removeChild(link);
          window.URL.revokeObjectURL(url);
        } else {
          this.$message.error("操作失败");
          this.$message.error(this.$t("OperationFailed"));
        }
      });
    },
src/router/i18n.js
@@ -1,126 +1,24 @@
export default {
  CN: {
    router: {
      home: '首页',
      state: '服务器管理',
      userInfo: '用户信息管理',
      userFaceManager: '用户人脸管理',
      operationRecord: '操作事件管理',
      UserPowerMager: '权限管理',
      baojiMager: '包机组管理',
      powerMager: '电源信息配置',
      aioStationImport: '一体机机房导入',
      totalStation: '机房信息管理',
      battGroupMager: '电池信息管理',
      elePriceDistributionTpl: '电价分布模板管理',
      homeAddressInfoManage: '机房定位信息管理',
      produceTotal: '电池信息统计分析',
      threadMager: '后台线程管理',
      batteryMager: '电池关注管理',
      deviceWorkState: '设备工作状态',
      powercut: '机房停电查询',
      scrapBattery: '报废电池信息管理',
      repairBattery: '备件电池信息管理',
      carbonInfo: '碳中和',
      alarmDispatch: '告警派单管理',
      batteryrTimequery: '电池实时告警',
      batteryrHistoryquery: '电池历史告警',
      deviceTimequery: '设备实时告警',
      deviceHistoryquery: '设备历史告警',
      powerRealtimeInfo: '电源实时告警',
      powerHistoryInfo: '电源历史告警',
      powerBoxAlarm: '通信电源实时告警',
      powerBoxHistoryAlarm: '通信电源历史告警',
      powerAlarmTimeout: '通信电源超时告警',
      powerCabinetSetting: '通信电源告警规则',
      devicepaSetting: '电池告警参数设置',
      alarmHandle: '告警预处理管理',
      btsUpgrade: 'BTS设备升级',
      aioUpdate: '一体机设备升级',
      nineDevUpdate: '9度设备升级',
      planManage: '放电计划管理',
      movingRingSystem: '实时监控',
      history: '历史数据',
      historyInfoMager: '历史数据管理',
      dischargeMeterData: '放电仪放电数据分析',
      standardLine: '标准曲线',
      btsStatus: '设备状态查询',
      historyAio: '一体机导入记录',
      hfSwitch: '高频开关配电柜遥测量',
      GGDmeasure: '交流配电柜遥测量',
      eleAnalyse: '电池组统计分析查询',
      eleMonomer: '电池单体统计分析查询',
      eleAssess: '蓄电池组后评估',
      taskplan: '落后单体查询',
      elestatus: '电池实时状态查询',
      endure: '电池续航能力历史查询',
      powerReport: '通信电源报表',
      eventTotalPage: '事件总表',
      realTimeSetting: '系统配置',
      threeHomeSetting: '3D机房配置',
      chartMapSetting: '地图配置',
      ComparativeAnalysis: '对比分析',
      DataManagement: '数据管理',
      AnalyzerManual: '仪表说明书',
      SoftwareManual: '软件说明书',
      OperatingVideo: '操作视频',
      ContactUs: '联系我们',
      AboutFUGUANG: '关于福光',
    }
  },
  US: {
    router: {
      home: 'home',
      state: 'Server Management',
      userInfo: 'User Info Management',
      userFaceManager: 'User Facial Recognition',
      operationRecord: 'Operation Event Management',
      UserPowerMager: 'Authority Management',
      baojiMager: 'Work Team Management',
      powerMager: 'Power Supply Setting',
      aioStationImport: 'FGCD Equipment Room Import',
      totalStation: 'Equipment Room Info Manaement',
      battGroupMager: 'Battery Info Management',
      elePriceDistributionTpl: 'Electricity Rate Distribution Template',
      homeAddressInfoManage: 'Equipment Room Location Management Permission',
      produceTotal: 'Battery Info Management',
      threadMager: 'Background Thread Management',
      batteryMager: 'Battery Management',
      deviceWorkState: 'Device Working State',
      powercut: 'Power outage query',
      scrapBattery: 'Dead Battery Management',
      repairBattery: 'Spare Battery Management',
      carbonInfo: 'Carbon Neutral',
      alarmDispatch: 'Alarm Assign Management',
      batteryrTimequery: 'Real-time battery alarm',
      batteryrHistoryquery: 'Battery history alarm',
      deviceTimequery: 'Real-time device alarm',
      deviceHistoryquery: 'Device history alarm',
      powerRealtimeInfo: 'Power Supply Real-time Alarm',
      powerHistoryInfo: 'Power Supply History Alarm',
      powerBoxAlarm: 'Comm Power Real-time Alarm',
      powerBoxHistoryAlarm: 'Comm Power History Alarm',
      powerAlarmTimeout: 'Comm Power Timeout Alarm',
      powerCabinetSetting: 'Comm Alarm Parameter Rule',
      devicepaSetting: 'Battery Alarm Parameter Setting',
      alarmHandle: 'Alarm Preprocess Management',
      btsUpgrade: 'BTS Equipment Upgrade',
      aioUpdate: 'FGCD Tester Upgrade',
      nineDevUpdate: 'LD-9 Device Upgrade',
      planManage: 'Discharge Plan Management',
      movingRingSystem: 'Real-time Monitoring',
      history: 'History Data',
      historyInfoMager: 'History Data Management',
      dischargeMeterData: 'Discharger Data Analysis',
      standardLine: 'Standard Curve',
      btsStatus: 'Device Status Search',
      historyAio: 'FGCD Tester Import Record',
      hfSwitch: 'Telemetering of High-frequency Switch  Distribution Cabinet',
      GGDmeasure: 'Telemetering of AC Distribution Cabinet',
      eleAnalyse: 'Battery Statistics Analysis Search',
      eleMonomer: 'Cell Statistics Analysis Search',
      eleAssess: 'Battery Group Post-Evaluation',
      taskplan: 'Lagging Cell Search',
      elestatus: 'Battery Real-time Status Search',
      endure: 'Battery Life History Search',
      powerReport: 'Comm Power Report',
      eventTotalPage: 'Event Summary Table',
      realTimeSetting: 'System Configuration',
      threeHomeSetting: '3D Equipement Room Config',
      chartMapSetting: 'Map Configuration',
      ComparativeAnalysis: 'Comparative Analysis',
      DataManagement: 'Data Management',
      AnalyzerManual: 'Analyzer Manual',
      SoftwareManual: 'Software Manual',
      OperatingVideo: 'Operating Video',
      ContactUs: 'Contact Us',
      AboutFUGUANG: 'About FUGUANG',
    }
  }
}
src/router/routes.js
@@ -20,7 +20,7 @@
    path: '/compare',
    name: 'compare',
    meta: {
      title: '对比分析'
      title: 'ComparativeAnalysis'
    },
    component: () => import('@/pages/compare')
  }, 
@@ -29,7 +29,7 @@
    path: '/data',
    name: 'data',
    meta: {
      title: '数据管理'
      title: 'DataManagement'
    },
    component: () => import('@/pages/data')
  }, 
@@ -38,7 +38,7 @@
    path: '/book',
    name: 'book',
    meta: {
      title: '仪表说明书'
      title: 'AnalyzerManual'
    },
    component: () => import('@/pages/book')
  }, 
@@ -47,7 +47,7 @@
    path: '/softwareBook',
    name: 'softwareBook',
    meta: {
      title: '软件说明书'
      title: 'SoftwareManual'
    },
    component: () => import('@/pages/softwareBook')
  }, 
@@ -56,7 +56,7 @@
    path: '/qrcode',
    name: 'qrcode',
    meta: {
      title: '操作视频'
      title: 'OperatingVideo'
    },
    component: () => import('@/pages/qrcode')
  }, 
@@ -65,7 +65,7 @@
    path: '/contact',
    name: 'contact',
    meta: {
      title: '联系我们'
      title: 'ContactUs'
    },
    component: () => import('@/pages/contact')
  }, 
@@ -73,7 +73,7 @@
    path: '/others',
    name: 'others',
    meta: {
      title: '关于福光'
      title: 'AboutFUGUANG'
    },
    component: () => import('@/pages/others')
  },