qa-regulatory-gwj-app/components/sign/sign.vue

129 lines
2.4 KiB
Vue
Raw Normal View History

2023-11-07 10:08:37 +08:00
<template>
<u-modal
:show="signShow"
2024-08-28 16:29:32 +08:00
:show-confirm-button="false"
class="esign_dialog"
width="100vw"
2023-11-07 10:08:37 +08:00
>
2024-08-28 16:29:32 +08:00
<view class="footer">
<view class="button" @click="fnReset">
<view></view>
<view></view>
</view>
<view class="button" @click="fnGenerate">
<view></view>
<view></view>
</view>
</view>
<view v-if="signShow" class="content">
<sp-sign-board
ref="signRef"
horizontal
bg-color="#fff"
:need-back="false"
/>
</view>
<view class="header">
<view></view>
<view>
<view class="title"></view>
<view class="title"></view>
</view>
<view>
<u-icon name="close" size="26" color="#000" @click="fnClose" />
</view>
2023-11-07 10:08:37 +08:00
</view>
</u-modal>
</template>
2024-08-28 16:29:32 +08:00
<script >
export default {
props: {
signShow: {
type: Boolean,
default: false
},
2023-11-07 10:08:37 +08:00
},
2024-08-28 16:29:32 +08:00
data() {
return {
visible:false,
}
2023-11-07 10:08:37 +08:00
},
2024-08-28 16:29:32 +08:00
methods: {
fnReset() {
this.$refs.signRef?.reset && this.$refs.signRef.reset();
},
fnGenerate() {
this.$refs.signRef.confirm();
},
fnClose() {
this.fnReset();
this.$emit("update:signShow", false);
}
2023-11-07 10:08:37 +08:00
},
2024-08-28 16:29:32 +08:00
mounted() {
uni.$on("getSignImg", ({ base64, path }) => {
2024-10-10 10:14:31 +08:00
this.$emit('confirm', {base64, path});
2024-08-28 16:29:32 +08:00
this.fnClose();
});
},
beforeDestroy() {
uni.$off("getSignImg");
}
2023-11-07 10:08:37 +08:00
}
</script>
2024-08-28 16:29:32 +08:00
<style scoped lang="scss">
.header {
padding: 50rpx 0;
width: 80rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
text-align: center;
font-size: 40rpx;
color: #000;
margin-right: -25rpx;
.title {
margin-top: 10rpx;
transform: rotate(90deg);
}
}
.content {
flex: 1;
//display: flex;
//align-items: center;
//justify-content: center;
height: 95vh;
border: 1rpx dashed #dcdee0;
}
.footer {
display: flex;
flex-direction: column;
margin-left: -25rpx;
.button {
border: 0;
border-radius: 0;
flex: 1;
border-top: 1rpx solid #dcdee0;
display: block;
padding-top: 25vh;
padding-left: 14rpx;
padding-right: 30rpx;
&:first-child {
border: 0;
}
view {
transform: rotate(90deg);
}
}
2023-11-07 10:08:37 +08:00
}
</style>