| | |
| | | 'icon-tuichuquanping': fullScreen, |
| | | }, |
| | | ]" |
| | | :title="fullScreen ? '还原' : '全屏'" |
| | | :title="fullScreen ? $t('Restore') : $t('FullScreen')" |
| | | @click="toggleScreen(item)" |
| | | ></div> |
| | | <div |
| | | class="btn iconfont icon-guanbi" |
| | | title="关闭" |
| | | :title="$t('operate.close')" |
| | | @click="closeItem(item)" |
| | | ></div> |
| | | </div> |
| | |
| | | 'icon-tuichuquanping': fullScreen, |
| | | }, |
| | | ]" |
| | | :title="fullScreen ? '还原' : '全屏'" |
| | | :title="fullScreen ? $t('Restore') : $t('FullScreen')" |
| | | @click="toggleScreen(item)" |
| | | ></div> |
| | | <div |
| | | class="btn iconfont icon-guanbi" |
| | | title="关闭" |
| | | :title="$t('operate.close')" |
| | | @click="closeItem(item)" |
| | | ></div> |
| | | </div> |
| | |
| | | import { comparedList, testCompareReport } from "@/apis"; |
| | | import { mapGetters } from "vuex"; |
| | | import { toFixed } from "@/assets/js/util"; |
| | | import i18n from './i18n/compare'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | |
| | | const i18nMixin = createI18nOption(i18n); |
| | | |
| | | // 保留三位小数 |
| | | const BIT = 3; |
| | | |
| | | export default { |
| | | name: "", |
| | | |
| | | mixins: [i18nMixin], |
| | | data() { |
| | | const titles = { |
| | | resChart: "内阻(mΩ)", |
| | | volChart: "电压(V)", |
| | | resTable: "数据表(内阻/mΩ)", |
| | | volTable: "数据表(电压/V)", |
| | | resChart: this.$t("Resistance") + "(mΩ)", |
| | | volChart: this.$t("Voltage") + "(V)", |
| | | resTable: this.$t("DataSheet") + "(" + this.$t("Resistance") + "/mΩ)", |
| | | volTable: this.$t("DataSheet") + "(" + this.$t("Voltage") + "/V)", |
| | | }; |
| | | const marks = { |
| | | resChart: [ |
| | | { |
| | | name: "内阻告警", |
| | | name: this.$t("ResistanceAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "内阻更换", |
| | | name: this.$t("ResistanceFail"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | |
| | | ], |
| | | volChart: [ |
| | | { |
| | | name: "高压告警", |
| | | name: this.$t("HighvoltageAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | | }, |
| | | { |
| | | name: "低压告警", |
| | | name: this.$t("LowvoltageAlarm"), |
| | | y: 0, |
| | | type: "low", |
| | | color: "#ff0", |
| | |
| | | if (!this.marks.volChart.length) { |
| | | this.marks.volChart = [ |
| | | { |
| | | name: "高压告警", |
| | | name: this.$t("HighvoltageAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | | }, |
| | | { |
| | | name: "低压告警", |
| | | name: this.$t("LowvoltageAlarm"), |
| | | y: 0, |
| | | type: "low", |
| | | color: "#ff0", |
| | |
| | | this.initChart(); |
| | | }); |
| | | } else { |
| | | this.$message.error("文件解析失败"); |
| | | this.$message.error(this.$t("FileParsingFailed")); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | resTableData.push( |
| | | { name: time1, balanceRate: resBalanceRate[0] }, |
| | | { name: time2, balanceRate: resBalanceRate[1] }, |
| | | { name: "变化率", balanceRate: resChangeRate.pop() } |
| | | { name: this.$t("ChangeRate"), balanceRate: resChangeRate.pop() } |
| | | ); |
| | | volTableData.push( |
| | | { name: time1, balanceRate: volBalanceRate[0] }, |
| | | { name: time2, balanceRate: volBalanceRate[1] }, |
| | | { name: "变化率", balanceRate: volChangeRate.pop() } |
| | | { name: this.$t("ChangeRate"), balanceRate: volChangeRate.pop() } |
| | | ); |
| | | headers.push({ |
| | | prop: "name", |
| | | label: "数据", |
| | | label: this.$t("Data"), |
| | | minWidth: 180, |
| | | fixed: "left", |
| | | }); |
| | |
| | | this.toggleScreen(item); |
| | | } |
| | | if (this.windowList.length <= 1) { |
| | | this.$message.warning("最少保留一个模块"); |
| | | this.$message.warning(this.$t("Keepatleastonemodule")); |
| | | return; |
| | | } |
| | | const idx = this.windowList.indexOf(item); |
| | |
| | | const matchRes = /filename=(.*)/.exec(headers["content-disposition"]); |
| | | const fileName = matchRes |
| | | ? decodeURI(matchRes[1].trim()) |
| | | : "未知文件名.xls"; |
| | | : this.$t("UnknownFileName") + ".xls"; |
| | | let link = document.createElement("a"); |
| | | link.style.display = "none"; |
| | | link.href = url; |
| | |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | } else { |
| | | this.$message.error("操作失败"); |
| | | this.$message.error(this.$t('OperationFailed')); |
| | | } |
| | | }); |
| | | }, |