Browse Source

关联表单-数据填充规则-v0.26

lwx_v6
liwenxuan 1 year ago
parent
commit
ef7091033d
  1. 104
      src/widget/associatedforms/associatedFormsChildFillRole.vue

104
src/widget/associatedforms/associatedFormsChildFillRole.vue

@ -18,7 +18,7 @@
modal="true" @click="filterConditionDialogFlag = true">设置筛选条件选填</el-button>
<div
v-if="selectedChildTable1 !== '' && filterCondition1.conditionHtml !== ''"
style="padding-top: 5px; width: auto;margin-left: 85px;height: 30px;cursor: pointer;display: inline-block;border: gray 1px solid;margin-top: 3px;"
style="padding-top: 5px; width: auto;margin-left: 85px;height: 30px;cursor: pointer;display: inline-block;margin-top: 3px;"
@click="filterConditionDialogHandle" v-html="filterCondition1.conditionHtml"></div>
</div>
@ -31,23 +31,21 @@
<el-tree
ref="fieldTreeRef" node-key="id" empty-text="选择关联的表单后展示" :data="asfasfFieldTree"
:props="treeDefaultProps" :filter-node-method="filterNode"
style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;" @node-expand="handleFieldTreeExpand"
@node-collapse="handleFieldTreeCollapse" @node-contextmenu="handleFieldTreeContextmenuRange" />
style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;" @node-contextmenu="handleFieldTreeContextmenuRange" />
<!-- <el-input
v-show="fieldTreeSearchFlag" v-model="fieldTreeFilterText" style="width:98%;margin: 3px;"
placeholder="搜索字段" class="filter-tree" /> -->
<el-tree
ref="fieldTreeRef" node-key="id" empty-text="请先保存当前表单" :data="associatedFormsCurrentFormFieldTree"
:props="treeDefaultProps" :filter-node-method="filterNode"
style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;" @node-expand="handleFieldTreeExpand"
@node-collapse="handleFieldTreeCollapse" @node-contextmenu="handleFieldTreeContextmenuRange" />
style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;" @node-contextmenu="handleFieldTreeContextmenuRange" />
<!-- <el-input
v-show="orgTreeSearchFlag" v-model="orgTreeFilterText" style="width:98%;margin: 3px;"
placeholder="搜索字段" class="filter-tree" /> -->
<el-tree
ref="orgTreeRef" style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;"
:data="orgAndManTree" :props="treeDefaultProps" :filter-node-method="filterNode"
@node-expand="handleOrgTreeExpand" @node-collapse="handleOrgTreeCollapse"
@node-contextmenu="handleOrgTreeContextmenuRange" />
<!--<el-input
@ -56,7 +54,7 @@
<el-tree
ref="roleTreeRef" style="max-width: 600px; border: 1px solid gainsboro; margin: 3px;"
:data="roleTree" :props="treeDefaultProps" :filter-node-method="filterNode"
@node-expand="handleRoleTreeExpand" @node-collapse="handleRoleTreeCollapse"
@node-contextmenu="handleRoleTreeContextmenuRange" />
</el-aside>
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain">
@ -64,10 +62,12 @@
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: 38%; border-bottom: 0px;">
<AssociatedFormsTinyaceFillRoleFilterCondition ref="aftRange" :aft-text="conditionHtml"
:aft-text-copy="conditionHtmlCopy" @text-change="aftTextChangedRange"
@gongshi-change="aftGongshiChangedRange"></AssociatedFormsTinyaceFillRoleFilterCondition>
<AssociatedFormsTinyaceFillRoleFilterCondition
ref="tinymceRef"
:aft-text="filterCondition1.conditionHtml"
:aft-text-copy="filterCondition1.conditionHtmlCopy"
@text-change="aftTextChangedRange" @gongshi-change="aftGongshiChangedRange"
></AssociatedFormsTinyaceFillRoleFilterCondition>
</div>
<div style="border: 1px solid gainsboro; height: 55%; padding-top: 20px;">
@ -105,78 +105,27 @@ import AssociatedFormsTinyaceFillRoleFilterCondition from '@/widget/associatedfo
let emit = defineEmits(["delRole", "update:selectedChildTable",]);
const props = defineProps({
orgAndManTree:{
type: Object,
default() {
return {}
}
},
handleRoleTreeExpand:{
type: Object,
default() {
return {}
}
},
handleRoleTreeCollapse:{
type: Object,
default() {
return {}
}
},
handleRoleTreeContextmenuRange:{
type: Object,
default() {
return {}
}
},
roleTree:{
type: Object,
default() {
return {}
}
},
handleOrgTreeExpand:{
type: Object,
default() {
return {}
}
},
associatedFormsCurrentFormFieldTree:{
type: Object,
default() {
return {}
}
},
handleOrgTreeCollapse:{
type: Object,
default() {
return {}
}
},
handleOrgTreeContextmenuRange:{
type: Object,
default() {
return {}
}
},
handleFieldTreeContextmenuRange:{
type: Object,
default() {
return {}
}
},
handleFieldTreeCollapse:{
type: Object,
default() {
return {}
}
},
handleFieldTreeExpand:{
type: Object,
default() {
return {}
}
},
filterNode:{
type: Object,
default() {
@ -221,6 +170,10 @@ const props = defineProps({
}
},
})
//AssociatedFormsTinyace
const tinymceRef = ref();
const filterConditionDialogFlag = ref(false)
@ -234,19 +187,18 @@ filterCondition1.value = props.filterCondition
function filterConditionDialogHandle() {
filterConditionDialogFlag.value = !filterConditionDialogFlag.value
}
function aftTextChangedRange(str:string){
props.conditionHtml = str
filterCondition1.value.conditionHtml = str
}
function aftGongshiChangedRange(gongshi:any){
props.formulaHtml = gongshi.formulaHtml
props.mathsFormula = gongshi.mathsFormula
props.mathsString = gongshi.mathsString
filterCondition1.value.gongShi.formulaHtml = gongshi.formulaHtml
filterCondition1.value.gongShi.mathsFormula = gongshi.mathsFormula
filterCondition1.value.gongShi.mathsString = gongshi.mathsString
}
function selectedChildTableChanged() {
@ -257,9 +209,15 @@ function selectedChildTableChanged() {
function delRole() {
emit('delRole', props.currentKey)
}
function handleOrgTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){
tinymceRef.value.addIcon_org(object)
}
function handleRoleTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){
tinymceRef.value.addIcon(object)
}
function handleFieldTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){
tinymceRef.value.addIcon(object)
}
</script>
<style></style>
Loading…
Cancel
Save