| | |
| | | <el-table-column |
| | | label="建档日期" |
| | | align="center" |
| | | key="createTime" |
| | | prop="createTime" |
| | | key="createTimeStart" |
| | | prop="createTimeStart" |
| | | width="160" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatTime(scope.row.createTime) }}</span> |
| | | <span>{{ formatTime(scope.row.createTimeStart) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | status: undefined, |
| | | tagIds: undefined, |
| | | telcode: undefined, |
| | | createTime: undefined, |
| | | endTime: undefined, |
| | | createTimeStart: undefined, |
| | | createTimeEnd: undefined, |
| | | }, |
| | | // 表单校验 |
| | | rules: {}, |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | // 当前机构为丽水市中医院时,建档日期默认最近一个月 |
| | | if (localStorage.getItem("orgname") == "丽水市中医院") { |
| | | this.dateRange = this.getLastMonthRange(); |
| | | this.queryParams.createTimeStart = this.dateRange[0]; |
| | | this.queryParams.createTimeEnd = this.dateRange[1]; |
| | | } |
| | | this.getList(); |
| | | this.gettabList(); |
| | | this.Filterreason = store.getters.Filterreason; |
| | | }, |
| | | methods: { |
| | | /** 获取最近一个月时间范围 */ |
| | | getLastMonthRange() { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
| | | |
| | | const formatDate = (date) => { |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | return `${year}-${month}-${day} 00:00:00`; |
| | | }; |
| | | |
| | | const formatEndDate = (date) => { |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | return `${year}-${month}-${day} 23:59:59`; |
| | | }; |
| | | |
| | | return [formatDate(start), formatEndDate(end)]; |
| | | }, |
| | | /** 查询患者列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.queryParams.createTime = this.dateRange[0]; |
| | | this.queryParams.endTime = this.dateRange[1]; |
| | | this.queryParams.createTimeStart = this.dateRange[0]; |
| | | this.queryParams.createTimeEnd = this.dateRange[1]; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |