diff --git a/src/api/polling.js b/src/api/polling.js
new file mode 100644
index 0000000..623c703
--- /dev/null
+++ b/src/api/polling.js
@@ -0,0 +1,17 @@
+import request from "@/utils/request"
+
+// 查询今日任务列表
+export function taskTodayList(data) {
+ return request.post({
+ url: '/acc/message/notify/detail',
+ data
+ })
+}
+
+// 查询任务详情
+export function taskDetail(data) {
+ return request.post({
+ url: '/acc/message/notify/detail',
+ data
+ })
+}
\ No newline at end of file
diff --git a/src/components/multipleSelect.vue b/src/components/multipleSelect.vue
index 4d7c110..066208e 100644
--- a/src/components/multipleSelect.vue
+++ b/src/components/multipleSelect.vue
@@ -150,7 +150,7 @@ const handleRemove = (index) => {
};
// 点击组件某一项
const handleChange = (index, item) => {
- console.log("选中了某一项", index, item);
+ // console.log("选中了某一项", index, item);
// 如果是单选框,选中一项后直接关闭
if (!props.multiple) {
console.log("关闭下拉框");
diff --git a/src/pages/business/polling/index.vue b/src/pages/business/polling/index.vue
index 96461e7..d5b8356 100644
--- a/src/pages/business/polling/index.vue
+++ b/src/pages/business/polling/index.vue
@@ -16,9 +16,11 @@
{{dateStr}}
-
-
+
+
日常巡检
@@ -135,8 +137,8 @@
- 跟踪次数{{ item.count }}
- 最近跟踪时间{{ item.planTime }}
+ 跟踪次数{{ item.count }}
+ 最近跟踪时间{{ parseTime(item.modifyTime,'{m}-{d} {h}:{i}') }}
@@ -157,24 +159,22 @@ import customHeader from '@/components/customHeader.vue';
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { parseTime } from '@/utils/datetime.js';
import { formatTaskStatus } from '@/utils/status.js';
-import { noticeList } from '@/api/notice.js'
+import { taskTodayList } from '@/api/polling.js'
// '2025-12-29 星期五'
let dateStr = ref('');
-
onLoad(option => {
let date = new Date();
dateStr.value = parseTime(date,'{y}-{m}-{d} 星期{a}');
})
-
// 查询列表
let list1 = ref([]);
let list2 = ref([]);
let list3 = ref([]);
const mescrollRef = ref(null);
const upOption = ref({
- // use: false,
+ use: false,
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: {
@@ -186,7 +186,7 @@ const upOption = ref({
});
const downOption = ref({
- auto: false,
+ auto: true,
textInOffset: '下拉刷新',
textOutOffset: '释放更新',
textLoading: '刷新中...'
@@ -207,13 +207,11 @@ const downCallback = async (mescroll) => {
list1.value = res.list1;
list2.value = res.list2;
list3.value = res.list3;
- mescroll.resetUpScroll();
+ // mescroll.resetUpScroll();
} catch (error) {
mescroll.endErr();
} finally {
- setTimeout(async ()=>{
- mescroll.endSuccess();
- },500);
+ mescroll.endSuccess();
}
}
// 上拉加载更多
@@ -236,6 +234,7 @@ const upCallback = async (mescroll) => {
// 获取数据列表
const getList = (pageIndex, pageSize) => {
+
return new Promise(async (resolve) => {
let param = {
pageIndex,
@@ -356,7 +355,7 @@ const getList = (pageIndex, pageSize) => {
// total: res.recordCount || 0
});
});
-
+
}
// 查看详情 type 1-任务详情 2-问题详情
diff --git a/src/pages/business/polling/optionDetail.vue b/src/pages/business/polling/optionDetail.vue
index cb68ffa..0cb437d 100644
--- a/src/pages/business/polling/optionDetail.vue
+++ b/src/pages/business/polling/optionDetail.vue
@@ -23,33 +23,51 @@
巡检日期:{{parseTime(optionObj.planTime,'{y}-{m}-{d} 星期{a}')}}
-
-
-
-
- {{String(index+1).padStart(2, '0')+'.'}}
- {{ item.pointName }}
-
-
-
- 是
- 否
-
-
+
+
+
+ {{String(index+1).padStart(2, '0')+'.'}}
+ {{ item.pointName }}
-
+ changeCheck(...args, item)"
+ :slabel="'optionContent'" :svalue="'optionId'"
+ >
+
+
{{String(index+1).padStart(2, '0')+'.'}}
{{ item.pointName }}
- changeCheck(...args, item)"
+ :slabel="'optionContent'" :svalue="'optionId'"
>
+
+
+
+
+ {{String(index+1).padStart(2, '0')+'.'}}
+ {{ item.pointName }}
+
+
+
+
+
+ {{item2.optionContent}}
+
+
+
+
+
@@ -164,7 +182,7 @@ import multipleSelect from "@/components/multipleSelect.vue";
import pollingShowModal from "@/components/pollingShowModal.vue";
import { parseTime } from '@/utils/datetime.js';
import { formatTaskStatus } from '@/utils/status.js';
-import { noticeList } from '@/api/notice.js'
+import { taskDetail } from '@/api/polling.js'
import {uploadFileMinio} from '@/utils/minio.js'
let workId = ref(undefined);
@@ -197,18 +215,132 @@ const getList = () => {
optionName:'配电箱箱体和内部线路检查',
planTime:new Date().getTime(),
list:[
- { pointName:'技术中心机房总电源', optionId:202512297899, pointType:1, },
- { pointName:'监控室消防设备阀门正常开启闭合', optionId:202512297899, pointType:2, },
- { pointName:'监控室10组灭火器压力指针处于绿色区域', optionId:202512297899, pointType:3,},
- { pointName:'库房灭火器压力指针处于绿色区', optionId:202512297899,pointType:4,},
- { pointName:'技术中心机房总电源', optionId:202512297899,pointType:5,},
- { pointName:'监控室消防设备阀门正常监控室消防设备阀门正常监控室消防设备阀门正常', optionId:202512297899,pointType:6,},
- { pointName:'库房灭火器压力指针处于绿色区', optionId:202512297899,pointType:7,},
- { pointName:'技术中心机房总电源', optionId:202512297899,pointType:8,},
+ {
+ pointName:'技术中心机房总电源', pointId:202512297899, pointType:1,
+ optionList:[
+ {
+ "optionId": 189,
+ "pointId": 188,
+ "optionTitle": "A",
+ "optionContent": "卫生检查1",
+ "createTime": "2025-11-11 11:48:43",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:48:43",
+ "modifyUser": "SSEYS1695"
+ },
+ {
+ "optionId": 190,
+ "pointId": 188,
+ "optionTitle": "B",
+ "optionContent": "卫生检查2",
+ "createTime": "2025-11-11 11:48:43",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:48:43",
+ "modifyUser": "SSEYS1695"
+ },
+ {
+ "optionId": 191,
+ "pointId": 188,
+ "optionTitle": "C",
+ "optionContent": "卫生检查3",
+ "createTime": "2025-11-11 11:48:43",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:48:43",
+ "modifyUser": "SSEYS1695"
+ },
+ {
+ "optionId": 192,
+ "pointId": 188,
+ "optionTitle": "D",
+ "optionContent": "卫生检查4",
+ "createTime": "2025-11-11 11:48:43",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:48:43",
+ "modifyUser": "SSEYS1695"
+ }
+ ]
+ },
+ { pointName:'监控室消防设备阀门正常开启闭合', pointId:202512297899, pointType:2,
+ optionList:[
+ {
+ "optionId": 182,
+ "pointId": 122,
+ "optionTitle": "A",
+ "optionContent": "区域一",
+ "createTime": "2025-11-11 11:40:52",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:40:52",
+ "modifyUser": "SSEYS1695"
+ },
+ {
+ "optionId": 183,
+ "pointId": 122,
+ "optionTitle": "B",
+ "optionContent": "区域二",
+ "createTime": "2025-11-11 11:40:52",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:40:52",
+ "modifyUser": "SSEYS1695"
+ },
+ {
+ "optionId": 184,
+ "pointId": 122,
+ "optionTitle": "C",
+ "optionContent": "区域三",
+ "createTime": "2025-11-11 11:40:52",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:40:52",
+ "modifyUser": "SSEYS1695"
+ },
+ {
+ "optionId": 185,
+ "pointId": 122,
+ "optionTitle": "D",
+ "optionContent": "区域四",
+ "createTime": "2025-11-11 11:40:52",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 11:40:52",
+ "modifyUser": "SSEYS1695"
+ }
+ ]
+ },
+ { pointName:'监控室10组灭火器压力指针处于绿色区域', pointId:202512297899, pointType:3,
+ optionList:[
+ {
+ "optionId": 154,
+ "pointId": 127,
+ "optionTitle": "A",
+ "optionContent": "是",
+ "createTime": "2025-11-11 09:56:34",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 09:56:34",
+ "modifyUser": "SSEYS1695"
+ },
+ {
+ "optionId": 155,
+ "pointId": 127,
+ "optionTitle": "B",
+ "optionContent": "否",
+ "createTime": "2025-11-11 09:56:34",
+ "createUser": "SSEYS1695",
+ "modifyTime": "2025-11-11 09:56:34",
+ "modifyUser": "SSEYS1695"
+ }
+ ]
+ },
+ { pointName:'库房灭火器压力指针处于绿色区', pointId:202512297899,pointType:4,},
+ { pointName:'技术中心机房总电源', pointId:202512297899,pointType:5,},
+ { pointName:'监控室消防设备阀门正常监控室消防设备阀门正常监控室消防设备阀门正常', pointId:202512297899,pointType:6,},
+ { pointName:'库房灭火器压力指针处于绿色区', pointId:202512297899,pointType:7,},
+ { pointName:'技术中心机房总电源', pointId:202512297899,pointType:8,},
],
}
}
- optionObj.value = res.data||{};
+ let data = res.data||{};
+ // data.list.forEach(item=>{
+ // item.chooseList
+ // })
+ optionObj.value = data
}
// 跳转问题上报页面
@@ -219,14 +351,18 @@ const handleQuestion=()=>{
}
// radio 单选选择
-const radioChange=(e)=>{
- console.log(e)
+const radioChange=(e,item)=>{
+ // console.log(e,item)
+ let radioValue = e.detail.value;
+ item['optionIds']=radioValue;
+
}
-// 多选处理
-let chooseList = reactive([0]);
-const changeCheck = (item, value) => {
- chooseList = item;
+// 单选多选处理
+const changeCheck = (param,param2,item) => {
+ // console.log(param,param2,item)
+ item['optionIds'] = param2.join(",");
+ // console.log(item)
}
// 照片及拍照处理
@@ -350,6 +486,7 @@ const handleScan = () => {
scanStr.value = res.result;
console.log('扫码结果:', res.result); // 二维码内容
console.log('码类型:', res.scanType); // 码类型,如 QR_CODE
+ // ['optionIds'] = res.result;
// 处理扫码结果,例如跳转页面
// 如果是URL,可以跳转
// if (res.result.startsWith('http')) {
diff --git a/src/pages/business/polling/problemList.vue b/src/pages/business/polling/problemList.vue
index 65d858d..23e858d 100644
--- a/src/pages/business/polling/problemList.vue
+++ b/src/pages/business/polling/problemList.vue
@@ -45,7 +45,7 @@
- 跟踪次数{{ item.count }}
+ 跟踪次数{{ item.count }}
最近跟踪时间{{parseTime(item.modifyTime,'{m}-{d} {h}:{i}') }}
diff --git a/src/pages/business/polling/problemReport.vue b/src/pages/business/polling/problemReport.vue
index aa53ee9..3048072 100644
--- a/src/pages/business/polling/problemReport.vue
+++ b/src/pages/business/polling/problemReport.vue
@@ -13,7 +13,7 @@
问题项
-
+
{{String(index+1).padStart(2, '0')+'.'}}
{{ item.pointName }}
@@ -122,19 +122,24 @@ const chooseMedia = () => {
success: (res) => {
console.log(res)
res.tempFiles.forEach(file => {
- console.log(`文件类型: ${file.type}, 文件路径: ${file.tempFilePath}`);
- if (file.type === 'image') {
+ console.log(`文件类型: ${file.fileType}, 文件路径: ${file.tempFilePath}`);
+ if (file.fileType === 'image') {
// 显示本地图片
- imgArr.value.push(file)
+ imgArr.value.push(file.tempFilePath)
} else if (file.type === 'video') {
// 处理视频
- videoArr.value.push(file)
+ videoArr.value.push(file.tempFilePath)
}
});
}
});
}
+// 红点点击
+const handleRound=(item)=>{
+ item.active=!item.active
+}
+
// 提交
const handleSubmit=()=>{
// showModel('有未完成的巡检项');
@@ -207,7 +212,7 @@ const handleSubmit=()=>{
.report-list .r-left{
display: flex;
/* align-items: center; */
- width:70%;
+ width:90%;
font-size:28rpx;
color:#919191;
}
@@ -249,10 +254,27 @@ const handleSubmit=()=>{
line-height: 30rpx;
/* #endif */
/* #ifdef APP-PLUS */
- height:30rpx;
- padding-top:5rpx;
+ height:33rpx;
+ padding-top:2rpx;
/* #endif */
}
+.report-list .img-flex{
+ display: flex;
+ flex-flow:row wrap;
+ margin-bottom:30rpx;
+}
+.report-list .img-show img,
+.report-list .img-show video{
+ width:210rpx;
+ height: 140rpx;
+}
+.report-list .img-show :deep(.uni-video-cover-play-button){
+ width:64rpx;
+ height: 64rpx;
+ line-height: 64rpx;
+ font-size:60rpx;
+}
+
.report-list .img-con{
background-color: #EEEEEE;
width:210rpx;
@@ -269,13 +291,9 @@ const handleSubmit=()=>{
.report-list .img-show,
.report-list .img-con{
width: calc(100% / 3 - 10px); /* 减去一些间隙以避免溢出 */
- margin:20rpx 10rpx 0;
+ margin:20rpx 20rpx 0 0;
}
-.report-list .img-show:first-child,
-.report-list .img-con:first-child{
- margin-left:0;
-}
.btn-submit{
width:400rpx;
diff --git a/src/pages/business/polling/searchList.vue b/src/pages/business/polling/searchList.vue
index eff1979..c8142db 100644
--- a/src/pages/business/polling/searchList.vue
+++ b/src/pages/business/polling/searchList.vue
@@ -186,8 +186,8 @@
- 跟踪次数{{ item.count }}
- 最近跟踪时间{{ item.planTime }}
+ 跟踪次数{{ item.count }}
+ 最近跟踪时间{{ parseTime(item.modifyTime,'{m}-{d} {h}:{i}') }}
diff --git a/src/pages/business/polling/taskDetail.vue b/src/pages/business/polling/taskDetail.vue
index 6c90b05..081837a 100644
--- a/src/pages/business/polling/taskDetail.vue
+++ b/src/pages/business/polling/taskDetail.vue
@@ -7,33 +7,34 @@
>
- {{dateStr}}
+
+ {{parseTime(taskObj.planTime,'{y}-{m}-{d} 星期{a} {h}:{i}')}}开始 时长{{taskObj.workHour}}小时
- {{ progress }}%
+ {{ taskObj.progress }}%
- 巡检单号20251229789
- 完成进度3/9
+ 巡检单号{{taskObj.taskId}}
+ 完成进度{{taskObj.count}}/{{taskObj.total}}
-
+
+
- 日常巡检任务AAA
-
-
+ {{taskObj.taskName}}
+
+
{{ item.workName }}
@@ -44,7 +45,7 @@
-
+
@@ -54,8 +55,8 @@
问题跟踪
-
-
+
+
{{ item.problemDesc }}
@@ -66,11 +67,11 @@
- 跟踪次数{{ item.count }}
+ 跟踪次数{{ item.count }}
最近跟踪时间{{ parseTime(item.modifyTime,'{m}-{d} {h}:{i}') }}
-
+
@@ -90,7 +91,7 @@ import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import circleTemplate from '@/components/circleTemplate.vue';
import { parseTime } from '@/utils/datetime.js';
import { formatTaskStatus } from '@/utils/status.js';
-import { noticeList } from '@/api/notice.js'
+import { taskDetail } from '@/api/polling.js'
// '2025-12-29 星期五'
let taskId = ref(undefined);
@@ -99,23 +100,17 @@ const progress = ref(0); // 初始进度为0
onLoad(option => {
// console.log(option)
taskId.value = option.id;
-
- let date = new Date();
- let dstr = parseTime(date,'{y}-{m}-{d} 星期{a}');
- dateStr.value = dstr + " 14:00开始 时长6小时";
-
- setTimeout(() => {
- progress.value=62
- }, 1000);
})
// 查询列表
-let list = ref([]);
-let questList = ref([]);//问题列表
+let taskObj = ref({
+ list:[],
+ questList:[]
+});
const mescrollRef = ref(null);
const upOption = ref({
- // use: false,
+ use: false,
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: {
@@ -127,7 +122,7 @@ const upOption = ref({
});
const downOption = ref({
- auto: false,
+ auto: true,
textInOffset: '下拉刷新',
textOutOffset: '释放更新',
textLoading: '刷新中...'
@@ -145,8 +140,7 @@ const downCallback = async (mescroll) => {
console.log("下拉刷新")
const res = await getList(1, upOption.value.page.size);
cssFlag.value = false;
- list.value = res.list;
- questList.value=res.questList
+ taskObj.value = res;
mescroll.resetUpScroll();
} catch (error) {
mescroll.endErr();
@@ -162,8 +156,7 @@ const upCallback = async (mescroll) => {
console.log("上拉加载更多")
let res = await getList(mescroll.num, mescroll.size);
if (mescroll.num === 1) {
- list.value = res.list;
- questList.value=res.questList
+ taskObj.value = res;
} else {
// list.value.push(...res.list);
}
@@ -180,11 +173,18 @@ const getList = (pageIndex, pageSize) => {
pageIndex,
pageSize,
}
- // let res = await noticeList(param);
+ // let res = await taskDetail(param);
let res = {
"code": 200,
"msg": "操作成功",
"data": {
+ taskId:236,
+ taskName:'日常巡检任务AAA',
+ planTime:new Date().getTime(),
+ progress:62,
+ count:3,
+ total:9,
+ workHour:1,
list:[
{
workName:'技术中心机房总电源',
@@ -327,6 +327,7 @@ const getList = (pageIndex, pageSize) => {
}
}
let data = res.data||{};
+ progress.value = data.progress
resolve({
...data,
// total: res.recordCount || 0
@@ -335,6 +336,11 @@ const getList = (pageIndex, pageSize) => {
}
+// 执行提交
+const handleConfirm=()=>{
+
+}
+
// 查看详情 type 1-详情 2-问题详情
const handleDetail = (item,type) =>{
let url=''
@@ -389,6 +395,7 @@ const handleDetail = (item,type) =>{
font-size:26rpx;
color:#fff;
padding:10rpx 30rpx 20rpx 0;
+ width:328rpx;
}
.polling .p-title.p-border{
border-bottom: 1px solid rgba(255, 255, 255, 0.5);