|
|
|
@ -626,6 +626,30 @@ |
|
|
|
vIf: state.isSearch, |
|
|
|
vShow: ['associatedForms'] |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '关联表单', |
|
|
|
value: config.associatedForms, |
|
|
|
path: 'config.associatedForms', |
|
|
|
type: 'associatedForms_form', |
|
|
|
vIf: state.isSearch, |
|
|
|
vShow: ['associatedForms'] |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '数据范围', |
|
|
|
value: config.associatedForms, |
|
|
|
path: 'config.associatedForms', |
|
|
|
type: 'associatedForms_dataRange', |
|
|
|
vIf: state.isSearch, |
|
|
|
vShow: ['associatedForms'] |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '数据填充规则', |
|
|
|
value: config.associatedForms, |
|
|
|
path: 'config.associatedForms', |
|
|
|
type: 'associatedForms_FillRoles', |
|
|
|
vIf: state.isSearch, |
|
|
|
vShow: ['associatedForms'] |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '轮播图设置', |
|
|
|
value: config.carousel, |
|
|
|
@ -1543,6 +1567,8 @@ |
|
|
|
element.imgId = onlyNumber; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if(controlData.value.type==='associatedForms'){ |
|
|
|
controlData.value.control.fillRoles[0].id = uuidv4().replaceAll('-','').toString(); |
|
|
|
} |
|
|
|
}) |
|
|
|
//轮播图图片上传成功钩子 |
|
|
|
@ -1654,6 +1680,7 @@ interface Tree { |
|
|
|
[key: string]: any |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const addRootNode = () => { |
|
|
|
let onlyNumber = uuidv4().replaceAll('-','').toString(); |
|
|
|
controlData.value.control.fixedOptions.push({ |
|
|
|
@ -1741,20 +1768,26 @@ const transferDataSourceOptions = [ |
|
|
|
|
|
|
|
|
|
|
|
//liwenxuan20240403 associatedForms start |
|
|
|
import AssociatedFormsTinyace from '@/widget/associatedforms/associatedFormsTinyace.vue' |
|
|
|
import AssociatedFormsTinyaceRange from '@/widget/associatedforms/associatedFormsTinyaceRange.vue' |
|
|
|
import AssociatedFormsFillRole from '@/widget/associatedforms/associatedFormsFillRole.vue' |
|
|
|
|
|
|
|
const associatedFormsHideDialogFlag = ref(false) |
|
|
|
|
|
|
|
const defaultProps = { |
|
|
|
const treeDefaultProps = { |
|
|
|
children: 'children', |
|
|
|
label: 'label', |
|
|
|
} |
|
|
|
//拿到子组件AssociatedFormsTinyace的实例 |
|
|
|
let aft = ref(); |
|
|
|
const aftRange = ref(); |
|
|
|
|
|
|
|
function getAssociatedFormsCurrentFieldTree() { |
|
|
|
|
|
|
|
return request({ |
|
|
|
url: '/javasys/lowCode/AssociatedForms/getFieldTree', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
cfid:'1' |
|
|
|
//cfid:'13' |
|
|
|
cfid:props.customerformid |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -1765,29 +1798,112 @@ function getAssociatedFormsOrgAndManTree() { |
|
|
|
method: 'post', |
|
|
|
}); |
|
|
|
} |
|
|
|
const associatedFormsCurrentFormFieldTree = ref<Tree[]>() |
|
|
|
|
|
|
|
getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
function getCustomerFormList() { |
|
|
|
return request({ |
|
|
|
url: '/javasys/lowCode/AssociatedForms/getCustomerFormList', |
|
|
|
method: 'post', |
|
|
|
}); |
|
|
|
} |
|
|
|
function getAssociatedFormsRoleTree() { |
|
|
|
return request({ |
|
|
|
url: '/javasys/lowCode/AssociatedForms/getRoleList', |
|
|
|
method: 'post', |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function getAsfasfFieldTree() { |
|
|
|
return request({ |
|
|
|
url: '/javasys/lowCode/AssociatedForms/getFieldTree', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
//cfid:'13' |
|
|
|
cfid:controlData.value.control.formid |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const asfasfFieldTree = ref<Tree[]>() |
|
|
|
|
|
|
|
function formidChanged(){ |
|
|
|
|
|
|
|
if(controlData.value.control.formid===''){ |
|
|
|
|
|
|
|
}else{ |
|
|
|
getAsfasfFieldTree().then(({ data }) => { |
|
|
|
|
|
|
|
if(data.id==="cfid为空"){ |
|
|
|
//alert("cfid为空") |
|
|
|
}else{ |
|
|
|
let resData = ref(data.children) |
|
|
|
//let rootid_ = data.value.label |
|
|
|
asfasfFieldTree.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '关联的表单-'+data.label, |
|
|
|
children: [...resData.value], |
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
}] |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const associatedFormsCurrentFormFieldTree = ref<Tree[]>() |
|
|
|
getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
|
|
|
|
if(data.id==="cfid为空"){ |
|
|
|
//alert("cfid为空") |
|
|
|
}else{ |
|
|
|
let resData = ref(data.children) |
|
|
|
//let rootid_ = data.value.label |
|
|
|
associatedFormsCurrentFormFieldTree.value = [{ |
|
|
|
//let rootid_ = data.value.label |
|
|
|
associatedFormsCurrentFormFieldTree.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '当前表单', |
|
|
|
children: [...resData.value] |
|
|
|
label: '当前表单', |
|
|
|
children: [...resData.value], |
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
}] |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const customerFormTree = ref<Tree[]>() |
|
|
|
getCustomerFormList().then(({ data }) => { |
|
|
|
let resData = ref(data.children) |
|
|
|
customerFormTree.value = [{ |
|
|
|
id: data.id, |
|
|
|
//value: data.value, |
|
|
|
//label: data.label, |
|
|
|
label: '请选择表单', |
|
|
|
children: [...resData.value] |
|
|
|
}] |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const orgAndManTree = ref<Tree[]>() |
|
|
|
getAssociatedFormsOrgAndManTree().then(({ data }) => { |
|
|
|
let resData = ref(data.children) |
|
|
|
orgAndManTree.value = [{ |
|
|
|
id: data.id, |
|
|
|
//label: data.label, |
|
|
|
label: '组织机构', |
|
|
|
children: [...resData.value] |
|
|
|
}] |
|
|
|
getAssociatedFormsOrgAndManTree().then(({ data }) => { |
|
|
|
let resData = ref(data.children) |
|
|
|
orgAndManTree.value = [{ |
|
|
|
id: data.id, |
|
|
|
//label: data.label, |
|
|
|
label: '组织机构', |
|
|
|
children: [...resData.value] |
|
|
|
}] |
|
|
|
}); |
|
|
|
|
|
|
|
const roleTree = ref<Tree[]>() |
|
|
|
getAssociatedFormsRoleTree().then(({ data }) => { |
|
|
|
let resData = ref(data.children) |
|
|
|
//console.log("roleTree=============="+resData.value); |
|
|
|
roleTree.value = [{ |
|
|
|
id: data.id, |
|
|
|
//label: data.label, |
|
|
|
label: '角色', |
|
|
|
children: [...resData.value] |
|
|
|
}] |
|
|
|
}); |
|
|
|
// field |
|
|
|
const fieldTreeSearchFlag = ref(false) |
|
|
|
|
|
|
|
function handleFieldTreeExpand(){ |
|
|
|
@ -1799,29 +1915,245 @@ function handleFieldTreeCollapse(){ |
|
|
|
|
|
|
|
fieldTreeSearchFlag.value = false; |
|
|
|
} |
|
|
|
function handleFieldTreeNodeclick(){ |
|
|
|
|
|
|
|
|
|
|
|
function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
aft.value.addIcon_field(object) |
|
|
|
} |
|
|
|
function handleFieldTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
aftRange.value.addIcon_field(object) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//org |
|
|
|
const orgTreeSearchFlag = ref(false) |
|
|
|
|
|
|
|
function handleOrgTreeExpand(){ |
|
|
|
|
|
|
|
orgTreeSearchFlag.value = true; |
|
|
|
} |
|
|
|
function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
//console.log(MouseEvent) |
|
|
|
console.log(object) |
|
|
|
//console.log(Node) |
|
|
|
//console.log(element) |
|
|
|
|
|
|
|
function handleOrgTreeCollapse(){ |
|
|
|
|
|
|
|
orgTreeSearchFlag.value = false; |
|
|
|
} |
|
|
|
|
|
|
|
function handleOrgTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
aft.value.addIcon_org(object) |
|
|
|
} |
|
|
|
function handleOrgTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
aftRange.value.addIcon_org(object) |
|
|
|
} |
|
|
|
//role |
|
|
|
const roleTreeSearchFlag = ref(false) |
|
|
|
|
|
|
|
function handleRoleTreeExpand(){ |
|
|
|
|
|
|
|
roleTreeSearchFlag.value = true; |
|
|
|
} |
|
|
|
|
|
|
|
function handleRoleTreeCollapse(){ |
|
|
|
|
|
|
|
roleTreeSearchFlag.value = false; |
|
|
|
} |
|
|
|
|
|
|
|
function handleRoleTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
aft.value.addIcon(object) |
|
|
|
} |
|
|
|
function handleRoleTreeContextmenuRange(MouseEvent:any, object:any, Node:any, element:any){ |
|
|
|
aftRange.value.addIcon(object) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
import { ElTree } from 'element-plus' |
|
|
|
|
|
|
|
|
|
|
|
const fieldTreeFilterText = ref('') |
|
|
|
const orgTreeFilterText = ref('') |
|
|
|
const roleTreeFilterText = ref('') |
|
|
|
const fieldTreeRef = ref<InstanceType<typeof ElTree>>() |
|
|
|
|
|
|
|
const orgTreeRef = ref<InstanceType<typeof ElTree>>() |
|
|
|
const roleTreeRef = ref<InstanceType<typeof ElTree>>() |
|
|
|
watch(fieldTreeFilterText, (val) => { |
|
|
|
fieldTreeRef.value!.filter(val) |
|
|
|
}) |
|
|
|
watch(orgTreeFilterText, (val) => { |
|
|
|
orgTreeRef.value!.filter(val) |
|
|
|
}) |
|
|
|
watch(roleTreeFilterText, (val) => { |
|
|
|
roleTreeRef.value!.filter(val) |
|
|
|
}) |
|
|
|
|
|
|
|
const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => { |
|
|
|
if (!value) return true |
|
|
|
return associatedFormsCurrentFormFieldTree.label.includes(value) |
|
|
|
} |
|
|
|
|
|
|
|
//关联表单隐藏条件弹窗flag |
|
|
|
const associatedFormsHideDialogFlag = ref(false) |
|
|
|
|
|
|
|
const associatedFormsDataRangeDialogFlag = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//点击开启隐藏设置 |
|
|
|
function associatedFormsHideDialoghandle(){ |
|
|
|
|
|
|
|
associatedFormsHideDialogFlag.value = true |
|
|
|
controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml |
|
|
|
nextTick(() => { |
|
|
|
aft.value.focusEditor() |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function associatedFormsDataRangeDialoghandle(){ |
|
|
|
|
|
|
|
getAsfasfFieldTree().then(({ data }) => { |
|
|
|
|
|
|
|
if(data.id==="cfid为空"){ |
|
|
|
//alert("cfid为空") |
|
|
|
}else{ |
|
|
|
let resData = ref(data.children) |
|
|
|
//let rootid_ = data.value.label |
|
|
|
asfasfFieldTree.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '关联的表单-'+data.label, |
|
|
|
children: [...resData.value], |
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
}] |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
associatedFormsDataRangeDialogFlag.value = true |
|
|
|
controlData.value.control.dataRangeConditionHtmlCopy = controlData.value.control.dataRangeConditionHtml |
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
aftRange.value.focusEditor() |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//自定义事件同步父子组件的text |
|
|
|
function aftTextChanged(str:string){ |
|
|
|
controlData.value.control.hideConditionHtml = str |
|
|
|
} |
|
|
|
|
|
|
|
function aftTextChangedRange(str:string){ |
|
|
|
controlData.value.control.dataRangeConditionHtml = str |
|
|
|
} |
|
|
|
//asf隐藏条件取消编辑 |
|
|
|
function asfhTextCancel(){ |
|
|
|
determine.value = false |
|
|
|
associatedFormsHideDialogFlag.value = false |
|
|
|
controlData.value.control.hideConditionHtml = controlData.value.control.hideConditionHtmlCopy |
|
|
|
//父组件取消将copy同步至子组件 |
|
|
|
aft.value.handelCancel(controlData.value.control.hideConditionHtmlCopy) |
|
|
|
} |
|
|
|
|
|
|
|
function asfhTextCancelRange(){ |
|
|
|
determineRange.value = false |
|
|
|
associatedFormsDataRangeDialogFlag.value = false |
|
|
|
controlData.value.control.dataRangeConditionHtml = controlData.value.control.dataRangeConditionHtmlCopy |
|
|
|
//父组件取消将copy同步至子组件 |
|
|
|
aftRange.value.handelCancel(controlData.value.control.dataRangeConditionHtmlCopy) |
|
|
|
} |
|
|
|
|
|
|
|
//上次点击了确定为true |
|
|
|
let determine = ref(true) |
|
|
|
let determineRange = ref(true) |
|
|
|
//监听associatedFormsHideDialogFlag true 重新init tinymce |
|
|
|
watch(associatedFormsHideDialogFlag, (val) => { |
|
|
|
if(val===true&&determine.value===false){ |
|
|
|
setTimeout(() => { |
|
|
|
aft.value.tinymceReInit() |
|
|
|
}, 200); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
watch(associatedFormsDataRangeDialogFlag, (val) => { |
|
|
|
if(val===true&&determineRange.value===false){ |
|
|
|
setTimeout(() => { |
|
|
|
aftRange.value.tinymceReInit() |
|
|
|
}, 200); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
//确定回调 |
|
|
|
function handleDetermine(){ |
|
|
|
associatedFormsHideDialogFlag.value = false |
|
|
|
determine.value = true |
|
|
|
controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml |
|
|
|
} |
|
|
|
function handleDetermineRange(){ |
|
|
|
associatedFormsDataRangeDialogFlag.value = false |
|
|
|
determineRange.value = true |
|
|
|
controlData.value.control.dataRangeConditionHtmlCopy = controlData.value.control.dataRangeConditionHtml |
|
|
|
} |
|
|
|
//数据填充规则 |
|
|
|
|
|
|
|
const associatedFormsFillRolesDialogFlag = ref(false) |
|
|
|
//数据填充规则设置按钮 |
|
|
|
function associatedFormsDataFillRolesDialoghandle(){ |
|
|
|
if(controlData.value.control.formid===''){ |
|
|
|
alert("请先选择要关联的表单") |
|
|
|
|
|
|
|
}else{ |
|
|
|
associatedFormsFillRolesDialogFlag.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function asfhTextCancelFillRoles(){ |
|
|
|
associatedFormsFillRolesDialogFlag.value = false |
|
|
|
} |
|
|
|
//数据填充规则确定按钮 |
|
|
|
function handleDetermineFillRoles(){ |
|
|
|
|
|
|
|
associatedFormsFillRolesDialogFlag.value = false |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
watch(()=>store.activeKey, () => { |
|
|
|
if(controlData.value.type==='associatedForms'){ |
|
|
|
setTimeout(() => { |
|
|
|
formidChanged() |
|
|
|
}, 800); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
function addFillRole(){ |
|
|
|
let onlyNumber = uuidv4().replaceAll('-','').toString(); //获取唯一编码 |
|
|
|
controlData.value.control.fillRoles.push({ |
|
|
|
leftValue:'', |
|
|
|
rightValue:'', |
|
|
|
id:onlyNumber, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
function delRole(id:String){ |
|
|
|
const delRoleData:any = controlData.value.control.fillRoles |
|
|
|
for (var i = 0; i < delRoleData.length; i++) { |
|
|
|
if(delRoleData[i].id===id){ |
|
|
|
delRoleData.splice(i, 1); |
|
|
|
i--; // 如果不减,将漏掉一个元素 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//liwenxuan20240403 associatedForms end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const optionsCss = [ |
|
|
|
@ -1907,6 +2239,9 @@ const gainFormGroupList = () =>{ |
|
|
|
}) |
|
|
|
} |
|
|
|
onMounted(() => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gainFormGroupList() |
|
|
|
}) |
|
|
|
|
|
|
|
@ -2277,10 +2612,39 @@ const loadNextPage = () => { |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row v-else-if="item.type === 'associatedForms_hide'"> |
|
|
|
<el-button type="primary" append-to-body="true" modal="true" @click="associatedFormsHideDialogFlag = true" >设置隐藏条件</el-button> |
|
|
|
|
|
|
|
<el-button v-if="controlData.control.hideConditionHtml===''" style="padding-top: 5px;" type="primary" link append-to-body="true" modal="true" @click="associatedFormsHideDialoghandle" >设置隐藏条件</el-button> |
|
|
|
<div style="width:100%; cursor: pointer;" @click="associatedFormsHideDialoghandle" v-html="controlData.control.hideConditionHtml"></div> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-row v-else-if="item.type === 'associatedForms_form'"> |
|
|
|
<div style="margin-top: 25px;margin-left: -60px;"> |
|
|
|
<el-tree-select |
|
|
|
v-model="controlData.control.formid" |
|
|
|
style="width: 260px;" |
|
|
|
:data="customerFormTree[0].children" |
|
|
|
check-strictly |
|
|
|
:render-after-expand="false" |
|
|
|
filterable |
|
|
|
@change="formidChanged" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<!-- <div v-html="controlData.control.formid"></div> --> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row v-else-if="item.type === 'associatedForms_dataRange'"> |
|
|
|
<el-button v-if="controlData.control.dataRangeConditionHtml===''" style="padding-top: 5px;" type="primary" link append-to-body="true" modal="true" @click="associatedFormsDataRangeDialoghandle" >设置数据范围</el-button> |
|
|
|
<div style="width:100%; cursor: pointer;" @click="associatedFormsDataRangeDialoghandle" v-html="controlData.control.dataRangeConditionHtml"></div> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-row v-else-if="item.type === 'associatedForms_FillRoles'"> |
|
|
|
<el-button style="padding-top: 5px;" type="primary" link append-to-body="true" modal="true" @click="associatedFormsDataFillRolesDialoghandle" >设置数据填充规则</el-button> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-input |
|
|
|
v-else |
|
|
|
:type="item.inputStyle" |
|
|
|
@ -2983,63 +3347,267 @@ const loadNextPage = () => { |
|
|
|
|
|
|
|
<!-- 关联表单设置弹窗 liwenxuan 20240402 start --> |
|
|
|
|
|
|
|
<el-dialog v-model="associatedFormsHideDialogFlag" title="隐藏条件" top="150px" style="margin-top:70px ;min-height: 500px" width="50%"> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="associatedFormsHideDialogFlag" title="隐藏条件" top="150px" :close-on-click-modal="false" :show-close="false" style="margin-top:70px ;min-height: 500px" width="50%" > |
|
|
|
|
|
|
|
<template v-if="controlData.type=='associatedForms'"> |
|
|
|
<div class="common-layout"> |
|
|
|
<el-container> |
|
|
|
<el-aside width="300px" style="height:400px;border: 1px solid gainsboro;margin-right: 5px;"> |
|
|
|
<el-aside width="300px" style="height:420px;border: 1px solid gainsboro;margin-right: 5px;"> |
|
|
|
<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="defaultProps" |
|
|
|
:props="treeDefaultProps" |
|
|
|
: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-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="defaultProps" |
|
|
|
:props="treeDefaultProps" |
|
|
|
:filter-node-method="filterNode" |
|
|
|
@node-expand="handleOrgTreeExpand" |
|
|
|
@node-collapse="handleOrgTreeCollapse" |
|
|
|
|
|
|
|
@node-contextmenu="handleOrgTreeContextmenu" |
|
|
|
/> |
|
|
|
<el-input |
|
|
|
v-show="roleTreeSearchFlag" |
|
|
|
v-model="roleTreeFilterText" |
|
|
|
style="width:98%;margin: 3px;" |
|
|
|
placeholder="搜索字段" |
|
|
|
class="filter-tree" |
|
|
|
/> |
|
|
|
<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="handleRoleTreeContextmenu" |
|
|
|
/> |
|
|
|
</el-aside> |
|
|
|
<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> |
|
|
|
<div id="associatedFormsHideEditArea" style="border: 1px solid gainsboro; height: 63%; border-bottom: 0px;"> |
|
|
|
<AssociatedFormsTinyace ref="aft" :aft-text="controlData.control.hideConditionHtml" :aft-text-copy = "controlData.control.hideConditionHtmlCopy" @text-change = "aftTextChanged"></AssociatedFormsTinyace> |
|
|
|
<!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;"> |
|
|
|
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 |
|
|
|
</div> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div style="border: 1px solid gainsboro; height: 30%; padding-top: 20px;"> |
|
|
|
<ul> |
|
|
|
<li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li> |
|
|
|
<li>支持<span style="color: red">英文</span>模式下运算符<!-- (+、-、*、/、>、<、==、) --></li> |
|
|
|
<li>参考场景:</li> |
|
|
|
<span style="margin-left: 14px;">年龄控件输入的值大于10时,需要隐藏当前控件,则可将隐藏条件设置为:年龄>10</span> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</el-main> |
|
|
|
</el-container> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<el-button @click="asfhTextCancel">取消</el-button> |
|
|
|
<el-button type="primary" @click="handleDetermine"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 数据范围编辑弹窗 --> |
|
|
|
|
|
|
|
<el-dialog v-model="associatedFormsDataRangeDialogFlag" title="数据范围" top="150px" :close-on-click-modal="false" :show-close="false" style="margin-top:70px ;min-height: 500px" width="50%" > |
|
|
|
|
|
|
|
<template v-if="controlData.type=='associatedForms'"> |
|
|
|
<div class="common-layout"> |
|
|
|
<el-container> |
|
|
|
<el-aside width="300px" style="height:420px;border: 1px solid gainsboro;margin-right: 5px;"> |
|
|
|
|
|
|
|
|
|
|
|
<el-tree |
|
|
|
ref="fieldTreeRef" |
|
|
|
node-key="id" |
|
|
|
: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" |
|
|
|
/> |
|
|
|
<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" |
|
|
|
/> |
|
|
|
<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 |
|
|
|
v-show="roleTreeSearchFlag" |
|
|
|
v-model="roleTreeFilterText" |
|
|
|
style="width:98%;margin: 3px;" |
|
|
|
placeholder="搜索字段" |
|
|
|
class="filter-tree" |
|
|
|
/> |
|
|
|
<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"> |
|
|
|
<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;"> |
|
|
|
<AssociatedFormsTinyaceRange ref="aftRange" :aft-text="controlData.control.dataRangeConditionHtml" :aft-text-copy = "controlData.control.dataRangeConditionHtmlCopy" @text-change = "aftTextChangedRange"></AssociatedFormsTinyaceRange> |
|
|
|
<!-- <div style="border: 1px solid #4189EF;width:90px;height:26px;border-radius: 3px;padding:2px;text-align: center;cursor:pointer;float: right;margin-top: -32px;margin-right: 5px;z-index:99999999;position: relative;"> |
|
|
|
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 |
|
|
|
</div> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div style="border: 1px solid gainsboro; height: 30%; padding-top: 20px;"> |
|
|
|
<ul> |
|
|
|
<li>请从左侧面板<span style="color: red">右击</span>选择字段或选项</li> |
|
|
|
<li>支持<span style="color: red">英文</span>模式下运算符<!-- (+、-、*、/、>、<、==、) --></li> |
|
|
|
<li>参考场景:</li> |
|
|
|
<span style="margin-left: 14px;">仅可选择关联表单中年龄大于10的数据,则可将数据范围设置为:年龄>10</span> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</el-main> |
|
|
|
</el-container> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<!-- <el-button @click="associatedFormsHideDialogFlag = false">取消</el-button> --> |
|
|
|
<el-button type="primary" @click="associatedFormsHideDialogFlag = false"> |
|
|
|
<el-button @click="asfhTextCancelRange">取消</el-button> |
|
|
|
<el-button type="primary" @click="handleDetermineRange"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 数据填充规则弹窗 --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="associatedFormsFillRolesDialogFlag" title="数据填充规则" top="150px" :close-on-click-modal="false" :show-close="false" style="margin-top:70px ;min-height: 500px" width="40%" > |
|
|
|
|
|
|
|
<template v-if="controlData.type=='associatedForms'"> |
|
|
|
<el-divider style="margin-top: 0px;" /> |
|
|
|
<div style="margin-top: -10px;"><span style="color: grey;">当选择具体数据后,将按如下规则给当前表单字段填充数据 </span></div> |
|
|
|
<el-button style="font-size: large;margin-top: 3px;" type="primary" link append-to-body="true" modal="true" @click="addFillRole">十 添加规则</el-button> |
|
|
|
<el-divider /> |
|
|
|
<div style="height:300px;border:1px solid white;overflow-y:auto"> |
|
|
|
|
|
|
|
<template v-for="(item, index) in controlData.control.fillRoles" :key="controlData.control.fillRoles[index].id"> |
|
|
|
<AssociatedFormsFillRole v-model:left-value="controlData.control.fillRoles[index].leftValue" v-model:right-value="controlData.control.fillRoles[index].rightValue" :left-tree-source = "asfasfFieldTree[0].children" :right-tree-source = "associatedFormsCurrentFormFieldTree[0].children" :current-key="controlData.control.fillRoles[index].id" @del-Role = "delRole" ></AssociatedFormsFillRole> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<!-- <el-button @click="asfhTextCancelFillRoles">取消</el-button> --> |
|
|
|
<el-button type="primary" @click="handleDetermineFillRoles"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 关联表单设置弹窗 liwenxuan 20240402 end --> |
|
|
|
</template> |
|
|
|
|
|
|
|
<style lang='scss' scoped> |
|
|
|
<style lang='scss' scoped> |
|
|
|
|
|
|
|
li::before { |
|
|
|
content: ""; |
|
|
|
display: inline-block; |
|
|
|
width: 4px; |
|
|
|
height: 4px; |
|
|
|
border-radius: 50%; |
|
|
|
background-color: gray; |
|
|
|
margin-right: 5px; |
|
|
|
margin-left: 5px; |
|
|
|
margin-bottom: 3.5px; |
|
|
|
} |
|
|
|
|
|
|
|
.sidebar-tools .el-tabs__content{ |
|
|
|
padding: 0; |
|
|
|
|