Commit 2490b41f authored by Damon's avatar Damon

异常签到异步处理图片

parent c3a4cfce
......@@ -180,7 +180,7 @@
</view>
</view>
</view>
<take-photo type="test" v-if="takeStatus" @close="closeTake" :num="1"></take-photo>
<take-photo type="test" v-if="takeStatus" @close="closeTake" :upload="false" :num="1"></take-photo>
<PopView title="查看交互规范" message="为完善交付质量,请查看对应的交付规范" :visible.sync="visibale" @click="handleClick"/>
</template>
</view>
......@@ -190,6 +190,7 @@
import appointTime from '@/components/appoint/appoint-time.vue'
import takePhoto from '@/components/take/index.vue'
import PopView from "@/components/popView/index.vue"
import baseFile from '@/components/upload/index'
let now = new Date(new Date().toLocaleDateString()).getTime();
export default {
components: {
......@@ -197,6 +198,7 @@
'take-photo': takePhoto,
PopView
},
mixins: [baseFile],
data() {
return {
readMore: true,
......@@ -406,12 +408,14 @@
uni.hideTabBar()
this.takeStatus = true
},
closeTake(img) {
async closeTake(img) {
this.takeStatus = false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img){ // 拍照完成
const files = img.map(v => v.path)
const value = await this.saveToTask(files)
this.isErrorSign = true
this.errorSignUrl = img[img.length-1].key
this.errorSignUrl = value[0].key
this.handleBtn()
}else{
this.$refs.uToast.show({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment