This commit is contained in:
邱贞招 2025-02-10 16:03:29 +08:00
parent 318f178c3d
commit 6985d5b216

View File

@ -118,44 +118,46 @@
<!-- 功能标签页 -->
<el-card class="function-card">
<el-tabs v-model="activeTab">
<el-tab-pane label="运营区" name="运营区" lazy>
<Area :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="合伙人" lazy>
<partner :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="收费方式" lazy>
<Fees :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="车型" lazy>
<Model :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="车辆列表" name="车辆列表" lazy>
<device ref="deviceComponent" :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="订单" lazy>
<order :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="退款订单" lazy>
<refund :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="还车审核" lazy>
<audit :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="押金管理" lazy>
<recharge :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="资金流水" lazy>
<flow :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="提现记录" lazy>
<withdraw :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
<el-tab-pane label="管理员列表" lazy>
<user :dept-id="detail.deptId" v-if="detail.deptId" />
</el-tab-pane>
</el-tabs>
<keep-alive>
<el-tabs v-model="activeTab">
<el-tab-pane label="运营区" name="运营区" lazy>
<Area :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '运营区'" />
</el-tab-pane>
<el-tab-pane label="合伙人" name="合伙人" lazy>
<partner :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '合伙人'" />
</el-tab-pane>
<el-tab-pane label="收费方式" name="收费方式" lazy>
<Fees :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '收费方式'" />
</el-tab-pane>
<el-tab-pane label="车型" name="车型" lazy>
<Model :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '车型'" />
</el-tab-pane>
<el-tab-pane label="车辆列表" name="车辆列表" lazy>
<device ref="deviceComponent" :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '车辆列表'" />
</el-tab-pane>
<el-tab-pane label="订单" name="订单" lazy>
<order :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '订单'" />
</el-tab-pane>
<el-tab-pane label="退款订单" name="退款订单" lazy>
<refund :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '退款订单'" />
</el-tab-pane>
<el-tab-pane label="还车审核" name="还车审核" lazy>
<audit :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '还车审核'" />
</el-tab-pane>
<el-tab-pane label="押金管理" name="押金管理" lazy>
<recharge :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '押金管理'" />
</el-tab-pane>
<el-tab-pane label="资金流水" name="资金流水" lazy>
<flow :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '资金流水'" />
</el-tab-pane>
<el-tab-pane label="提现记录" name="提现记录" lazy>
<withdraw :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '提现记录'" />
</el-tab-pane>
<el-tab-pane label="管理员列表" name="管理员列表" lazy>
<user :dept-id="detail.deptId" v-if="detail.deptId && activeTab === '管理员列表'" />
</el-tab-pane>
</el-tabs>
</keep-alive>
</el-card>
</template>
@ -215,7 +217,7 @@
loading: false,
showConfigDialog: false,
deptInfo: {},
activeTab: '运营区'
activeTab: localStorage.getItem('deptDetailActiveTab') || '运营区'
}
},
@ -278,6 +280,16 @@
this.fetchData()
},
watch: {
activeTab(newTab) {
localStorage.setItem('deptDetailActiveTab', newTab)
}
},
activated() {
this.activeTab = localStorage.getItem('deptDetailActiveTab') || '运营区'
},
methods: {
async fetchData() {
this.loading = true