fix : 修复细节
This commit is contained in:
@@ -60,3 +60,12 @@ export function addProcessDefinition(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getTypeOption() {
|
||||
return request({
|
||||
url: "/workflow/process/definition/type/option",
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ const loadInitFrom = () => {
|
||||
let design = {
|
||||
processDefinitionKey: 'pro' + getRandomId(),
|
||||
deploymentName: "未命名表单",
|
||||
processKey:'',
|
||||
// logo: {
|
||||
// icon: "el-icon-eleme",
|
||||
// background: "#1e90ff"
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
<template>
|
||||
<el-input v-model="processData.deploymentName" placeholder="请输入流程名称" />
|
||||
流程设置{{ processData.deploymentName }}
|
||||
<el-input v-model="processData.deploymentName" placeholder="请输入流程名称"/>
|
||||
<div v-if="!processData.processDefinitionKey">
|
||||
<el-select v-model="processData.processKey" placeholder="请选择流程环节">
|
||||
<el-option v-for="item in optionList" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{processData.processName}}
|
||||
</div>
|
||||
|
||||
流程设置{{ processData.deploymentName }}
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {useProcessStore} from '@/stores/processStore.js'
|
||||
import {computed, defineExpose} from "vue";
|
||||
import {getTypeOption} from "@/api/workflow/process-definition";
|
||||
|
||||
const processStore = useProcessStore()
|
||||
|
||||
const optionList = ref([])
|
||||
|
||||
const processData = computed(() => {
|
||||
return processStore.getDesign()
|
||||
})
|
||||
@@ -18,9 +31,17 @@ const validate = () => {
|
||||
return []
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
getTypeOption().then(res => {
|
||||
console.log(res)
|
||||
optionList.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
validate
|
||||
})
|
||||
init()
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user