优化流程流转记录

zzq
刘妍 2024-06-13 09:19:43 +08:00
parent 5dff39879b
commit 5fdf5b9da2
2 changed files with 77 additions and 80 deletions

View File

@ -7,13 +7,13 @@
<a-button type="primary" @click="closePage" class="ml-2" danger>关闭 </a-button> <a-button type="primary" @click="closePage" class="ml-2" danger>关闭 </a-button>
</div> </div>
<div :class="mapConfig?.isShowMap?'form-container':''"> <div :class="mapConfig?.isShowMap ? 'form-container' : ''">
<a-layout> <a-layout>
<a-layout> <a-layout>
<a-layout-content> <a-layout-content>
<a-tabs v-model:activeKey="activeName" @change="changeActive" type="card"> <a-tabs v-model:activeKey="activeName" @change="changeActive" type="card">
<a-tab-pane key="form" tab="表单信息" v-if="formVisble"> <a-tab-pane key="form" tab="表单信息" v-if="formVisble">
<div :class="mapConfig?.isShowMap?'form-container':''"> <div :class="mapConfig?.isShowMap ? 'form-container' : ''">
<FormViewer <FormViewer
ref="formBoxRef" ref="formBoxRef"
:formConfig="formConfig" :formConfig="formConfig"
@ -49,31 +49,33 @@
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="record" tab="流转记录" force-render> <a-tab-pane key="record" tab="流转记录" force-render>
<a-timeline> <div :style="'padding:10px 0 40px 0;overflow:auto; height:' + designerData.height">
<a-timeline-item <a-timeline>
v-for="(item, index) in designerData.logs" <a-timeline-item
:key="index" v-for="(item, index) in designerData.logs"
:color="item.type" :key="index"
> :color="item.type"
<div class="title">{{ item.time }}</div> >
<a-card hoverable size="small"> <div class="title">{{ item.time }}</div>
<div class="type-title">{{ item.name }}</div> <a-card hoverable size="small">
<div class="content"> <div class="type-title">{{ item.name }}</div>
<span <div class="content">
class="link" <span
v-for="(userName, index2) in item.userNames" class="link"
:key="index2" v-for="(userName, index2) in item.userNames"
>{{ userName }}</span :key="index2"
> >{{ userName }}</span
{{ item.des }} >
</div> {{ item.des }}
</a-card> </div>
</a-timeline-item> </a-card>
</a-timeline> </a-timeline-item>
</a-timeline>
</div>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-layout-content> </a-layout-content>
<a-layout-footer :style="footerStyle" > <a-layout-footer :style="footerStyle">
<a-tabs v-if="props.isRead == 0" v-model:activeKey="auditName"> <a-tabs v-if="props.isRead == 0" v-model:activeKey="auditName">
<a-tab-pane key="audit" :tab="auditTitleVal"> <a-tab-pane key="audit" :tab="auditTitleVal">
<div class="approval-column"> <div class="approval-column">
@ -123,8 +125,6 @@
/> />
</div> </div>
<!-- 节点记录信息 --> <!-- 节点记录信息 -->
<div class="info-box" v-if="designerData.nodeLogs.length > 0"> <div class="info-box" v-if="designerData.nodeLogs.length > 0">
<a-drawer v-model:open="infoOpen" class="custom-class" title="记录信息" placement="right"> <a-drawer v-model:open="infoOpen" class="custom-class" title="记录信息" placement="right">
@ -235,7 +235,6 @@
des: [{ required: true, message: '请填写审批意见', trigger: 'blur' }], des: [{ required: true, message: '请填写审批意见', trigger: 'blur' }],
}); });
if (props.type == 4) { if (props.type == 4) {
rules.value = {}; rules.value = {};
} }
@ -257,7 +256,7 @@
const designerData: designerDataType = reactive({ const designerData: designerDataType = reactive({
loading: false, loading: false,
xmlString: '', xmlString: '',
height: document.documentElement.clientHeight - 200.5 + 'px;', height: document.documentElement.clientHeight - 300.5 + 'px;',
midVisible: false, midVisible: false,
isCustmerTitle: false, isCustmerTitle: false,
nodeUsers: [], nodeUsers: [],
@ -290,19 +289,19 @@
const auditName = ref('audit'); const auditName = ref('audit');
const auditTitleVal = ref('审批栏'); const auditTitleVal = ref('审批栏');
const auditNameVal = ref('审批意见'); const auditNameVal = ref('审批意见');
const rejectOpen = ref(false); const rejectOpen = ref(false);
const footerStyle = ref({ const footerStyle = ref({
height:"220px", height: '220px',
width:mapConfig.value.isShowMap ? '100%':'60%', width: mapConfig.value.isShowMap ? '100%' : '60%',
overFlow:"auto", overFlow: 'auto',
color: '#fff', color: '#fff',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
zIndex:"9999999999", zIndex: '9999999999',
padding:"0px 100px", padding: '0px 100px',
position:"fixed", position: 'fixed',
bottom:"0px", bottom: '0px',
left:"0px" left: '0px',
}) });
function changeActive(activeKey) { function changeActive(activeKey) {
if (activeKey == 'flow') { if (activeKey == 'flow') {
@ -350,14 +349,14 @@
currentNode = wfData.find((t) => t.type == 'bpmn:StartEvent'); currentNode = wfData.find((t) => t.type == 'bpmn:StartEvent');
mapConfig.value = currentNode.mapConfig; mapConfig.value = currentNode.mapConfig;
footerStyle.value.width = mapConfig.value?.isShowMap ? "60%":"100%" footerStyle.value.width = mapConfig.value?.isShowMap ? '60%' : '100%';
if(mapConfig.value?.isShowMap){} if (mapConfig.value?.isShowMap) {
}
} else { } else {
currentNode = auditNode; currentNode = auditNode;
let currentMapNode = wfData.find((t) => t.type == 'bpmn:StartEvent'); let currentMapNode = wfData.find((t) => t.type == 'bpmn:StartEvent');
mapConfig.value = currentMapNode.mapConfig; mapConfig.value = currentMapNode.mapConfig;
footerStyle.value.width = mapConfig.value?.isShowMap ? "60%":"100%" footerStyle.value.width = mapConfig.value?.isShowMap ? '60%' : '100%';
} }
if (currentNode.authFields.length > 0) { if (currentNode.authFields.length > 0) {
formVisble.value = true; formVisble.value = true;
@ -470,7 +469,7 @@
for (let key in nodeMap) { for (let key in nodeMap) {
nodeMap[key] = nodeMap[key].filter((t: { userIds: string | any[] }) => t.userIds.length > 0); nodeMap[key] = nodeMap[key].filter((t: { userIds: string | any[] }) => t.userIds.length > 0);
} }
logs.reverse();
logs.forEach( logs.forEach(
(log: { (log: {
unitId: string; unitId: string;
@ -754,13 +753,11 @@
} }
} }
async function handlerShowGeomtrys(currentNode) {
let info = currentNode.authFields?.find((item, index) => {
async function handlerShowGeomtrys(currentNode){ return item.component == 'MapGeom';
let info = currentNode.authFields?.find((item,index)=>{ });
return item.component == "MapGeom" let layer: string = '';
})
let layer:string="";
// let layer:string="drone_shp_data"; // let layer:string="drone_shp_data";
if (info) { if (info) {
@ -772,7 +769,7 @@
} }
let geomfiledValue = info.field.toLowerCase(); let geomfiledValue = info.field.toLowerCase();
let gids = ""; let gids = '';
try { try {
await formBoxRef.value.getForm().then((res) => { await formBoxRef.value.getForm().then((res) => {
@ -818,9 +815,7 @@
} }
} }
function onMapboxLoad() {
function onMapboxLoad(){
handlerShowGeomtrys(designerData.formCurrentNode); handlerShowGeomtrys(designerData.formCurrentNode);
} }
// //

View File

@ -57,27 +57,29 @@
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="record" tab="流转记录" force-render> <a-tab-pane key="record" tab="流转记录" force-render>
<a-timeline> <div :style="'padding:10px 0 40px 0;overflow:auto; height:' + designerData.height">
<a-timeline-item <a-timeline>
v-for="(item, index) in designerData.logs" <a-timeline-item
:key="index" v-for="(item, index) in designerData.logs"
:color="item.type" :key="index"
> :color="item.type"
<div class="title">{{ item.time }}</div> >
<a-card hoverable size="small"> <div class="title">{{ item.time }}</div>
<div class="type-title">{{ item.name }}</div> <a-card hoverable size="small">
<div class="content"> <div class="type-title">{{ item.name }}</div>
<span <div class="content">
class="link" <span
v-for="(userName, index2) in item.userNames" class="link"
:key="index2" v-for="(userName, index2) in item.userNames"
>{{ userName }}</span :key="index2"
> >{{ userName }}</span
{{ item.des }} >
</div> {{ item.des }}
</a-card> </div>
</a-timeline-item> </a-card>
</a-timeline> </a-timeline-item>
</a-timeline>
</div>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-layout-content> </a-layout-content>
@ -173,7 +175,7 @@
const designerData: designerDataType = reactive({ const designerData: designerDataType = reactive({
loading: false, loading: false,
xmlString: '', xmlString: '',
height: document.documentElement.clientHeight - 200.5 + 'px;', height: document.documentElement.clientHeight - 300.5 + 'px;',
midVisible: false, midVisible: false,
isCustmerTitle: false, isCustmerTitle: false,
nodeUsers: [], nodeUsers: [],
@ -343,7 +345,7 @@
for (let key in nodeMap) { for (let key in nodeMap) {
nodeMap[key] = nodeMap[key].filter((t: { userIds: string | any[] }) => t.userIds.length > 0); nodeMap[key] = nodeMap[key].filter((t: { userIds: string | any[] }) => t.userIds.length > 0);
} }
logs.reverse();
logs.forEach( logs.forEach(
(log: { (log: {
unitId: string; unitId: string;