|
|
@@ -1,4 +1,5 @@
|
|
|
<template>
|
|
|
+ <page-meta root-font-size="system"/>
|
|
|
<view class="process_detail_container">
|
|
|
<uni-card>
|
|
|
<view class="main_container">
|
|
|
@@ -18,14 +19,13 @@
|
|
|
v-model="elem.defaultValue" type="text"></uni-easyinput>
|
|
|
<!-- 审批签字板 -->
|
|
|
<view v-else-if="'13' == elem.type">
|
|
|
- <button v-if="elem.defaultValue == ''" type="primary"
|
|
|
- @click="handleSignature(index)">签名</button>
|
|
|
+ <button v-if="elem.defaultValue == ''" type="primary" @click="handleSignature(index)">签名</button>
|
|
|
<view v-else class="signature_img">
|
|
|
- <img style="width: 100%;" mode="widthFix" @click="handleSignature(index)" :src="elem.defaultValueImg" :alt="elem.elementName + '签名'" />
|
|
|
+ <img style="width: 100%;" mode="widthFix" @click="handleSignature(index)" :src="config.baseUrlPre + elem.sealImgPath" :alt="elem.elementName + '签名'" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-else-if="typeof elem.defaultValue === 'string' && elem.defaultValue.substring(0, 7) == '/shares'" class="signature_img">
|
|
|
+ <view v-else-if="typeof elem.defaultValue === 'string' && elem.defaultValue.substring(0, 7) == '/shares'" class="signature_img">
|
|
|
<img style="width: 100%;" mode="widthFix" :src="config.baseUrlPre + elem.defaultValue" />
|
|
|
</view>
|
|
|
<text class="element_value" v-else>{{ elem.defaultValue }}</text>
|
|
|
@@ -70,6 +70,7 @@
|
|
|
<attachment-list :attachments="item.files"></attachment-list>
|
|
|
</uni-card>
|
|
|
</view>
|
|
|
+ <!-- 流转过程 -->
|
|
|
<view>
|
|
|
<uni-card>
|
|
|
<view class="flow_step_container">
|
|
|
@@ -140,6 +141,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="height: 5px; margin-top: 20px;"></view>
|
|
|
+ <!-- 签字版弹出层 -->
|
|
|
<uni-popup ref="signaturePopup" @maskClick="closeSignaturePopup">
|
|
|
<view class="signature_container" :class="isLandscape ? ' signature_container_landscape' : ''">
|
|
|
<view class="signature_content">
|
|
|
@@ -302,6 +304,7 @@ function initSignature() {
|
|
|
}, 100)
|
|
|
}
|
|
|
function onclickSignatureButton(event) {
|
|
|
+ console.log('onclickSignatureButton: ',event);
|
|
|
switch (event) {
|
|
|
case 'undo':
|
|
|
signatureRef.value.undo()
|
|
|
@@ -317,24 +320,36 @@ function onclickSignatureButton(event) {
|
|
|
$modal.msgError('签名不能为空!')
|
|
|
return
|
|
|
}
|
|
|
- wx.getFileSystemManager().readFile({
|
|
|
- filePath: res.tempFilePath,
|
|
|
- encoding: 'base64',
|
|
|
- success: fileData => {
|
|
|
- const _fileData = 'data:image/png;base64,' + fileData.data
|
|
|
- uploadSignatureBoardImg(userStore.user.useId, _fileData, formElements.value[signatureItemIndex.value].tableField)
|
|
|
- // uploadSignatureImg(res.tempFilePath)
|
|
|
- .then(({returnParams}) => {
|
|
|
- formElements.value[signatureItemIndex.value].defaultValue = returnParams.sealInsID
|
|
|
- formElements.value[signatureItemIndex.value].defaultValueImg = returnParams.path
|
|
|
- signatureItemIndex.value = -1
|
|
|
- signaturePopupShow.value = false
|
|
|
- signaturePopup.value.close()
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ // 判断上传文件是否是base64
|
|
|
+ if (res.tempFilePath.substring(0, 'data:image/png;base64,'.length) == 'data:image/png;base64,') {
|
|
|
+ const _fileData = res.tempFilePath
|
|
|
+ uploadSignatureBoardImg(userStore.user.useId, _fileData, formElements.value[signatureItemIndex.value].tableField)
|
|
|
+ .then(({returnParams}) => {
|
|
|
+ formElements.value[signatureItemIndex.value].defaultValue = returnParams.sealInsID
|
|
|
+ formElements.value[signatureItemIndex.value].sealImgPath = returnParams.path
|
|
|
+ signatureItemIndex.value = -1
|
|
|
+ signaturePopupShow.value = false
|
|
|
+ signaturePopup.value.close()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 转 base64
|
|
|
+ wx.getFileSystemManager().readFile({
|
|
|
+ filePath: res.tempFilePath,
|
|
|
+ encoding: 'base64',
|
|
|
+ success: fileData => {
|
|
|
+ const _fileData = 'data:image/png;base64,' + fileData.data
|
|
|
+ uploadSignatureBoardImg(userStore.user.useId, _fileData, formElements.value[signatureItemIndex.value].tableField)
|
|
|
+ .then(({returnParams}) => {
|
|
|
+ formElements.value[signatureItemIndex.value].defaultValue = returnParams.sealInsID
|
|
|
+ formElements.value[signatureItemIndex.value].sealImgPath = returnParams.path
|
|
|
+ signatureItemIndex.value = -1
|
|
|
+ signaturePopupShow.value = false
|
|
|
+ signaturePopup.value.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
console.log('formElements', formElements.value[signatureItemIndex.value]);
|
|
|
- // formElements.value[signatureItemIndex.value].defaultValueImg = res.tempFilePath
|
|
|
}
|
|
|
} as LSignatureToTempFilePathOptions)
|
|
|
break;
|
|
|
@@ -426,8 +441,8 @@ function cancelProcess() {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
-.uni-section {
|
|
|
+<style lang="scss" scoped>
|
|
|
+::v-deep .uni-section {
|
|
|
margin-left: -15px;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
@@ -480,9 +495,17 @@ function cancelProcess() {
|
|
|
.main_container {
|
|
|
min-height: 60vh;
|
|
|
|
|
|
- .uni-forms-item__label {
|
|
|
- font-size: 1rem;
|
|
|
- font-weight: 600;
|
|
|
+ ::v-deep .uni-forms {
|
|
|
+ .uni-forms-item__label {
|
|
|
+ font-size: 1rem !important;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ .uni-forms-item__content {
|
|
|
+ font-size: calc(14px + .5*(1rem - 16px)) !important;
|
|
|
+ .uni-easyinput__content-input {
|
|
|
+ font-size: calc(14px + .5*(1rem - 16px)) !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.element_value_container {
|
|
|
@@ -496,7 +519,7 @@ function cancelProcess() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .repeating_table_container {
|
|
|
+ ::v-deep .repeating_table_container {
|
|
|
width: 98vw;
|
|
|
|
|
|
.uni-table-scroll {
|
|
|
@@ -515,12 +538,15 @@ function cancelProcess() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .flow_step_container {
|
|
|
+ ::v-deep .flow_step_container {
|
|
|
min-height: 200px;
|
|
|
|
|
|
.u-steps {
|
|
|
.u-steps-item {
|
|
|
padding-bottom: 11px;
|
|
|
+ .u-text__value--tips {
|
|
|
+ font-size: calc(12px + .5*(1rem - 16px)) !important;
|
|
|
+ }
|
|
|
.redcontent {
|
|
|
.u-text__value--content {
|
|
|
color: #ff4500;
|
|
|
@@ -559,11 +585,12 @@ function cancelProcess() {
|
|
|
margin-top: 0 !important;
|
|
|
|
|
|
.u-text__value--content {
|
|
|
- font-size: 16px !important;
|
|
|
+ font-size: calc(16px + .5*(1rem - 16px)) !important;
|
|
|
}
|
|
|
|
|
|
.u-text__value--main {
|
|
|
- font-size: 16px !important;
|
|
|
+ font-size: calc(16px + .5*(1rem - 16px)) !important;
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -576,9 +603,11 @@ function cancelProcess() {
|
|
|
bottom: 10px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+::v-deep button {
|
|
|
+ font-size: calc(18px + .5*(1rem - 16px));
|
|
|
+}
|
|
|
.reject_button {
|
|
|
- .uni-card {
|
|
|
+ ::v-deep .uni-card {
|
|
|
background-color: #f5f5f5;
|
|
|
}
|
|
|
}
|
|
|
@@ -586,6 +615,11 @@ function cancelProcess() {
|
|
|
.remark_container {
|
|
|
.remark_content {
|
|
|
margin-bottom: 10px;
|
|
|
+ ::v-deep .uni-easyinput {
|
|
|
+ .uni-easyinput__content-textarea {
|
|
|
+ font-size: calc(14px + .5*(1rem - 16px)) !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|