zhiyuan007 1 year ago
parent
commit
693454b8f8

+ 143 - 0
src/echarts/option.js

@@ -421,3 +421,146 @@ export function dataPushSituationMonthlyEcharts(ele,tempTest) {
     setOptions(ele,option)
 }
 
+
+export function matterApplySituationStaticsLeftEcharts(ele,firstData) {
+    debugger
+    let  option = {
+        title: {
+            text: '事项应用情况统计',
+        },
+        tooltip: {
+            trigger: 'item',
+            formatter: "{a} <br/>{b}: {c} ({d}%)"
+        },
+        legend: {
+            orient: 'vertical',
+            x: 'left',
+            top: '20%',
+            left: '10%',
+            data: ['在沪建筑业企业信用评价', '三类人员资格审查']
+        },
+        //toolbox: {
+        //    show: true,
+        //    feature: {
+        //        saveAsImage: {}
+        //    }
+        //},
+        series: [{
+            name: '部门名称',
+            type: 'pie',
+            radius: ['30%', '50%'],
+            center: ['70%', '50%'],
+            avoidLabelOverlap: false,
+            label: {
+                normal: {
+                    show: false,
+                    position: 'center'
+                },
+                emphasis: {
+                    show: true,
+                    textStyle: {
+                        fontSize: '20',
+                        fontWeight: 'bold'
+                    }
+                }
+            },
+            labelLine: {
+                normal: {
+                    show: false
+                }
+            },
+            data: firstData
+        }]
+    };
+    setOptions(ele,option)
+}
+
+
+export function matterApplySituationStaticsRightEcharts(ele,secondData) {
+    debugger
+    let  option = {
+        title: {
+            text: '业务数据应用类别统计'
+        },
+        tooltip: {
+            trigger: 'item',
+            formatter: "{a} <br/>{b}: {c} ({d}%)"
+        },
+        legend: {
+            orient: 'vertical',
+            x: 'left',
+            top: '20%',
+            left: '10%',
+            data: ['数据查询', '接口调用', '数据下载']
+        },
+        series: [{
+            name: '调用类型',
+            type: 'pie',
+            radius: ['30%', '50%'],
+            //设置左右间距
+            center: ['70%', '50%'],
+            avoidLabelOverlap: false,
+            label: {
+                normal: {
+                    show: false,
+                    position: 'center'
+                },
+                emphasis: {
+                    show: true,
+                    textStyle: {
+                        fontSize: '20',
+                        fontWeight: 'bold'
+                    }
+                }
+            },
+            labelLine: {
+                normal: {
+                    show: false
+                }
+            },
+            data: secondData
+        }]
+    };
+    setOptions(ele,option)
+}
+
+
+export function dataApplyGeneralSituationEcharts(ele,lastData) {
+    debugger
+    let  option = {
+        //title: {
+        //    text: '按年应用总体情况',
+        //},
+        tooltip: {
+            trigger: 'axis'
+        },
+        legend: [
+            {
+                data: ['直接访问']
+            },
+            {
+                top: '1%',
+                left: '25%',
+                buttom: '10%',
+                data: ['在沪建筑业企业信用评价', '三类人员资格审查'],
+            }
+        ],
+        toolbox: {
+        },
+        calculable: true,
+        xAxis: [
+            {
+                type: 'category',
+                data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
+            }
+        ],
+        yAxis: [
+            {
+                type: 'value'
+            }
+        ],
+        series: lastData
+    };
+    setOptions(ele,option)
+}
+

+ 1 - 1
src/pinia/useStore.js

@@ -79,7 +79,7 @@ export const useRootStore = defineStore('root',{
                             "name":"数据归集推送"
                         },
                         {
-                            "path":"/17",
+                            "path":"apply-information",
                             "name":"应用情况"
                         },
                         {

+ 6 - 0
src/router/index.js

@@ -18,6 +18,7 @@ import RewardsAndPunishmentsMeasureManage
 import combinedRewardAndPunishmentsMeasureManage
   from "@/views/main/c-views/combined-rewards-and-punishments/combined-rewards-and-punishments-case-information/CombinedRewardAndPunishmentsMeasureManage.vue";
 import DataImputationPush from "@/views/main/c-views/credit-data/data-imputation-push/DataImputationPush.vue";
+import ApplyInformation from "@/views/main/c-views/credit-data/apply-information/ApplyInformation.vue";
 import CreditRepair from "@/views/main/c-views/credit-data/credit-repair/CreditRepair.vue";
 import DataLog from "@/views/main/c-views/credit-data/data-log/DataLog.vue";
 import UserManage from "@/views/main/c-views/system-manage/user-manage/UserManage.vue";
@@ -94,6 +95,11 @@ const router = createRouter({
           name: 'data-imputation-push',
           component:DataImputationPush
         },
+        {
+          path: '/main/apply-information',
+          name: 'apply-information',
+          component:ApplyInformation
+        },
         {
           path: '/main/credit-repair',
           name: 'credit-repair',

+ 22 - 0
src/service/credit-data/apply-information/apply-information.js

@@ -0,0 +1,22 @@
+import {requestInstance} from "@/service";
+
+
+//应用情况 事项应用情况
+export function proSelectXyxxSjtjYyqk(params){
+    return requestInstance({
+        url:'/XyxxApi/proSelectXyxxSjtjYyqk',
+        data:{
+            ...params
+        }
+    })
+}
+
+//应用情况 数据应用总体情况
+export function proSelectXyxxSjtjYyYear(params){
+    return requestInstance({
+        url:'/XyxxApi/proSelectXyxxSjtjYyYear',
+        data:{
+            ...params
+        }
+    })
+}

+ 36 - 0
src/views/main/c-views/credit-data/apply-information/ApplyInformation.vue

@@ -0,0 +1,36 @@
+<template>
+  <el-tabs type="border-card" class="demo-tabs" v-model="activeName"  @tab-click="handleClick" >
+    <el-tab-pane label="事项应用情况统计" name="first">
+      <matter-apply-situation-statics v-if="activeName=='first'" />
+    </el-tab-pane>
+    <el-tab-pane label="数据应用总体情况" name="second">
+      <data-apply-general-situation v-if="activeName=='second'" />
+    </el-tab-pane>
+  </el-tabs>
+</template>
+
+<script>
+import MatterApplySituationStatics
+  from "@/views/main/c-views/credit-data/apply-information/MatterApplySituationStatics.vue";
+import DataApplyGeneralSituation
+  from "@/views/main/c-views/credit-data/apply-information/DataApplyGeneralSituation.vue";
+import {ref} from "vue";
+export default {
+  name: "ApplyInformation",
+  components: {DataApplyGeneralSituation, MatterApplySituationStatics},
+  setup(){
+    const activeName = ref('first')
+    function handleClick(tab,event){
+
+    }
+    return{
+      activeName,
+      handleClick
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 113 - 0
src/views/main/c-views/credit-data/apply-information/DataApplyGeneralSituation.vue

@@ -0,0 +1,113 @@
+<template>
+  <div class="department-data">
+    <diy-el-form ref="formRef"  v-bind="{'span-attrs':{span:4}}"   v-model:model-form="forms" :forms="formConfig">
+      <template #searchBtn>
+        <el-button  type="primary" :icon="Search" @click="getChartData()">查询</el-button>
+      </template>
+    </diy-el-form>
+    <div class="department-content">
+      <div class="echarts" ref="monthEcharts">
+
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import DiyElForm from "@/components/common/DiyElForm.vue";
+import {Close, Delete, Document, Search, SuccessFilled} from "@element-plus/icons-vue";
+import {nextTick, onMounted, ref} from "vue";
+import {dataPushSituationMonthlySituation} from "@/data/all-form";
+import {proSelectXyxxSjtjSxy} from "@/service/credit-data/data-imputation-push/data-imputation-push";
+import {dataApplyGeneralSituationEcharts, dataPushSituationMonthlyEcharts} from "@/echarts/option";
+import {getFullYear} from "@/units/use-method/veritification-tools";
+import {proSelectXyxxSjtjYyYear} from "@/service/credit-data/apply-information/apply-information";
+
+export default {
+  name: "DataApplyGeneralSituation",
+  components:{DiyElForm},
+  computed: {
+    Delete() {
+      return Delete
+    },
+    Search() {
+      return Search
+    },
+    Document() {
+      return Document
+    },
+    SuccessFilled() {
+      return SuccessFilled
+    },
+    Close() {
+      return Close
+    }
+  },
+  setup(){
+    const forms = ref({});
+    const formRef = ref(null);
+    const formConfig = ref({...dataPushSituationMonthlySituation});
+    const monthEcharts = ref(null);
+    function getChartData(){
+      debugger
+      proSelectXyxxSjtjYyYear({
+        startM:forms.value.YEAR,
+        pageSize:10000,
+        pageIndex:1
+      }).then(res =>{
+        debugger
+        getEcharts(res);
+      })
+    }
+    function getEcharts(data){
+      let date = data.msg[0].Rows
+      let lastData = [
+        {
+          name: '在沪建筑业企业信用评价',
+          type: 'bar',
+          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+        },
+        {
+          name: '三类人员资格审查',
+          type: 'bar',
+          data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+        }
+      ]
+      for (let i = 0; i < date.length; i++) {
+        if (date[i].NAME == '在沪建筑业企业信用评价') {
+          let  key_yuefen = date[i].YUEFEN *1 -1;
+          lastData[0].data[key_yuefen] = date[i].VALUE
+        }
+        if (date[i].NAME == '三类人员资格审查') {
+          let key_yuefen = date[i].YUEFEN * 1 - 1;
+          lastData[1].data[key_yuefen] = date[i].VALUE
+        }
+      }
+      nextTick(() => {
+        debugger
+        dataApplyGeneralSituationEcharts(monthEcharts.value,lastData);
+      })
+    }
+    onMounted(()=>{
+      forms.value.YEAR = getFullYear("year");
+      getChartData()
+    })
+    return {
+      forms,
+      formRef,
+      formConfig,
+      getChartData,
+      monthEcharts
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.department-content{
+  height: 600px;
+  .echarts{
+    height: 580px;
+  }
+}
+</style>

+ 151 - 0
src/views/main/c-views/credit-data/apply-information/MatterApplySituationStatics.vue

@@ -0,0 +1,151 @@
+<template>
+  <div class="department-data">
+    <diy-el-form ref="formRef"  v-bind="{'span-attrs':{span:4}}"   v-model:model-form="forms" :forms="formConfig">
+      <template #searchBtn>
+        <el-button  type="primary" :icon="Search" @click="getTableData()">查询</el-button>
+      </template>
+    </diy-el-form>
+    <div class="department-content">
+      <div class="left-echarts" ref="leftEcharts">
+
+      </div>
+      <div class="right-echarts" ref="rightEcharts">
+
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {onMounted, ref} from "vue";
+import {matterImputationStaticsSituation} from "@/data/all-form";
+import {proSelectXyxxSjtjNew} from "@/service/credit-data/data-imputation-push/data-imputation-push";
+import {getFullYear} from "@/units/use-method/veritification-tools";
+import DiyElForm from "@/components/common/DiyElForm.vue";
+import {Close, Delete, Document, Search, SuccessFilled} from "@element-plus/icons-vue";
+import {
+  matterApplySituationStaticsLeftEcharts,
+  matterApplySituationStaticsRightEcharts
+} from "@/echarts/option";
+import {proSelectXyxxSjtjYyqk} from "@/service/credit-data/apply-information/apply-information";
+
+export default {
+  name: "MatterApplySituationStatics",
+  components:{DiyElForm},
+  computed: {
+    Delete() {
+      return Delete
+    },
+    Search() {
+      return Search
+    },
+    Document() {
+      return Document
+    },
+    SuccessFilled() {
+      return SuccessFilled
+    },
+    Close() {
+      return Close
+    }
+  },
+  setup(){
+    const forms = ref({});
+    const formRef = ref(null);
+    const formConfig = ref({...matterImputationStaticsSituation});
+    const leftEcharts = ref(null);
+    const rightEcharts = ref(null);
+    function getTableData(){
+      proSelectXyxxSjtjYyqk({
+        startM:forms.value.START_DATE,
+        //startC:"2019-01-01",
+        endM:forms.value.END_DATE,
+        pageSize:10000,
+        pageIndex:1
+      }).then(res =>{
+        getEchartsAndTable(res);
+      })
+    }
+    function getEchartsAndTable(data){
+      let date = data.msg[0];
+      var jiekou_Number = 0;
+      for (var i = 0;i<date.Rows.length;i++){
+        delete date.Rows[i].RN;
+        date.Rows[i].value = date.Rows[i].VALUE * 1;
+        jiekou_Number += date.Rows[i].value;
+        date.Rows[i].name = date.Rows[i].NAME;
+        delete date.Rows[i].VALUE;
+        delete date.Rows[i].NAME;
+      }
+      let firstData = [
+        {
+          value: 0,
+          name: '在沪建筑业企业信用评价'
+        },
+        {
+          value: 0,
+          name: '三类人员资格审查'
+        }
+      ]
+      for(let i=0;i<date.Rows.length;i++){
+        for(let j=0;j<firstData.length;j++){
+          if(date.Rows[i].name==firstData[j].name){
+            firstData[j].value = date.Rows[i].value;
+          }
+        }
+      }
+
+      let secondData = [{
+        value: 0,
+        name: '数据查询'
+      },
+        {
+          value: Number.isNaN(jiekou_Number)?0:jiekou_Number,
+          name: '接口调用'
+        },
+        {
+          value: 0,
+          name: '数据下载'
+        }
+      ]
+      debugger
+      matterApplySituationStaticsLeftEcharts(leftEcharts.value,firstData);
+      matterApplySituationStaticsRightEcharts(rightEcharts.value,secondData);
+    }
+    onMounted(()=>{
+      forms.value.START_DATE = getFullYear("year") + "-01-01";
+      forms.value.END_DATE = getFullYear("day");
+      getTableData()
+    })
+    return {
+      forms,
+      formRef,
+      formConfig,
+      getTableData,
+      leftEcharts,
+      rightEcharts
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.department-data{
+  padding: 20px;
+}
+.department-content{
+  display: flex;
+  justify-content: space-between;
+}
+.left-echarts{
+  height: 600px;
+  width: 46%;
+  padding-right: 50px;
+  margin-right: 50px;
+  border-right: 1px #DCDCDC solid;
+}
+.right-echarts{
+  height: 600px;
+  width: 46%;
+}
+</style>