diff --git a/src/views/report/repairRateReport/index.vue b/src/views/report/repairRateReport/index.vue index 12fc0ab..1574d90 100644 --- a/src/views/report/repairRateReport/index.vue +++ b/src/views/report/repairRateReport/index.vue @@ -21,14 +21,14 @@ > - + - + + + + + 搜索 重置 @@ -129,6 +136,8 @@ export default { isChart: true, // 遮罩层 loading: false, + //判断年份显示 + yearShowFlag: true, // 选中数组 ids: [], // 非单个禁用 @@ -164,7 +173,8 @@ export default { MATERIAL_CODE: null, MATERIAL_NAME: null, BEGIN_DATE: null, - month:"1" + month: "1", + year: null, }, // 表单参数 form: {}, @@ -183,6 +193,16 @@ export default { findStationList: [] } }, + watch: { + 'queryParams.month': function(newVal, oldVal) { + // 执行方法,可以在这里调用你的方法 + if (newVal > 1){ + this.yearShowFlag = false; + }else { + this.yearShowFlag = true; + } + }, + }, created() { findProductLineList({productLineType: 1}).then(response => { this.productLineList = response.data @@ -200,14 +220,6 @@ export default { this.getChart() }, - watch: { - 'queryParams.PRODUCT_LINE_CODE': function (newVal, oldVal) { - // 执行方法,可以在这里调用你的方法 - findProductLineList({parentId: this.queryParams.PRODUCT_LINE_CODE, stationType: 2}).then(response => { - this.findStationList = response.data - }) - }, - }, methods: { getChart() { diff --git a/src/views/report/weldLeakRate/index.vue b/src/views/report/weldLeakRate/index.vue index c2bb72c..fdb3506 100644 --- a/src/views/report/weldLeakRate/index.vue +++ b/src/views/report/weldLeakRate/index.vue @@ -88,7 +88,7 @@ export default { week111:false, total: 0, form: { - year: new Date().getFullYear().toString(), + year: new Date(), pageNum: 1, pageSize: 10, month:"0", @@ -118,6 +118,10 @@ export default { }, methods: { getList() { + console.log(this.form) + if (this.form.year != null){ + this.form.year = this.form.year.getFullYear().toString(); + } weldLeakRateList({year: this.form.year,month:this.form.month}, ).then(response => { this.total = response?.total || 0