|
@@ -12,7 +12,7 @@ const route = useRoute()
|
|
|
// 缓存 start
|
|
|
import { EVENT_ENUM, EVENT_BUS, cacheTriggerFunc } from '@/utils/cacheHelper'
|
|
|
const flowStore = useFlowStore()
|
|
|
-const { flowName, flowProcessId, processForm, modelContent } = storeToRefs(flowStore)
|
|
|
+const { flowName, flowProcessId } = storeToRefs(flowStore)
|
|
|
const cacheLoading = ref(false)
|
|
|
const cacheLoadingNum = ref(600)
|
|
|
const cacheLoadingFr = 1000
|
|
@@ -179,12 +179,25 @@ const getGroupList = async () => {
|
|
|
}
|
|
|
|
|
|
const initBaseicInfEv = item => {
|
|
|
+ // item = {
|
|
|
+ // processId: '1728240012964925441',
|
|
|
+ // processForm:yu
|
|
|
+ // '[{"type":"input","field":"userName","title":"输入框","info":"","$required":false,"_fc_drag_tag":"input","hidden":false,"display":true}]',
|
|
|
+ // processKey: '003key',
|
|
|
+ // processName: '003名称',
|
|
|
+ // processIcon: 'https://lf3-ea.bytetos.com/obj/goofy/ee/approval/approval-admin/image/iconLib/v5/cart',
|
|
|
+ // categoryId: '1725778939021541378',
|
|
|
+ // remark: '003说明',
|
|
|
+ // useScope: 1,
|
|
|
+ // processActorList: [{ actorId: '1705067852272607233', actorName: 'lanceJiang', actorType: 0 }],
|
|
|
+ // processPermissionList: [{ userId: '1705067852272607233', userName: 'lanceJiang', operateApproval: 0, operateOwner: 0, operateData: 0 }]
|
|
|
+ // }
|
|
|
const { processForm, modelContent, ...rest } = item
|
|
|
flowInfo.value = rest
|
|
|
flowStore.setProcessForm(processForm)
|
|
|
flowStore.setModelContent(modelContent)
|
|
|
- updateRemoteCache()
|
|
|
- flowStore.setFlowProcessId(queryObj.value.id)
|
|
|
+ // updateRemoteCache()
|
|
|
+ flowProcessId.value = queryObj.value.id // 赋值流程id
|
|
|
if (item.useScope === 1) {
|
|
|
nodeRoleList.value = item.processActorList.map(item => {
|
|
|
return {
|
|
@@ -211,16 +224,9 @@ const initBaseicInfEv = item => {
|
|
|
// 更新申请信息缓存
|
|
|
const updateRemoteCache = async () => {
|
|
|
try {
|
|
|
- const commonParam = {
|
|
|
- processForm: processForm.value,
|
|
|
- modelContent: modelContent.value,
|
|
|
- ...flowInfo.value
|
|
|
- }
|
|
|
- const params = flowProcessId.value ? { processId: flowProcessId.value, ...commonParam } : commonParam
|
|
|
- console.error(params, 'params=======')
|
|
|
- // return
|
|
|
+ const params = flowProcessId.value ? { ...flowInfo.value, processId: flowProcessId.value } : flowInfo.value
|
|
|
const data = await process.progressCreateApi(params)
|
|
|
- flowStore.setFlowProcessId(data)
|
|
|
+ flowProcessId.value = data
|
|
|
Object.keys(flowInfo.value).forEach(key => {
|
|
|
flowStore.setKeysBasicInfo(key, flowInfo.value[key])
|
|
|
})
|
|
@@ -233,7 +239,7 @@ const updateRemoteCache = async () => {
|
|
|
const handleRemoteCacheRefresh = () => {
|
|
|
cacheIndex.value && clearTimeout(cacheIndex.value)
|
|
|
cacheIndex.value = setTimeout(() => {
|
|
|
- updateRemoteCache()
|
|
|
+ // updateRemoteCache()
|
|
|
}, cacheUpdateFr)
|
|
|
}
|
|
|
|
|
@@ -274,6 +280,7 @@ const getCurrentProcessDetailEv = id => {
|
|
|
|
|
|
// icon图标点击保存
|
|
|
const chooseIconEv = item => {
|
|
|
+ // flowStore.setKeysBasicInfo('processIcon', item)
|
|
|
flowInfo.value.processIcon = item
|
|
|
visiblePopover.value = !visiblePopover.value
|
|
|
}
|
|
@@ -340,13 +347,13 @@ defineExpose({
|
|
|
|
|
|
<template>
|
|
|
<div class="base-info">
|
|
|
- <div style="font-size: 18px; position: absolute; left: 10px; top: 20px; z-index: 9999; color: red">
|
|
|
+ <div v-if="false" style="font-size: 18px; position: absolute; left: 10px; top: 20px; z-index: 9999; color: red">
|
|
|
{{ cacheLoadingNum }}秒之后开启自动缓存...
|
|
|
</div>
|
|
|
|
|
|
<div class="base-info-panel" style="position: relative">
|
|
|
<div style="font-size: 18px; position: absolute; right: 10px; top: 20px; z-index: 9999">
|
|
|
- <el-button type="primary" @click="updateRemoteCache">暂存</el-button>
|
|
|
+ <el-button type="primary" @click="updateRemoteCache">下一步</el-button>
|
|
|
</div>
|
|
|
<el-form ref="formRef" :model="flowInfo" :rules="rules" label-position="top">
|
|
|
<el-form-item label="图标" prop="processIcon">
|
|
@@ -397,7 +404,7 @@ defineExpose({
|
|
|
closable
|
|
|
style="margin-right: 8px"
|
|
|
@close="delRole(index, 'nodeRoleList')"
|
|
|
- >{{ role.name }}</el-tag
|
|
|
+ >{{ role.name }}</el-tag
|
|
|
>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -413,7 +420,7 @@ defineExpose({
|
|
|
closable
|
|
|
style="margin-right: 8px"
|
|
|
@close="delRole(index, 'nodeRoleManageList')"
|
|
|
- >{{ role.name }}</el-tag
|
|
|
+ >{{ role.name }}</el-tag
|
|
|
>
|
|
|
</div>
|
|
|
</el-form-item>
|