lion 3 years ago
parent bbd093ceec
commit e8b12fd6bc

@ -746,11 +746,17 @@
} }
.htz-image-upload-Item { .htz-image-upload-Item {
width: 160rpx; width: 200rpx;
height: 160rpx; height: 200rpx;
line-height: 170rpx;
margin: 13rpx; margin: 13rpx;
border-radius: 10rpx; border-radius: 10rpx;
position: relative; position: relative;
overflow: hidden;
margin: 5px;
background: #f4f5f6;
position: relative;
border-radius: 5px;
} }
.htz-image-upload-Item image { .htz-image-upload-Item image {
@ -790,7 +796,7 @@
font-size: 105rpx; font-size: 105rpx;
/* line-height: 160rpx; */ /* line-height: 160rpx; */
text-align: center; text-align: center;
border: 1px dashed #d9d9d9; /* border: 1px dashed #d9d9d9; */
color: #d9d9d9; color: #d9d9d9;
} }

@ -112,7 +112,7 @@
</div> </div>
<div class="info line"> <div class="info line">
<u-time-line> <u-time-line>
<u-time-line-item nodeTop="2"> <u-time-line-item nodeTop="2" v-for="log in item.logs">
<!-- 此处自定义了左边内容用一个图标替代 --> <!-- 此处自定义了左边内容用一个图标替代 -->
<template v-slot:node> <template v-slot:node>
<view class="u-node"> <view class="u-node">
@ -122,28 +122,13 @@
</template> </template>
<template v-slot:content> <template v-slot:content>
<view> <view>
<view class="u-order-desc">[自提柜]您的快件已放在楼下侧门直走前方53.6左拐约10步再右拐直走见一红灯笼停下叩门三下芝麻开门即可 <view class="u-order-desc">{{log.content}}
</view> </view>
<view class="u-order-time">2019-05-08 12:12</view> <view class="u-order-time">{{log.created_at}}</view>
</view> </view>
</template> </template>
</u-time-line-item> </u-time-line-item>
<u-time-line-item nodeTop="2">
<!-- 此处自定义了左边内容用一个图标替代 -->
<template v-slot:node>
<view class="u-node">
<!-- 此处为uView的icon组件 -->
<u-icon name="checkmark-circle-fill" color="deepskyblue" :size="36"></u-icon>
</view>
</template>
<template v-slot:content>
<view>
<view class="u-order-desc">[自提柜]您的快件已放在楼下侧门直走前方53.6左拐约10步再右拐直走见一红灯笼停下叩门三下芝麻开门即可
</view>
<view class="u-order-time">2019-05-08 12:12</view>
</view>
</template>
</u-time-line-item>
</u-time-line> </u-time-line>
</div> </div>
</div> </div>

@ -35,32 +35,40 @@
<!-- <u-input placeholder="请输入扣除分数" label-position="top" v-model="form.dec_score" /> --> <!-- <u-input placeholder="请输入扣除分数" label-position="top" v-model="form.dec_score" /> -->
</u-form-item> </u-form-item>
<u-form-item label="问题影像" prop="picFileList"> <u-form-item label="问题影像" prop="picFileList">
<u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text="" <!-- <u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text=""
:previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="picFileList" :previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="picFileList"
:form-data="otherData" :show-tips="false" :form-data="otherData" :show-tips="false"
@on-uploaded="function(lists, name) {return toupload(lists, name,'picFileList')}" @on-uploaded="function(lists, name) {return toupload(lists, name,'picFileList')}"
@on-remove="function(index, lists, name) {return toremove(index, lists, name,'picFileList')}"> @on-remove="function(index, lists, name) {return toremove(index, lists, name,'picFileList')}">
</u-upload> </u-upload> -->
<htz-image-upload :max="9" v-model="picFileList" mediaType="image" :chooseNum="9" :sourceType="['album','camera']"
:compress="false" :quality="80" :formData="otherData" :remove="true" :dataType="1"
@uploadSuccess="function(res) { return uploadSuccess(res,'pic')}"
@imgDelete="function(res) { return imgDelete(res,'pic')}"
@uploadFail="uploadFail"
:action="action"></htz-image-upload>
</u-form-item> </u-form-item>
<u-form-item label="问题视频" prop="videoFileList"> <u-form-item label="问题视频" prop="videoFileList">
<!-- <htz-image-upload :max="9" v-model="videoFileList" mediaType="image" :chooseNum="9" :sourceType="['album','camera']" <htz-image-upload :max="9" v-model="videoFileList" mediaType="video" :chooseNum="9" :sourceType="['album','camera']"
:compress="false" :quality="80" :formData="otherData" :remove="true" :compress="false" :quality="80" :formData="otherData" :remove="true" :dataType="1"
@uploadSuccess="uploadSuccess" @imgDelete="imgDelete" @uploadFail="uploadFail" @uploadSuccess="function(res) { return uploadSuccess(res,'video')}"
:action="action"></htz-image-upload> --> @imgDelete="function(res) { return imgDelete(res,'video')}"
<u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text="" @uploadFail="uploadFail"
:action="action"></htz-image-upload>
<!-- <u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text=""
:previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="videoFileList" :previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="videoFileList"
:form-data="otherData" :show-tips="false" :form-data="otherData" :show-tips="false"
@on-uploaded="function(lists, name) {return toupload(lists, name,'videoFileList')}" @on-uploaded="function(lists, name) {return toupload(lists, name,'videoFileList')}"
@on-remove="function(index, lists, name) {return toremove(index, lists, name,'videoFileList')}"> @on-remove="function(index, lists, name) {return toremove(index, lists, name,'videoFileList')}">
</u-upload> </u-upload> -->
</u-form-item> </u-form-item>
<u-form-item label="问题语音" prop="audioFileList"> <u-form-item label="问题语音" prop="audioFileList">
<u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text="" <htz-image-upload :max="9" v-model="audioFileList" mediaType="video" :chooseNum="9" :sourceType="['album','camera']"
:previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="audioFileList" :compress="false" :quality="80" :formData="otherData" :remove="true" :dataType="1"
:form-data="otherData" :show-tips="false" @uploadSuccess="function(res) { return uploadSuccess(res,'audio')}"
@on-uploaded="function(lists, name) {return toupload(lists, name,'audioFileList')}" @imgDelete="function(res) { return imgDelete(res,'audio')}"
@on-remove="function(index, lists, name) {return toremove(index, lists, name,'audioFileList')}"> @uploadFail="uploadFail"
</u-upload> :action="action"></htz-image-upload>
</u-form-item> </u-form-item>
<u-form-item label="备注" prop="ask_content"> <u-form-item label="备注" prop="ask_content">
<u-input type="textarea" placeholder="请输入备注" label-position="top" v-model="form.ask_content" /> <u-input type="textarea" placeholder="请输入备注" label-position="top" v-model="form.ask_content" />
@ -99,7 +107,7 @@
token: "" token: ""
}, },
picFileList: [], picFileList: [],
videoFileList:[], videoFileList:[], // url
audioFileList:[], audioFileList:[],
form: { form: {
area_id: "", area_id: "",
@ -250,18 +258,24 @@
// //
onprogress(res) { onprogress(res) {
uni.showToast({ // uni.showToast({
icon: "none", // icon: "none",
title: "上传中", // title: "",
duration: 2000 // duration: 2000
}) // })
uni.showLoading({
title: '上传中'
});
}, },
tosuccess() { tosuccess() {
uni.showToast({ // uni.showToast({
icon: "none", // icon: "none",
title: "上传成功", // title: "",
duration: 2000 // duration: 2000
}) // })
uni.showLoading({
title: '上传成功'
});
}, },
toremove(index, lists, name, whatfile) { toremove(index, lists, name, whatfile) {
if (whatfile == "picFileList") { if (whatfile == "picFileList") {
@ -283,16 +297,25 @@
submit(){ submit(){
var that = this; var that = this;
let pic = [] let pic = []
for(var m of this.picFileList){ let fileListObj = {
if(m.response){ pics:{
pic.push({ arr:this.picFileList,
upload_id:m.response.id, type:1
type:1 },
}) videos:{
}else{ arr:this.videoFileList,
type:2
},
audios:{
arr:this.audioFileList,
type:3
}
}
for(var m in fileListObj){
for(var k of fileListObj[m]['arr']){
pic.push({ pic.push({
upload_id:m.id, id:k.id,
type:1 type:fileListObj[m]['type']
}) })
} }
} }
@ -328,13 +351,46 @@
url: "../inspect/list" url: "../inspect/list"
}) })
}, },
uploadSuccess(res,type){
uploadSuccess(res){ console.log(type)
console.log("uploadSuccess",res) uni.showLoading({
this.videoFileList.push(res.data.url) title:"上传成功"
})
let obj = {}
let data = JSON.parse(res.data)
obj.id = data.id
obj.url = data.url
switch (type){
case 'video':
this.videoFileList.push(obj)
break;
case 'audio':
this.audioFileList.push(obj)
break;
case 'pic':
this.picFileList.push(obj)
break;
default:
break;
}
}, },
imgDelete(res){ imgDelete(res,type){
console.log("imgDelete",res) console.log("imgDelete",res)
let list = []
list = res.tempFilePaths
switch (type){
case 'video':
this.videoFileList = list
break;
case 'audio':
this.audioFileList= list
break;
case 'pic':
this.picFileList= list
break;
default:
break;
}
}, },
uploadFail(res){ uploadFail(res){
console.log("uploadFail",res) console.log("uploadFail",res)

@ -26,13 +26,15 @@
:custom-style="getStyle"> :custom-style="getStyle">
<view class="getwrap"> <view class="getwrap">
<view>当前时间{{nowTime}}</view> <view>当前时间{{nowTime}}</view>
<view v-if="isGet"> <view v-if="isGet" class="isget">
<view class="getinfo">请确认时间和地点再打卡</view> <view class="getinfo">请确认时间和地点再打卡</view>
<view @click="openGetConfirmShow" class="getcircle">{{getStatus?'上班打卡':'下班打卡'}}</view> <view @click="openGetConfirmShow" class="getcircle">{{getStatus?'上班打卡':'下班打卡'}}</view>
</view> </view>
<view v-if="!isGet"> <view v-if="!isGet" class="isget">
<view>上班打卡时间{{getTime}}</view> <view class="gettime">
<view>下班打卡时间{{downTime}}</view> <view>上班打卡时间{{getTime}}</view>
<view>下班打卡时间{{downTime}}</view>
</view>
</view> </view>
<view class="getaddress"> <view class="getaddress">
<img src="../../static/dw.png" alt=""> <img src="../../static/dw.png" alt="">
@ -206,7 +208,7 @@
lng_out:this.longitude, lng_out:this.longitude,
address_out:this.address address_out:this.address
}, },
utilSuccess: function(result) { utilSuccess: function(res) {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: res.msg, title: res.msg,
callback:function(){ callback:function(){
@ -280,9 +282,15 @@
.getwrap { .getwrap {
padding: 60rpx; padding: 60rpx;
padding-bottom: 0rpx; padding-bottom: 0rpx;
height:480rpx
}
.isget{
height:280rpx
}
.gettime{
padding-top:90rpx
} }
.getwrap view { .getwrap view {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }

Loading…
Cancel
Save