24282 пре 11 месеци
родитељ
комит
45f9c1bafe

+ 2 - 2
jy-ui/src/api/flow/execute.ts

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
-import {PageType, StrAnyObj} from '@/typings'
+import { PageType, StrAnyObj } from '@/typings'
 
 // 查询待办任务列表
 export function getToDoPageApi(params: StrAnyObj): Promise<PageType<StrAnyObj>> {
-    return request.get('/flow/execute/todoPage', params)
+  return request.get('/flow/execute/todoPage', params)
 }

+ 6 - 21
jy-ui/src/views/flow/definition/design.vue

@@ -46,15 +46,8 @@ const value = ref({})
 const xmlString = ref('')
 const skipConditionShow = ref(true)
 
-const props = withDefaults(
-  defineProps<{
-    modelValue: boolean
-    disabled?: boolean
-  }>(),
-  {
-    disabled: false
-  }
-)
+const disabled = ref(false)
+const props = withDefaults(defineProps<{ modelValue: boolean }>(), {})
 
 const computedModelValue = computed({
   get() {
@@ -147,7 +140,7 @@ function initDndPanel() {
  * 初始化控制面板
  */
 function initControl() {
-  if (!props.disabled) {
+  if (!disabled.value) {
     // 控制面板-清空画布
     lf.value.extension.control.addItem({
       iconClass: 'lf-control-clear',
@@ -170,7 +163,7 @@ function initControl() {
         let xmlString = logicFlowJsonToFlowXml(value.value)
         saveXmlApi({ xmlString, id: definitionId.value }).then(() => {
           ElMessage.success('保存成功')
-          close()
+          visible.value = false
         })
       }
     })
@@ -268,17 +261,9 @@ function initEvent() {
   })
 }
 
-/** 关闭按钮 */
-function close() {
-  const obj = {
-    path: '/flow/definition',
-    query: { t: Date.now(), pageNum: proxy.$route.query.pageNum }
-  }
-  visible.value = false
-}
-
-function open(id?: string) {
+function open(id?: string, openDisabled: boolean) {
   visible.value = true
+  disabled.value = openDisabled
   nextTick(() => {
     use()
     lf.value = new LogicFlow({ container: containerRef.value, grid: true })

+ 1 - 1
jy-ui/src/views/flow/definition/index.vue

@@ -116,7 +116,7 @@ const columnConfig: ColumnConfigType[] = [
       {
         text: '流程设计',
         click(row) {
-          designVisibleRef.value?.open(row.id)
+          designVisibleRef.value?.open(row.id, row.isPublish === 1)
         }
       },
       {

+ 2 - 2
jy-ui/src/views/flow/taskTodo/index.vue

@@ -6,7 +6,7 @@ import { ColumnConfigType } from '@/components/ATable/type'
 import { StrAnyObj, StrAnyObjArr } from '@/typings'
 import { useHandleData } from '@/utils/useHandleData'
 import { getPageApi, getDetailApi, addApi, editApi, deleteApi } from '@/api/system/config'
-import {getToDoPageApi} from "@/api/flow/execute";
+import { getToDoPageApi } from '@/api/flow/execute'
 
 const queryRef = ref<InstanceType<typeof AForm>>()
 const formRef = ref<InstanceType<typeof AForm>>()
@@ -57,7 +57,7 @@ const toolbarConfig: ToolbarConfigType[] = [
       queryRef.value?.resetFields()
       getPage()
     }
-  },
+  }
   // {
   //   common: 'add',
   //   permissions: 'sysConfig:add',