巡检
This commit is contained in:
@@ -23,33 +23,51 @@
|
||||
巡检日期:<text>{{parseTime(optionObj.planTime,'{y}-{m}-{d} 星期{a}')}}</text>
|
||||
</view>
|
||||
<view class="report-list" v-for="(item, index) in optionObj.list" :key="index">
|
||||
<!-- 单选 or 判断 -->
|
||||
<block v-if="item.pointType==1||item.pointType==3">
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view>{{String(index+1).padStart(2, '0')+'.'}}</view>
|
||||
<view>{{ item.pointName }}</view>
|
||||
</view>
|
||||
<view class="r-right">
|
||||
<radio-group @change="radioChange" style="transform:scale(0.9)">
|
||||
<radio value="1" color="#02C74C" style="margin-right:30rpx;" >是</radio>
|
||||
<radio value="2" color="#02C74C">否</radio>
|
||||
</radio-group>
|
||||
</view>
|
||||
<!-- 单选 -->
|
||||
<block v-if="item.pointType==1">
|
||||
<view class="r-left">
|
||||
<view>{{String(index+1).padStart(2, '0')+'.'}}</view>
|
||||
<view>{{ item.pointName }}</view>
|
||||
</view>
|
||||
</block>
|
||||
<multipleSelect :multiple="false" :value="item.chooseList" downInner
|
||||
:options="item.optionList" @change="(...args) => changeCheck(...args, item)"
|
||||
:slabel="'optionContent'" :svalue="'optionId'"
|
||||
>
|
||||
</multipleSelect>
|
||||
</block>
|
||||
<!-- 多选 -->
|
||||
<block v-else-if="item.pointType==2">
|
||||
<view class="r-left">
|
||||
<view>{{String(index+1).padStart(2, '0')+'.'}}</view>
|
||||
<view>{{ item.pointName }}</view>
|
||||
</view>
|
||||
<multipleSelect :multiple="true" :value="chooseList" downInner
|
||||
:options="checkList" @change="changeCheck"
|
||||
:slabel="'text'"
|
||||
<multipleSelect :multiple="true" :value="item.chooseList" downInner
|
||||
:options="item.optionList" @change="(...args) => changeCheck(...args, item)"
|
||||
:slabel="'optionContent'" :svalue="'optionId'"
|
||||
>
|
||||
</multipleSelect>
|
||||
</block>
|
||||
<!-- 判断 -->
|
||||
<block v-if="item.pointType==3">
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view>{{String(index+1).padStart(2, '0')+'.'}}</view>
|
||||
<view>{{ item.pointName }}</view>
|
||||
</view>
|
||||
<view class="r-right">
|
||||
<radio-group @change="radioChange($event,item)" style="transform:scale(0.9)">
|
||||
<!-- <radio value="1" color="#02C74C" style="margin-right:30rpx;" >是</radio>
|
||||
<radio value="2" color="#02C74C">否</radio> -->
|
||||
<radio :value="item2.optionId+''" color="#02C74C"
|
||||
v-for="(item2,index) in item.optionList" :key="index"
|
||||
:style="{marginRight:index==0?'30rpx':'0'}"
|
||||
>
|
||||
{{item2.optionContent}}
|
||||
</radio>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 问答 -->
|
||||
<block v-else-if="item.pointType==4">
|
||||
<view class="r-left">
|
||||
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user