Преглед на файлове

style(client): 优化代码格式和引用
- 统一单双引号使用
- 调整缩进和空格
- 优化部分变量和函数名

yangjie преди 2 месеца
родител
ревизия
339ac9cc66
променени са 3 файла, в които са добавени 38 реда и са изтрити 38 реда
  1. 5 5
      src/view/client/12345/CenterTop/index.vue
  2. 28 28
      src/view/client/12345/CountySituation/index.vue
  3. 5 5
      src/view/client/12345/LeftTitle/index.vue

+ 5 - 5
src/view/client/12345/CenterTop/index.vue

@@ -24,8 +24,8 @@
 </template>
 
 <script>
-import { getAreaData } from './api';
-import { store } from '@/store';
+import { getAreaData } from "./api";
+import { store } from "@/store";
 export default {
   data() {
     return {
@@ -34,10 +34,10 @@ export default {
       areaDataList: [
         {
           acceptCount: 0,
-          districtName: '南江县',
+          districtName: "南江县",
           id: 1,
           processCount: 0,
-          statDate: '2024',
+          statDate: "2024",
         },
       ],
     };
@@ -58,7 +58,7 @@ export default {
         .then((res) => {
           const { code, result } = res.data;
           if (code === 200) {
-            const order = ['南江县', '通江县', '平昌县', '巴州区', '恩阳区'];
+            const order = ["南江县", "通江县", "平昌县", "巴州区", "恩阳区"];
             this.areaDataList = result.sort((a, b) => {
               return (
                 order.indexOf(a.districtName) - order.indexOf(b.districtName)

+ 28 - 28
src/view/client/12345/CountySituation/index.vue

@@ -37,14 +37,14 @@
 </template>
 
 <script>
-import { getCountySituation } from './api';
-import colors from './colors';
+import { getCountySituation } from "./api";
+import colors from "./colors";
 export default {
   data() {
     return {
       analyseType: 0,
       year: 2024,
-      yData: ['恩阳区', '巴州区', '平昌县', '南江县', '通江县'],
+      yData: ["恩阳区", "巴州区", "平昌县", "南江县", "通江县"],
       xData: {
         x1: [20, 30, 20, 30, 20],
         x2: [15, 35, 20, 15, 15],
@@ -82,35 +82,35 @@ export default {
         .then((res) => {
           const { code, result } = res.data;
           if (code === 200) {
-            console.log(res, '先付');
+            console.log(res, "先付");
             this.yData = result.xaxisData;
-            this.xData.x1 = result.yaxisData['已办'];
-            this.xData.x2 = result.yaxisData['待办'];
-            this.xData.x3 = result.yaxisData['超期'];
+            this.xData.x1 = result.yaxisData["已办"];
+            this.xData.x2 = result.yaxisData["待办"];
+            this.xData.x3 = result.yaxisData["超期"];
             this.initChart();
           }
         });
     },
     initChart() {
-      console.log('执行init');
+      console.log("执行init");
       this.myChart = this.$echarts.init(
-        document.getElementById('countySituation')
+        document.getElementById("countySituation")
       );
       const option = {
         grid: {
-          top: '15%',
-          bottom: '15%',
+          top: "15%",
+          bottom: "15%",
         },
         legend: {
-          data: ['已办', '待办', '超期'],
-          top: '5%',
-          right: '5%',
+          data: ["已办", "待办", "超期"],
+          top: "5%",
+          right: "5%",
           textStyle: {
-            color: '#fff',
+            color: "#fff",
           },
         },
         xAxis: {
-          type: 'value',
+          type: "value",
           // 网格线
           splitLine: {
             show: false,
@@ -129,7 +129,7 @@ export default {
         },
         yAxis: [
           {
-            type: 'category',
+            type: "category",
             data: this.yData,
             // 坐标轴线
             axisLine: {
@@ -149,10 +149,10 @@ export default {
         ],
         series: [
           {
-            name: '已办',
-            type: 'bar',
+            name: "已办",
+            type: "bar",
             data: this.xData.x1,
-            barWidth: '15%',
+            barWidth: "15%",
             // label: {
             //   show: true,
             //   position: "top",
@@ -161,10 +161,10 @@ export default {
             itemStyle: { color: colors.barColor1 },
           },
           {
-            name: '待办',
-            type: 'bar',
+            name: "待办",
+            type: "bar",
             data: this.xData.x2,
-            barWidth: '15%',
+            barWidth: "15%",
             // label: {
             //   show: true,
             //   position: "top",
@@ -173,18 +173,18 @@ export default {
             itemStyle: { color: colors.barColor2 },
           },
           {
-            name: '超期',
-            type: 'bar',
+            name: "超期",
+            type: "bar",
             data: this.xData.x3,
-            barWidth: '15%',
+            barWidth: "15%",
             // label: {
             //   show: true,
             //   position: "top",
             //   color: colors.barTopTextColor,
             // },
             itemStyle: { color: colors.barColor3 },
-            barCategoryGap: '20%',
-            barGap: '100%',
+            barCategoryGap: "20%",
+            barGap: "100%",
           },
         ],
       };

+ 5 - 5
src/view/client/12345/LeftTitle/index.vue

@@ -1,15 +1,15 @@
 <template>
   <div class="box">
     <div class="top-left-box">
-      <div class="top-left-num" style="color: #80f2ad">{{monthData}}</div>
+      <div class="top-left-num" style="color: #80f2ad">{{ monthData }}</div>
       <div class="top-left-text">本月接件量</div>
     </div>
     <div class="top-left-box">
-      <div class="top-left-num" style="color: #00fdff">{{yearData}}</div>
+      <div class="top-left-num" style="color: #00fdff">{{ yearData }}</div>
       <div class="top-left-text">本年接件量</div>
     </div>
     <div class="top-left-box">
-      <div class="top-left-num" style="color: #34a4ee">{{historyData}}</div>
+      <div class="top-left-num" style="color: #34a4ee">{{ historyData }}</div>
       <div class="top-left-text">累计接件量</div>
     </div>
   </div>
@@ -29,7 +29,7 @@ export default {
     this.getData();
   },
   methods: {
-    getData(){
+    getData() {
       getHistoryAcceptCount.getList().then((res) => {
         const { code, result } = res.data;
         if (code === 200) {
@@ -39,7 +39,7 @@ export default {
         }
         console.log(res, "data");
       });
-    }
+    },
   },
 };
 </script>