|
|
@@ -5,26 +5,20 @@
|
|
|
<div class="title text-ellipsis">{{ $t(title) }}</div>
|
|
|
</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"
|
|
|
- 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
|
|
|
v-model="daterange"
|
|
|
:clearable="false"
|
|
|
type="daterange"
|
|
|
- :size="size"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
:range-separator="$t('至')"
|
|
|
:start-placeholder="$t('开始日期')"
|
|
|
@@ -42,9 +36,6 @@ export default {
|
|
|
props: {
|
|
|
title: String,
|
|
|
subTitle: String,
|
|
|
- size: {
|
|
|
- type: String,
|
|
|
- },
|
|
|
shortcutDate: {
|
|
|
type: Array,
|
|
|
default: () => [
|
|
|
@@ -76,10 +67,11 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- changeTab() {
|
|
|
+ changeTab(value) {
|
|
|
this.daterange = ["", ""];
|
|
|
+ this.tabPosition = value;
|
|
|
this.$emit("returnWhere", {
|
|
|
- type: this.tabPosition,
|
|
|
+ type: value,
|
|
|
});
|
|
|
},
|
|
|
pickerChange(e) {
|