diff --git a/src/assets/styles/theme.scss b/src/assets/styles/theme.scss
index 69d0ce24a60825a7f92cd41f8dcb2b2d1922180d..b76af6b24fe2f9093b8c06e79214c4bea3bc985b 100644
--- a/src/assets/styles/theme.scss
+++ b/src/assets/styles/theme.scss
@@ -16,6 +16,7 @@ body[theme='dark'] {
--flow-instance-hover-color: #1F2329;
--flow-instance-shadow: 0 4px 16px 0 rgba(253, 254, 255, 0.1);
--flow-node-default-over-color: #25303E;
+ --flow-node-boder-default-over: #314265;
--flow-node-success-over-color: #1F312A;
--flow-node-error-over-color: #332127;
}
@@ -37,7 +38,8 @@ body[theme='light'] {
--o-flow-code-border: rgb(223,229,239);
--flow-instance-hover-color: #FDFEFF;
--flow-instance-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
- --flow-node-default-over-color: #EEF3FE;
- --flow-node-success-over-color: #E6F6E9;
- --flow-node-error-over-color: #F8E7E7;
+ --flow-node-default-over-color: #edf2fd;
+ --flow-node-boder-default-over: #c7d6f5;
+ --flow-node-success-over-color: #e6f6e9;
+ --flow-node-error-over-color: #f8e7e7;
}
diff --git a/src/views/app/index.vue b/src/views/app/index.vue
index 44eb2f6a3bedb075567e8503b063bc47a64b409d..241d585e76f3639ee4f9152215bdebfcb0a7351e 100644
--- a/src/views/app/index.vue
+++ b/src/views/app/index.vue
@@ -51,7 +51,11 @@
@@ -159,6 +167,10 @@ const handleQueryAppList = (payload?: any) => {
};
const handleFavorite = (e, item) => {
+ // 未发布的不可收藏
+ if (!item.published) {
+ return;
+ }
e.stopPropagation();
api
.changeSingleAppCollect({
@@ -225,16 +237,40 @@ onMounted(() => {
handleQueryAppList();
});
-
diff --git a/src/views/createapp/components/workFlowConfig/workFlowDialog.vue b/src/views/createapp/components/workFlowConfig/workFlowDialog.vue
index e5a6c5573a7fe16f454deadc683e8c39ed687551..8564ce75bf488b53065e357c14fbac6b61280bc5 100644
--- a/src/views/createapp/components/workFlowConfig/workFlowDialog.vue
+++ b/src/views/createapp/components/workFlowConfig/workFlowDialog.vue
@@ -17,7 +17,7 @@
clearable
>
-
+
@@ -42,7 +42,7 @@ import { ref } from 'vue';
import { api } from 'src/apis';
import { useRoute } from 'vue-router';
import { v4 as uuidv4 } from 'uuid';
-import { ElMessage } from 'element-plus';
+import { ElMessage, FormInstance } from 'element-plus';
const workFlowDiaVisible = ref(true);
const route = useRoute();
const props = defineProps({
@@ -66,74 +66,78 @@ const workFlowRules = ref({
const onCancel = () => {
emits('handleClose');
};
-const handleSubmit = () => {
- // 创建工作流
- const appId = route.query?.appId;
- // 创建使用生成的flowId
- const flowId = uuidv4();
- // 调用接口新建工作流
- api
- .createOrUpdateFlowTopology(
- {
- appId: appId,
- flowId,
- topologyCheck: false,
- },
- {
- flow: {
- name: workFlowData.value.name,
- description: workFlowData.value.description,
- enable: true,
- editable: true,
- // 创建工作流时,默认包含开始结束固定两节点,这两个节点非后端返回,其apiId与serviceId不为空即可
- nodes: [
- {
- apiId: 'startId',
- name: '开始',
- serviceId: 'startService',
- type: 'start',
- description: 'startNode',
- editable: false,
+const handleSubmit = (formEl: FormInstance | undefined) => {
+ // 校验必填项是否填写
+ formEl?.validate(valid => {
+ if (valid) {
+ // 创建工作流
+ const appId = route.query?.appId;
+ // 创建使用生成的flowId
+ const flowId = uuidv4();
+ // 调用接口新建工作流
+ api
+ .createOrUpdateFlowTopology(
+ {
+ appId: appId,
+ flowId,
+ topologyCheck: false,
+ },
+ {
+ flow: {
+ name: workFlowData.value.name,
+ description: workFlowData.value.description,
enable: true,
- nodeId: 'node1',
- position: {
- x: 100,
- y: 160,
- },
+ editable: true,
+ // 创建工作流时,默认包含开始结束固定两节点,这两个节点非后端返回,其apiId与serviceId不为空即可
+ nodes: [
+ {
+ apiId: 'startId',
+ name: '开始',
+ serviceId: 'startService',
+ type: 'start',
+ description: 'startNode',
+ editable: false,
+ enable: true,
+ nodeId: 'node1',
+ position: {
+ x: 100,
+ y: 160,
+ },
+ },
+ {
+ apiId: 'endId',
+ name: '结束',
+ serviceId: 'endService',
+ type: 'end',
+ description: 'endNode',
+ editable: false,
+ enable: true,
+ nodeId: 'node2',
+ position: {
+ x: 600,
+ y: 160,
+ },
+ },
+ ],
+ // 初始创建的工作流边为空
+ edges: [],
},
- {
- apiId: 'endId',
- name: '结束',
- serviceId: 'endService',
- type: 'end',
- description: 'endNode',
- editable: false,
- enable: true,
- nodeId: 'node2',
- position: {
- x: 600,
- y: 160,
- },
+ focusPoint: {
+ x: 800,
+ y: 800,
},
- ],
- // 初始创建的工作流边为空
- edges: [
- ],
- },
- focusPoint: {
- x: 800,
- y: 800,
- },
- },
- )
- .then(res => {
- if (res[1]?.result?.flow) {
- ElMessage.success('创建成功');
- // 将创建成功后的flow对象传给父组件
- emits('createFlowId', {...res[1].result.flow});
- onCancel();
- }
- });
+ },
+ )
+ .then(res => {
+ if (res[1]?.result?.flow) {
+ ElMessage.success('创建成功');
+ // 将创建成功后的flow对象传给父组件
+ emits('createFlowId', { ...res[1].result.flow });
+ onCancel();
+ }
+ });
+ }
+ });
};