Commit 2490b41f authored by Damon's avatar Damon

异常签到异步处理图片

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