|
|
@@ -59,7 +59,7 @@
|
|
|
</van-search>
|
|
|
</div>
|
|
|
<div class="lineGrey"></div>
|
|
|
- <div v-if="refreshTotal" class="refreshBtn" @click="onSearch">检测到 {{ refreshTotal }} 条更新,点击刷新</div>
|
|
|
+ <div v-if="refreshTotal" class="refreshBtn" @click="refresh">检测到 {{ refreshTotal }} 条更新,点击刷新</div>
|
|
|
<div v-if="refreshTotal" class="lineGrey"></div>
|
|
|
</div>
|
|
|
<!-- 主体内容-->
|
|
|
@@ -195,7 +195,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getVisits, getvisitDeptInfo } from '@/api/index';
|
|
|
+import { getVisits, getvisitDeptInfo, getListTotal } from '@/api/index';
|
|
|
import timeico from '@/assets/Icon/datatims.png';
|
|
|
|
|
|
export default {
|
|
|
@@ -264,9 +264,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
|
- // if(this.latestUpdateTime!=null){
|
|
|
- // this.refreshTotal = 18;
|
|
|
- // }
|
|
|
+ if(this.latestUpdateTime!=null){
|
|
|
+ this.getListTotalFn();
|
|
|
+ }
|
|
|
// setTimeout(() => {
|
|
|
// this.onSearch();
|
|
|
// }, 1000);
|
|
|
@@ -308,6 +308,28 @@ export default {
|
|
|
this.onSearch();
|
|
|
},
|
|
|
methods: {
|
|
|
+ refresh(){
|
|
|
+ this.refreshTotal = 0;
|
|
|
+ this.onSearch();
|
|
|
+ },
|
|
|
+ getListTotalFn(){
|
|
|
+ getListTotal({
|
|
|
+ startTime: this.startTime + ' 00:00:00',
|
|
|
+ stopTime: this.endTime + ' 24:00:00',
|
|
|
+ storeRequest: this.storeName.trim(),
|
|
|
+ pageNum: this.pageNum,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ companyId: this.companyCode,
|
|
|
+ regionId: this.regionCode,
|
|
|
+ userId: this.userCode,
|
|
|
+ deptId: this.deptCode,
|
|
|
+ queryStartTime:this.latestUpdateTime
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.refreshTotal = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
onLoad() {
|
|
|
// this.loading = false;
|
|
|
this.getVisitsListFn();
|
|
|
@@ -410,8 +432,8 @@ export default {
|
|
|
}).then((res) => {
|
|
|
loading1.clear();
|
|
|
if (res.code == 200) {
|
|
|
- // this.latestUpdateTime = '2025-09-03 13:47:47';
|
|
|
this.loading = false;
|
|
|
+ this.latestUpdateTime = res.dataTime;
|
|
|
this.list = this.list.concat(res.data);
|
|
|
if (this.list.length >= res.total) {
|
|
|
this.finished = true;
|