Files
dvcp_v2_webapp/project/xiushan/apps/financing/AppFinancingNeeds/AppFinancingNeeds.vue

97 lines
2.7 KiB
Vue
Raw Normal View History

2022-02-23 09:24:55 +08:00
<template>
<section class="AppFinancingNeeds">
2022-04-07 19:47:59 +08:00
<ai-list v-if="showList">
<template slot="title">
2022-04-08 11:49:59 +08:00
<ai-title slot="title" title="融资需求" :isShowBottomBorder="false" :isShowArea="currIndex == 1 && showList" v-model="areaId" :instance="instance" @change="changeArea"/>
2022-04-07 19:47:59 +08:00
</template>
<template slot="tabs">
<el-tabs class="tabs-page" v-model="currIndex">
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label" :name="String(i)">
<component :is="tab.comp" v-if="currIndex==i" :ref="currIndex" :instance="instance" :dict="dict"
2022-04-08 21:09:38 +08:00
:permissions="permissions" :listType="tab.value" @goPage="goPage" :areaId="areaId"/>
2022-04-07 19:47:59 +08:00
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
<component v-if="!showList" :is="currentPage" :instance="instance" :dict="dict"
:permissions="permissions" :row="detail" @goBack="goBack"></component>
2022-02-23 09:24:55 +08:00
</section>
</template>
<script>
2022-04-08 21:09:38 +08:00
import {mapState} from "vuex";
2022-02-23 09:24:55 +08:00
import NeedsDetail from "./needsDetail";
import NeedsList from "./needsList";
2022-04-07 19:47:59 +08:00
import NeedsStatistics from "./needsStatistics";
2022-02-23 09:24:55 +08:00
export default {
name: "AppFinancingNeeds",
components: {NeedsList, NeedsDetail},
label: "融资需求",
props: {
instance: Function,
dict: Object,
permissions: Function
},
2022-04-07 19:47:59 +08:00
provide() {
return {
need: this
}
},
data() {
return {
currIndex: '0',
showList: true,
currentPage: "",
detail: {},
2022-04-08 11:49:59 +08:00
areaId: ''
2022-04-07 19:47:59 +08:00
}
},
2022-02-23 09:24:55 +08:00
computed: {
2022-04-08 21:09:38 +08:00
...mapState(['user']),
2022-04-07 19:47:59 +08:00
tabs() {
return [
{
label: "融资需求", name: "NeedsList", value: "0", comp: NeedsList, detail: NeedsDetail,
permission: ""
},
{
label: "融资统计", name: "NeedsStatistics", value: "1", comp: NeedsStatistics,
permission: ""
}
]
},
currentTab() {
return this.tabs[this.currIndex] || {}
2022-02-23 09:24:55 +08:00
}
},
created() {
2022-04-08 21:09:38 +08:00
console.log(this.user)
2022-04-08 11:49:59 +08:00
this.dict.load("productRepaymentTimeline", "financialFundPurpose","financingDemandApplyType", "enterpriseType", "dishonestPersonSituation", "administrativeSanctionType")
2022-04-08 21:09:38 +08:00
this.areaId = this.user.info.areaId || ''
2022-04-07 19:47:59 +08:00
},
methods: {
goPage(obj) {
this.currentPage = this.tabs[Number(this.currIndex)][obj.key];
obj.row && (this.detail = obj.row)
this.showList = false;
},
goBack() {
this.showList = true;
this.$nextTick(() => {
this.$refs[this.currIndex][0].getTableData();
})
},
2022-04-08 11:49:59 +08:00
changeArea() {
this.$refs[this.currIndex][0].getTableData();
}
2022-02-23 09:24:55 +08:00
}
}
</script>
<style lang="scss" scoped>
.AppFinancingNeeds {
2022-02-25 14:08:38 +08:00
height: 100%;
2022-02-23 09:24:55 +08:00
}
</style>