diff --git a/src/filter/code-filter.js b/src/filter/code-filter.js index 8297f577..003d2792 100644 --- a/src/filter/code-filter.js +++ b/src/filter/code-filter.js @@ -2,7 +2,7 @@ /* * @Date: 2020-12-29 16:49:28 * @LastEditors: zwq - * @LastEditTime: 2024-09-10 15:15:21 + * @LastEditTime: 2024-09-11 13:40:48 * @FilePath: \basic-admin\src\filters\basicData\index.js * @Description: */ diff --git a/src/views/cost/deep/costDeepEnergy/index.vue b/src/views/cost/deep/costDeepEnergy/index.vue index a9e8842c..3f4c9401 100644 --- a/src/views/cost/deep/costDeepEnergy/index.vue +++ b/src/views/cost/deep/costDeepEnergy/index.vue @@ -265,6 +265,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } this.formConfig2[1].startPlaceholder = '开始时间'; this.formConfig2[1].endPlaceholder = '结束时间'; switch (val.btnName) { diff --git a/src/views/cost/deep/costDeepOthercostHis/index.vue b/src/views/cost/deep/costDeepOthercostHis/index.vue index 02d06cda..dda80bbc 100644 --- a/src/views/cost/deep/costDeepOthercostHis/index.vue +++ b/src/views/cost/deep/costDeepOthercostHis/index.vue @@ -240,6 +240,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } this.formConfig2[1].startPlaceholder = '开始时间'; this.formConfig2[1].endPlaceholder = '结束时间'; switch (val.btnName) { diff --git a/src/views/cost/deep/costDeepRatioHis/index.vue b/src/views/cost/deep/costDeepRatioHis/index.vue index 9b04c7f9..352494b2 100644 --- a/src/views/cost/deep/costDeepRatioHis/index.vue +++ b/src/views/cost/deep/costDeepRatioHis/index.vue @@ -228,6 +228,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } switch (val.btnName) { case 'search': this.listQuery.pageNo = 1; diff --git a/src/views/cost/deep/costStatistics/index.vue b/src/views/cost/deep/costStatistics/index.vue index 08d0f1c4..e80bd3eb 100644 --- a/src/views/cost/deep/costStatistics/index.vue +++ b/src/views/cost/deep/costStatistics/index.vue @@ -291,6 +291,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } this.formConfig2[0].startPlaceholder = '开始时间'; this.formConfig2[0].endPlaceholder = '结束时间'; switch (val.btnName) { diff --git a/src/views/cost/raw/costEnergy/index.vue b/src/views/cost/raw/costEnergy/index.vue index 5edfbd67..a655c5a7 100644 --- a/src/views/cost/raw/costEnergy/index.vue +++ b/src/views/cost/raw/costEnergy/index.vue @@ -265,6 +265,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } this.formConfig2[1].startPlaceholder = '开始时间'; this.formConfig2[1].endPlaceholder = '结束时间'; switch (val.btnName) { diff --git a/src/views/cost/raw/costMaterial/index.vue b/src/views/cost/raw/costMaterial/index.vue index d47474bd..f31308dc 100644 --- a/src/views/cost/raw/costMaterial/index.vue +++ b/src/views/cost/raw/costMaterial/index.vue @@ -262,6 +262,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } this.formConfig2[1].startPlaceholder = '开始时间'; this.formConfig2[1].endPlaceholder = '结束时间'; switch (val.btnName) { diff --git a/src/views/cost/raw/costOriginRatioHis/index.vue b/src/views/cost/raw/costOriginRatioHis/index.vue index 8dff6fee..583e61a6 100644 --- a/src/views/cost/raw/costOriginRatioHis/index.vue +++ b/src/views/cost/raw/costOriginRatioHis/index.vue @@ -170,6 +170,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } switch (val.btnName) { case 'search': this.listQuery.pageNo = 1; diff --git a/src/views/cost/raw/costOthercostHis/index.vue b/src/views/cost/raw/costOthercostHis/index.vue index a8697122..f631334a 100644 --- a/src/views/cost/raw/costOthercostHis/index.vue +++ b/src/views/cost/raw/costOthercostHis/index.vue @@ -240,6 +240,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } switch (val.btnName) { case 'search': this.listQuery.pageNo = 1; diff --git a/src/views/cost/raw/costStatistics/index.vue b/src/views/cost/raw/costStatistics/index.vue index b7f528df..7c9b0444 100644 --- a/src/views/cost/raw/costStatistics/index.vue +++ b/src/views/cost/raw/costStatistics/index.vue @@ -290,6 +290,13 @@ export default { }, methods: { buttonClick(val) { + if (val.statisticType === 2) { + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年第{w}周'); + }else{ + this.tableProps[0].filter = (val) => + parseTime(val, '{y}年{m}月{d}日'); + } this.formConfig2[0].startPlaceholder = '开始时间'; this.formConfig2[0].endPlaceholder = '结束时间'; switch (val.btnName) {