|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <a-card size="small" :bordered="false" class="relationshipBindingList-wrap">
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <div>
|
|
|
+ <a-card size="small" :bordered="false" class="relationshipBindingList-wrap searchBottomSpace">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="getList()">
|
|
@@ -17,74 +17,81 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <!-- 列表 -->
|
|
|
- <a-tabs type="card" @change="tabChange" v-model="tabInd" class="relationshipBindingList-tabs">
|
|
|
- <a-tab-pane key="1" tab="省市级关系绑定"></a-tab-pane>
|
|
|
- <a-tab-pane key="2" tab="特约店关系绑定"></a-tab-pane>
|
|
|
- </a-tabs>
|
|
|
- <a-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.dealerSn"
|
|
|
- :columns="columns"
|
|
|
- :pagination="false"
|
|
|
- :data-source="list"
|
|
|
- @expand="expand"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :expandRowByClick="true"
|
|
|
- :loading="loading"
|
|
|
- :scroll="{ y: tableHeight }">
|
|
|
- <a-table
|
|
|
- slot="expandedRowRender"
|
|
|
- :rowKey="(record) => record.dealerSn"
|
|
|
- :columns="innerColumns"
|
|
|
- :data-source="innerData"
|
|
|
- :pagination="false">
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- type="link"
|
|
|
- v-if="$hasPermissions('B_dealerRelationshipBinding_unrelation')"
|
|
|
- class="button-error"
|
|
|
- size="small"
|
|
|
- icon="close"
|
|
|
- :id="'relationshipBindingList-delSubItem'+record.id"
|
|
|
- @click.stop="handleDisassociate(record)">取消关联</a-button>
|
|
|
- <span v-else>--</span>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- type="link"
|
|
|
- v-if="$hasPermissions('B_dealerRelationshipBinding_relation')"
|
|
|
- class="button-info"
|
|
|
+ </a-card>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <a-tabs @change="tabChange" v-model="tabInd" :tabBarStyle="{'background':'#fff'}">
|
|
|
+ <a-tab-pane key="1" tab="省市级关系绑定"></a-tab-pane>
|
|
|
+ <a-tab-pane key="2" tab="特约店关系绑定"></a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ <div class="mainContext">
|
|
|
+ <a-card size="small" :bordered="false">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <a-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
size="small"
|
|
|
- icon="plus"
|
|
|
- :id="'relationshipBindingList-addSubItem'+record.id"
|
|
|
- @click.stop="handleAssociate(record)">关联下级</a-button>
|
|
|
- <span v-else>--</span>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- <!-- 分页 -->
|
|
|
- <tablePagination
|
|
|
- ref="tablePagination"
|
|
|
- :total="paginationProps.total"
|
|
|
- :current="paginationProps.current"
|
|
|
- :pageSize="paginationProps.pageSize"
|
|
|
- @changePageSize="changePageSize"
|
|
|
- @changePage="changePage" />
|
|
|
- </a-spin>
|
|
|
- <!-- 关联下级 -->
|
|
|
- <associate-modal
|
|
|
- v-drag
|
|
|
- :openModal="openModal"
|
|
|
- :nowData="nowData"
|
|
|
- :tabInd="tabInd"
|
|
|
- @ok="addItemOk"
|
|
|
- @close="openModal=false" />
|
|
|
- </a-card>
|
|
|
+ :rowKey="(record) => record.dealerSn"
|
|
|
+ :columns="columns"
|
|
|
+ :pagination="false"
|
|
|
+ :data-source="list"
|
|
|
+ @expand="expand"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :expandRowByClick="true"
|
|
|
+ :loading="loading"
|
|
|
+ :style="{'height':tableHeight+84.5+'px' }"
|
|
|
+ :scroll="{ y: tableHeight +30 }">
|
|
|
+ <a-table
|
|
|
+ slot="expandedRowRender"
|
|
|
+ :rowKey="(record) => record.dealerSn"
|
|
|
+ :columns="innerColumns"
|
|
|
+ :data-source="innerData"
|
|
|
+ :pagination="false">
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ type="link"
|
|
|
+ v-if="$hasPermissions('B_dealerRelationshipBinding_unrelation')"
|
|
|
+ class="button-error"
|
|
|
+ size="small"
|
|
|
+ icon="close"
|
|
|
+ :id="'relationshipBindingList-delSubItem'+record.id"
|
|
|
+ @click.stop="handleDisassociate(record)">取消关联</a-button>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ type="link"
|
|
|
+ v-if="$hasPermissions('B_dealerRelationshipBinding_relation')"
|
|
|
+ class="button-info"
|
|
|
+ size="small"
|
|
|
+ icon="plus"
|
|
|
+ :id="'relationshipBindingList-addSubItem'+record.id"
|
|
|
+ @click.stop="handleAssociate(record)">关联下级</a-button>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <!-- 分页 -->
|
|
|
+ <tablePagination
|
|
|
+ ref="tablePagination"
|
|
|
+ :total="paginationProps.total"
|
|
|
+ :current="paginationProps.current"
|
|
|
+ :pageSize="paginationProps.pageSize"
|
|
|
+ @changePageSize="changePageSize"
|
|
|
+ @changePage="changePage" />
|
|
|
+ </a-spin>
|
|
|
+ <!-- 关联下级 -->
|
|
|
+ <associate-modal
|
|
|
+ v-drag
|
|
|
+ :openModal="openModal"
|
|
|
+ :nowData="nowData"
|
|
|
+ :tabInd="tabInd"
|
|
|
+ @ok="addItemOk"
|
|
|
+ @close="openModal=false" />
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
I
|
|
|
<script>
|
|
@@ -249,30 +256,30 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
'$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
- this.tableHeight = window.innerHeight - 290
|
|
|
+ this.tableHeight = window.innerHeight - 360
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
- this.tableHeight = window.innerHeight - 290
|
|
|
+ this.tableHeight = window.innerHeight - 360
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
// 如果是新页签打开,则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab) {
|
|
|
- this.tableHeight = window.innerHeight - 290
|
|
|
+ this.tableHeight = window.innerHeight - 360
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
// 仅刷新列表,不重置页面
|
|
|
if (this.$store.state.app.updateList) {
|
|
|
- this.tableHeight = window.innerHeight - 290
|
|
|
+ this.tableHeight = window.innerHeight - 360
|
|
|
this.resetSearchForm(true)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-<style lang="less">
|
|
|
+<style lang="less" scoped>
|
|
|
.relationshipBindingList-wrap{
|
|
|
position: relative;
|
|
|
height: 100%;
|
|
@@ -281,16 +288,8 @@ export default {
|
|
|
overflow-y: scroll;
|
|
|
height: 100%;
|
|
|
}
|
|
|
- // tab样式
|
|
|
- .relationshipBindingList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
|
|
|
- height: 30px!important;
|
|
|
- }
|
|
|
- .relationshipBindingList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
|
|
|
- height: 30px!important;
|
|
|
- }
|
|
|
- .relationshipBindingList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
|
|
|
- line-height: 26px!important;
|
|
|
- height: 30px!important;
|
|
|
- }
|
|
|
+ }
|
|
|
+ .mainContext{
|
|
|
+ margin-top:-11px;
|
|
|
}
|
|
|
</style>
|