Explorar o código

Merge branch '官网数据统计' into allTestUrgent

xiaohaizhao hai 1 ano
pai
achega
f9212a9fbf
Modificáronse 1 ficheiros con 10 adicións e 18 borrados
  1. 10 18
      src/WebsiteManagement/dataStatistics/modules/header.vue

+ 10 - 18
src/WebsiteManagement/dataStatistics/modules/header.vue

@@ -5,26 +5,20 @@
       <div class="title text-ellipsis">{{ $t(title) }}</div>
       <div class="title text-ellipsis">{{ $t(title) }}</div>
     </el-tooltip>
     </el-tooltip>
 
 
-    <el-radio-group
-      v-model="tabPosition"
-      style="margin-right: 20px"
-      :size="size"
-      @input="changeTab"
-    >
-      <el-radio-button
+    <el-button-group style="margin-right: 20px">
+      <el-button
         v-for="item in shortcutDate"
         v-for="item in shortcutDate"
-        type="primary"
-        :key="item.label"
-        :label="item.value"
-        >{{ $t(item.label) }}</el-radio-button
+        :key="item.value"
+        :type="tabPosition == item.value ? 'primary' : ''"
+        @click="changeTab(item.value)"
+        >{{ $t(item.label) }}</el-button
       >
       >
-    </el-radio-group>
+    </el-button-group>
 
 
     <el-date-picker
     <el-date-picker
       v-model="daterange"
       v-model="daterange"
       :clearable="false"
       :clearable="false"
       type="daterange"
       type="daterange"
-      :size="size"
       value-format="yyyy-MM-dd"
       value-format="yyyy-MM-dd"
       :range-separator="$t('至')"
       :range-separator="$t('至')"
       :start-placeholder="$t('开始日期')"
       :start-placeholder="$t('开始日期')"
@@ -42,9 +36,6 @@ export default {
   props: {
   props: {
     title: String,
     title: String,
     subTitle: String,
     subTitle: String,
-    size: {
-      type: String,
-    },
     shortcutDate: {
     shortcutDate: {
       type: Array,
       type: Array,
       default: () => [
       default: () => [
@@ -76,10 +67,11 @@ export default {
     };
     };
   },
   },
   methods: {
   methods: {
-    changeTab() {
+    changeTab(value) {
       this.daterange = ["", ""];
       this.daterange = ["", ""];
+      this.tabPosition = value;
       this.$emit("returnWhere", {
       this.$emit("returnWhere", {
-        type: this.tabPosition,
+        type: value,
       });
       });
     },
     },
     pickerChange(e) {
     pickerChange(e) {