<template>
|
<div>
|
<component
|
v-bind:is="componentName"
|
:conf="info"
|
:typeId="typeId"
|
v-bind="$attrs"
|
v-on="$listeners"
|
:ref="refId"
|
></component>
|
</div>
|
</template>
|
<script>
|
export default {
|
props: {
|
/**
|
* 节点信息
|
* @example
|
* { "tabname": "借款人信息", "exist": "Y", "gray": "N", "visible": "Y" }
|
*/
|
info: {
|
type: Object,
|
required: true
|
},
|
index: {
|
type: Number,
|
default: 0
|
}
|
},
|
created() {
|
// const { $route } = this
|
// const { query } = $route
|
},
|
methods: {
|
submit(isSave = 0) {
|
const { refId } = this
|
if (typeof this.$refs[refId].submit === 'function') {
|
this.$refs[refId].submit(isSave)
|
}
|
},
|
checkData() {
|
const { refId } = this
|
if (typeof this.$refs[refId].checkData === 'function') {
|
this.$refs[refId].checkData()
|
}
|
},
|
resetForm() {
|
const { refId } = this
|
if (typeof this.$refs[refId].resetForm === 'function') {
|
this.$refs[refId].resetForm()
|
}
|
},
|
showCheck() {
|
this.$emit('showCheck', true)
|
}
|
},
|
computed: {
|
componentName(item) {
|
let { info } = this
|
// console.log(this.$route.query)
|
const { pageId, transCode, tabId } = this.$route.query
|
let { tabName } = info
|
let tabComponent = null
|
if (tabName === '贷款机构信息') {
|
tabComponent = () => import('@/components/tabsLoad/LenderInfo')
|
}
|
if (tabName === '贷款机构优先级') {
|
tabComponent = () => import('@/components/tabsLoad/LenderPriority')
|
}
|
if (tabName === '基本信息') {
|
if (tabId === '1001') {
|
tabComponent = () => import('@/components/tabsLoad/BaseInfo')
|
} else if (tabId === '1002') {
|
tabComponent = () => import('@/components/tabsPocket/BaseInfo')
|
} else if (tabId === '1003') {
|
tabComponent = () => import('@/components/tabsBusiness/BaseInfo')
|
} else if (tabId === '1004') {
|
tabComponent = () => import('@/components/tabsCapital/BaseInfo')
|
}
|
}
|
|
if (tabName === '人行约束') {
|
tabComponent = () => import('@/components/tabsLoad/PersonLimit')
|
}
|
|
if (tabName === '授信约束') {
|
if (tabId === '1001') {
|
tabComponent = () => import('@/components/tabsLoad/CreditLimit')
|
} else if (tabId === '1002') {
|
tabComponent = () => import('@/components/tabsPocket/CreditLimit')
|
}
|
}
|
|
if (tabName === '放款约束') {
|
if (tabId === '1001') {
|
tabComponent = () => import('@/components/tabsLoad/LoadsLimit')
|
} else if (tabId === '1002') {
|
tabComponent = () => import('@/components/tabsPocket/LoadsLimit')
|
} else if (tabId === '1004') {
|
tabComponent = () => import('@/components/tabsCapital/CreditsCheckList')
|
}
|
}
|
|
if (tabName === '还款约束') {
|
tabComponent = () => import('@/components/tabsLoad/RepeatmentLimit')
|
}
|
|
if (tabName === '功能约束') {
|
if (tabId === '1001') {
|
// tabComponent = () => import('@/components/tabsLoad/FuncLimit')
|
tabComponent = () => import('@/components/tabsLoad/FuncTabs')
|
} else if (tabId === '1002') {
|
tabComponent = () => import('@/components/tabsPocket/FuncTabs')
|
} else if (tabId === '1003') {
|
tabComponent = () => import('@/components/tabsBusiness/FuncTabs')
|
}
|
}
|
|
if (tabName === '协议影像') {
|
tabComponent = () => import('@/components/tabsLoad/ProtocolImg')
|
}
|
|
if (tabName === '历史维护清单') {
|
tabComponent = () => import('@/components/tabsLoad/HistoryMainList')
|
}
|
|
if (tabName === '审批与流程信息') {
|
tabComponent = () => import('@/components/tabsLoad/ApprovalProcess')
|
}
|
|
if (tabName === '流程流转记录') {
|
tabComponent = () => import('@/components/tabsPocket/FlowList')
|
}
|
|
if (tabName === '审批意见') {
|
tabComponent = () => import('@/components/tabsPocket/OpinionList')
|
}
|
|
if (tabName === '业务约束') {
|
tabComponent = () => import('@/components/tabsBusiness/BusinessLimit')
|
}
|
|
if (tabName === '贷款机构清单') {
|
tabComponent = () => import('@/components/tabsCapital/LoadCheckList')
|
}
|
|
if (tabName === '出资机构清单') {
|
tabComponent = () => import('@/components/tabsCapital/OutFundCheckList')
|
}
|
|
if (tabName === '业务通道信息') {
|
tabComponent = () => import('@/components/tabsCapital/BusinessInfo')
|
}
|
|
if (tabName === '兜底机构信息') {
|
tabComponent = () => import('@/components/tabsCapital/FallBackInfo')
|
}
|
|
if (tabName === '放款/回款账户清单') {
|
tabComponent = () => import('@/components/tabsCapital/LoadRebateList')
|
}
|
|
if (tabName === '联合放款约束') {
|
tabComponent = () => import('@/components/tabsCapital/UnionLoadLimit')
|
}
|
if (tabName === '资产配置') {
|
tabComponent = () => import('@/components/tabsLoad/AssetAllocat')
|
}
|
if (tabName === '资产配置清单及比例') {
|
tabComponent = () => import('@/components/tabsCapital/AssetsConfigTabs')
|
}
|
|
return tabComponent
|
},
|
typeId() {
|
let { info } = this
|
let { tabName } = info
|
let id = ''
|
if (
|
[
|
'变更前减免信息',
|
'历史电子邮件信息',
|
'基本信息',
|
'人行约束',
|
'放款约束',
|
'还款约束',
|
'功能约束',
|
'协议影像'
|
].includes(tabName)
|
) {
|
id = 1
|
}
|
|
if (['授信约束', '历史邮寄信息'].includes(tabName)) {
|
id = 2
|
}
|
|
if (tabName === '变更申请信息') {
|
id = 3
|
}
|
return id
|
},
|
refId() {
|
const { index } = this
|
return `tabContent${index}`
|
}
|
}
|
}
|
</script>
|
<style lang="postcss" scoped>
|
</style>
|