mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
优化办理时拍照功能
This commit is contained in:
parent
46b7f9c0fc
commit
31c53e7dc8
@ -38,9 +38,21 @@
|
||||
<view class="cu-form-group margin-top-xs">
|
||||
<textarea v-model="content" placeholder="必填,请输入内容"></textarea>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<view class="flex justify-between margin-top-xs">
|
||||
<view></view>
|
||||
<view class="margin-right">
|
||||
<text class=" cuIcon-camerafill text-blue file-size" @click="_changeUploadFile('IMG')" v-if="fileType != 'IMG'"></text>
|
||||
<text class=" cuIcon-upload text-blue file-size" @click="_changeUploadFile('FILE')" v-else></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-sm" v-if="fileType != 'IMG'">
|
||||
<vc-upload-file ref="vcUploadFileRel" @uploadFile="uploadFile"></vc-upload-file>
|
||||
</view>
|
||||
<view class="margin-top-xs" v-else>
|
||||
<uploadImageAsync ref="vcUploadRef" :communityId="communityId" :maxPhotoNum="uploadImage.maxPhotoNum"
|
||||
:canEdit="uploadImage.canEdit" :title="uploadImage.imgTitle" @sendImagesData="sendImagesData">
|
||||
</uploadImageAsync>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-direction margin-top-lg">
|
||||
<button class="cu-btn bg-blue margin-tb-sm lg" @click="submitWorkOrder">提交</button>
|
||||
@ -53,6 +65,8 @@
|
||||
|
||||
<script>
|
||||
import vcUploadFile from '@/components/vc-upload/vc-upload-file.vue';
|
||||
import uploadImageAsync from "@/components/vc-upload-async/vc-upload-async.vue";
|
||||
|
||||
import selectOneStaffs from '../../components/select-staff/select-one-staffs.vue';
|
||||
import {
|
||||
finishWorkTask,
|
||||
@ -80,12 +94,19 @@
|
||||
workName: '',
|
||||
createUserName: '',
|
||||
itemId: '',
|
||||
items: []
|
||||
items: [],
|
||||
fileType: 'IMG',
|
||||
uploadImage: {
|
||||
maxPhotoNum: 1,
|
||||
imgTitle: '图片上传',
|
||||
canEdit: true
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
vcUploadFile,
|
||||
selectOneStaffs
|
||||
selectOneStaffs,
|
||||
uploadImageAsync
|
||||
},
|
||||
onLoad(options) {
|
||||
this.taskId = options.taskId;
|
||||
@ -152,10 +173,26 @@
|
||||
radioChange: function(e) {
|
||||
this.itemId = e.detail.value;
|
||||
},
|
||||
_changeUploadFile:function(_fileType){
|
||||
this.fileType = _fileType;
|
||||
},
|
||||
sendImagesData:function(_obj){
|
||||
if(_obj.length < 1){
|
||||
this.pathUrl = "";
|
||||
return;
|
||||
}
|
||||
this.pathUrl = _obj[0].fileId;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss">
|
||||
.centent-btn {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.file-size {
|
||||
font-size: 48upx;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user