fix:记录组合筛选的状态

This commit is contained in:
zhangyu
2021-10-26 15:55:57 +08:00
parent 49753cd68f
commit c51d1293bd
4 changed files with 8 additions and 3 deletions

View File

@@ -225,6 +225,7 @@ export default {
} else { } else {
this.dataListLayout.push('clickSearch') this.dataListLayout.push('clickSearch')
} }
localStorage.setItem('dataList-layout' + this.tableId, JSON.stringify(this.dataListLayout))
}, },
addSilence (row, type) { addSilence (row, type) {
this.blankSilenceObject.startAt = bus.timeFormate(bus.getOffsetTimezoneData(), 'yyyy-MM-dd hh:mm:ss') this.blankSilenceObject.startAt = bus.timeFormate(bus.getOffsetTimezoneData(), 'yyyy-MM-dd hh:mm:ss')

View File

@@ -8,7 +8,7 @@
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:from="fromRoute.alertMessage" :from="fromRoute.alertMessage"
:layout="['searchInput', 'elementSet', 'clickSearch', 'pagination']" :layout="dataListLayout"
:search-msg="searchMsg" :search-msg="searchMsg"
@search="search" @search="search"
v-loading="tools.loading" v-loading="tools.loading"
@@ -17,6 +17,9 @@
<el-select v-model="state" class="margin-r-10" size="small" value-key="value" @change="getTableData" popper-class="right-public-box-select-top right-public-box-dropdown-top"> <el-select v-model="state" class="margin-r-10" size="small" value-key="value" @change="getTableData" popper-class="right-public-box-select-top right-public-box-dropdown-top">
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
<button id="asset-filter" :class="[dataListLayout.indexOf('clickSearch') > -1?'is-focus':'' ]" class="top-tool-btn margin-r-10" @click.stop="showClickSearch">
<i class="nz-icon nz-icon-funnel"></i>
</button>
<pick-time v-model="searchTime" :default-pick="12" :refresh-data-func="getTableData" :show-empty="true" :use-chart-unit="false" :use-refresh="false"></pick-time> <pick-time v-model="searchTime" :default-pick="12" :refresh-data-func="getTableData" :show-empty="true" :use-chart-unit="false" :use-refresh="false"></pick-time>
<button id="roles-add" v-has="'alertMessage_view'" :title="$t('overall.exportExcelLower')" class="top-tool-btn margin-r-10" <button id="roles-add" v-has="'alertMessage_view'" :title="$t('overall.exportExcelLower')" class="top-tool-btn margin-r-10"
type="button" @click="showExportDialog"> type="button" @click="showExportDialog">
@@ -154,6 +157,7 @@ export default {
return { return {
chartLoading: false, chartLoading: false,
stateOptions: alertMessageConstant.states, stateOptions: alertMessageConstant.states,
dataListLayout: localStorage.getItem('dataList-layout' + 'alertMessageTable') ? JSON.parse(localStorage.getItem('dataList-layout' + 'alertMessageTable')) : ['searchInput', 'elementSet', 'clickSearch', 'pagination'],
state: '1', state: '1',
dialogShowText: false, dialogShowText: false,
dialogText: '', dialogText: '',

View File

@@ -213,7 +213,7 @@ export default {
batchShow: false batchShow: false
}, },
silenceBoxShow: false, silenceBoxShow: false,
dataListLayout: ['searchInput', 'elementSet', 'clickSearch', 'pagination', 'detailViewSet'], dataListLayout: localStorage.getItem('dataList-layout' + 'assetTable') ? JSON.parse(localStorage.getItem('dataList-layout' + 'assetTable')) : ['searchInput', 'elementSet', 'clickSearch', 'pagination', 'detailViewSet'],
assetNzTableHeightOffset: 281, // 包含click-search时nz-table的高度 assetNzTableHeightOffset: 281, // 包含click-search时nz-table的高度
blankObject: { blankObject: {
id: '', id: '',

View File

@@ -317,7 +317,7 @@ export default {
tableId: 'endpointTable', tableId: 'endpointTable',
queryPermission: 'account_view', queryPermission: 'account_view',
endpointTableHeight: 'calc(100% - 244px)', // 主列表table高度 endpointTableHeight: 'calc(100% - 244px)', // 主列表table高度
dataListLayout: ['searchInput', 'elementSet', 'clickSearch', 'pagination', 'detailViewSet'], dataListLayout: localStorage.getItem('dataList-layout' + 'endpointTable') ? JSON.parse(localStorage.getItem('dataList-layout' + 'endpointTable')) : ['searchInput', 'elementSet', 'clickSearch', 'pagination', 'detailViewSet'],
searchMsg: { // 给搜索框子组件传递的信息 searchMsg: { // 给搜索框子组件传递的信息
zheze_none: true, zheze_none: true,
searchLabelList: [ searchLabelList: [