From f64155f6ad27c50451bb7d4a15f553bc72ead7de Mon Sep 17 00:00:00 2001 From: WXL <wl_5969728@163.com> Date: 星期五, 12 九月 2025 14:35:26 +0800 Subject: [PATCH] 年龄计算相关 --- src/views/project/medicalevaluation/index.vue | 49 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 35 insertions(+), 14 deletions(-) diff --git a/src/views/project/medicalevaluation/index.vue b/src/views/project/medicalevaluation/index.vue index 80c906e..257e87d 100644 --- a/src/views/project/medicalevaluation/index.vue +++ b/src/views/project/medicalevaluation/index.vue @@ -85,7 +85,7 @@ </el-col> <el-col :span="12"> - <el-form-item label="鎶ュ憡鏃ユ湡"> + <el-form-item label="璇勪及鏃堕棿"> <el-date-picker style="width: 100%" v-model="selecttime" @@ -120,7 +120,17 @@ <!--<el-table v-loading="loading" border :data="donatebaseinfoList"> --> <el-table v-loading="loading" border :data="VMedicalevaluation"> <el-table-column - label="鎶ュ憡鏃堕棿" + label="妗堜緥鏃堕棿" + align="center" + prop="donatetime" + width="120" + > + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span> + </template> + </el-table-column> + <el-table-column + label="璇勪及鏃堕棿" align="center" prop="reporttime" width="120" @@ -140,7 +150,19 @@ /> </template> </el-table-column> - <el-table-column label="骞撮緞" align="center" prop="age" width="100" /> + <el-table-column label="骞撮緞" align="center" prop="age" width="100"> + <template slot-scope="scope"> + {{ + `${ + scope.row.age && scope.row.age !== 0 ? `${scope.row.age}${scope.row.ageunit?scope.row.ageunit:''}` : "" + } ${ + scope.row.age2 && scope.row.age2 !== 0 + ? `${scope.row.age2}${scope.row.ageunit2}` + : "" + }`.trim() + }} + </template> + </el-table-column> <el-table-column label="鍖荤枟鏈烘瀯" @@ -885,22 +907,17 @@ getList(e) { this.loading = true; this.queryParams.params = {}; - // if (null != this.daterangeReporttime && "" != this.daterangeReporttime) { - // this.queryParams.params["beginReporttime"] = - // this.daterangeReporttime[0]; - // this.queryParams.params["endReporttime"] = this.daterangeReporttime[1]; - // } + sessionStorage.removeItem("medicalevaluation"); + sessionStorage.setItem( + "medicalevaluation", + JSON.stringify(this.queryParams) + ); + // 璺宠浆鏃剁殑榛樿杩涘害 if (e != null && e != undefined && !isNaN(e)) { this.queryParams.recordstate = e; } - // if (this.selecttime[0] != null && this.selecttime[1] != null) { - // this.queryParams.params["starttime"] = this.selecttime[0]; - // this.queryParams.params["endReporttime"] = this.selecttime[1]; - // } - // this.queryParams.city='001' - //console.log(JSON.stringify(this.queryParams)); if (this.starttime != "") { this.queryParams.starttime = this.starttime; } @@ -1344,6 +1361,10 @@ //鑾峰彇鐢ㄦ埛鍒楄〃 this.getuserlist(); //鑾峰彇鍒楄〃 + if (sessionStorage.getItem("medicalevaluation")) { + this.queryParams = JSON.parse(sessionStorage.getItem("medicalevaluation")); + console.log(this.queryParams, "queryParams"); + } this.getList(); } // //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛� -- Gitblit v1.9.3