Commit d79c46c9 authored by danfuman's avatar danfuman

修改

parent 4e2bbb1c
...@@ -31,183 +31,183 @@ ...@@ -31,183 +31,183 @@
</template> </template>
<script> <script>
import { financial } from '@/api/detail/party-a/financial' import { financial } from '@/api/detail/party-a/financial'
export default { export default {
name: 'Sidebar', name: 'Sidebar',
props: { props: {
partBoxHeight: { partBoxHeight: {
type: Number, type: Number,
default: null default: null
}, },
pathName: { pathName: {
type: String, type: String,
default: null default: null
}, },
customerId: { customerId: {
type: String, type: String,
default: '' default: ''
}, },
isCompany: { isCompany: {
type: Boolean, type: Boolean,
default: true default: true
},
statisticObj:{
type:Object,
default: {}
},
isCustomer: {
type: Boolean,
default: false
}
}, },
statisticObj:{ data() {
type:Object, return {
default: {} searchText: '',
sideRoute: [
{title: '企业概要', pathName: '', children: [
{title: '企业速览', pathName: 'overview'},
{title: '工商信息', pathName: 'businfo'},
{title: '股东信息', pathName: 'holderinfo'},
{title: '高管信息', pathName: 'execuinfo'},
{title: '对外投资', pathName: 'overseas'},
{title: '分支机构', pathName: 'branch'}
]},
{title: '财务简析', pathName: 'financial'},
{title: '项目商机', pathName: '', children: [
{title: '土地交易', pathName: 'landtransaction'},
{title: '拟建项目', pathName: 'proposed'},
{title: '专项债项目', pathName: 'bond'},
{title: '招标计划', pathName: 'biddingplan'},
{title: '招标公告', pathName: 'announcement'},
{title: '标讯Pro', pathName: 'tencent'},
{title: '行政许可', pathName: 'administrative'}
]},
{title: '业务往来', pathName: '', children: [
{title: '客户', pathName: 'custom'},
{title: '供应商', pathName: 'supplier'},
{title: '招标代理', pathName: 'bidagency'},
{title: '历史发包', pathName: 'hiscontract'},
{title: '开标记录', pathName: 'bidrecords'}
]},
{title: '城投分析', pathName: '', children: [
{title: '区域经济', pathName: 'regionalEconomies'},
{title: '城投拿地', pathName: 'landAcquisition'},
{title: '同地区城投', pathName: 'sameRegion'}
]},
{title: '风险信息', pathName: '', children: [
{title: '行政处罚', pathName: 'punish'},
{title: '经营异常', pathName: 'businessAnomaly'},
{title: '被执行人', pathName: 'ifThePerson'},
{title: '失信被执行人', pathName: 'dishonesty'},
{title: '裁判文书', pathName: 'judgment'},
{title: '法院公告', pathName: 'courtNotice'},
{title: '开庭公告', pathName: 'openacourtsessionNotice'},
// {title: '信用中国', pathName: ''}
]},
{title: '商务信息', pathName: 'business'},
{title: '招标偏好', pathName: 'preference'},
{title: '合作情况', pathName: 'cooperate'},
{title: '联系人', pathName: 'decisionMaking'},
{title: '跟进记录', pathName: 'gjjl'}
],
sideRoute1: [
{title: '企业概要', pathName: '', children: [
{title: '企业速览', pathName: 'overview'},
{title: '工商信息', pathName: 'businfo'},
{title: '股东信息', pathName: 'holderinfo'},
{title: '高管信息', pathName: 'execuinfo'},
{title: '对外投资', pathName: 'overseas'},
{title: '分支机构', pathName: 'branch'}
]},
{title: '财务简析', pathName: 'financial'},
{title: '项目商机', pathName: '', children: [
{title: '土地交易', pathName: 'landtransaction'},
{title: '拟建项目', pathName: 'proposed'},
{title: '专项债项目', pathName: 'bond'},
{title: '招标计划', pathName: 'biddingplan'},
{title: '招标公告', pathName: 'announcement'},
{title: '标讯Pro', pathName: 'tencent'},
{title: '行政许可', pathName: 'administrative'}
]},
{title: '业务往来', pathName: '', children: [
{title: '客户', pathName: 'custom'},
{title: '供应商', pathName: 'supplier'},
{title: '招标代理', pathName: 'bidagency'},
{title: '历史发包', pathName: 'hiscontract'},
{title: '开标记录', pathName: 'bidrecords'}
]},
{title: '城投分析', pathName: '', children: [
{title: '区域经济', pathName: 'regionalEconomies'},
{title: '城投拿地', pathName: 'landAcquisition'},
{title: '同地区城投', pathName: 'sameRegion'}
]},
{title: '风险信息', pathName: '', children: [
{title: '行政处罚', pathName: 'punish'},
{title: '经营异常', pathName: 'businessAnomaly'},
{title: '被执行人', pathName: 'ifThePerson'},
{title: '失信被执行人', pathName: 'dishonesty'},
{title: '裁判文书', pathName: 'judgment'},
{title: '法院公告', pathName: 'courtNotice'},
{title: '开庭公告', pathName: 'openacourtsessionNotice'},
// {title: '信用中国', pathName: ''}
]},
{title: '商务信息', pathName: 'business'},
{title: '招标偏好', pathName: 'preference'},
{title: '合作情况', pathName: 'cooperate'},
{title: '联系人', pathName: 'decisionMaking'},
{title: '跟进记录', pathName: 'gjjl'}
],
defaultRoute: [],
customer:[
'business',
'preference',
'cooperate',
'decisionMaking',
'gjjl'
],
companys:[
'企业概要',
'财务简析',
'项目商机',
'业务往来',
'城投分析',
'风险信息',
],
uniqueOpened:false,
searchIndex: ''
}
}, },
isCustomer: { computed: {
type: Boolean, sideHeight() {
default: false let sideHeight = document.getElementById("detailPart")?document.getElementById("detailPart").offsetHeight:null, bowerHeight = document.body.clientHeight-170 || null
} if(this.partBoxHeight<bowerHeight) {
}, sideHeight = bowerHeight
data() { }else{
return { sideHeight = '1222'/*this.partBoxHeight*/
searchText: '', }
sideRoute: [ return sideHeight
{title: '企业概要', pathName: '', children: [ },
{title: '企业速览', pathName: 'overview'}, routeIndex(){
{title: '工商信息', pathName: 'businfo'}, let idx = this.getRouteIdx('', this.pathName) || '0-0'
{title: '股东信息', pathName: 'holderinfo'}, return idx
{title: '高管信息', pathName: 'execuinfo'},
{title: '对外投资', pathName: 'overseas'},
{title: '分支机构', pathName: 'branch'}
]},
{title: '财务简析', pathName: 'financial'},
{title: '项目商机', pathName: '', children: [
{title: '土地交易', pathName: 'landtransaction'},
{title: '拟建项目', pathName: 'proposed'},
{title: '专项债项目', pathName: 'bond'},
{title: '招标计划', pathName: 'biddingplan'},
{title: '招标公告', pathName: 'announcement'},
{title: '标讯Pro', pathName: 'tencent'},
{title: '行政许可', pathName: 'administrative'}
]},
{title: '业务往来', pathName: '', children: [
{title: '客户', pathName: 'custom'},
{title: '供应商', pathName: 'supplier'},
{title: '招标代理', pathName: 'bidagency'},
{title: '历史发包', pathName: 'hiscontract'},
{title: '开标记录', pathName: 'bidrecords'}
]},
{title: '城投分析', pathName: '', children: [
{title: '区域经济', pathName: 'regionalEconomies'},
{title: '城投拿地', pathName: 'landAcquisition'},
{title: '同地区城投', pathName: 'sameRegion'}
]},
{title: '风险信息', pathName: '', children: [
{title: '行政处罚', pathName: 'punish'},
{title: '经营异常', pathName: 'businessAnomaly'},
{title: '被执行人', pathName: 'ifThePerson'},
{title: '失信被执行人', pathName: 'dishonesty'},
{title: '裁判文书', pathName: 'judgment'},
{title: '法院公告', pathName: 'courtNotice'},
{title: '开庭公告', pathName: 'openacourtsessionNotice'},
// {title: '信用中国', pathName: ''}
]},
{title: '商务信息', pathName: 'business'},
{title: '招标偏好', pathName: 'preference'},
{title: '合作情况', pathName: 'cooperate'},
{title: '联系人', pathName: 'decisionMaking'},
{title: '跟进记录', pathName: 'gjjl'}
],
sideRoute1: [
{title: '企业概要', pathName: '', children: [
{title: '企业速览', pathName: 'overview'},
{title: '工商信息', pathName: 'businfo'},
{title: '股东信息', pathName: 'holderinfo'},
{title: '高管信息', pathName: 'execuinfo'},
{title: '对外投资', pathName: 'overseas'},
{title: '分支机构', pathName: 'branch'}
]},
{title: '财务简析', pathName: 'financial'},
{title: '项目商机', pathName: '', children: [
{title: '土地交易', pathName: 'landtransaction'},
{title: '拟建项目', pathName: 'proposed'},
{title: '专项债项目', pathName: 'bond'},
{title: '招标计划', pathName: 'biddingplan'},
{title: '招标公告', pathName: 'announcement'},
{title: '标讯Pro', pathName: 'tencent'},
{title: '行政许可', pathName: 'administrative'}
]},
{title: '业务往来', pathName: '', children: [
{title: '客户', pathName: 'custom'},
{title: '供应商', pathName: 'supplier'},
{title: '招标代理', pathName: 'bidagency'},
{title: '历史发包', pathName: 'hiscontract'},
{title: '开标记录', pathName: 'bidrecords'}
]},
{title: '城投分析', pathName: '', children: [
{title: '区域经济', pathName: 'regionalEconomies'},
{title: '城投拿地', pathName: 'landAcquisition'},
{title: '同地区城投', pathName: 'sameRegion'}
]},
{title: '风险信息', pathName: '', children: [
{title: '行政处罚', pathName: 'punish'},
{title: '经营异常', pathName: 'businessAnomaly'},
{title: '被执行人', pathName: 'ifThePerson'},
{title: '失信被执行人', pathName: 'dishonesty'},
{title: '裁判文书', pathName: 'judgment'},
{title: '法院公告', pathName: 'courtNotice'},
{title: '开庭公告', pathName: 'openacourtsessionNotice'},
// {title: '信用中国', pathName: ''}
]},
{title: '商务信息', pathName: 'business'},
{title: '招标偏好', pathName: 'preference'},
{title: '合作情况', pathName: 'cooperate'},
{title: '联系人', pathName: 'decisionMaking'},
{title: '跟进记录', pathName: 'gjjl'}
],
defaultRoute: [],
customer:[
'business',
'preference',
'cooperate',
'decisionMaking',
'gjjl'
],
companys:[
'企业概要',
'财务简析',
'项目商机',
'业务往来',
'城投分析',
'风险信息',
],
uniqueOpened:false,
searchIndex: ''
}
},
computed: {
sideHeight() {
let sideHeight = document.getElementById("detailPart")?document.getElementById("detailPart").offsetHeight:null, bowerHeight = document.body.clientHeight-170 || null
if(this.partBoxHeight<bowerHeight) {
sideHeight = bowerHeight
}else{
sideHeight = '1222'/*this.partBoxHeight*/
} }
return sideHeight
}, },
routeIndex(){ created() {
let idx = this.getRouteIdx('', this.pathName) || '0-0' this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute))
return idx },
} watch:{
}, statisticObj:{
created() { handler(val) {
this.financial() this.sideRoute = JSON.parse(JSON.stringify(this.defaultRoute))
}, let arr = JSON.parse(JSON.stringify(val))
watch:{ for(var i in arr){
statisticObj:{ for(var j in arr[i]){
handler(val) { switch (j) {
this.sideRoute = JSON.parse(JSON.stringify(this.defaultRoute)) case 'ownershipStructure':
let arr = JSON.parse(JSON.stringify(val)) if(arr[i][j]<1){
for(var i in arr){ this.sideRoute[0].children[2].disabled = true;
for(var j in arr[i]){ }
switch (j) { break;
case 'ownershipStructure':
if(arr[i][j]<1){
this.sideRoute[0].children[2].disabled = true;
}
break;
case 'leadingMember': case 'leadingMember':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[0].children[3].disabled = true; this.sideRoute[0].children[3].disabled = true;
...@@ -235,187 +235,187 @@ export default { ...@@ -235,187 +235,187 @@ export default {
} }
break; break;
case 'specialDebt': case 'specialDebt':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[2].children[2].disabled = true; this.sideRoute[2].children[2].disabled = true;
} }
break; break;
case 'bidPlan': case 'bidPlan':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[2].children[3].disabled = true; this.sideRoute[2].children[3].disabled = true;
} }
break; break;
case 'biddingAnnouncement': case 'biddingAnnouncement':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[2].children[4].disabled = true; this.sideRoute[2].children[4].disabled = true;
} }
break; break;
case 'proBiddingAnnouncement': case 'proBiddingAnnouncement':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[2].children[5].disabled = true; this.sideRoute[2].children[5].disabled = true;
} }
break; break;
case 'adminLicensing': case 'adminLicensing':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[2].children[6].disabled = true; this.sideRoute[2].children[6].disabled = true;
} }
break; break;
case 'customer': case 'customer':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[3].children[0].disabled = true; this.sideRoute[3].children[0].disabled = true;
} }
break; break;
case 'supplier': case 'supplier':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[3].children[1].disabled = true; this.sideRoute[3].children[1].disabled = true;
} }
break; break;
case 'coopBiddingAgency': case 'coopBiddingAgency':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[3].children[2].disabled = true; this.sideRoute[3].children[2].disabled = true;
} }
break; break;
case 'historySend': case 'historySend':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[3].children[3].disabled = true; this.sideRoute[3].children[3].disabled = true;
} }
break; break;
case 'tenderRecordV1': case 'tenderRecordV1':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[3].children[4].disabled = true; this.sideRoute[3].children[4].disabled = true;
} }
break; break;
case 'adminSanction': case 'adminSanction':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[5].children[0].disabled = true; this.sideRoute[5].children[0].disabled = true;
} }
break; break;
case 'abnormalOperation': case 'abnormalOperation':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[5].children[1].disabled = true; this.sideRoute[5].children[1].disabled = true;
} }
break; break;
case 'dishonestExecutee': case 'dishonestExecutee':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[5].children[2].disabled = true; this.sideRoute[5].children[2].disabled = true;
} }
break; break;
case 'dishonestExecutor': case 'dishonestExecutor':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[5].children[3].disabled = true; this.sideRoute[5].children[3].disabled = true;
} }
break; break;
case 'adjudicativeDoc': case 'adjudicativeDoc':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[5].children[4].disabled = true; this.sideRoute[5].children[4].disabled = true;
} }
break; break;
case 'courtAnnouncement': case 'courtAnnouncement':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[5].children[5].disabled = true; this.sideRoute[5].children[5].disabled = true;
} }
break; break;
case 'openAnnouncement': case 'openAnnouncement':
if(arr[i][j]<1){ if(arr[i][j]<1){
this.sideRoute[5].children[6].disabled = true; this.sideRoute[5].children[6].disabled = true;
} }
break; break;
default: default:
break; break;
}
} }
} }
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute))
} }
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute)) },
}
},
},
methods: {
financial(id){
financial({cid:String(id)}).then(res=>{
if(res.code==200&&!res.data){
this.sideRoute[1].disabled = true
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute))
}
})
}, },
handleOpen(key, keyPath) { methods: {
financial(id){
financial({cid:String(id)}).then(res=>{
if(res.code==200&&!res.data){
this.sideRoute[1].disabled = true
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute))
}
})
},
handleOpen(key, keyPath) {
}, },
handleItem(item){ handleItem(item){
let obj = item let obj = item
for(var i in this.sideRoute1){ for(var i in this.sideRoute1){
if(this.sideRoute1[i].children){ if(this.sideRoute1[i].children){
for(var j in this.sideRoute1[i].children){ for(var j in this.sideRoute1[i].children){
if(item.title == this.sideRoute1[i].children[j].title){ if(item.title == this.sideRoute1[i].children[j].title){
console.log(this.sideRoute1[i].children[j]) console.log(this.sideRoute1[i].children[j])
obj.pathName = this.sideRoute1[i].children[j].pathName obj.pathName = this.sideRoute1[i].children[j].pathName
}
}
}else{
if(item.title == this.sideRoute1[i].title){
obj.pathName = this.sideRoute1[i].pathName
} }
}
}else{
if(item.title == this.sideRoute1[i].title){
obj.pathName = this.sideRoute1[i].pathName
} }
} }
} this.$emit("currentPath", obj)
this.$emit("currentPath", obj) },
}, handleSearch(flag){
handleSearch(flag){ if((this.searchText&&!flag) || (!this.searchText&&flag)){
if((this.searchText&&!flag) || (!this.searchText&&flag)){ let idx = this.getRouteIdx(this.searchText)
let idx = this.getRouteIdx(this.searchText) if(idx){
if(idx){ if(idx.includes('-')){
if(idx.includes('-')){ let openIdx = idx.slice(0, 1)
let openIdx = idx.slice(0, 1) this.sideRoute = [this.defaultRoute[openIdx]]
this.sideRoute = [this.defaultRoute[openIdx]] this.$refs.sideMenu.open(openIdx)
this.$refs.sideMenu.open(openIdx) }else{
this.sideRoute = [this.defaultRoute[idx]]
}
this.searchIndex = '-1'
}else{ }else{
this.sideRoute = [this.defaultRoute[idx]] this.sideRoute = this.defaultRoute
this.searchIndex = ''
} }
this.searchIndex = '-1'
}else{
this.sideRoute = this.defaultRoute
this.searchIndex = ''
} }
} },
}, getRouteIdx(pathTitle, pathName){
getRouteIdx(pathTitle, pathName){ let idx = '', sideArr = this.sideRoute==this.defaultRoute?this.sideRoute:this.defaultRoute
let idx = '', sideArr = this.sideRoute==this.defaultRoute?this.sideRoute:this.defaultRoute for(let i=0; i < sideArr.length; i++){
for(let i=0; i < sideArr.length; i++){ if(sideArr[i].title == pathTitle || sideArr[i].pathName == pathName){
if(sideArr[i].title == pathTitle || sideArr[i].pathName == pathName){ idx = i.toString()
idx = i.toString() break
break }else if(sideArr[i].children){
}else if(sideArr[i].children){ for(let j=0; j< sideArr[i].children.length ; j++){
for(let j=0; j< sideArr[i].children.length ; j++){ if(sideArr[i].children[j].title == pathTitle || sideArr[i].children[j].pathName == pathName){
if(sideArr[i].children[j].title == pathTitle || sideArr[i].children[j].pathName == pathName){ idx = i+'-'+j
idx = i+'-'+j break
break }
} }
} }
} }
} return idx
return idx },
}, isCustomerId(name){
isCustomerId(name){ if(this.customer.indexOf(name) != -1){
if(this.customer.indexOf(name) != -1){ if(this.customerId && this.isCustomer){
if(this.customerId && this.isCustomer){ return true
return true }
return false
} }
return false return true
} },
return true isCompanyId(name){
}, if(this.companys.indexOf(name) != -1){
isCompanyId(name){ if(this.isCompany){
if(this.companys.indexOf(name) != -1){ return true
if(this.isCompany){ }
return true return false
} }
return false return true
} }
return true
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment