我的工单,工单详情

This commit is contained in:
Zy
2026-05-20 08:20:06 +08:00
parent 0de58216f0
commit 25ef557d27
3 changed files with 59 additions and 28 deletions

View File

@@ -6,7 +6,11 @@
<text>问题描述</text>
</view>
<view class="descrition">
<textarea value="" placeholder-style="color:#e8e8e8;" placeholder="请描述您的问题" />
<textarea
v-model="form.descrition"
placeholder-style="color:#e8e8e8;"
placeholder="请描述您的问题"
/>
</view>
</view>
<view class="item">
@@ -14,11 +18,17 @@
<text>问题照片</text>
</view>
<view class="">
<uni-file-picker v-model="form.images" file-mediatype="image">
<!-- <uni-file-picker v-model="form.images" file-mediatype="image">
<view class="addimages images flex flex-center">
<uni-icons type="plusempty" color="#a6a6a6" size="27"></uni-icons>
</view>
</uni-file-picker>
</uni-file-picker> -->
<filePicker
v-model="form.images"
:sourceType="['camera']"
file-field-name="file"
uploadUrl="/resource/oss/upload"
></filePicker>
</view>
</view>
<view class="action_btn" @tap="handleSelecthouse">
@@ -30,34 +40,39 @@
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import filePicker from '@/components/filePicker/filePicker.vue'
import { ticketComputed } from '@/api/ticket.js'
const form = ref({
id: '',
descrition: '',
images: [
{
name: 'file1.png',
extname: 'png',
url: 'https://picsum.photos/80'
},
{
name: 'file2.png',
extname: 'png',
url: 'https://picsum.photos/80'
},
{
name: 'file3.png',
extname: 'png',
url: 'https://picsum.photos/80'
},
{
name: 'file4.png',
extname: 'png',
url: 'https://picsum.photos/80'
}
]
images: []
})
onLoad(options => {
form.value.id = options.id
})
/** 返回上一页 */
function handleSelecthouse() {
uni.navigateBack()
const obj = {
id: form.value.id,
repairDes: form.value.descrition,
repairImageUrl: ''
}
if (form.value.images.length > 0) {
obj.repairImageUrl = form.value.images.join(',')
}
ticketComputed(obj)
.then(() => {
uni.navigateBack()
})
.catch(() => {
uni.showToast({
icon: 'error',
title: '网络错误'
})
})
}
</script>