|
|
@ -6,14 +6,14 @@ |
|
|
:icon="Close" size="small" circle type="info" plain |
|
|
:icon="Close" size="small" circle type="info" plain |
|
|
style="float: right;margin-top: -22px;margin-right: -22px" @click="delRole" /> |
|
|
style="float: right;margin-top: -22px;margin-right: -22px" @click="delRole" /> |
|
|
<el-tree-select |
|
|
<el-tree-select |
|
|
v-model="selectedChildTable1" style="width: 290px;margin-bottom: -1px" :data="childTableList" |
|
|
v-model="selectedChildTable1" style="width: 270px;margin-bottom: -1px" :data="childTableList" |
|
|
placeholder="请选择关联表单子表" check-strictly :render-after-expand="false" filterable |
|
|
placeholder="请选择关联表单子表" check-strictly :render-after-expand="false" filterable |
|
|
@change="selectedChildTableChanged" /> |
|
|
@change="selectedChildTableChanged" /> |
|
|
<el-popover placement="top-end" title="" :width="200" trigger="hover" content="若【设置筛选条件】,则仅填充满足筛选条件的子表数据"> |
|
|
<el-popover placement="top-end" title="" :width="200" trigger="hover" content="若【设置筛选条件】,则仅填充满足筛选条件的子表数据"> |
|
|
<template #reference> |
|
|
<template #reference> |
|
|
<el-button |
|
|
<el-button |
|
|
v-if="selectedChildTable1 !== '' && filterCondition1.conditionHtml === ''" |
|
|
v-if="selectedChildTable1 !== '' && filterCondition1.conditionHtml === ''" |
|
|
style="padding-top: 8px; width: 290px;margin-left: 85px;height: 30px;" type="primary" plain |
|
|
style="padding-top: 8px; width: 270px;margin-left: 85px;height: 30px;" type="primary" plain |
|
|
append-to-body="true" modal="true" @click="filterConditionDialogFlag = true">设置筛选条件(选填)</el-button> |
|
|
append-to-body="true" modal="true" @click="filterConditionDialogFlag = true">设置筛选条件(选填)</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-popover> |
|
|
</el-popover> |
|
|
@ -24,20 +24,24 @@ |
|
|
<el-divider v-if="selectedChildTable1 !== ''" /> |
|
|
<el-divider v-if="selectedChildTable1 !== ''" /> |
|
|
<div |
|
|
<div |
|
|
v-if="selectedChildTable1 !== ''" |
|
|
v-if="selectedChildTable1 !== ''" |
|
|
style="background-color: #F0F0F0;padding: 12px;border-radius: 10px;padding-left:45px;margin-bottom:20px;padding-bottom: 1px;margin-right: 10px;"><!-- #F5F7FA #E6F3FE #F0F0F0 #F5F7FA--> |
|
|
style="background-color: #F0F0F0;border-radius: 5px;padding-bottom: 1px;margin-right: 10px;"><!-- #F5F7FA #E6F3FE #F0F0F0 #F5F7FA--> |
|
|
<template v-for="(item, index) in childRoles" :key="childRoles[index].id"> |
|
|
<template v-for="(item, index) in childRoles" :key="childRoles[index].id"> |
|
|
{{ item }} |
|
|
<div style="display: flex;margin-bottom: 10px;"> |
|
|
<!-- <AssociatedFormsFillRole |
|
|
<el-tree-select |
|
|
v-model:left-value="controlData.control.fillRoles.master[index].leftValue" |
|
|
v-model="leftValue1" style="width: 270px;" :data="leftTreeSource" placeholder="关联表单主表字段" |
|
|
v-model:right-value="controlData.control.fillRoles.master[index].rightValue" |
|
|
check-strictly :render-after-expand="false" filterable @change="leftChanged" /> |
|
|
:left-tree-source = "asfasfMasterFieldTree" |
|
|
<span style="margin-left: 8px;margin-right: 8px;">的值填充到</span> |
|
|
:right-tree-source = "associatedFormsCurrentFormFieldTree" |
|
|
<el-tree-select |
|
|
:current-key="controlData.control.fillRoles.master[index].id" |
|
|
v-model="rightValue1" style="width: 270px;" :data="rightTreeSource" |
|
|
@del-role = "delRole" |
|
|
check-strictly :render-after-expand="false" placeholder="当前表单字段" filterable @change="rightChanged" /> |
|
|
> |
|
|
<Delete style="width: 22px; height: 22px;cursor: pointer; color: #50A6FF; display: block; float:right;margin-left: 35px;margin-top: 4px;" @click="delChildRole(item)" /> |
|
|
</AssociatedFormsFillRole> --> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<el-link type="primary" @click="addChildRole">十 添加规则</el-link> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -107,10 +111,9 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { Close } from '@element-plus/icons-vue' |
|
|
import { Close } from '@element-plus/icons-vue' |
|
|
import AssociatedFormsTinyaceFillRoleFilterCondition from '@/widget/associatedforms/associatedFormsTinyaceFillRoleFilterCondition.vue' |
|
|
import AssociatedFormsTinyaceFillRoleFilterCondition from '@/widget/associatedforms/associatedFormsTinyaceFillRoleFilterCondition.vue' |
|
|
|
|
|
import { v4 as uuidv4 } from "uuid"; |
|
|
let emit = defineEmits(["delRole", "update:selectedChildTable",]); |
|
|
let emit = defineEmits(["delRole", "update:selectedChildTable",]); |
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
|
|
|
|
|
|
orgAndManTree: { |
|
|
orgAndManTree: { |
|
|
type: Object, |
|
|
type: Object, |
|
|
default() { |
|
|
default() { |
|
|
@ -123,14 +126,12 @@ const props = defineProps({ |
|
|
return {} |
|
|
return {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
associatedFormsCurrentFormFieldTree: { |
|
|
associatedFormsCurrentFormFieldTree: { |
|
|
type: Object, |
|
|
type: Object, |
|
|
default() { |
|
|
default() { |
|
|
return {} |
|
|
return {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
filterNode: { |
|
|
filterNode: { |
|
|
type: Object, |
|
|
type: Object, |
|
|
default() { |
|
|
default() { |
|
|
@ -167,7 +168,6 @@ const props = defineProps({ |
|
|
return {} |
|
|
return {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
currentKey: { |
|
|
currentKey: { |
|
|
type: String, |
|
|
type: String, |
|
|
default() { |
|
|
default() { |
|
|
@ -191,7 +191,8 @@ const filterConditionDialogFlag = ref(false) |
|
|
const selectedChildTable1 = ref() |
|
|
const selectedChildTable1 = ref() |
|
|
selectedChildTable1.value = props.selectedChildTable |
|
|
selectedChildTable1.value = props.selectedChildTable |
|
|
|
|
|
|
|
|
|
|
|
const childRoles1 = ref() |
|
|
|
|
|
childRoles1.value = props.childRoles |
|
|
|
|
|
|
|
|
const filterCondition1 = ref() |
|
|
const filterCondition1 = ref() |
|
|
filterCondition1.value = props.filterCondition |
|
|
filterCondition1.value = props.filterCondition |
|
|
@ -216,7 +217,23 @@ function selectedChildTableChanged() { |
|
|
emit('update:selectedChildTable', selectedChildTable1) |
|
|
emit('update:selectedChildTable', selectedChildTable1) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function delChildRole(item: any) { |
|
|
|
|
|
let id = item.id |
|
|
|
|
|
for (var i = 0; i < childRoles1.value.length; i++) { |
|
|
|
|
|
if(childRoles1.value[i].id===id){ |
|
|
|
|
|
childRoles1.value.splice(i, 1); |
|
|
|
|
|
i--; // 如果不减,将漏掉一个元素 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
function addChildRole(){ |
|
|
|
|
|
let onlyNumber = uuidv4().replaceAll('-','').toString(); //获取唯一编码 |
|
|
|
|
|
childRoles1.value.push({ |
|
|
|
|
|
leftValue: '', |
|
|
|
|
|
rightValue: '', |
|
|
|
|
|
id: onlyNumber, |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
function delRole() { |
|
|
function delRole() { |
|
|
emit('delRole', props.currentKey) |
|
|
emit('delRole', props.currentKey) |
|
|
} |
|
|
} |
|
|
|