无感刷新

This commit is contained in:
X_Rian 2024-06-05 22:46:23 +08:00
parent 29cbdcfc6b
commit f5e57324d3
4 changed files with 24 additions and 18 deletions

View File

@ -4,8 +4,8 @@ NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用)
# 后端本地
# VITE_API_URL = 'http://192.168.34.221:19111'
VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地
# VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程
# VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地
VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程
# VITE_API_URL = 'http://192.168.34.221:28889'
# VITE_API_URL = 'http://121.196.214.246/api'
# VITE_API_URL = 'http://jxj.zhgdyun.com:100'

View File

@ -20,6 +20,6 @@ export const getSafeHatSessionApi = (params: {}) => {
};
// 现场视频
export const selectLiveVideoListApi = (params: {}) => {
return http.get(BASEURL + `/xmgl/project/getProjectExtendInfo`, params, { headers: { noLoading: true }});
export const selectLiveVideoListApi = (params: {}, showLoading: boolean) => {
return http.get(BASEURL + `/xmgl/project/getProjectExtendInfo`, params, { headers: { noLoading: showLoading } });
};

View File

@ -150,10 +150,13 @@ let topText = ref([
{ id: 2, title: "宣传视频", isActive: false },
{ id: 3, title: "效果图", isActive: false }
]);
const getVideoList = async () => {
let res: any = await selectLiveVideoListApi({
projectSn: store.sn
});
const getVideoList = async (showLoading: boolean) => {
let res: any = await selectLiveVideoListApi(
{
projectSn: store.sn
},
showLoading
);
console.log(res, "445566");
if (res.result && res.result.extend1) {
videoList.value = JSON.parse(res.result.extend1).result.videoList;
@ -270,7 +273,7 @@ defineExpose({
getQueryBySnData
});
const setIntervalFn = (showLoading: boolean) => {
getVideoList();
getVideoList(showLoading);
getQueryBySnData(showLoading);
getStatsDirectorateBigScreen(showLoading);
getStatScore(showLoading);

View File

@ -1020,12 +1020,15 @@ const getSafeInfo = async (showLoading: boolean) => {
// majorDangerRate.value = result.result.percent;
console.log("1111111111111", dataList.value);
const res: any = await getCountDangerLevelApi({
projectSn: store.sn,
isOverdueRectification: 1,
inspectStartTime: dateRange.value[0],
inspectEndTime: dateRange.value[1]
});
const res: any = await getCountDangerLevelApi(
{
projectSn: store.sn,
isOverdueRectification: 1,
inspectStartTime: dateRange.value[0],
inspectEndTime: dateRange.value[1]
},
showLoading
);
// dataList.value = res.result.data.map((item: any, index: number) => {
// return {
// ...item,
@ -1386,12 +1389,12 @@ const getNoticeList = async (showLoading: boolean) => {
watch(
dateRange,
async () => {
() => {
if (dateRange.value == null) {
dateRange.value = [];
}
await getSafeInfo(true);
await qualityInfo(true);
getSafeInfo(true);
qualityInfo(true);
// await getSelectQualityStatisticsNum();
},
{ deep: true }