|
|
|
@ -204,7 +204,7 @@ const formAttr = computed(() => { |
|
|
|
] |
|
|
|
}) |
|
|
|
const attrList = computed(() => { |
|
|
|
// console.log("controlData.value-1-->",controlData.value) |
|
|
|
console.log("controlData.value-1-->",controlData.value) |
|
|
|
if (Object.keys(controlData.value).length) { |
|
|
|
const { |
|
|
|
control = {}, |
|
|
|
@ -214,10 +214,11 @@ const attrList = computed(() => { |
|
|
|
item = {}, |
|
|
|
attr = {}, |
|
|
|
selectvalue = "default", |
|
|
|
mathFormula = {} |
|
|
|
}: { control: any;type:any;name:any;item:any;attr:any; config: any,selectvalue:any,mathFormula:any } = controlData.value |
|
|
|
// console.log("controlData.value--->",controlData.value) |
|
|
|
// console.log("controlData.value-1-->",control,selectvalue) |
|
|
|
mathFormula = {}, |
|
|
|
unitName |
|
|
|
}: { control: any;type:any;name:any;item:any;attr:any; config: any,selectvalue:any,mathFormula:any,unitName:any } = controlData.value |
|
|
|
console.log("controlData.value--->",controlData.value) |
|
|
|
console.log("controlData.value-1-->",unitName) |
|
|
|
let columnIndex = false // 是否显示序号列 |
|
|
|
if (type === 'table') { |
|
|
|
// 表格时处理 |
|
|
|
@ -228,6 +229,12 @@ const attrList = computed(() => { |
|
|
|
} |
|
|
|
|
|
|
|
const temp =reactive<PublicAtrr[]>([ |
|
|
|
{ |
|
|
|
label: '组件类型', |
|
|
|
value: unitName, |
|
|
|
placeholder: '组件类型', |
|
|
|
path: 'unitName' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '自定义Class', |
|
|
|
value: config.className, |
|
|
|
@ -1387,7 +1394,7 @@ const tableColumnAdd = (val: string) => { |
|
|
|
// 校验规则必填勾选设置,存在校验规则时勾选 |
|
|
|
const checkboxRequired = computed(() => { |
|
|
|
const val = controlData.value && controlData.value.item?.rules |
|
|
|
console.log("校验规则必填勾选设置",val && val.length > 0) |
|
|
|
// console.log("校验规则必填勾选设置",val && val.length > 0) |
|
|
|
if(val && val.length > 0){ |
|
|
|
return true |
|
|
|
}else{ |
|
|
|
@ -1540,7 +1547,7 @@ const eventClick = (type: string, tooltip?: string) => { |
|
|
|
defineExpose({ getFormFieldBySource }) |
|
|
|
//判断输入框是否可写 |
|
|
|
const isNotWrite = (val:any) =>{ |
|
|
|
console.log("判断输入框是否可写--->",val,props.customerformid) |
|
|
|
// console.log("判断输入框是否可写--->",val,props.customerformid) |
|
|
|
if(val.key === "name" && props.customerformid != ""){ |
|
|
|
return true |
|
|
|
} |
|
|
|
@ -1586,13 +1593,13 @@ const updataDigit = (key:string,val:any) => { |
|
|
|
// console.log("默认值处理-1-->",props.formList) |
|
|
|
// console.log("默认值处理-2-->",props.formConfig) |
|
|
|
// console.log("默认值处理--3->",props.formOtherData) |
|
|
|
console.log("默认值处理--4->",val) |
|
|
|
// console.log("默认值处理--4->",val) |
|
|
|
formConfig.value[key] = { |
|
|
|
mathsFormula:val.mathsFormula, |
|
|
|
takingMethod:val.takingMethod, |
|
|
|
digit:val.digit |
|
|
|
} |
|
|
|
console.log("返回值处理--->",formConfig.value) |
|
|
|
// console.log("返回值处理--->",formConfig.value) |
|
|
|
attrList.value.forEach((item:any)=>{ |
|
|
|
// console.log("返回值处理--1->",item) |
|
|
|
if(item.type == "digitpage"){ |
|
|
|
@ -1652,7 +1659,7 @@ const videoIndex = ref(0); |
|
|
|
//上传失败钩子 |
|
|
|
function videoUploadErr(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles){ |
|
|
|
alert("上传失败,请重试") |
|
|
|
console.log("上传失败"+error); |
|
|
|
// console.log("上传失败"+error); |
|
|
|
} |
|
|
|
|
|
|
|
//liwenxuan 20240108 vidioupload end |
|
|
|
@ -1684,9 +1691,9 @@ const showImagePreview = ref(false) |
|
|
|
if(controlData.value.type==='lowcodeCarsusel'){ |
|
|
|
const carsuselConfigData:CarsuselConfig[] = controlData.value.control.carsuselConfigArr |
|
|
|
carsuselConfigData.forEach(element => { |
|
|
|
//console.log(element) |
|
|
|
// console.log(element) |
|
|
|
if(element.imgId==''){ |
|
|
|
//console.log("初始化imgid") |
|
|
|
// console.log("初始化imgid") |
|
|
|
let onlyNumber = uuidv4().replaceAll('-','').toString(); //获取唯一编码 |
|
|
|
element.imgId = onlyNumber; |
|
|
|
} |
|
|
|
@ -1695,21 +1702,21 @@ const showImagePreview = ref(false) |
|
|
|
controlData.value.control.fillRoles[0].id = uuidv4().replaceAll('-','').toString(); |
|
|
|
} |
|
|
|
//实现关联表单设置可选字段中没有当前字段效果 start |
|
|
|
//console.log(controlData.value.name) |
|
|
|
// console.log(controlData.value.name) |
|
|
|
resDataForGlxxszExceptself1 = JSON.parse(JSON.stringify(resDataForGlxxszExceptself)); |
|
|
|
//console.log(resDataForGlxxszExceptself1) |
|
|
|
// console.log(resDataForGlxxszExceptself1) |
|
|
|
|
|
|
|
for(let i = 0;i<resDataForGlxxszExceptself1.length;i++){ |
|
|
|
let strArr:[string] = resDataForGlxxszExceptself1[i].id.split(":") |
|
|
|
//console.log(strArr) |
|
|
|
// console.log(strArr) |
|
|
|
let str = strArr[strArr.length-1] |
|
|
|
//console.log(str) |
|
|
|
// console.log(str) |
|
|
|
if(str==newVal){ |
|
|
|
resDataForGlxxszExceptself1.splice(i, 1); // 将使后面的元素依次前移,数组长度减1 |
|
|
|
i--; // 如果不减,将漏掉一个元素 |
|
|
|
} |
|
|
|
} |
|
|
|
//console.log(resDataForGlxxszExceptself1) |
|
|
|
// console.log(resDataForGlxxszExceptself1) |
|
|
|
if(getAssociatedFormsCurrentFieldTreeData.treeAttrs!=undefined){ |
|
|
|
associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value = [{ |
|
|
|
id: 'rootid_'+getAssociatedFormsCurrentFieldTreeData.label, |
|
|
|
@ -2031,7 +2038,7 @@ function formidChangedOptionsValue3(){ |
|
|
|
arr = arr.filter( (item: { label: any }) => item.label == data.treeAttrs.onlyToShowTableId ) |
|
|
|
|
|
|
|
arr = arr[0].children |
|
|
|
//console.log(arr) |
|
|
|
// console.log(arr) |
|
|
|
asfasfFieldTreeOptionsValue3.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '关联的表单-'+data.label, |
|
|
|
@ -2075,9 +2082,9 @@ let resDataForGlxxszExceptself: any[] = [] |
|
|
|
let resDataForGlxxszExceptself1: any[] = [] |
|
|
|
let getAssociatedFormsCurrentFieldTreeData:any |
|
|
|
getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
//console.log(data) |
|
|
|
// console.log(data) |
|
|
|
getAssociatedFormsCurrentFieldTreeData = JSON.parse(JSON.stringify(data)) |
|
|
|
//console.log(getAssociatedFormsCurrentFieldTreeData) |
|
|
|
// console.log(getAssociatedFormsCurrentFieldTreeData) |
|
|
|
if(data.id==="cfid为空"){ |
|
|
|
//alert("cfid为空") |
|
|
|
}else{ |
|
|
|
@ -2095,7 +2102,7 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
|
|
|
|
resDataForGlxxszExceptself = JSON.parse(JSON.stringify(resDataForGlxxsz.value)); |
|
|
|
|
|
|
|
//console.log(resDataForGlxxszExceptself) |
|
|
|
// console.log(resDataForGlxxszExceptself) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2147,7 +2154,7 @@ getAssociatedFormsOrgAndManTree().then(({ data }) => { |
|
|
|
const roleTree = ref<Tree[]>() |
|
|
|
getAssociatedFormsRoleTree().then(({ data }) => { |
|
|
|
let resData = ref(data.children) |
|
|
|
//console.log("roleTree=============="+resData.value); |
|
|
|
// console.log("roleTree=============="+resData.value); |
|
|
|
roleTree.value = [{ |
|
|
|
id: data.id, |
|
|
|
//label: data.label, |
|
|
|
@ -2558,7 +2565,7 @@ function optionsTypeChanged(){ |
|
|
|
] |
|
|
|
const layouytStyle = reactive<any>(controlData.value.styles) |
|
|
|
watch(()=>layouytStyle,(val : any)=>{ |
|
|
|
console.log("监听样式处理",val) |
|
|
|
// console.log("监听样式处理",val) |
|
|
|
controlData.value.styles = val |
|
|
|
// Object.assign(store.controlAttr.styles.divStyle, val) |
|
|
|
}, |
|
|
|
@ -2595,7 +2602,7 @@ const handleAvatarSuccess: UploadProps['onSuccess'] = ( |
|
|
|
} |
|
|
|
|
|
|
|
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => { |
|
|
|
console.log("beforeAvatarUpload",rawFile.type) |
|
|
|
// console.log("beforeAvatarUpload",rawFile.type) |
|
|
|
if (rawFile.type !== 'image/jpeg' && rawFile.type !== 'image/jpg' && rawFile.type !== 'image/png' && rawFile.type !== 'image/gif' && rawFile.type !== 'image/icon') { |
|
|
|
ElMessage.error('请上传以下格式的图片(jpg、jpeg、png、gif、icon)!'+rawFile.type) |
|
|
|
return false |
|
|
|
@ -2625,7 +2632,7 @@ const gainFormGroupList = () =>{ |
|
|
|
} |
|
|
|
customerFormGroupList(sendInfo) |
|
|
|
.then((data)=>{ |
|
|
|
console.log("获取表单分组",data) |
|
|
|
// console.log("获取表单分组",data) |
|
|
|
formGroup.value = data.data |
|
|
|
}) |
|
|
|
.finally(()=>{ |
|
|
|
@ -2704,7 +2711,7 @@ const disabledIstrue = (val:string) => { |
|
|
|
<!-- <div class=""><h3>通用属性</h3></div> --> |
|
|
|
<el-divider content-position="left">通用属性</el-divider> |
|
|
|
<template v-for="(item, index) in attrList" :key="index"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="item.label" class="form_cont"> |
|
|
|
<el-select |
|
|
|
@ -3038,7 +3045,16 @@ const disabledIstrue = (val:string) => { |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-row v-else-if="item.path === 'unitName'"> |
|
|
|
<el-input |
|
|
|
:type="item.inputStyle" |
|
|
|
v-model="item.value" |
|
|
|
:placeholder="item.placeholder" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-input |
|
|
|
v-else |
|
|
|
|