update:审核预览

This commit is contained in:
2025-11-14 15:07:33 +08:00
parent 218196a9e1
commit 703027d0ca
3 changed files with 48 additions and 21 deletions

View File

@@ -23,6 +23,18 @@
--margin-huge: 30px;
}
.spdm-approve-preview {
display: flex;
height: 100%;
.spdm-content {
flex: 1;
}
.spdm-default {
margin-left: 10px;
width: 353px;
}
}
// 为了解决子应用定位样式错位
// .el-scrollbar {
// position: static !important;

View File

@@ -18,27 +18,47 @@
</template>
<script setup lang="ts">
import { onMounted } from 'vue';
import { onMounted, watch } from 'vue';
import WujieVue from "wujie-vue3";
import Cookies from 'js-cookie';
import { SPDM_URL } from '../config'
import { SPDM_URL } from '../config';
const emit = defineEmits(['load']);
const { bus } = WujieVue;
const USER_INFO_DATA = Cookies.get('cid_user_info');
const USER_ID = Cookies.get('cid_user_id');
const TENANT_ID = Cookies.get('cid_tenant_id');
const TOKEN = Cookies.get('cid_token');
bus.$on('APPROVAL_PREVIEW_LOADED', () => {
emit('load')
});
interface Props {
path: string;
processId: string;
}
const props = withDefaults(defineProps<Props>(), {
path: '',
processId: '',
});
const url = ref('');
onMounted(() => {
url.value = `${SPDM_URL}${props.path}`
setUrlFun();
});
watch(() => props.processId, () => {
setUrlFun();
});
const setUrlFun = () => {
url.value = `${SPDM_URL}/spdm/approvalPreview?processId=${props.processId}`
}
</script>
<style lang="scss" scoped>
.wujie-content {
height: 100%;
}
</style>

View File

@@ -60,16 +60,16 @@
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination>
<!-- 右侧抽屉-->
<el-drawer v-model="rightDrawerVisible" direction="rtl" size="80%">
<el-drawer v-model="rightDrawerVisible" direction="rtl" :size="processRreview ? '80%' : '400px'">
<template #header>
<h3>{{ currentData?.processName }}</h3>
</template>
<template #default>
<div class="box-content">
<div class="spdm-content">
<SpdmView path="/spdm/competenceCenter/condition" />
<div class="spdm-approve-preview">
<div v-show="processRreview" class="spdm-content">
<SpdmView :processId="processInstanceId" @load="previewLoadFun" />
</div>
<div class="default">
<div class="spdm-default">
<el-card class="box-card">
<form-render
@addLayoutOneItem="addLayoutOneItem"
@@ -120,6 +120,8 @@ const rightDrawerVisible = ref(false);
const showSearch = ref(true);
const loading = ref(false);
const queryRef = ref();
const processInstanceId = ref('');
const processRreview = ref(false);
const currentData = ref();
const state: BasicTableProps = reactive<BasicTableProps>({
@@ -140,6 +142,7 @@ const deal = (row: any) => {
currentData.value = row;
queryTask(row.taskId, false).then((res) => {
currentOpenFlowForm.value = res.data.formItems;
processInstanceId.value = res.data.processInstanceId;
rightDrawerVisible.value = true;
});
};
@@ -202,16 +205,8 @@ const formValue = computed(() => {
}
return obj;
});
</script>
<style lang="scss" scoped>
.box-content {
display: flex;
.spdm-content {
flex: 1;
}
.default {
width: 353px;
}
const previewLoadFun = () => {
processRreview.value = true;
}
</style>
</script>