|
|
|
|
@ -1,10 +1,12 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="containers">
|
|
|
|
|
|
|
|
|
|
<view class="signwrap">
|
|
|
|
|
<l-signature disableScroll backgroundColor="#ddd" ref="signatureRef" :penColor="penColor"
|
|
|
|
|
:penSize="penSize"></l-signature>
|
|
|
|
|
<view class="signarea">签字区</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="signbtns justify-between">
|
|
|
|
|
<view class="signbtns justify-evenly">
|
|
|
|
|
<button type="primary" @click="onClick('clear')">清空</button>
|
|
|
|
|
<button type="primary" @click="onClick('undo')">撤消</button>
|
|
|
|
|
<button type="primary" @click="onClick('save')">保存</button>
|
|
|
|
|
@ -20,17 +22,17 @@
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
id:"",
|
|
|
|
|
id: "",
|
|
|
|
|
title: 'Hello',
|
|
|
|
|
penColor: 'black',
|
|
|
|
|
penSize: 5,
|
|
|
|
|
urls: '',
|
|
|
|
|
accept_admin_sign:"",
|
|
|
|
|
picForm:{},
|
|
|
|
|
host:''
|
|
|
|
|
accept_admin_sign: "",
|
|
|
|
|
picForm: {},
|
|
|
|
|
host: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(options){
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.id = options.id
|
|
|
|
|
this.host = this.util.HOST
|
|
|
|
|
this.loadDetail()
|
|
|
|
|
@ -65,24 +67,24 @@
|
|
|
|
|
uploadImg(url) {
|
|
|
|
|
let that = this
|
|
|
|
|
uni.uploadFile({
|
|
|
|
|
url: this.host+'/api/admin/upload-file',
|
|
|
|
|
url: this.host + '/api/admin/upload-file',
|
|
|
|
|
filePath: url,
|
|
|
|
|
name: 'file',
|
|
|
|
|
header:{
|
|
|
|
|
token:uni.getStorageSync('userInfo_BD_token').token
|
|
|
|
|
header: {
|
|
|
|
|
token: uni.getStorageSync('userInfo_BD_token').token
|
|
|
|
|
},
|
|
|
|
|
success: (res) => {
|
|
|
|
|
console.log("respic",res.data)
|
|
|
|
|
console.log("respic", res.data)
|
|
|
|
|
let data = JSON.parse(res.data)
|
|
|
|
|
that.picForm.accept_admin_sign = data.response?data.response.id:data.id
|
|
|
|
|
console.log("that.accept_admin_sign",that.picForm)
|
|
|
|
|
that.picForm.accept_admin_sign = data.response ? data.response.id : data.id
|
|
|
|
|
console.log("that.accept_admin_sign", that.picForm)
|
|
|
|
|
that.picSubmit()
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
loadDetail() {
|
|
|
|
|
let that = this
|
|
|
|
|
console.log("that.id",that.id)
|
|
|
|
|
console.log("that.id", that.id)
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/admin/visit/show',
|
|
|
|
|
method: "get",
|
|
|
|
|
@ -108,7 +110,7 @@
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/admin/visit/save',
|
|
|
|
|
method: "POST",
|
|
|
|
|
requestType:'bd',
|
|
|
|
|
requestType: 'bd',
|
|
|
|
|
data: that.picForm,
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
@ -117,7 +119,7 @@
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pages/bd/record?type=myrecord'
|
|
|
|
|
url: '/pages/bd/record?type=myrecord'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
@ -139,13 +141,39 @@
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
position: relative;
|
|
|
|
|
background-color: #ddd;
|
|
|
|
|
}
|
|
|
|
|
.signarea{
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 47%;
|
|
|
|
|
right: 0%;
|
|
|
|
|
transform: translate(-50%, -50%),;
|
|
|
|
|
z-index: 99;
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
transform: rotate(90deg);
|
|
|
|
|
color: #ddd;
|
|
|
|
|
}
|
|
|
|
|
/deep/ .lime-signature,
|
|
|
|
|
.lime-signature__canvas {
|
|
|
|
|
height: 80% !important;
|
|
|
|
|
width: 80% !important;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
right: 0;
|
|
|
|
|
transform: translate(0, -50%);
|
|
|
|
|
background: #fff !important;
|
|
|
|
|
z-index: 99
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.signbtns {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: -8px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 80%;
|
|
|
|
|
z-index: 9;
|
|
|
|
|
transform: translate(0, -50%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.signbtns button {
|
|
|
|
|
@ -155,5 +183,6 @@
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
/* padding: 40rpx; */
|
|
|
|
|
color: #333;
|
|
|
|
|
transform: rotate(90deg);
|
|
|
|
|
}
|
|
|
|
|
</style>
|