ソースを参照

首页统计页面

dudm 3 年 前
コミット
258698797f

+ 73 - 0
front-vue/src/api/service/report/company.js

@@ -0,0 +1,73 @@
+import request from '@/utils/request'
+
+// 查询入驻企业数量
+export function getCompanyNum(query) {
+  return request({
+    url: '/sc-service/report/company/getCompanyNum',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询已融资供应商数量
+export function getFinanceSupplier(query) {
+  return request({
+    url: '/sc-service/report/company/getFinanceSupplier',
+    method: 'get',
+    params: query
+  })
+}
+
+// 融资业务数量
+export function getFinanceNum(query) {
+  return request({
+    url: '/sc-service/report/company/getFinanceNum',
+    method: 'get',
+    params: query
+  })
+}
+
+// 平台用户统计 -- 柱状图
+export function getCompanyReport(query) {
+  return request({
+    url: '/sc-service/report/company/getCompanyReport',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业渠道融信授权额度 -- 列表
+export function getCreditLineList(query) {
+  return request({
+    url: '/sc-service/report/credit/getCreditLineList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业渠道融信开立数量 -- 列表
+export function getCreditLineNumList(query) {
+  return request({
+    url: '/sc-service/report/credit/getCreditLineNumList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 融资开立月度统计 -- 柱状图
+export function financeRecordMonth(query) {
+  return request({
+    url: '/sc-service/report/credit/financeRecordMonth',
+    method: 'get',
+    params: query
+  })
+}
+
+// 融资开立最近30天统计 -- 柱状图
+export function financeRecord(query) {
+  return request({
+    url: '/sc-service/report/credit/financeRecord',
+    method: 'get',
+    params: query
+  })
+}

+ 109 - 0
front-vue/src/api/service/report/credit.js

@@ -0,0 +1,109 @@
+import request from '@/utils/request'
+
+// 查询企业持有融信额度
+export function getCreditLineAll(query) {
+  return request({
+    url: '/sc-service/report/credit/getCreditLineAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 企业融资中额度
+export function getAvailableBalance(query) {
+  return request({
+    url: '/sc-service/report/credit/getAvailableBalance',
+    method: 'get',
+    params: query
+  })
+}
+
+// 企业已生效额度
+export function getEffectBalance(query) {
+  return request({
+    url: '/sc-service/report/credit/getEffectBalance',
+    method: 'get',
+    params: query
+  })
+}
+
+// 企业已放款额度
+export function getLoanBalance(query) {
+  return request({
+    url: '/sc-service/report/credit/getLoanBalance',
+    method: 'get',
+    params: query
+  })
+}
+
+// 企业即将到期额度(30天)
+export function getExpiredBalance(query) {
+  return request({
+    url: '/sc-service/report/credit/getExpiredBalance',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询平台资金 -- 饼图
+export function getFinanceAmount(query) {
+  return request({
+    url: '/sc-service/report/credit/getFinanceAmount',
+    method: 'get',
+    params: query
+  })
+}
+
+// 核心企业额度比例 -- 柱状图
+export function getFinanceAmountAll(query) {
+  return request({
+    url: '/sc-service/report/credit/getFinanceAmountAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询核心企业融信授权额度 -- 饼图
+export function getCoreCreditLine(query) {
+  return request({
+    url: '/sc-service/report/credit/getCoreCreditLine',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业渠道融信授权额度 -- 列表
+export function getCreditLineList(query) {
+  return request({
+    url: '/sc-service/report/credit/getCreditLineList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业渠道融信开立数量 -- 列表
+export function getCreditLineNumList(query) {
+  return request({
+    url: '/sc-service/report/credit/getCreditLineNumList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 融资开立月度统计 -- 柱状图
+export function financeRecordMonth(query) {
+  return request({
+    url: '/sc-service/report/credit/financeRecordMonth',
+    method: 'get',
+    params: query
+  })
+}
+
+// 融资开立最近30天统计 -- 柱状图
+export function financeRecord(query) {
+  return request({
+    url: '/sc-service/report/credit/financeRecord',
+    method: 'get',
+    params: query
+  })
+}

+ 1 - 1
front-vue/src/api/system/notice.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询公告列表
 export function listNotice(query) {
   return request({
-    url: '/system/notice/list',
+    url: '/system/ownNotice/list',
     method: 'get',
     params: query
   })

+ 2 - 3
front-vue/src/components/Echart/bar/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <Empty
+  <el-empty
     v-if="isSeriesEmpty"
     description="暂无数据"
     class="custom-image"
@@ -11,11 +11,10 @@
 <script>
 import { isEmpty } from "lodash";
 import ChartBar from "./echart_bar.vue";
-import { Empty } from "vant";
 
 export default {
   name: "EchartBar",
-  components: { ChartBar, Empty },
+  components: { ChartBar },
   props: ChartBar.props,
   computed: {
     // 针对饼图数据是不是无效的判断

+ 2 - 3
front-vue/src/components/Echart/pie/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <Empty
+  <el-empty
     v-if="isSeriesEmpty"
     description="暂无数据"
     class="custom-image"
@@ -11,11 +11,10 @@
 <script>
 import { isEmpty } from "lodash";
 import ChartPie from "./echart_pie.vue";
-import { Empty } from "vant";
 
 export default {
   name: "EchartPie",
-  components: { ChartPie, Empty },
+  components: { ChartPie },
   props: ChartPie.props,
   computed: {
     // 针对饼图数据是不是无效的判断

+ 5 - 0
front-vue/src/router/index.js

@@ -69,6 +69,11 @@ export const constantRoutes = [
     hidden: true
   },
   {
+    path: '/home',
+    component: (resolve) => require(['@/views/home'], resolve),
+    hidden: true
+  },
+  {
     path: '/404',
     component: (resolve) => require(['@/views/error/404'], resolve),
     hidden: true

+ 816 - 0
front-vue/src/views/home.vue

@@ -0,0 +1,816 @@
+<template >
+    <div id="">
+        <!-- 平台 -->
+        <div v-if="company.scyType == '00'">
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">入驻企业总数</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{companyNum}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">已融资/供应商入住数量</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{financeSupplierNum + '/' + supplierNum}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">入驻核心企业数</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{coreNum}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">总融资金额</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{getFinancedNum()}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">融资中金额</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{availableBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">已放款金额</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{loanBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">发起融资业务数</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{financeNum}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">核心企业总授信额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{creditLineAll}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">剩余可用授信</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{getsubNum()}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">平台资金统计</span>
+                </div>
+                <div class="text item" style="height:650px">
+                    <echart-pie :series-data="financeAmountList" :extra-option="extraOption"/>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">平台用户统计</span>
+                </div>
+                <div class="text item" style="height:650px">
+                    <el-select v-model="dateType" @change="getCompanyReport">
+                        <el-option v-for="(item,index) in dateTypeList" :key="index" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                    <echart-bar :series-data="companyDataList" :extra-option="companyExtraOption"/>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">平台业务统计</span>
+                </div>
+                <div class="text item" style="height:650px">
+                    <el-select v-model="financeDateType" @change="getFinanceRecordMonth">
+                        <el-option v-for="(item,index) in dateTypeList" :key="index" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                    <echart-bar :series-data="yearDataList" :extra-option="yearExtraOption"/>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">核心企业可用额度比例</span>
+                </div>
+                <div class="text item" style="height:650px">
+                    <echart-bar :series-data="coreFinanceAmountList" :extra-option="coreFinanceAmountExtraOption"/>
+                </div>
+            </el-card>
+        </div>
+
+        <!-- 核心企业 -->
+        <div v-if="company.scyType == '01'">
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">我开立的融信</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{getFinancedNum()}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">可用授权额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{getsubNum()}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">即将到期付款</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{expiredBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">我的代办</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{workTotal}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">可用授权额度(正向保理)</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{getsubNumForward()}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">总授权额度(正向保理)</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{getFinancedNumForward()}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
+                <div class="text item">
+                    <el-tabs v-model="activeName">
+                        <el-tab-pane label="我的待办" name="first" style="height:400px">
+                            <el-table :data="workList" :show-header="false">
+                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
+                                <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
+                            </el-table>
+                            
+                            <pagination
+                            v-show="workTotal>0"
+                            :total="workTotal"
+                            :page.sync="queryParamsWork.pageNum"
+                            :limit.sync="queryParamsWork.pageSize"
+                            :pager-count="5"
+                            :page-sizes="[5]"
+                            @pagination="getWorkList"
+                            />
+                        </el-tab-pane>
+                        <el-tab-pane label="消息" name="second" style="height:400px">
+                            <el-table :data="noticeList" :show-header="false">
+                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
+                                <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
+                            </el-table>
+                            
+                            <pagination
+                            v-show="noticeTotal>0"
+                            :total="noticeTotal"
+                            :page.sync="queryParamsNotice.pageNum"
+                            :limit.sync="queryParamsNotice.pageSize"
+                            :pager-count="5"
+                            :page-sizes="[5]"
+                            @pagination="getNoticeList"
+                            />
+                        </el-tab-pane>
+                    </el-tabs>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:59%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">融信授权额度</span>
+                </div>
+                <div class="text item">
+                    <echart-pie :series-data="dataList" :extra-option="extraOption" style="height:200px;width:40%;float:left"/>
+                    <div style="height:300px;width:60%;float:right">
+                        <el-table :data="creditLineList" border >
+                            <el-table-column label="渠道名称" align="center" prop="managementName" :show-overflow-tooltip="true"/>
+                            <el-table-column label="额度" align="center" prop="allAmount" :show-overflow-tooltip="true"/>
+                            <el-table-column label="可用金额" align="center" prop="subAmount" :show-overflow-tooltip="true"/>
+                            <el-table-column label="已用金额" align="center" prop="availableAmount" :show-overflow-tooltip="true"/>
+                        </el-table>
+                        
+                        <pagination
+                        v-show="creditLineTotal>0"
+                        :total="creditLineTotal"
+                        :page.sync="queryParams.pageNum"
+                        :limit.sync="queryParams.pageSize"
+                        :pager-count="5"
+                        :page-sizes="[5]"
+                        @pagination="getList"
+                        />
+                    </div>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:33%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">融信统计</span>
+                </div>
+                <div class="text item">
+                    <div style="height:300px">
+                        <el-table :data="creditLineNumList" border >
+                            <el-table-column label="渠道名称" align="center" prop="managementName" :show-overflow-tooltip="true"/>
+                            <el-table-column label="数量" align="center" prop="num" :show-overflow-tooltip="true"/>
+                            <el-table-column label="额度" align="center" prop="allAmount" :show-overflow-tooltip="true"/>
+                        </el-table>
+                        
+                        <pagination
+                        v-show="creditLineNumTotal>0"
+                        :total="creditLineNumTotal"
+                        :page.sync="queryParamsNum.pageNum"
+                        :limit.sync="queryParamsNum.pageSize"
+                        :pager-count="5"
+                        :page-sizes="[5]"
+                        @pagination="getNumList"
+                        />
+                    </div>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:46%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">融资开立资金表(年)</span>
+                </div>
+                <div class="text item" style="height:300px">
+                    <echart-bar :series-data="monthDataList" :extra-option="monthExtraOption"/>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:46%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">融资开立资金表(7天内)</span>
+                </div>
+                <div class="text item" style="height:300px">
+                    <echart-bar :series-data="yearDataList" :extra-option="yearExtraOption"/>
+                </div>
+            </el-card>
+        </div>
+
+        <!-- 融资企业 -->
+        <div v-if="company.scyType == '02'">
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">持有融信额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{creditLineAll}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">融资中额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{availableBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">已融资额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{loanBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">即将到期融资额度(30天)</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{expiredBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
+                <!-- <div slot="header" class="clearfix">
+                </div> -->
+                <div class="text item" style="height:auto">
+                    <el-tabs v-model="activeName">
+                        <el-tab-pane label="我的待办" name="first" style="height:400px">
+                            <el-table :data="workList" :show-header="false">
+                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
+                                <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
+                            </el-table>
+                            
+                            <pagination
+                            v-show="workTotal>0"
+                            :total="workTotal"
+                            :page.sync="queryParamsWork.pageNum"
+                            :limit.sync="queryParamsWork.pageSize"
+                            :pager-count="5"
+                            :page-sizes="[5]"
+                            @pagination="getWorkList"
+                            />
+                        </el-tab-pane>
+                        <el-tab-pane label="消息" name="second" style="height:400px">
+                            <el-table :data="noticeList" :show-header="false">
+                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
+                                <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
+                            </el-table>
+                            
+                            <pagination
+                            v-show="noticeTotal>0"
+                            :total="noticeTotal"
+                            :page.sync="queryParamsNotice.pageNum"
+                            :limit.sync="queryParamsNotice.pageSize"
+                            :pager-count="5"
+                            :page-sizes="[5]"
+                            @pagination="getNoticeList"
+                            />
+                        </el-tab-pane>
+                    </el-tabs>
+                </div>
+            </el-card>
+        </div>
+
+        <!-- 资方 -->
+        <div v-if="company.scyType == '03'">
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">持有融信额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{creditLineAll}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">融资中额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{availableBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">已融资额度</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{loanBalance}}</span>
+                </div>
+            </el-card>
+            <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
+                <div slot="header" class="clearfix">
+                    <span style="color: #666ee8; font-weight: bold;">即将到期融资额度(30天)</span>
+                </div>
+                <div class="text item" style="height:100px">
+                    <span style="color: #666ee8; font-weight: bold;">{{expiredBalance}}</span>
+                </div>
+            </el-card>
+        </div>
+    </div>
+</template>
+<script>
+import { getCreditLineAll, getAvailableBalance, getEffectBalance, getLoanBalance, getFinanceAmount, getFinanceAmountAll, getExpiredBalance, getCoreCreditLine, getCreditLineList, getCreditLineNumList, financeRecordMonth } from '@/api/service/report/credit'
+import { getCompanyNum, getFinanceSupplier, getFinanceNum, getCompanyReport } from '@/api/service/report/company'
+import { getOwnCompany } from "@/api/common/company";
+import { accAdd, accSub } from "@/utils/calculation";
+import { listNotice } from '@/api/system/notice'
+import  EchartPie  from '@/components/Echart/pie/index'
+import  EchartBar  from '@/components/Echart/bar/index'
+export default {
+  components: {
+    EchartPie,
+    EchartBar
+  },
+    data() {
+        return {
+            widthSize:'500px',
+            heightSize:'280px',
+            companyNum: 0,
+            supplierNum: 0,
+            coreNum: 0,
+            financeSupplierNum: 0,
+            availableBalance: 0,
+            availableBalanceForward: 0,
+            loanBalance: 0,
+            loanBalanceForward: 0,
+            effectBalance: 0,
+            effectBalanceForward: 0,
+            financeNum: 0,
+            expiredBalance: 0,
+            financeAmountList: [],
+            companyDataList:[],
+            dateType: '00',
+            financeDateType: '00',
+            dateTypeList: [
+                {label:"周",value:"00"},
+                {label:"年",value:"01"}
+            ],
+            companyExtraOption:{
+              xAxis: [
+                  {
+                      data: [],
+                  }
+              ],
+              legend: {
+              },
+            },
+            coreFinanceAmountList: [],
+            coreFinanceAmountExtraOption:{
+              yAxis: [
+                  {
+                      type:"category",
+                      data: [],
+                  }
+              ],
+              xAxis: [
+                  {
+                      type: "value",
+                  }
+              ],
+              legend: {
+              },
+            },
+            dataList:[],
+            yearDataList:[],
+            monthDataList:[],
+            extraOption:{
+              legend: {
+                type: 'scroll',
+                orient: 'vertical',
+                left: "left",
+                right: 10,
+                top: 20,
+                bottom: 20,
+              },
+            },
+            yearExtraOption:{
+              xAxis: [
+                  {
+                      data: [],
+                  }
+              ],
+              legend: {
+              },
+            },
+            monthExtraOption:{
+              xAxis: [
+                  {
+                      data: [],
+                  }
+              ],
+              legend: {
+              },
+            },
+            creditLineAll: 0,
+            creditLineAllForward: 0,
+            creditLineList:[],
+            creditLineTotal:0,
+            queryParams:{
+                pageNum:1,
+                pageSize:5
+            },
+            creditLineNumList:[],
+            creditLineNumTotal:0,
+            queryParamsNum:{
+                pageNum:1,
+                pageSize:5
+            },
+            workList:[],
+            workTotal: 0,
+            queryParamsWork:{
+                pageNum:1,
+                pageSize:5,
+                type:'00'
+            },
+            noticeList:[],
+            noticeTotal: 0,
+            queryParamsNotice:{
+                pageNum:1,
+                pageSize:5,
+                type:'01'
+            },
+            activeName:'first',
+            company:{},
+        }
+    },
+    created: function () {
+        //查询企业类型
+        getOwnCompany().then((response) => {
+            this.company = response.data;
+        }).then((response) => {
+            //平台
+            if(this.company.scyType == '00'){
+                //入驻企业数量
+                this.getCompanyNum()
+                //入驻供应商数量
+                this.getSupplierNum()
+                //入驻核心企业数量
+                this.getCoreNum()
+                //融资开立月度统计 -- 柱状图
+                this.getFinanceRecordMonth()  
+                //已融资供应商数量
+                this.getFinanceSupplier()
+                //融资中金额
+                this.getAvailableBalance()
+                //已放款金额
+                this.getLoanBalance()
+                //已生效金额
+                this.getEffectBalance()
+                //融资业务数量
+                this.getFinanceNum()
+                //授信总额度
+                this.getCreditLineAll()
+                //平台资金 -- 饼图
+                this.getFinanceAmount()
+                //平台用户统计 -- 柱状图
+                this.getCompanyReport()
+                //核心企业额度比例 -- 柱状图
+                this.getFinanceAmountAll()
+            //核心企业
+            }else if(this.company.scyType == '01'){
+                //授信总额度
+                this.getCreditLineAll()
+                //授信总额度 -- 正向保理
+                this.getCreditLineAllForward()
+                //融资中金额
+                this.getAvailableBalance()
+                //融资中金额 -- 正向保理
+                this.getAvailableBalanceForward()
+                //已放款金额
+                this.getLoanBalance()
+                //已放款金额 -- 正向保理
+                this.getLoanBalanceForward()
+                //已生效金额
+                this.getEffectBalance()
+                //已生效金额 -- 正向保理
+                this.getEffectBalanceForward()
+                //融信授权额度 -- 饼图
+                this.getCreditLine()
+                //融信授权额度 -- 列表
+                this.getList()
+                //融信统计 -- 列表
+                this.getNumList()
+                //融资开立月度统计 -- 柱状图
+                this.getFinanceRecordMonth()  
+                //融资开立年度统计 -- 柱状图
+                this.getFinanceRecord()  
+                //即将到期额度(30天)
+                this.getExpiredBalance()
+                //查询代办
+                this.getWorkList()
+                //查询消息
+                this.getNoticeList()
+            //融资企业
+            }else if(this.company.scyType == '02'){
+                //授信总额度
+                this.getCreditLineAll()
+                //融资中金额
+                this.getAvailableBalance()
+                //已放款金额
+                this.getLoanBalance()
+                //已生效金额
+                this.getEffectBalance()
+                //即将到期额度(30天)
+                this.getExpiredBalance()
+                //查询代办
+                this.getWorkList()
+                //查询消息
+                this.getNoticeList()
+            //资方
+            }else if(this.company.scyType == '03'){
+                //授信总额度
+                this.getCreditLineAll()
+                //融资中金额
+                this.getAvailableBalance()
+                //已放款金额
+                this.getLoanBalance()
+                //已生效金额
+                this.getEffectBalance()
+                //即将到期额度(30天)
+                this.getExpiredBalance()
+            }
+            
+        });
+    },
+    activated () {
+    }, 
+    mounted() {
+    },
+    methods: {
+        //入驻企业数量
+        getCompanyNum(){
+            getCompanyNum().then((response) => {
+                this.companyNum = response.data.num
+            });
+        },
+        //入驻供应商数量
+        getSupplierNum(){
+            let queryParams = {}
+            queryParams.type = "02"
+            getCompanyNum(queryParams).then((response) => {
+                this.supplierNum = response.data.num
+            });
+        },
+        //入驻核心企业数量
+        getCoreNum(){
+            let queryParams = {}
+            queryParams.type = "01"
+            getCompanyNum(queryParams).then((response) => {
+                this.coreNum = response.data.num
+            });
+        },
+        //已融资供应商数量
+        getFinanceSupplier(){
+            getFinanceSupplier().then((response) => {
+                this.financeSupplierNum = response.data.num
+            });
+        },
+        //融资中金额
+        getAvailableBalance(){
+            getAvailableBalance().then(response => {
+                console.log(response)
+                this.availableBalance = response.data.allAmount
+            })
+        },
+        //融资中金额 -- 正向保理
+        getAvailableBalanceForward(){
+            let queryParams = {}
+            queryParams.zfpType = "0"
+            getAvailableBalance(queryParams).then(res => {
+                this.availableBalanceForward = res.data.allAmount
+            })
+        },
+        //已生效金额
+        getEffectBalance(){
+            getEffectBalance().then(response => {
+                console.log(response)
+                this.effectBalance = response.data.allAmount
+            })
+        },
+        //已生效金额 -- 正向保理
+        getEffectBalanceForward(){
+            let queryParams = {}
+            queryParams.zfpType = "0"
+            getEffectBalance(queryParams).then(res => {
+                this.effectBalanceForward = res.data.allAmount
+            })
+        },
+        //已放款金额
+        getLoanBalance(){
+            getLoanBalance().then(response => {
+                console.log(response)
+                this.loanBalance = response.data.allAmount
+            })
+        },
+        //已放款金额 -- 正向保理
+        getLoanBalanceForward(){
+            let queryParams = {}
+            queryParams.zfpType = "0"
+            getLoanBalance(queryParams).then(res => {
+                this.loanBalanceForward = res.data.allAmount
+            })
+        },
+        //融资业务数量
+        getFinanceNum(){
+            getFinanceNum().then(response => {
+                console.log(response)
+                this.financeNum = response.data.num
+            })
+        },
+        //授信总额度
+        getCreditLineAll(){
+            getCreditLineAll().then(res => {
+                this.creditLineAll = res.data.allAmount
+            })
+        },
+        //授信总额度 -- 正向保理
+        getCreditLineAllForward(){
+            let queryParams = {}
+            queryParams.zfpType = "0"
+            getCreditLineAll(queryParams).then(res => {
+                this.creditLineAllForward = res.data.allAmount
+            })
+        },
+        //已融资金额
+        getFinancedNum(){
+            return accAdd(accAdd(this.effectBalance, this.availableBalance, 2), this.loanBalance, 2)
+        },
+        //已融资金额 -- 正向保理
+        getFinancedNumForward(){
+            return accAdd(accAdd(this.effectBalanceForward, this.availableBalanceForward, 2), this.loanBalanceForward, 2)
+        },
+        //剩余授信额度
+        getsubNum(){
+            return accSub(this.creditLineAll, this.getFinancedNum(), 2)
+        },
+        //剩余授信额度 -- 正向保理
+        getsubNumForward(){
+            return accSub(this.creditLineAllForward, this.getFinancedNumForward(), 2)
+        },
+        //平台资金 -- 饼图
+        getFinanceAmount(){
+            getFinanceAmount().then(response => {
+                this.financeAmountList = response.data;
+            })
+        },
+        //平台用户统计 -- 柱状图
+        getCompanyReport(){
+            let queryParams = {}
+            queryParams.dateType = this.dateType
+            getCompanyReport(queryParams).then((response) => {
+                this.companyDataList = response.data.dataList
+                this.companyExtraOption.xAxis[0].data = response.data.dateList
+            });
+        },
+        //核心企业额度比例 -- 柱状图
+        getFinanceAmountAll(){
+            let queryParams = {}
+            queryParams.pageNum = 1
+            queryParams.pageSize = 5
+            getFinanceAmountAll(queryParams).then((response) => {
+                this.coreFinanceAmountList = response.data.dataList
+                this.coreFinanceAmountExtraOption.yAxis[0].data = response.data.dateList
+            });
+        },
+        //融资开立月度统计 -- 柱状图
+        getFinanceRecordMonth(){
+            let queryParams = {}
+            queryParams.dateType = this.financeDateType
+            financeRecordMonth(queryParams).then((response) => {
+                this.yearDataList = response.data.dataList
+                this.yearExtraOption.xAxis[0].data = response.data.dateList
+            });
+        },
+        //查询代办
+        getWorkList(){
+            listNotice(this.queryParamsWork).then((response) => {
+                this.workList = response.data.data
+            });
+        },
+        //查询消息
+        getNoticeList(){
+            listNotice(this.queryParamsNotice).then((response) => {
+                this.noticeList = response.data.data
+            });
+        },
+        //即将到期额度(30天)
+        getExpiredBalance(){
+            getExpiredBalance().then(response => {
+                console.log(response)
+                this.expiredBalance = response.data.allAmount
+            })
+        },
+        //融资开立年度统计 -- 柱状图
+        getFinanceRecord(){
+            let queryParams = {}
+            queryParams.dateType = "01"
+            financeRecordMonth(queryParams).then((response) => {
+                this.monthDataList = response.data.dataList
+                this.monthExtraOption.xAxis[0].data = response.data.dateList
+            });
+        },
+        //融信授权额度 -- 饼图
+        getCreditLine(){
+            getCoreCreditLine().then(response => {
+                this.dataList = response.data;
+            })
+        },
+        //融信授权额度 -- 列表
+        getList(){
+            getCreditLineList(this.queryParams).then(response => {
+                this.creditLineList = response.data.records;
+                this.creditLineTotal = response.data.total
+            })
+        },
+        //融信统计 -- 列表
+        getNumList(){
+            getCreditLineNumList(this.queryParamsNum).then(response => {
+                this.creditLineNumList = response.data.records;
+                this.creditLineNumTotal = response.data.total
+            })
+        },
+    },
+};
+</script>
+<style>
+.labelData .el-collapse-item__header{
+    height: 200px;
+}
+</style>

+ 0 - 233
front-vue/src/views/leaderCockpit.vue

@@ -1,233 +0,0 @@
-<template >
-    <div id="" style=" background: #d3dce6;height:100%;width: 100%; ">
-        <el-card v-if="SalaryCountBar" class="box-card" style="width:94%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">薪资统计</span>
-            </div>
-            <div class="text item">
-                <salaryCount-bar/>
-            </div>
-        </el-card>
-        <el-card v-if="OfficePersonnelLine" class="box-card" style="width:35.5%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">人员统计</span>
-            </div>
-            <div class="text item">
-                <officePersonnel-line widthSize="400px"  heightSize="280px"/>
-            </div>
-        </el-card>
-        <el-card v-if="OfficeSalaryBar" class="box-card" style="width:57%; margin:0.6%; float:right; height: 335px; margin-right: 5.5%">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">员工薪资走势</span>
-            </div>
-            <div class="text item">
-                <officeSalary-bar widthSize="470px"  heightSize="240px"/>
-            </div>
-        </el-card>
-        <el-card v-if="ExpenseBar" class="box-card" style="width:94%;height:31%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">报销额统计</span>
-            </div>
-            <div class="text item">
-                <expense-bar heightSize="280px"/>
-            </div>
-        </el-card>
-        <el-card v-if="ExpensePie" class="box-card" style="width:46.5%;height:31%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">报销占比统计</span>
-            </div>
-            <div class="text item">
-                <expense-pie heightSize="240px" style="margin-bottom:40px"/>
-            </div>
-        </el-card>
-        <el-card v-if="ExpenseLine" class="box-card" style="width:46.5%;height:31%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">月度占比</span>
-            </div>
-            <div class="text item">
-                <expense-line heightSize="280px"/>
-            </div>
-        </el-card>
-        <el-card v-if="DailyStatisticsProgress" class="box-card" style="width:94%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">日志填报</span>
-            </div>
-            <div class="text item">
-                <dailyStatistics-progress heightSize="255px"/>
-            </div>
-        </el-card>
-        <el-card v-if="ProjectHourBar" class="box-card" style="width:57%;height:332px;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">项目工时统计</span>
-            </div>
-            <div class="text item">
-                <projectHour-bar heightSize="255px"/>
-            </div>
-        </el-card>
-        <el-card v-if="DailyManHoursPie" class="box-card" style="width:36%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">人员工时统计</span>
-            </div>
-            <div class="text item">
-                <dailyManHours-pie  heightSize="240px"/>
-            </div>
-        </el-card>
-        <el-card v-if="ReceiptInvoiceBar" class="box-card" style="width:94.4%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">回款开票金额统计</span>
-            </div>
-            <div class="text item">
-                <receiptInvoice-bar widthSize="1000px" heightSize="280px"/>
-            </div>
-        </el-card>
-        <el-card v-if="ProjectProportionPie" class="box-card" style="width:34.2%; height:352px;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">项目占比</span>
-            </div>
-            <div class="text item">
-                <projectProportion-pie heightSize="260px"/>
-            </div>
-        </el-card>
-        <el-card v-if="InvoiceContractList" class="box-card" style="width:58%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">合同回款与合同付款进度</span>
-            </div>
-            <div class="text item">
-                <invoiceContract-list heightSize="295px"/>
-            </div>
-        </el-card>
-        <el-card v-if="RevenueExpenditure" class="box-card" style="width:58%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">企业收支统计</span>
-            </div>
-            <div class="text item">
-                <revenueExpenditure heightSize="450px" widthSize="660px" />
-            </div>
-        </el-card>
-        <el-card v-if="ContractProgressBar" class="box-card" style="width:34.2%;height:36%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">合同进度统计</span>
-            </div>
-            <div class="text item">
-                <contractProgress-bar/>
-            </div>
-        </el-card>
-        <el-card v-if="TrainCountBar" class="box-card" style="width:34.2%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">培训统计</span>
-            </div>
-            <div class="text item">
-                <trainCount-bar heightSize="240px"/>
-            </div>
-        </el-card>
-        <el-card v-if="ContractCustomerProportionPie" class="box-card" style="width:58%;margin:0.6%;float:left;">
-            <div slot="header" class="clearfix">
-                <span style="color: #666ee8; font-weight: bold;">客户合同占比</span>
-            </div>
-            <div class="text item">
-                <contractCustomerProportion-pie widthSize="600px" heightSize="480px"/>
-            </div>
-        </el-card>
-    </div>
-</template>
-<script>
-import { getRouters } from '@/api/menu'
-export default {
-  components: {
-    ExpenseBar,
-    ExpensePie,
-    ExpenseLine,
-    DailyManHoursPie,
-    ContractCustomerProportionPie,
-    ProjectProportionPie,
-    ReceiptInvoiceBar,
-    RevenueExpenditure,
-    SalaryCountBar,
-    TrainCountBar,
-    ContractProgressBar,
-    InvoiceContractList,
-    OfficePersonnelLine,
-    OfficeSalaryBar,
-    DailyStatisticsProgress,
-    ProjectHourBar
-  },
-    data() {
-        return {
-            expandedKeys:[],
-            data:[],
-            widthSize:'500px',
-            heightSize:'280px',
-            ExpenseBar:false,
-            ExpensePie:false,
-            ExpenseLine:false,
-            DailyManHoursPie:false,
-            ContractCustomerProportionPie:false,
-            ProjectProportionPie:false,
-            ReceiptInvoiceBar:false,
-            RevenueExpenditure:false,
-            SalaryCountBar:false,
-            TrainCountBar:false,
-            ContractProgressBar:false,
-            InvoiceContractList:false,
-            OfficePersonnelLine:false,
-            OfficeSalaryBar:false,
-            DailyStatisticsProgress:false,
-            ProjectHourBar:false,
-        }
-    },
-    created: function () {
-        this.getShow()
-    //    this.$store.dispatch('GetInfo').then(res => {
-    //       // 拉取user_info
-    //       const roles = res.roles
-    //       this.$store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => {
-    //       // 测试 默认静态页面
-    //       // store.dispatch('permission/generateRoutes', { roles }).then(accessRoutes => {
-    //         // 根据roles权限生成可访问的路由表
-    //         // var node;
-    //         console.log(accessRoutes)
-    //         let arr = []
-    //         this.setName(accessRoutes)
-            // console.log(this.expandedKeys)
-    //         // router.addRoutes(accessRoutes) // 动态添加可访问路由表
-    //         // next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
-    //       })
-    //     })
-    //       .catch(err => {
-    //         this.$store.dispatch('FedLogOut').then(() => {
-    //           Message.error(err)
-    //           next({ path: '/' })
-    //         })
-    //       })
-    },
-    activated () {
-    }, 
-    mounted() {
-    },
-    methods: {
-        getShow(){
-            getRouters().then(res => {
-                // this.data = res.data
-                this.setName(res.data)
-            console.log(this.expandedKeys)
-                this.expandedKeys.forEach(element => {
-                    this.$set(this,element, true) 
-                });
-            })
-        },
-        setName(datas){ //遍历树  获取id数组
-            for(var i in datas){
-                if(datas[i].path == 'reportStatistics'){
-                    this.expandedKeys.push(datas[i].component)
-                }
-                if(datas[i].children){
-                    this.setName(datas[i].children);
-                }
-            }
-        },
-    },
-};
-</script>
-<style>
-
-</style>