| | |
| | | :show-close="false" |
| | | width="800px" |
| | | > |
| | | <file-info v-if="fileInfoVisible" :info="fileData" @ok="editOk" @quit="quit"></file-info> |
| | | <file-info |
| | | v-if="fileInfoVisible" |
| | | :info="fileData" |
| | | @ok="editOk" |
| | | @quit="quit" |
| | | ></file-info> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import ChartContextMenu from "@/components/chartContextMenu"; |
| | | import offset from "@/assets/js/offset"; |
| | | import { mapGetters } from "vuex"; |
| | | import { Loading } from 'element-ui'; |
| | | import { Loading } from "element-ui"; |
| | | import { |
| | | getXmlValue, |
| | | testReport, |
| | |
| | | ], |
| | | chainVisiable: [ |
| | | { |
| | | name: "连接条", |
| | | name: "连接条告警", |
| | | y: 0, |
| | | type: "high", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "连接条更换", |
| | | y: 0, |
| | | type: "high", |
| | | color: "#d9001b", |
| | |
| | | let fileParam = data.fileParam; |
| | | |
| | | const { |
| | | chainResChange, |
| | | chainResCoeK5, |
| | | resBadCoeK4, |
| | | resGoodCoeK3, |
| | | vol1d2HighCoeK2, |
| | | vol1d2LowCoeK1, |
| | | vol2HighCoeK2, |
| | | vol2LowCoeK1, |
| | | vol6HighCoeK2, |
| | | vol6LowCoeK1, |
| | | vol12HighCoeK2, |
| | | vol12LowCoeK1, |
| | | } = this.params; |
| | | |
| | | this.marks.resVisiable[0].y = toFixed( |
| | | resGoodCoeK3 * fileParam.battRes / 100, |
| | | (resGoodCoeK3 * fileParam.battRes) / 100, |
| | | BIT |
| | | ); |
| | | this.marks.resVisiable[1].y = toFixed( |
| | | resBadCoeK4 * fileParam.battRes / 100, |
| | | (resBadCoeK4 * fileParam.battRes) / 100, |
| | | BIT |
| | | ); |
| | | if (2 == fileParam.battVol) { |
| | | this.marks.volVisiable[0].y = toFixed( |
| | | vol2HighCoeK2, |
| | | BIT |
| | | ); |
| | | this.marks.volVisiable[1].y = toFixed( |
| | | vol2LowCoeK1, |
| | | BIT |
| | | ); |
| | | } else if (12 == fileParam.battVol) { |
| | | this.marks.volVisiable[0].y = toFixed( |
| | | vol12HighCoeK2, |
| | | BIT |
| | | ); |
| | | this.marks.volVisiable[1].y = toFixed( |
| | | vol12LowCoeK1, |
| | | BIT |
| | | ); |
| | | } else { |
| | | this.marks.volVisiable = []; |
| | | if (!this.marks.volVisiable.length) { |
| | | this.marks.volVisiable = [ |
| | | { |
| | | name: "高压告警", |
| | | y: 0, |
| | | type: "high", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "低压告警", |
| | | y: 0, |
| | | type: "low", |
| | | color: "#d9001b", |
| | | }, |
| | | ]; |
| | | } |
| | | switch(fileParam.battVol) { |
| | | case 1.2: |
| | | this.marks.volVisiable[0].y = toFixed(vol1d2HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol1d2LowCoeK1, BIT); |
| | | break; |
| | | case 2: |
| | | this.marks.volVisiable[0].y = toFixed(vol2HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol2LowCoeK1, BIT); |
| | | break; |
| | | case 6: |
| | | this.marks.volVisiable[0].y = toFixed(vol6HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol6LowCoeK1, BIT); |
| | | break; |
| | | case 12: |
| | | this.marks.volVisiable[0].y = toFixed(vol12HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol12LowCoeK1, BIT); |
| | | break; |
| | | default: |
| | | this.marks.volVisiable = []; |
| | | break; |
| | | } |
| | | |
| | | this.marks.chainVisiable[0].y = toFixed( |
| | | chainResCoeK5 * fileParam.chainRes / 100, |
| | | (chainResCoeK5 * fileParam.chainRes) / 100, |
| | | BIT |
| | | ); |
| | | this.marks.chainVisiable[1].y = toFixed( |
| | | (chainResChange * fileParam.chainRes) / 100, |
| | | BIT |
| | | ); |
| | | |
| | |
| | | let fileParam = this.fileData; |
| | | |
| | | const { |
| | | chainResChange, |
| | | chainResCoeK5, |
| | | resBadCoeK4, |
| | | resGoodCoeK3, |
| | | vol1d2HighCoeK2, |
| | | vol1d2LowCoeK1, |
| | | vol2HighCoeK2, |
| | | vol2LowCoeK1, |
| | | vol6HighCoeK2, |
| | | vol6LowCoeK1, |
| | | vol12HighCoeK2, |
| | | vol12LowCoeK1, |
| | | } = this.params; |
| | | |
| | | this.marks.resVisiable[0].y = toFixed( |
| | | resGoodCoeK3 * fileParam.battRes / 100, |
| | | (resGoodCoeK3 * fileParam.battRes) / 100, |
| | | BIT |
| | | ); |
| | | this.marks.resVisiable[1].y = toFixed( |
| | | resBadCoeK4 * fileParam.battRes / 100, |
| | | (resBadCoeK4 * fileParam.battRes) / 100, |
| | | BIT |
| | | ); |
| | | if (2 == fileParam.battVol) { |
| | | this.marks.volVisiable[0].y = toFixed( |
| | | vol2HighCoeK2, |
| | | BIT |
| | | ); |
| | | this.marks.volVisiable[1].y = toFixed( |
| | | vol2LowCoeK1, |
| | | BIT |
| | | ); |
| | | } else if (12 == fileParam.battVol) { |
| | | this.marks.volVisiable[0].y = toFixed( |
| | | vol12HighCoeK2, |
| | | BIT |
| | | ); |
| | | this.marks.volVisiable[1].y = toFixed( |
| | | vol12LowCoeK1, |
| | | BIT |
| | | ); |
| | | } else { |
| | | this.marks.volVisiable = []; |
| | | switch(fileParam.battVol) { |
| | | case 1.2: |
| | | this.marks.volVisiable[0].y = toFixed(vol1d2HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol1d2LowCoeK1, BIT); |
| | | break; |
| | | case 2: |
| | | this.marks.volVisiable[0].y = toFixed(vol2HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol2LowCoeK1, BIT); |
| | | break; |
| | | case 6: |
| | | this.marks.volVisiable[0].y = toFixed(vol6HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol6LowCoeK1, BIT); |
| | | break; |
| | | case 12: |
| | | this.marks.volVisiable[0].y = toFixed(vol12HighCoeK2, BIT); |
| | | this.marks.volVisiable[1].y = toFixed(vol12LowCoeK1, BIT); |
| | | break; |
| | | default: |
| | | this.marks.volVisiable = []; |
| | | break; |
| | | } |
| | | |
| | | this.marks.chainVisiable[0].y = toFixed( |
| | | chainResCoeK5 * fileParam.chainRes / 100, |
| | | (chainResCoeK5 * fileParam.chainRes) / 100, |
| | | BIT |
| | | ); |
| | | this.marks.chainVisiable[1].y = toFixed( |
| | | (chainResChange * fileParam.chainRes) / 100, |
| | | BIT |
| | | ); |
| | | |
| | |
| | | const fileName = matchRes |
| | | ? decodeURI(matchRes[1].trim()) |
| | | : "未知文件名.xls"; |
| | | |
| | | |
| | | let link = document.createElement("a"); |
| | | link.style.display = "none"; |
| | | link.href = url; |