This commit is contained in:
parent
4fa2765445
commit
2851ba0885
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="signature-page">
|
||||
<div class="img" v-if="imgPath">
|
||||
<image :class="{ rotate: isRotate }" :src="imgPath" @click="preview"></image>
|
||||
</div>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ref, reactive, onMounted, watch } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import {
|
||||
getSign,
|
||||
|
|
@ -34,8 +34,9 @@ let signType = ref(0)
|
|||
const opts = reactive({})
|
||||
|
||||
onLoad((opt) => {
|
||||
// console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||
Object.assign(opts, JSON.parse(opt.params))
|
||||
// console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||
const params = opt.params ? JSON.parse(opt.params) : {}
|
||||
Object.assign(opts, params)
|
||||
if (opts.isLease) {
|
||||
signType.value = opts.leaseSignType
|
||||
imgPath.value = opts.leaseSignUrl
|
||||
|
|
@ -57,13 +58,29 @@ onMounted(() => {
|
|||
if (opts.isLease || opts.isBack) return
|
||||
getSignData()
|
||||
})
|
||||
|
||||
watch(isCanvas, (val) => {
|
||||
if (val) {
|
||||
document.body.style.overflow = 'hidden'
|
||||
} else {
|
||||
document.body.style.overflow = ''
|
||||
}
|
||||
})
|
||||
// 获取签名
|
||||
const getSignData = () => {
|
||||
getSign()
|
||||
.then((res) => {
|
||||
imgPath.value = res.data.signUrl
|
||||
signType.value = res.data.signType
|
||||
if (res.data.signType == 1) {
|
||||
// console.log('🚀 ~ .then ~ res:', res)
|
||||
if (!res.data) {
|
||||
// 提示获取签名失败
|
||||
uni.showToast({
|
||||
title: '获取签名失败',
|
||||
icon: 'error',
|
||||
})
|
||||
}
|
||||
imgPath.value = res.data.signUrl || ''
|
||||
signType.value = res.data.signType || ''
|
||||
if (res.data.signType && res.data.signType == 1) {
|
||||
isRotate.value = false
|
||||
} else {
|
||||
isRotate.value = true
|
||||
|
|
@ -205,4 +222,14 @@ const uploadImg = (path) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
.signature-page {
|
||||
min-height: 99vh;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
.signature-page.no-scroll {
|
||||
height: 99vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ const getSignList = async () => {
|
|||
auditingList.value = res.data.map((item, index) => {
|
||||
return {
|
||||
...item,
|
||||
title: index == 0 ? '供应科审核' : item.deptName + '审核',
|
||||
desc: item.auditStatusName + '\n' + (index == 0 ? '姚士超' : item.userName || '') + '\n' + item.createTime + '\n' + (item.auditRemark || '')
|
||||
title: index == 0 ? '供应科审核' : item.deptName || '' + '审核',
|
||||
desc: item.auditStatusName + '\n' + (item.userName || '') + '\n' + (item.createTime || '') + '\n' + (item.auditRemark || '')
|
||||
}
|
||||
})
|
||||
activeSect.value = auditingList.value.length - 1
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ const getSignList = async () => {
|
|||
return {
|
||||
...item,
|
||||
title: index == 0 ? '供应科审核' : item.deptName || '' + '审核',
|
||||
desc: (item.auditStatusName || '') + '\n' + (index == 0 ? '姚士超' : item.userName || '') + '\n' + (item.createTime || '') + '\n' + (item.auditRemark || '')
|
||||
desc: (item.auditStatusName || '') + '\n' + (item.userName || '') + '\n' + (item.createTime || '') + '\n' + (item.auditRemark || '')
|
||||
}
|
||||
})
|
||||
activeSect.value = auditingList.value.length - 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue