fix : 修复bug
This commit is contained in:
@@ -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