Merge pull request 'fix : 修复bug' (#27) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/27
This commit is contained in:
@@ -25,7 +25,7 @@ steps:
|
||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||
#- npm config set registry https://registry.npm.taobao.org
|
||||
#- set NODE_OPTIONS=--openssl-legacy-provider
|
||||
# - npm install
|
||||
- npm install
|
||||
- npm run build
|
||||
- ls /app/build/$DRONE_REPO_NAME/
|
||||
- echo $NODE_MODULES_PATH
|
||||
|
||||
@@ -318,3 +318,8 @@ const handleCurrentChange = (val) => {
|
||||
};
|
||||
getList();
|
||||
</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 AddBranchNode from './nodes/AddBranchNode.vue'
|
||||
|
||||
import { debounce } from 'lodash'
|
||||
import {debounce} from 'lodash'
|
||||
import {defineExpose, h, render, ref} from 'vue'
|
||||
import DefaultProps from "./DefaultNodeProps"
|
||||
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();
|
||||
updateParentId(id, parentNode.id)
|
||||
@@ -322,7 +322,7 @@ const insertNode =debounce( (type, parentNode) => {
|
||||
break;
|
||||
}
|
||||
init()
|
||||
},1000)
|
||||
}, 1000)
|
||||
/**
|
||||
* 更新父id
|
||||
* @param newId
|
||||
@@ -475,7 +475,7 @@ const addBranchNode = (node) => {
|
||||
}
|
||||
|
||||
//删除当前节点
|
||||
const delNode = (node) => {
|
||||
const delNode = debounce((node) => {
|
||||
//获取该节点的父节点
|
||||
let parentNode = processStore.nodeMap.get(node.parentId)
|
||||
if (parentNode) {
|
||||
@@ -488,8 +488,7 @@ const delNode = (node) => {
|
||||
} else {
|
||||
ElMessage.warning("出现错误,找不到上级节点😥")
|
||||
}
|
||||
}
|
||||
|
||||
}, 1000)
|
||||
|
||||
/**
|
||||
* 从dom中删除
|
||||
@@ -700,9 +699,8 @@ defineExpose({
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
border-top: 2px solid #000000;
|
||||
|
||||
border-bottom: 2px solid #000000;
|
||||
|
||||
//border-radius: 40px;
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
@@ -745,9 +743,11 @@ defineExpose({
|
||||
.add-branch-btn {
|
||||
position: absolute;
|
||||
width: 80px;
|
||||
|
||||
.el-button {
|
||||
border-color: #000000;
|
||||
}
|
||||
|
||||
.add-branch-btn-el {
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
|
||||
@@ -51,8 +51,9 @@
|
||||
import InsertButton from '../common/InsertButton.vue'
|
||||
import Ellipsis from '../common/Ellipsis.vue'
|
||||
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";
|
||||
|
||||
const emit = defineEmits()
|
||||
|
||||
const props = defineProps({
|
||||
@@ -112,7 +113,7 @@ const content = computed(() => {
|
||||
return String(confitions).replaceAll(',', (props.config.props.groupsType === 'AND' ? ' 且 ' : ' 或 '))
|
||||
})
|
||||
|
||||
const designState = computed(()=>{
|
||||
const designState = computed(() => {
|
||||
return props.mode === 'design'
|
||||
})
|
||||
|
||||
@@ -146,23 +147,23 @@ const getOrdinaryConditionContent = (subCondition) => {
|
||||
//校验数据配置的合法性
|
||||
const validate = (err) => {
|
||||
const defineProps = props.config.props
|
||||
if (defineProps.groups.length <= 0){
|
||||
if (defineProps.groups.length <= 0) {
|
||||
showError.value = true
|
||||
errorInfo.value = '请设置分支条件'
|
||||
err.push(`${defineProps.config.name} 未设置条件`)
|
||||
}else {
|
||||
} else {
|
||||
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
|
||||
errorInfo.value = `请设置条件组${groupNames.value[i]}内的条件`
|
||||
err.push(`条件 ${props.config.name} 条件组${groupNames.value[i]}内未设置条件`)
|
||||
break
|
||||
}else {
|
||||
} else {
|
||||
let conditions = defineProps.groups[i].conditions
|
||||
for (let ci = 0; ci < conditions.length; ci++) {
|
||||
let subc = conditions[ci]
|
||||
showError.value = subc.value.length === 0;
|
||||
if (showError.value){
|
||||
if (showError.value) {
|
||||
errorInfo.value = `请完善条件组${groupNames.value[i]}内的${subc.title}条件`
|
||||
err.push(`条件 ${props.config.name} 条件组${groupNames.value[i]}内${subc.title}条件未完善`)
|
||||
return false
|
||||
@@ -248,14 +249,22 @@ defineExpose({
|
||||
|
||||
.node-body-main-header {
|
||||
padding: 10px 0px 5px;
|
||||
font-size: xx-small;
|
||||
position: relative;
|
||||
font-size: 14px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
color: #15bca3;
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
width: 125px;
|
||||
color: #2E7CF0;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #2E7CF0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.level {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<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 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"/>
|
||||
</el-icon>
|
||||
<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/>
|
||||
</el-icon>
|
||||
</div>
|
||||
@@ -234,7 +234,8 @@ const init = () => {
|
||||
.name {
|
||||
//height: 14px;
|
||||
//width: 150px;
|
||||
display: inline-block
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user