Parcourir la source

修改成本进度等

yuhan il y a 1 an
Parent
commit
c13b0ec972

+ 26 - 23
public/index.html

@@ -257,34 +257,22 @@
 
 </body>
 
-<!-- <script>
-  console.log(111111111111)
-  // var href = "http://www.baidu.com"
-  var href = "http://localhost:3000"
-  // 1.
-  // avueData()
-  // function avueData() {
-  //   console.log(11123686)
-
-  //   if (window.ActiveXObject === undefined) {// 不是ie浏览器,可直接打开
-  //     window.open(href, '_blank');
-  //   } else {// 是ie浏览器,跳转打开chrome
-  //     var objShell = new ActiveXObject("WScript.Shell");
-  //     objShell.Run("cmd.exe /c start chrome " + href, 0, true);
-  //   }
-  // }
+<script>
+  // console.log(111111111111)
+  // var href = "http://localhost:3000"
+  var href = "http://10.67.0.64:9988"
 
-  // 2.
+  // 1.
   window.onload = function () {
     var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase());
     // 判断是否谷歌浏览器
     if (!is_chrome) {
       console.log(!is_chrome)
       console.log('1',href)
-      // setTimeout(toGG(href), 100);
+      setTimeout(toGG(href), 100);
     } else {
-      console.log('2',href)
-      // window.location.replace(href)
+      console.log('谷歌',href)
+      // window.location.replace(href) // 此代码会有重复进入的bug
     }
   }
   function toGG(url) {
@@ -303,8 +291,10 @@
     cmd.exe /k start dir 会打开一个新窗口后执行dir指令,原窗口不会关闭。
     这里的dir是start chrome www.baidu.com//用谷歌浏览器打开百度
     */
-   console.log(url)
-    objShell.Run("cmd.exe /c start chrome " + url, 0, true);
+    // console.log(url)
+    // console.log(objShell)
+    objShell.Run("cmd.exe /c start chrome " + url, 0, false);
+    // console.log(':',objShell.Run("cmd.exe /c start chrome " + url, 0, false))
   }
   function getChromePath(objShell) {
     var regPath = ["HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
@@ -327,6 +317,19 @@
     return undefined;
   };
 
+  // 2.
+  // avueData()
+  // function avueData() {
+  //   console.log(11123686)
+
+  //   if (window.ActiveXObject === undefined) {// 不是ie浏览器,可直接打开
+  //     window.open(href, '_blank');
+  //   } else {// 是ie浏览器,跳转打开chrome
+  //     var objShell = new ActiveXObject("WScript.Shell");
+  //     objShell.Run("cmd.exe /c start chrome " + href, 0, true);
+  //   }
+  // }
+
   // 3.
   // var objShell = new ActiveXObject("WScript.Shell");
 
@@ -345,6 +348,6 @@
 
   // redirectToGoogle();
 
-</script> -->
+</script>
 
 </html>

+ 8 - 4
src/views/module_kzks/dashboard/Analysis.vue

@@ -132,14 +132,14 @@
             <a-tab-pane loading="true" tab="下达部门指标排行" key="1">
               <a-row>
                 <a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
-                  <deptZbphTable :dataSource="zbPhDataSource.jycsCharts" :loading="zhbLoading" class="dept-zbph-table"></deptZbphTable>
+                  <deptZbphTable :dataSource="zbPhDataSource.jycsCharts" :loading="zhbLoading" deptType="xd" class="dept-zbph-table"></deptZbphTable>
                 </a-col>
               </a-row>
             </a-tab-pane>
             <a-tab-pane loading="true" tab="责任部门指标排行" key="2">
               <a-row>
                 <a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
-                  <deptZbphTable :dataSource="zbPhDataSource.zrbmCharts" :loading="zhbLoading" class="dept-zbph-table"></deptZbphTable>
+                  <deptZbphTable :dataSource="zbPhDataSource.zrbmCharts" :loading="zhbLoading" deptType="zr" class="dept-zbph-table"></deptZbphTable>
                 </a-col>
               </a-row>
             </a-tab-pane>
@@ -306,7 +306,10 @@
         lineBarXAxisData: [],
         lineBarSeriesData: [],
         chbXAxisData: [],
-        chbSeriesData: [],
+        chbSeriesData: {
+          seriesData: [],
+          sumZcbData: [],
+        },
         // 排行
         rankingSeriesData: [50, 42, 26, 20, 15, 14, 12, 8, 5, 1],
         rankingYAxisNames: ["部门06", "部门01", "部门05", "部门10", "部门07", "部门04", "部门03", "部门08", "部门09", "部门02"],
@@ -560,13 +563,14 @@
               })
               if(response){
                 this.chbXAxisData = chartsData.xaxisData
-                this.chbSeriesData = chartsData.seriesData.map(res => {
+                this.chbSeriesData.seriesData = chartsData.seriesData.map(res => {
                   var findItem = chb8Names.find(item => item.value === res.name)
                   return{
                     name: findItem.name,
                     data: res.values
                   }
                 })
+                this.chbSeriesData.sumZcbData = chartsData.sumZcbData
               }
             }).finally(() => {
               // this.loading = false

+ 38 - 11
src/views/module_kzks/dashboard/components/deptZbphTable.vue

@@ -29,12 +29,16 @@
       loading: {
         type: Boolean,
         default: true
+      },
+      deptType: {
+        type: String,
+        default: ''
       }
     },
     data () {
       return {
-        // 表头
-        columns: [
+        // 全部表头
+        columnsAll: [
           {
             title: '序号',
             dataIndex: '',
@@ -67,6 +71,7 @@
             title:'当期合同额',
             align:"center",
             dataIndex: 'contractAmount',
+            deptType: 'xd',
             customRender: (text, record) => {
               return (Number(text)/10000).toFixed(2)
             },
@@ -75,6 +80,16 @@
             title:'当期已收款',
             align:"center",
             dataIndex: 'received',
+            deptType: 'xd',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
+            },
+          },
+          {
+            title:'当期完成额',
+            align:"center",
+            dataIndex: 'contractAmount',
+            deptType: 'zr',
             customRender: (text, record) => {
               return (Number(text)/10000).toFixed(2)
             },
@@ -88,19 +103,31 @@
             },
           },
         ],
+        // 表头
+        columns: [],
       }
     },
     created() {
     },
-    // watch: {
-    //   dataSource: {
-    //     handler(newV, oldV){
-    //       console.log(newV, oldV)
-    //       this.loading = false
-    //     },
-    //     immediate: true
-    //   }
-    // },
+    watch: {
+      // dataSource: {
+      //   handler(newV, oldV){
+      //     console.log(newV, oldV)
+      //     this.loading = false
+      //   },
+      //   immediate: true
+      // }
+      deptType: {
+        handler(newV, oldV){
+          console.log(newV, oldV)
+          this.columns = this.columnsAll.filter(res => {
+            return res.deptType == newV || !res.deptType
+          })
+          console.log(this.columns)
+        },
+        immediate: true
+      }
+    },
     methods: {
       initDictConfig(){
       },

+ 21 - 1
src/views/module_kzks/dashboard/components/lineBarChart.vue

@@ -92,6 +92,18 @@ export default {
             saveAsImage: {}
           }
         },
+        tooltip: {
+          trigger: 'axis',
+          formatter: function (params) {
+            console.log(params)
+            let str = params[0].name + "<br />";
+            params.forEach((item) => {
+              str +=
+                '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:'+item.color+'"></span>' + item.seriesName + " : " + (Number(item.value) / 10000).toFixed(2) +'万元' + "<br />";
+            });
+            return str;
+          },
+        },
         // dataZoom: [
         //   {
         //     startValue: '2023-02-01'
@@ -109,7 +121,15 @@ export default {
           type: 'value',
           axisLabel: {
             // 可以动态设置是数量还是金额
-            formatter: '{value} '
+            // formatter: '{value} '
+            formatter: function (value, index) {
+              console.log(value)
+              if(value > 0){
+                return (Number(value) / 10000).toFixed(1) + "万"
+              } else {
+                return value;
+              }
+            }
           }
         },
         series: [

+ 27 - 6
src/views/module_kzks/dashboard/components/lineBarChartChb.vue

@@ -16,8 +16,8 @@ export default {
       default: []
     },
     seriesData: {
-      type: Array,
-      default: []
+      type: Object,
+      default: {}
     }
   },
   data () {
@@ -72,9 +72,9 @@ export default {
           },
         },
         grid: {
-          left: '5%',
+          left: '7%',
           right: '5%',
-          bottom: '10%'
+          bottom: '10%',
         },
         legend: {
           type: 'scroll',
@@ -170,10 +170,10 @@ export default {
     setSeriesData(data){
       // console.log(this.uEcharts)
       var seriesData = data ? data : this.seriesData
-      // console.log(seriesData)
+      console.log(seriesData)
       // var option = this.uOption
       this.uOption.xAxis.data = this.xAxisData
-      this.uOption.series = seriesData.map(res => {
+      this.uOption.series = seriesData.seriesData.map(res => {
         return {
           name: res.name,
           type: 'bar',
@@ -181,6 +181,27 @@ export default {
           data: res.data,
         }
       })
+      // this.uOption.series.unshift({
+      //   name: '总数',
+      //   type: 'line',
+      //   smooth: true,
+        
+      //   // label: { 
+      //   //   normal: { 
+      //   //     offset:['50', '80'], 
+      //   //     show: true, 
+      //   //     position: 'insideBottom', 
+      //   //     formatter:'{c}', 
+      //   //     textStyle:{ color:'#000' } 
+      //   //   }
+      //   // }, 
+      //   // itemStyle:{ 
+      //   //   normal:{ 
+      //   //     color:'rgba(128, 128, 128, 0)' 
+      //   //   } 
+      //   // },
+      //   data: seriesData.sumZcbData,
+      // })
       // console.log(this.uOption.series)
       this.uEcharts.hideLoading()
       this.uEcharts.setOption(this.uOption, true)

+ 29 - 2
src/views/module_kzks/dashboard/components/twoYAxisChart.vue

@@ -83,6 +83,20 @@ export default {
             saveAsImage: {}
           }
         },
+        tooltip: {
+          trigger: 'axis',
+          formatter: function (params) {
+            console.log(params)
+            let str = params[0].name + "<br />";
+            params.forEach((item) => {
+              var unit = item.seriesType === 'line' ? '个' : '万元'
+              var num = item.seriesType === 'line' ? item.value : (Number(item.value) / 10000).toFixed(2)
+              str +=
+                '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:'+item.color+'"></span>' + item.seriesName + " : " + num + unit + "<br />";
+            });
+            return str;
+          },
+        },
         // dataZoom: [
         //   {
         //     startValue: '2023-02-01'
@@ -114,7 +128,14 @@ export default {
             // interval: Math.ceil(this.priceMax / 6),
             axisLabel: {
               // 可以动态设置是数量还是金额
-              formatter: '{value} '
+              // formatter: '{value} '
+              formatter: function (value, index) {
+                if(value > 0){
+                  return (Number(value) / 10000).toFixed(1) + "万"
+                } else {
+                  return value;
+                }
+              }
             }
           },
         ],
@@ -168,7 +189,13 @@ export default {
           interval: Math.ceil(priceMax / 6),
           axisLabel: {
             // 可以动态设置是数量还是金额
-            formatter: '{value} '
+            formatter: function (value, index) {
+              if(value > 0){
+                return (Number(value) / 10000).toFixed(1) + "万"
+              } else {
+                return value;
+              }
+            }
           }
         },
       ]

+ 2 - 2
src/views/module_kzks/kpiImportList/KpiImportList.vue

@@ -253,9 +253,9 @@
             //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
             this.dataSource = res.result.content.records||res.result.content;
             this.isalarm = res.result.isalarm
-            if(res.result.total)
+            if(res.result.content.total)
             {
-              this.ipagination.total = res.result.total;
+              this.ipagination.total = res.result.content.total;
             }else{
               this.ipagination.total = 0;
             }

+ 1 - 1
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -454,7 +454,7 @@ import { number } from 'echarts';
             align:"center",
             dataIndex: 'costPercent',
             customRender: (text, record) => {
-              return record.id === 'amount'?null:(Number(text)).toFixed(1) + '%'
+              return record.id === 'amount'?null:(Number(text) * 100).toFixed(0) + '%'
             },
           },
           {