|
|
|
@ -1659,9 +1659,12 @@ const defaultProps = { |
|
|
|
} |
|
|
|
|
|
|
|
function getAssociatedFormsCurrentFieldTree() { |
|
|
|
return request({ |
|
|
|
url: '/javasys/lowCode/AssociatedForms/getCustomerFormList', |
|
|
|
return request({ |
|
|
|
url: '/javasys/lowCode/AssociatedForms/getFieldTree', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
cfid:'13' |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -1675,8 +1678,9 @@ const associatedFormsCurrentFormFieldTree = ref<Tree[]>() |
|
|
|
|
|
|
|
getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
let resData = ref(data.children) |
|
|
|
//let rootid_ = data.value.label |
|
|
|
associatedFormsCurrentFormFieldTree.value = [{ |
|
|
|
id: 'rootid', |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '当前表单', |
|
|
|
children: [...resData.value] |
|
|
|
}] |
|
|
|
@ -1704,6 +1708,16 @@ function handleFieldTreeCollapse(){ |
|
|
|
|
|
|
|
fieldTreeSearchFlag.value = false; |
|
|
|
} |
|
|
|
function handleFieldTreeNodeclick(){ |
|
|
|
|
|
|
|
} |
|
|
|
function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
//console.log(MouseEvent) |
|
|
|
console.log(object) |
|
|
|
//console.log(Node) |
|
|
|
//console.log(element) |
|
|
|
|
|
|
|
} |
|
|
|
import { ElTree } from 'element-plus' |
|
|
|
const fieldTreeFilterText = ref('') |
|
|
|
const fieldTreeRef = ref<InstanceType<typeof ElTree>>() |
|
|
|
@ -1712,10 +1726,11 @@ watch(fieldTreeFilterText, (val) => { |
|
|
|
fieldTreeRef.value!.filter(val) |
|
|
|
}) |
|
|
|
|
|
|
|
const filterNode = (value: string, data: Tree) => { |
|
|
|
const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => { |
|
|
|
if (!value) return true |
|
|
|
return associatedFormsCurrentFormFieldTree.value?.label.includes(value) |
|
|
|
return associatedFormsCurrentFormFieldTree.label.includes(value) |
|
|
|
} |
|
|
|
|
|
|
|
//liwenxuan20240403 associatedForms end |
|
|
|
|
|
|
|
</script> |
|
|
|
@ -2615,21 +2630,26 @@ const filterNode = (value: string, data: Tree) => { |
|
|
|
<el-container> |
|
|
|
<el-aside width="300px" style="height:400px;border: 1px solid gainsboro;margin-right: 5px;"> |
|
|
|
<el-input |
|
|
|
v-model="fieldTreeFilterText" |
|
|
|
v-show="fieldTreeSearchFlag" |
|
|
|
v-model="fieldTreeFilterText" |
|
|
|
style="width:98%;margin: 3px;" |
|
|
|
placeholder="搜索字段" |
|
|
|
class="filter-tree" |
|
|
|
default-expand-all |
|
|
|
:filter-node-method="filterNode" |
|
|
|
|
|
|
|
|
|
|
|
/> |
|
|
|
<el-tree |
|
|
|
ref="fieldTreeRef" |
|
|
|
style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;" |
|
|
|
:data="associatedFormsCurrentFormFieldTree" |
|
|
|
:props="defaultProps" |
|
|
|
:filter-node-method="filterNode" |
|
|
|
style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;" |
|
|
|
@node-expand="handleFieldTreeExpand" |
|
|
|
@node-collapse="handleFieldTreeCollapse" |
|
|
|
@node-click="handleFieldTreeNodeclick" |
|
|
|
@node-contextmenu="handleFieldTreeContextmenu" |
|
|
|
|
|
|
|
|
|
|
|
/> |
|
|
|
<el-tree |
|
|
|
style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;" |
|
|
|
@ -2638,15 +2658,17 @@ const filterNode = (value: string, data: Tree) => { |
|
|
|
|
|
|
|
/> |
|
|
|
</el-aside> |
|
|
|
<el-main style="border: 1px solid gainsboro;"> |
|
|
|
Main |
|
|
|
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain"> |
|
|
|
<div style="border: 1px solid gainsboro; height: 7%; border-bottom: 0px; padding-top: 3px; padding-left: 5px; background-color: #E6F3FE;">当满足以下条件时此控件隐藏</div> |
|
|
|
<div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 63%; border-bottom: 0px;"></div> |
|
|
|
<div style="border: 1px solid gainsboro; height: 30%;"></div> |
|
|
|
</el-main> |
|
|
|
</el-container> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<el-button @click="associatedFormsHideDialogFlag = false">取消</el-button> |
|
|
|
<!-- <el-button @click="associatedFormsHideDialogFlag = false">取消</el-button> --> |
|
|
|
<el-button type="primary" @click="associatedFormsHideDialogFlag = false"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
@ -2676,4 +2698,13 @@ const filterNode = (value: string, data: Tree) => { |
|
|
|
} |
|
|
|
//!!!!!!!!!!!!!!!!!穿梭框编辑树样式end |
|
|
|
|
|
|
|
|
|
|
|
.associatedFormsHideDialogMain7{ |
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
.el-main{ |
|
|
|
--el-main-padding: 5px |
|
|
|
} |
|
|
|
</style> |
|
|
|
|