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', name: 'processAdd',
component: () => import('@/views/workflow/process/ProcessEdit.vue'), component: () => import('@/views/workflow/process/ProcessEdit.vue'),
meta: { meta: {

View File

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

View File

@@ -58,6 +58,10 @@ import ProcessDesign from '@/views/workflow/process/ProcessDesign.vue'
import ProcessSetting from "./ProcessSetting.vue"; import ProcessSetting from "./ProcessSetting.vue";
import Ellipsis from '@/views/workflow/process/common/Ellipsis.vue' import Ellipsis from '@/views/workflow/process/common/Ellipsis.vue'
import {getCurrentInstance} from '@vue/runtime-core'; import {getCurrentInstance} from '@vue/runtime-core';
import {useTagsView} from '@/stores/tagsview.js'
import {ElMessageBox,ElNotification} from "element-plus";
const tagsViewStore = useTagsView()
let {proxy} = getCurrentInstance(); let {proxy} = getCurrentInstance();
import {Loading, WarningFilled, CircleCheckFilled} from '@element-plus/icons-vue' 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' import {useProcessStore} from '@/stores/processStore.js'
const processStore = useProcessStore() const processStore = useProcessStore()
import {ElMessage, ElMessageBox} from "element-plus";
const processDesign = ref() const processDesign = ref()
const visible = ref(false) const visible = ref(false)
@@ -196,14 +199,17 @@ const getRandomId = () => {
const getProcessInfo = async () => { const getProcessInfo = async () => {
getProcessDefinitionInfo(params.deploymentId).then(res => { getProcessDefinitionInfo(params.deploymentId).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) { if (res.code === 1000) {
processStore.setDesign(res.data) processStore.setDesign(res.data)
visible.value = true visible.value = true
nextTick(() => { nextTick(() => {
processDesign.value.initRender() processDesign.value.initRender()
}) })
} else {
ElMessage.error(res.msg)
} }
}) })
} }
@@ -311,14 +317,21 @@ const doPublish = () => {
} }
console.log(template) console.log(template)
addProcessDefinition(template).then(res => { addProcessDefinition(template).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) { if (res.code === 1000) {
ElMessage.success(res.msg) tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push("/workflow/process") router.push("/workflow/process")
} else {
ElMessage.error(res.msg)
} }
}).catch(err => { }).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 { ElNotification} from "element-plus";
import {getTypeOption, getFromPerm} from "@/api/workflow/process-definition"; import {getTypeOption, getFromPerm} from "@/api/workflow/process-definition";
const router = useRouter()
const path = reactive(router.currentRoute.value.path)
const processStore = useProcessStore() const processStore = useProcessStore()
const optionList = ref([]) const optionList = ref([])

View File

@@ -47,6 +47,7 @@
</template> </template>
<script setup> <script setup>
import {debounce} from 'lodash'
import {Plus, Clock, SetUp, Operation, Share, Promotion, Coordinate} from '@element-plus/icons-vue' import {Plus, Clock, SetUp, Operation, Share, Promotion, Coordinate} from '@element-plus/icons-vue'
const emit = defineEmits(['insertNode']) const emit = defineEmits(['insertNode'])
const visible = ref(false) const visible = ref(false)
@@ -62,27 +63,27 @@ const nullBlockClick = (e) => {
disVisible() disVisible()
} }
} }
const addApprovalNode = () => { const addApprovalNode = debounce(() => {
emit('insertNode', "APPROVAL") emit('insertNode', "APPROVAL")
disVisible() disVisible()
} })
const addCcNode = () => { const addCcNode = debounce(() => {
emit('insertNode', "CC") emit('insertNode', "CC")
disVisible() disVisible()
} })
const addDelayNode = () => { const addDelayNode = debounce(() => {
emit('insertNode', "DELAY") emit('insertNode', "DELAY")
disVisible() disVisible()
} })
const addConditionsNode = () => { const addConditionsNode = debounce(() => {
emit('insertNode', "CONDITIONS") emit('insertNode', "CONDITIONS")
disVisible() disVisible()
} })
const addConcurrentsNode = () => { const addConcurrentsNode = debounce(() => {
emit('insertNode', "CONCURRENTS") emit('insertNode', "CONCURRENTS")
disVisible() disVisible()
} })
const addTriggerNode = () => { const addTriggerNode = () => {
emit('insertNode', "TRIGGER") emit('insertNode', "TRIGGER")
disVisible() disVisible()

View File

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