Commit 1c174ee3 authored by xiexingan's avatar xiexingan

候车大厅

parent b074d09e
......@@ -45,8 +45,8 @@
<div class="record-color marg_r_8">共20页</div>
<div class="record-color">每页显示</div> -->
<!-- background -->
<el-pagination layout="sizes, prev, pager, next" :total="1000">
</el-pagination>
<!-- <el-pagination layout="sizes, prev, pager, next" :total="1000">
</el-pagination> -->
</div>
</div>
</template>
......
......@@ -40,13 +40,13 @@
export const tableColumsTwo = [
{
align: 'center',
prop: 'A',
prop: 'name',
label: '设备名称',
width: 132
},
{
align: 'center',
prop: 'B',
prop: 'stationName',
label: '设备位置'
// width: 112,
},
......
......@@ -32,7 +32,7 @@
:key="item.id"
:class="[
item.id == currentId ? 'isActive' : '',
item.icon
item.icon,
]"
>
<!-- <img :src="item.src" alt="" /> -->
......@@ -56,7 +56,7 @@
:picker-options="{
start: '00:00',
step: '00:15',
end: '24:00'
end: '24:00',
}"
>
</el-time-select>
......@@ -68,7 +68,7 @@
start: '00:00',
step: '00:15',
end: '24:00',
minTime: formData.startTime
minTime: formData.startTime,
}"
>
</el-time-select>
......@@ -89,7 +89,7 @@
<el-tabs class="en-tabs" v-model="activeTab">
<el-tab-pane
:label="item.label"
:name="item.value"
:name="item.id"
v-for="(item, index) in tabList"
:key="index"
></el-tab-pane>
......@@ -120,6 +120,11 @@
>
</template>
</enTable>
<table-pagination
:pageSize="pageSize"
:totalSize="totalSize"
@parentMethod="getDataList"
></table-pagination>
</div>
</cardList>
<hall-modal
......@@ -133,6 +138,8 @@ import cardList from '../../components/cardList'
import enTable from '../../components/enTable'
import enTabs from '../../components/enTabs'
import hallModal from './components/hallModal'
import tablePagination from '@/pages/components/tablePagination'
import {
tableDataOne,
tableColumsOne,
......@@ -146,28 +153,14 @@ export default {
cardList,
enTable,
enTabs,
hallModal
},
watch: {
activeTab(val) {
switch (val) {
case '01':
this.tableColums = tableColumsOne
this.tableData = tableDataOne
break
case '02':
this.tableColums = tableColumsTwo
this.tableData = tableDataTwo
break
case '03':
this.tableColums = tableColumsTwo
this.tableData = tableDataThree
break
}
}
hallModal,
tablePagination
},
data() {
return {
pageIndex: 1,
pageSize: 10,
totalSize: 0,
typeList: [
{
id: 1,
......@@ -189,8 +182,8 @@ export default {
}
],
currentId: 1,
activeTab: '01',
tableData: tableDataOne,
activeTab: 'b45827c068254695864ee3c1d42573cb', //tab默认选中
tableData: [],
tableColums: tableColumsOne,
formData: {
saving: 1
......@@ -198,21 +191,71 @@ export default {
tabList: [
{
value: '01',
label: '风冷热泵机组'
label: '风冷热泵机组',
id: 'b45827c068254695864ee3c1d42573cb'
},
{
value: '02',
label: '室内机风柜'
label: '室内机风柜',
id: '303310efddb34a2e9bf269bdff8a7dc5'
},
{
value: '03',
label: ' 水泵'
label: ' 水泵',
id: 'f4c840711eae4bcb9536a890cdfda493'
}
],
hallModalVisible: false
}
},
watch: {
activeTab(val) {
this.activeTab = val
this.getDataList()
switch (val) {
case 'b45827c068254695864ee3c1d42573cb':
this.tableColums = tableColumsOne
// this.tableData = tableDataOne
break
case '303310efddb34a2e9bf269bdff8a7dc5':
this.tableColums = tableColumsTwo
// this.tableData = tableDataTwo
break
case 'f4c840711eae4bcb9536a890cdfda493':
this.tableColums = tableColumsTwo
// this.tableData = tableDataThree
break
}
}
},
mounted() {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList(page, size) {
this.$http({
url: this.$http.adornUrl('/liResource/list'),
method: 'post',
data: {
type: this.activeTab, //类型
region: 1, //候车大厅
page: page || this.pageIndex,
size: size || this.pageSize
}
}).then((data) => {
if (data && data.code === 0) {
console.log('数据', data)
this.tableData = data.page.rows
// this.tableColums = crecords
this.totalSize = data.page.total
} else {
this.dataList = []
this.totalSize = 0
}
})
},
cancelhandle() {
this.$nextTick(() => {
this.hallModalVisible = false
......@@ -222,8 +265,20 @@ export default {
this.hallModalVisible = true
},
statusHandle() {},
// 人工节能
handleSwitch(state) {
this.formData.saving = state
this.$http({
url: this.$http.adornUrl('/equipment/changeType'),
method: 'post',
data: {
type: state
}
}).then((data) => {
if (data && data.code === 0) {
console.log(data)
}
})
},
// 设置定时任务
setSendTime() {
......@@ -295,5 +350,6 @@ export default {
}
.isActive {
background: #4cb527 !important;
border: 1px solid transparent;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment