123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539 |
- <template>
- <div class="draught-fan-list">
- <div class="btn-group-tabs">
- <BtnGroup2 :btnGroups="btnGroupsss" :rowIndex="rowIndex" :index="selectIndex" @select="select"></BtnGroup2>
- </div>
- <div class="df-table">
- <table-2 :data="data" :height="'100%'" @headerClick="headerClick"></table-2>
- </div>
- </div>
- </template>
- <script>
- import Table2 from "@com/coms/table/table2.vue";
- import BtnGroup2 from "@com/coms/btn/btn-group-double.vue";
- import api from "@api/cockpit/matrix/index.js";
- export default {
- // 名称
- name: "DraughtFanList",
- // 使用组件
- components: {
- Table2,
- BtnGroup2,
- },
- // 数据
- data() {
- return {
- btnGroupsss: [
- {
- icon: "fa fa-fire",
- btns: [
- {
- text: "某某风场",
- code: "mmfdc1",
- },
- {
- text: "某某风场",
- code: "mhsfc",
- },
- {
- text: "某某风场",
- code: "mmfdc2",
- },
- {
- text: "某某风场",
- code: "mmfdc3",
- },
- {
- text: "某某风场",
- code: "mmfdc4",
- },
- ],
- },
- {
- icon: "fa fa-fire-extinguisher",
- btns: [
- {
- text: "某某风场",
- code: "mmgf1",
- },
- {
- text: "某某风场",
- code: "mmgf2",
- },
- {
- text: "某某风场",
- code: "mmgf3",
- },
- {
- text: "某某风场",
- code: "mmgf4",
- },
- ],
- },
- ],
- data: {
- column: [
- {
- name: "风机名称",
- field: "code",
- sortable: false,
- is_num: false,
- is_light: false,
- },
- {
- name: "冷却风温度",
- field: "FDJLQFWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "有功功率",
- field: "FJGL",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "液压油温度",
- field: "YYYW",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "Pcspp温度",
- field: "PCS_WD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "U1绕组温度",
- field: "U1YZWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "U2绕组温度",
- field: "U2YZWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "V1绕组温度",
- field: "V1YZWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "V2绕组温度",
- field: "V2YZWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "W1绕组温度",
- field: "W1YZWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "W2绕组温度",
- field: "W2YZWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "轴承A温度",
- field: "FDJZCAWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "轴承B温度",
- field: "FDJZCBWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "齿轮箱温度",
- field: "CLXWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "齿轮箱轴1温度",
- field: "CLXSRZ1WD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "齿轮箱轴2温度",
- field: "CLXSRZ2WD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "机舱温度",
- field: "JCWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "滑环温度",
- field: "FDJHHWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- {
- name: "环境温度",
- field: "JCWWD",
- sortable: false,
- is_num: true,
- is_light: false,
- },
- ],
- data: [],
- total: 1000,
- },
- };
- },
- // 函数
- methods: {
- // 请求服务
- requestData(showLoading) {
- // if (this.wpId.indexOf("GDC") != -1) {
- // this.requestDataGDC(showLoading);
- // return 0;
- // }
- api.findWtInfoList({
- wpId: this.wpId,
- }).then(res =>{
- res.data.forEach((ele) => {
- for (let key in ele) {
- if (key !== "code" && key !== "lnid" && key !== "model" && key !== "pjid" && key !== "wpid") {
- ele[key] = ele[key] || 0;
- }
- }
- });
- this.data = {
- data: res.data,
- column: [
- {
- name: "风机名称",
- field: "code",
- width: 100,
- is_num: false,
- is_light: false,
- },
- {
- name: "冷却风温度",
- field: "FDJLQFWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "有功功率",
- field: "FJGL",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "液压油温度",
- field: "YYYW",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "Pcspp温度",
- field: "PCS_WD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "U1绕组温度",
- field: "U1YZWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "U2绕组温度",
- field: "U2YZWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "V1绕组温度",
- field: "V1YZWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "V2绕组温度",
- field: "V2YZWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "W1绕组温度",
- field: "W1YZWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "W2绕组温度",
- field: "W2YZWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "轴承A温度",
- field: "FDJZCAWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "轴承B温度",
- field: "FDJZCBWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "齿轮箱温度",
- field: "CLXWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "齿轮箱轴1温度",
- field: "CLXSRZ1WD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "齿轮箱轴2温度",
- field: "CLXSRZ2WD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "机舱温度",
- field: "JCWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "滑环温度",
- field: "FDJHHWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- {
- name: "环境温度",
- field: "JCWWD",
- width: 100,
- is_num: true,
- is_light: false,
- },
- ],
- };
- })
- // that.API.requestData({
- // showLoading,
- // method: "POST",
- // subUrl: "monitorwt/findWtInfoList",
- // data: {
- // wpId: that.wpId,
- // },
- // success(res) {
-
- // },
- // });
- },
- // 光伏电站列表
- // async requestDataGDC(showLoading) {
- // let res = await this.API.requestData({
- // showLoading,
- // method: "POST",
- // subUrl: "monitorinverter/findInverterInfoList",
- // data: {
- // wpId: this.wpId,
- // },
- // });
- // let column = [
- // { name: "逆变器", field: "code" },
- // { name: "光照强度", field: "JSSSFS" },
- // { name: "有功功率", field: "AI130" },
- // { name: "功率因数", field: "AI067" },
- // { name: "机内温度", field: "AIG071" },
- // { name: "逆变效率", field: "AIG072" },
- // { name: "日发电量", field: "RFDL" },
- // { name: "月发电量", field: "YFDL" },
- // { name: "年发电量", field: "NFDL" },
- // { name: "累计发电量", field: "AIG064" },
- // ];
- // this.data = { data: res.data.data, column: column };
- // },
- getWp() {
- api.windfarmAllAjax().then(res =>{
- let btnGroups = [
- {
- icon: "svg-wind-site",
- btns: [],
- },
- {
- icon: "svg-photovoltaic",
- btns: [],
- },
- ];
- res.data.forEach((ele, index) => {
- if (ele.id.indexOf("FDC") !== -1) {
- btnGroups[0].btns.push({
- text: ele.name,
- code: ele.id,
- });
- } else {
- btnGroups[1].btns.push({
- text: ele.name,
- code: ele.id,
- });
- }
- });
- this.btnGroupsss = btnGroups;
- this.renderBtnActiveIndex();
- })
- // that.API.requestData({
- // method: "GET",
- // subUrl: "powercompare/windfarmAllAjax",
- // success(res) {
-
- // },
- // });
- },
- renderBtnActiveIndex() {
- this.btnGroupsss.forEach((pEle, pIndex) => {
- pEle.btns.forEach((cEle, cIndex) => {
- if (cEle.code === this.wpId) {
- this.rowIndex = pIndex;
- this.selectIndex = cIndex;
- }
- });
- });
- },
- select(res) {
- this.$router.replace({
- path: `/monitor/windsite/draughtfanlist/${res.code}`,
- });
- },
- headerClick(param) {
- this.data.column.forEach((item) => {
- item.sortable = false;
- });
- this.data.column[param.index].sortable = true;
- },
- },
- created() {
- let that = this;
- that.wpId = that.$route.params.wpId;
- that.getWp();
- that.$nextTick(() => {
- that.requestData(false);
- that.timmer = setInterval(() => {
- that.$nextTick(() => {
- that.requestData(false);
- });
- }, that.$store.state.websocketTimeSec);
- });
- },
- mounted() {},
- unmounted() {
- clearInterval(this.timmer);
- this.timmer = null;
- },
- watch: {
- $route(res) {
- this.wpId = res.params.wpId;
- if (res.params.wpId) {
- this.requestData(false);
- this.renderBtnActiveIndex();
- }
- },
- },
- };
- </script>
- <style lang="less">
- .draught-fan-list {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- .btn-group-tabs {
- display: flex;
- flex-direction: row;
- }
- .df-table {
- border: 0.093vh solid fade(@darkgray, 50%);
- position: relative;
- overflow: auto;
- flex-grow: 1;
- margin-top: 1.481vh;
- &:before {
- content: "";
- width: 0.37vh;
- height: 0.37vh;
- background: @write;
- position: absolute;
- left: 0.278vh;
- top: 0.278vh;
- }
- tbody {
- height: calc(100vh - 166px);
- }
- }
- }
- </style>
|