|
|
|
@ -1609,7 +1609,8 @@ |
|
|
|
let currentUploadImgid = ""; |
|
|
|
|
|
|
|
//刚拖拽视频组件时,初始化imgid监听designForm.activeKey,变化时,如果controlData.value.type=='lowcodeCarsusel',就遍历轮播图数组把imgid=''的都生成uuid |
|
|
|
watch(()=>store.activeKey, () => { |
|
|
|
watch(()=>store.activeKey, (newVal) => { |
|
|
|
//啊啊啊啊 |
|
|
|
if(controlData.value.type==='lowcodeCarsusel'){ |
|
|
|
const carsuselConfigData:CarsuselConfig[] = controlData.value.control.carsuselConfigArr |
|
|
|
carsuselConfigData.forEach(element => { |
|
|
|
@ -1623,6 +1624,32 @@ |
|
|
|
}else if(controlData.value.type==='associatedForms'){ |
|
|
|
controlData.value.control.fillRoles[0].id = uuidv4().replaceAll('-','').toString(); |
|
|
|
} |
|
|
|
//实现关联表单设置可选字段中没有当前字段效果 start |
|
|
|
//console.log(controlData.value.name) |
|
|
|
resDataForGlxxszExceptself1 = JSON.parse(JSON.stringify(resDataForGlxxszExceptself)); |
|
|
|
//console.log(resDataForGlxxszExceptself1) |
|
|
|
|
|
|
|
for(let i = 0;i<resDataForGlxxszExceptself1.length;i++){ |
|
|
|
let strArr:[string] = resDataForGlxxszExceptself1[i].id.split(":") |
|
|
|
//console.log(strArr) |
|
|
|
let str = strArr[strArr.length-1] |
|
|
|
//console.log(str) |
|
|
|
if(str==newVal){ |
|
|
|
resDataForGlxxszExceptself1.splice(i, 1); // 将使后面的元素依次前移,数组长度减1 |
|
|
|
i--; // 如果不减,将漏掉一个元素 |
|
|
|
} |
|
|
|
} |
|
|
|
//console.log(resDataForGlxxszExceptself1) |
|
|
|
associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value = [{ |
|
|
|
id: 'rootid_'+getAssociatedFormsCurrentFieldTreeData.label, |
|
|
|
//label: '当前表单', |
|
|
|
label: '当前表单-'+getAssociatedFormsCurrentFieldTreeData.treeAttrs.show, |
|
|
|
children: resDataForGlxxszExceptself1, |
|
|
|
treeAttrs: getAssociatedFormsCurrentFieldTreeData.treeAttrs,// |
|
|
|
}] |
|
|
|
|
|
|
|
//associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value.children = [...resDataForGlxxszExceptself1] |
|
|
|
//实现关联表单设置可选字段中没有当前字段效果 end |
|
|
|
}) |
|
|
|
//轮播图图片上传成功钩子 |
|
|
|
function carouselImgUploadSuccess(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles){ |
|
|
|
@ -1904,8 +1931,14 @@ function formidChanged(){ |
|
|
|
|
|
|
|
const associatedFormsCurrentFormFieldTree = ref<Tree[]>() |
|
|
|
const associatedFormsCurrentFormFieldTreeForGlxxsz = ref<Tree[]>() |
|
|
|
let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref<Tree[]>() |
|
|
|
let resDataForGlxxszExceptself: any[] = [] |
|
|
|
let resDataForGlxxszExceptself1: any[] = [] |
|
|
|
let getAssociatedFormsCurrentFieldTreeData:any |
|
|
|
getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
|
|
|
|
//console.log(data) |
|
|
|
getAssociatedFormsCurrentFieldTreeData = JSON.parse(JSON.stringify(data)) |
|
|
|
//console.log(getAssociatedFormsCurrentFieldTreeData) |
|
|
|
if(data.id==="cfid为空"){ |
|
|
|
//alert("cfid为空") |
|
|
|
}else{ |
|
|
|
@ -1921,6 +1954,11 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
|
|
|
|
let resDataForGlxxsz = ref(data.children.slice(8)) |
|
|
|
|
|
|
|
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value)); |
|
|
|
|
|
|
|
//console.log(resDataForGlxxszExceptself) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
associatedFormsCurrentFormFieldTreeForGlxxsz.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
@ -1929,6 +1967,15 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
children: [...resDataForGlxxsz.value], |
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
}] |
|
|
|
associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
//label: '当前表单', |
|
|
|
label: '当前表单-'+data.treeAttrs.show, |
|
|
|
children: [...resDataForGlxxsz.value], |
|
|
|
treeAttrs: data.treeAttrs,//getAssociatedFormsCurrentFieldTreeData |
|
|
|
}] |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
@ -2324,6 +2371,7 @@ function deleteRowForGlxxsz(row: { id: any }){ |
|
|
|
/* */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//liwenxuan20240426 单选多选下拉 关联选项设置 end |
|
|
|
|
|
|
|
|
|
|
|
@ -3799,7 +3847,7 @@ const loadNextPage = () => { |
|
|
|
<el-table-column fixed="right" label="显示以下组件" > |
|
|
|
<template #default="fieldScope"> |
|
|
|
|
|
|
|
<el-tree-select v-model="controlData.control.glxxsz[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxsz[0].children" multiple /> |
|
|
|
<el-tree-select v-model="controlData.control.glxxsz[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -3832,7 +3880,7 @@ const loadNextPage = () => { |
|
|
|
|
|
|
|
<el-table-column fixed="right" label="显示以下组件" > |
|
|
|
<template #default="fieldScope"> |
|
|
|
<el-tree-select v-model="controlData.control.glxxszForCheckBox[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxsz[0].children" multiple /> |
|
|
|
<el-tree-select v-model="controlData.control.glxxszForCheckBox[fieldScope.$index].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
@ -3869,11 +3917,11 @@ const loadNextPage = () => { |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="controlData.type=='switch'"> |
|
|
|
<div style="border:#13ce66 1px solid">当开关打开时显示: |
|
|
|
<el-tree-select v-model="controlData.control.glxxszSwitch[0].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxsz[0].children" multiple /> |
|
|
|
<div style="display:flex;margin-bottom: 20px;margin-top:20px"><span style="font-size: larger;margin-left: 35px;margin-right: 15px;">当开关打开时显示</span> |
|
|
|
<el-tree-select v-model="controlData.control.glxxszSwitch[0].showFields" style="width: 60%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple /> |
|
|
|
</div> |
|
|
|
<div style="border:red 1px solid">当开关关闭时显示: |
|
|
|
<el-tree-select v-model="controlData.control.glxxszSwitch[1].showFields" style="width: 100%" :data="associatedFormsCurrentFormFieldTreeForGlxxsz[0].children" multiple /> |
|
|
|
<div style="display:flex"><span style="font-size: larger;margin-left: 35px;margin-right: 15px;">当开关关闭时显示</span> |
|
|
|
<el-tree-select v-model="controlData.control.glxxszSwitch[1].showFields" style="width: 60%" :data="associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf[0].children" multiple /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- <el-table |
|
|
|
|