|
@@ -5,10 +5,10 @@
|
|
|
|
|
|
<div class="mui-content">
|
|
|
<div class="fyy-temper-date">
|
|
|
- <a href="" class="mui-col-xs-5">2020-03-19</a>
|
|
|
+ <a class="mui-col-xs-5" v-text="listForm.startTime" @click="selectStartTime"></a>
|
|
|
<span class="mui-col-xs-2">至</span>
|
|
|
- <a href="" class="mui-col-xs-5">2020-03-19</a>
|
|
|
- </div>
|
|
|
+ <a class="mui-col-xs-5" v-text="listForm.endTime" @click="selectEndTime"></a>
|
|
|
+ </div>
|
|
|
<div class="mui-content-padded">
|
|
|
<ul class="mui-table-view openfyy-list">
|
|
|
<li v-for="(item,index) in recordList" @click="goToPage(item.id)" class="mui-table-view-cell mui-media flew-sp">
|
|
@@ -32,6 +32,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ require('$project/assets/js/mui.picker.min.js');
|
|
|
import * as API_Health from '@/apis/Common/health'
|
|
|
import Common from '$project/components/Common.vue'
|
|
|
import Loading from '$project/components/Loading.vue'
|
|
@@ -41,6 +42,11 @@
|
|
|
mapGetters,
|
|
|
mapMutations
|
|
|
} from 'vuex'
|
|
|
+ import {
|
|
|
+ currentTimeStamp,
|
|
|
+ parseUnixTime,
|
|
|
+ unixTimeStamp
|
|
|
+ } from '$project/utils'
|
|
|
export default {
|
|
|
name: 'CommonHealthTemperatureRecord',
|
|
|
components: {
|
|
@@ -58,7 +64,7 @@
|
|
|
show: true,
|
|
|
icon: 'icon-baojing',
|
|
|
style: 'font-size:14px',
|
|
|
- title: '异常记录'
|
|
|
+ title: '异常记录',
|
|
|
},
|
|
|
|
|
|
recordList: [],
|
|
@@ -68,7 +74,10 @@
|
|
|
pageSize: 20,
|
|
|
token: '',
|
|
|
fever: '',
|
|
|
- totalPage: 1
|
|
|
+ totalPage: 1,
|
|
|
+ startTime: '',
|
|
|
+ endTime: '',
|
|
|
+ personId: this.$route.query.personId
|
|
|
},
|
|
|
}
|
|
|
},
|
|
@@ -76,6 +85,7 @@
|
|
|
if (this.$route.query.fever) {
|
|
|
this.listForm.fever = this.$route.query.fever;
|
|
|
}
|
|
|
+ this.listForm.startTime = this.listForm.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
|
|
|
},
|
|
|
methods: {
|
|
|
goToPage(id) {
|
|
@@ -126,6 +136,41 @@
|
|
|
this.listForm.fever = this.listForm.fever == 1 ? '' : 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ selectStartTime() {
|
|
|
+ var _this = this;
|
|
|
+ var picker = new mui.DtPicker({
|
|
|
+ "type": "date",
|
|
|
+ "beginYear": 2020,
|
|
|
+ "endYear": 2040,
|
|
|
+ "endDate": _this.listForm.endTime,
|
|
|
+ "value": _this.listForm.startTime
|
|
|
+ });
|
|
|
+ picker.show(function(rs) {
|
|
|
+ _this.listForm.startTime = rs.text;
|
|
|
+ if (unixTimeStamp(_this.listForm.startTime) > unixTimeStamp(_this.listForm.endTime)) {
|
|
|
+ _this.listForm.endTime = _this.listForm.startTime;
|
|
|
+ }
|
|
|
+ _this.listForm.pageIndex = 1;
|
|
|
+ _this.getList();
|
|
|
+ picker.dispose();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ selectEndTime() {
|
|
|
+ var _this = this;
|
|
|
+ var picker = new mui.DtPicker({
|
|
|
+ "type": "date",
|
|
|
+ "beginYear": 2020,
|
|
|
+ "endYear": 2040,
|
|
|
+ "beginDate": new Date(_this.listForm.startTime),
|
|
|
+ "value": _this.listForm.endTime
|
|
|
+ });
|
|
|
+ picker.show(function(rs) {
|
|
|
+ _this.listForm.endTime = rs.text;
|
|
|
+ _this.listForm.pageIndex = 1;
|
|
|
+ _this.getList();
|
|
|
+ picker.dispose();
|
|
|
+ });
|
|
|
+ },
|
|
|
asynCallBack() {},
|
|
|
},
|
|
|
mounted() {
|
|
@@ -162,5 +207,6 @@
|
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|
|
|
<style scoped src="$project/assets/css/sczpfyy.css"></style>
|
|
|
<style src="$project/assets/css/iconfont.css"></style>
|
|
|
+<style src="$project/assets/css/mui.picker.min.css"></style>
|
|
|
<style scoped>
|
|
|
</style>
|