Sfoglia il codice sorgente

Merge branch 'V0.0.5' of http://10.87.21.221:8000/jzyd_yyds/soc_app into V0.0.5

zhulu 1 anno fa
parent
commit
861fbf1746

+ 1 - 1
src/config/env.development.js

@@ -2,7 +2,7 @@
 module.exports = {
   title: 'soc-app-dev',
   baseUrl: 'http://10.87.10.55:8080', // 本地图片地址
-  baseApi: '/gaoxiong', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
+  baseApi: '/dev', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
   APPID: 'xxx',
   APPSECRET: 'xxx',
   $cdn: 'https://www.sunniejs.cn/static'  //静态资源

+ 1 - 29
src/router/index.js

@@ -49,35 +49,7 @@ router.beforeEach((to, from, next) => {
   sessionStorage.setItem('ROUTER',JSON.stringify(object));
   console.log('从' + from.path + '跳向' + to.path)
   //如果当前是工作台页面返回的时候判断当前是否是A标签跳转是进行重定向到works
-  switch (to.path) {
-    case '/lz':
-      next('/works')
-      break
-    case '/dy':
-      next('/works')
-      break
-    case '/jc':
-      next('/works')
-      break
-    case '/yl':
-      next('/works')
-      break
-    case '/px':
-      next('/works')
-      break
-    case '/qt':
-      next('/works')
-      break
-    case '/py':
-      next('/works')
-    case '/wbpj':
-      next('/works')
-    case '/wtzg':
-      next('/works')
-    case '/lfsp':
-      next('/works')
-      break
-  }
+  
   if (to.path === '/login' || to.path === '/tokenlogin') return next()
 
   let token = sessionStorage.getItem('access_token')

+ 7 - 5
src/views/menu/cockpit/index.vue

@@ -274,14 +274,16 @@ export default {
       ])
 
       let list = []
+      let listNames=[]
       Object.keys(businessStoreInfo).map(item => {
-        // if (businessStoreInfo[item]) {
-        list.push({ value: businessStoreInfo[item], name: item })
-        // }
+        
+        list.push( businessStoreInfo[item])
+        listNames.push(item )
+       
       })
-      let num = list.map(item => item.value).reduce((a, b) => a + b)
+      let num = list.reduce((a, b) => a + b)
 
-      this.dotPieData = dotData('网点业务库总览', list, num)
+      this.dotPieData = dotData('网点业务库总览', list, num,listNames)
     },
     //履职情况
     resumptionInit() {

+ 16 - 7
src/views/menu/cockpit/indexEcharts.js

@@ -286,13 +286,14 @@ let dotData = (
   title = '',
 
   data = [],
-  num = 0
+  num = 0,
+  listNames= ['一类库', '二类库', '三类库', '四类库']
 ) => {
   var colors = ['#146de0', '#27ef5e', '#ffc140', '#d151d8', 'red']
   let option = {
     xAxis: {
       type: 'category',
-      data: ['一类库', '二类库', '三类库', '四类库']
+      data: listNames
     },
 
     yAxis: {
@@ -300,16 +301,24 @@ let dotData = (
     },
     series: [
       {
+        show: true,
         data: data,
         type: 'bar',
+       
+       
         label: {
+          show:true,
+          //数值展示的位置
+          textStyle: {
+            color: 'black',
+            fontSize: 12
+          },
           position: 'top', // 顶部显示
-          formatter: function (params) {
-            // dataIndex是当前柱状图的索引
-            let num = (dataList1[params.dataIndex] + dataList2[params.dataIndex]) / dataList2[params.dataIndex]
-            num = Math.round(num * 100) / 100 // 保留两位小数,不四舍五入
-            return num + '%'
+          formatter: function(params) {
+            return data[params.dataIndex] + '(' + ((data[params
+              .dataIndex] /num*100)).toFixed(0) + '%)'
           }
+
         },
 
         barWidth: 40,