Commit 4ad376b3 authored by xiexingan's avatar xiexingan

办公区域接口

parent 1c174ee3
...@@ -5,10 +5,10 @@ CONFIG.TITLE = 'AI节能管理系统' ...@@ -5,10 +5,10 @@ CONFIG.TITLE = 'AI节能管理系统'
// 网络请求公用地址 // 网络请求公用地址
// CONFIG.requestPath = 'http://localhost:8046' CONFIG.requestPath = 'http://localhost:8046'
// CONFIG.requestPath = 'http://10.20.72.31:8046' // CONFIG.requestPath = 'http://10.20.72.31:8046'
CONFIG.requestPath = 'http://59.110.43.122:8046' // CONFIG.requestPath = 'http://59.110.43.122:8046'
// 文件上传 // 文件上传
// CONFIG.urlPath = 'http://10.20.72.33/' // CONFIG.urlPath = 'http://10.20.72.33/'
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,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 officeTabList" v-for="(item, index) in officeTabList"
:key="index" :key="index"
></el-tab-pane> ></el-tab-pane>
...@@ -80,36 +80,39 @@ export default { ...@@ -80,36 +80,39 @@ export default {
data() { data() {
return { return {
activeTab: '01', pageIndex: 1,
tableData: tableDataOne, pageSize: 10,
totalSize: 0,
activeTab: 'b6af764f2a6e454490a6b1b3c9057e57',
tableData: [],
tableColums: tableColumsOne, tableColums: tableColumsOne,
officeTabList: [ officeTabList: [
{ {
value: '01', id: 'b6af764f2a6e454490a6b1b3c9057e57',
label: '排风机' label: '排风机'
}, },
{ {
value: '02', id: 'ece0b8b2db27411886254e81134988a3',
label: '机房空调(220V)' label: '机房空调(220V)'
}, },
{ {
value: '03', id: 'b47661ca1d454f9792ba5369f3cb2bc5',
label: '机房空调(380V)' label: '机房空调(380V)'
}, },
{ {
value: '04', id: 'c788ce98c1f248f590434394da485ce4',
label: '防火卷帘门' label: '防火卷帘门'
}, },
{ {
value: '05', id: '173466a2cf9a42a6a17b2bdfbeae36d5',
label: '多联室内机' label: '多联室内机'
}, },
{ {
value: '06', id: '8f5530fee2484e8eb107c0ca672132b2',
label: '多联室外机' label: '多联室外机'
}, },
{ {
value: '07', id: '49f5921a6d7f43cfa222c09f0223ae04',
label: '换气扇' label: '换气扇'
} }
] ]
...@@ -117,39 +120,56 @@ export default { ...@@ -117,39 +120,56 @@ export default {
}, },
watch: { watch: {
activeTab(val) { activeTab(val) {
this.activeTab = val
this.getDataList()
switch (val) { switch (val) {
case '01': case '01':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
this.tableData = tableDataOne
break break
case '02': case '02':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
this.tableData = tableDataTwo
break break
case '03': case '03':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
this.tableData = tableDataThree
break break
case '04': case '04':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
this.tableData = tableDataFour
break break
case '05': case '05':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
this.tableData = tableDataFive
break break
case '06': case '06':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
this.tableData = tableDataSix
break break
case '07': case '07':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
this.tableData = tableDataSeven
break break
} }
} }
}, },
methods: { methods: {
// 获取数据列表
getDataList(page, size) {
this.$http({
url: this.$http.adornUrl('/liResource/list'),
method: 'post',
data: {
type: this.activeTab, //类型
region: 2, //办公区域
page: page || this.pageIndex,
size: size || this.pageSize
}
}).then((data) => {
if (data && data.code === 0) {
console.log('数据', data)
this.tableData = data.page.rows
this.totalSize = data.page.total
} else {
this.dataList = []
this.totalSize = 0
}
})
},
statusHandle() {} statusHandle() {}
} }
} }
......
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