|
@@ -69,7 +69,7 @@
|
|
|
<oa-timeLine-item
|
|
|
v-for="(ac, index) in activities"
|
|
|
:key="index"
|
|
|
- :titleValue="ac.planName"
|
|
|
+ :titleValue="ac.siteName"
|
|
|
:timeValue="ac.createTime"
|
|
|
:iconColor="proxy.$settingStore.themeColor.color"
|
|
|
v-show="tabPosition == 1"
|
|
@@ -207,20 +207,24 @@ function planListApi(value) {
|
|
|
|
|
|
planList({
|
|
|
siteNubmber: value,
|
|
|
- }).then((res) => {
|
|
|
- if (res.status == "SUCCESS") {
|
|
|
- if (res.data.length > 0) {
|
|
|
- scanArray.value = res.data;
|
|
|
- scanBool.value = true;
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status == "SUCCESS") {
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ scanArray.value = res.data;
|
|
|
+ scanBool.value = true;
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "此点位下暂无数据,请切换点位重试!",
|
|
|
+ icon: "none",
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
- uni.showToast({
|
|
|
- title: "此点位下暂无数据,请切换点位重试!",
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
}
|
|
|
- } else {
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ proxy.$modal.msg("网络异常,请稍后重试!");
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -244,45 +248,50 @@ function activitiesApi() {
|
|
|
patrolInspectionPlan({
|
|
|
currentDate: currentDate.value,
|
|
|
sort: activitiesSort.value,
|
|
|
- }).then((res) => {
|
|
|
- if (res.status == "SUCCESS") {
|
|
|
- res.data.forEach((el) => {
|
|
|
- activities.value.push({
|
|
|
- id: el.id,
|
|
|
- planName: el.planName,
|
|
|
- timestamp:
|
|
|
- (el.startTime == null || el.startTime == "" ? "" : el.startTime.split(":")[0] + ":" + el.startTime.split(":")[1] + "~") +
|
|
|
- (el.endTime == null || el.endTime == "" ? "" : el.endTime.split(":")[0] + ":" + el.endTime.split(":")[1]),
|
|
|
-
|
|
|
- planStatus: el.planStatus,
|
|
|
- completion: el.completion,
|
|
|
- patrolledSiteCount: el.patrolledSiteCount,
|
|
|
- undetectedSiteCount: el.undetectedSiteCount,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status == "SUCCESS") {
|
|
|
+ res.data.forEach((el) => {
|
|
|
+ activities.value.push({
|
|
|
+ id: el.id,
|
|
|
+ planName: el.planName,
|
|
|
+ timestamp: (el.startTime ? el.startTime.split(":")[0] + ":" + el.startTime.split(":")[1] + "~" : "") + (el.endTime ? el.endTime.split(":")[0] + ":" + el.endTime.split(":")[1] : ""),
|
|
|
+ planStatus: el.planStatus,
|
|
|
+ completion: el.completion,
|
|
|
+ patrolledSiteCount: el.patrolledSiteCount,
|
|
|
+ undetectedSiteCount: el.undetectedSiteCount,
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- } else {
|
|
|
- }
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ proxy.$modal.msg("网络异常,请稍后重试!");
|
|
|
+ });
|
|
|
} else if (tabPosition.value == 1) {
|
|
|
recordList({
|
|
|
currentDate: currentDate.value,
|
|
|
sort: activitiesSort.value,
|
|
|
- }).then((res) => {
|
|
|
- if (res.status == "SUCCESS") {
|
|
|
- res.data.forEach((el) => {
|
|
|
- activities.value.push({
|
|
|
- siteId: el.siteId,
|
|
|
- planSonId: el.planSonId,
|
|
|
- areaName: el.areaName,
|
|
|
- siteName: el.siteName,
|
|
|
- contentCount: el.contentCount,
|
|
|
- createTime: el.createTime ? el.createTime.replace("T", " ") : el.createTime,
|
|
|
- siteStatus: el.siteStatus,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status == "SUCCESS") {
|
|
|
+ res.data.forEach((el) => {
|
|
|
+ activities.value.push({
|
|
|
+ siteId: el.siteId,
|
|
|
+ planSonId: el.planSonId,
|
|
|
+ areaName: el.areaName,
|
|
|
+ siteName: el.siteName,
|
|
|
+ contentCount: el.contentCount,
|
|
|
+ createTime: el.createTime ? el.createTime.replace("T", " ") : el.createTime,
|
|
|
+ siteStatus: el.siteStatus,
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- } else {
|
|
|
- }
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ proxy.$modal.msg("网络异常,请稍后重试!");
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -296,12 +305,16 @@ const currentDateList = ref({}); //统计list数据存储
|
|
|
function currentApi() {
|
|
|
appPlanStatistics({
|
|
|
currentDate: currentDate.value,
|
|
|
- }).then((res) => {
|
|
|
- if (res.status == "SUCCESS") {
|
|
|
- currentDateList.value = res.data;
|
|
|
- } else {
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status == "SUCCESS") {
|
|
|
+ currentDateList.value = res.data;
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ proxy.$modal.msg("网络异常,请稍后重试!");
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|