体征检测优化
This commit is contained in:
parent
d2627a74aa
commit
4edee0728c
@ -10,4 +10,15 @@ export function record(data) {
|
|||||||
// region: uni.getStorageSync('region'),
|
// region: uni.getStorageSync('region'),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// 分页查询体征检测记录列表
|
||||||
|
export function getList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/fd/ps/getList`,
|
||||||
|
method: 'get',
|
||||||
|
data,
|
||||||
|
header: {
|
||||||
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@ -574,7 +574,7 @@
|
|||||||
"path": "healthdata/healthdata",
|
"path": "healthdata/healthdata",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "体征检测",
|
"navigationBarTitleText": "体征检测",
|
||||||
"onReachBottomDistance": 20, //距离底部多远时触发 单位为px
|
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||||
"enablePullDownRefresh": true //设置参数为true
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -83,20 +83,20 @@
|
|||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th align="center" width='150'>记录时间</uni-th>
|
<uni-th align="center" width='150'>记录时间</uni-th>
|
||||||
<uni-th align="center" width='70'>身高</uni-th>
|
<uni-th align="center" width='70'>身高</uni-th>
|
||||||
<uni-th align="center" width='70'>体重</uni-th>
|
<uni-th align="center" width='70'>体重</uni-th>
|
||||||
<uni-th align="center" width='70'>BMI</uni-th>
|
<uni-th align="center" width='70'>BMI</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<uni-tr v-for="item in echartData.list">
|
<uni-tr v-for="item in tablelist">
|
||||||
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
||||||
<uni-td width='70' align="center">{{item.height}}</uni-td>
|
<uni-td width='70' align="center">{{item.height}}</uni-td>
|
||||||
<uni-td width='70' align="center">{{item.weight}}</uni-td>
|
<uni-td width='70' align="center">{{item.weight}}</uni-td>
|
||||||
<uni-td width='70' align="center">{{item.bmi}}</uni-td>
|
<uni-td width='70' align="center">{{item.bmi}}</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table> -->
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -110,6 +110,10 @@
|
|||||||
echartData: {
|
echartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
tablelist: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="line" loadingType="0" :opts="line_opts" :ontouch="true" :chartData="datalist" />
|
<qiun-data-charts type="line" loadingType="0" :opts="line_opts" :ontouch="true" :chartData="datalist" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th align="center" width='70'>记录时间</uni-th>
|
<uni-th align="center" width='70'>记录时间</uni-th>
|
||||||
<uni-th align="center" width='70'>血清总胆固醇</uni-th>
|
<uni-th align="center" width='70'>血清总胆固醇</uni-th>
|
||||||
@ -64,14 +64,14 @@
|
|||||||
<uni-th align="center" width='70'>高密度脂蛋白胆固醇</uni-th>
|
<uni-th align="center" width='70'>高密度脂蛋白胆固醇</uni-th>
|
||||||
<uni-th align="center" width='70'>低密度脂蛋白胆固醇</uni-th>
|
<uni-th align="center" width='70'>低密度脂蛋白胆固醇</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<uni-tr v-for="item in echartData.list">
|
<uni-tr v-for="item in tablelist">
|
||||||
<uni-td width='70' align="center">{{item.measureTime}}</uni-td>
|
<uni-td width='70' align="center">{{item.measureTime}}</uni-td>
|
||||||
<uni-td width='70' align="center">{{item.tc}}</uni-td>
|
<uni-td width='70' align="center">{{item.tc}}</uni-td>
|
||||||
<uni-td width='70' align="center">{{item.tg}}</uni-td>
|
<uni-td width='70' align="center">{{item.tg}}</uni-td>
|
||||||
<uni-td width='70' align="center">{{item.hdl}}</uni-td>
|
<uni-td width='70' align="center">{{item.hdl}}</uni-td>
|
||||||
<uni-td width='70' align="center">{{item.ldl}}</uni-td>
|
<uni-td width='70' align="center">{{item.ldl}}</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table> -->
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -85,6 +85,10 @@
|
|||||||
echartData: {
|
echartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
tablelist: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@ -59,18 +59,18 @@
|
|||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th align="center" width='150'>记录时间</uni-th>
|
<uni-th align="center" width='150'>记录时间</uni-th>
|
||||||
<uni-th align="center" width='100'>脉搏</uni-th>
|
<uni-th align="center" width='100'>脉搏</uni-th>
|
||||||
<uni-th align="center" width='100'>血氧</uni-th>
|
<uni-th align="center" width='100'>血氧</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<uni-tr v-for="item in echartData.list">
|
<uni-tr v-for="item in tablelist">
|
||||||
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
||||||
<uni-td width='100' align="center">{{item.pulse}}</uni-td>
|
<uni-td width='100' align="center">{{item.pulse}}</uni-td>
|
||||||
<uni-td width='100' align="center">{{item.spo2}}</uni-td>
|
<uni-td width='100' align="center">{{item.spo2}}</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table> -->
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -84,6 +84,10 @@
|
|||||||
echartData: {
|
echartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
tablelist: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@ -73,18 +73,18 @@
|
|||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th align="center" width='150'>记录时间</uni-th>
|
<uni-th align="center" width='150'>记录时间</uni-th>
|
||||||
<uni-th align="center" width='70'>收缩压</uni-th>
|
<uni-th align="center" width='70'>收缩压</uni-th>
|
||||||
<uni-th align="center" width='70'>舒张压</uni-th>
|
<uni-th align="center" width='70'>舒张压</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<uni-tr v-for="item in echartData.list">
|
<uni-tr v-for="item in tablelist">
|
||||||
<uni-td align="center" width='150'>{{item.measureTime}}</uni-td>
|
<uni-td align="center" width='150'>{{item.measureTime}}</uni-td>
|
||||||
<uni-td align="center" width='70'>{{item.sbp}}</uni-td>
|
<uni-td align="center" width='70'>{{item.sbp}}</uni-td>
|
||||||
<uni-td align="center" width='70'>{{item.dbp}}</uni-td>
|
<uni-td align="center" width='70'>{{item.dbp}}</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table> -->
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -98,6 +98,10 @@
|
|||||||
echartData: {
|
echartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
tablelist: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@ -59,18 +59,18 @@
|
|||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th align="center" width='140'>记录时间</uni-th>
|
<uni-th align="center" width='140'>记录时间</uni-th>
|
||||||
<uni-th align="center" width='90'>测量场景</uni-th>
|
<uni-th align="center" width='90'>测量场景</uni-th>
|
||||||
<uni-th align="center" width='90'>血糖值</uni-th>
|
<uni-th align="center" width='90'>血糖值</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<uni-tr v-for="item in echartData.list">
|
<uni-tr v-for="item in tablelist">
|
||||||
<uni-td width='140' align="center">{{item.measureTime}}</uni-td>
|
<uni-td width='140' align="center">{{item.measureTime}}</uni-td>
|
||||||
<uni-td width='90' align="center">{{item.timename}}</uni-td>
|
<uni-td width='90' align="center">{{item.timename}}</uni-td>
|
||||||
<uni-td width='90' align="center">{{item.bg}}</uni-td>
|
<uni-td width='90' align="center">{{item.bg}}</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table> -->
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -84,6 +84,10 @@
|
|||||||
echartData: {
|
echartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
tablelist: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@ -59,16 +59,16 @@
|
|||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th align="center" width='150'>记录时间</uni-th>
|
<uni-th align="center" width='150'>记录时间</uni-th>
|
||||||
<uni-th align="center" width='150'>心率</uni-th>
|
<uni-th align="center" width='150'>心率</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<uni-tr v-for="item in echartData.list">
|
<uni-tr v-for="item in tablelist">
|
||||||
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
||||||
<uni-td width='150' align="center">{{item.hr}}</uni-td>
|
<uni-td width='150' align="center">{{item.hr}}</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table> -->
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -82,6 +82,10 @@
|
|||||||
echartData: {
|
echartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
tablelist: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@ -59,16 +59,16 @@
|
|||||||
<view class="charts-box">
|
<view class="charts-box">
|
||||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<uni-th align="center" width='150'>记录时间</uni-th>
|
<uni-th align="center" width='150'>记录时间</uni-th>
|
||||||
<uni-th align="center" width='150'>体温</uni-th>
|
<uni-th align="center" width='150'>体温</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<uni-tr v-for="item in echartData.list">
|
<uni-tr v-for="item in tablelist">
|
||||||
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
|
||||||
<uni-td width='150' align="center">{{item.temp}}</uni-td>
|
<uni-td width='150' align="center">{{item.temp}}</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table> -->
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -82,6 +82,10 @@
|
|||||||
echartData: {
|
echartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
tablelist: {
|
||||||
|
type: Object,
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@ -4,31 +4,31 @@
|
|||||||
:show-bar='false'></u-tabs>
|
:show-bar='false'></u-tabs>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view v-if="tabindex == 0">
|
<view v-if="tabindex == 0">
|
||||||
<blood-sugar :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
<blood-sugar :current="tabindex" :echartData="list" @taptimeindex='taptimeindex' :tablelist='tablelist'
|
||||||
v-on:websocket-message="handleWebSocketMessage"></blood-sugar>
|
v-on:websocket-message="handleWebSocketMessage"></blood-sugar>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tabindex == 1">
|
<view v-if="tabindex == 1">
|
||||||
<blood-pressure :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
<blood-pressure :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
||||||
v-on:websocket-message="handleWebSocketMessage"></blood-pressure>
|
:tablelist='tablelist' v-on:websocket-message="handleWebSocketMessage"></blood-pressure>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tabindex == 2">
|
<view v-if="tabindex == 2">
|
||||||
<BloodFat :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
<BloodFat :current="tabindex" :echartData="list" @taptimeindex='taptimeindex' :tablelist='tablelist'
|
||||||
v-on:websocket-message="handleWebSocketMessage"></BloodFat>
|
v-on:websocket-message="handleWebSocketMessage"></BloodFat>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tabindex == 3">
|
<view v-if="tabindex == 3">
|
||||||
<BMI :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
<BMI :current="tabindex" :echartData="list" @taptimeindex='taptimeindex' :tablelist='tablelist'
|
||||||
v-on:websocket-message="handleWebSocketMessage"></BMI>
|
v-on:websocket-message="handleWebSocketMessage"></BMI>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tabindex == 4">
|
<view v-if="tabindex == 4">
|
||||||
<Blood-oxygen :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
<Blood-oxygen :current="tabindex" :echartData="list" @taptimeindex='taptimeindex' :tablelist='tablelist'
|
||||||
v-on:websocket-message="handleWebSocketMessage"></Blood-oxygen>
|
v-on:websocket-message="handleWebSocketMessage"></Blood-oxygen>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tabindex == 5">
|
<view v-if="tabindex == 5">
|
||||||
<Heart-rate :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
<Heart-rate :current="tabindex" :echartData="list" @taptimeindex='taptimeindex' :tablelist='tablelist'
|
||||||
v-on:websocket-message="handleWebSocketMessage"></Heart-rate>
|
v-on:websocket-message="handleWebSocketMessage"></Heart-rate>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tabindex == 6">
|
<view v-if="tabindex == 6">
|
||||||
<Temperature :current="tabindex" :echartData="list" @taptimeindex='taptimeindex'
|
<Temperature :current="tabindex" :echartData="list" @taptimeindex='taptimeindex' :tablelist='tablelist'
|
||||||
v-on:websocket-message="handleWebSocketMessage"></Temperature>
|
v-on:websocket-message="handleWebSocketMessage"></Temperature>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -37,7 +37,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
record
|
record,
|
||||||
|
getList
|
||||||
} from '@/api/pagesC/healthdata/index.js'
|
} from '@/api/pagesC/healthdata/index.js'
|
||||||
import BloodPressure from '../BloodPressure/BloodPressure.vue'
|
import BloodPressure from '../BloodPressure/BloodPressure.vue'
|
||||||
import BloodSugar from '../BloodSugar/BloodSugar.vue'
|
import BloodSugar from '../BloodSugar/BloodSugar.vue'
|
||||||
@ -76,6 +77,9 @@
|
|||||||
}, ],
|
}, ],
|
||||||
list: null,
|
list: null,
|
||||||
type: 0,
|
type: 0,
|
||||||
|
tabletotal: 0,
|
||||||
|
tablelist: [],
|
||||||
|
pageNum: 1,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -83,11 +87,13 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.info();
|
this.info();
|
||||||
|
this.getinfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
taptimeindex(e) {
|
taptimeindex(e) {
|
||||||
this.type = e
|
this.type = e
|
||||||
this.info()
|
this.info()
|
||||||
|
this.getinfo();
|
||||||
},
|
},
|
||||||
info() {
|
info() {
|
||||||
let userinfo = uni.getStorageSync('userinfo');
|
let userinfo = uni.getStorageSync('userinfo');
|
||||||
@ -110,17 +116,71 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getinfo() {
|
||||||
|
this.tablelist = []
|
||||||
|
this.tabletotal = 0
|
||||||
|
this.pageNum = 1
|
||||||
|
let userinfo = uni.getStorageSync('userinfo');
|
||||||
|
var obj = {
|
||||||
|
label: Number(this.tabindex) + 1,
|
||||||
|
identity: userinfo.cardNo,
|
||||||
|
type: this.type,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
pageSize: 15,
|
||||||
|
}
|
||||||
|
getList(obj).then(res => {
|
||||||
|
this.tablelist = res.data.list.list
|
||||||
|
this.tabletotal = res.data.list.total
|
||||||
|
this.tablelist.forEach(e => {
|
||||||
|
e.bucket == '1' ? e.timename = '凌晨' : ''
|
||||||
|
e.bucket == '2' ? e.timename = '早餐前' : ''
|
||||||
|
e.bucket == '3' ? e.timename = '早晨后' : ''
|
||||||
|
e.bucket == '4' ? e.timename = '午餐前' : ''
|
||||||
|
e.bucket == '5' ? e.timename = '午餐后' : ''
|
||||||
|
e.bucket == '6' ? e.timename = '晚餐前' : ''
|
||||||
|
e.bucket == '7' ? e.timename = '晚餐后' : ''
|
||||||
|
e.bucket == '8' ? e.timename = '睡前' : ''
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
tabchange(e) {
|
tabchange(e) {
|
||||||
this.list = null
|
this.list = null
|
||||||
this.tabindex = e
|
this.tabindex = e
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.info();
|
this.info();
|
||||||
|
this.getinfo();
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onReachBottom() { //下滑加载
|
onReachBottom() { //下滑加载
|
||||||
|
if (this.tablelist.length >= this.tabletotal) {} else {
|
||||||
|
this.pageNum++;
|
||||||
|
let userinfo = uni.getStorageSync('userinfo');
|
||||||
|
var obj = {
|
||||||
|
label: Number(this.tabindex) + 1,
|
||||||
|
identity: userinfo.cardNo,
|
||||||
|
type: this.type,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
pageSize: 15,
|
||||||
|
}
|
||||||
|
getList(obj).then(res => {
|
||||||
|
res.data.list.list.forEach(e => {
|
||||||
|
e.bucket == '1' ? e.timename = '凌晨' : ''
|
||||||
|
e.bucket == '2' ? e.timename = '早餐前' : ''
|
||||||
|
e.bucket == '3' ? e.timename = '早晨后' : ''
|
||||||
|
e.bucket == '4' ? e.timename = '午餐前' : ''
|
||||||
|
e.bucket == '5' ? e.timename = '午餐后' : ''
|
||||||
|
e.bucket == '6' ? e.timename = '晚餐前' : ''
|
||||||
|
e.bucket == '7' ? e.timename = '晚餐后' : ''
|
||||||
|
e.bucket == '8' ? e.timename = '睡前' : ''
|
||||||
|
this.tablelist.push(e)
|
||||||
|
})
|
||||||
|
this.tabletotal = res.data.list.total
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() { //下拉刷新
|
onPullDownRefresh() { //下拉刷新
|
||||||
|
this.getinfo();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user