This commit is contained in:
yangzhq68909 2025-06-15 10:44:00 +08:00
parent c5d9e0c8b9
commit b4b88b0cd7
9 changed files with 52 additions and 43 deletions

View File

@ -17,8 +17,8 @@ export default defineManifestConfig({
name: VITE_APP_TITLE,
appid: VITE_UNI_APPID,
description: '',
versionName: '2.0.0',
versionCode: '20250605',
versionName: '2.0.2',
versionCode: '20250615',
transformPx: false,
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
/* 5+App特有相关 */

View File

@ -62,7 +62,6 @@
if(ifH5.value){
return signH5.value.signValidator();
}else{
console.log(3435)
return signAPP.value.signValidator()
}
}

View File

@ -2,8 +2,8 @@
"name": "数智产销",
"appid": "__UNI__9F097F0",
"description": "",
"versionName": "2.0.0",
"versionCode": "20250605",
"versionName": "2.0.2",
"versionCode": "20250615",
"transformPx": false,
"app-plus": {
"usingComponents": true,

View File

@ -34,7 +34,6 @@
const queryData = ()=>{
queryUnData({id:props.formData.dataId}).then(res=>{
console.log(res)
info.value = res.result.records[0]
})
}

View File

@ -12,7 +12,7 @@
<wd-cell title="盖章位置" :value="info.gzwz" />
</wd-collapse-item>
<wd-collapse-item custom-body-style="padding:0;" title="盖章文件" name="item2">
<SinopecEsignPage :valiData="valiData" ref="sign" :procInsId="props.formData.procInsId" :path="props.formData.path" :fileName="info.wjdict" @stampSuccess="getStampSuccess"></SinopecEsignPage>
<SinopecEsignPage :valiData="valiData" ref="sign" :procInsId="props.formData.procInsId" :path="props.formData.path" :fileName="info.wjdict" @stampSuccess="getStampSuccess" ></SinopecEsignPage>
</wd-collapse-item>
</wd-collapse>
</template>
@ -37,7 +37,7 @@
const value = ref([]);
const info = ref({});
const valiData = ref({});
const ifEsign = ref(true);
const props = defineProps({
formData: {
type: Object,
@ -51,33 +51,26 @@
const queryData = ()=>{
queryUnData({id:props.formData.dataId}).then(res=>{
console.log(res)
info.value = res.result.records[0]
initValiData(info.value); //data by
let lj = info.value.wj.split("/");
let ljurl = lj[2] + '/' + lj[3];
info.value.wjdict = ljurl;
console.log(info.value)
})
}
const initValiData = (data)=>{
//data by
let name = userStore.userInfo.realname;
console.log(name)
// name = ''
let num = null;
if(data.lds){
let ldsMap = JSON.parse(data.lds);
if(ldsMap[name]) num = ldsMap[name]
}
console.log(data)
if(data.clds){
let cldsMap = JSON.parse(data.clds);
if(cldsMap[name]) num = cldsMap[name]
}
console.log(name)
console.log(num)
if(num){
valiData.value.flag = true;
valiData.value.num = num;
@ -87,9 +80,7 @@
const initValtime = ()=>{
processHistoryList(props.formData.procInsId).then(res=>{
console.log(res)
if (res.success) {
console.log(res.result.records)
valiData.value.time = res.result.records[0].startTime
} else {
console.log("加载失败")
@ -114,7 +105,8 @@
defineExpose({ //
signValidator
signValidator,
ifEsign
})
</script>
<style lang="scss" scoped>

View File

@ -1,18 +1,19 @@
<!-- component标签可以变换组件 -->
<template>
<view>
<component :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey"
v-if="asyncComponent" @getStampSuc="getStampSuccess"></component>
<component ref="comptRef" :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey" v-if="asyncComponent"
@getStampSuc="getStampSuccess"></component>
<view v-else>该模块暂未建立审批页面</view>
<wd-tabbar v-if="false">
<wd-tabbar-item></wd-tabbar-item>
</wd-tabbar>
</view>
</template>
<script setup lang="ts">
<script setup>
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue';
const compName = ref('');
const asyncComponent = ref(null);
const modules = import.meta.glob('/src/pages-bpm/**/*.vue');
const comptRef = ref();
defineOptions({
name: 'DynamicLink',
options: {
@ -40,18 +41,21 @@
})
// option
watch(() => props.path, (newVal) => {
if (newVal) {
if (newVal){
compName.value = newVal;
if (newVal.indexOf('index') == -1) {
compName.value = newVal + '/index'
}
}
}
//
const comp = modules[`/src/pages-bpm/${compName.value}.vue`]
if(!comp){
if(newVal.indexOf('index')==-1){
compName.value = newVal+'/index'
comp = modules[`/src/pages-bpm/${compName.value}.vue`]
}
}
comp().then((myModule) => {
asyncComponent.value = myModule.default
}).catch(() => {
})
}, {
deep: true,
@ -60,7 +64,11 @@
// #endif
});
const signValidator = ()=>{
//
return comptRef.value.signValidator()
}
const getStampSuccess = (val) => {
// this.$emit('getStampSuc', val)
// //<component>使vuex
@ -69,4 +77,12 @@
// esignTag: val
// });
}
</script>
defineExpose({ //
signValidator
})
</script>
<style lang="scss" scoped>
</style>

View File

@ -165,15 +165,17 @@
flag: false,
type: 0,
}
console.log(linkRef.value)
let data = await linkRef.value.signValidator()
if(data==false||data==true){
callData.flag = data;
callData.type = 1;
if(linkRef.value.ifEsign){
let data = await linkRef.value.signValidator()
if(data==false||data==true){
callData.flag = data;
callData.type = 1;
}else{
callData.flag = true;
}
}else{
callData.flag = true;
}
console.log(callData)
callback(callData);
}

View File

@ -536,7 +536,8 @@
{
"path": "unconventional/stamp",
"type": "page"
} {
},
{
"path": "zbkh/index",
"type": "page"
}

View File

@ -57,12 +57,12 @@ interface NavigateToOptions {
"/pages-process/myApplyProcess" |
"/pages-process/taskHandle" |
"/pages-bpm/carRental/index" |
"/pages-bpm/document/index" |
"/pages-bpm/leaveApplication/index" |
"/pages-bpm/unconventional/index" |
"/pages-bpm/unconventional/stamp"; "/pages-bpm/document/index" |
"/pages-bpm/leaveApplication/index" |
"/pages-bpm/zbkh/index";}
"/pages-bpm/unconventional/stamp" |
"/pages-bpm/zbkh/index";
}
interface RedirectToOptions extends NavigateToOptions {}
interface SwitchTabOptions {