Commit 1c174ee3 authored by xiexingan's avatar xiexingan

候车大厅

parent b074d09e
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
<div class="record-color marg_r_8">共20页</div> <div class="record-color marg_r_8">共20页</div>
<div class="record-color">每页显示</div> --> <div class="record-color">每页显示</div> -->
<!-- background --> <!-- background -->
<el-pagination layout="sizes, prev, pager, next" :total="1000"> <!-- <el-pagination layout="sizes, prev, pager, next" :total="1000">
</el-pagination> </el-pagination> -->
</div> </div>
</div> </div>
</template> </template>
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
export const tableColumsTwo = [ export const tableColumsTwo = [
{ {
align: 'center', align: 'center',
prop: 'A', prop: 'name',
label: '设备名称', label: '设备名称',
width: 132 width: 132
}, },
{ {
align: 'center', align: 'center',
prop: 'B', prop: 'stationName',
label: '设备位置' label: '设备位置'
// width: 112, // width: 112,
}, },
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
:key="item.id" :key="item.id"
:class="[ :class="[
item.id == currentId ? 'isActive' : '', item.id == currentId ? 'isActive' : '',
item.icon item.icon,
]" ]"
> >
<!-- <img :src="item.src" alt="" /> --> <!-- <img :src="item.src" alt="" /> -->
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
:picker-options="{ :picker-options="{
start: '00:00', start: '00:00',
step: '00:15', step: '00:15',
end: '24:00' end: '24:00',
}" }"
> >
</el-time-select> </el-time-select>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
start: '00:00', start: '00:00',
step: '00:15', step: '00:15',
end: '24:00', end: '24:00',
minTime: formData.startTime minTime: formData.startTime,
}" }"
> >
</el-time-select> </el-time-select>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<el-tabs class="en-tabs" v-model="activeTab"> <el-tabs class="en-tabs" v-model="activeTab">
<el-tab-pane <el-tab-pane
:label="item.label" :label="item.label"
:name="item.value" :name="item.id"
v-for="(item, index) in tabList" v-for="(item, index) in tabList"
:key="index" :key="index"
></el-tab-pane> ></el-tab-pane>
...@@ -120,6 +120,11 @@ ...@@ -120,6 +120,11 @@
> >
</template> </template>
</enTable> </enTable>
<table-pagination
:pageSize="pageSize"
:totalSize="totalSize"
@parentMethod="getDataList"
></table-pagination>
</div> </div>
</cardList> </cardList>
<hall-modal <hall-modal
...@@ -133,6 +138,8 @@ import cardList from '../../components/cardList' ...@@ -133,6 +138,8 @@ import cardList from '../../components/cardList'
import enTable from '../../components/enTable' import enTable from '../../components/enTable'
import enTabs from '../../components/enTabs' import enTabs from '../../components/enTabs'
import hallModal from './components/hallModal' import hallModal from './components/hallModal'
import tablePagination from '@/pages/components/tablePagination'
import { import {
tableDataOne, tableDataOne,
tableColumsOne, tableColumsOne,
...@@ -146,28 +153,14 @@ export default { ...@@ -146,28 +153,14 @@ export default {
cardList, cardList,
enTable, enTable,
enTabs, enTabs,
hallModal hallModal,
}, tablePagination
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
}
}
}, },
data() { data() {
return { return {
pageIndex: 1,
pageSize: 10,
totalSize: 0,
typeList: [ typeList: [
{ {
id: 1, id: 1,
...@@ -189,8 +182,8 @@ export default { ...@@ -189,8 +182,8 @@ export default {
} }
], ],
currentId: 1, currentId: 1,
activeTab: '01', activeTab: 'b45827c068254695864ee3c1d42573cb', //tab默认选中
tableData: tableDataOne, tableData: [],
tableColums: tableColumsOne, tableColums: tableColumsOne,
formData: { formData: {
saving: 1 saving: 1
...@@ -198,21 +191,71 @@ export default { ...@@ -198,21 +191,71 @@ export default {
tabList: [ tabList: [
{ {
value: '01', value: '01',
label: '风冷热泵机组' label: '风冷热泵机组',
id: 'b45827c068254695864ee3c1d42573cb'
}, },
{ {
value: '02', value: '02',
label: '室内机风柜' label: '室内机风柜',
id: '303310efddb34a2e9bf269bdff8a7dc5'
}, },
{ {
value: '03', value: '03',
label: ' 水泵' label: ' 水泵',
id: 'f4c840711eae4bcb9536a890cdfda493'
} }
], ],
hallModalVisible: false 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: { 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() { cancelhandle() {
this.$nextTick(() => { this.$nextTick(() => {
this.hallModalVisible = false this.hallModalVisible = false
...@@ -222,8 +265,20 @@ export default { ...@@ -222,8 +265,20 @@ export default {
this.hallModalVisible = true this.hallModalVisible = true
}, },
statusHandle() {}, statusHandle() {},
// 人工节能
handleSwitch(state) { handleSwitch(state) {
this.formData.saving = 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() { setSendTime() {
...@@ -295,5 +350,6 @@ export default { ...@@ -295,5 +350,6 @@ export default {
} }
.isActive { .isActive {
background: #4cb527 !important; background: #4cb527 !important;
border: 1px solid transparent;
} }
</style> </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