|
|
@ -1,12 +1,12 @@ |
|
|
<!-- eslint-disable vue/no-v-html --> |
|
|
<!-- eslint-disable vue/no-v-html --> |
|
|
<template> |
|
|
<template> |
|
|
<div |
|
|
<div |
|
|
style="background-color: #F0F0F0;padding: 12px;border-radius: 5px;padding-left:45px;margin-bottom:20px;margin-right:11px;min-height: 65px;padding-top: 16px;padding-bottom:16px;color: black;"><!-- {{asfasfChildTableFields}} --> |
|
|
style="background-color: #F0F0F0;padding: 12px;border-radius: 5px;padding-left:45px;margin-bottom:20px;margin-right:11px;min-height: 65px;padding-top: 16px;padding-bottom:16px;color: black;"> |
|
|
<el-button |
|
|
<el-button |
|
|
: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: 270px;margin-bottom: -1px" :data="childTableList1" |
|
|
v-model="selectedChildTable1" style="width: 270px;margin-bottom: -1px" :data="childTableList" :disabled="isDisabled" |
|
|
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="若【设置筛选条件】,则仅填充满足筛选条件的子表数据"> |
|
|
@ -25,16 +25,16 @@ |
|
|
<div |
|
|
<div |
|
|
v-if="selectedChildTable1 !== ''" |
|
|
v-if="selectedChildTable1 !== ''" |
|
|
style="background-color: #F0F0F0;border-radius: 5px;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 childRoles1" :key="childRoles1[index].id"> |
|
|
<div style="display: flex;margin-bottom: 10px;"><!-- {{ asfasfChildTableFields[0].children.filter((item :any)=>{return item.id==selectedChildTable}) }} --> |
|
|
<div style="display: flex;margin-bottom: 10px;"> |
|
|
<el-tree-select |
|
|
<el-tree-select |
|
|
v-model="leftValue1" style="width: 270px;" :data="asfasfChildTableFields[0].children.filter((item :any)=>{return item.id==selectedChildTable})" placeholder="关联表单子表字段" |
|
|
v-model="childRoles1[index].leftValue" style="width: 270px;" :data="asfasfChildTableFields[0].children.filter((item :any)=>{return item.id==selectedChildTable})" placeholder="关联表单子表字段" |
|
|
check-strictly :render-after-expand="false" filterable @change="leftChanged" /> |
|
|
check-strictly :render-after-expand="false" filterable /> |
|
|
<span style="margin-left: 8px;margin-right: 8px;">的值填充到</span> |
|
|
<span style="margin-left: 8px;margin-right: 8px;">的值填充到</span> |
|
|
<el-tree-select |
|
|
<el-tree-select |
|
|
v-model="rightValue1" style="width: 270px;" :data="rightTreeSource" |
|
|
v-model="childRoles1[index].rightValue" style="width: 270px;" :data="rightTreeSource" |
|
|
check-strictly :render-after-expand="false" placeholder="当前表单子表字段" filterable @change="rightChanged" /> |
|
|
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)" /> |
|
|
<Delete v-if="childRoles1.length>1" style="width: 22px; height: 22px;cursor: pointer; color: #50A6FF; display: block; float:right;margin-left: 35px;margin-top: 4px;" @click="delChildRole(item)" /> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -112,7 +112,7 @@ |
|
|
import { Close } from '@element-plus/icons-vue' |
|
|
import { Close } from '@element-plus/icons-vue' |
|
|
import AsfTmFillRoleFilterCondi from '@/widget/associatedforms/asfTmFillRoleFilterCondi.vue' |
|
|
import AsfTmFillRoleFilterCondi from '@/widget/associatedforms/asfTmFillRoleFilterCondi.vue' |
|
|
import { v4 as uuidv4 } from "uuid"; |
|
|
import { v4 as uuidv4 } from "uuid"; |
|
|
let emit = defineEmits(["delRole", "update:selectedChildTable","update:childTableList"]); |
|
|
let emit = defineEmits(["delRole", "update:selectedChildTable","update:childTableList","selectedOrDelChildRole"]); |
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
asfasfChildTableFields: { |
|
|
asfasfChildTableFields: { |
|
|
type: Object, |
|
|
type: Object, |
|
|
@ -197,8 +197,6 @@ const filterConditionDialogFlag = ref(false) |
|
|
const selectedChildTable1 = ref() |
|
|
const selectedChildTable1 = ref() |
|
|
selectedChildTable1.value = props.selectedChildTable |
|
|
selectedChildTable1.value = props.selectedChildTable |
|
|
|
|
|
|
|
|
const childTableList1 = ref() |
|
|
|
|
|
childTableList1.value = props.childTableList |
|
|
|
|
|
|
|
|
|
|
|
const childRoles1 = ref() |
|
|
const childRoles1 = ref() |
|
|
childRoles1.value = props.childRoles |
|
|
childRoles1.value = props.childRoles |
|
|
@ -206,15 +204,9 @@ childRoles1.value = props.childRoles |
|
|
const filterCondition1 = ref() |
|
|
const filterCondition1 = ref() |
|
|
filterCondition1.value = props.filterCondition |
|
|
filterCondition1.value = props.filterCondition |
|
|
|
|
|
|
|
|
|
|
|
const isDisabled = computed(() =>!!selectedChildTable1.value&&(childRoles1.value.length>1||childRoles1.value[0]?.leftValue!="")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* for(let i=0;i<props.asfasfChildTableFields.value[0].children.length;i++){ |
|
|
|
|
|
childTable.push({ |
|
|
|
|
|
id:props.asfasfChildTableFields.value[0].children[i].id |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function filterConditionDialogHandle() { |
|
|
function filterConditionDialogHandle() { |
|
|
filterConditionDialogFlag.value = !filterConditionDialogFlag.value |
|
|
filterConditionDialogFlag.value = !filterConditionDialogFlag.value |
|
|
@ -230,18 +222,9 @@ function aftGongshiChangedRange(gongshi: any) { |
|
|
filterCondition1.value.gongShi.mathsString = gongshi.mathsString |
|
|
filterCondition1.value.gongShi.mathsString = gongshi.mathsString |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function selectedChildTableChanged() { |
|
|
function selectedChildTableChanged(event:any) { |
|
|
emit('update:selectedChildTable', selectedChildTable1) |
|
|
emit('update:selectedChildTable', selectedChildTable1) |
|
|
//选择了某个子表,要求已经被选中的子表设其为不可选 |
|
|
emit('selectedOrDelChildRole') |
|
|
console.log(childTableList1.value) |
|
|
|
|
|
for(let i = 0;i<childTableList1.value[0].children.length;i++){ |
|
|
|
|
|
if(childTableList1.value[0].children[i].id==selectedChildTable1.value){ |
|
|
|
|
|
//alert(1) |
|
|
|
|
|
childTableList1.value[0].children[i].disabled = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
console.log(childTableList1) |
|
|
|
|
|
emit('update:childTableList', childTableList1) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function delChildRole(item: any) { |
|
|
function delChildRole(item: any) { |
|
|
@ -273,6 +256,9 @@ function handleRoleTreeContextmenuRange(MouseEvent: any, object: any, Node: any, |
|
|
function handleFieldTreeContextmenuRange(MouseEvent: any, object: any, Node: any, element: any) { |
|
|
function handleFieldTreeContextmenuRange(MouseEvent: any, object: any, Node: any, element: any) { |
|
|
tinymceRef.value.addIcon(object) |
|
|
tinymceRef.value.addIcon(object) |
|
|
} |
|
|
} |
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
emit('selectedOrDelChildRole') |
|
|
|
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style></style> |
|
|
<style></style> |