丁烨烨 vor 1 Jahr
Ursprung
Commit
a929987a26
3 geänderte Dateien mit 168 neuen und 73 gelöschten Zeilen
  1. 0 1
      index.html
  2. 16 61
      src/components/baseEcharts/pieChart.vue
  3. 152 11
      src/views/visualization/index.vue

+ 0 - 1
index.html

@@ -16,7 +16,6 @@
     ></script>
     <script src="https://unpkg.com/mapv-three@1.0.10/dist/mapvthree.umd.js"></script>
     <script src="//mapv.baidu.com/build/mapv.min.js"></script>
-    <script src="static/common.js"></script>
     <script src="https://code.bdstatic.com/npm/mapvgl@1.0.0-beta.189/dist/mapvgl.min.js"></script>
 
     <title>怀化市高新区企业信用信息分级分类管理平台</title>

+ 16 - 61
src/components/baseEcharts/pieChart.vue

@@ -9,35 +9,12 @@ import { EChartsType } from 'echarts'
 import { onMounted, ref, watch, onBeforeUnmount, nextTick } from 'vue'
 
 const props = defineProps({
-    xDataArray: {
-        // 柱形图x轴数据
+    message: {
         type: Array,
-        default: function () {
-            return ['1', '2', '3', '4', '5']
-        }
-    },
-    yDataArray: {
-        //图标信息提示
-        type: Array,
-        default: function () {
-            return [
-                {
-                    name: '图例二',
-                    type: 'pie',
-                    label: {
-                        // 柱状图上的文字设置
-                        show: true, // 是否显示
-                        //   rotate: 60, // 文字旋转角度
-                        position: 'top' // 显示位置
-                    },
-                    // barWidth: '50%', // 柱的宽度
-                    barGap: '5%', // 多个并排柱子设置柱子之间的间距
-                    data: [2, 2, 7, 5, 7, 4]
-                }
-            ]
-        }
+        default: true
     }
 })
+
 let myEchart: EChartsType
 const timeId = ref(Math.floor(new Date().getTime() * Math.random())); // 使该图表保持唯id
 const myEchartData = () => {
@@ -46,60 +23,38 @@ const myEchartData = () => {
             trigger: 'item'
         },
         legend: {
-            top: '5%',
-            left: 'center'
+            orient: 'vertical',
+            left: 'right',
+            textStyle:{
+                color:"white"
+            }
         },
         series: [
             {
-                name: 'Access From',
+                name: '评价分析结果',
                 type: 'pie',
                 radius: ['40%', '70%'],
                 avoidLabelOverlap: false,
-                padAngle: 5,
                 itemStyle: {
                     borderRadius: 10
                 },
-                label: {
-                    show: false,
-                    position: 'center'
-                },
+                data: props.message,
                 emphasis: {
-                    label: {
-                        show: true,
-                        fontSize: 40,
-                        fontWeight: 'bold'
+                    itemStyle: {
+                        shadowBlur: 10,
+                        shadowOffsetX: 0,
+                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                     }
-                },
-                labelLine: {
-                    show: false
-                },
-                data: [
-                    { value: 1048, name: 'Search Engine' },
-                    { value: 735, name: 'Direct' },
-                    { value: 580, name: 'Email' },
-                    { value: 484, name: 'Union Ads' },
-                    { value: 300, name: 'Video Ads' }
-                ]
+                }
             }
         ]
     }
     // { notMerge: true } 解决删除数据时,数据不刷新的问题
     myEchart.setOption(option, { notMerge: true })
 }
-
-watch(
-    //监控数据变化
-    () => props.xDataArray,
-    () => {
-        setTimeout(() => {
-            myEchartData()
-        }, 500)
-    },
-    { deep: true }
-)
 watch(
     //监控数据变化
-    () => props.yDataArray,
+    () => props.message,
     () => {
         setTimeout(() => {
             myEchartData()

+ 152 - 11
src/views/visualization/index.vue

@@ -17,7 +17,7 @@
                 <div class="leftOneBox">
                     <div class="leftOBTitle">评价分析</div>
                     <div class="leftOBContent">
-                        <PieEcharts></PieEcharts>
+                        <PieEcharts :message="PieChartData"></PieEcharts>
                     </div>
                 </div>
                 <div class="leftTwoBox">
@@ -166,7 +166,8 @@
 import { ref, onMounted } from 'vue';
 import baseEcharts from '@/components/baseEcharts/index.vue'
 import PieEcharts from '@/components/baseEcharts/pieChart.vue'
-import { getClassificationValueData
+import {
+    getClassificationValueData
     , getLngLatValueData
     , getCreditScoreList
     , getTrossDomesticProduct
@@ -183,7 +184,8 @@ import { getClassificationValueData
     , getAdministrativeEnforcement
     , getBusinessAdnormalities
     , getDishonestDebtor
-    , getSocialSecurity } from '@/api/visualization/index'
+    , getSocialSecurity
+} from '@/api/visualization/index'
 
 const mapContainer = ref(null);
 let map = null;
@@ -245,7 +247,6 @@ const parkData = [{
     value: 11,
     img: parksix
 }]
-
 const RanKingData = [{
     name: '湖南骏泰新材料科技有限责任公司',
     value: '66.25',
@@ -287,8 +288,6 @@ const RanKingData = [{
     value: '66.25',
     mig: ten
 }]
-
-
 const business = [{
     title: '园区纳税企业',
     value: 81,
@@ -302,7 +301,6 @@ const business = [{
     state: 0,
     img: parktwo
 }]
-
 const gradationMun = [{
     name: "3A级企业",
     state: 3,
@@ -461,15 +459,158 @@ const setActiveTab = (index, value) => {
 getClassificationList()
 
 
-
-/** 查询用户列表 */
+/** 查询评价分析 */
+const PieChartData = ref([]);
 function obtainCreditScoreList() {
     getCreditScoreList(queryParams.value).then((res) => {
-        console.log("评价分析:",res)
+        console.log("评价分析:", res)
+        const state1Array = [];
+        const state2Array = [];
+        const state3Array = [];
+        const state4Array = [];
+        const state5Array = [];
+        const state6Array = [];
+        res.data.result.forEach(item => {
+            if (item.grade === 'AAA') {
+                state1Array.push(item);
+            } else if (item.grade === 'AA') {
+                state2Array.push(item);
+            } else if (item.grade === 'A') {
+                state3Array.push(item);
+            } else if (item.grade === 'B') {
+                state4Array.push(item);
+            } else if (item.grade === 'C') {
+                state5Array.push(item);
+            } else if (item.grade === 'D') {
+                state6Array.push(item);
+            }
+
+            PieChartData.value = [
+                { value: state1Array.length, name: 'AAA' },
+                { value: state2Array.length, name: 'AA' },
+                { value: state3Array.length, name: 'A' },
+                { value: state4Array.length, name: 'B' },
+                { value: state5Array.length, name: 'C' },
+                { value: state6Array.length, name: 'D' },
+            ]
+        });
+
+
+        console.log(111, PieChartData)
+    })
+}
+
+/** 查询产值 */
+function obtaingetTrossDomesticProduct() {
+    getTrossDomesticProduct(queryParams.value).then((res) => {
+        console.log("查询产值:", res)
+    })
+}
+
+/** 查询纳税 */
+function obtaingetTopTenTaxation() {
+    getTopTenTaxation(queryParams.value).then((res) => {
+        console.log("查询纳税:", res)
+    })
+}
+
+/** 查询潇湘财银贷 */
+function obtaingetXiaoxiangCaiyinLoan() {
+    getXiaoxiangCaiyinLoan(queryParams.value).then((res) => {
+        console.log("查询潇湘财银贷:", res)
+    })
+}
+/** 查询评科技贷: */
+function obtaingetTechnologyLoan() {
+    getTechnologyLoan(queryParams.value).then((res) => {
+        console.log("查询评科技贷", res)
+    })
+}
+/** 惠园贷: */
+function obtaingetHuiyuanLoan() {
+    getHuiyuanLoan(queryParams.value).then((res) => {
+        console.log("惠园贷:", res)
+    })
+}
+/** 查询入驻企业、企业数量 */
+function obtaingetNumberOfEnterprises() {
+    getNumberOfEnterprises(queryParams.value).then((res) => {
+        console.log("入驻企业、企业数量:", res)
+    })
+}
+/** 查询上市企业 */
+function obtaingetListedCompanies() {
+    getListedCompanies(queryParams.value).then((res) => {
+        console.log("查询上市企业:", res)
+    })
+}
+/** 查询高新技术企业 */
+function obtaingetHighTechEnterprises() {
+    getHighTechEnterprises(queryParams.value).then((res) => {
+        console.log("查询高新技术企业:", res)
+    })
+}
+/** 查询科技中小型企业 */
+function obtaingetTechnologySmallAndmediumSizedEnterprises() {
+    getTechnologySmallAndmediumSizedEnterprises(queryParams.value).then((res) => {
+        console.log("查询科技中小型企业:", res)
     })
 }
+/** 查询专利信息 */
+function obtaingetPatentInformation() {
+    getPatentInformation(queryParams.value).then((res) => {
+        console.log("查询专利信息:", res)
+    })
+}
+/** 查询行政处罚 */
+function obtaingetAdministrativeSanction() {
+    getAdministrativeSanction(queryParams.value).then((res) => {
+        console.log("查询行政处罚:", res)
+    })
+}
+/** 查询行政强制执行 */
+function obtaingetAdministrativeEnforcement() {
+    getAdministrativeEnforcement(queryParams.value).then((res) => {
+        console.log("查询行政强制执行:", res)
+    })
+}
+/** 查询经营异常 */
+function obtaingetBusinessAdnormalities() {
+    getBusinessAdnormalities(queryParams.value).then((res) => {
+        console.log("查询经营异常:", res)
+    })
+}
+/** 查询失信被执行人 */
+function obtaingetDishonestDebtor() {
+    getDishonestDebtor(queryParams.value).then((res) => {
+        console.log("查询失信被执行人:", res)
+    })
+}
+/** 查询社保 */
+function obtaingetSocialSecurity() {
+    getSocialSecurity(queryParams.value).then((res) => {
+        console.log("查询社保:", res)
+    })
+}
+
+obtainCreditScoreList();
+obtaingetTrossDomesticProduct();
+obtaingetTopTenTaxation();
+obtaingetXiaoxiangCaiyinLoan();
+obtaingetTechnologyLoan();
+obtaingetHuiyuanLoan();
+obtaingetNumberOfEnterprises();
+obtaingetListedCompanies();
+obtaingetHighTechEnterprises();
+obtaingetTechnologySmallAndmediumSizedEnterprises();
+obtaingetPatentInformation();
+obtaingetAdministrativeSanction();
+obtaingetAdministrativeEnforcement();
+obtaingetBusinessAdnormalities();
+obtaingetDishonestDebtor();
+obtaingetSocialSecurity();
+
 
-obtainCreditScoreList()
 // 如果需要的话,在beforeUnmount中清理资源
 import { onBeforeUnmount } from 'vue';
 onBeforeUnmount(() => {