FengXianSaoMiaoDet.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <!--
  2. * @Description:
  3. * @Author: 狼牙
  4. * @Email: huangxiaoming@winhc.cn
  5. * @Date: 2022-04-19 19:42:09
  6. * @LastEditTime: 2022-04-20 21:20:39
  7. * @LastEditors: 狼牙
  8. -->
  9. <template>
  10. <van-row :class="['fenxiansaomiaodet',loadingSkeleton?'oth':'']">
  11. <van-row class="fxsmmd-det">
  12. <van-row class='fxsmd-top'>
  13. <van-row class="fxsmd-top-left">
  14. <van-col class="fxsmd-top-left-img">
  15. <Logo :name='$route.query.companyName' :companyId='$route.query.companyId' defaultPic='company' width='36px'/>
  16. </van-col>
  17. <van-col class="fxsmd-top-left-gs">{{companyName}}</van-col>
  18. </van-row>
  19. </van-row>
  20. <div class="bzDetail" v-if="sXData.numVOList">
  21. <div class="bz-top">
  22. <div class="its" v-for="(item,index) in numVOList" :key="index" @click="goNativeHandle(item)" :class="{'gray':(item.currentNum + item.historyNum) == 0}">
  23. <p>{{filteTypes(item.creditPunishmentType)}}</p>
  24. <p class="num" :class="{'gray':(item.currentNum) == 0}">{{item.currentNum}}<span :class="{'gray':(item.historyNum) == 0}">(历史{{item.historyNum}})</span></p>
  25. </div>
  26. </div>
  27. <div class="nz-btm" @click="goBzNativeHandle">
  28. <div class="its">
  29. <p class="tp">累计被执行人总金额</p>
  30. <p class="bt">{{sXData.totalExecAmount}}万元</p>
  31. </div>
  32. <div class="its">
  33. <p class="tp">疑似当前欠款总金额</p>
  34. <p class="bt">{{sXData.totalNoExecAmount}}万元</p>
  35. <img src="@/assets/img/goRight.png" alt="" class="gright">
  36. </div>
  37. </div>
  38. </div>
  39. <van-skeleton title :row="20" :loading="loadingSkeleton">
  40. <van-tabs
  41. v-model="activeName"
  42. @change="onChangeTab"
  43. color="#088BFE"
  44. title-active-color="#088BFE"
  45. swipeable
  46. line-width='30px'
  47. sticky
  48. >
  49. <van-tab :title="'自身风险'+zsCount" name="zsfx" title-style="font-weight:bold" :style='minstyle'>
  50. <yhc-zishenfenxian :zishenfengxianList='zishenfengxianList' :companyName ="companyName" :personName="personName" types="自身风险" fixed.sync="fixed" @getGuanLianData="getGuanLianData" :activeName="activeName" :showNoData="showZsNoData"></yhc-zishenfenxian>
  51. </van-tab>
  52. <van-tab :title="'关联风险'+glCount" name="glfx" title-style="font-weight:bold" :style='minstyle'>
  53. <yhc-zishenfenxian :zishenfengxianList='guanlianfengxianList' :companyName ="companyName" :personName="personName" types="关联风险" fixed.sync="fixed" @getGuanLianData="getGuanLianData" :activeName="activeName" :showNoData="showGlNoData"></yhc-zishenfenxian>
  54. </van-tab>
  55. </van-tabs>
  56. </van-skeleton>
  57. </van-row>
  58. <VipQuan :isShow='isShowQuan' @changeShow="changShow" :quanData="quanData" @refreshHandle="refreshHandle"></VipQuan>
  59. </van-row>
  60. </template>
  61. <script lang="ts">
  62. import $axios from '@/api'
  63. import fxcomponent from './components/tabs.vue';
  64. import Logo from '@/components/Global/Avatar.vue';
  65. import { $goDetail ,$openBuyVipPopup} from "@/utils/utils"
  66. import VipQuan from '@/components/Global/VipQuan.vue'
  67. export default {
  68. data() {
  69. return {
  70. loadingSkeleton:true,
  71. personName:this.$route.query.personName,
  72. companyName:this.$route.query.companyName,//河南亚华安全玻璃有限公司
  73. minstyle:{
  74. minHeight:(document.body.clientHeight-90)+'px'
  75. },
  76. fixed:false,
  77. activeName: 'zsfx',
  78. zsCount:0,
  79. glCount:0,
  80. guanlianfengxianList:[],
  81. zishenfengxianList:[],
  82. showZsNoData:false,
  83. showGlNoData:false,
  84. isFirstZs:true,
  85. isFirstGl:true,
  86. isMonitor:false,
  87. numVOList:[],
  88. sXData:{},
  89. isShowQuan:false,
  90. quanData:{},
  91. voucherCode:''
  92. }
  93. },
  94. components: {
  95. Logo,
  96. 'yhc-zishenfenxian':fxcomponent,
  97. VipQuan
  98. },
  99. mounted () {
  100. document.title = '风险扫描'
  101. //获取是自身风险还是个人风险
  102. this.activeName = this.$route.query.fengxianType || 'zsfx'
  103. this.zsCount = this.$route.query.zsCount || 0;
  104. this.glCount = this.$route.query.glCount || 0;
  105. this.loadingSkeleton = true;
  106. window.callBackOpenVipPopup= this.getGuanLianData;
  107. if(this.$signTagKey){
  108. this.voucherCode = this.$signTagKey;
  109. }
  110. this.getRiskInfo();
  111. this.getBzDataInfo();
  112. this.getGuanLianData();
  113. window.addEventListener('scroll', this.handleScroll, true);
  114. },
  115. destroyed () {
  116. window.removeEventListener('scroll', this.handleScroll, true);
  117. },
  118. methods: {
  119. changShow(){
  120. this.isShowQuan = false;
  121. },
  122. refreshHandle(data){
  123. this.isShowQuan = false;
  124. this.voucherCode = data;
  125. this.$nextTick(()=>{
  126. this.getGuanLianData()
  127. })
  128. },
  129. handleScroll () {
  130. let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
  131. // console.log("scrollTop====",scrollTop)
  132. let limitTop = this.sXData.numVOList?220:57;
  133. if(scrollTop >= limitTop){
  134. this.fixed = true;
  135. }else{
  136. this.fixed =false
  137. }
  138. },
  139. goNativeHandle(item){
  140. if(item.currentNum + item.historyNum == 0){
  141. return
  142. }
  143. if(item.currentNum != 0 ){
  144. $goDetail(item.currentRouting)
  145. return
  146. }
  147. if(item.currentNum == 0 && item.historyNum > 0){
  148. $goDetail(item.historyRouting)
  149. return
  150. }
  151. },
  152. goBzNativeHandle(){
  153. let sXData = this.sXData;
  154. $goDetail(`SxXgDataDet?totalExecAmount=${sXData.totalExecAmount}&totalNoExecAmount=${sXData.totalNoExecAmount}&zxrTotalExecAmount=${sXData.zxrTotalExecAmount}&finalCaseExecAmount=${sXData.finalCaseExecAmount}&finalCaseNoExecAmount=${sXData.finalCaseNoExecAmount}&noExecPercent=${sXData.noExecPercent || ''}`)
  155. },
  156. //获取失信限制高数据
  157. async getBzDataInfo(){
  158. try {
  159. let sendData = {
  160. // 'entityId':this.$route.query.companyId,
  161. 'entityName':this.companyName,
  162. 'entityType':0
  163. }
  164. let res = await $axios.post('winhc-justice-service/credit/count',sendData)
  165. console.log("失信限高=",res)
  166. this.sXData = res || {};
  167. this.numVOList = res.numVOList;
  168. } catch (error) {
  169. }
  170. },
  171. async getRiskInfo(){//获取自身和关联风险数量
  172. try {
  173. let sendData = {
  174. 'entityType':'2',
  175. 'keyWord':this.companyName
  176. }
  177. let res = await $axios.get('lawyer-workbench/risk/summary',{params:sendData})
  178. console.log('风险数量=',res);
  179. res.forEach((e)=>{
  180. if(e.riskScanType == '1'){
  181. this.zsCount = e.total || 0;
  182. }else if(e.riskScanType == '2'){
  183. this.glCount = e.total || 0;
  184. }
  185. })
  186. } catch (error) {
  187. }
  188. },
  189. getGuanLianData:async function(data={}){
  190. let sendData = {
  191. entityType:'2',
  192. riskScanType:this.activeName == 'zsfx'?'1':this.activeName == 'glfx'?'2':'',
  193. entityId:this.$route.query.companyId,
  194. entityName:this.companyName
  195. }
  196. sendData = {...sendData,...data}
  197. if(this.voucherCode){
  198. sendData.voucherCode = this.voucherCode;
  199. }
  200. try {
  201. let res = await $axios.post('lawyer-workbench/risk/summary/infos',sendData)
  202. console.log('企业风险扫描=',res);
  203. if(this.activeName == 'zsfx'){
  204. this.isFirstZs = false;
  205. if(res.length == 0){
  206. this.showZsNoData = true;
  207. }else{
  208. this.showZsNoData = false;
  209. }
  210. this.zishenfengxianList = res;
  211. }else if(this.activeName == 'glfx'){
  212. this.isFirstGl = false;
  213. if(res.length == 0){
  214. this.showGlNoData = true;
  215. }else{
  216. this.showGlNoData = false;
  217. }
  218. this.guanlianfengxianList = res ;
  219. }
  220. this.loadingSkeleton = false;
  221. } catch (error) {
  222. this.loadingSkeleton = false;
  223. if(error.errorCode == '79'){
  224. let tempData = JSON.parse(error.errorMsg)
  225. if(tempData.voucherCount > 0){
  226. this.isShowQuan = true;
  227. this.quanData = tempData;
  228. }else{//VIP购买弹框
  229. $openBuyVipPopup(12)
  230. }
  231. }
  232. }
  233. },
  234. onChangeTab(name,title) {
  235. // console.log('name=',name)+'---' +title;
  236. this.activeName = name;
  237. if(name == 'zsfx'){
  238. if(this.isFirstZs){
  239. this.getGuanLianData()
  240. }
  241. }else if(name == 'glfx'){
  242. if(this.isFirstGl){
  243. this.getGuanLianData()
  244. }
  245. }
  246. },
  247. getXZCFNum(list){
  248. let num = 0;
  249. if(list.__proto__.constructor == Array){//instanceof
  250. list.forEach(e => {
  251. num +=e.count*1;
  252. });
  253. }else{
  254. num = list
  255. }
  256. return num
  257. },
  258. filteTypes(val){
  259. let type = ""
  260. if(val){
  261. switch (val) {
  262. case 1:type = '被执行人'; break;
  263. case 2:type = '失信信息'; break;
  264. case 3:type = '限制高消费'; break;
  265. case 4:type = '终本案件'; break;
  266. }
  267. }
  268. return type
  269. }
  270. },
  271. }
  272. </script>
  273. <style lang='scss'>
  274. @import "@/style/fxsm.scss";
  275. </style>