我的工单,工单详情
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user