部分样式,图片上传,

This commit is contained in:
Zy
2026-06-04 14:24:46 +08:00
parent 85c24af489
commit a3361916c2
10 changed files with 60 additions and 39 deletions

View File

@@ -175,21 +175,22 @@ onLoad(options => {
border-radius: 16rpx;
background-color: #fff;
.title_box {
height: 40rpx;
line-height: 40rpx;
.title {
font-weight: 550;
font-size: 32rpx;
color: #333333;
min-height: 40rpx;
text-wrap: wrap;
line-height: 40rpx;
.line {
display: block;
width: 6rpx;
height: 28rpx;
background: #4d5dfa;
margin-right: 10rpx;
}
}
.inspection_status {
width: 100rpx;
font-weight: 400;
font-size: 28rpx;
color: #666666;

View File

@@ -68,14 +68,14 @@
</view>
<view class="items_picker_box">
<view class="label">
<text v-if="info.inspectSetting === 1" class="is-required">*</text>
<text class="is-required">*</text>
<text>巡检照片</text>
</view>
<view class="filePickerbox" v-if="!ite.complated">
<filePicker
v-model="ite.files"
file-field-name="file"
uploadUrl="/resource/oss/upload"
uploadUrl="/api/butler/file/uploadImage"
@fail="onUploadFail"
></filePicker>
</view>
@@ -106,9 +106,8 @@
<script setup>
import { computed, ref } from 'vue'
import filePicker from '@/components/filePicker/filePicker.vue'
import { getInspectionMain } from '@/api/insepction.js'
import { getInspectionMain, putInsepctionPoint } from '@/api/insepction.js'
import { onLoad } from '@dcloudio/uni-app'
import { putInsepctionPoint } from '@/api/insepction.js'
const statuslist = [
{
@@ -202,15 +201,13 @@ function onUploadFail() {
/** 提交巡检点 检查情况 */
function handleSubmit(item) {
if (info.value.inspectSetting === 1) {
if (item.files.length <= 0) {
uni.showToast({
icon: 'error',
mask: true,
title: '必须拍照'
})
return
}
if (item.files.length <= 0) {
uni.showToast({
icon: 'error',
mask: true,
title: '必须拍照'
})
return
}
let obj = {
pointId: item.pointId,
@@ -271,14 +268,14 @@ function previewImages(images, currentIndex) {
.inspection_title {
margin-bottom: 20rpx;
.title {
font-size: 32rpx;
font-size: 30rpx;
color: #333333;
line-height: 40rpx;
height: 40rpx;
min-height: 40rpx;
text-wrap: wrap;
.line {
display: block;
width: 6rpx;
height: 28rpx;
background: #4d5dfa;
margin-right: 10rpx;
margin-top: 6rpx;
@@ -288,6 +285,7 @@ function previewImages(images, currentIndex) {
font-weight: 400;
font-size: 28rpx;
color: #4d5dfa;
width: 100rpx;
line-height: 36rpx;
}
}

View File

@@ -54,12 +54,12 @@
<script setup lang="ts">
import { ref, computed } from 'vue'
import TabsComponents from '@/components/tabs/tabs.vue'
import { onShow } from '@dcloudio/uni-app'
import { getInspectionList } from '@/api/insepction.js'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { InspectionListType, getInspectionList } from '@/api/insepction.js'
import { parseTime } from '@/utils/time.js'
// tabs =========================================================
const activeValue = ref(0)
const activeValue = ref(2)
const tabslist = ref([
{
name: '全部',
@@ -86,7 +86,7 @@ const isComputed = (status: string) => {
const awaitlist = ['未完成', '待执行', '执行中']
return !awaitlist.includes(status)
}
const list = ref([])
const list = ref<InspectionListType[]>([])
const queryParmas = ref({
date: '',
status: 2,
@@ -133,7 +133,7 @@ function getlist() {
})
}
/** 跳转到巡检上传页面 */
function handleTap(ite) {
function handleTap(ite: InspectionListType) {
if (isComputed(ite.taskStatus)) {
uni.navigateTo({
url: '/pageSubPack/inspection/inspection_main?id=' + ite.id
@@ -151,8 +151,13 @@ function init() {
getlist()
}
onLoad(options => {
activeValue.value = Number(options.type)
console.log(activeValue.value)
})
onShow(() => {
init()
handleTabs(activeValue.value)
})
</script>