Parcourir la source

reactor:数据对接;

zhangchong il y a 1 an
Parent
commit
6dd386131b

+ 5 - 1
.env.development

@@ -1,2 +1,6 @@
+# 本地环境
+VITE_MODE_NAME=development
 # #socket API
-VITE_API_SOCKET_URL=http://110.188.24.28:50100/hubs/hotline
+VITE_API_SOCKET_URL=http://110.188.24.28:50100/hubs/hotline
+# # 基础请求地址
+VITE_API_URL=http://110.188.24.28:50100

+ 5 - 1
.env.production

@@ -1,2 +1,6 @@
+# 本地环境
+VITE_MODE_NAME=production
 # #socket API
-VITE_API_SOCKET_URL=http://110.188.24.28:50100/hubs/hotline
+VITE_API_SOCKET_URL=http://110.188.24.28:50100/hubs/hotline
+# # 基础请求地址
+VITE_API_URL=http://110.188.24.28:50100

+ 5 - 7
src/api/home.ts

@@ -1,16 +1,14 @@
 /*
  * @Author: zc
- * @description 常用意见管理
+ * @description 查询数据
  */
 import request from '@/utils/request';
 /**
- * @description 查询常用意见
- * @param {object} params
+ * @description 查询数据
  */
-export const commonList = (params: object) => {
+export const getData = () => {
 	return request({
-		url: `/api/v1/Sys/common-list`,
-		method: 'get',
-		params,
+		url: `/api/v1/Bs/datashow`,
+		method: 'get'
 	});
 };

+ 0 - 1
src/utils/tooltip-auto-show-vue.ts

@@ -16,7 +16,6 @@
  * @returns {{clearLoop: clearLoop}|undefined}
  */
 export function loopShowTooltip(chart:any, chartOption: any, options: any ) {
-    console.log(chart,chartOption,options)
     let defaultOptions = {
       interval: 2000,
       loopSeries: false,

+ 1 - 1
src/views/header.vue

@@ -5,7 +5,7 @@
     <div class="guang"></div>
     <div class="d-flex jc-center">
       <div class="title">
-        <span class="title-text">宜宾市12345数据大屏</span>
+        <span class="title-text">宜宾市12345政务热线</span>
       </div>
     </div>
     <div class="timers">

+ 1 - 1
src/views/index/center-bottom.vue

@@ -14,7 +14,7 @@ import signalR from "@/utils/signalR";
 const option = ref({});
 const getData = () => {
   currentGET("centerBottom", {}).then((res) => {
-    console.log("安装计划", res);
+    console.log("工单类型统计", res);
     if (res.success) {
       setOption(res.data);
     } else {

+ 31 - 18
src/views/index/index.vue

@@ -1,41 +1,41 @@
 <template>
   <div class="index-box">
-    <div class="contetn_left">
-      <ItemWrap class="contetn_left-top contetn_lr-item" title="工单办理(日)">
+    <div class="center_left">
+      <ItemWrap class="center_left-top center_lr-item" title="工单办理(日)">
         <LeftTop />
       </ItemWrap>
       <ItemWrap
-        class="contetn_left-center contetn_lr-item"
-        title="来源占比()"
+        class="center_left-center center_lr-item"
+        title="来源占比()"
       >
         <LeftCenter />
       </ItemWrap>
       <ItemWrap
-        class="contetn_left-bottom contetn_lr-item"
+        class="center_left-bottom center_lr-item"
         title="来电实况"
         style="padding: 0 10px 16px 10px"
       >
         <LeftBottom />
       </ItemWrap>
     </div>
-    <div class="contetn_center">
-      <CenterMap class="contetn_center_top" title="案件分布" />
-      <ItemWrap class="contetn_center-bottom" title="工单类型统计(月)">
+    <div class="center_center">
+      <CenterMap class="center_center_top" title="案件分布" />
+      <ItemWrap class="center_center-bottom" title="工单类型统计(月)">
         <CenterBottom />
       </ItemWrap>
     </div>
-    <div class="contetn_right">
-      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="办理情况">
+    <div class="center_right">
+      <ItemWrap class="center_left-bottom center_lr-item" title="办理情况">
         <RightTop />
       </ItemWrap>
       <ItemWrap
-        class="contetn_left-bottom contetn_lr-item"
-        title="问题高发(TOP8)"
+        class="center_left-bottom center_lr-item"
+        title="问题高发"
         style="padding: 0 10px 16px 10px"
       >
         <RightCenter />
       </ItemWrap>
-      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="工单概览 ">
+      <ItemWrap class="center_left-bottom center_lr-item" title="工单概览 ">
         <RightBottom />
       </ItemWrap>
     </div>
@@ -51,6 +51,19 @@ import CenterBottom from "./center-bottom.vue";
 import RightTop from "./right-top.vue";
 import RightCenter from "./right-center.vue";
 import RightBottom from "./right-bottom.vue";
+import {getData} from "@/api/home";
+import {onMounted} from "vue";
+const getDataFn = async () => {
+  try {
+    const res = await getData();
+    console.log(res)
+  }catch (e) {
+    console.log(e)
+  }
+};
+onMounted(()=>{
+  getDataFn();
+})
 </script>
 <style scoped lang="scss">
 .index-box {
@@ -60,8 +73,8 @@ import RightBottom from "./right-bottom.vue";
   justify-content: space-between;
 }
 //左边 右边 结构一样
-.contetn_left,
-.contetn_right {
+.center_left,
+.center_right {
   display: flex;
   flex-direction: column;
   justify-content: space-around;
@@ -70,18 +83,18 @@ import RightBottom from "./right-bottom.vue";
   box-sizing: border-box;
   flex-shrink: 0;
 }
-.contetn_center {
+.center_center {
   flex: 1;
   margin: 0 54px;
   display: flex;
   flex-direction: column;
   justify-content: space-around;
-  .contetn_center-bottom {
+  .center_center-bottom {
     height: 315px;
   }
 }
 
-.contetn_lr-item {
+.center_lr-item {
   height: 310px;
 }
 </style>

+ 1 - 1
src/views/index/left-bottom.vue

@@ -74,7 +74,7 @@ const state = reactive<any>({
 
 const getData = () => {
   currentGET("leftBottom", { limitNum: 20 }).then((res) => {
-    console.log("设备提醒", res);
+    console.log("来电实况", res);
     if (res.success) {
       state.list = res.data.list;
     } else {

+ 34 - 4
src/views/index/left-center.vue

@@ -24,7 +24,7 @@ const echartsGraphic = (colors: string[]) => {
 };
 const getData = () => {
   currentGET("leftCenter").then((res) => {
-    console.log(res);
+    console.log(res,'来源占比');
     if (res.success) {
       state.lockNum = res.data.lockNum;
       state.offlineNum = res.data.offlineNum;
@@ -67,7 +67,7 @@ const setOption = () => {
     },
     series: [
       {
-        name: "用户总览",
+        name: "",
         type: "pie",
         radius: ["40%", "70%"],
         // avoidLabelOverlap: false,
@@ -112,7 +112,37 @@ const setOption = () => {
           smooth: 0.2,
           lineStyle: {},
         },
-        data: [
+        data:[
+          {
+            "name": "其他",
+            "value": 3,
+          },
+          {
+            "name": "邮件",
+            "value": 2
+          },
+          {
+            "name": "微信",
+            "value": 39
+          },
+          {
+            "name": "APP",
+            "value": 7
+          },
+          {
+            "name": "微博",
+            "value": 30,
+          },
+          {
+            "name": "电话",
+            "value": 23
+          },
+          {
+            "name": "网站",
+            "value": 2,
+          }
+        ]
+       /* data: [
           {
             value: state.onlineNum,
             name: "在线",
@@ -141,7 +171,7 @@ const setOption = () => {
               color: echartsGraphic(["#F4023C", "#FB6CB7"]),
             },
           },
-        ],
+        ],*/
       },
     ],
   };

+ 13 - 9
src/views/index/left-top.vue

@@ -4,25 +4,25 @@
       <div class="user_Overview_nums allnum">
         <CountUp :endVal="state.totalNum" :duration="duration" />
       </div>
-      <p>工单办理(日)</p>
+      <p>月工单量</p>
     </li>
     <li class="user_Overview-item" style="color: #07f7a8">
       <div class="user_Overview_nums online">
         <CountUp :endVal="state.onlineNum" :duration="duration" />
       </div>
-      <p>在线数</p>
+      <p>月办结量</p>
     </li>
-    <li class="user_Overview-item" style="color: #e3b337">
+    <li class="user_Overview-item" style="color: #00fdfa">
       <div class="user_Overview_nums offline">
         <CountUp :endVal="state.offlineNum" :duration="duration" />
       </div>
-      <p>掉线数</p>
+      <p>日工单里</p>
     </li>
-    <li class="user_Overview-item" style="color: #f5023d">
+    <li class="user_Overview-item" style="color: #07f7a8">
       <div class="user_Overview_nums laramnum">
         <CountUp :endVal="state.alarmNum" :duration="duration" />
       </div>
-      <p>告警次数</p>
+      <p>日办结量</p>
     </li>
   </ul>
 </template>
@@ -32,6 +32,10 @@ import { currentGET } from "@/api";
 import CountUp from "@/components/count-up";
 import signalR from "@/utils/signalR";
 const duration = ref(2);
+const props = defineProps<{
+  config: any;
+  data: any;
+}>();
 const state = reactive({
   alarmNum: 759,
   offlineNum: 44,
@@ -41,7 +45,7 @@ const state = reactive({
 
 const getData = () => {
   currentGET("leftTop").then((res) => {
-    console.log(res);
+    console.log(res,'工单办理日');
     if (res.success) {
       state.alarmNum = res.data.alarmNum;
       state.offlineNum = res.data.offlineNum;
@@ -110,13 +114,13 @@ onMounted(() => {
 
     .offline {
       &::before {
-        background-image: url("@/assets/img/left_top_huang.png");
+        background-image: url("@/assets/img/left_top_lan.png");
       }
     }
 
     .laramnum {
       &::before {
-        background-image: url("@/assets/img/left_top_hong.png");
+        background-image: url("@/assets/img/left_top_lv.png");
       }
     }
   }

+ 1 - 1
src/views/index/right-bottom.vue

@@ -94,7 +94,7 @@ const state = reactive<any>({
 
 const getData = () => {
   currentGET("rightBottom", { limitNum: 20 }).then((res) => {
-    console.log("右下", res);
+    console.log("工单概览", res);
     if (res.success) {
       state.list = res.data.list;
     } else {

+ 1 - 1
src/views/index/right-center.vue

@@ -19,7 +19,7 @@ const config = ref({
 const data = ref([]);
 const getData = () => {
   currentGET("rightCenter").then((res) => {
-    console.log("报警排名", res);
+    console.log("问题高发", res);
     if (res.success) {
       data.value = res.data;
     } else {

+ 1 - 1
src/views/index/right-top.vue

@@ -13,7 +13,7 @@ import signalR from "@/utils/signalR";
 const option = ref({});
 const getData = () => {
   currentGET("rightTop", {}).then((res) => {
-    console.log("报警次数 ", res);
+    console.log("办理情况 ", res);
     if (res.success) {
       setOption(res.data.dateList, res.data.numList, res.data.numList2);
     } else {