|
@@ -8,7 +8,7 @@ import process from '@/api/flow/process'
|
|
|
// 缓存 start
|
|
|
import { EVENT_ENUM, EVENT_BUS, cacheTriggerFunc } from '@/utils/cacheHelper'
|
|
|
const flowStore = useFlowStore()
|
|
|
-const { flowName, flowProcessId, processKey, categoryId } = storeToRefs(flowStore)
|
|
|
+const { flowName, flowProcessId } = storeToRefs(flowStore)
|
|
|
const cacheLoading = ref(false)
|
|
|
const cacheLoadingNum = ref(600)
|
|
|
const cacheLoadingFr = 1000
|
|
@@ -22,7 +22,6 @@ const useSelectRef = ref(null)
|
|
|
const nodeRoleList = ref([])
|
|
|
const nodeRoleManageList = ref([])
|
|
|
const currentNode = ref('nodeRoleList')
|
|
|
-const processId = ref('') // 流程定义ID
|
|
|
const formRef = ref()
|
|
|
const options = ref([])
|
|
|
const flowInfo = ref({
|
|
@@ -148,11 +147,12 @@ const getGroupList = async () => {
|
|
|
// 更新申请信息缓存
|
|
|
const updateRemoteCache = async () => {
|
|
|
try {
|
|
|
- const params = processId.value ? { ...flowInfo.value, processId: processId.value } : flowInfo.value
|
|
|
- const res = await process.progressCreateApi(params)
|
|
|
- flowProcessId.value = processId.value = res
|
|
|
- processKey.value = flowInfo.value.processKey
|
|
|
- categoryId.value = flowInfo.value.categoryId
|
|
|
+ const params = flowProcessId.value ? { ...flowInfo.value, processId: flowProcessId.value } : flowInfo.value
|
|
|
+ const data = await process.progressCreateApi(params)
|
|
|
+ flowProcessId.value = data
|
|
|
+ Object.keys(flowInfo.value).forEach(key => {
|
|
|
+ flowStore.setKeysBasicInfo(key, flowInfo.value[key])
|
|
|
+ })
|
|
|
console.log('updateRemoteCache 实际调用接口, params = ', params, new Date().getTime())
|
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
@@ -216,7 +216,7 @@ watch(
|
|
|
flowBaseInfoWatcher,
|
|
|
(newVal, oldVal) => {
|
|
|
console.log('第二步:执行同步emit方法 ------', newVal, oldVal)
|
|
|
- // cacheTriggerFunc()
|
|
|
+ cacheTriggerFunc()
|
|
|
},
|
|
|
{ deep: true }
|
|
|
)
|
|
@@ -253,8 +253,8 @@ defineExpose({
|
|
|
{{ cacheLoadingNum }}秒之后开启自动缓存...
|
|
|
</div>
|
|
|
|
|
|
- <div class="base-info-panel" style="position: relative;">
|
|
|
- <div style="font-size: 18px; position: absolute; right: 10px; top: 20px; z-index: 9999;">
|
|
|
+ <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>
|
|
|
</div>
|
|
|
<el-form ref="formRef" :model="flowInfo" :rules="rules" label-position="top">
|