فهرست منبع

feat(组件): 修改bug

tangning 2 سال پیش
والد
کامیت
3130a89845
2فایلهای تغییر یافته به همراه14 افزوده شده و 6 حذف شده
  1. 5 1
      src/views/statistics/components/condition.vue
  2. 9 5
      src/views/statistics/components/orderEchart.vue

+ 5 - 1
src/views/statistics/components/condition.vue

@@ -92,7 +92,11 @@ function handleTime(val) {
   output()
 }
 function but(){
-  emit('expor')
+  if(!props.typeShow){
+    emit('expor',type)
+  }else{
+    emit('expor')
+  }
 }
 function output(){
   let data = {

+ 9 - 5
src/views/statistics/components/orderEchart.vue

@@ -33,13 +33,17 @@
   }
   function expor(val){
     // emit('expor',val)
+    console.log('数量',val.value)
     let hader = ['时间', ...nameList.value]
     let fields  = {
-    'time':'日期',
-    '1':hader[1],
-    '2':hader[2],
-    '3':hader[3],
-  }
+      'time':'日期',
+      '1':hader[1],
+      '2':hader[2],
+      '3':hader[3],
+    }
+    if(props.title=='订单数据统计' && val?.value){
+      fields.time = `${val.value == 0?'数量/':'金额/'}` + fields.time
+    }
     let data = yixStringData.value.map((ele,index) => {
       return {
         'time':ele,