|
@@ -8,7 +8,7 @@
|
|
|
|
|
|
<view class="time-controls" style="margin-top: 10rpx;">
|
|
|
<uni-section title="检查日期:" type="square" class="uni-row sta">
|
|
|
- <input v-model="quer.startTime" type="date" @input="timeSizer" />
|
|
|
+ <input v-model="startTime" type="date" @input="timeSizer" />
|
|
|
</uni-section>
|
|
|
</view>
|
|
|
|
|
@@ -66,7 +66,7 @@
|
|
|
const keyword = ref('')
|
|
|
const inspecionList = ref([]); //时间后筛选数组
|
|
|
const original = ref([]); //原始数组
|
|
|
- const startTime = ref(new Date().toISOString().split('T')[0])
|
|
|
+ const startTime = ref(new Date().toISOString().split("T")[0])
|
|
|
|
|
|
const range = [{
|
|
|
value: 0,
|
|
@@ -87,20 +87,21 @@
|
|
|
|
|
|
/***************************** 页面生命周期函数 *****************************/
|
|
|
onShow(() => {
|
|
|
- // getList()
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中'
|
|
|
- });
|
|
|
- quer.value.userId = store.userInfo.userId;
|
|
|
- getProcessInspecionList(quer.value).then(res => {
|
|
|
- console.log("res", res);
|
|
|
- if (res.code == 200) {
|
|
|
- original.value = res.rows;
|
|
|
- timeSizer();
|
|
|
- uni.hideLoading();
|
|
|
- // uni.hideLoading();
|
|
|
- }
|
|
|
- });
|
|
|
+ getList()
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: '加载中'
|
|
|
+ // });
|
|
|
+ // quer.value.userId = store.userInfo.userId;
|
|
|
+ // quer.value.startTime = startTime.value;
|
|
|
+ // getProcessInspecionList(quer.value).then(res => {
|
|
|
+ // console.log("res", res);
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // original.value = res.rows;
|
|
|
+ // // timeSizer();
|
|
|
+ // uni.hideLoading();
|
|
|
+ // // uni.hideLoading();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
})
|
|
|
|
|
|
/***************************** 定义了一些方法 *****************************/
|
|
@@ -110,34 +111,19 @@
|
|
|
title: '加载中'
|
|
|
});
|
|
|
quer.value.userId = store.userInfo.userId;
|
|
|
- // quer.value.startTime = startTime.value;
|
|
|
+ quer.value.startTime = startTime.value;
|
|
|
getProcessInspecionList(quer.value).then(res => {
|
|
|
console.log("res", res);
|
|
|
if (res.code == 200) {
|
|
|
original.value = res.rows;
|
|
|
- timeSizer();
|
|
|
+ inspecionList.value = res.rows;
|
|
|
uni.hideLoading();
|
|
|
- // uni.hideLoading();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//时间筛选,暂时注释,使用搜索向
|
|
|
- function timeSizer() {
|
|
|
- // quer.value.startTime = startTime.value;
|
|
|
- // 显示加载指示器
|
|
|
- // uni.showLoading();
|
|
|
- // getProcessInspecionList(quer.value).then(res => {
|
|
|
- // console.log("res", res);
|
|
|
- // if (res.code == 200) {
|
|
|
- // original.value = res.rows;
|
|
|
- // timeSizer();
|
|
|
- // uni.hideLoading();
|
|
|
- // // uni.hideLoading();
|
|
|
- // }
|
|
|
- // });
|
|
|
- inspecionList.value = filterSameDayItems(original.value, startTime.value);
|
|
|
- }
|
|
|
+ function timeSizer() {}
|
|
|
|
|
|
// 筛选函数
|
|
|
const filterSameDayItems = (inspectionList, startTime) => {
|