|
@@ -2,38 +2,49 @@
|
|
|
<div class="alarm-center">
|
|
|
<div class="action-bar">
|
|
|
<div class="selections mg-b-16">
|
|
|
- <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">发电机</div>
|
|
|
+ <div v-for="(tabItem, tabIndex) in tabLists" :key="tabItem.type" class="item" :class="{ active: tabIndex == cureent }" @click="tabSelect(tabItem.type, tabIndex)" >
|
|
|
+ {{ tabItem.name }}
|
|
|
+ </div>
|
|
|
+ <!-- <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">发电机</div>
|
|
|
<div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">齿轮箱</div>
|
|
|
<div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">变桨系统</div>
|
|
|
<div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 3 }">液压站</div>
|
|
|
<div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 4 }">风机震动</div>
|
|
|
- <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 5 }">其他参数</div>
|
|
|
+ <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 5 }">其他参数</div> -->
|
|
|
</div>
|
|
|
<div class="query mg-b-16">
|
|
|
<div class="query-items">
|
|
|
<div class="query-item">
|
|
|
<div class="lable">风场:</div>
|
|
|
<div class="search-input">
|
|
|
- <el-select v-model="value1" clearable placeholder="请选择" popper-class="select">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
|
|
+ <el-select v-model="optSelectValue" clearable placeholder="请选择" popper-class="select" @change="handelSelectChange">
|
|
|
+ <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="query-actions">
|
|
|
- <button class="btn green">搜索</button>
|
|
|
+ <button class="btn green" @click="handelSelectChange">搜索</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-scrollbar>
|
|
|
<div class="fj">
|
|
|
+ <div class="fj-item" v-for="(item, index) in tableLists" :key="index">
|
|
|
+ <div class="fj-title">风机编号:{{item[0].wtId}}</div>
|
|
|
+ <div class="fj-info">
|
|
|
+ <Table :data="handleTable(item)"></Table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="fj">
|
|
|
<div class="fj-item" v-for="index in 25" :key="index">
|
|
|
<div class="fj-title">风机编号:000</div>
|
|
|
<div class="fj-info">
|
|
|
<Table :data="tableData"></Table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -44,7 +55,70 @@ export default {
|
|
|
components: { Table },
|
|
|
data() {
|
|
|
return {
|
|
|
- tableData: {
|
|
|
+ cureent: 0,
|
|
|
+ optSelectValue: '',
|
|
|
+ tabLists: [
|
|
|
+ {
|
|
|
+ type: 'fdj',
|
|
|
+ name: '发电机'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'clx',
|
|
|
+ name: '齿轮箱'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'bj',
|
|
|
+ name: '变桨系统'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'yyz',
|
|
|
+ name: '液压站'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'zd',
|
|
|
+ name: '风机震动'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'qt',
|
|
|
+ name: '其他参数'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // tableData: {
|
|
|
+ // column: [
|
|
|
+ // {
|
|
|
+ // name: "",
|
|
|
+ // field: "name",
|
|
|
+ // is_num: false,
|
|
|
+ // is_light: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: "",
|
|
|
+ // field: "value",
|
|
|
+ // is_num: false,
|
|
|
+ // is_light: false,
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // data: [
|
|
|
+ // // {
|
|
|
+ // // name: "发电机绕组U1温度",
|
|
|
+ // // desc: "1234.56",
|
|
|
+ // // },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ tableLists: [],
|
|
|
+ options: [],
|
|
|
+ type: '',
|
|
|
+ timmer: null, // 遮罩开关
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ tabSelect(type, index) {
|
|
|
+ this.cureent = index
|
|
|
+ this.type = type
|
|
|
+ this.getList(true)
|
|
|
+ },
|
|
|
+ handleTable(item) {
|
|
|
+ let tableData = {
|
|
|
column: [
|
|
|
{
|
|
|
name: "",
|
|
@@ -54,27 +128,70 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
name: "",
|
|
|
- field: "desc",
|
|
|
+ field: "value",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
},
|
|
|
],
|
|
|
- data: [
|
|
|
- {
|
|
|
- name: "发电机绕组U1温度",
|
|
|
- desc: "1234.56",
|
|
|
+ data: item
|
|
|
+ }
|
|
|
+ return tableData
|
|
|
+ },
|
|
|
+ handelSelectChange() {
|
|
|
+ this.getList(true)
|
|
|
+ },
|
|
|
+ getList(showLoading) {
|
|
|
+ let _this = this
|
|
|
+ _this.API.requestData({
|
|
|
+ showLoading,
|
|
|
+ method: "POST",
|
|
|
+ subUrl: "/temperature/getTemperatureList",
|
|
|
+ data:{
|
|
|
+ type: this.type,
|
|
|
+ wpId: this.optSelectValue
|
|
|
},
|
|
|
- ],
|
|
|
- },
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
- tabSelect(tab) {},
|
|
|
+ success(res) {
|
|
|
+ _this.tableLists = res.data
|
|
|
+ // this.tableData.data = res.data
|
|
|
+ // debugger
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getSelectLists(showLoading) {
|
|
|
+ let _this = this
|
|
|
+ _this.API.requestData({
|
|
|
+ showLoading,
|
|
|
+ method: "GET",
|
|
|
+ subUrl: "/powercompare/windfarmAjax",
|
|
|
+ success(res) {
|
|
|
+ _this.options = res.data
|
|
|
+ _this.optSelectValue = res.data[0].id
|
|
|
+ _this.getList(false);
|
|
|
+ // _this.$nextTick(() => {
|
|
|
+ // _this.getList(false);
|
|
|
+ // _this.timmer = setInterval(() => {
|
|
|
+ // _this.getList(false)
|
|
|
+ // }, _this.$store.state.websocketTimeSec);
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- for (let i = 1; i < 7; i++) {
|
|
|
- this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
|
|
|
- }
|
|
|
+ // for (let i = 1; i < 7; i++) {
|
|
|
+ // this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
|
|
|
+ // }
|
|
|
+ this.type = this.tabLists[0].type
|
|
|
+ this.getSelectLists(false);
|
|
|
+
|
|
|
+ // this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ unmounted() {
|
|
|
+ clearInterval(this.timmer);
|
|
|
+ this.timmer = null;
|
|
|
},
|
|
|
};
|
|
|
</script>
|