巡检 - 已提交的点位禁用

This commit is contained in:
赵毅 2025-09-26 16:40:51 +08:00
parent 06f9b79012
commit a0c040e3af
2 changed files with 21 additions and 14 deletions

View File

@ -60,6 +60,12 @@
color: #1890ff;
}
.disabled {
opacity: 0.6;
cursor: not-allowed;
pointer-events: none;
}
.camera-section {
flex: 1;
}

View File

@ -3,7 +3,7 @@
<!-- 点位选择下拉菜单 -->
<view class="select-container">
<label class="select-label">选择点位</label>
<input type="text" class="search-input" v-model="searchKeyword" @focus="showOptions = true"
<input type="text" class="search-input" v-model="searchKeyword" @focus="showOptions = !showOptions"
placeholder="请输入点位名称搜索" readonly />
<!-- 下拉选项 -->
@ -14,11 +14,12 @@
</view>
<!-- 有选项时显示选项列表 -->
<view v-else>
<view v-for="option in pointsList"
:key="option.id"
class="option-item"
@click="selectPointHandler(option)">
{{ option.point_info.point_name }}
<view v-for="option in pointsList" :key="option.id" class="option-item"
@click="option.exec_status != 3 && selectPointHandler(option)"
:class="{ 'disabled': option.exec_status == 3 }">
<view>
{{ option.point_info.point_name }}
</view>
</view>
</view>
</view>
@ -157,7 +158,7 @@ export default {
title: '正在上传图片...',
mask: true
})
// 使Promise.all
const uploadPromises = this.images.map(imagePath => {
return new Promise((resolve, reject) => {
@ -170,27 +171,27 @@ export default {
});
});
});
//
const uploadedImageUrls = await Promise.all(uploadPromises);
uni.hideLoading();
// 使URL
const params = {
task_id: parseInt(this.taskId), // ID
task_point_id: parseInt(this.selectedPoint), // ID
image: uploadedImageUrls // 使URL
}
console.log('上传成功的图片URL', uploadedImageUrls)
//
const res = await request(apiArr.routingInspectionSubmit, "POST", params);
//
console.log('提交数据:', params)
//
uni.showToast({
title: '提交成功',