瀏覽代碼

代码提交-修改今日日期

zhuxinbo 5 年之前
父節點
當前提交
3982b70d43

+ 2 - 1
src/views/modules/Statistics/accountMaterStatistics.vue

@@ -67,6 +67,7 @@ th div {
               :startValue.sync="startValue"
               :timeList="timeList"
               ref="timeCheck"
+              :activeNow="2"
             ></time-check>
           </a-card>
         </a-col>
@@ -344,7 +345,7 @@ export default {
 
       show: true,
       timeList: [
-        { label: '今天', value: 1, show: true },
+        // { label: '今天', value: 1, show: false },
         { label: '昨天', value: 2, show: true },
         { label: '近一周', value: 3, show: true },
         { label: '近十五天', value: 4, show: true },

+ 18 - 8
src/views/modules/Statistics/components/timeCheck.vue

@@ -69,17 +69,19 @@
 <template>
   <div>
     <p
-      :style="active==item.value?'color:cornflowerblue;background:#f2f2f2':''"
-      v-for="(item,index) of timeList"
+      :style="active == item.value ? 'color:cornflowerblue;background:#f2f2f2' : ''"
+      v-for="(item, index) of timeList"
       :key="index"
       @click="getAdd(item.value)"
-    >{{item.label}}</p>
+    >
+      {{ item.label }}
+    </p>
     <a-range-picker
       style="width:400px"
       :disabledDate="disabledDate"
       :showTime="{
-                hideDisabledOptions: true,
-            }"
+        hideDisabledOptions: true
+      }"
       format="YYYY-MM-DD"
       v-model="startValue"
       @ok="getAdd(9)"
@@ -114,6 +116,12 @@ export default {
           { label: '所有', value: 8, show: true }
         ]
       }
+    },
+    activeNow: {
+      type: Number,
+      default() {
+        return 1
+      }
     }
   },
   data: function() {
@@ -146,8 +154,8 @@ export default {
     },
     getAdd(checked) {
       this.active = checked
-      if(checked!=9){
-          this.startValue = []
+      if (checked != 9) {
+        this.startValue = []
       }
       active = checked
       this.$emit('update:startValue', this.startValue)
@@ -158,7 +166,9 @@ export default {
   distoryed() {},
   updated() {},
   mounted: function() {
-    this.$nextTick(() => {})
+    this.$nextTick(() => {
+      this.active = this.activeNow
+    })
   }
 }
 </script>

+ 19 - 3
src/views/modules/Statistics/dataDisplayStatistics.vue

@@ -118,7 +118,13 @@ th div {
       <a-row>
         <a-col :span="24">
           <a-card :bordered="false" class="search-box">
-            <time-check @getAdd="getAdd" :startValue.sync="startValue" ref="timeCheck"></time-check>
+            <time-check
+              @getAdd="getAdd"
+              :startValue.sync="startValue"
+              :timeList="timeList"
+              ref="timeCheck"
+              :activeNow="2"
+            ></time-check>
           </a-card>
         </a-col>
       </a-row>
@@ -443,7 +449,7 @@ export default {
       statHour: null,
       keyValue: null,
       keyValueData: [],
-      active: 1,
+      active: 2,
       startValue: [],
       allValue: [],
       discount: 1,
@@ -460,6 +466,16 @@ export default {
         discountCost: 0,
         discountCostProportion: 0
       },
+      timeList: [
+        // { label: '今天', value: 1, show: true },
+        { label: '昨天', value: 2, show: true },
+        { label: '近一周', value: 3, show: true },
+        { label: '近十五天', value: 4, show: true },
+        { label: '近一月', value: 5, show: true },
+        { label: '近三月', value: 6, show: true },
+        { label: '近半年', value: 7, show: true },
+        { label: '所有', value: 8, show: true }
+      ],
       dataDetail: [],
       tabListNoTitle: [
         {
@@ -752,7 +768,7 @@ export default {
                   ? (res.result.ratioJson.photoClickRatio * 100).toFixed(2) + '%'
                   : 0 + '%',
                 cpm: res.result.ratioJson.cpm ? res.result.ratioJson.cpm.toFixed(2) : 0,
-                cost: res.result.ratioJson.cost.toFixed(2),
+                cost: res.result.ratioJson.cost?res.result.ratioJson.cost.toFixed(2):0,
                 cvr: res.result.ratioJson.cvr ? (res.result.ratioJson.cvr * 100).toFixed(2) + '%' : 0 + '%',
                 costY: (res.result.ratioJson.cost / this.discount).toFixed(2),
                 accountId: '总计',

+ 3 - 3
src/views/modules/Statistics/materialStatistics.vue

@@ -76,7 +76,7 @@
       <a-row>
         <a-col :span="24">
           <a-card :bordered="false" class="search-box">
-            <time-check @getAdd="getAdd" :startValue.sync="startValue" :timeList="timeList"></time-check>
+            <time-check @getAdd="getAdd" :startValue.sync="startValue" :timeList="timeList" :activeNow="2"></time-check>
           </a-card>
         </a-col>
       </a-row>
@@ -333,7 +333,7 @@ export default {
       columns,
       columnsDetail,
       timeList: [
-        { label: '今天', value: 1, show: true },
+        // { label: '今天', value: 1, show: true },
         { label: '昨天', value: 2, show: true },
         { label: '近一周', value: 3, show: true },
         { label: '近十五天', value: 4, show: true },
@@ -458,7 +458,7 @@ export default {
   },
   mounted: function() {
     this.$nextTick(() => {
-      this.getList()
+      //   this.getList()
     })
   }
 }

+ 2 - 2
vue.config.js

@@ -65,9 +65,9 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.53:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://192.168.2.109:8080', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.2.109:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.2.124:8080', //请求本地 需要jeecg-boot后台项目  孙震

+ 0 - 0
yarn


File diff suppressed because it is too large
+ 0 - 11794
yarn.lock