fix : 修复页面细节
This commit is contained in:
@@ -80,7 +80,7 @@ const router = createRouter({
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/workflow/process/edit',
|
||||
path: '/workflow/process/add',
|
||||
name: 'processAdd',
|
||||
component: () => import('@/views/workflow/process/ProcessEdit.vue'),
|
||||
meta: {
|
||||
|
||||
@@ -39,6 +39,7 @@ const searchConfig = reactive([
|
||||
props: {
|
||||
placeholder: '请选择生成时间',
|
||||
clearable: true,
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
colProps: {}
|
||||
}, {
|
||||
|
||||
@@ -58,6 +58,10 @@ import ProcessDesign from '@/views/workflow/process/ProcessDesign.vue'
|
||||
import ProcessSetting from "./ProcessSetting.vue";
|
||||
import Ellipsis from '@/views/workflow/process/common/Ellipsis.vue'
|
||||
import {getCurrentInstance} from '@vue/runtime-core';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {ElMessageBox,ElNotification} from "element-plus";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
|
||||
let {proxy} = getCurrentInstance();
|
||||
import {Loading, WarningFilled, CircleCheckFilled} from '@element-plus/icons-vue'
|
||||
@@ -67,7 +71,6 @@ const params = reactive(router.currentRoute.value.params)
|
||||
import {useProcessStore} from '@/stores/processStore.js'
|
||||
|
||||
const processStore = useProcessStore()
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
|
||||
const processDesign = ref()
|
||||
const visible = ref(false)
|
||||
@@ -196,14 +199,17 @@ const getRandomId = () => {
|
||||
|
||||
const getProcessInfo = async () => {
|
||||
getProcessDefinitionInfo(params.deploymentId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
processStore.setDesign(res.data)
|
||||
visible.value = true
|
||||
nextTick(() => {
|
||||
processDesign.value.initRender()
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -311,14 +317,21 @@ const doPublish = () => {
|
||||
}
|
||||
console.log(template)
|
||||
addProcessDefinition(template).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push("/workflow/process")
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error(err)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: err,
|
||||
type:'error'
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import {computed, defineExpose} from "vue";
|
||||
import { ElNotification} from "element-plus";
|
||||
import {getTypeOption, getFromPerm} from "@/api/workflow/process-definition";
|
||||
|
||||
const router = useRouter()
|
||||
const path = reactive(router.currentRoute.value.path)
|
||||
const processStore = useProcessStore()
|
||||
|
||||
const optionList = ref([])
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {debounce} from 'lodash'
|
||||
import {Plus, Clock, SetUp, Operation, Share, Promotion, Coordinate} from '@element-plus/icons-vue'
|
||||
const emit = defineEmits(['insertNode'])
|
||||
const visible = ref(false)
|
||||
@@ -62,27 +63,27 @@ const nullBlockClick = (e) => {
|
||||
disVisible()
|
||||
}
|
||||
}
|
||||
const addApprovalNode = () => {
|
||||
const addApprovalNode = debounce(() => {
|
||||
emit('insertNode', "APPROVAL")
|
||||
disVisible()
|
||||
}
|
||||
})
|
||||
|
||||
const addCcNode = () => {
|
||||
const addCcNode = debounce(() => {
|
||||
emit('insertNode', "CC")
|
||||
disVisible()
|
||||
}
|
||||
const addDelayNode = () => {
|
||||
})
|
||||
const addDelayNode = debounce(() => {
|
||||
emit('insertNode', "DELAY")
|
||||
disVisible()
|
||||
}
|
||||
const addConditionsNode = () => {
|
||||
})
|
||||
const addConditionsNode = debounce(() => {
|
||||
emit('insertNode', "CONDITIONS")
|
||||
disVisible()
|
||||
}
|
||||
const addConcurrentsNode = () => {
|
||||
})
|
||||
const addConcurrentsNode = debounce(() => {
|
||||
emit('insertNode', "CONCURRENTS")
|
||||
disVisible()
|
||||
}
|
||||
})
|
||||
const addTriggerNode = () => {
|
||||
emit('insertNode', "TRIGGER")
|
||||
disVisible()
|
||||
|
||||
@@ -172,7 +172,7 @@ const getList = async () => {
|
||||
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
path: '/workflow/process/edit',
|
||||
path: '/workflow/process/add',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user