qymljy 2 лет назад
Родитель
Сommit
dffe652b08

+ 45 - 18
src/HDrpManagement/customerData/index.vue

@@ -180,8 +180,8 @@
                   </div>
                 </div>
                 <div class="panel-content">
-                  <div ref="customerTypeEl" style="width:30%"></div>
-                  <div class="panel-table" style="width:70%">
+                  <div ref="customerTypeEl" :style="windowWidth<1505?'width:54%':windowWidth<1805?'width:54%':windowWidth<2500?'width:45%':'width:30%'"></div>
+                  <div class="panel-table" :style="windowWidth<1505?'width:46%':windowWidth<1805?'width:46%':windowWidth<2500?'width:55%':'width:70%'">
                     <pageTable
                       ref="customerTypeTable"
                       :tablecols="tool.tabelCol($route.name).typeTable.tablecols"
@@ -261,8 +261,8 @@
                   </div>
                 </div>
                 <div class="panel-content">
-                  <div ref="customerGradEl" style="width:30%"></div>
-                  <div class="panel-table" style="width:70%">
+                  <div ref="customerGradEl" :style="windowWidth<1505?'width:54%':windowWidth<1805?'width:54%':windowWidth<2500?'width:45%':'width:30%'"></div>
+                  <div class="panel-table" :style="windowWidth<1505?'width:46%':windowWidth<1805?'width:46%':windowWidth<2500?'width:55%':'width:70%'">
                     <pageTable
                       ref="customerGradTable"
                       :tablecols="tool.tabelCol($route.name).typeTable.tablecols"
@@ -1042,6 +1042,7 @@ export default {
           "username":JSON.parse(sessionStorage.getItem('accountinfo')).name,
         }
       },
+      newFollowup:[]
     }
   },
   methods:{
@@ -1103,6 +1104,9 @@ export default {
               isGroup: true,
               seriesField: 'key',
               color:['#62daab','#6395fa'],
+              label:{
+                position:top
+              }
             },
             {
               geometry: 'line',
@@ -1110,7 +1114,13 @@ export default {
                 lineWidth: 2,
               },
               seriesField: 'key',
-              color: '#657798',
+              color: '#F6903D',
+              smooth: true,
+              label:{
+                formatter: (datum) =>{
+                  return  datum.value + '%'
+                }
+              }
             },
           ],
           tooltip: {
@@ -1136,27 +1146,30 @@ export default {
       let lastYear = []
       let nowYear = []
       let k=0
-      for (var i=0;i<res.data.followup.length;i++){
-        if (res.data.followup[i].key === '去年同期新增'){
-          lastYear[k]=res.data.followup[i]
+      for (var i=0;i< this.chartMapData .followup.length;i++){
+        if ( this.chartMapData .followup[i].key === '去年同期跟进'){
+          lastYear[k]= this.chartMapData .followup[i]
           k++
         }
       }
       let x=0
-      for (var i=0;i<res.data.followup.length;i++){
-        if (res.data.followup[i].key === '本期新增'){
-          nowYear[x]=res.data.followup[i]
+      for (var i=0;i< this.chartMapData .followup.length;i++){
+        if ( this.chartMapData .followup[i].key === '本期跟进'){
+          nowYear[x] =  this.chartMapData .followup[i]
           x++
         }
       }
+      console.log(nowYear,'nowYear')
+      console.log(lastYear,'lastYear')
       this.newFollowup = lastYear.concat(nowYear)
-      this.lineChart = res.data.lineChart.map(item=>{
+      console.log(this.newFollowup,'newFollowup')
+      /*this.lineChart = res.data.tbzzl.map(item=>{
         return {
           date: item.date,
           type:"同比增长率",
           value: item.value
         }
-      })
+      })*/
      /* this.chartMapData.tbzzl.forEach(item => item.key = '同比增长率(%)')*/
       if (init) {
         this.chartMap = new DualAxes(this.$refs.chart2, {
@@ -1167,13 +1180,23 @@ export default {
             {
               geometry: 'column',
               seriesField:'key',
-              isGroup: 'true',
+              isGroup: true,
               color:['#62daab','#6395fa'],
+              label:{
+                position:top
+              }
             },
             {
               geometry: 'line',
               seriesField:'key',
-              color: '#657798',
+              color: '#F6903D',
+              smooth: true,
+              label:{
+                position:top,
+                formatter: (datum) =>{
+                  return  datum.value + '%'
+                }
+              }
             },
           ],
           tooltip: {
@@ -1185,7 +1208,7 @@ export default {
 
         this.chartMap.render();
       } else {
-        this.chartMap.changeData([this.chartMapData.followup, this.chartMapData.tbzzl])
+        this.chartMap.changeData([this.newFollowup, this.chartMapData.tbzzl])
       }
     },
     //客户类型图初始化
@@ -1231,7 +1254,7 @@ export default {
             },
           },
           legend: {
-            position:'left'
+            position:'bottom'
           },
           // 添加 中心统计文本 交互
           interactions: [{ type: 'element-single-selected' },{ type: 'element-active' }],
@@ -1302,7 +1325,7 @@ export default {
             },
           },
           legend: {
-            position:'left'
+            position:'bottom'
           },
           // 添加 中心统计文本 交互
           interactions: [{ type: 'element-single-selected' }, { type: 'element-active' }],
@@ -1600,6 +1623,10 @@ export default {
             //   formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`),
             // },
           },
+          label:{
+            position:top
+          },
+          smooth: true,
         });
 
         this.projectMap.render()

+ 102 - 9
src/HDrpManagement/projectData/index.vue

@@ -1634,7 +1634,7 @@ export default {
             },
           },
           legend: {
-            position:'left'
+            position:'bottom'
           },
           // 添加 中心统计文本 交互
           interactions: [{ type: 'element-single-selected' },{ type: 'element-active' }],
@@ -1734,6 +1734,9 @@ export default {
           seriesField: 'key',
           minBarWidth: 20,
           maxBarWidth: 40,
+          label:{
+            position:top
+          },
           legend: {
             position: 'top-left',
           },
@@ -1765,7 +1768,24 @@ export default {
         param.content.dataid = param.content.dataid[param.content.dataid.length - 1]
       }
       let res = await this.$api.requested(param)
-      this.addData.arr1 = res.data.histogram
+      /*this.addData.arr1 = res.data.histogram*/
+      let lastYear = []
+      let nowYear = []
+      let k=0
+      for (var i=0;i<res.data.histogram.length;i++){
+        if (res.data.histogram[i].key === '去年同期新增'){
+          lastYear[k]=res.data.histogram[i]
+          k++
+        }
+      }
+      let x=0
+      for (var i=0;i<res.data.histogram.length;i++){
+        if (res.data.histogram[i].key === '本期新增'){
+          nowYear[x]=res.data.histogram[i]
+          x++
+        }
+      }
+      this.addData.arr1 = lastYear.concat(nowYear)
       res.data.lineChart.forEach(item => item[`同比增长率`] = item.value)
       this.addData.arr2 = res.data.lineChart
       if (init) {
@@ -1778,12 +1798,24 @@ export default {
               geometry: 'column',
               isGroup: true,
               seriesField: 'key',
+              color:['#62daab','#6395fa'],
+              label:{
+                position:top
+              }
             },
             {
               geometry: 'line',
               lineStyle: {
                 lineWidth: 2,
               },
+              color: '#F6903D',
+              smooth: true,
+              label:{
+                position:top,
+                formatter: (datum) =>{
+                  return  datum.value + '%'
+                }
+              }
             },
           ],
           tooltip: {
@@ -1804,7 +1836,24 @@ export default {
         param.content.dataid = param.content.dataid[param.content.dataid.length - 1]
       }
       let res = await this.$api.requested(param)
-      this.baobeiData.arr1 = res.data.histogram
+      /*this.baobeiData.arr1 = res.data.histogram*/
+      let lastYear = []
+      let nowYear = []
+      let k=0
+      for (var i=0;i<res.data.histogram.length;i++){
+        if (res.data.histogram[i].key === '去年同期报备'){
+          lastYear[k]=res.data.histogram[i]
+          k++
+        }
+      }
+      let x=0
+      for (var i=0;i<res.data.histogram.length;i++){
+        if (res.data.histogram[i].key === '本期报备'){
+          nowYear[x]=res.data.histogram[i]
+          x++
+        }
+      }
+      this.baobeiData.arr1 = lastYear.concat(nowYear)
       res.data.lineChart.forEach(item => item[`同比增长率`] = item.value)
       this.baobeiData.arr2 = res.data.lineChart
       if (init) {
@@ -1817,12 +1866,24 @@ export default {
               geometry: 'column',
               isGroup: true,
               seriesField: 'key',
+              color:['#62daab','#6395fa'],
+              label:{
+                position:top
+              }
             },
             {
               geometry: 'line',
               lineStyle: {
                 lineWidth: 2,
               },
+              color: '#F6903D',
+              smooth: true,
+              label:{
+                position:top,
+                formatter: (datum) =>{
+                  return  datum.value + '%'
+                }
+              }
             },
           ],
           tooltip: {
@@ -1844,6 +1905,23 @@ export default {
       }
       let res = await this.$api.requested(param)
       this.fllowData = res.data
+      let lastYear = []
+      let nowYear = []
+      let k=0
+      for (var i=0;i<res.data.followup.length;i++){
+        if (res.data.followup[i].key === '去年同期跟进'){
+          lastYear[k]=res.data.followup[i]
+          k++
+        }
+      }
+      let x=0
+      for (var i=0;i<res.data.followup.length;i++){
+        if (res.data.followup[i].key === '本期跟进'){
+          nowYear[x]=res.data.followup[i]
+          x++
+        }
+      }
+      this.fllowData.followup = lastYear.concat(nowYear)
       this.fllowData.tbzzl.forEach(item => item.key = '同比增长率')
       console.log(res.data,'跟进数据');
       if (init) {
@@ -1856,12 +1934,21 @@ export default {
               geometry: 'column',
               seriesField:'key',
               isGroup: 'true',
-              color: '#5B8FF9',
+              color:['#62daab','#6395fa'],
+              label:{
+                position:top
+              }
             },
             {
               geometry: 'line',
               seriesField:'key',
-              color: '#5AD8A6',
+              color: '#F6903D',
+              smooth: true,
+              label:{
+                formatter: (datum) =>{
+                  return  datum.value + '%'
+                }
+              }
             },
           ],
           tooltip: {
@@ -1883,13 +1970,14 @@ export default {
       }
       let res = await this.$api.requested(param)
       this.baojiaData = res.data
-      console.log(res.data,'报价数据');
+
       if (init) {
         this.baojiaMap = new Line(this.$refs.baojiaEl, {
           data:this.baojiaData,
           xField: 'date',
           yField: 'value',
           seriesField: 'key',
+          label:{},
           xAxis: {
             /*type: 'time',*/
           },
@@ -1899,6 +1987,7 @@ export default {
             //   formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`),
             // },
           },
+          smooth: true,
         })
         this.baojiaMap.render()
       } else {
@@ -2191,13 +2280,17 @@ export default {
           xField: 'datetype',
           yField: 'value',
           seriesField: 'key',
+          label:{
+            position:top
+          },
           /** 设置颜色 */
           //color: ['#1ca9e6', '#f88c24'],
           /** 设置间距 */
+
           // marginRatio: 0.1,
-          label: {
+          /*label: {
             // 可手动配置 label 数据标签位置
-            position: 'middle', // 'top', 'middle', 'bottom'
+            position: 'top', // 'top', 'middle', 'bottom'
             // 可配置附加的布局方法
             layout: [
               // 柱形图数据标签位置自动调整
@@ -2207,7 +2300,7 @@ export default {
               // 数据标签文颜色自动调整
               { type: 'adjust-color' },
             ],
-          },
+          },*/
           interactions: [{ type: 'element-highlight-by-x' }],
         });
         this.customerUnfllowMap.on('element:click',(v) => {

+ 8 - 1
src/views/clueData/modules/clueAdd.vue

@@ -117,7 +117,14 @@ export default {
           {
             geometry: 'line',
             seriesField: 'type',
-            color: '#657798',
+            color: '#F6903D',
+            smooth: true,
+            label:{
+              position:top,
+              formatter: (datum) =>{
+                return  datum.value + '%'
+              }
+            },
             lineStyle: {
               lineWidth: 2,
             },

+ 11 - 0
src/views/clueData/modules/clueChange.vue

@@ -90,6 +90,10 @@ export default {
             geometry: 'line',
             isGroup: true,
             seriesField: 'key',
+            label:{
+              position:top
+            },
+            smooth: true,
           },
           {
             geometry: 'line',
@@ -97,6 +101,13 @@ export default {
             lineStyle: {
               lineWidth: 2,
             },
+            smooth: true,
+            label:{
+              position:top,
+              formatter: (datum) =>{
+                return  datum.value + '%'
+              }
+            }
           },
         ],
         tooltip: {

+ 8 - 3
src/views/clueData/modules/clueFollow.vue

@@ -90,8 +90,6 @@ export default {
           x++
         }
       }
-      console.log(lastYear,'lastYear')
-      console.log(nowYear,'nowYear')
       this.lineChart = res.data.lineChart.map(item=>{
         return {
           date: item.date,
@@ -120,7 +118,14 @@ export default {
           {
             geometry: 'line',
             seriesField: 'key',
-            color: '#657798',
+            color: '#F6903D',
+            smooth: true,
+            label:{
+              position:top,
+              formatter: (datum) =>{
+                return  datum.value + '%'
+              }
+            },
             lineStyle: {
               lineWidth: 2,
             },

+ 34 - 1
src/views/salesData/modules/customerAccountBalanceAnalysis.vue

@@ -156,7 +156,26 @@ export default {
       this.param.content.enddate = this.endDate
       const res = await this.$api.requested(this.param)
       this.accountList = res.data.accountclass
-      this.balance = res.data.balance.map((item)=>{
+      let lastYear = []
+      let nowYear = []
+      let k=0
+      for (var i=0;i<res.data.balance.length;i++){
+        if (res.data.balance[i].name === '去年同期金额'){
+          lastYear[k]=res.data.balance[i]
+          k++
+        }
+      }
+      let x=0
+      for (var i=0;i<res.data.balance.length;i++){
+        if (res.data.balance[i].name === '本年金额'){
+          nowYear[x]=res.data.balance[i]
+          x++
+        }
+      }
+      console.log(lastYear,'lastYear')
+      console.log(nowYear,'nowYear')
+      let balance = lastYear.concat(nowYear)
+      this.balance = balance.map((item)=>{
         let value = item.value/10000
         return {
           "date":item.date,
@@ -185,6 +204,13 @@ export default {
             geometry: 'column',
             isGroup: true,
             seriesField: 'name',
+            color:['#62daab','#6395fa'],
+            label:{
+              position:top,
+              formatter: (datum) =>{
+                return '¥' + this.tool.formatAmount(datum.value,2)
+              }
+            }
            /* label: {
               // 可手动配置 label 数据标签位置
               position: 'top', // 'top', 'bottom', 'middle',
@@ -202,6 +228,13 @@ export default {
           {
             geometry: 'line',
             seriesField: 'name',
+            color: '#F6903D',
+            smooth: true,
+            label:{
+              formatter: (datum) =>{
+                return  datum.value + '%'
+              }
+            }
            /* label: {
               // 可手动配置 label 数据标签位置
               position: 'top', // 'top', 'bottom', 'middle',

+ 15 - 1
src/views/salesData/modules/invoiceAmountAnalysis.vue

@@ -94,7 +94,7 @@ export default {
           "type":'去年同期金额(万元)'
         }
       })
-      this.list = amount.concat(oldamount)
+      this.list = oldamount.concat(amount)
       this.list1 = res.data.map(item=>{
         return {
           "date":item.date,
@@ -118,12 +118,26 @@ export default {
             geometry: 'column',
             isGroup: true,
             seriesField: 'type',
+            color:['#62daab','#6395fa'],
+            label:{
+              position:top,
+              formatter: (datum) =>{
+                return '¥' + this.tool.formatAmount(datum.value,2)
+              }
+            }
           },
           {
             geometry: 'line',
             lineStyle: {
               lineWidth: 2,
             },
+            color: '#F6903D',
+            smooth: true,
+            label:{
+              formatter: (datum) =>{
+                return  datum.tbzzl + '%'
+              }
+            }
           },
         ],
         tooltip: {

+ 15 - 1
src/views/salesData/modules/orderTrendAnalysis.vue

@@ -101,7 +101,7 @@ export default {
           "value":Math.round(((item.tbzzl * 100)*100)/100)
         }
       })
-      this.list = list3.concat(this.list2)
+      this.list = this.list2.concat(list3)
 
       this.chartDualAxes.changeData([this.list,this.list1])
     },
@@ -115,6 +115,13 @@ export default {
             geometry: 'column',
             isGroup: true,
             seriesField: 'type',
+            color:['#62daab','#6395fa'],
+            label:{
+              position:top,
+              formatter: (datum) =>{
+                return '¥' + this.tool.formatAmount(datum.value,2)
+              }
+            }
            /* label: {
               // 可手动配置 label 数据标签位置
               position: 'top', // 'top', 'bottom', 'middle',
@@ -128,6 +135,13 @@ export default {
               lineWidth: 2,
             },
             seriesField: 'type',
+            color: '#F6903D',
+            smooth: true,
+            label:{
+              formatter: (datum) =>{
+                return  datum.value + '%'
+              }
+            }
            /* label: {
               // 可手动配置 label 数据标签位置
               position: 'top', // 'top', 'bottom', 'middle',

+ 5 - 5
src/views/salesData/modules/orderType.vue

@@ -43,8 +43,8 @@
         </div>
       </div>
       <div class="chart" style="height: 416px">
-        <div id="orderTypeChart" style="height: 400px;width: 30%;float: left;margin-right: 2%" :style="{height:heightChart,width:'30%',float:'left',marginRight:'2%'}"></div>
-        <div style="float: right;width: 68%">
+        <div id="orderTypeChart" style="height: 400px;" :style="{height:heightChart,width:windowWidth < 1505?'54%':windowWidth<1805?'54%':windowWidth<2500?'45%':'30%',float:'left'}"></div>
+        <div style="float: right;" :style="windowWidth<1505?'width:46%':windowWidth<1805?'width:46%':windowWidth<2500?'width:55%':'width:70%'">
           <tableTemplate style="margin-top: 10px" ref="table" :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="heightTable" fixedName="operation">
             <template v-slot:customcol="scope">
               <p v-if="scope.column.columnname === 'operation'">
@@ -67,7 +67,7 @@
                 @size-change="handleSizeChange"
                 @current-change="handleCurrentChange"
                 :current-page="currentPage"
-                :pager-count="7"
+                :pager-count="3"
                 :page-sizes="[20, 50,100, 200]"
                 :page-size="20"
                 layout="total,sizes, prev, pager, next, jumper"
@@ -89,7 +89,7 @@ import exportFile from '@/components/export_file/index'
 const G = G2.getEngine('canvas');
 export default {
   name: "orderType",
-  props:['dataid','scrollHeight'],
+  props:['dataid','scrollHeight','windowWidth'],
   components:{tableTemplate,fullScreen,exportFile},
   data(){
     return {
@@ -214,7 +214,7 @@ export default {
         radius: 1,
         innerRadius: 0.6,
         legend:{
-          position:'left',
+          position:'bottom',
           style:{
             marginLeft:'80px'
           }

+ 2 - 0
src/views/salesData/modules/quotationAnalysis.vue

@@ -157,6 +157,8 @@ export default {
         xField: 'date',
         yField: valueKey,
         seriesField: seriesKey,
+        smooth: true,
+        label:{}
         /*label: {
           // 可手动配置 label 数据标签位置
           position: 'top', // 'top', 'bottom', 'middle',

+ 15 - 1
src/views/salesData/modules/shippingTrendAnalysis.vue

@@ -101,7 +101,7 @@ export default {
           "type":'去年同期金额(万元)'
         }
       })
-      this.list = amount.concat(oldamount)
+      this.list = oldamount.concat(amount)
       const tbzzl = res.data.map(item=>{
         return {
           "value":Math.round(((item.tbzzl * 100)*100)/100),
@@ -129,6 +129,13 @@ export default {
             geometry: 'column',
             isGroup: true,
             seriesField: 'type',
+            color:['#62daab','#6395fa'],
+            label:{
+              position:top,
+              formatter: (datum) =>{
+                return '¥' + this.tool.formatAmount(datum.value,2)
+              }
+            }
             /*label: {
               // 可手动配置 label 数据标签位置
               position: 'top', // 'top', 'bottom', 'middle',
@@ -140,6 +147,13 @@ export default {
             geometry: 'line',
             isGroup: true,
             seriesField: 'type',
+            color: ['#F6903D','#f7c122'],
+            smooth: true,
+            label:{
+              formatter: (datum) =>{
+                return  datum.value + '%'
+              }
+            }
             /*label: {
               // 可手动配置 label 数据标签位置
               position: 'top', // 'top', 'bottom', 'middle',

+ 6 - 0
src/views/salesData/modules/uninvoiceAmountAnalysis.vue

@@ -122,6 +122,12 @@ export default {
         xField: 'date',
         yField: valueKey,
         seriesField: seriesKey,
+        label:{
+          formatter: (datum) =>{
+            return '¥' + this.tool.formatAmount(datum.value,2)
+          }
+        },
+        smooth: true,
         tooltip: {
           formatter: (datum) => {
             return {