lion 3 years ago
parent bbd093ceec
commit e8b12fd6bc

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

@ -112,7 +112,7 @@
</div>
<div class="info 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>
<view class="u-node">
@ -122,28 +122,13 @@
</template>
<template v-slot:content>
<view>
<view class="u-order-desc">[自提柜]您的快件已放在楼下侧门直走前方53.6左拐约10步再右拐直走见一红灯笼停下叩门三下芝麻开门即可
<view class="u-order-desc">{{log.content}}
</view>
<view class="u-order-time">2019-05-08 12:12</view>
<view class="u-order-time">{{log.created_at}}</view>
</view>
</template>
</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>
</div>
</div>

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

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

Loading…
Cancel
Save