文件上传限制,巡检详情日期参数
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-16 15:43:07
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-06-03 18:19:51
|
||||
* @LastEditTime: 2026-08-08 10:24:21
|
||||
*/
|
||||
|
||||
import request, {
|
||||
@@ -84,11 +84,13 @@ export const getInspectionList = (data) => {
|
||||
/**
|
||||
* @description: 获取 巡检任务详情
|
||||
* @param {string} id
|
||||
* @param {string} date
|
||||
* @return {Promise<DataResult<InspectionMainType>>}
|
||||
*/
|
||||
export const getInspectionMain = (id) => {
|
||||
export const getInspectionMain = (id, date) => {
|
||||
return get('/api/inspection/today/detail', {
|
||||
taskId: id
|
||||
taskId: id,
|
||||
date,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ watch(
|
||||
// 1. 选择图片
|
||||
function choose() {
|
||||
uni.chooseImage({
|
||||
count: props.limit,
|
||||
count: props.limit - innerList.value.length,
|
||||
sourceType: props.sourceType,
|
||||
sizeType: props.sizeType,
|
||||
success: async res => {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "花开管家",
|
||||
"appid" : "__UNI__5F224F3",
|
||||
"description" : "智慧社区管家端,专为小区物业管理人员打造,支持多小区灵活切换管理。集成账号密码、手机号密码双重登录模式,内置忘记密码找回功能,保障账号安全。涵盖消息通知、日常巡检、故障报修、一键开门、工单流转、投诉处理等核心办公功能,物业人员可在线完成巡检打卡、问题上报、工单派发跟进、投诉对接处理等日常工作,同时支持查看个人上报记录、巡检历史,便捷修改账号信息与登录密码。高效简化社区物业办公流程,提升小区服务与管理效率,打造便捷智能的社区管理服务平台。",
|
||||
"versionName" : "1.0.3",
|
||||
"versionCode" : 103,
|
||||
"versionName" : "1.0.4",
|
||||
"versionCode" : 104,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
|
||||
@@ -99,6 +99,7 @@ import { getInspectionMain } from '@/api/insepction.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
const taskid = ref('')
|
||||
let date = ''
|
||||
const info = ref({
|
||||
planName: '',
|
||||
remindTime: '',
|
||||
@@ -114,7 +115,7 @@ const baseFormData = ref([])
|
||||
|
||||
function init() {
|
||||
if (!taskid.value) return
|
||||
getInspectionMain(taskid.value)
|
||||
getInspectionMain(taskid.value, date)
|
||||
.then(res => {
|
||||
info.value = res.data
|
||||
if (!res.data.routes) return
|
||||
@@ -154,6 +155,8 @@ function init() {
|
||||
|
||||
onLoad(options => {
|
||||
taskid.value = options.id
|
||||
date = options.date
|
||||
console.log(date)
|
||||
init()
|
||||
})
|
||||
|
||||
|
||||
@@ -162,7 +162,8 @@ function handleTap(ite) {
|
||||
|
||||
if (isComputed(ite.taskStatus)) {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/inspection/inspection_main?id=' + ite.id
|
||||
url:
|
||||
'/pageSubPack/inspection/inspection_main?id=' + ite.id + '&date=' + queryParmas.value.date
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import filePicker from '@/components/filePicker/filePicker.vue'
|
||||
import { getInspectionMain, putInsepctionPoint } from '@/api/insepction.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
@@ -209,6 +209,10 @@ function handleSubmit(item) {
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '正在提交',
|
||||
mask: true
|
||||
})
|
||||
let obj = {
|
||||
pointId: item.pointId,
|
||||
imgUrl: item.files.length > 0 ? item.files.join(',') : '',
|
||||
@@ -219,6 +223,16 @@ function handleSubmit(item) {
|
||||
putInsepctionPoint(obj)
|
||||
.then(res => {
|
||||
item.complated = true
|
||||
if (isComputed.value) {
|
||||
uni.showToast({
|
||||
title: '巡检完成',
|
||||
mask: true,
|
||||
duration: 2000,
|
||||
success() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
@@ -226,15 +240,20 @@ function handleSubmit(item) {
|
||||
title: '网络错误'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
|
||||
const isComputed = computed(() => {
|
||||
// 遍历每一项
|
||||
return baseFormData.value.every(item => {
|
||||
const bol = baseFormData.value.every(item => {
|
||||
// 每一项里的所有 points 都必须是已完成
|
||||
return item.points.every(point => point.complated)
|
||||
})
|
||||
return bol
|
||||
})
|
||||
|
||||
/**
|
||||
* 预览图片
|
||||
* @param {Array} images - 所有图片的URL数组
|
||||
|
||||
Reference in New Issue
Block a user