fix : 修复bug
This commit is contained in:
@@ -25,7 +25,7 @@ steps:
|
|||||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||||
#- npm config set registry https://registry.npm.taobao.org
|
#- npm config set registry https://registry.npm.taobao.org
|
||||||
#- set NODE_OPTIONS=--openssl-legacy-provider
|
#- set NODE_OPTIONS=--openssl-legacy-provider
|
||||||
# - npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
- ls /app/build/$DRONE_REPO_NAME/
|
- ls /app/build/$DRONE_REPO_NAME/
|
||||||
- echo $NODE_MODULES_PATH
|
- echo $NODE_MODULES_PATH
|
||||||
|
|||||||
@@ -318,3 +318,8 @@ const handleCurrentChange = (val) => {
|
|||||||
};
|
};
|
||||||
getList();
|
getList();
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
:deep(.el-breadcrumb__item){
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import MergeNode from './nodes/MergeNode.vue'
|
|||||||
import DelayNode from './nodes/DelayNode.vue'
|
import DelayNode from './nodes/DelayNode.vue'
|
||||||
import AddBranchNode from './nodes/AddBranchNode.vue'
|
import AddBranchNode from './nodes/AddBranchNode.vue'
|
||||||
|
|
||||||
import { debounce } from 'lodash'
|
import {debounce} from 'lodash'
|
||||||
import {defineExpose, h, render, ref} from 'vue'
|
import {defineExpose, h, render, ref} from 'vue'
|
||||||
import DefaultProps from "./DefaultNodeProps"
|
import DefaultProps from "./DefaultNodeProps"
|
||||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
@@ -290,7 +290,7 @@ const selectNode = (node) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//处理节点插入逻辑
|
//处理节点插入逻辑
|
||||||
const insertNode =debounce( (type, parentNode) => {
|
const insertNode = debounce((type, parentNode) => {
|
||||||
//插入新节点
|
//插入新节点
|
||||||
let id = getRandomId();
|
let id = getRandomId();
|
||||||
updateParentId(id, parentNode.id)
|
updateParentId(id, parentNode.id)
|
||||||
@@ -322,7 +322,7 @@ const insertNode =debounce( (type, parentNode) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
init()
|
init()
|
||||||
},1000)
|
}, 1000)
|
||||||
/**
|
/**
|
||||||
* 更新父id
|
* 更新父id
|
||||||
* @param newId
|
* @param newId
|
||||||
@@ -475,7 +475,7 @@ const addBranchNode = (node) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//删除当前节点
|
//删除当前节点
|
||||||
const delNode = (node) => {
|
const delNode = debounce((node) => {
|
||||||
//获取该节点的父节点
|
//获取该节点的父节点
|
||||||
let parentNode = processStore.nodeMap.get(node.parentId)
|
let parentNode = processStore.nodeMap.get(node.parentId)
|
||||||
if (parentNode) {
|
if (parentNode) {
|
||||||
@@ -488,8 +488,7 @@ const delNode = (node) => {
|
|||||||
} else {
|
} else {
|
||||||
ElMessage.warning("出现错误,找不到上级节点😥")
|
ElMessage.warning("出现错误,找不到上级节点😥")
|
||||||
}
|
}
|
||||||
}
|
}, 1000)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从dom中删除
|
* 从dom中删除
|
||||||
@@ -700,9 +699,8 @@ defineExpose({
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-top: 2px solid #000000;
|
border-top: 2px solid #000000;
|
||||||
|
|
||||||
border-bottom: 2px solid #000000;
|
border-bottom: 2px solid #000000;
|
||||||
|
//border-radius: 40px;
|
||||||
&:before {
|
&:before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -745,9 +743,11 @@ defineExpose({
|
|||||||
.add-branch-btn {
|
.add-branch-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
border-color: #000000;
|
border-color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-branch-btn-el {
|
.add-branch-btn-el {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -51,8 +51,9 @@
|
|||||||
import InsertButton from '../common/InsertButton.vue'
|
import InsertButton from '../common/InsertButton.vue'
|
||||||
import Ellipsis from '../common/Ellipsis.vue'
|
import Ellipsis from '../common/Ellipsis.vue'
|
||||||
import {ValueType} from '@/views/workflow/form/ComponentsConfigExport.js'
|
import {ValueType} from '@/views/workflow/form/ComponentsConfigExport.js'
|
||||||
import {ArrowRightBold,ArrowLeftBold,CopyDocument,CloseBold,Warning} from '@element-plus/icons-vue'
|
import {ArrowRightBold, ArrowLeftBold, CopyDocument, CloseBold, Warning} from '@element-plus/icons-vue'
|
||||||
import {defineProps, defineEmits, defineExpose} from "vue";
|
import {defineProps, defineEmits, defineExpose} from "vue";
|
||||||
|
|
||||||
const emit = defineEmits()
|
const emit = defineEmits()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -112,7 +113,7 @@ const content = computed(() => {
|
|||||||
return String(confitions).replaceAll(',', (props.config.props.groupsType === 'AND' ? ' 且 ' : ' 或 '))
|
return String(confitions).replaceAll(',', (props.config.props.groupsType === 'AND' ? ' 且 ' : ' 或 '))
|
||||||
})
|
})
|
||||||
|
|
||||||
const designState = computed(()=>{
|
const designState = computed(() => {
|
||||||
return props.mode === 'design'
|
return props.mode === 'design'
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -146,23 +147,23 @@ const getOrdinaryConditionContent = (subCondition) => {
|
|||||||
//校验数据配置的合法性
|
//校验数据配置的合法性
|
||||||
const validate = (err) => {
|
const validate = (err) => {
|
||||||
const defineProps = props.config.props
|
const defineProps = props.config.props
|
||||||
if (defineProps.groups.length <= 0){
|
if (defineProps.groups.length <= 0) {
|
||||||
showError.value = true
|
showError.value = true
|
||||||
errorInfo.value = '请设置分支条件'
|
errorInfo.value = '请设置分支条件'
|
||||||
err.push(`${defineProps.config.name} 未设置条件`)
|
err.push(`${defineProps.config.name} 未设置条件`)
|
||||||
}else {
|
} else {
|
||||||
for (let i = 0; i < defineProps.groups.length; i++) {
|
for (let i = 0; i < defineProps.groups.length; i++) {
|
||||||
if (defineProps.groups[i].cids.length === 0){
|
if (defineProps.groups[i].cids.length === 0) {
|
||||||
showError.value = true
|
showError.value = true
|
||||||
errorInfo.value = `请设置条件组${groupNames.value[i]}内的条件`
|
errorInfo.value = `请设置条件组${groupNames.value[i]}内的条件`
|
||||||
err.push(`条件 ${props.config.name} 条件组${groupNames.value[i]}内未设置条件`)
|
err.push(`条件 ${props.config.name} 条件组${groupNames.value[i]}内未设置条件`)
|
||||||
break
|
break
|
||||||
}else {
|
} else {
|
||||||
let conditions = defineProps.groups[i].conditions
|
let conditions = defineProps.groups[i].conditions
|
||||||
for (let ci = 0; ci < conditions.length; ci++) {
|
for (let ci = 0; ci < conditions.length; ci++) {
|
||||||
let subc = conditions[ci]
|
let subc = conditions[ci]
|
||||||
showError.value = subc.value.length === 0;
|
showError.value = subc.value.length === 0;
|
||||||
if (showError.value){
|
if (showError.value) {
|
||||||
errorInfo.value = `请完善条件组${groupNames.value[i]}内的${subc.title}条件`
|
errorInfo.value = `请完善条件组${groupNames.value[i]}内的${subc.title}条件`
|
||||||
err.push(`条件 ${props.config.name} 条件组${groupNames.value[i]}内${subc.title}条件未完善`)
|
err.push(`条件 ${props.config.name} 条件组${groupNames.value[i]}内${subc.title}条件未完善`)
|
||||||
return false
|
return false
|
||||||
@@ -248,14 +249,22 @@ defineExpose({
|
|||||||
|
|
||||||
.node-body-main-header {
|
.node-body-main-header {
|
||||||
padding: 10px 0px 5px;
|
padding: 10px 0px 5px;
|
||||||
font-size: xx-small;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
font-size: 14px !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
color: #15bca3;
|
|
||||||
display: inline-block;
|
|
||||||
height: 14px;
|
|
||||||
width: 125px;
|
width: 125px;
|
||||||
|
color: #2E7CF0;
|
||||||
|
height: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
color: #2E7CF0;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.level {
|
.level {
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
<div :class="{'node': true, 'root': isRoot || !show, 'node-error-state': showError}">
|
<div :class="{'node': true, 'root': isRoot || !show, 'node-error-state': showError}">
|
||||||
<div v-if="show" @click="emit('selected')" :class="{'node-body': true, 'error': showError}">
|
<div v-if="show" @click="emit('selected')" :class="{'node-body': true, 'error': showError}">
|
||||||
<div class="node-body-header" :style="{'background-color': headerBgc}">
|
<div class="node-body-header" :style="{'background-color': headerBgc}">
|
||||||
<el-icon v-if="headerIcon" size="15">
|
<el-icon v-if="headerIcon" size="20">
|
||||||
<component :is="headerIcon"/>
|
<component :is="headerIcon"/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<ellipsis class="name" hover-tip :content="title"/>
|
<ellipsis class="name" hover-tip :content="title"/>
|
||||||
<el-icon v-if="!isRoot && designState" size="15" style="float:right;" @click="emit('delNode')">
|
<el-icon v-if="!isRoot && designState" size="20" style="float:right;" @click="emit('delNode')">
|
||||||
<Close/>
|
<Close/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
@@ -234,7 +234,8 @@ const init = () => {
|
|||||||
.name {
|
.name {
|
||||||
//height: 14px;
|
//height: 14px;
|
||||||
//width: 150px;
|
//width: 150px;
|
||||||
display: inline-block
|
display: inline-block;
|
||||||
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user