|
@@ -1,135 +1,97 @@
|
|
|
<template>
|
|
|
<scroll-view scroll-y>
|
|
|
- <view>
|
|
|
- <view>
|
|
|
- <oa-calendar class="uni-calendar--hook" :selected="info.selected" :showMonth="false" @change="change" @monthSwitch="monthSwitch" :currentDate="currentDateList" />
|
|
|
+ <view class="xunjian-plan-container" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
|
|
|
+ <!-- 日历组件 -->
|
|
|
+ <oa-calendar class="uni-calendar--hook" :selected="info.selected" :showMonth="false" @change="change" @monthSwitch="monthSwitch" :currentDate="currentDateList" />
|
|
|
+
|
|
|
+ <!-- 分段器组件 -->
|
|
|
+ <view class="app-subsection">
|
|
|
+ <u-subsection :list="list" :current="tabPosition" inactiveColor="#303133" :activeColor="proxy.$settingStore.themeColor.color" @change="tabPositionChange"></u-subsection>
|
|
|
</view>
|
|
|
- <view>
|
|
|
- <view class="padding-sm" style="display: flex; margin: 10px; padding: 10px 5rem">
|
|
|
- <u-subsection :list="list" :current="tabPosition" inactiveColor="#303133" activeColor="#3c9cff" @change="tabPositionChange"></u-subsection>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view id="planTimeline1" v-if="activities.length > 0">
|
|
|
- <view style="margin: 0px -3.5px; font-size: 13px; color: #409eff" @click="activitiesSortClick()"> 排序 </view>
|
|
|
- <view v-for="(activity, index) in activities" :key="index" v-show="tabPosition == 0">
|
|
|
- <view style="display: flex; height: 25px; line-height: 25px">
|
|
|
- <view style="margin: auto 0">
|
|
|
- <u-icon name="info-circle-fill" color="#409eff" size="18"></u-icon>
|
|
|
- </view>
|
|
|
- <view style="display: flex; width: 100%; margin-left: 15px">
|
|
|
- <view style="font-size: 15px; color: #000000">
|
|
|
- {{ activity.planName }}
|
|
|
- </view>
|
|
|
- <view style="margin: auto"> </view>
|
|
|
- <view style="font-size: 14px; color: #b5b5b5">
|
|
|
- {{ activity.timestamp }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
|
|
|
- <view style="display: flex">
|
|
|
- <view style="width: 18px; display: flex">
|
|
|
- <view v-if="index != activities.length - 1" style="width: 2px; background-color: #e4e7ed; margin: -5px auto"></view>
|
|
|
- </view>
|
|
|
- <view style="width: 100%; margin: 15px 0px 15px 15px; padding: 15px; background-color: #fff; border-radius: 10px">
|
|
|
- <view style="display: flex" v-if="activity.planStatus == 2">
|
|
|
- <view>
|
|
|
- <view>巡检任务结束</view>
|
|
|
- <br />
|
|
|
- <view style="padding: 0; font-size: 14px; color: #409eff" @click="reportClick(activity)"> 点击查看 </view>
|
|
|
- </view>
|
|
|
- <view style="margin: auto"></view>
|
|
|
- <view style="display: flex">
|
|
|
- <gb-progress originalColor="#f5f7fa" processColor="#20a0ff" innerbgColor="#fff" :process="activity.completion" :startPosDegree="60" :radius="50" :barWidth="10">
|
|
|
- {{ activity.completion + "%" }}
|
|
|
- </gb-progress>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view style="display: flex" v-if="activity.planStatus == 1">
|
|
|
- <view>
|
|
|
- <view>巡检任务执行中,还需完成 {{ activity.undetectedSiteCount }}个 </view>
|
|
|
- <br />
|
|
|
- <view @click="reportClick(activity)" style="padding: 0; font-size: 14px; color: #409eff"> 点击巡检 </view>
|
|
|
- </view>
|
|
|
- <view style="margin: auto"></view>
|
|
|
- <view style="display: flex">
|
|
|
- <gb-progress originalColor="#f5f7fa" processColor="#20a0ff" innerbgColor="#fff" :process="activity.completion" :startPosDegree="60" :radius="50" :barWidth="10">
|
|
|
- {{ activity.completion + "%" }}
|
|
|
- </gb-progress>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view style="display: flex" v-if="activity.planStatus == 3">
|
|
|
- <view>
|
|
|
- <view>巡检任务结束</view>
|
|
|
- <br />
|
|
|
- <view>
|
|
|
- <span style="margin-right: 20px">
|
|
|
- 合格:
|
|
|
- <span style="color: #00cdac">
|
|
|
- {{ activity.patrolledSiteCount }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <span>
|
|
|
- 漏检:
|
|
|
- <span style="color: #f07d28">
|
|
|
- {{ activity.undetectedSiteCount }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view style="margin: auto"></view>
|
|
|
- <view style="display: flex">
|
|
|
- <gb-progress originalColor="#f5f7fa" processColor="#20a0ff" innerbgColor="#fff" :process="activity.completion" :startPosDegree="60" :radius="50" :barWidth="10">
|
|
|
- {{ activity.completion + "%" }}
|
|
|
- </gb-progress>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <!-- 内容 -->
|
|
|
+ <oa-timeLine v-if="activities.length > 0" :fontColor="proxy.$settingStore.themeColor.color" :sort="activitiesSort" @activitiesSortChange="activitiesSortChange">
|
|
|
+ <oa-timeLine-item
|
|
|
+ v-for="(ac, index) in activities"
|
|
|
+ :key="index"
|
|
|
+ :titleValue="ac.planName"
|
|
|
+ :timeValue="ac.timestamp"
|
|
|
+ :iconColor="proxy.$settingStore.themeColor.color"
|
|
|
+ v-show="tabPosition == 0"
|
|
|
+ >
|
|
|
+ <view style="display: flex" v-if="ac.planStatus == 2">
|
|
|
+ <view>
|
|
|
+ <view>巡检任务结束</view>
|
|
|
+ <br />
|
|
|
+ <view style="padding: 0; font-size: 14px" :style="{ color: proxy.$settingStore.themeColor.color }" @click="reportClick(ac)"> 点击查看 </view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view v-for="(activity, index) in activities" :key="index" v-show="tabPosition == 1">
|
|
|
- <view style="display: flex; height: 25px; line-height: 25px">
|
|
|
- <view style="margin: auto 0">
|
|
|
- <u-icon name="info-circle-fill" color="#409eff" size="18"></u-icon>
|
|
|
- </view>
|
|
|
- <view style="display: flex; width: 100%; margin-left: 15px">
|
|
|
- <view style="font-size: 15px; color: #000000">
|
|
|
- {{ activity.areaName }}
|
|
|
- </view>
|
|
|
- <view style="margin: auto"> </view>
|
|
|
- <view style="font-size: 14px; color: #b5b5b5">
|
|
|
- {{ activity.createTime }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view style="margin: auto"></view>
|
|
|
+ <view style="display: flex">
|
|
|
+ <c-progress-circle style="margin: auto" :progress="ac.completion / 100" :color="proxy.$settingStore.themeColor.color" size="100rpx" boderWidth="100rpx"></c-progress-circle>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="display: flex" v-if="ac.planStatus == 1">
|
|
|
+ <view>
|
|
|
+ <view>巡检任务执行中,还需完成 {{ ac.undetectedSiteCount }}个 </view>
|
|
|
+ <br />
|
|
|
+ <view style="padding: 0; font-size: 14px" :style="{ color: proxy.$settingStore.themeColor.color }" @click="reportClick(ac)"> 点击巡检 </view>
|
|
|
+ </view>
|
|
|
+ <view style="margin: auto"></view>
|
|
|
+ <view style="display: flex">
|
|
|
+ <c-progress-circle style="margin: auto" :progress="ac.completion / 100" :color="proxy.$settingStore.themeColor.color" size="100rpx" boderWidth="100rpx"></c-progress-circle>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="display: flex" v-if="ac.planStatus == 3">
|
|
|
+ <view>
|
|
|
+ <view>巡检任务结束</view>
|
|
|
+ <br />
|
|
|
+ <view>
|
|
|
+ <span style="margin-right: 20px">
|
|
|
+ 合格:
|
|
|
+ <span style="color: #00cdac">
|
|
|
+ {{ ac.patrolledSiteCount }}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ 漏检:
|
|
|
+ <span style="color: #f07d28">
|
|
|
+ {{ ac.undetectedSiteCount }}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
+ <view style="margin: auto"></view>
|
|
|
+ <view style="display: flex">
|
|
|
+ <c-progress-circle style="margin: auto" :progress="ac.completion / 100" :color="proxy.$settingStore.themeColor.color" size="100rpx" boderWidth="100rpx"></c-progress-circle>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </oa-timeLine-item>
|
|
|
|
|
|
- <view style="display: flex">
|
|
|
- <view style="width: 18px; display: flex">
|
|
|
- <view v-if="index != activities.length - 1" style="width: 2px; background-color: #e4e7ed; margin: -5px auto"></view>
|
|
|
- </view>
|
|
|
- <view style="width: 100%; margin: 15px 0px 15px 15px; padding: 15px; background-color: #fff; border-radius: 10px">
|
|
|
- <view style="display: flex">
|
|
|
- <view>
|
|
|
- <view>已检查{{ activity.contentCount }}项内容</view>
|
|
|
- <br />
|
|
|
- <view style="padding: 0; font-size: 14px; color: #409eff" @click="reportClick(activity)"> 点击查看 </view>
|
|
|
- </view>
|
|
|
- <view style="margin: auto"></view>
|
|
|
- <view style="display: flex; font-size: 15px; color: #30bb00">
|
|
|
- <view style="margin: auto">
|
|
|
- {{ activity.siteStatus == 0 ? "未定位" : "已定位" }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <oa-timeLine-item
|
|
|
+ v-for="(ac, index) in activities"
|
|
|
+ :key="index"
|
|
|
+ :titleValue="ac.areaName"
|
|
|
+ :timeValue="ac.createTime"
|
|
|
+ :iconColor="proxy.$settingStore.themeColor.color"
|
|
|
+ v-show="tabPosition == 1"
|
|
|
+ >
|
|
|
+ <view style="display: flex">
|
|
|
+ <view>
|
|
|
+ <view>已检查{{ ac.contentCount }}项内容</view>
|
|
|
+ <br />
|
|
|
+ <view style="padding: 0; font-size: 14px" :style="{ color: proxy.$settingStore.themeColor.color }" @click="reportClick(ac)"> 点击查看 </view>
|
|
|
+ </view>
|
|
|
+ <view style="margin: auto"></view>
|
|
|
+ <view style="display: flex; font-size: 15px; color: #30bb00">
|
|
|
+ <view style="margin: auto">
|
|
|
+ {{ ac.siteStatus == 0 ? "未定位" : "已定位" }}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </oa-timeLine-item>
|
|
|
+ </oa-timeLine>
|
|
|
|
|
|
- <view id="planTimeline" style="text-align: center; color: #bdbdbd; font-size: 14px" v-else> 暂无数据 </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view id="planTimeline" style="text-align: center; color: #bdbdbd; font-size: 14px" v-else> 暂无数据 </view>
|
|
|
</view>
|
|
|
|
|
|
<view style="position: fixed; right: 0; bottom: 50px">
|
|
@@ -145,14 +107,12 @@ import drawer from "./components/drawer.vue";
|
|
|
|
|
|
import { onLoad, onShow, onLaunch } from "@dcloudio/uni-app";
|
|
|
import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
|
|
|
+import { publicStores, xunJianStores } from "@/store/modules/index";
|
|
|
|
|
|
import { recordList, recordOption, planList, patrolInspectionPlan, appPlanStatistics } from "@/api/business/mhxf/xunJian/plan.js";
|
|
|
|
|
|
-import publicStore from "@/store/modules/public";
|
|
|
-import xunJianStore from "@/store/modules/xunJian";
|
|
|
-
|
|
|
-const publicStores = publicStore(); //全局公共Store
|
|
|
-const xunjianStore = xunJianStore(); //全局变量值Store
|
|
|
+const publicStore = publicStores(); //全局公共Store
|
|
|
+const xunJianStore = xunJianStores(); //全局变量值Store
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
@@ -186,7 +146,7 @@ function monthSwitch(e) {
|
|
|
*/
|
|
|
function reportClick(obj) {
|
|
|
if (tabPosition.value == 0) {
|
|
|
- xunjianStore.planSonId = obj.id;
|
|
|
+ xunJianStore.planSonId = obj.id;
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/business/mhxf/xunJian/plan/components/report",
|
|
|
});
|
|
@@ -204,12 +164,12 @@ function reportClick(obj) {
|
|
|
res.data[0].inspectionStatus = 2;
|
|
|
res.data[0].pictureUrl = obj.pictureUrl;
|
|
|
|
|
|
- xunjianStore.contentArray = {
|
|
|
+ xunJianStore.contentArray = {
|
|
|
contentList: [res1.data.contentList],
|
|
|
siteList: res.data[0],
|
|
|
};
|
|
|
- xunjianStore.siteId = undefined;
|
|
|
- xunjianStore.siteNubmber = undefined;
|
|
|
+ xunJianStore.siteId = undefined;
|
|
|
+ xunJianStore.siteNubmber = undefined;
|
|
|
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/business/mhxf/xunJian/plan/components/siteDetails",
|
|
@@ -235,7 +195,7 @@ function scanClick() {
|
|
|
title: "扫码成功",
|
|
|
icon: "none",
|
|
|
});
|
|
|
- xunjianStore.inspectionStatus = 1;
|
|
|
+ xunJianStore.inspectionStatus = 1;
|
|
|
|
|
|
planList({
|
|
|
siteNubmber: e.result,
|
|
@@ -335,7 +295,7 @@ function activitiesApi() {
|
|
|
* @统计
|
|
|
* @api接口请求
|
|
|
*/
|
|
|
-const currentDate = ref(publicStores.getDate().year + "-" + publicStores.getDate().month + "-" + publicStores.getDate().dates); //统计时间数据存储
|
|
|
+const currentDate = ref(publicStore.getDate().year + "-" + publicStore.getDate().month + "-" + publicStore.getDate().dates); //统计时间数据存储
|
|
|
const currentDatevalue = ref(new Date());
|
|
|
const currentDateList = ref({}); //统计list数据存储
|
|
|
function currentApi() {
|
|
@@ -353,12 +313,8 @@ function currentApi() {
|
|
|
* @排序按钮
|
|
|
*/
|
|
|
const activitiesSort = ref("DESC");
|
|
|
-function activitiesSortClick() {
|
|
|
- if (activitiesSort.value == "ASC") {
|
|
|
- activitiesSort.value = "DESC";
|
|
|
- } else {
|
|
|
- activitiesSort.value = "ASC";
|
|
|
- }
|
|
|
+function activitiesSortChange(val) {
|
|
|
+ activitiesSort.value = val;
|
|
|
activitiesApi();
|
|
|
}
|
|
|
|
|
@@ -366,7 +322,7 @@ function activitiesSortClick() {
|
|
|
* @tabs切换change事件
|
|
|
*/
|
|
|
const list = ref(["巡检任务", "巡检记录"]);
|
|
|
-const tabPosition = ref(xunjianStore.planTabs);
|
|
|
+const tabPosition = ref(xunJianStore.planTabs);
|
|
|
function tabPositionChange(index) {
|
|
|
tabPosition.value = index;
|
|
|
activitiesApi();
|
|
@@ -391,8 +347,16 @@ onShow(() => {
|
|
|
onMounted(() => {});
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
.is-selected {
|
|
|
color: #1989fa;
|
|
|
}
|
|
|
+
|
|
|
+.xunjian-plan-container {
|
|
|
+ .app-subsection {
|
|
|
+ display: flex;
|
|
|
+ margin: 10px;
|
|
|
+ padding: 10px 5rem;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|