| | |
| | | '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> |
| | |
| | | ></chart-context-menu> |
| | | <!-- 文件属性 --> |
| | | <el-dialog |
| | | title="属性" |
| | | :title="$t('result.Properties')" |
| | | class="file-info" |
| | | :visible.sync="fileInfoVisible" |
| | | append-to-body |
| | |
| | | updateFileParam, |
| | | } from "@/apis"; |
| | | import { toFixed } from "@/assets/js/util"; |
| | | |
| | | import i18n from "./i18n/compare"; |
| | | import { createI18nOption } from "@/assets/js/tools/i18n"; |
| | | import xmlResult from "./i18n/xmlResult"; |
| | | |
| | | const i18nMixin = createI18nOption(i18n, [[xmlResult, "result"]]); |
| | | |
| | | // 保留三位小数 |
| | | const BIT = 3; |
| | | |
| | | export default { |
| | | name: "", |
| | | |
| | | mixins: [i18nMixin], |
| | | data() { |
| | | const titles = { |
| | | resVisiable: "内阻(mΩ)", |
| | | volVisiable: "电压(V)", |
| | | capVisiable: "容量(Ah)", |
| | | chainVisiable: "连接条(uΩ)", |
| | | condVisiable: "电导(S)", |
| | | tableVisiable: "数据表格", |
| | | resVisiable: this.$t("Resistance") + "(mΩ)", |
| | | volVisiable: this.$t("Voltage") + "(V)", |
| | | capVisiable: this.$t("result.Capacity") + "(Ah)", |
| | | chainVisiable: this.$t("result.ConnectionBar") + "(uΩ)", |
| | | condVisiable: this.$t("result.Conductance") + "(S)", |
| | | tableVisiable: this.$t("result.DataSheet"), |
| | | }; |
| | | const marks = { |
| | | resVisiable: [ |
| | | { |
| | | name: "内阻告警", |
| | | name: this.$t("ResistanceAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "内阻更换", |
| | | name: this.$t("ResistanceFail"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | | }, |
| | | { |
| | | name: "平均值", |
| | | name: this.$t("result.average"), |
| | | y: 0, |
| | | type: "agv", |
| | | color: "#0f0", |
| | |
| | | ], |
| | | volVisiable: [ |
| | | { |
| | | name: "高压告警", |
| | | name: this.$t("HighvoltageAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | | }, |
| | | { |
| | | name: "低压告警", |
| | | name: this.$t("LowvoltageAlarm"), |
| | | y: 0, |
| | | type: "low", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "平均值", |
| | | name: this.$t("result.average"), |
| | | y: 0, |
| | | type: "agv", |
| | | color: "#0f0", |
| | |
| | | ], |
| | | chainVisiable: [ |
| | | { |
| | | name: "连接条告警", |
| | | name: this.$t("result.ConnectionBarAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "连接条更换", |
| | | name: this.$t("result.ConnectionBarFail"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | | }, |
| | | { |
| | | name: "平均值", |
| | | name: this.$t("result.average"), |
| | | y: 0, |
| | | type: "agv", |
| | | color: "#0f0", |
| | |
| | | // stdDevCr: "", |
| | | resPic: "", |
| | | volPic: "", |
| | | chainPic: '', |
| | | condPic: '', |
| | | chainPic: "", |
| | | condPic: "", |
| | | fileParam: undefined, |
| | | stationInfo: undefined, |
| | | marks, |
| | |
| | | headers: [ |
| | | { |
| | | prop: "monNum", |
| | | label: "电池", |
| | | label: this.$t("result.Battery"), |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | prop: "bv", |
| | | label: "电压(V)", |
| | | label: this.$t("Voltage") + "(V)", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | prop: "estimatedCap", |
| | | label: "预估容量(Ah)", |
| | | label: this.$t("result.estimatedCapacity") + "(Ah)", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | prop: "br", |
| | | label: "内阻(mΩ)", |
| | | label: this.$t("Resistance") + "(mΩ)", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | prop: "cr", |
| | | label: "连接条(μΩ)", |
| | | label: this.$t("result.ConnectionBar") + "(μΩ)", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: "bs", |
| | | label: "电导(S)", |
| | | label: this.$t("result.Conductance") + "(S)", |
| | | minWidth: 100, |
| | | }, |
| | | ], |
| | |
| | | condData.push(v.bs); |
| | | // capData.push() TODO |
| | | chainData.push(v.cr); |
| | | tableData.push({ ...v, estimatedCap: toFixed(v.estimatedCap, 1), monNum: "#" + v.monNum }); |
| | | tableData.push({ |
| | | ...v, |
| | | estimatedCap: toFixed(v.estimatedCap, 1), |
| | | monNum: "#" + v.monNum, |
| | | }); |
| | | }); |
| | | return { |
| | | xLabel, |
| | |
| | | if (!this.marks.volVisiable.length) { |
| | | this.marks.volVisiable = [ |
| | | { |
| | | name: "高压告警", |
| | | name: this.$t("HighvoltageAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | | }, |
| | | { |
| | | name: "低压告警", |
| | | name: this.$t("LowvoltageAlarm"), |
| | | y: 0, |
| | | type: "low", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "平均值", |
| | | name: this.$t('result.average'), |
| | | y: 0, |
| | | type: "agv", |
| | | color: "#0f0", |
| | |
| | | default: |
| | | this.marks.volVisiable = [ |
| | | { |
| | | name: "平均值", |
| | | name: this.$t('result.average'), |
| | | y: 0, |
| | | type: "agv", |
| | | color: "#0f0", |
| | |
| | | this.initChart(); |
| | | }); |
| | | } else { |
| | | this.$message.error("查询数据失败"); |
| | | this.$message.error(this.$t('result.Dataqueryfailure')); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | if (!this.marks.volVisiable.length) { |
| | | this.marks.volVisiable = [ |
| | | { |
| | | name: "高压告警", |
| | | name: this.$t("HighvoltageAlarm"), |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | | }, |
| | | { |
| | | name: "低压告警", |
| | | name: this.$t("LowvoltageAlarm"), |
| | | y: 0, |
| | | type: "low", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "平均值", |
| | | name: this.$t('result.average'), |
| | | y: 0, |
| | | type: "agv", |
| | | color: "#0f0", |
| | |
| | | default: |
| | | this.marks.volVisiable = [ |
| | | { |
| | | name: "平均值", |
| | | name: this.$t('result.average'), |
| | | y: 0, |
| | | type: "agv", |
| | | color: "#0f0", |
| | |
| | | this.initChart(); |
| | | }); |
| | | } else { |
| | | this.$message.error("文件解析失败"); |
| | | this.$message.error(this.$t("FileParsingFailed")); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.toggleScreen(item); |
| | | } |
| | | if (this.windowList.length <= 1) { |
| | | this.$message.warning("最少保留一个模块"); |
| | | this.$message.warning(this.$t("Keepatleastonemodule")); |
| | | return; |
| | | } |
| | | const idx = this.windowList.indexOf(item); |
| | |
| | | updateFileParam(this.stationId, data).then((res) => { |
| | | const { code, data } = res.data; |
| | | if (code && data) { |
| | | this.$message.success("修改成功"); |
| | | this.$message.success(this.$t('result.ModifySuccessfully')); |
| | | this.refreshPage(); |
| | | this.fileInfoVisible = false; |
| | | } else { |
| | | this.$message.error("修改失败"); |
| | | this.$message.error(this.$t('result.ModifyFailed')); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.fileData = data2.fileParam; |
| | | this.fileInfoVisible = true; |
| | | } else { |
| | | this.$message.error("读取文件失败"); |
| | | this.$message.error(this.$t('result.Failedtoreadthefile')); |
| | | } |
| | | }); |
| | | return false; |
| | |
| | | this.fileData = data2; |
| | | this.fileInfoVisible = true; |
| | | } else { |
| | | this.$message.error("获取参数失败"); |
| | | this.$message.error(this.$t('result.Parameterreadfailure')); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | 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"; |
| | |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | } else { |
| | | this.$message.error("操作失败"); |
| | | this.$message.error(this.$t("OperationFailed")); |
| | | } |
| | | }); |
| | | }, |