|
|
@ -1201,7 +1201,7 @@ const delSelectOption = (index: number, type?: string) => { |
|
|
//liwenxuan 20240508 checkbox 删除选项时提醒 start |
|
|
//liwenxuan 20240508 checkbox 删除选项时提醒 start |
|
|
let delflag = true |
|
|
let delflag = true |
|
|
let breakFlag = 0 |
|
|
let breakFlag = 0 |
|
|
if(controlData.value.type === 'checkbox'){ |
|
|
if(controlData.value.type === 'checkbox'&& controlData.value.config.optionsType==0){ |
|
|
for(var i = 0;i < controlData.value.control.glxxszForCheckBox.length;i ++){ |
|
|
for(var i = 0;i < controlData.value.control.glxxszForCheckBox.length;i ++){ |
|
|
if(breakFlag>0){ |
|
|
if(breakFlag>0){ |
|
|
break |
|
|
break |
|
|
@ -2076,6 +2076,7 @@ function formidChangedOptionsValue3(){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const associatedFormsCurrentFormFieldTree = ref<Tree[]>() |
|
|
const associatedFormsCurrentFormFieldTree = ref<Tree[]>() |
|
|
|
|
|
const associatedFormsCurrentFormFieldTreeNoTable = ref<Tree[]>() |
|
|
const associatedFormsCurrentFormFieldTreeForGlxxsz = ref<Tree[]>() |
|
|
const associatedFormsCurrentFormFieldTreeForGlxxsz = ref<Tree[]>() |
|
|
let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref<Tree[]>() |
|
|
let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref<Tree[]>() |
|
|
let resDataForGlxxszExceptself: any[] = [] |
|
|
let resDataForGlxxszExceptself: any[] = [] |
|
|
@ -2089,20 +2090,30 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
//alert("cfid为空") |
|
|
//alert("cfid为空") |
|
|
}else{ |
|
|
}else{ |
|
|
let resData = ref(data.children) |
|
|
let resData = ref(data.children) |
|
|
|
|
|
let resDataNoTable = JSON.parse(JSON.stringify(data.children)) |
|
|
|
|
|
|
|
|
//let rootid_ = data.value.label |
|
|
//let rootid_ = data.value.label |
|
|
associatedFormsCurrentFormFieldTree.value = [{ |
|
|
associatedFormsCurrentFormFieldTree.value = [{ |
|
|
id: 'rootid_'+data.label, |
|
|
id: 'rootid_'+data.label, |
|
|
//label: '当前表单', |
|
|
|
|
|
label: '当前表单-'+data.treeAttrs.show, |
|
|
label: '当前表单-'+data.treeAttrs.show, |
|
|
children: [...resData.value], |
|
|
children: [...resData.value], |
|
|
treeAttrs: data.treeAttrs, |
|
|
treeAttrs: data.treeAttrs, |
|
|
}] |
|
|
}] |
|
|
|
|
|
|
|
|
|
|
|
resDataNoTable = resDataNoTable.filter((item: { type: string | null }) => item.type!="table") |
|
|
|
|
|
|
|
|
|
|
|
associatedFormsCurrentFormFieldTreeNoTable.value = [{ |
|
|
|
|
|
id: 'rootid_'+data.label, |
|
|
|
|
|
label: '当前表单-'+data.treeAttrs.show, |
|
|
|
|
|
children: [...resDataNoTable], |
|
|
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
|
|
}] |
|
|
|
|
|
|
|
|
let resDataForGlxxsz = ref(data.children.slice(8)) |
|
|
let resDataForGlxxsz = ref(data.children.slice(8)) |
|
|
|
|
|
|
|
|
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value)); |
|
|
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value)); |
|
|
|
|
|
|
|
|
// console.log(resDataForGlxxszExceptself) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2305,9 +2316,20 @@ function aftTextChanged(str:string){ |
|
|
controlData.value.control.hideConditionHtml = str |
|
|
controlData.value.control.hideConditionHtml = str |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function aftGongshiChanged(gongshi:any){ |
|
|
|
|
|
controlData.value.control.hideGongShi.formulaHtml = gongshi.formulaHtml |
|
|
|
|
|
controlData.value.control.hideGongShi.mathsFormula = gongshi.mathsFormula |
|
|
|
|
|
controlData.value.control.hideGongShi.mathsString = gongshi.mathsString |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function aftTextChangedRange(str:string){ |
|
|
function aftTextChangedRange(str:string){ |
|
|
controlData.value.control.dataRangeConditionHtml = str |
|
|
controlData.value.control.dataRangeConditionHtml = str |
|
|
} |
|
|
} |
|
|
|
|
|
function aftGongshiChangedRange(gongshi:any){ |
|
|
|
|
|
controlData.value.control.dataRangeGongShi.formulaHtml = gongshi.formulaHtml |
|
|
|
|
|
controlData.value.control.dataRangeGongShi.mathsFormula = gongshi.mathsFormula |
|
|
|
|
|
controlData.value.control.dataRangeGongShi.mathsString = gongshi.mathsString |
|
|
|
|
|
} |
|
|
//asf隐藏条件取消编辑 |
|
|
//asf隐藏条件取消编辑 |
|
|
function asfhTextCancel(){ |
|
|
function asfhTextCancel(){ |
|
|
determine.value = false |
|
|
determine.value = false |
|
|
@ -2479,30 +2501,32 @@ watch(()=>controlData.value.control,(newVal) => { |
|
|
//radio,select添加选项时同步配置选项 |
|
|
//radio,select添加选项时同步配置选项 |
|
|
watch(()=>controlData.value.options, (changedOptions:any) => { |
|
|
watch(()=>controlData.value.options, (changedOptions:any) => { |
|
|
if(controlData.value.type === "radio" || controlData.value.type === "select"){ |
|
|
if(controlData.value.type === "radio" || controlData.value.type === "select"){ |
|
|
if(changedOptions.length===0){ |
|
|
if(controlData.value.config.optionsType==0){ |
|
|
//删没了option |
|
|
if(changedOptions.length===0){ |
|
|
controlData.value.control.glxxsz = [] |
|
|
//删没了option |
|
|
}else{ |
|
|
controlData.value.control.glxxsz = [] |
|
|
if(changedOptions.length < controlData.value.control.glxxsz.length){ |
|
|
|
|
|
//删除了某个option |
|
|
|
|
|
controlData.value.control.glxxsz = controlData.value.control.glxxsz.filter((item: { optionValue: any }) => changedOptions.find((bItem: { value: any }) => item.optionValue == bItem.value)) |
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
for(var i = 0; i < changedOptions.length; i++){ |
|
|
if(changedOptions.length < controlData.value.control.glxxsz.length){ |
|
|
if(controlData.value.control.glxxsz[i]===undefined){ |
|
|
//删除了某个option |
|
|
//新增了某个option |
|
|
controlData.value.control.glxxsz = controlData.value.control.glxxsz.filter((item: { optionValue: any }) => changedOptions.find((bItem: { value: any }) => item.optionValue == bItem.value)) |
|
|
controlData.value.control.glxxsz.push( |
|
|
}else{ |
|
|
{ |
|
|
for(var i = 0; i < changedOptions.length; i++){ |
|
|
conditionField: controlData.value.name, |
|
|
if(controlData.value.control.glxxsz[i]===undefined){ |
|
|
optionLabel: changedOptions[i].label, |
|
|
//新增了某个option |
|
|
optionValue: changedOptions[i].value, |
|
|
controlData.value.control.glxxsz.push( |
|
|
tableIndex: i, |
|
|
{ |
|
|
id: uuidv4().replaceAll('-','').toString(), |
|
|
conditionField: controlData.value.name, |
|
|
} |
|
|
optionLabel: changedOptions[i].label, |
|
|
) |
|
|
optionValue: changedOptions[i].value, |
|
|
}else{ |
|
|
tableIndex: i, |
|
|
//修改了某个option |
|
|
id: uuidv4().replaceAll('-','').toString(), |
|
|
controlData.value.control.glxxsz[i].optionLabel = changedOptions[i].label |
|
|
} |
|
|
controlData.value.control.glxxsz[i].optionValue = changedOptions[i].value |
|
|
) |
|
|
|
|
|
}else{ |
|
|
|
|
|
//修改了某个option |
|
|
|
|
|
controlData.value.control.glxxsz[i].optionLabel = changedOptions[i].label |
|
|
|
|
|
controlData.value.control.glxxsz[i].optionValue = changedOptions[i].value |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -2514,18 +2538,22 @@ watch(()=>controlData.value.options, (changedOptions:any) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function createRowForGlxxsz(){ |
|
|
function createRowForGlxxsz(){ |
|
|
controlData.value.control.glxxszForCheckBox.push( |
|
|
if(controlData.value.config.optionsType==0){ |
|
|
{ |
|
|
controlData.value.control.glxxszForCheckBox.push( |
|
|
conditionField: controlData.value.name, |
|
|
{ |
|
|
selectedOptions:[], |
|
|
conditionField: controlData.value.name, |
|
|
showFields:[], |
|
|
selectedOptions:[], |
|
|
id: uuidv4().replaceAll('-','').toString(), |
|
|
showFields:[], |
|
|
} |
|
|
id: uuidv4().replaceAll('-','').toString(), |
|
|
) |
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function deleteRowForGlxxsz(row: { id: any }){ |
|
|
function deleteRowForGlxxsz(row: { id: any }){ |
|
|
controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id) |
|
|
if(controlData.value.config.optionsType==0){ |
|
|
|
|
|
controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter((item: { id: any }) => item.id!=row.id) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
/* */ |
|
|
/* */ |
|
|
|
|
|
|
|
|
@ -2542,6 +2570,13 @@ function handleDetermineoptionsValue3(){ |
|
|
//liwenxuan20240426 单选多选下拉 关联选项设置 end |
|
|
//liwenxuan20240426 单选多选下拉 关联选项设置 end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function optionsTypeChanged(){ |
|
|
|
|
|
controlData.value.config.optionsFun = '' |
|
|
|
|
|
controlData.value.options = [] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const optionsCss = [ |
|
|
const optionsCss = [ |
|
|
@ -3172,13 +3207,13 @@ const disabledIstrue = (val:string) => { |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="showHide(['switch'],true)"> |
|
|
<div v-if="showHide(['switch'],true)&&controlData.config.optionsType==0"> |
|
|
<el-button @click="handelGlxxszDialogSwitch">关联选项设置</el-button> |
|
|
<el-button @click="handelGlxxszDialogSwitch">关联选项设置</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="showHide(['radio','select',],true)"> |
|
|
<div v-if="showHide(['radio','select',],true)&&controlData.config.optionsType==0"> |
|
|
<el-button @click="handelGlxxszDialog">关联选项设置</el-button> |
|
|
<el-button @click="handelGlxxszDialog">关联选项设置</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="showHide(['checkbox',],true)"> |
|
|
<div v-if="showHide(['checkbox',],true)&&controlData.config.optionsType==0"> |
|
|
<el-button @click="handelGlxxszDialogCheckbox">关联选项设置</el-button> |
|
|
<el-button @click="handelGlxxszDialogCheckbox">关联选项设置</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
@ -3207,7 +3242,7 @@ const disabledIstrue = (val:string) => { |
|
|
<el-form-item label="选项数据源" class="form_cont"> |
|
|
<el-form-item label="选项数据源" class="form_cont"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="controlData.config.optionsType" |
|
|
v-model="controlData.config.optionsType" |
|
|
@change="controlData.config.optionsFun = ''" |
|
|
@change="optionsTypeChanged" |
|
|
> |
|
|
> |
|
|
<el-option :value="0" label="固定选项" /> |
|
|
<el-option :value="0" label="固定选项" /> |
|
|
<el-option :value="3" label="系统表单字段"/> |
|
|
<el-option :value="3" label="系统表单字段"/> |
|
|
@ -3494,6 +3529,20 @@ const disabledIstrue = (val:string) => { |
|
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon> |
|
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item class="form_cont"> |
|
|
|
|
|
|
|
|
|
|
|
数据标题 |
|
|
|
|
|
<el-tree-select |
|
|
|
|
|
v-model="formData.dataTitle" |
|
|
|
|
|
multiple |
|
|
|
|
|
clearable |
|
|
|
|
|
collapse-tags |
|
|
|
|
|
:data="associatedFormsCurrentFormFieldTreeNoTable" |
|
|
|
|
|
:render-after-expand="false" |
|
|
|
|
|
style="width: 240px" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<template v-if="!state.isSearch"> |
|
|
<template v-if="!state.isSearch"> |
|
|
<el-divider content-position="left">接口数据事件</el-divider> |
|
|
<el-divider content-position="left">接口数据事件</el-divider> |
|
|
@ -3859,7 +3908,7 @@ const disabledIstrue = (val:string) => { |
|
|
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain"> |
|
|
<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 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 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> |
|
|
<AssociatedFormsTinyace ref="aft" :aft-text="controlData.control.hideConditionHtml" :aft-text-copy = "controlData.control.hideConditionHtmlCopy" @text-change = "aftTextChanged" @gongshi-change = "aftGongshiChanged"></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;"> |
|
|
<!-- <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>插入函数 |
|
|
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 |
|
|
</div> --> |
|
|
</div> --> |
|
|
@ -3969,7 +4018,7 @@ const disabledIstrue = (val:string) => { |
|
|
<el-main style="border: 1px solid gainsboro; padding: 3px;" class="associatedFormsHideDialogMain"> |
|
|
<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 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 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> |
|
|
<AssociatedFormsTinyaceRange ref="aftRange" :aft-text="controlData.control.dataRangeConditionHtml" :aft-text-copy = "controlData.control.dataRangeConditionHtmlCopy" @text-change = "aftTextChangedRange" @gongshi-change = "aftGongshiChangedRange"></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;"> |
|
|
<!-- <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>插入函数 |
|
|
<span style="color: #4189EF;font:6px;margin-right: 5px;">fx</span>插入函数 |
|
|
</div> --> |
|
|
</div> --> |
|
|
@ -4043,7 +4092,7 @@ const disabledIstrue = (val:string) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="controlData.type=='radio'||controlData.type=='select'"> |
|
|
<template v-if="(controlData.type=='radio'||controlData.type=='select')&&controlData.config.optionsType==0"> |
|
|
|
|
|
|
|
|
<el-table |
|
|
<el-table |
|
|
:data="controlData.options" stripe border style="width: 100%;min-height:50px;max-height:500px;overflow-y:auto" |
|
|
:data="controlData.options" stripe border style="width: 100%;min-height:50px;max-height:500px;overflow-y:auto" |
|
|
|