fix: 智聪健康管理,统计页面,新增tab按钮。
This commit is contained in:
@@ -137,7 +137,11 @@
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<u-list :spaceHeight="116" lowerThreshold="100">
|
||||
<div style="margin:8px">
|
||||
<button :type="firstType" style="margin-right:5px" size=mini @click="btFirstClick">体温统计</button>
|
||||
<button :type="secondType" type="primary" size=mini @click="btSecondClick">体温明细</button>
|
||||
</div>
|
||||
<u-list v-show="!tabShow" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
@@ -165,6 +169,19 @@
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
<u-list v-show="tabShow" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in secondListData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="2"
|
||||
:text="item.time+' 体温 '+item.value+' ℃'" size="30rpx" color="#333333" ></u--text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
|
||||
@@ -202,6 +219,12 @@ const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const temp = ref({})
|
||||
|
||||
const tabShow = ref(false)
|
||||
const firstType = ref("primary")
|
||||
const secondType = ref("default")
|
||||
const secondListData = ref([])
|
||||
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryPersonParams: {
|
||||
@@ -239,6 +262,19 @@ onLoad(() => {
|
||||
}
|
||||
});
|
||||
|
||||
function btFirstClick() {
|
||||
tabShow.value=false
|
||||
firstType.value="primary"
|
||||
secondType.value="default"
|
||||
|
||||
}
|
||||
function btSecondClick() {
|
||||
secondType.value="primary"
|
||||
firstType.value="default"
|
||||
tabShow.value=true
|
||||
|
||||
}
|
||||
|
||||
function formatMultiLineData(data) {
|
||||
if (data != null) {
|
||||
return data.replace(/<br\/>/g, '\n')
|
||||
@@ -278,7 +314,10 @@ function getList() {
|
||||
|
||||
getTemperatureAnalysis({...queryParams.value }).then(res => {
|
||||
temp.value = { ...res.data }
|
||||
listData.value=[]
|
||||
secondListData.value=[]
|
||||
listData.value = listData.value.concat(res.data.tableList)
|
||||
secondListData.value = secondListData.value.concat(res.data.temperatureList.slice().reverse())
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
@@ -297,7 +336,10 @@ function getDict() {
|
||||
}
|
||||
getTemperatureAnalysis({...queryParams.value }).then(res => {
|
||||
temp.value = { ...res.data }
|
||||
listData.value=[]
|
||||
secondListData.value=[]
|
||||
listData.value = listData.value.concat(res.data.tableList)
|
||||
secondListData.value = secondListData.value.concat(res.data.temperatureList.slice().reverse())
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user