Commit febfb065 authored by 李志鸣's avatar 李志鸣

fea(设备基础数据): 设备基础数据模块功能联调

parent d3248ebf
......@@ -5,7 +5,7 @@
<span class="page-title-text">设备基础数据</span>
</div>
<div class="float-right page-refresh">
<span @click="doRefreshClick()" class="pointer">
<span @click="doRefreshClick" class="pointer">
<svg-icon icon-class="refresh"></svg-icon>
<span class="ml-10">刷新</span>
</span>
......@@ -13,7 +13,7 @@
</div>
<div class="tool-pack clear-float pl-15 pr-15">
<Search
searchCode="MATERIEL_RECORD"
searchCode="SCADA_EQUIP_INFO"
@search="doSearchClick"
@reset="doResetClick">
</Search>
......@@ -47,6 +47,8 @@
},
data () {
return {
// 精准搜索关键字列表
searchList: {},
// 表格配置项
tableConfig: {
height: 0,
......@@ -65,9 +67,44 @@
// 点击刷新按钮
doRefreshClick () {},
// 点击搜索组件搜索按钮
doSearchClick () {},
doSearchClick (searchValue) {
this.searchList = searchValue
this.tableConfig.paginationConfig.currentPage = 1
// 获取表格数据
this.getTableLIst()
},
// 点击搜索组件重置按钮
doResetClick () {}
doResetClick (searchValue) {
this.searchList = { ...searchList, filters: [] }
this.tableConfig.paginationConfig.currentPage = 1
this.tableConfig.paginationConfig.pageSize = 20
// 获取表格数据
this.getTableLIst()
},
// 获取表格数据
getTableList () {
let queryParams = {
searchCode: this.searchList.searchCode || 'SCADA_EQUIP_INFO',
filters: this.searchList.filters || [],
pageSize: this.tableConfig.paginationConfig.pageSize,
pageNum: this.tableConfig.paginationConfig.currentPage
}
return new Promise((resolve, reject) => {
this.$fetch('basic-info-controller/equipPage-post', queryParams).then(response => {
if (response.list.length === 0 && response.pageNum !== 1) {
this.tableConfig.paginationConfig.currentPage -= 1
// 获取表格数据
this.getTableLIst()
} else {
this.tableConfig.data = _.cloneDeep(response.list)
this.tableConfig.paginationConfig.total = _.cloneDeep(response.total)
resolve()
}
}).catch(error => {
reject(error)
})
})
}
},
mounted () {
setTimeout(() => {
......
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