Merge pull request 'fix : 修复页面细节' (#252) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/252
This commit is contained in:
2024-05-30 14:51:22 +00:00
6 changed files with 36 additions and 19 deletions

View File

@@ -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: {

View File

@@ -39,6 +39,7 @@ const searchConfig = reactive([
props: {
placeholder: '请选择生成时间',
clearable: true,
valueFormat: 'YYYY-MM-DD',
},
colProps: {}
}, {

View File

@@ -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'
})
})
})
}

View File

@@ -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([])

View File

@@ -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()

View File

@@ -172,7 +172,7 @@ const getList = async () => {
const handleAdd = () => {
router.push({
path: '/workflow/process/edit',
path: '/workflow/process/add',
})
}