From c0aec3c33ea7df53253088b449f47d01bbd39c38 Mon Sep 17 00:00:00 2001
From: clay <20932067@zju.edu.cn>
Date: Tue, 12 Mar 2024 11:41:27 +0800
Subject: [PATCH] =?UTF-8?q?feat=20:=20=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=8D=95?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/workflow/process/ProcessEdit.vue | 78 +++++++++++--------
src/views/workflow/process/ProcessSetting.vue | 30 +++++++
2 files changed, 74 insertions(+), 34 deletions(-)
create mode 100644 src/views/workflow/process/ProcessSetting.vue
diff --git a/src/views/workflow/process/ProcessEdit.vue b/src/views/workflow/process/ProcessEdit.vue
index 4182bbb..b38c7b3 100644
--- a/src/views/workflow/process/ProcessEdit.vue
+++ b/src/views/workflow/process/ProcessEdit.vue
@@ -1,16 +1,20 @@
-
表单
-
流程
-
发布
-
-
-
+
流程设置
+
表单
+
流程
+
发布
+
-
-
-
-
@@ -33,7 +37,9 @@
-
+
+
+
@@ -49,35 +55,39 @@
import {getProcessDefinitionInfo, addProcessDefinition} from "@/api/workflow/process-definition.js";
import ProcessDesign from './ProcessDesign.vue'
import FormDesign from '../form/FormDesign.vue'
+import ProcessSetting from "./ProcessSetting.vue";
import Ellipsis from './common/Ellipsis.vue'
import {getCurrentInstance} from '@vue/runtime-core';
+
let {proxy} = getCurrentInstance();
-import {Loading,WarningFilled,CircleCheckFilled} from '@element-plus/icons-vue'
-import {ref,computed} from 'vue'
+import {Loading, WarningFilled, CircleCheckFilled} from '@element-plus/icons-vue'
+import {ref, computed} from 'vue'
+
const router = useRouter()
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)
const timer = ref(null)
-const validComponents = ref(['formDesign','processDesign'])
+const validComponents = ref(['processSetting', 'formDesign', 'processDesign'])
// const activeSelect = ref('formDesign')
-const activeSelect = ref('processDesign')
+const activeSelect = ref('processSetting')
const validVisible = ref(false)
const validStep = ref(0)
const validResult = ref({})
const validOptions = ref([
- {title: '基础信息', description: '', icon: '', status: ''},
- {title: '审批表单', description: '', icon: '', status: ''},
- // {title: '审批流程', description: '', icon: '', status: ''},
- // {title: '扩展设置', description: '', icon: '', status: ''}
- ])
+ {title: '基础信息', description: '', icon: '', status: ''},
+ {title: '审批表单', description: '', icon: '', status: ''},
+ {title: '审批流程', description: '', icon: '', status: ''},
+ // {title: '扩展设置', description: '', icon: '', status: ''}
+])
-const errTitle = computed(()=>{
+const errTitle = computed(() => {
if (validResult.finished && !validResult.success) {
return validResult.title + ` (${validResult.errs.length}项错误) 😥`
}
@@ -85,7 +95,7 @@ const errTitle = computed(()=>{
})
-const validIcon = computed(()=>{
+const validIcon = computed(() => {
if (!validResult.finished) {
return Loading
} else if (validResult.success) {
@@ -97,9 +107,9 @@ const validIcon = computed(()=>{
const init = () => {
let deploymentId = params.deploymentId
- if (deploymentId === undefined){
+ if (deploymentId === undefined) {
loadInitFrom()
- }else {
+ } else {
getProcessInfo()
}
}
@@ -145,7 +155,7 @@ const loadInitFrom = () => {
}
processStore.setDesign(design)
visible.value = true
- nextTick(()=>{
+ nextTick(() => {
processDesign.value.initRender()
})
}
@@ -166,7 +176,7 @@ const getProcessInfo = async () => {
if (res.code === 1000) {
processStore.setDesign(res.data)
visible.value = true
- nextTick(()=>{
+ nextTick(() => {
processDesign.value.initRender()
})
} else {
@@ -203,10 +213,10 @@ const getDefaultValidErr = () => {
return '请检查基础设置项';
case 1:
return '请检查审批表单相关设置'
- // case 2:
- // return '请检查审批流程,查看对应标注节点错误信息'
- // case 3:
- // return '请检查扩展设置'
+ // case 2:
+ // return '请检查审批流程,查看对应标注节点错误信息'
+ // case 3:
+ // return '请检查扩展设置'
default:
return '未知错误'
}
@@ -271,17 +281,17 @@ const doPublish = () => {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- let design = processStore.getDesign()
+ let design = processStore.getDesign()
console.log(design)
let template = {
...design
}
console.log(template)
addProcessDefinition(template).then(res => {
- if (res.code === 1000){
- ElMessage.success(res.msg)
+ if (res.code === 1000) {
+ ElMessage.success(res.msg)
// this.$router.push("/formsPanel")
- }else {
+ } else {
ElMessage.error(res.msg)
}
}).catch(err => {
diff --git a/src/views/workflow/process/ProcessSetting.vue b/src/views/workflow/process/ProcessSetting.vue
new file mode 100644
index 0000000..ec0c8fe
--- /dev/null
+++ b/src/views/workflow/process/ProcessSetting.vue
@@ -0,0 +1,30 @@
+
+
+流程设置{{ processData.deploymentName }}
+
+
+
+
+
\ No newline at end of file