|
|
@@ -68,6 +68,7 @@ export default window.$crudCommon({
|
|
|
params: {
|
|
|
yearAndMonth: "",
|
|
|
},
|
|
|
+ isSelAnnual: false,
|
|
|
|
|
|
wideTableColumns: [],
|
|
|
wideTableData: [],
|
|
|
@@ -75,6 +76,12 @@ export default window.$crudCommon({
|
|
|
},
|
|
|
watch: {
|
|
|
'params.yearAndMonth'(newVal) {
|
|
|
+ if (newVal.length > 4) {
|
|
|
+ // 是否勾选未全年
|
|
|
+ this.isSelAnnual = false;
|
|
|
+ } else {
|
|
|
+ this.isSelAnnual = true;
|
|
|
+ }
|
|
|
this.page.currentPage = 1;
|
|
|
this.getList(this.page);
|
|
|
}
|
|
|
@@ -82,7 +89,11 @@ export default window.$crudCommon({
|
|
|
computed: {
|
|
|
...mapGetters(['tag']),
|
|
|
pageTitle() {
|
|
|
- let yearAndMonthCN = this.params.yearAndMonth ? moment(this.params.yearAndMonth).format("yyyy年MM月") : '';
|
|
|
+ let yearAndMonthCN = '';
|
|
|
+ if (this.params.yearAndMonth) {
|
|
|
+ let formatTemp = this.isSelAnnual ? "yyyy年" : "yyyy年MM月";
|
|
|
+ yearAndMonthCN = moment(this.params.yearAndMonth).format(formatTemp);
|
|
|
+ }
|
|
|
return `${yearAndMonthCN}${this.tag.label}`.replace(/每月/g, '');
|
|
|
}
|
|
|
},
|