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