he wei
2023-04-25 3b8fec5011f33f076b10e0d55b8f36c789de124e
temp
15个文件已修改
9个文件已添加
2293 ■■■■ 已修改文件
src/assets/js/i18n/base.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chart/BarChart.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chart/LineChart.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/myCharts/BaseChart.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/alarmMager/devicepaSetting.vue 225 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/alarmMager/i18n/devicepaSetting.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/components/collapseHistoryTestData.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/components/compareDischarge.vue 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/deviceWorkState.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/i18n/collapseHistoryTestData.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/i18n/compareDischarge.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/i18n/deviceWorkState.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/i18n/produceTotal.js 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/i18n/threadMager.js 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/produceTotal.vue 374 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataMager/threadMager.vue 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/components/comparison.vue 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/history.vue 715 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/js/i18n/comparison.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/js/i18n/history.js 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pageSetting/components/menuSetting.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pageSetting/i18n/menuSetting.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pageSetting/i18n/realTime.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pageSetting/realTime.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/i18n/base.js
@@ -4,6 +4,11 @@
      low: '低告警',
      high: '高告警',
    },
    echarts: {
      zoom: '区域缩放',
      back: '区域缩放还原',
      restore: '还原',
    },
    form: {
      validateMsg: '存在校验未通过的数据',
      allCount: '全部(共{n}种) | 全部(共{n}种) | 全部(共{n}种)',
@@ -31,6 +36,11 @@
      low: 'Low Alarm',
      high: 'High Alarm',
    },
    echarts: {
      zoom: 'Zoom',
      back: 'Zoom Reset',
      restore: 'Restore',
    },
    form: {
      validateMsg: 'Verify failed data existed',
      allCount: 'All({n}) | All({n}) | All({n})',
src/components/chart/BarChart.vue
@@ -362,7 +362,10 @@
  height: 100%;
  box-sizing: border-box;
}
.e-chart-root.full-screen {
  position: relative;
  z-index: 2099;
}
.e-chart-root.full-screen .e-chart-container {
  position: fixed;
  top: 0;
src/components/chart/LineChart.vue
@@ -67,11 +67,18 @@
        legend: this.getLegend(opt),
        toolbox: {
          show: true,
          // showTitle: false,
          feature: {
            dataZoom: {
              yAxisIndex: 'none'
              yAxisIndex: 'none',
              title: {
                zoom: this.$t('echarts.zoom'),
                back: this.$t('echarts.back'),
              }
            },
            restore: {},
            restore: {
              title: this.$t('echarts.restore')
            },
          }
        },
        dataZoom: [{
src/components/myCharts/BaseChart.vue
@@ -152,6 +152,10 @@
  bottom: 0;
  box-sizing: border-box;
}
.e-chart-root.full-screen {
  position: relative;
  z-index: 2099;
}
.e-chart-root.full-screen .e-chart-container {
  position: fixed;
  top: 0;
src/views/alarmMager/devicepaSetting.vue
@@ -4,38 +4,17 @@
    <div slot="header">
      <div class="table-layout filter-box-table">
        <div class="table-row">
          <div class="table-cell text-right">设备</div>
          <div class="table-cell text-right">{{ $t('Device') }}</div>
          <div class="table-cell">
            <el-select
              :placeholder="selectPlace1"
              class="rooms"
              v-model="selectValue1"
              @change="sears"
              size="small"
            >
              <el-option
                v-for="item in sesionsNews"
                :key="item.id"
                :label="item.label"
                :value="item.id"
              ></el-option>
            <el-select :placeholder="$tc('form.allCount', selectPlace1)" class="rooms" v-model="selectValue1" @change="sears" size="small">
              <el-option v-for="item in sesionsNews" :key="item.id" :label="item.label" :value="item.id"></el-option>
            </el-select>
          </div>
          <div class="table-cell text-right">告警名称</div>
          <div class="table-cell text-right">{{ $t('AlarmName') }}</div>
          <div class="table-cell">
            <el-select
              class="dainchi"
              v-model="valueAlam"
              @change="sears"
              size="small"
            >
              <el-option value="" :label="'全部(共' + devAranam.length + '种)'"></el-option>
              <el-option
                v-for="item in devAranam"
                :key="item.alm_id"
                :label="item.name"
                :value="item.alm_id"
              ></el-option>
            <el-select class="dainchi" v-model="valueAlam" @change="sears" size="small">
              <el-option value="" :label="$tc('form.allCount', devAranam.length)"></el-option>
              <el-option v-for="item in devAranam" :key="item.alm_id" :label="$t(item.name)" :value="item.alm_id"></el-option>
            </el-select>
          </div>
        </div>
@@ -43,100 +22,37 @@
    </div>
    <!-- 内容 -->
    <div class="flex-page-content aa">
      <el-table
        ref="tableBox"
        stripe
        size="mini"
        header-row-class-name="header-primary"
        height="100%"
        :data="userList"
        :style="{ width: w }"
      >
        <el-table-column
          prop="stationName"
          :min-width="360"
          align="center"
          :show-overflow-tooltip="true"
          label="设备"
        ></el-table-column>
        <el-table-column
          prop="alarmName"
          :min-width="220"
          align="center"
          label="告警名称"
        ></el-table-column>
        <el-table-column
          prop="baseValue"
          :min-width="120"
          align="center"
          label="告警基准值"
        ></el-table-column>
        <el-table-column
          prop="almId"
          :min-width="120"
          align="center"
          label="告警ID"
        ></el-table-column>
        <el-table-column
          prop="almHighCoe"
          :min-width="200"
          align="center"
          label="告警上限系数值(0.0~30.0)"
        ></el-table-column>
        <el-table-column
          prop="almHighLevel"
          :min-width="200"
          align="center"
          label="告警上限等级(1~4)"
        ></el-table-column>
        <el-table-column
          prop="almHighEn1"
          :min-width="120"
          align="center"
          label="告警上限使能"
        >
    <div class="flex-page-content">
      <el-table ref="tableBox" stripe size="mini" header-row-class-name="header-primary" height="100%" :data="userList"
        :style="{ width: w }">
        <el-table-column prop="stationName" :min-width="400" align="center" :show-overflow-tooltip="true"
          :label="$t('Device')"></el-table-column>
        <el-table-column prop="alarmName" show-overflow-tooltip :min-width="260" align="center" :label="$t('AlarmName')"></el-table-column>
        <el-table-column prop="baseValue" :min-width="200" align="center"
          :label="$t('AlarmReferenceValue')"></el-table-column>
        <el-table-column prop="almId" :min-width="120" align="center" :label="$t('AlarmID')"></el-table-column>
        <el-table-column prop="almHighCoe" :min-width="240" align="center"
          :label="$t('UpLimitCoefficient') + '(0.0~30.0)'"></el-table-column>
        <el-table-column prop="almHighLevel" :min-width="220" align="center"
          :label="$t('UpLimitLevel') + '(1~4)'"></el-table-column>
        <el-table-column prop="almHighEn1" :min-width="140" align="center" :label="$t('UpLimitEnable')">
          <template slot-scope="scope">
            <el-checkbox v-model="scope.row.almHighEn1" disabled></el-checkbox>
          </template>
        </el-table-column>
        <el-table-column
          prop="almLowCoe"
          :min-width="200"
          align="center"
          label="告警下限系数值(0.0~30.0)"
        ></el-table-column>
        <el-table-column
          prop="almLowLevel"
          :min-width="200"
          align="center"
          label="告警下限等级(1~4)"
        ></el-table-column>
        <el-table-column
          prop="almLowEn1"
          :min-width="130"
          align="center"
          label="告警下限使能"
        >
        <el-table-column prop="almLowCoe" :min-width="270" align="center"
          :label="$t('LowLimitCoefficient') + '(0.0~30.0)'"></el-table-column>
        <el-table-column prop="almLowLevel" :min-width="200" align="center"
          :label="$t('LowLimitLevel') + '(1~4)'"></el-table-column>
        <el-table-column prop="almLowEn1" :min-width="150" align="center" :label="$t('LowLimitEnable')">
          <template slot-scope="scope">
            <el-checkbox v-model="scope.row.almLowEn1" disabled></el-checkbox>
          </template>
        </el-table-column>
        <el-table-column
          prop="cztime"
          fixed="right"
          width="100px"
          align="center"
          label="操作"
        >
        <el-table-column prop="cztime" fixed="right" width="100px" align="center" :label="$t('operate.operation')">
          <template slot-scope="scope">
            <el-button
              :disabled="!isCanEdit"
              type="primary"
              size="mini"
              @click="handleClick(scope.row)"
              >修改</el-button
            >
            <el-button :disabled="!isCanEdit" type="primary" size="mini" @click="handleClick(scope.row)">{{ $t('Modify')
            }}</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -144,47 +60,36 @@
    <!-- 底部 -->
    <div class="flex-page-footer" slot="footer">
      <div class="el-pagination-btns">
        <el-button
          type="primary"
          round
          size="mini"
          icon="el-icon-search"
          @click="sears"
          >查询</el-button
        >
        <el-button type="primary" round size="mini" icon="el-icon-search" @click="sears">{{ $t('operate.search')
        }}</el-button>
      </div>
    </div>
    <!-- 修改 -->
    <el-dialog title="提示" width="35%" :visible.sync="dialogVisible" :modal-append-to-body="false">
    <el-dialog :title="$t('message')" width="35%" :visible.sync="dialogVisible" :modal-append-to-body="false">
      <div class="dialog-container white-bg">
        <el-form
          size="mini"
          :model="form"
          label-position="top"
          class="params-dialog"
        >
        <el-form size="mini" :model="form" label-position="top" class="params-dialog">
          <div class="table-layout">
            <div class="table-row">
              <div class="table-cell ar16 a22">
                <el-form-item label="告警ID">
                <el-form-item :label="$t('AlarmID')">
                  <el-input v-model="form.almId" disabled></el-input>
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警名称" prop="FbsDeviceIp_YM">
                <el-form-item :label="$t('AlarmName')" prop="FbsDeviceIp_YM">
                  <el-input v-model="form.alarmName" disabled></el-input>
                </el-form-item>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell ar16 a22">
                <el-form-item label="告警上限系数值(0,0-30.0)">
                <el-form-item :label="$t('UpLimitCoefficient') + '(0,0-30.0)'">
                  <el-input v-model="form.almHighCoe"></el-input>
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警上限等级(1-4)">
                <el-form-item :label="$t('UpLimitLevel') + '(1-4)'">
                  <el-select placeholder="2" v-model="form.almHighLevel">
                    <el-option label="1" value="1"></el-option>
                    <el-option label="2" value="2"></el-option>
@@ -196,12 +101,12 @@
            </div>
            <div class="table-row">
              <div class="table-cell ar16 a22">
                <el-form-item label="告警下限系数值(0,0-30.0)" prop="MonCount">
                <el-form-item :label="$t('LowLimitCoefficient') + '(0,0-30.0)'" prop="MonCount">
                  <el-input v-model="form.almLowCoe"></el-input>
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警下限等级(1-4)">
                <el-form-item :label="$t('LowLimitLevel') + '(1-4)'">
                  <el-select placeholder="2" v-model="form.almLowLevel">
                    <el-option label="1" value="1"></el-option>
                    <el-option label="2" value="2"></el-option>
@@ -213,17 +118,17 @@
            </div>
            <div class="table-row">
              <div class="table-cell ar16">
                <el-form-item label="告警上限使能">
                <el-form-item :label="$t('UpLimitEnable')">
                  <input v-model="form.almHighEn1" type="checkbox" />
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警下限使能">
                <el-form-item :label="$t('LowLimitEnable')">
                  <input v-model="form.almLowEn1" type="checkbox" />
                </el-form-item>
              </div>
              <div class="form-footer">
                <three-btn @click="editUser" class="text">确定</three-btn>
                <three-btn @click="editUser" class="text">{{ $t('operate.ok') }}</three-btn>
              </div>
            </div>
          </div>
@@ -237,75 +142,69 @@
import { searchStationList } from "../pageSetting/js/api";
import { devSearnumbe, devParamUpdate } from "./js/devicepaSetting";
import { isHasPermit } from "@/assets/js/tools";
import i18n from './i18n/devicepaSetting';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
let warnparamstate = [
  {
    key: "Batt_Alarm_Type_OnlineVol",
    alm_id: 119001,
    name: "在线电压告警",
    name: "OnlineVoltageAlarm",
  },
  {
    key: "Batt_Alarm_Type_GroupVol",
    alm_id: 119002,
    name: "组端电压告警",
    name: "StringVoltageAlarm",
  },
  {
    key: "Batt_Alarm_Type_BattChargeCurr",
    alm_id: 119003,
    name: "充电电流告警",
    name: "ChargeCurrentAlarm",
  },
  {
    key: "Batt_Alarm_Type_BattDisChargeCurr",
    alm_id: 119004,
    name: "放电电流告警",
    name: "DischargeCurrentAlarm",
  },
  {
    key: "Batt_Alarm_Type_MonVol",
    alm_id: 119005,
    name: "单体电压告警",
    name: "CellVoltageAlarm",
  },
  {
    key: "Batt_Alarm_Type_MonTmp",
    alm_id: 119006,
    name: "单体温度告警",
    name: "CellTemperatureAlarm",
  },
  {
    key: "Batt_Alarm_Type_MonRes",
    alm_id: 119007,
    name: "单体内阻告警",
    name: "CellResistanceAlarm",
  },
  {
    key: "Batt_Alarm_Type_ConnRes",
    alm_id: 119008,
    name: "单体连接条告警",
    name: "CellConnectorAlarm",
  },
  {
    key: "Batt_Alarm_Type_DisChargeMonVol",
    alm_id: 119009,
    name: "放电单体电压告警",
    name: "DischargeCellVoltageAlarm",
  },
  // {
  //     key: "Batt_Alarm_Type_CapAlarm",
  //     alm_id: 119010,
  //     name: "容量告警告警"
  // },
  // {
  //     key: "Batt_Alarm_Type_CapChange",
  //     alm_id: 119011,
  //     name: "容量更换告警"
  // },
  {
    key: "Batt_Alarm_Type_MonLYVol",
    alm_id: 119012,
    name: "单体漏液电压告警",
    name: "CellLeakingVoltageAlarm",
  },
  {
    key: "ALM_TYPE_MONREALCAP",
    alm_id: 119013,
    name: "单体预估容量告警",
    name: "CellEstimatedCapacityAlarm",
  },
];
export default {
  name: "devicepaSetting",
  mixins: [i18nMixin],
  data() {
    let permits = this.$store.state.user.permits;
    let isCanEdit = isHasPermit("batt_alm_param_edit_permit", permits);
@@ -358,7 +257,7 @@
      this.sesionsNews = sesionsNews;
      // console.log('this.sesionsNews', this.sesionsNews);
      this.selectValue1 = this.sesionsNews[0].id;
      this.selectPlace1 = `全部(共${sesionsNews.length}种)`;
      this.selectPlace1 = sesionsNews.length;
      this.sears(); /* 查询告警下限数值 */
    },
    /* 查询告警下限数值 */
@@ -455,13 +354,13 @@
          break;
        }
      }
      return name;
      return this.$t(name);
    },
  },
};
</script>
<style scoped>
>>> .el-table__fixed-body-wrapper {
>>>.el-table__fixed-body-wrapper {
  top: 35px !important;
}
</style>
@@ -482,6 +381,7 @@
    height: 70%;
  }
}
.dainchi {
  width: 100%;
}
@@ -507,7 +407,8 @@
    bottom: 5px;
  }
}
.white-bg {
  background-color: #ffffff;
}
</style>
</style>
src/views/alarmMager/i18n/devicepaSetting.js
New file
@@ -0,0 +1,58 @@
export default {
  messages: {
    CN: {
      message: '提示',
      cannotbeblank: '不能为空',
      Pleaseinputthevaluewithintherange: '请输入范围内正确的值',
      Modify: '修改',
      Device: "设备",
      AlarmName: "告警名称",
      AlarmReferenceValue: "告警基准值",
      AlarmID: "告警ID",
      UpLimitCoefficient: "告警上限系数值",
      UpLimitLevel: "告警上限等级",
      UpLimitEnable: "告警上限使能",
      LowLimitCoefficient: "告警下限系数值",
      LowLimitLevel: "告警下限等级",
      LowLimitEnable: "告警下限使能",
      OnlineVoltageAlarm: "在线电压告警",
      StringVoltageAlarm: "组端电压告警",
      ChargeCurrentAlarm: "充电电流告警",
      DischargeCurrentAlarm: "放电电流告警",
      CellVoltageAlarm: "单体电压告警",
      CellTemperatureAlarm: "单体温度告警",
      CellResistanceAlarm: "单体内阻告警",
      CellConnectorAlarm: "单体连接条告警",
      DischargeCellVoltageAlarm: "放电单体电压告警",
      CellLeakingVoltageAlarm: "单体漏液电压告警",
      CellEstimatedCapacityAlarm: "单体预估容量告警",
    },
    US: {
      message: 'Message',
      cannotbeblank: 'cannot be blank',
      Pleaseinputthevaluewithintherange: 'Please input the value within the range!',
      Modify: 'Modify',
      Device: "Device",
      AlarmName: "Alarm Name",
      AlarmReferenceValue: "Alarm Reference Value",
      AlarmID: "Alarm ID",
      UpLimitCoefficient: "Up Limit Coefficient",
      UpLimitLevel: "Up Limit Level",
      UpLimitEnable: "Up Limit Enable",
      LowLimitCoefficient: "Low Limit Coefficient",
      LowLimitLevel: "Low Limit Level",
      LowLimitEnable: "Low Limit Enable",
      OnlineVoltageAlarm: "Online Voltage Alarm",
      StringVoltageAlarm: "String Voltage Alarm",
      ChargeCurrentAlarm: "Charge Current Alarm",
      DischargeCurrentAlarm: "Discharge Current Alarm",
      CellVoltageAlarm: "Cell Voltage Alarm",
      CellTemperatureAlarm: "Cell Temperature Alarm",
      CellResistanceAlarm: "Cell Resistance Alarm",
      CellConnectorAlarm: "Cell Connector Alarm",
      DischargeCellVoltageAlarm: "Discharge Cell Voltage Alarm",
      CellLeakingVoltageAlarm: "Cell Leaking Voltage Alarm",
      CellEstimatedCapacityAlarm: "Cell Estimated Capacity Alarm",
    }
  }
}
src/views/dataMager/components/collapseHistoryTestData.vue
@@ -3,50 +3,50 @@
    <el-collapse v-model="activeName" accordion>
      <el-collapse-item name="1">
        <div slot="title">
          核容放电({{ hrDischarge.length }})
          {{ $t('CapacityCheckDischarge') }}({{ hrDischarge.length }})
        </div>
        <div class="el-radio-container"
             v-for="(item, key) in hrDischarge" :key="'key'+key">
          <el-radio v-model="radio" :label="item.label">{{ item.text }}</el-radio>
        </div>
        <div class="el-text-container" v-if="hrDischarge.length == 0">
          暂无数据
          {{ $t('NoData') }}
        </div>
      </el-collapse-item>
      <el-collapse-item title="核容充电" name="2">
      <el-collapse-item name="2">
        <div slot="title">
          核容充电({{ hrCharge.length }})
          {{ $t('CapacityCheckCharge') }}({{ hrCharge.length }})
        </div>
        <div class="el-radio-container"
             v-for="(item, key) in hrCharge" :key="'key'+key">
          <el-radio v-model="radio" :label="item.label">{{ item.text }}</el-radio>
        </div>
        <div class="el-text-container" v-if="hrCharge.length == 0">
          暂无数据
          {{ $t('NoData') }}
        </div>
      </el-collapse-item>
      <el-collapse-item title="监测放电" name="3">
      <el-collapse-item name="3">
        <div slot="title">
          监测放电({{ jcDischarge.length }})
          {{ $t('MonitorDischarge') }}({{ jcDischarge.length }})
        </div>
        <div class="el-radio-container"
             v-for="(item, key) in jcDischarge" :key="'key'+key">
          <el-radio v-model="radio" :label="item.label">{{ item.text }}</el-radio>
        </div>
        <div class="el-text-container" v-if="jcDischarge.length == 0">
          暂无数据
          {{ $t('NoData') }}
        </div>
      </el-collapse-item>
      <el-collapse-item title="监测充电" name="4">
      <el-collapse-item name="4">
        <div slot="title">
          监测充电({{ jcCharge.length }})
          {{ $t('MonitorCharge') }}({{ jcCharge.length }})
        </div>
        <div class="el-radio-container"
             v-for="(item, key) in jcCharge" :key="'key'+key">
          <el-radio v-model="radio" :label="item.label">{{ item.text }}</el-radio>
        </div>
        <div class="el-text-container" v-if="jcCharge.length == 0">
          暂无数据
          {{ $t('NoData') }}
        </div>
      </el-collapse-item>
    </el-collapse>
@@ -55,9 +55,12 @@
<script>
import formatSeconds from "@/assets/js/tools/formatSeconds";
import i18n from '../i18n/collapseHistoryTestData';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
export default {
  name: "collapseHistoryTestData",
  mixins: [i18nMixin],
  props: {
    updateFlag: {
      type: Number,
@@ -149,4 +152,4 @@
  padding-top: 32px;
  text-align: center;
}
</style>
</style>
src/views/dataMager/components/compareDischarge.vue
@@ -5,33 +5,21 @@
        <div class="flex-layout-header-content" slot="header">
          <div class="item-content item-content-header">
            <flex-box size="mini" :title="list[0].stationName3">
              <collapse-history-test-data
                :list="home1.testInfo.list"
                :update-flag="home1.testInfo.updateFlag"
              <collapse-history-test-data :list="home1.testInfo.list" :update-flag="home1.testInfo.updateFlag"
                @change="home1Change"></collapse-history-test-data>
            </flex-box>
          </div>
          <div class="item-content item-content-footer">
            <flex-box size="mini" :title="list[1].stationName3">
              <collapse-history-test-data
                :list="home2.testInfo.list"
                :update-flag="home2.testInfo.updateFlag"
              <collapse-history-test-data :list="home2.testInfo.list" :update-flag="home2.testInfo.updateFlag"
                @change="home2Change"></collapse-history-test-data>
            </flex-box>
          </div>
        </div>
        <flex-box size="mini" no-header>
          <div class="chart-tools-wrapper">
            <el-select
              v-model="chartType"
              size="mini"
              @change="changeChartType">
              <el-option
                v-for="item in chartTypes"
                :key="item.key"
                :label="item.label"
                :value="item.key"
              ></el-option>
            <el-select v-model="chartType" size="mini" @change="changeChartType">
              <el-option v-for="item in chartTypes" :key="item.key" :label="item.label" :value="item.key"></el-option>
            </el-select>
          </div>
          <div class="item-content">
@@ -48,14 +36,18 @@
<script>
import FlexBox from "@/components/FlexBox";
import {searchBattTestData} from "@/views/dataTest/js/history";
import { searchBattTestData } from "@/views/dataTest/js/history";
import CollapseHistoryTestData from "@/views/dataMager/components/collapseHistoryTestData";
import {searchHistory} from "@/views/dataTest/js/history";
import {formatSeconds} from "@/assets/js/tools";
import { searchHistory } from "@/views/dataTest/js/history";
import { formatSeconds } from "@/assets/js/tools";
import LineChart from "@/components/myCharts/LineChart";
import getItemByKey from "@/assets/js/tools/getItemByKey";
import i18n from '../i18n/compareDischarge';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
export default {
  name: "compareDischarge",
  mixins: [i18nMixin],
  components: {
    LineChart,
    CollapseHistoryTestData,
@@ -73,7 +65,7 @@
    return {
      title: {
        show: true,
        text: "标准曲线(V)",
        text: "",
        x: "center",
        textStyle: {
          fontSize: "14",
@@ -183,25 +175,25 @@
      chartTypes: [
        {
          key: "groupVol",
          label: "组端电压",
          label: "groupVol",
          value: "groupVol",
          unit: "V",
        },
        {
          key: "curr",
          label: "电池电流",
          label: "curr",
          value: "curr",
          unit: "A",
        },
        {
          key: "monVol",
          label: "单体电压",
          label: "monVol",
          value: "monVol",
          unit: "V",
        },
        {
          key: "monTemp",
          label: "单体温度",
          label: "monTemp",
          value: "monTemp",
          unit: "℃",
        },
@@ -211,11 +203,11 @@
  methods: {
    loopSearch() {
      let list = this.list;
      for(let i=0; i<list.length; i++) {
      for (let i = 0; i < list.length; i++) {
        let item = list[i];
        let home = i == 0?this.home1:this.home2;
        home.title = "电池品牌:"+item.battProducer+" 电池型号:"+item.battModel+" 标称容量:"
          +item.monCapStd+"AH 实际容量:"+item.battRealCap+"AH 投入日期:"+item.battInUseDate;
        let home = i == 0 ? this.home1 : this.home2;
        home.title = this.$t('BatteryBrand') + ": " + item.battProducer + " " + this.$t('BatteryModel') + ': ' + item.battModel + " " + this.$t('RatedCapacity') + ': '
          + item.monCapStd + "AH " + this.$t('ActualCapacity') + ': ' + item.battRealCap + "AH " + this.$t('ServiceDate') + ': ' + item.battInUseDate;
        this.searchTestInfDataById(item.fbsdeviceId, item.battGroupId, i);
      }
      this.setTwoChart();
@@ -260,26 +252,26 @@
     * @param index 机房标识位
     */
    searchTestInfDataById(devId, id, index) {
      let testInfo = index == 0?this.home1.testInfo:this.home2.testInfo;
      let testInfo = index == 0 ? this.home1.testInfo : this.home2.testInfo;
      searchBattTestData({
        fbsDeviceId: devId,
        battGroupId: id,
      }).then(res=>{
      }).then(res => {
        let rs = res.data;
        if(rs.code == 1) {
        if (rs.code == 1) {
          let list = rs.data.list;
          testInfo.list = list;
          testInfo.updateFlag = Math.random();
        }
      }).catch(error=>{
      }).catch(error => {
        console.log(error);
      });
    },
    home1Change(info) {
      this.searchHistory(info.battGroupId, info.testRecordCount, info.recordNum/2, 1);
      this.searchHistory(info.battGroupId, info.testRecordCount, info.recordNum / 2, 1);
    },
    home2Change(info) {
      this.searchHistory(info.battGroupId, info.testRecordCount, info.recordNum/2, 2);
      this.searchHistory(info.battGroupId, info.testRecordCount, info.recordNum / 2, 2);
    },
    /**
     * 查询历史放电数据
@@ -295,7 +287,7 @@
        dataNew: Math.floor(num),
      };
      this.loading = true;
      searchHistory(params).then(res=>{
      searchHistory(params).then(res => {
        this.loading = false;
        let rs = res.data;
        let data = [];
@@ -304,7 +296,7 @@
          data = rs.data.list;
        }
        this.formatHisData(data, index);
      }).catch(error=>{
      }).catch(error => {
        this.loading = false;
        this.formatHisData([], index);
        console.log(error);
@@ -367,9 +359,9 @@
        let monLineTemp = monLineData.temp[monNum - 1];
        monLineTemp.push([testTimeLong, item.monTmp]);
      });
      if(index == 1) {
      if (index == 1) {
        this.$options.home1 = home;
      }else {
      } else {
        this.$options.home2 = home;
      }
      this.setTwoChart();
@@ -394,36 +386,36 @@
      let list2 = [];
      switch (type) {
        case "groupVol":
          name1 = ["组端电压"];
          name2 = ["组端电压"];
          name1 = [this.$t('groupVol')];
          name2 = [this.$t('groupVol')];
          this.startZero = false;
          list1.push(home1.allData.groupVol);
          list2.push(home2.allData.groupVol);
          break;
        case "curr":
          name1 = ["电池电流"];
          name2 = ["电池电流"];
          name1 = [this.$t('curr')];
          name2 = [this.$t('curr')];
          this.startZero = true;
          list1.push(home1.allData.testCurr);
          list2.push(home2.allData.testCurr);
          break;
        case "monVol":
          name1 = home1.monLineData.vol.map((item, key)=>{
            return "#"+(key+1);
          name1 = home1.monLineData.vol.map((item, key) => {
            return "#" + (key + 1);
          });
          name2 = home2.monLineData.vol.map((item, key)=>{
            return "#"+(key+1);
          name2 = home2.monLineData.vol.map((item, key) => {
            return "#" + (key + 1);
          });
          this.startZero = false;
          list1 = home1.monLineData.vol;
          list2 = home2.monLineData.vol;
          break;
        case "monTemp":
          name1 = home1.monLineData.temp.map((item, key)=>{
            return "#"+(key+1);
          name1 = home1.monLineData.temp.map((item, key) => {
            return "#" + (key + 1);
          });
          name2 = home2.monLineData.temp.map((item, key)=>{
            return "#"+(key+1);
          name2 = home2.monLineData.temp.map((item, key) => {
            return "#" + (key + 1);
          });
          this.startZero = false;
          list1 = home1.monLineData.temp;
@@ -431,21 +423,21 @@
          break;
      }
      chart1Option.series = name1.map((item, key)=>{
      chart1Option.series = name1.map((item, key) => {
        return {
          name: item,
          data: list1[key]
        }
      });
      chart2Option.series = name2.map((item, key)=>{
      chart2Option.series = name2.map((item, key) => {
        return {
          name: item,
          data: list2[key]
        }
      });
      this.$nextTick(()=>{
      this.$nextTick(() => {
        this.$refs.chart1.setOption(chart1Option);
        this.$refs.chart2.setOption(chart2Option);
      });
@@ -464,6 +456,7 @@
.page-container {
  position: relative;
}
.page-absolute-content {
  position: absolute;
  top: 0;
@@ -479,6 +472,7 @@
  background-repeat: no-repeat;
  overflow: hidden;
}
.flex-layout-header-content {
  width: 380px;
  height: 100%;
@@ -486,13 +480,16 @@
  padding-right: 8px;
  padding-bottom: 8px;
}
.item-content {
  box-sizing: border-box;
  height: 50%;
}
.item-content-footer {
  margin-top: 8px;
}
.chart-tools-wrapper {
  position: absolute;
  top: 8px;
src/views/dataMager/deviceWorkState.vue
@@ -14,14 +14,14 @@
            </el-option>
          </el-select>
        </div>
        <div class="table-cell text-right">通讯状态:</div>
        <div class="table-cell text-right">{{ $t('Communication Status') }}:</div>
        <div class="table-cell">
          <el-select
            v-model="params.dev_errcommcount"
            size="small"
            @change="sendMessage"
          >
            <el-option :value="100" label="全部"></el-option>
            <el-option :value="100" :label="$t('All')"></el-option>
            <el-option
              v-for="item in deviceStates"
              :key="item.value"
@@ -36,63 +36,63 @@
    <el-table stripe size="small" :data="list" height="100%" width="100%">
      <el-table-column
        prop="stationName"
        label="机房名称"
        :label="$t('EquipmentRoomName')"
        align="center"
        :min-width="360"
        :show-overflow-tooltip="true"
      ></el-table-column>
      <el-table-column
        prop="devIp"
        label="设备IP"
        :label="$t('DeviceIP')"
        align="center"
        :show-overflow-tooltip="true"
        :min-width="180"
      ></el-table-column>
      <el-table-column
        prop="devVersion"
        label="设备版本号"
        :label="$t('DeviceVersionNo')"
        align="center"
        :show-overflow-tooltip="true"
        :min-width="180"
      ></el-table-column>
      <el-table-column
        prop="devId"
        label="设备ID"
        :label="$t('DeviceID')"
        align="center"
        :show-overflow-tooltip="true"
        :min-width="180"
      ></el-table-column>
      <el-table-column
        prop="deviceName"
        label="设备类型"
        :label="$t('DeviceType')"
        align="center"
        :show-overflow-tooltip="true"
        :min-width="180"
      ></el-table-column>
      <el-table-column
        prop="num"
        label="关联电池组数"
        :label="$t('AssociatedBatteryQty')"
        align="center"
        :show-overflow-tooltip="true"
        :min-width="180"
      ></el-table-column>
      <el-table-column
        prop="devCommcount"
        label="通信计数"
        :label="$t('CommunicationTimes')"
        align="center"
        :min-width="180"
        :show-overflow-tooltip="true"
      ></el-table-column>
      <el-table-column
        prop="devErrcommcount"
        label="通信故障计数"
        :label="$t('CommunicationErrorTimes')"
        align="center"
        :min-width="180"
        :show-overflow-tooltip="true"
      ></el-table-column>
      <el-table-column
        prop="recordDatetime"
        label="数据更新时间"
        :label="$t('DataUpdateTime')"
        align="center"
        :min-width="180"
        :show-overflow-tooltip="true"
@@ -114,14 +114,16 @@
</template>
<script>
import { searchFBS9100, searchFBS9600 } from "./js/deviceWorkState";
import { Timeout } from "@/assets/js/tools";
import createWs from "@/assets/js/websocket";
const WSMixin = createWs("fbsState");
const userId = sessionStorage.getItem("userId");
import i18n from './i18n/deviceWorkState';
import { createI18nOption } from '@/assets/js/tools/i18n';
// import i18nConstIp from '@/assets/js/i18n/const_changeIp';
const i18nMixin = createI18nOption(i18n);
export default {
  name: "deviceWorkState",
  mixins: [WSMixin],
  mixins: [WSMixin, i18nMixin],
  data() {
    return {
      params: {
@@ -149,11 +151,11 @@
      ],
      deviceStates: [
        {
          label: "通信正常",
          label: "CommNormal",
          value: 0,
        },
        {
          label: "通信异常",
          label: "CommError",
          value: 1,
        },
      ],
src/views/dataMager/i18n/collapseHistoryTestData.js
New file
@@ -0,0 +1,18 @@
export default {
  messages: {
    CN: {
      CapacityCheckDischarge: '核容放电',
      CapacityCheckCharge: '核容充电',
      MonitorDischarge: '监测放电',
      MonitorCharge: '监测充电',
      NoData: '暂无数据',
    },
    US: {
      CapacityCheckDischarge: 'Capacity Check Discharge',
      CapacityCheckCharge: 'Capacity Check Charge',
      MonitorDischarge: 'Monitor Discharge',
      MonitorCharge: 'Monitor Charge',
      NoData: 'No Data',
    }
  }
}
src/views/dataMager/i18n/compareDischarge.js
New file
@@ -0,0 +1,26 @@
export default {
  messages: {
    CN: {
      groupVol: '组端电压',
      curr: '电池电流',
      monVol: '单体电压',
      monTemp: '单体温度',
      BatteryBrand: '电池品牌',
      BatteryModel: '电池型号',
      RatedCapacity: '标称容量',
      ActualCapacity: '实际容量',
      ServiceDate: '投入日期',
    },
    US: {
      groupVol: 'String Voltage',
      curr: 'Battery Current',
      monVol: 'Cell Voltage',
      monTemp: 'Cell Temperature',
      BatteryBrand: 'Battery Brand',
      BatteryModel: 'Battery Model',
      RatedCapacity: 'Rated Capacity',
      ActualCapacity: 'Actual Capacity',
      ServiceDate: 'Service Date',
    }
  }
}
src/views/dataMager/i18n/deviceWorkState.js
New file
@@ -0,0 +1,34 @@
export default {
  messages: {
    CN: {
      CommunicationStatus: '通讯状态',
      All: '全部',
      EquipmentRoomName: "机房名称",
      DeviceIP: "设备IP",
      DeviceVersionNo: "设备版本号",
      DeviceID: "设备ID",
      DeviceType: "设备类型",
      AssociatedBatteryQty: "关联电池组数",
      CommunicationTimes: "通信计数",
      CommunicationErrorTimes: "通信故障计数",
      DataUpdateTime: "数据更新时间",
      CommNormal: "通信正常",
      CommError: "通信异常",
    },
    US: {
      CommunicationStatus: 'Communication Status',
      All: 'All',
      EquipmentRoomName: "Equipment Room Name",
      DeviceIP: "Device IP",
      DeviceVersionNo: "Device Version No.",
      DeviceID: "Device ID",
      DeviceType: "Device Type",
      AssociatedBatteryQty: "Associated Battery Qty",
      CommunicationTimes: "Communication Times",
      CommunicationErrorTimes: "Communication Error Times",
      DataUpdateTime: "Data Update Time",
      CommNormal: "Comm Normal",
      CommError: "Comm Error",
    }
  }
}
src/views/dataMager/i18n/produceTotal.js
@@ -1,50 +1,82 @@
export default {
  messages: {
    CN: {
      Province: '省',
      City: '市',
      DistrictCounty: '区/县/班组',
      ModifyEquipmentRoomName: '修改机房名',
      NodeStationManagement: '节点站管理',
      NewStation: '新建站点',
      NodeStationManaegement: '节点/非节点站管理',
      StationEdit: '站点编辑',
      RoomNo: '机房编号',
      ServiceDate: '投运日期',
      BatteryBrand: '电池品牌',
      All: '全部',
      StartStatistics: '启动续航统计',
      DischargeComparison: '放电数据对比',
      Realtime: '实时',
      History: '历史',
      BatteryBrandPieChart: '电池品牌统计分析饼状图',
      BatteryServiceLifeBarChart: '电池使用年限统计',
      EquipmentRoomDurationStatistics: '机房续航时长统计',
      NoData: '暂无数据',
      BatteryGroupQty: '电池组数',
      lt1hour: '1小时内',
      hours1t2: '1-2小时',
      hours2t3: '2-3小时',
      hours3t5: '3-5小时',
      hours5t8: '5-8小时',
      gt3hours: '3小时以上',
      gt8hours: '8小时以上',
      EquipmentRoomQty: '机房数量',
      Null: '无',
      lt3years: '3年内',
      years3t5: '3-5年',
      years5t7: '5-7年',
      gt7years: '7年以上',
      ServiceLife: '使用年限',
      BatteryLife: '续航时长',
      EquipmentRoomName: '机房名称',
      SiteType: '站点类型',
      SiteVoltageLevel: '电压等级',
      Longitude: '经度',
      Latitude: '纬度',
      Address: '地址',
      NodeStation: '节点站',
      NonnodeStation: '非节点站',
      Confirmtodeletethecurrentequipmentroom: '确认删除当前机房',
      BatteryModel: '电池型号',
      ServiceDate: '投入使用日期',
      RatedCapacity: '标称容量(AH)',
      ActualCapacity: '实际容量(AH)',
      LoadCurrent: '负载电流',
      BatteryLife2: '续航时长(时:分:秒)',
      Confirmtostartthebatterylifestatistics: '确认启动续航统计',
      Message: '提示',
      Remove: '移除',
      Add: '添加',
      Pleaseselecttwoequipmentrooms: '请选择两个机房',
    },
    US: {
      Province: 'Province',
      City: 'City',
      DistrictCounty: 'District/County',
      ModifyEquipmentRoomName: 'Modify Equipment Room Name',
      NodeStationManagement: 'Node Station Management',
      NewStation: 'New Station',
      NodeStationManaegement: 'Node/Non-node Station Manaegement',
      StationEdit: 'Station Edit',
      RoomNo: 'Room No.',
      ServiceDate: 'Service Date',
      BatteryBrand: 'Battery Brand',
      All: 'All',
      StartStatistics: 'Start Statistics',
      DischargeComparison: 'Discharge Comparison',
      Realtime: 'Real-time',
      History: 'History',
      BatteryBrandPieChart: 'Battery Brand Pie Chart',
      BatteryServiceLifeBarChart: 'Battery Service Life Bar Chart',
      EquipmentRoomDurationStatistics: 'Equipment Room Duration Statistics',
      NoData: 'No Data',
      BatteryGroupQty: 'Battery Group Qty',
      lt1hour: '<1 hour',
      hours1t2: '1-2 hours',
      hours2t3: '2-3 hours',
      hours3t5: '3-5 hours',
      hours5t8: '5-8 hours',
      gt3hours: '>3 hours',
      gt8hours: '>8 hours',
      EquipmentRoomQty: 'Equipment Room Qty',
      Null: 'Null',
      lt3years: '<3 years',
      years3t5: '3-5 years',
      years5t7: '5-7 years',
      gt7years: '>7 years',
      ServiceLife: 'Service Life',
      BatteryLife: 'Battery Life',
      EquipmentRoomName: 'Equipment Room Name',
      SiteType: 'Site Type',
      SiteVoltageLevel: 'Site Voltage Level',
      Longitude: 'Longitude',
      Latitude: 'Latitude',
      Address: 'Address',
      NodeStation: 'Node Station',
      NonnodeStation: 'Non-node Station',
      Confirmtodeletethecurrentequipmentroom: 'Confirm to delete the current equipment room?',
      BatteryModel: 'Battery Model',
      ServiceDate: 'Service Date',
      RatedCapacity: 'Rated Capacity (Ah)',
      ActualCapacity: 'Actual Capacity (Ah)',
      LoadCurrent: 'Load Current',
      BatteryLife2: 'Battery Life(H:M:S)',
      Confirmtostartthebatterylifestatistics: 'Confirm to start the battery life statistics.',
      Message: 'Message',
      Remove: 'Remove',
      Add: 'Add',
      Pleaseselecttwoequipmentrooms: 'Please select two equipment rooms',
    }
  }
}
src/views/dataMager/i18n/threadMager.js
New file
@@ -0,0 +1,56 @@
export default {
  messages: {
    CN: {
      Num: '编号',
      ParameterSetting: '参数设置',
      Setting: '设置',
      Restart: '重启',
      ThreadSetting: '线程设置',
      ThreadName: '线程名称',
      ServiceName: '服务名称',
      TimeoutDuration: '超时时间',
      ServiceVersionNo: '服务版本号',
      Message: '提示',
      RestartPassword: '重启密码',
      ProgressID: "进程ID",
      RunningTime: "运行时间",
      ThreadStartTime: "线程启动时间",
      RunningDuration: "运行时长",
      ThreadStatus: "线程状态",
      cannotbeblank: "不能为空",
      ThreadEnable: "启用线程",
      ThreadDisable: "禁用线程",
      Stop: "停止",
      Running: "正在运行",
      Disable: "禁用",
      Confirmtorestart: "确定重启",
      WrongPassword: "密码错误",
    },
    US: {
      Num: 'No.',
      ParameterSetting: 'Parameter Setting',
      Setting: 'Setting',
      Restart: 'Restart',
      ThreadSetting: 'Thread Setting',
      ThreadName: 'Thread Name',
      ServiceName: 'Service Name',
      TimeoutDuration: 'Time-out Duration',
      ServiceVersionNo: 'Service Version No.',
      Message: 'Message',
      RestartPassword: 'Restart Password',
      ProgressID: "Progress ID",
      RunningTime: "Running Time",
      ThreadStartTime: "Thread Start Time",
      RunningDuration: "Running Duration",
      ThreadStatus: "Thread Status",
      cannotbeblank: "cannot be blank.",
      ThreadEnable: "Thread Enable",
      ThreadDisable: "Thread Disable",
      Stop: "Stop",
      Running: "Running",
      Disable: "Disable",
      Confirmtorestart: "Confirm to restart",
      WrongPassword: "Wrong Password",
    }
  }
}
src/views/dataMager/produceTotal.vue
@@ -5,110 +5,46 @@
        <div slot="header">
          <div class="table-layout filter-box-table">
            <div class="table-row">
              <div class="table-cell text-right">投运日期:</div>
              <div class="table-cell text-right">{{ $t('ServiceDate') }}:</div>
              <div class="table-cell">
                <el-date-picker
                  v-model="startDrsj"
                  size="small"
                  class="time_box"
                  :picker-options="pickerOptions0"
                  type="date"
                  placeholder="选择日期"
                  value-format="yyyy-MM-dd"
                ></el-date-picker
                >-
                <el-date-picker
                  v-model="endDrsj"
                  size="small"
                  class="time_box"
                  :picker-options="pickerOptions1"
                  type="date"
                  placeholder="选择日期"
                  value-format="yyyy-MM-dd"
                ></el-date-picker>
                <el-date-picker v-model="startDrsj" size="small" class="time_box" :picker-options="pickerOptions0"
                  type="date" :placeholder="$t('form.selectDate')" value-format="yyyy-MM-dd"></el-date-picker>-
                <el-date-picker v-model="endDrsj" size="small" class="time_box" :picker-options="pickerOptions1"
                  type="date" :placeholder="$t('form.selectDate')" value-format="yyyy-MM-dd"></el-date-picker>
              </div>
              <div class="table-cell text-right">电池品牌:</div>
              <div class="table-cell text-right">{{ $t('BatteryBrand') }}:</div>
              <div class="table-cell">
                <el-select
                  v-model="produce"
                  placeholder="请选择电池品牌"
                  size="small"
                  class="weihu"
                  @change="formatData2"
                >
                  <el-option label="全部" :value="0"></el-option>
                  <el-option
                    v-for="item in produces"
                    :key="item.label"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                <el-select v-model="produce" :placeholder="$t('form.selectMsg')" size="small" class="weihu"
                  @change="formatData2">
                  <el-option :label="$t('All')" :value="0"></el-option>
                  <el-option v-for="item in produces" :key="item.label" :label="item.label"
                    :value="item.value"></el-option>
                </el-select>
              </div>
              <div class="table-cell text-right">
                <el-button
                  size="mini"
                  type="primary"
                  icon="el-icon-search"
                  @click="searchBattInfoByTime"
                  >查询</el-button
                >
                <el-button size="mini" type="primary" @click="startXuHang"
                  >启动续航统计</el-button
                >
                <el-button
                  size="mini"
                  type="success"
                  @click="compareDischargeData"
                  >放电数据对比</el-button
                >
                <el-button size="mini" type="primary" icon="el-icon-search" @click="searchBattInfoByTime">{{
                  $t('operate.search') }}</el-button>
                <el-button size="mini" type="primary" @click="startXuHang">{{ $t('StartStatistics') }}</el-button>
                <el-button size="mini" type="success" @click="compareDischargeData">{{ $t('DischargeComparison')
                }}</el-button>
              </div>
            </div>
          </div>
        </div>
        <el-table
          ref="elTbl"
          stripe
          size="small"
          :data="tbl.data"
          height="100%"
          class="tableCent"
          @selection-change="tblSelectChange"
          :default-sort="{
        <el-table ref="elTbl" stripe size="small" :data="tbl.data" height="100%" class="tableCent"
          @selection-change="tblSelectChange" :default-sort="{
            prop: 'enduranceActualTimelong',
            order: 'descending',
          }"
        >
          }">
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column
            v-for="header in tbl.headers"
            :key="header.prop"
            :prop="header.prop"
            :label="header.label"
            :width="header.width"
            :min-width="header.minWidth"
            :sortable="header.sortable"
            align="center"
          ></el-table-column>
          <el-table-column
            fixed="right"
            label="操作"
            width="150"
            align="center"
          >
          <el-table-column v-for="header in tbl.headers" :key="header.prop" :prop="header.prop" :label="$t(header.label)"
          show-overflow-tooltip
            :width="header.width" :min-width="header.minWidth" :sortable="header.sortable"
            align="center"></el-table-column>
          <el-table-column fixed="right" :label="$t('operate.operation')" width="210" align="center">
            <template slot-scope="scope">
              <el-button
                @click="goRealTime(scope.row)"
                type="primary"
                size="mini"
                >实时</el-button
              >
              <el-button
                @click="goHistory(scope.row)"
                type="success"
                size="mini"
                >历史</el-button
              >
              <el-button @click="goRealTime(scope.row)" type="primary" size="mini">{{ $t('Realtime') }}</el-button>
              <el-button @click="goHistory(scope.row)" type="success" size="mini">{{ $t('History') }}</el-button>
            </template>
          </el-table-column>
        </el-table>
@@ -117,37 +53,26 @@
    <div class="page-footer" slot="footer">
      <div class="flex-layout">
        <div class="flex-content">
          <chart-wrapper title="电池品牌统计分析饼状图">
          <chart-wrapper :title="$t('BatteryBrandPieChart')">
            <pie-chart ref="produceChart"></pie-chart>
          </chart-wrapper>
        </div>
        <div class="flex-content">
          <chart-wrapper title="电池使用年限统计">
          <chart-wrapper :title="$t('BatteryServiceLifeBarChart')">
            <bar-chart ref="useTimeChart" id="useTimeChart"></bar-chart>
          </chart-wrapper>
        </div>
        <div class="flex-content">
          <chart-wrapper title="机房续航时长统计">
          <chart-wrapper :title="$t('EquipmentRoomDurationStatistics')">
            <bar-chart ref="endurance" id="endurance"></bar-chart>
          </chart-wrapper>
        </div>
      </div>
    </div>
    <!-- 放电数据对比 -->
    <el-dialog
      title="放电数据对比"
      width="1200px"
      :visible.sync="compareDischargeDialog"
      :close-on-click-modal="false"
      top="0"
      :fullscreen="true"
      class="dialog-center"
      :modal-append-to-body="false"
    >
      <compare-discharge
        v-if="compareDischargeDialog"
        :list="tbl.selected"
      ></compare-discharge>
    <el-dialog :title="$t('DischargeComparison')" width="1200px" :visible.sync="compareDischargeDialog"
      :close-on-click-modal="false" top="0" :fullscreen="true" class="dialog-center" :modal-append-to-body="false">
      <compare-discharge v-if="compareDischargeDialog" :list="tbl.selected"></compare-discharge>
    </el-dialog>
  </flex-layout>
</template>
@@ -183,24 +108,24 @@
  },
  series: [
    {
      name: "电池品牌",
      data: [{ value: 0, name: "暂无数据" }],
      name: '',
      data: [{ value: 0, name: "NoData" }],
    },
  ],
};
let useTimeOption = {
  series: [
    {
      name: "电池组数量",
      name: "",
      hColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
        { offset: 0, color: "#14c8d4" },
        { offset: 1, color: "#14c8d409" },
      ]),
      data: [
        ["3年内", 0],
        ["3-5年", 0],
        ["5-7年", 0],
        ["7年以上", 0],
        ["lt3years", 0],
        ["years3t5", 0],
        ["years5t7", 0],
        ["gt7years", 0],
      ],
    },
  ],
@@ -209,16 +134,16 @@
let enduranceOption = {
  series: [
    {
      name: "机房数量",
      name: "",
      hColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
        { offset: 0, color: "#14c8d4" },
        { offset: 1, color: "#14c8d409" },
      ]),
      data: [
        ["1小时内", 0],
        ["1-2小时", 0],
        ["2-3小时内", 0],
        ["3小时以上", 0],
        ["lt1hour", 0],
        ["hours1t2", 0],
        ["hours2t3", 0],
        ["gt3hours", 0],
      ],
    },
  ],
@@ -245,15 +170,15 @@
      dataType: "useYear",
      dataTypes: [
        {
          label: "电池品牌",
          label: "BatteryBrand",
          value: "produce",
        },
        {
          label: "使用年限",
          label: "ServiceLife",
          value: "useYear",
        },
        {
          label: "续航时长",
          label: "BatteryLife",
          value: "xuHang",
        },
      ],
@@ -261,54 +186,54 @@
        headers: [
          {
            prop: "stationName3",
            label: "机房名称",
            label: "EquipmentRoomName",
            minWidth: 260,
            sortable: false,
          },
          {
            prop: "battProducer",
            label: "电池品牌",
            minWidth: 100,
            label: "BatteryBrand",
            minWidth: 120,
            sortable: false,
          },
          {
            prop: "battModel",
            label: "电池型号",
            minWidth: 100,
            label: "BatteryModel",
            minWidth: 130,
            sortable: false,
          },
          {
            prop: "battInUseDate",
            label: "投入使用日期",
            label: "ServiceDate",
            minWidth: 140,
            sortable: true,
          },
          {
            prop: "monCapStd",
            label: "标称容量(AH)",
            minWidth: 120,
            label: "RatedCapacity",
            minWidth: 170,
            sortable: false,
          },
          {
            prop: "battRealCap",
            label: "实际容量(AH)",
            minWidth: 120,
            label: "ActualCapacity",
            minWidth: 180,
            sortable: false,
          },
          {
            prop: "groupcount",
            label: "电池组数",
            minWidth: 80,
            label: "BatteryGroupQty",
            minWidth: 200,
            sortable: false,
          },
          {
            prop: "loadCurr",
            label: "负载电流",
            label: "LoadCurrent",
            minWidth: 120,
          },
          {
            prop: "enduranceActualTimelong",
            label: "续航时长(时:分:秒)",
            label: "BatteryLife2",
            minWidth: 180,
            sortable: true,
          },
@@ -325,7 +250,7 @@
      useYears: [
        {
          key: 1,
          label: "3年内",
          label: "lt3years",
          value: 1,
          range: {
            min: -Infinity,
@@ -334,7 +259,7 @@
        },
        {
          key: 2,
          label: "3-5年",
          label: "years3t5",
          value: 2,
          range: {
            min: 3,
@@ -343,7 +268,7 @@
        },
        {
          key: 3,
          label: "5-7年",
          label: "years5t7",
          value: 3,
          range: {
            min: 5,
@@ -352,7 +277,7 @@
        },
        {
          key: 4,
          label: "7年以上",
          label: "gt7years",
          value: 4,
          range: {
            min: 7,
@@ -364,7 +289,7 @@
      xuHangs: [
        {
          key: 1,
          label: "1小时内",
          label: "lt1hour",
          value: 1,
          range: {
            min: -Infinity,
@@ -373,7 +298,7 @@
        },
        {
          key: 2,
          label: "1-2小时",
          label: "hours1t2",
          value: 2,
          range: {
            min: 1,
@@ -382,7 +307,7 @@
        },
        {
          key: 3,
          label: "2-3小时",
          label: "hours2t3",
          value: 3,
          range: {
            min: 2,
@@ -391,7 +316,7 @@
        },
        {
          key: 4,
          label: "3-5小时",
          label: "hours3t5",
          value: 4,
          range: {
            min: 3,
@@ -400,7 +325,7 @@
        },
        {
          key: 5,
          label: "5-8小时",
          label: "hours5t8",
          value: 5,
          range: {
            min: 5,
@@ -409,7 +334,7 @@
        },
        {
          key: 6,
          label: "8小时以上",
          label: "gt8hours",
          value: 6,
          range: {
            min: 8,
@@ -465,7 +390,7 @@
        searchProduceTotalData()
          .then((res) => {
            res = res.data;
            let data = [{ value: 0, name: "暂无数据" }];
            let data = [{ value: 0, name: this.$t('NoData') }];
            if (res.code) {
              data = res.data.map((item) => {
                return {
@@ -482,7 +407,7 @@
      } else {
        this.setProduceOption([
          {
            label: "无",
            label: this.$t("Null"),
            num: 0,
          },
        ]);
@@ -521,19 +446,19 @@
    searchUseYear() {
      let list = [
        {
          label: "3年内",
          label: "lt3years",
          num: 0,
        },
        {
          label: "3-5年",
          label: "years3t5",
          num: 0,
        },
        {
          label: "5-7年",
          label: "years5t7",
          num: 0,
        },
        {
          label: "7年以上",
          label: "gt7years",
          num: 0,
        },
      ];
@@ -562,8 +487,9 @@
     */
    setUseTimeOption(list) {
      let data = list.map((item) => {
        return [item.label, item.num];
        return [this.$t(item.label), item.num];
      });
      useTimeOption.series[0].name = this.$t('BatteryGroupQty');
      useTimeOption.series[0].data = data;
      this.$refs.useTimeChart.setOption(useTimeOption);
    },
@@ -630,12 +556,12 @@
    // 查询续航统计
    searchEndurance() {
      let data = [
        ["1小时内", 0],
        ["1-2小时", 0],
        ["2-3小时", 0],
        ["3-5小时", 0],
        ["5-8小时", 0],
        ["8小时以上", 0],
        ["lt1hour", 0],
        ["hours1t2", 0],
        ["hours2t3", 0],
        ["hours3t5", 0],
        ["hours5t8", 0],
        ["gt8hours", 0],
      ];
      if (this.dataType == "xuHang" || this.dataType == 0) {
        searchXuHang()
@@ -671,12 +597,16 @@
      }
    },
    setXuHangOption(data) {
      console.log(data, '999');
      console.trace('xxx');
      enduranceOption.series[0].name = this.$t('EquipmentRoomQty');
      enduranceOption.series[0].data = data.map((item) => {
        return [item.label, item.num];
        return [this.$t(item.label), item.num];
      });
      this.$refs.endurance.setOption(enduranceOption);
    },
    setProduceOption(data) {
      produceOption.series[0].name = this.$t('BatteryBrand');
      produceOption.series[0].data = data.map((item) => {
        return {
          value: item.num,
@@ -686,21 +616,21 @@
      this.$refs.produceChart.setData(produceOption);
    },
    resize() {
      if(this.$refs.produceChart) {
      if (this.$refs.produceChart) {
        this.$refs.produceChart.resize();
      }
      if(this.$refs.useTimeChart) {
      if (this.$refs.useTimeChart) {
        this.$refs.useTimeChart.resize();
      }
      if(this.$refs.endurance) {
      if (this.$refs.endurance) {
        this.$refs.endurance.resize();
      }
    },
    startXuHang() {
      this.$confirm("确认启动续航统计", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
      this.$confirm(this.$t("Confirmtostartthebatterylifestatistics"), this.$t('Message'), {
        confirmButtonText: this.$t('operate.ok'),
        cancelButtonText: this.$t('operate.cancel'),
        type: "success",
      })
        .then(() => {
@@ -709,9 +639,9 @@
            .then((res) => {
              res = res.data;
              if (res.code && res.data) {
                this.$layer.msg("启动续航统计成功!");
                this.$message.success(this.$t('operate.successMsg'));
              } else {
                this.$layer.msg("操作失败");
                this.$message.error(this.$t('operate.failMsg'));
              }
              // 关闭等待框
              this.$layer.close(loading);
@@ -719,9 +649,10 @@
            .catch((error) => {
              // 关闭等待框
              this.$layer.close(loading);
              this.$message.error(this.$t('operate.failMsg'));
            });
        })
        .catch(() => {});
        .catch(() => { });
    },
    formatData() {
      let data = this.$options.tblData;
@@ -894,10 +825,10 @@
      if (this.tbl.selected.length == 2) {
        this.compareDischargeDialog = true;
      } else {
        this.$layer.msg("请选择两个机房");
        this.$layer.msg(this.$t('Pleaseselecttwoequipmentrooms'));
      }
    },
    init() {},
    init() { },
    /**
     * 根据时间段查询在该时间段内投入使用的电池
     */
@@ -1032,95 +963,14 @@
    this.searchEndurance();
    this.searchBattInfoByTime();
    // let xuHangNum = Number(this.$route.query.xuHang);
    // if (xuHangNum) {
    //   // 重置筛选条件
    //   this.dataType = "xuHang";
    //   this.xuHang = 0;
    //
    //   let xuHangItem = getItemByKey(xuHangNum, this.xuHangs);
    //   this.params.battProducer = xuHangItem.label;
    //   this.searchXuHangByTime(xuHangNum);
    // }
    //
    // this.$refs.useTimeChart.setOption(useTimeOption);
    // // 电池品牌统计饼状图事件监听
    // this.$G.chartManage.get("produceChart").on("click", (params) => {
    //   if (this.dataType == 0 || this.dataType == "produce") {
    //     // 重置筛选条件
    //     this.dataType = "produce";
    //     this.produce = 0;
    //
    //     this.params.battProducer = params.name;
    //     // 查询机房信息
    //     this.searchHomeByProduce(this.params);
    //   } else {
    //     this.produce = 0;
    //     this.useYear = 0;
    //     this.xuHang = 0;
    //     this.produce = params.name;
    //     this.formatData2();
    //   }
    // });
    //
    // // 电池组使用年限点击事件监听
    // let userTimeChart = this.$G.chartManage.get("useTimeChart");
    // userTimeChart.getZr().on("click", (params) => {
    //   const points = [params.offsetX, params.offsetY];
    //   if (userTimeChart.containPixel("grid", points)) {
    //     let dataIndex = userTimeChart.convertFromPixel({ seriesIndex: 0 }, [
    //       params.offsetX,
    //       params.offsetY,
    //     ])[0];
    //     let useYear = this.useYears[dataIndex];
    //     if(this.dataType == 0 || this.dataType == "useYear") {
    //       // 重置筛选条件
    //       this.dataType = "useYear";
    //       this.useYear = 0;
    //
    //       let num = dataIndex + 1;
    //       this.params.battProducer = useYear.label;
    //
    //       this.searchHomeByYear(num);
    //     }else {
    //       this.produce = 0;
    //       this.useYear = 0;
    //       this.xuHang = 0;
    //       this.useYear = useYear.value;
    //       this.formatData();
    //     }
    //   }
    // });
    //
    // 续航时长
    // let enduranceChart = this.$G.chartManage.get("endurance");
    // enduranceChart.getZr().on("click", (params) => {
    //   const points = [params.offsetX, params.offsetY];
    //   if (enduranceChart.containPixel("grid", points)) {
    //     let dataIndex = enduranceChart.convertFromPixel({ seriesIndex: 0 }, [
    //       params.offsetX,
    //       params.offsetY,
    //     ])[0];
    //     let xuHang = this.xuHangs[dataIndex];
    //     if(this.dataType == 0 || this.dataType == "xuHang") {
    //       // 重置筛选条件
    //       this.dataType = "xuHang";
    //       this.xuHang = 0;
    //
    //       let num = dataIndex + 1;
    //       this.params.battProducer = xuHang.label;
    //       this.searchXuHangByTime(num);
    //     }else {
    //       this.produce = 0;
    //       this.useYear = 0;
    //       this.xuHang = 0;
    //       this.xuHang = xuHang.value;
    //       this.formatData();
    //     }
    //   }
    // });
    this.$bus.$on('langChanged', () => {
      this.searchProduceTotalData();
      this.searchUseYear();
      this.searchEndurance();
      this.searchBattInfoByTime();
    });
    this.$nextTick(()=>{
    this.$nextTick(() => {
      this.resize();
    });
    // 重置大小
@@ -1135,17 +985,21 @@
.page-footer {
  width: 480px;
}
.page-container {
  height: 100%;
}
.page-footer {
  height: 100%;
}
.flex-layout {
  display: flex;
}
.flex-content {
  flex: 1;
  margin: 8px;
}
</style>
</style>
src/views/dataMager/threadMager.vue
@@ -8,19 +8,20 @@
        height="100%"
        :data="tblData.data"
      >
        <el-table-column type="index" label="编号" width="50"></el-table-column>
        <el-table-column type="index" :label="$t('Num')" width="50"></el-table-column>
        <el-table-column
          v-for="item in tblData.header"
          :key="item.prop"
          :prop="item.prop"
          :label="item.label"
          :label="$t(item.label)"
          :min-width="item.minWidth"
          :width="item.width"
          :resizable="false"
          show-overflow-tooltip
          align="center"
        >
        </el-table-column>
        <el-table-column fixed="right" label="操作" width="180" align="center">
        <el-table-column fixed="right" :label="$t('operate.operation')" width="230" align="center">
          <template slot-scope="scope">
            <el-popover placement="top" trigger="click">
              <div class="el-popover-content">
@@ -28,7 +29,7 @@
                  size="mini"
                  type="primary"
                  @click="handleClick(scope.row)"
                  >参数设置</el-button
                  >{{ $t('ParameterSetting') }}</el-button
                >
                <el-button
                  :disabled="scope.row.disabled"
@@ -44,7 +45,7 @@
                icon="el-icon-s-tools"
                type="primary"
                size="mini"
                >设置</el-button
                >{{ $t('Setting') }}</el-button
              >
            </el-popover>
            <div class="white-block"></div>
@@ -54,42 +55,15 @@
              size="mini"
              :disabled="scope.row.noRestart || !isCanEdit"
              @click="confirmHandler(scope.row)"
              >重启</el-button
              >{{ $t('Restart') }}</el-button
            >
            <!-- <el-button
              :disabled="!isCanEdit"
              icon="el-icon-s-tools"
              @click="handleClick(scope.row)"
              type="primary"
              size="mini"
              >设置</el-button
            >
            <el-button
              icon="el-icon-remove"
              size="mini"
              type="danger"
              v-if="scope.row.serverFlag == 1"
              :disabled="scope.row.noRestart || !isCanEdit"
              @click="confirmHandler(scope.row)"
              >禁用</el-button
            >
            <el-button
              icon="el-icon-refresh-right"
              type="success"
              v-else
              size="mini"
              :disabled="scope.row.noRestart || !isCanEdit"
              @click="confirmHandler(scope.row)"
              >启用</el-button
            > -->
          </template>
        </el-table-column>
      </el-table>
    </div>
    <!-- 线程设置 -->
    <el-dialog
      title="线程设置"
      :title="$t('ThreadSetting')"
      width="520px"
      :visible.sync="dialog"
      :close-on-click-modal="false"
@@ -109,12 +83,12 @@
          <div class="table-layout">
            <div class="table-row">
              <div class="table-cell pr16">
                <el-form-item label="线程名称" prop="note">
                <el-form-item :label="$t('ThreadName')" prop="note">
                  <el-input v-model="form.note"></el-input>
                </el-form-item>
              </div>
              <div class="table-cell">
                <el-form-item label="服务名称" prop="serverName">
                <el-form-item :label="$t('ServiceName')" prop="serverName">
                  <el-input
                    v-model="form.serverName"
                    readonly="readonly"
@@ -124,12 +98,12 @@
            </div>
            <div class="table-row">
              <div class="table-cell pr16">
                <el-form-item label="超时时间" prop="outTime">
                <el-form-item :label="$t('TimeoutDuration')" prop="outTime">
                  <el-input v-model="form.outTime"></el-input>
                </el-form-item>
              </div>
              <div class="table-cell">
                <el-form-item label="服务版本号" prop="processVersion">
                <el-form-item :label="$t('ServiceVersionNo')" prop="processVersion">
                  <el-input
                    v-model="form.processVersion"
                    readonly="readonly"
@@ -139,14 +113,14 @@
            </div>
          </div>
          <div class="form-footer">
            <three-btn @click="submitFrom">确定</three-btn>
            <three-btn @click="submitFrom">{{ $t('operate.ok') }}</three-btn>
          </div>
        </el-form>
      </div>
    </el-dialog>
    <!-- 密码校验 -->
    <el-dialog
      title="系统提示"
      :title="$t('Message')"
      width="320px"
      :visible.sync="pwdDialog"
      :close-on-click-modal="false"
@@ -166,14 +140,14 @@
          <div class="table-layout">
            <div class="table-row">
              <div class="table-cell">
                <el-form-item label="重启密码" prop="pwd">
                <el-form-item :label="$t('RestartPassword')" prop="pwd">
                  <el-input type="password" v-model="pwdFrom.pwd"></el-input>
                </el-form-item>
              </div>
            </div>
          </div>
          <div class="form-footer">
            <three-btn @click="submitPwdFrom">确定</three-btn>
            <three-btn @click="submitPwdFrom">{{ $t('operate.ok') }}</three-btn>
          </div>
        </el-form>
      </div>
@@ -187,9 +161,13 @@
import createWs from "@/assets/js/websocket";
const WSMixin = createWs("processSurvey");
import i18n from './i18n/threadMager';
import { createI18nOption } from '@/assets/js/tools/i18n';
// import i18nConstIp from '@/assets/js/i18n/const_changeIp';
const i18nMixin = createI18nOption(i18n);
export default {
  name: "threadMager",
  mixins: [WSMixin],
  mixins: [WSMixin, i18nMixin],
  data() {
    let permits = this.$store.state.user.permits;
    let isCanEdit = isHasPermit("batttest_data_edit_permit", permits);
@@ -199,47 +177,47 @@
        header: [
          {
            prop: "processId",
            label: "进程ID",
            label: "ProgressID",
            width: 120,
          },
          {
            prop: "ProcessName_CN",
            label: "线程名称",
            label: "ThreadName",
            minWidth: 158,
          },
          {
            prop: "processVersion",
            label: "服务版本号",
            label: "ServiceVersionNo",
            width: 180,
          },
          {
            prop: "serverName",
            label: "服务名称",
            label: "ServiceName",
            minWidth: 228,
          },
          {
            prop: "processTime",
            label: "运行时间",
            label: "RunningTime",
            width: 180,
          },
          {
            prop: "processStarttime",
            label: "线程启动时间",
            label: "ThreadStartTime",
            width: 180,
          },
          {
            prop: "runTimelong",
            label: "运行时长",
            label: "RunningDuration",
            width: 180,
          },
          {
            prop: "progressStatus",
            label: "线程状态",
            label: "ThreadStatus",
            width: 120,
          },
          {
            prop: "outTime",
            label: "超时时间",
            label: "TimeoutDuration",
            width: 180,
          },
        ],
@@ -265,9 +243,9 @@
        serverFlag: 0,
      },
      rules: {
        note: [{ required: true, message: "不能为空", trigger: "change" }],
        outTime: [{ required: true, message: "不能为空", trigger: "change" }],
        pwd: [{ required: true, message: "不能为空", trigger: "change" }],
        note: [{ required: true, message: this.$t('cannotbeblank'), trigger: "change" }],
        outTime: [{ required: true, message: this.$t('cannotbeblank'), trigger: "change" }],
        pwd: [{ required: true, message: this.$t('cannotbeblank'), trigger: "change" }],
      },
      timer: new Timeout("threadMager"),
    };
@@ -288,7 +266,7 @@
    },
    onWSMessage(res) {
      res = JSON.parse(res.data);
      console.log(res, "=====data");
      // console.log(res, "=====data");
      this.search(res);
    },
    search(res) {
@@ -302,7 +280,7 @@
              item.noRestart = false;
            }
            item.btnText = item.serverFlag == 2 ? "启用线程" : "禁用线程";
            item.btnText = item.serverFlag == 2 ? this.$t('ThreadEnable') : this.$t('ThreadDisable');
            item.btnType = item.serverFlag == 2 ? "success" : "danger";
            // 线程监控线程无法被禁用
@@ -334,13 +312,13 @@
      var str = "";
      switch (flag) {
        case 0:
          str = "停止";
          str = this.$t('Stop');
          break;
        case 1:
          str = "正在运行";
          str = this.$t('Running');
          break;
        case 2:
          str = "禁用";
          str = this.$t('Disable');
          break;
        default:
          str = "";
@@ -356,12 +334,13 @@
      this.dialog = true;
    },
    confirmChange(data) {
      this.$layer.confirm(
      this.$confirm(
        data.btnText + ":" + data.ProcessName_CN,
        { icon: 3 },
        (index) => {
          // 关闭面板
          this.$layer.close(index);
        this.$t('Message'),
        { icon: 3 }).then((res) => {
          if(res != 'confirm') {
            return false;
          }
          let params = {
            serverName: data.serverName,
            serverFlag: data.serverFlag == 2 ? 0 : 2,
@@ -371,13 +350,14 @@
      );
    },
    confirmHandler(data) {
      this.$layer.confirm(
        "确定重启" + data.ProcessName_CN,
        { icon: 3 },
        (index) => {
      this.$confirm(
        this.$t('Confirmtorestart') + ' ' + data.ProcessName_CN,
        this.$t('Message'),
        { icon: 3 }).then((res) => {
          if(res != 'confirm') {
            return false;
          }
          this.pwdFrom.serverName = data.serverName;
          // 关闭面板
          this.$layer.close(index);
          this.pwdDialog = true;
        }
      );
@@ -393,7 +373,7 @@
            outTime: this.form.outTime,
          });
        } else {
          this.$layer.msg("存在校验未通过的数据!");
          this.$layer.msg(this.$t('form.validateMsg'));
          return false;
        }
      });
@@ -407,10 +387,10 @@
          this.$layer.close(loading);
          res = res.data;
          if (res.code && res.data) {
            this.$layer.msg("修改成功!");
            this.$message.success(this.$t('operate.successMsg'));
            this.dialog = false;
          } else {
            this.$layer.msg("修改失败!");
            this.$message.error(this.$t('operate.failMsg'));
          }
        })
        .catch((error) => {
@@ -424,7 +404,7 @@
        if (valid) {
          this.checkPwd(this.pwdFrom.pwd);
        } else {
          this.$layer.msg("存在校验未通过的数据!");
          this.$layer.msg(this.$t('form.validateMsg'));
          return false;
        }
      });
@@ -440,7 +420,7 @@
              serverFlag: this.pwdFrom.serverFlag,
            });
          } else {
            this.$layer.msg("密码错误");
            this.$layer.msg(this.$t('WrongPassword'));
          }
          // 清空密码
          this.pwdFrom.pwd = "";
@@ -449,7 +429,7 @@
        })
        .catch((error) => {
          console.log(error);
          this.$layer.msg("网络请求失败!");
          this.$message.error(this.$t('operate.failMsg'));
        });
    },
    updateState(info) {
@@ -461,16 +441,16 @@
          this.$layer.close(loading);
          res = res.data;
          if (res.code && res.data) {
            this.$layer.msg("成功!");
            this.$message.success(this.$t('operate.successMsg'));
            this.pwdDialog = false;
          } else {
            this.$layer.msg("失败!");
            this.$message.error(this.$t('operate.failMsg'));
          }
        })
        .catch((error) => {
          // 关闭弹出框
          this.$layer.close(loading);
          this.$layer.msg("网络请求失败!");
          this.$message.error(this.$t('operate.failMsg'));
        });
    },
  },
@@ -490,4 +470,4 @@
  display: inline-block;
  width: 8px;
}
</style>
</style>
src/views/dataTest/components/comparison.vue
@@ -1,79 +1,43 @@
<template>
  <div class="comparisonWarp">
    <div class="borderCon co-option">
      <el-select
        v-model="comparison_recode_type"
        placeholder="请选择"
        @change="filterRecode(comparison_recode_type)"
        :filterable="true"
      >
        <el-option
          v-for="(item, index) in test_record.list"
          :key="index"
          :label="item.label + '(' + item.children.length + ')'"
          :value="item.value"
        ></el-option>
      <el-select v-model="comparison_recode_type" :placeholder="$t('form.selectMsg')"
        @change="filterRecode(comparison_recode_type)" :filterable="true">
        <el-option v-for="(item, index) in test_record.list" :key="index"
          :label="item.label + '(' + item.children.length + ')'" :value="item.value"></el-option>
      </el-select>
      <div class="checkboxCon">
        <el-checkbox-group v-model="checkList" :max="2" @change="checkData">
          <el-checkbox
            :label="item.label"
            v-for="(item, index) in comparison_recode_arr"
            :key="index"
            class="checkBox"
          ></el-checkbox>
          <el-checkbox :label="item.label" v-for="(item, index) in comparison_recode_arr" :key="index"
            class="checkBox"></el-checkbox>
        </el-checkbox-group>
      </div>
    </div>
    <div class="borderCon co-content">
      <el-tabs
        v-model="acTabs"
        type="border-card"
        class="flex-layout noborder"
        @tab-click="tabClick"
      >
        <el-tab-pane label="端电压折线图" name="groupVol_pop">
      <el-tabs v-model="acTabs" type="border-card" class="flex-layout noborder" @tab-click="tabClick">
        <el-tab-pane :label="$t('StringVoltLineChart')" name="groupVol_pop">
          <div class="chartCon">
            <line-chart
              ref="groupVol_pop"
              id="groupVol_pop"
              unit="V"
            ></line-chart>
            <line-chart ref="groupVol_pop" id="groupVol_pop" unit="V"></line-chart>
          </div>
        </el-tab-pane>
        <el-tab-pane label="机房单体电压" name="monBar_pop">
        <el-tab-pane :label="$t('CellVoltage')" name="monBar_pop">
          <div class="chartCon">
            <bar-chart
              ref="monBar_pop"
              id="monBar_pop"
              :show-label="false"
            ></bar-chart>
            <div
              style="
                padding: 0 10px 0 25px;
                width: 100%;
                box-sizing: border-box;
              "
            >
              <el-slider
                v-model="slider"
                size="small"
                :format-tooltip="formatTooltip"
                @input="sliderInput"
              ></el-slider>
            <bar-chart ref="monBar_pop" id="monBar_pop" :show-label="false"></bar-chart>
            <div style="
                    padding: 0 10px 0 25px;
                    width: 100%;
                    box-sizing: border-box;
                  ">
              <el-slider v-model="slider" size="small" :format-tooltip="formatTooltip" @input="sliderInput"></el-slider>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="电池电流折线图" name="groupCurr_pop">
        <el-tab-pane :label="$t('BatteryCurrentLineChart')" name="groupCurr_pop">
          <div class="chartCon">
            <line-chart
              ref="groupCurr_pop"
              id="groupCurr_pop"
              unit="A"
            ></line-chart>
            <line-chart ref="groupCurr_pop" id="groupCurr_pop" unit="A"></line-chart>
          </div>
        </el-tab-pane>
        <el-tab-pane label="单体电压趋势图" name="monInfo_pop">
        <el-tab-pane :label="$t('CellVoltageTrendChart')" name="monInfo_pop">
          <div class="chartCon">
            <line-chart ref="monInfo_pop" id="monInfo_pop"></line-chart>
          </div>
@@ -93,6 +57,9 @@
  formatSeconds,
  getBarNum,
} from "@/assets/js/tools";
import i18n from '../js/i18n/comparison';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
// 端信息
let allData = {
  groupVol: [],
@@ -118,6 +85,7 @@
    BarChart,
    LineChart,
  },
  mixins: [i18nMixin],
  data() {
    return {
      acTabs: "groupVol_pop", //tab切换active
@@ -268,7 +236,7 @@
      ];
      let arr = [
        {
          name: "组端电压",
          name: this.$t('StringVoltage'),
          xAxisIndex: this.checkNum,
          itemStyle: {
            normal: {
@@ -278,7 +246,7 @@
          data: allData.groupVol,
        },
        {
          name: "在线电压",
          name: this.$t('OnlineVoltage'),
          xAxisIndex: this.checkNum,
          itemStyle: {
            normal: {
@@ -298,7 +266,7 @@
      let color = ["#0081ff", "#df9d02", "#4ddcb4", "#4b4beb"];
      let arr = [
        {
          name: "电池电流",
          name: this.$t('BatteryCurrent'),
          xAxisIndex: this.checkNum,
          itemStyle: {
            normal: {
@@ -342,17 +310,17 @@
        let data = dataList[index];
        let batNum = getBarNum(data);
        monBarChart.title.text =
          "最大值=" +
          this.$t('Max') + "=" +
          batNum.max +
          "V;最小值=" +
          "V;" + this.$t('Min') + "=" +
          batNum.min +
          "V;平均值=" +
          "V;" + this.$t('Avg') + "=" +
          batNum.avg.toFixed(3) +
          "V";
        this.monBarTitle = monBarChart.title.text;
        let arr = [
          {
            name: "单体电压",
            name: this.$t('CellVoltage'),
            zlevel: 1,
            data: data,
          },
@@ -385,7 +353,7 @@
      groupVolLineChart = {
        title: {
          show: true,
          text: "端电压折线图",
          text: this.$t('StringVoltLineChart'),
          x: "center",
          textStyle: {
            fontSize: "14",
@@ -409,7 +377,7 @@
      currLineChart = {
        title: {
          show: true,
          text: "电池电流折线图",
          text: this.$t('BatteryCurrentLineChart'),
          x: "center",
          textStyle: {
            fontSize: "14",
@@ -433,7 +401,7 @@
      monLineChart = {
        title: {
          show: true,
          text: "单体电压",
          text: this.$t('CellVoltage'),
          x: "center",
          textStyle: {
            fontSize: "14",
@@ -457,7 +425,7 @@
      monBarChart = {
        title: {
          show: true,
          text: "最大值=0V;最小值=0V;平均值=0V",
          text: this.$t('Max') + "=0V;" + this.$t('Min') + "=0V;" + this.$t('Avg') + "=0V",
          x: "center",
          textStyle: {
            fontSize: "14",
@@ -591,4 +559,4 @@
.checkBox {
  margin-bottom: 8px;
}
</style>
</style>
src/views/dataTest/history.vue
@@ -1,81 +1,25 @@
<template>
  <flex-layout
    direction="row"
    class="page-history"
    :no-bg="true"
    :loading="loading"
  >
    <home-list
      slot="header"
      :is-history="true"
      @toggleChange="toggleChange"
      @leaf-click="leafClick"
    ></home-list>
    <content-box
      class="main-container"
      style="margin-left: 4px; margin-right: 4px"
      :title="battFullName + testInfo"
    >
  <flex-layout direction="row" class="page-history" :no-bg="true" :loading="loading">
    <home-list slot="header" :is-history="true" @toggleChange="toggleChange" @leaf-click="leafClick"></home-list>
    <content-box class="main-container" style="margin-left: 4px; margin-right: 4px" :title="battFullName + testInfo">
      <div slot="box-tools" class="box-tools">
        <el-tooltip
          class="item"
          effect="dark"
          content="实时数据"
          placement="bottom"
        >
        <el-tooltip class="item" effect="dark" :content="$t('RealtimeData')" placement="bottom">
          <i class="iconfont el-icon-jinru" @click="syncPage"></i>
        </el-tooltip>
      </div>
      <div slot="box-tools" class="box-tools" style="right: 36px">
        <el-tooltip
          class="item"
          effect="dark"
          content="数据对比"
          placement="bottom"
        >
        <el-tooltip class="item" effect="dark" :content="$t('DataComparison')" placement="bottom">
          <i class="iconfont el-icon-jiankong" @click="toShowComparison"></i>
        </el-tooltip>
      </div>
      <div slot="box-tools" class="box-tools">
        <el-tooltip
          class="item"
          effect="dark"
          content="数据导出"
          placement="bottom"
        >
          <i
            class="iconfont el-icon-daochu"
            @click="showDataDifferDialog"
            style="font-size: 24px"
          ></i>
        <el-tooltip class="item" effect="dark" :content="$t('DataExport')" placement="bottom">
          <i class="iconfont el-icon-daochu" @click="showDataDifferDialog" style="font-size: 24px"></i>
        </el-tooltip>
      </div>
      <div slot="box-tools" class="box-tools">
        <el-tooltip
          class="item"
          effect="dark"
          content="标准曲线"
          placement="bottom"
        >
          <i
            class="iconfont el-icon-biaozhunquxian"
            @click="confirmAddStandardLine"
            style="font-size: 20px"
          ></i>
        </el-tooltip>
      </div>
      <div
        slot="box-tools"
        class="box-tools"
        style="display: flex; align-items: center; width: 160px"
      >
        <label style="font-size: 12px; margin-right: 8px">显示粒度:</label>
        <el-select
          v-model="show_num"
          size="small"
          style="width: 90px"
          @change="testRecordChange"
        >
      <div slot="box-tools" class="box-tools" style="display: flex; align-items: center; width: 160px">
        <label style="font-size: 12px; margin-right: 8px">{{ $t('Granularity') }}:</label>
        <el-select v-model="show_num" size="small" style="width: 90px" @change="testRecordChange">
          <el-option :value="1" label="×1"></el-option>
          <el-option :value="2" label="×2"></el-option>
          <el-option :value="3" label="×3"></el-option>
@@ -88,7 +32,7 @@
          <el-option :value="10" label="×10"></el-option>
        </el-select>
      </div>
      <div slot="box-tools" class="box-tools" v-if="showParams">
      <!-- <div slot="box-tools" class="box-tools" v-if="showParams">
        <el-tooltip
          class="item"
          effect="dark"
@@ -101,79 +45,44 @@
            style="font-size: 20px"
          ></i>
        </el-tooltip>
      </div>
      </div> -->
      <flex-layout :no-bg="true">
        <div class="content-header" slot="header">
          <div class="table-layout">
            <div class="table-row">
              <div class="table-cell text-right w80">电池状态:</div>
              <div class="table-cell text-right w80">{{ $t('BatteryStatus') }}:</div>
              <div class="table-cell">
                <el-input
                  v-model="formateBattState"
                  placeholder=""
                  size="small"
                  :disabled="true"
                >
                <el-input v-model="formateBattState" placeholder="" size="small" :disabled="true">
                </el-input>
              </div>
              <div class="table-cell text-right w80">端电压:</div>
              <div class="table-cell text-right w80">{{ $t('StringVoltage') }}:</div>
              <div class="table-cell">
                <el-input
                  v-model="top.group"
                  placeholder=""
                  size="small"
                  :disabled="true"
                  style="min-width: 12rem"
                ></el-input>
                <el-input v-model="top.group" placeholder="" size="small" :disabled="true"
                  style="min-width: 12rem"></el-input>
              </div>
              <div class="table-cell text-right w80">电池电流:</div>
              <div class="table-cell text-right w80">{{ $t('BatteryCurrent') }}:</div>
              <div class="table-cell">
                <el-input
                  v-model="top.curr"
                  placeholder=""
                  size="small"
                  :disabled="true"
                ></el-input>
                <el-input v-model="top.curr" placeholder="" size="small" :disabled="true"></el-input>
              </div>
              <div class="table-cell text-right w80">测试时长:</div>
              <div class="table-cell text-right w80">{{ $t('TestTime') }}:</div>
              <div class="table-cell">
                <el-input
                  v-model="top.test_long"
                  placeholder=""
                  size="small"
                  :disabled="true"
                >
                <el-input v-model="top.test_long" placeholder="" size="small" :disabled="true">
                </el-input>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell text-right w80">测试日期:</div>
              <div class="table-cell text-right w80">{{ $t('TestDate') }}:</div>
              <div class="table-cell">
                <el-cascader
                  v-if="isAio"
                  v-model="test_record1.value"
                  :options="test_record1.list"
                  size="small"
                  placeholder="请选择测试日期"
                  style="width: 100%; min-width: 16rem"
                  @change="testRecordChange"
                >
                <el-cascader v-if="isAio" v-model="test_record1.value" :options="test_record1.list" size="small"
                  :placeholder="$t('form.selectDate')" style="width: 100%; min-width: 16rem" @change="testRecordChange">
                  <template slot-scope="{ node, data }">
                    <span>{{ data.label }}</span>
                    <span v-if="!node.isLeaf">
                      ({{ data.children.length }})</span
                    >
                      ({{ data.children.length }})</span>
                  </template>
                </el-cascader>
                <el-cascader
                  v-else
                  v-model="test_record.value"
                  :options="test_record.list"
                  size="small"
                  placeholder="请选择测试日期"
                  style="width: 100%; min-width: 16rem"
                  @change="testRecordChange"
                >
                <el-cascader v-else v-model="test_record.value" :options="test_record.list" size="small"
                  :placeholder="$t('form.selectDate')" style="width: 100%; min-width: 16rem" @change="testRecordChange">
                  <template slot-scope="{ node, data }">
                    <span>{{ data.label }}</span>
                    <span v-if="!node.isLeaf">
@@ -182,40 +91,21 @@
                  </template>
                </el-cascader>
              </div>
              <div class="table-cell text-right w80">测试容量:</div>
              <div class="table-cell text-right w80">{{ $t('TestCapacity') }}:</div>
              <div class="table-cell">
                <el-input
                  v-model="top.testCap"
                  placeholder=""
                  size="small"
                  :disabled="true"
                >
                <el-input v-model="top.testCap" placeholder="" size="small" :disabled="true">
                </el-input>
              </div>
              <div class="table-cell text-right w80">剩余容量:</div>
              <div class="table-cell text-right w80">{{ $t('RemainingCapacity') }}:</div>
              <div class="table-cell">
                <el-input
                  v-model="top.re_cap"
                  placeholder=""
                  size="small"
                  :disabled="true"
                ></el-input>
                <el-input v-model="top.re_cap" placeholder="" size="small" :disabled="true"></el-input>
              </div>
              <div class="table-cell text-right w80">续航时长:</div>
              <div class="table-cell text-right w80">{{ $t('BatteryLife') }}:</div>
              <div class="table-cell">
                <el-tooltip
                  class="item"
                  effect="dark"
                  content="机房停电时电池对实际负载供电时长"
                  placement="top"
                >
                  <el-input
                    v-model="top.xuhang"
                    placeholder=""
                    size="small"
                    :disabled="true"
                  >
                <el-tooltip class="item" effect="dark"
                  :content="$t('BatteryPowerSupplyDurationforActualLoadduringPowerOutage')" placement="top">
                  <el-input v-model="top.xuhang" placeholder="" size="small" :disabled="true">
                  </el-input>
                </el-tooltip>
              </div>
@@ -225,149 +115,68 @@
        <div class="page-content">
          <div class="flex-box-list">
            <div class="flex-box" style="margin-bottom: 8px">
              <chart-wrapper :title="groupVolTitle">
              <chart-wrapper :title="$t(groupVolTitle)">
                <line-chart ref="groupVol" id="groupVol" unit="V"></line-chart>
              </chart-wrapper>
            </div>
            <div class="flex-box" style="margin-bottom: 8px">
              <chart-wrapper :title="monBarTitle">
                <div class="chart-tools-wrapper">
                  <el-select
                    v-model="chartType"
                    size="mini"
                    @change="changeChartType"
                  >
                    <el-option
                      v-for="item in chartTypes"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  <el-select v-model="chartType" size="mini" @change="changeChartType">
                    <el-option v-for="item in chartTypes" :key="item.value" :label="$t(item.label)"
                      :value="item.value"></el-option>
                  </el-select>
                </div>
                <bar-chart
                  ref="monBar"
                  id="monBar"
                  :show-label="false"
                ></bar-chart>
                <bar-chart ref="monBar" id="monBar" :show-label="false"></bar-chart>
              </chart-wrapper>
            </div>
          </div>
          <div class="flex-box-list">
            <div class="flex-box" style="margin-top: 8px">
              <chart-wrapper title="电池电流折线图(A)">
                <line-chart
                  ref="groupCurr"
                  id="groupCurr"
                  unit="A"
                  start-zero
                ></line-chart>
              <chart-wrapper :title="$t('BatteryCurrentLineChart') + '(A)'">
                <line-chart ref="groupCurr" id="groupCurr" unit="A" start-zero></line-chart>
              </chart-wrapper>
            </div>
            <div class="flex-box" style="margin-top: 8px">
              <chart-wrapper :title="monInfo.title">
                <line-chart
                  ref="monInfo"
                  id="monInfo"
                  :unit="monInfo.unit"
                ></line-chart>
                <line-chart ref="monInfo" id="monInfo" :unit="monInfo.unit"></line-chart>
              </chart-wrapper>
            </div>
          </div>
        </div>
        <div class="content-footer" slot="footer">
          <div class="slider-container">
            <el-slider
              v-model="slider"
              size="small"
              :format-tooltip="formatTooltip"
              @input="sliderInput"
            >
            <el-slider v-model="slider" size="small" :format-tooltip="formatTooltip" @input="sliderInput">
            </el-slider>
          </div>
        </div>
      </flex-layout>
    </content-box>
    <el-dialog
      title="历史数据对比"
      width="1200px"
      :visible.sync="showComparison"
      v-if="showComparison"
      :close-on-click-modal="false"
      top="0"
      class="dialog-center"
      :modal-append-to-body="false"
    >
    <el-dialog :title="$t('HistoryDataComparison')" width="1200px" :visible.sync="showComparison" v-if="showComparison"
      :close-on-click-modal="false" top="0" class="dialog-center" :modal-append-to-body="false">
      <comparison :test_record="test_record"></comparison>
    </el-dialog>
    <!-- 电压/温度差 -->
    <el-dialog
      title="电压/温度差分析"
      width="auto"
      :visible.sync="dataDiffter"
      :close-on-click-modal="false"
      top="0"
      class="dialog-center"
    >
      <data-diffter
        v-if="dataDiffter"
        :visible.sync="dataDiffter"
        :vol="volDiffer"
        :temp="tempDiffer"
        @success="ensureExportExcel"
      ></data-diffter>
    <el-dialog :title="$t('VoltTempDifferenceAnalysis')" width="auto" :visible.sync="dataDiffter"
      :close-on-click-modal="false" top="0" class="dialog-center">
      <data-diffter v-if="dataDiffter" :visible.sync="dataDiffter" :vol="volDiffer" :temp="tempDiffer"
        @success="ensureExportExcel"></data-diffter>
    </el-dialog>
    <div id="allGraph">
      <div class="chart-contain">
        <div class="chart" ref="allGraph"></div>
      </div>
    </div>
    <form
      :action="exportInfo.action"
      method="post"
      ref="all_picture"
      enctype="multipart/form-data"
    >
    <form :action="exportInfo.action" method="post" ref="all_picture" enctype="multipart/form-data">
      <input type="hidden" id="exPageName" name="pageName" value="exportTbal" />
      <input
        type="hidden"
        id="stateFlag"
        ref="stateFlag"
        name="stateFlag"
        value=""
      />
      <input type="hidden" id="stateFlag" ref="stateFlag" name="stateFlag" value="" />
      <input type="hidden" name="ltop_echart" ref="ltop_echart" value="" />
      <input type="hidden" name="rtop_echart" ref="rtop_echart" value="" />
      <input
        type="hidden"
        name="lbottom_echart"
        ref="lbottom_echart"
        value=""
      />
      <input
        type="hidden"
        name="rbottom_echart"
        ref="rbottom_echart"
        value=""
      />
      <input
        type="hidden"
        name="actucap_echart"
        ref="actucap_echart"
        value=""
      />
      <input
        type="hidden"
        name="restcap_echart"
        ref="restcap_echart"
        value=""
      />
      <input
        type="hidden"
        name="capperc_echart"
        ref="capperc_echart"
        value=""
      />
      <input type="hidden" name="lbottom_echart" ref="lbottom_echart" value="" />
      <input type="hidden" name="rbottom_echart" ref="rbottom_echart" value="" />
      <input type="hidden" name="actucap_echart" ref="actucap_echart" value="" />
      <input type="hidden" name="restcap_echart" ref="restcap_echart" value="" />
      <input type="hidden" name="capperc_echart" ref="capperc_echart" value="" />
      <input type="hidden" name="tmp_echart" ref="tmp_echart" value="" />
      <!-- 单体温度折线图 -->
      <input type="hidden" name="mon_res" ref="monRes" value="" />
@@ -378,12 +187,7 @@
      <!-- 终止电压柱状图 -->
      <input type="hidden" name="last_tmp" ref="last_tmp" value="" />
      <!-- 终止温度柱状图 -->
      <input
        type="hidden"
        name="restcap_line_echart"
        ref="restcap_line_echart"
        value=""
      />
      <input type="hidden" name="restcap_line_echart" ref="restcap_line_echart" value="" />
      <!-- 剩余容量 -->
      <input type="hidden" name="group_vol_qth" ref="group_vol_qth" />
      <!--驼峰锅底-->
@@ -397,75 +201,26 @@
      <!-- 所有单体电压测试信息 -->
      <input type="hidden" name="mon-tmp-list" ref="mon_tmp_list" value="" />
      <!-- 所有单体温度测试信息 -->
      <input
        type="hidden"
        name="mon-group-list"
        ref="mon_group_list"
        value=""
      />
      <input type="hidden" name="mon-group-list" ref="mon_group_list" value="" />
      <!-- 在线电压 -->
      <!-- 电压/温度对比数据 -->
      <input type="hidden" name="splitTime" ref="splitTime" value="" />
      <input
        type="hidden"
        name="mon_vol_compare_pic"
        ref="mon_vol_compare_pic"
        value=""
      />
      <input
        type="hidden"
        name="mon_temp_compare_pic"
        ref="mon_temp_compare_pic"
        value=""
      />
      <input
        type="hidden"
        name="time-compare-list"
        ref="time_compare_list"
        value=""
      />
      <input
        type="hidden"
        name="mon-vol-compare-list"
        ref="mon_vol_compare_list"
        value=""
      />
      <input
        type="hidden"
        name="mon-tmp-compare-list"
        ref="mon_tmp_compare_list"
        value=""
      />
      <input type="hidden" name="mon_vol_compare_pic" ref="mon_vol_compare_pic" value="" />
      <input type="hidden" name="mon_temp_compare_pic" ref="mon_temp_compare_pic" value="" />
      <input type="hidden" name="time-compare-list" ref="time_compare_list" value="" />
      <input type="hidden" name="mon-vol-compare-list" ref="mon_vol_compare_list" value="" />
      <input type="hidden" name="mon-tmp-compare-list" ref="mon_tmp_compare_list" value="" />
    </form>
    <!-- 测试参数 -->
    <el-dialog
      title="测试参数"
      width="700px"
      :visible.sync="dischargeDialogShow"
      :close-on-click-modal="false"
      top="0"
      class="dialog-center"
      :modal-append-to-body="false"
    >
      <discharge-dialog-content
        v-if="!isAio && dischargeDialogShow"
        :batt="batt"
        :read-only="true"
        :param-data="paramData"
        @close="dischargeDialogShow = false"
      >
    <!-- <el-dialog title="测试参数" width="700px" :visible.sync="dischargeDialogShow" :close-on-click-modal="false" top="0"
      class="dialog-center" :modal-append-to-body="false">
      <discharge-dialog-content v-if="!isAio && dischargeDialogShow" :batt="batt" :read-only="true"
        :param-data="paramData" @close="dischargeDialogShow = false">
      </discharge-dialog-content>
      <activate-dialog-content
        v-if="isAio && dischargeDialogShow"
        type="activate"
        :batt="batt"
        :workstate="-1"
        :read-only="true"
        :param-data="paramData"
        @startok="dischargeDialogShow = false"
      ></activate-dialog-content>
    </el-dialog>
      <activate-dialog-content v-if="isAio && dischargeDialogShow" type="activate" :batt="batt" :workstate="-1"
        :read-only="true" :param-data="paramData" @startok="dischargeDialogShow = false"></activate-dialog-content>
    </el-dialog> -->
  </flex-layout>
</template>
@@ -523,6 +278,9 @@
import getMaxInfo from "@/assets/js/tools/getMaxInfo";
import DischargeDialogContent from "./components/DischargeDialogContent";
import ActivateDialogContent from "./components/activateDialogContent";
import i18n from './js/i18n/history';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
// 端信息
let allData = {
  groupVol: [],
@@ -558,6 +316,7 @@
let allGraph;
export default {
  name: "history",
  mixins: [i18nMixin],
  components: {
    DataDiffter,
    ContentBox,
@@ -573,17 +332,18 @@
    let baseURL = this.$axios.defaults.baseURL;
    baseURL = baseURL ? baseURL : "";
    return {
      // updateLang: '',
      dischargeDialogShow: false,
      paramData: undefined,
      // 测试是当天内的第几次 按类型分
      testIdx: 0,
      // 测试类型
      testType1: "未知",
      // testType1: "未知",
      // 测试日期
      testStartDate: "0000-00-00",
      HistoryData: [],
      show_num: 5,
      humpPotBottom: true, // 驼峰锅底
      humpPotBottom: false, // 驼峰锅底
      loading: false,
      isNew: true,
      showComparison: false,
@@ -592,7 +352,7 @@
      tempDiffer: [],
      data: [],
      batt: {},
      groupVolTitle: "端电压折线图(V)",
      groupVolTitle: "StringVoltLineChart",
      groupVolQth: {
        code: 0,
        low: 0,
@@ -701,35 +461,35 @@
        testType: -100,
        stopReason: "",
      },
      monBarTitle: "最大值=0V;最小值=0V;平均值=0V",
      monBarTitle: this.$t('Max') + "=0V;" + this.$t('Min') + "=0V;" + this.$t('Avg') + "=0V",
      chartType: "vol",
      chartTypes: [
        {
          label: "单体电压",
          label: "CellVoltage",
          value: "vol",
          unit: "V",
          fixed: 3,
        },
        {
          label: "单体温度",
          label: "CellTemperature",
          value: "temp",
          unit: "℃",
          fixed: 1,
        },
        {
          label: "单体实际容量",
          label: "CellActualCapacity",
          value: "realCap",
          unit: "AH",
          fixed: 0,
        },
        {
          label: "单体剩余容量",
          label: "CellRemainingCapacity",
          value: "resCap",
          unit: "AH",
          fixed: 0,
        },
        {
          label: "单体容量百分比",
          label: "CellCapacityPercentage",
          value: "preCap",
          unit: "%",
          fixed: 0,
@@ -765,8 +525,16 @@
      },
    };
  },
  watch: {
    batt(n) {
      if (n) {
        this.searchBattTestData();
      }
    },
  },
  methods: {
    changeShow() {
      this.testTimeLong = [];
      // 端信息
      allData = {
        groupVol: [],
@@ -940,17 +708,17 @@
        },
        legend: {
          show: false,
          data: ["在线电压", "组端电压"],
          data: [this.$t('OnlineVoltage'), this.$t('StringVoltage')],
          right: 0,
          orient: "vertical",
        },
        series: [
          {
            name: "在线电压",
            name: this.$t('OnlineVoltage'),
            data: [],
          },
          {
            name: "组端电压",
            name: this.$t('StringVoltage'),
            data: [],
          },
        ],
@@ -968,7 +736,7 @@
        },
        series: [
          {
            name: "电池电流",
            name: this.$t('BatteryCurrent'),
            areaStyle: {
              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                {
@@ -1005,11 +773,11 @@
      let label = chartInfo.label;
      // 单体信息柱状图
      this.monBarTitle =
        "最大值=0" + unit + ";最小值=0" + unit + ";平均值=0" + unit;
        this.$t('Max') + "=0" + unit + ";" + this.$t('Min') + "=0" + unit + ";" + this.$t('Avg') + "=0" + unit;
      monBarChart = {
        title: {
          show: false,
          text: "最大值=0" + unit + ";最小值=0" + unit + ";平均值=0" + unit,
          text: this.$t('Max') + "=0" + unit + ";" + this.$t('Min') + "=0" + unit + ";" + this.$t('Avg') + "=0" + unit,
          x: "center",
          textStyle: {
            fontSize: "14",
@@ -1043,6 +811,8 @@
    // 设置端电压折线图
    setGroupVolLineChart() {
      // 根据allData.groupVol数据设置groupVolLineChart的值
      groupVolLineChart.series[0].name = this.$t('OnlineVoltage');
      groupVolLineChart.series[1].name = this.$t('StringVoltage');
      groupVolLineChart.series[0].data = allData.onlineVol;
      groupVolLineChart.series[1].data = allData.groupVol;
      let specialPoint = getSpecialPointIndex(
@@ -1081,9 +851,9 @@
                formatter: [
                  "{a|" + allData.groupVol[specialPoint.min][0] + "}" + "{c|}",
                  "{b|锅底电压:" +
                    allData.groupVol[specialPoint.min][1] +
                    "V}" +
                    "{c|}",
                  allData.groupVol[specialPoint.min][1] +
                  "V}" +
                  "{c|}",
                ].join("\n"),
                rich: {
                  a: {},
@@ -1102,9 +872,9 @@
                formatter: [
                  "{c|}" + "{a|" + allData.groupVol[specialPoint.max][0] + "}",
                  "{c|}" +
                    "{b|驼峰电压:" +
                    allData.groupVol[specialPoint.max][1] +
                    "V}",
                  "{b|驼峰电压:" +
                  allData.groupVol[specialPoint.max][1] +
                  "V}",
                ].join("\n"),
                rich: {
                  a: {},
@@ -1119,7 +889,7 @@
          ],
        };
      } else {
        this.groupVolTitle = "端电压折线图(V)";
        this.groupVolTitle = "StringVoltLineChart";
      }
      groupVolLineChart.series[1].markLine = markLine;
      // 更新图表
@@ -1128,6 +898,7 @@
    // 设置电池电流折线图
    setCurrLineChart() {
      // 根据allData.testCurr数据设置currLineChart的值
      currLineChart.series[0].name = this.$t('BatteryCurrent');
      currLineChart.series[0].data = allData.testCurr;
      // 更新图表
      this.$refs.groupCurr.setOption(currLineChart);
@@ -1137,7 +908,7 @@
      let chartInfo = this.getChartInfo();
      // 根据monLineData的值设置monLineChart
      let dataList = monLineData.vol;
      let title = chartInfo.label + "(" + chartInfo.unit + ")";
      let title = this.$t(chartInfo.label) + "(" + chartInfo.unit + ")";
      let unit = chartInfo.unit;
      let isUpdate = true;
      switch (chartInfo.value) {
@@ -1187,17 +958,18 @@
        let batNum = getBarNum(data);
        monBarChart.title.show = false;
        monBarChart.title.text =
          "最大值=" +
          this.$t('Max') + "=" +
          batNum.max +
          unit +
          ";最小值=" +
          ";" + this.$t('Min') + "=" +
          batNum.min +
          unit +
          ";平均值=" +
          ";" + this.$t('Avg') + "=" +
          batNum.avg.toFixed(fixed) +
          unit;
        this.monBarTitle = monBarChart.title.text;
        monBarChart.series[1].name = chartInfo.label;
        monBarChart.series[0].name = this.$t('InitialValue');
        monBarChart.series[1].name = this.$t(chartInfo.label);
        monBarChart.series[1].data = data;
        monBarChart.series[0].data = dataList[0];
      } else {
@@ -1236,6 +1008,9 @@
    // 查询测试信息
    searchBattTestData() {
      let batt = this.batt;
      if (!batt || !batt.fbsdeviceId) {
        return false;
      }
      // 开启等待框
      let loading = this.$layer.loading(1);
      searchBattTestData({
@@ -1263,22 +1038,22 @@
                // 测试类型为放电
                if (item.testStarttype == 3) {
                  //  核容放电
                  item.testType1 = "核容放电";
                  // item.testType1 = "核容放电";
                  herongDischarge.push(item);
                } else {
                  // 监测放电
                  item.testType1 = "监测放电";
                  // item.testType1 = "监测放电";
                  jianceDischarge.push(item);
                }
              } else if (item.testType == 2) {
                // 测试类型为充电
                if (item.testStarttype == 3) {
                  //  核容充电
                  item.testType1 = "核容充电";
                  // item.testType1 = "核容充电";
                  herongCharge.push(item);
                } else {
                  // 监测充电
                  item.testType1 = "监测充电";
                  // item.testType1 = "监测充电";
                  jianceCharge.push(item);
                }
              }
@@ -1309,6 +1084,7 @@
              jianceCharge
            );
          }
          this.testRecordChange();
        })
        .catch((error) => {
          this.$layer.close(loading);
@@ -1354,6 +1130,10 @@
      herongCharge,
      jianceCharge
    ) {
      this.test_record.list[0].label = this.$t('CapacityCheckDischarge');
      this.test_record.list[1].label = this.$t('MonitorDischarge');
      this.test_record.list[2].label = this.$t('CapacityCheckCharge');
      this.test_record.list[3].label = this.$t('MonitorCharge');
      this.test_record.list[0].children = herongDischarge;
      this.test_record.list[1].children = jianceDischarge;
      this.test_record.list[2].children = herongCharge;
@@ -1380,7 +1160,7 @@
      // 已选择测试信息
      if (testRecord != -1) {
        if (this.isAio) {
          this.testType1 = testRecord.testType1;
          // this.testType1 = testRecord.testType1;
          this.testIdx = testRecord.testIdx;
          this.testStartDate = testRecord.testStartDate;
        }
@@ -1430,6 +1210,7 @@
      // });
      let recordTime = -1; // 记录时间
      let recordNum = -100; // 记录笔数
      // debugger;
      allData.endData = data[data.length - 1];
      data.forEach((item) => {
        let monNum = item.monNum;
@@ -1501,7 +1282,7 @@
          let avg_curr =
            batt_test_evary_record[i].testTimelong > 0
              ? (batt_test_evary_record[i].testCap * 3600) /
                batt_test_evary_record[i].testTimelong
              batt_test_evary_record[i].testTimelong
              : batt_test_evary_record[i].testCurr;
          let actionvalue = GetMonomerCap(
            batt.monCapStd,
@@ -1615,9 +1396,9 @@
      let index = this.getDataIndex(groupVol.length, this.slider);
      if (index != -1) {
        this.top.group =
          "在线:" +
          this.$t('Online') + ":" +
          onlineVol[index][1].toFixed(2) +
          "V;组端:" +
          "V;" + this.$t('String') + ":" +
          groupVol[index][1].toFixed(2) +
          "V";
        this.top.curr = testCurr[index][1].toFixed(1) + "A";
@@ -1962,11 +1743,11 @@
      let jhCurrNum = getBarNum(jhCurr);
      monBarChart.title.show = true;
      monBarChart.title.text =
        "最大值=" +
        this.$t('Max') + "=" +
        jhCurrNum.max +
        "A;最小值=" +
        "A;" + this.$t('Min') + "=" +
        jhCurrNum.min +
        "A;平局值=" +
        "A;" + this.$t('Avg') + "=" +
        jhCurrNum.avg.toFixed(0) +
        "A";
      monBarChart.title.x = "center";
@@ -1986,11 +1767,11 @@
      let endVolDataNum = getBarNum(endVolData);
      monBarChart.title.show = true;
      monBarChart.title.text =
        "最大值=" +
        this.$t('Max') + "=" +
        endVolDataNum.max +
        "V;最小值=" +
        "V;" + this.$t('Min') + "=" +
        endVolDataNum.min +
        "V;平局值=" +
        "V;" + this.$t('Avg') + "=" +
        endVolDataNum.avg.toFixed(2) +
        "V";
      monBarChart.title.x = "center";
@@ -2008,11 +1789,11 @@
      let endTempDataNum = getBarNum(endTempData);
      monBarChart.title.show = true;
      monBarChart.title.text =
        "最大值=" +
        this.$t('Max') + "=" +
        endTempDataNum.max +
        "℃;最小值=" +
        "℃;" + this.$t('Min') + "=" +
        endTempDataNum.min +
        "℃;平局值=" +
        "℃;" + this.$t('Avg') + "=" +
        endTempDataNum.avg.toFixed(0) +
        "℃";
      monBarChart.title.x = "center";
@@ -2026,7 +1807,7 @@
      });
      // 恢复name值
      monBarChart.series[0].name = "初始值";
      monBarChart.series[0].name = this.$t('InitialValue');
      lastarray.push(
        monBarData.res.map((item) => {
@@ -2333,133 +2114,55 @@
      }
    },
    // 测试参数
    getTestParam() {
      let testRecord = this.getTestRecord();
      if (testRecord == -1) {
        this.$layer.msg("请选择测试记录");
        return;
      }
      if (regEquipType(this.batt.fbsdeviceId, ["BTS9605", "BTS9611"])) {
        this.$layer.msg("暂无参数");
        return;
      }
      let params = {
        battGroupId: this.batt.battGroupId,
        testRecordCount: testRecord.testRecordCount,
      };
      getTestParam(params).then((res) => {
        res = res.data;
        if (res.code && res.data) {
          this.paramData = res.data2.list[0];
          this.dischargeDialogShow = true;
          // console.log(this.paramData, '============90909')
        } else {
          this.$layer.msg("暂无参数");
        }
      });
    },
    // 添加标准曲线
    confirmAddStandardLine() {
      // 电池信息
      let batt = this.batt;
      // 记录信息
      let testRecord = this.getTestRecord();
      if (testRecord != -1) {
        if (testRecord.testType != 3) {
          this.$layer.msg("请选择放电数据");
          return;
        }
        // let note = (
        //   testRecord.testCap /
        //   (testRecord.testTimelong / 3600)
        // ).toHold(0);
        //单体电压柱状图
        let monBarVol = monBarData.vol;
        let monBarEndVol = monBarVol[this.getDataIndex(monBarVol.length, 100)];
        let minInfo = getMinInfo(
          monBarEndVol.map((item) => {
            return item[1];
          })
        );
        let note = Math.abs(
          testRecord.testCap / (testRecord.testTimelong / 3600)
        );
        note = note ? (batt.monCapStd / note).toFixed(0) : 0;
        if (!note) {
          this.$layer.msg("数据有误,无法添加标准曲线");
          return false;
        }
        let searchParams = {
          battgroupId: batt.battGroupId,
          testRecordCount: testRecord.testRecordCount,
          monvolstd: batt.monVolStd,
          moncapstd: batt.monCapStd,
          note: Math.abs(note),
          battproducer: batt.battProducer,
          battmodel: batt.battModel,
          monNum: minInfo.key + 1,
        };
        const h = this.$createElement;
        this.$confirm(
          h("div", null, [
            h("p", null, "标称容量:" + searchParams.moncapstd + "AH"),
            h("p", null, "标称电压:" + searchParams.monvolstd + "V"),
            h("p", null, "电池品牌:" + searchParams.battproducer),
            h("p", null, "电池型号:" + searchParams.battmodel),
            h("p", null, "小时率:" + searchParams.note),
          ]),
          "添加标准曲线",
          {
            type: "null",
          }
        )
          .then(() => {
            this.addStandardLine(searchParams);
          })
          .catch(() => {});
      } else {
        this.$layer.msg("暂无放电数据,请先选择充放电数据!");
      }
    },
    addStandardLine(params) {
      // 添加标准曲线
      addStandardLine(params)
        .then((res) => {
          res = res.data;
          if (res.code) {
            this.$layer.msg("添加标准曲线成功");
          } else {
            this.$layer.msg("添加标准曲线失败");
          }
        })
        .catch((error) => {
          console.log(error);
        });
    },
    searchHistorySetting() {
      searchParam({
        categoryId: 11,
      })
        .then((res) => {
          res = res.data;
          if (res.code && res.data.list.length != 0) {
            let data = res.data.list[0];
            // 驼峰锅底
            this.humpPotBottom = !!data.status;
            // 显示粒度
            let data1 = res.data.list[1];
            this.show_num = data1.status;
          } else {
            this.humpPotBottom = false;
            this.show_num = 5;
          }
        })
        .catch((error) => {
          this.humpPotBottom = false;
          this.show_num = 5;
          console.log(error);
        });
    },
    // getTestParam() {
    //   let testRecord = this.getTestRecord();
    //   if (testRecord == -1) {
    //     this.$layer.msg("请选择测试记录");
    //     return;
    //   }
    //   if (regEquipType(this.batt.fbsdeviceId, ["BTS9605", "BTS9611"])) {
    //     this.$layer.msg("暂无参数");
    //     return;
    //   }
    //   let params = {
    //     battGroupId: this.batt.battGroupId,
    //     testRecordCount: testRecord.testRecordCount,
    //   };
    //   getTestParam(params).then((res) => {
    //     res = res.data;
    //     if (res.code && res.data) {
    //       this.paramData = res.data2.list[0];
    //       this.dischargeDialogShow = true;
    //       // console.log(this.paramData, '============90909')
    //     } else {
    //       this.$layer.msg("暂无参数");
    //     }
    //   });
    // },
    // searchHistorySetting() {
    //   searchParam({
    //     categoryId: 11,
    //   })
    //     .then((res) => {
    //       res = res.data;
    //       if (res.code && res.data.list.length != 0) {
    //         let data = res.data.list[0];
    //         // 驼峰锅底
    //         this.humpPotBottom = !!data.status;
    //         // 显示粒度
    //         let data1 = res.data.list[1];
    //         this.show_num = data1.status;
    //       } else {
    //         this.humpPotBottom = false;
    //         this.show_num = 5;
    //       }
    //     })
    //     .catch((error) => {
    //       this.humpPotBottom = false;
    //       this.show_num = 5;
    //       console.log(error);
    //     });
    // },
    activeFN() {
      this.resize();
    },
@@ -2467,13 +2170,13 @@
  computed: {
    testInfo() {
      let str = "";
      if (
        this.isAio &&
        this.testType1 != "未知" &&
        this.test_record1.value.length
      ) {
        str = `--${this.testStartDate}-第${this.testIdx}次${this.testType1}`;
      }
      // if (
      //   this.isAio &&
      //   this.testType1 != "未知" &&
      //   this.test_record1.value.length
      // ) {
      //   str = `--${this.testStartDate}-第${this.testIdx}次${this.testType1}`;
      // }
      return str;
    },
    battFullName() {
@@ -2484,11 +2187,14 @@
      return "电池组全称";
    },
    formateBattState() {
      // 当收到语言变化时要重新计算
      // this.updateLang;
      let battState = this.battState;
      // debugger;
      if (battState.testType == 3) {
        return "放电(终止原因:" + battState.stopReason + ")";
        return this.$t('DischargeStopreason') + ": " + battState.stopReason + ")";
      } else if (battState.testType == 2) {
        return "充电";
        return this.$t('Charge');
      } else {
        return "";
      }
@@ -2508,7 +2214,15 @@
    // 初始化图表
    this.initChart();
    this.searchAll_lowAction();
    this.searchHistorySetting();
    this.$bus.$on('langChanged', () => {
      this.changeChartType();
      this.searchBattTestData();
      this.changeShow();
    });
    // this.searchHistorySetting();
    // 基于准备好的dom,初始化echarts实例
    allGraph = ECharts.init(this.$refs.allGraph, "transparent");
    // this.resize();
@@ -2521,9 +2235,10 @@
</script>
<style scoped>
.main-container >>> .content-box-title {
.main-container>>>.content-box-title {
  padding-right: 15rem;
}
.page-history {
  color: #ffffff;
}
@@ -2666,4 +2381,4 @@
  width: 100%;
  height: 100%;
}
</style>
</style>
src/views/dataTest/js/i18n/comparison.js
New file
@@ -0,0 +1,28 @@
export default {
  messages: {
    CN: {
      Max: '最大值',
      Min: '最小值',
      Avg: '平均值',
      CellVoltage: '单体电压',
      StringVoltLineChart: '端电压折线图',
      BatteryCurrentLineChart: '电池电流折线图',
      BatteryCurrent: '电池电流',
      OnlineVoltage: '在线电压',
      StringVoltage: '组端电压',
      CellVoltageTrendChart: '单体电压趋势图',
    },
    US: {
      Max: 'Max',
      Min: 'Min',
      Avg: 'Avg',
      CellVoltage: 'Cell Voltage',
      StringVoltLineChart: 'String Volt Line Chart',
      BatteryCurrentLineChart: 'Battery Current Line Chart',
      BatteryCurrent: 'Battery Current',
      OnlineVoltage: 'Online Voltage',
      StringVoltage: 'String Voltage',
      CellVoltageTrendChart: 'Cell Voltage Trend Chart',
    }
  }
}
src/views/dataTest/js/i18n/history.js
New file
@@ -0,0 +1,102 @@
export default {
  messages: {
    CN: {
      RealtimeData: '实时数据',
      DataComparison: '数据对比',
      DataExport: '数据导出',
      Granularity: '显示粒度',
      BatteryStatus: '电池状态',
      StringVoltage: '端电压',
      BatteryCurrent: '电池电流',
      TestTime: '测试时长',
      TestDate: '测试日期',
      TestCapacity: '测试容量',
      RemainingCapacity: '剩余容量',
      BatteryLife: '续航时长',
      BatteryPowerSupplyDurationforActualLoadduringPowerOutage: '机房停电时电池对实际负载供电时长',
      BatteryCurrentLineChart: '电池电流折线图',
      HistoryDataComparison: '历史数据对比',
      VoltTempDifferenceAnalysis: '电压/温度差分析',
      Unkown: '未知',
      StringVoltLineChart: '端电压折线图(V)',
      Normal: '正常',
      CapacityCheckDischarge: '核容放电',
      MonitorDischarge: '监测放电',
      CapacityCheckCharge: '核容充电',
      MonitorCharge: '监测充电',
      BatteryGroup: '电池组',
      Max: '最大值',
      Min: '最小值',
      Avg: '平均值',
      CellVoltage: '单体电压',
      CellTemperature: '单体温度',
      CellActualCapacity: '单体实际容量',
      CellRemainingCapacity: '单体剩余容量',
      CellCapacityPercentage: '单体容量百分比',
      OnlineVoltage: '在线电压',
      StringVoltage: '组端电压',
      InitialValue: '初始值',
      Notobtainthedischargeandchargerecord: '未获取到充放电记录',
      Online: '在线',
      String: '组端',
      NodataexportPleaseselectdischargeandchargedatafirst: '暂无数据导出,请先选择充放电数据',
      CellResistance: '单体内阻',
      CellBalanceCurrent: '单体均衡电流',
      EndCellVoltage: '终止单体电压',
      EndCellTemp: '终止单体温度',
      Pleaseselectthetestrecord: '请选择测试记录',
      BatteryGroupFullName: '电池组全称',
      DischargeStopreason: '放电(终止原因',
      Charge: '充电',
    },
    US: {
      RealtimeData: 'Real-time Data',
      DataComparison: 'Data Comparison',
      DataExport: 'Data Export',
      Granularity: 'Granularity',
      BatteryStatus: 'Battery Status',
      StringVoltage: 'String Voltage',
      BatteryCurrent: 'Battery Current',
      TestTime: 'Test Time',
      TestDate: 'Test Date',
      TestCapacity: 'Test Capacity',
      RemainingCapacity: 'Remaining Capacity',
      BatteryLife: 'Battery Life',
      BatteryPowerSupplyDurationforActualLoadduringPowerOutage: 'Battery Power Supply Duration for Actual Load during Power Outage',
      BatteryCurrentLineChart: 'Battery Current Line Chart',
      HistoryDataComparison: 'History Data Comparison',
      VoltTempDifferenceAnalysis: 'Volt/Temp Difference Analysis',
      Unkown: 'Unkown',
      StringVoltLineChart: 'String Volt Line Chart (V)',
      Normal: 'Normal',
      CapacityCheckDischarge: 'Capacity Check Discharge',
      MonitorDischarge: 'Monitor Discharge',
      CapacityCheckCharge: 'Capacity Check Charge',
      MonitorCharge: 'Monitor Charge',
      BatteryGroup: 'Battery Group',
      Max: 'Max',
      Min: 'Min',
      Avg: 'Avg',
      CellVoltage: 'Cell Voltage',
      CellTemperature: 'Cell Temperature',
      CellActualCapacity: 'Cell Actual Capacity',
      CellRemainingCapacity: 'Cell Remaining Capacity',
      CellCapacityPercentage: 'Cell Capacity Percentage',
      OnlineVoltage: 'Online Voltage',
      StringVoltage: 'String Voltage',
      InitialValue: 'Initial Value',
      Notobtainthedischargeandchargerecord: 'Not obtain the discharge and charge record.',
      Online: 'Online',
      String: 'String',
      NodataexportPleaseselectdischargeandchargedatafirst: 'No data export. Please select discharge and charge data first!',
      CellResistance: 'Cell Resistance',
      CellBalanceCurrent: 'Cell Balance Current',
      EndCellVoltage: 'End Cell Voltage',
      EndCellTemp: 'End Cell Temp',
      Pleaseselectthetestrecord: 'Please select the test record.',
      BatteryGroupFullName: 'Battery Group Full Name',
      DischargeStopreason: 'Discharge (Stop reason',
      Charge: 'Charge',
    }
  }
}
src/views/pageSetting/components/menuSetting.vue
@@ -26,6 +26,9 @@
import getPageMenu from "@/assets/js/tools/getPageMenu";
import PageNav from "@/layout/components/Sidebar/PageNav";
import { getPageMenuApi, updatePageMenuApi } from "@/views/pageSetting/js/api";
import i18n from './i18n/realTime';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
export default {
  name: "menuSetting",
  components: {
src/views/pageSetting/i18n/menuSetting.js
New file
@@ -0,0 +1,32 @@
export default {
  messages: {
    CN: {
      SystemConfiguration: '系统配置',
      NavigationConfiguration: '导航配置',
      StatusInformation: '状态信息',
      Nostatusinformationadded: '未添加状态信息',
      Addedstatusinformation: '已添加状态信息',
      Remove: '移除',
      Add: '添加',
      RemoteManagement: '远程管理',
      NoFunctionAdded: '未添加功能',
      AddedFunction: '已添加功能',
      TabConfig: '标签配置',
      PlatformName: '平台名称',
    },
    US: {
      SystemConfiguration: 'System Configuration',
      NavigationConfiguration: 'Navigation Configuration',
      StatusInformation: 'Status Information',
      Nostatusinformationadded: 'No status information added',
      Addedstatusinformation: 'Added status information',
      Remove: 'Remove',
      Add: 'Add',
      RemoteManagement: 'Remote Management',
      NoFunctionAdded: 'No Function Added',
      AddedFunction: 'Added Function',
      TabConfig: 'Tab Config',
      PlatformName: 'Platform Name',
    }
  }
}
src/views/pageSetting/i18n/realTime.js
New file
@@ -0,0 +1,32 @@
export default {
  messages: {
    CN: {
      SystemConfiguration: '系统配置',
      NavigationConfiguration: '导航配置',
      StatusInformation: '状态信息',
      Nostatusinformationadded: '未添加状态信息',
      Addedstatusinformation: '已添加状态信息',
      Remove: '移除',
      Add: '添加',
      RemoteManagement: '远程管理',
      NoFunctionAdded: '未添加功能',
      AddedFunction: '已添加功能',
      TabConfig: '标签配置',
      PlatformName: '平台名称',
    },
    US: {
      SystemConfiguration: 'System Configuration',
      NavigationConfiguration: 'Navigation Configuration',
      StatusInformation: 'Status Information',
      Nostatusinformationadded: 'No status information added',
      Addedstatusinformation: 'Added status information',
      Remove: 'Remove',
      Add: 'Add',
      RemoteManagement: 'Remote Management',
      NoFunctionAdded: 'No Function Added',
      AddedFunction: 'Added Function',
      TabConfig: 'Tab Config',
      PlatformName: 'Platform Name',
    }
  }
}
src/views/pageSetting/realTime.vue
@@ -1,11 +1,11 @@
<template>
  <content-box class="page-root" title="系统配置">
  <content-box class="page-root" :title="$t('SystemConfiguration')">
    <el-tabs tab-position="left" style="height: 100%">
      <el-tab-pane label="导航配置" v-if="isSystemAdmin">
      <el-tab-pane :label="$t('NavigationConfiguration')" v-if="isSystemAdmin">
        <menu-setting></menu-setting>
      </el-tab-pane>
      <el-tab-pane
        label="状态信息"
        :label="$t('StatusInformation')"
        class="el-transfer-container"
        v-if="isSystemAdmin"
      >
@@ -13,15 +13,15 @@
          v-model="status.value"
          filterable
          :props="status.props"
          :titles="['未添加状态信息', '已添加状态信息']"
          :button-texts="['移除', '添加']"
          :titles="[$t('Nostatusinformationadded'), $t('Addedstatusinformation')]"
          :button-texts="[$t('Remove'), $t('Add')]"
          :data="status.data"
          class="transfer-width320"
          @change="handlerChange"
        ></el-transfer>
      </el-tab-pane>
      <el-tab-pane
        label="远程管理"
        :label="$t('RemoteManagement')"
        class="el-transfer-container"
        v-if="isSystemAdmin"
      >
@@ -29,31 +29,25 @@
          v-model="control.value"
          filterable
          :props="control.props"
          :titles="['未添加功能', '已添加功能']"
          :button-texts="['移除', '添加']"
          :titles="[$t('NoFunctionAdded'), $t('AddedFunction')]"
          :button-texts="[$t('Remove'), $t('Add')]"
          :data="control.data"
          class="transfer-width320"
          @change="handlerChange"
        ></el-transfer>
      </el-tab-pane>
      <el-tab-pane label="标签配置" class="el-transfer-container">
      <el-tab-pane :label="$t('TabConfig')" class="el-transfer-container">
        <tabs-config></tabs-config>
      </el-tab-pane>
      <el-tab-pane label="平台名称" v-if="isSystemAdmin">
      <el-tab-pane :label="$t('PlatformName')" v-if="isSystemAdmin">
        <platform-name></platform-name>
      </el-tab-pane>
      <el-tab-pane label="扫描策略" v-if="isSystemAdmin">
      <!-- <el-tab-pane label="扫描策略" v-if="isSystemAdmin">
        <scan-strategy></scan-strategy>
      </el-tab-pane>
      <el-tab-pane label="限制/锁定" v-if="isSystemAdmin">
        <limit-lock></limit-lock>
      </el-tab-pane>
      <!-- <el-tab-pane label="访问时间限制" v-if="isSystemAdmin">
                <time-limit></time-limit>
            </el-tab-pane>
            <el-tab-pane label="IP白名单" v-if="isSystemAdmin">
                <ip-limit></ip-limit>
            </el-tab-pane>-->
      <el-tab-pane label="导航配置审批" v-if="isSystemAdmin">
        <menu-approve></menu-approve>
      </el-tab-pane>
@@ -68,7 +62,7 @@
      </el-tab-pane>
      <el-tab-pane label="三方接口验证码" v-if="isSystemAdmin">
        <three-interface-manage></three-interface-manage>
      </el-tab-pane>
      </el-tab-pane> -->
    </el-tabs>
  </content-box>
</template>
@@ -92,9 +86,12 @@
} from "@/views/pageSetting/js/api";
import ThreeInterfaceManage from "@/views/pageSetting/components/threeInterfaceManage";
import {isHasPermit} from "@/assets/js/tools";
import i18n from './i18n/realTime';
import { createI18nOption } from '@/assets/js/tools/i18n';
const i18nMixin = createI18nOption(i18n);
export default {
  name: "realTimeSetting",
  mixins: [i18nMixin],
  components: {
    ThreeInterfaceManage,
    HistorySetting,
@@ -298,4 +295,7 @@
  padding-top: 8px;
  padding-bottom: 8px;
}
</style>
/deep/ .el-transfer .el-transfer__buttons {
  width: 5.2rem;
}
</style>