From 35251d1874fbd2bb361eab915190d8a209d1aa65 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 13 Mar 2026 10:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B6=E9=A1=B6=E9=A1=B6?= =?UTF-8?q?=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6?= =?UTF-8?q?=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6=E9=A1=B6?= =?UTF-8?q?=E9=A1=B6=E9=A1=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appPageForm/unitsPageFrom/attribute.vue | 103 +++++++++++------- .../appPageForm/unitsPageFrom/design.vue | 14 +-- 2 files changed, 69 insertions(+), 48 deletions(-) diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/unitsPageFrom/attribute.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/unitsPageFrom/attribute.vue index fb9537a..17e12e4 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/unitsPageFrom/attribute.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/unitsPageFrom/attribute.vue @@ -42,8 +42,8 @@ import errimg from "@/assets/404_images/untilUploadImg.png"; const transferSelectUserRangeData = ref({"type":"lowcodeTransfer","unitName":"请选择","iconFont":"fa-arrows-h","control":{"modelValue":[],"fixedOptions":[{"id":"thefirstrootnode","label":"根节点1","unitName":"","disabled":false,"children":[]},{"id":"thesecondrootnode","label":"根节点2","unitName":"","disabled":false,"children":[]}]},"config":{"transferName":"请选择","transferDataSource":"数据源","apiUrl":"/javasys/lowCode/transfer/getOrgAndManTree","method":"post"},"name":"lowcodeTransfer1758525493710","item":{"label":"穿梭框"},"styles":{"divStyle":{"divbox":"all","transparency":100},"labelStyle":{"divbox":"all","transparency":100},"inputStyle":{"transparency":100}}}) - - +const preFillDialogFlag = ref(false) +const upload = ref(); const props = withDefaults( //接收父级参数 defineProps<{ @@ -93,10 +93,12 @@ const emits = defineEmits<{ const { formConfig, formData, formInfo } = toRefs(props); const dataSourceOption = ref([]); const designType = inject("formDesignType"); +const resDataForGlxxszExceptself= ref([]); //////////////////////////////////////////////// +const userRangeDialogFlag = ref(false) // Local ref for AI config to avoid direct prop modification const localAiConfig = ref(props.formInfo.aiConfig || []); - +const fileSignAry = reactive([]); // Watch for changes in formInfo.aiConfig and update local ref watch(() => formInfo.value?.aiConfig, (newVal) => { localAiConfig.value = newVal || []; @@ -104,7 +106,7 @@ watch(() => formInfo.value?.aiConfig, (newVal) => { // Watch for changes in localAiConfig and emit back to parent watch(() => localAiConfig.value, (newVal) => { - console.log("localAiConfig.value",newVal) + // console.log("localAiConfig.value",newVal) if (formInfo.value) { const updatedFormInfo = { ...formInfo.value }; updatedFormInfo.aiConfig = newVal; @@ -132,6 +134,7 @@ const total = ref(10) const aft = ref(); const aftRange = ref(); const roleTree = ref([]); +const associatedFormsHideDialogFlag = ref(false); //表单基础设置 const page = ref(1); const pageSize = ref(200000); @@ -145,6 +148,8 @@ const roleTreeFilterText = ref(""); const fieldTreeRef = ref>(); const orgTreeRef = ref>(); const roleTreeRef = ref>(); +let resDataForGlxxszExceptself1: any[] = []; +const videoIndex = ref(0); watch(fieldTreeFilterText, (val) => { fieldTreeRef.value!.filter(val); }); @@ -154,6 +159,28 @@ watch(orgTreeFilterText, (val) => { watch(roleTreeFilterText, (val) => { roleTreeRef.value!.filter(val); }); + +const multipleSelection = ref([]) + +interface User { + id: number + name: string + number: string + key: string + +} +const componentKey = ref(0); +const showImagePreview = ref(false); +//关联表单 +const customerFormTree = ref([]); +const fieldTreeSearchFlag = ref(false); +const roleTreeSearchFlag = ref(false); +// 使用 ref 替代 computed,使其可写 +const zdtcszTableData = ref([]) +const multipleTableRef = ref() +// 定义treeSelectRef +const treeSelectRef = ref(); +const unitFormList = ref([]); /** @ 作者: 秦东 @ 时间: 2026-02-25 11:36:09 @@ -1371,7 +1398,7 @@ const formidChangedOptionsValue3 = () => { } -let resDataForGlxxszExceptself1: any[] = []; + /** @ 作者: 秦东 @ 时间: 2026-02-25 15:57:30 @@ -1467,7 +1494,7 @@ watch(() => store.activeKey, (val: string) => { // // resDataForGlxxszExceptself1 = JSON.parse(JSON.stringify(resDataForGlxxszExceptself.value)); // } // console.log(resDataForGlxxszExceptself1) - + resDataForGlxxszExceptself1 = JSON.parse(JSON.stringify(resDataForGlxxszExceptself.value)); for (let i = 0; i < resDataForGlxxszExceptself1.length; i++) { let strArr: [string] = resDataForGlxxszExceptself1[i].id.split(":"); // console.log(strArr) @@ -1479,7 +1506,7 @@ watch(() => store.activeKey, (val: string) => { i--; // 如果不减,将漏掉一个元素 } } - //console.log(resDataForGlxxszExceptself1); + console.log("getAssociatedFormsCurrentFieldTreeData.value--->",getAssociatedFormsCurrentFieldTreeData.value); if ( getAssociatedFormsCurrentFieldTreeData.value && getAssociatedFormsCurrentFieldTreeData.value.treeAttrs && @@ -1504,7 +1531,7 @@ watch(() => store.activeKey, (val: string) => { immediate: true, }) -const fileSignAry = reactive([]); + /** @ 作者: 秦东 @ 时间: 2026-02-25 16:28:28 @@ -1921,7 +1948,7 @@ const beforeRemove = ():boolean => { @ 功能: 上传成功钩子 */ //每个视频上传控件对应一个videoMsg[videoIndex] -const videoIndex = ref(0); + const videoUploadOk = (response: any) => { const { control = {} }: { control: any } = controlData.value; control.videoMsg[videoIndex.value].url = response.data.url; @@ -1951,7 +1978,7 @@ const videoUploadErr = (error: Error) => { @ 功能: 检查文件类型 更改已上传的视频:el-upload中设置 limit 和 on-exceed 可以在选中时自动替换上一个文件。 */ -const upload = ref(); + const handleExceed: UploadProps["onExceed"] = (files) => { upload.value!.clearFiles(); const file = files[0] as UploadRawFile; @@ -1988,7 +2015,7 @@ const lowcodeImageUploadSuccess = ( @ 时间: 2026-02-26 13:24:24 @ 功能: 子表预填充设置 */ -const preFillDialogFlag = ref(false) + const preFillDialogShow = () => { preFillDialogFlag.value = true console.log("子表预填充设置----->",preFillDialogFlag.value) @@ -2002,7 +2029,7 @@ const preFillDialogDetermine = () => { @ 时间: 2026-02-26 13:27:17 @ 功能: 用户组织联动选择 showSelectOrgConnectUser */ -const selectOrgConnectUserDialogFlag = ref(false) + const showSelectOrgConnectUser = () => { console.log("showSelectOrgConnectUser--------->",selectOrgConnectUserDialogFlag.value) selectOrgConnectUserDialogFlag.value = true @@ -2047,7 +2074,7 @@ const queryAllRole = () => { @ 时间: 2026-02-26 13:34:01 @ 功能: 选择用户数据范围 */ -const userRangeDialogFlag = ref(false) + const handleUserRangeDialogFlag = () => { userRangeDialogFlag.value = true if(controlData.value.control.queryBy=='role'){ @@ -2071,7 +2098,7 @@ const formatTooltip = (val: number) => { @ 功能: 点击开启隐藏设置 */ //关联表单隐藏条件弹窗flag -const associatedFormsHideDialogFlag = ref(false); + const associatedFormsHideDialoghandle = () => { associatedFormsHideDialogFlag.value = true controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml; @@ -2088,7 +2115,7 @@ watch(()=>associatedFormsHideDialogFlag.value, (val) => { } }); // -const associatedFormsChooseDialogFlag = ref(false); + const chooseAssociatedForm = () => { getCustomerFormTree(); associatedFormsChooseDialogFlag.value = true; @@ -2136,7 +2163,7 @@ const associatedFormsCurrentFormFieldTree = ref(); const associatedFormsCurrentFormFieldTree1 = ref(); const currentFormChildTableFieldsForFillRole = ref(); const associatedFormsCurrentFormFieldTreeNoTable1 = ref([]); -const resDataForGlxxszExceptself= ref([]); + const associatedFormsCurrentFormFieldTreeForGlxxsz = ref(); const associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref(); let currentChildTableCount = 0 @@ -3014,7 +3041,7 @@ const beforeAvatarUpload: UploadProps["beforeUpload"] = (rawFile) => { const getAssociatedFormsCurrentFieldTree1 = () => { getAssociatedFormsCurrentFieldTree(props.customerformid).then(({ data }) => { - // console.log(data) + console.log("获取关联表单字段--------------------->",data) getAssociatedFormsCurrentFieldTreeData.value = JSON.parse(JSON.stringify(data)); // console.log(getAssociatedFormsCurrentFieldTreeData) if (data.id === "cfid为空" || data.id === "masterTable为null") { @@ -3260,7 +3287,7 @@ const getDataSource = () => { //关联表单数据填充时无法获取当前表单新增且保存的字段,只有关闭重启后方能获取----bug修改 //穿梭框编辑固定选项时,修改的节点无法立即预览到,需保存后退出重进才能预览到修改后的----bug修改 */ -const showAssociatedFormsFillRole = ref(true); + const saveRefreshFormControlAttr = () => { getAssociatedFormsCurrentFieldTree1(); showAssociatedFormsFillRole.value = false; @@ -3308,10 +3335,7 @@ const addPickTracn = () => { -const unitFormList = ref([]); -const currentAsfChangeCount = ref(0); -const asfsExpectCurrent = ref([]); -const asfs = ref([]); + /** @ 作者: 秦东 @ 时间: 2026-02-27 13:58:13 @@ -3499,16 +3523,7 @@ const handleExpandTabChange = () => { } } -const multipleSelection = ref([]) -interface User { - id: number - name: string - number: string - key: string - -} -const componentKey = ref(0); const reRenderComponent = () => { componentKey.value++; @@ -3666,7 +3681,7 @@ const changeCurrentUploadImgid = (clickedRow: any) => { }; //图片展示显示控制 -const showImagePreview = ref(false); + /** @ 作者: 秦东 @ 时间: 2026-02-28 15:37:09 @@ -3811,8 +3826,8 @@ const remove = (node: TreeNode, data: Tree) => { dataSource.value = [...dataSource.value]; } }; -//关联表单 -const customerFormTree = ref([]); + + /** @ 作者: 秦东 @ 时间: 2026-02-28 16:47:42 @@ -3871,7 +3886,7 @@ const treeDefaultProps = { children: "children", label: "label", }; -const fieldTreeSearchFlag = ref(false); + const filterNode = (value: string, data: any) => { if (!value) return true; return data.label ? data.label.includes(value) : false; @@ -3920,7 +3935,6 @@ const getRoleTree = async () => { }); }; -const roleTreeSearchFlag = ref(false); const handleRoleTreeExpand = () => { roleTreeSearchFlag.value = true; } @@ -4792,8 +4806,8 @@ const titleOptions = computed(() => { // 将空值选项放在正常选项后面,键改为'未选择' return [...options, { label: '未选择', value: 'notChosen' }] }) -// 使用 ref 替代 computed,使其可写 -const zdtcszTableData = ref([]) + + /** @ 作者: 秦东 @ 时间: 2026-03-02 16:53:31 @@ -5085,6 +5099,9 @@ const glxxszTree = computed(()=>{ } console.log(datapropsformList) + console.log(associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value) + + if(associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value && associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value[0].children && associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf.value[0].children.length>0){ @@ -5576,7 +5593,9 @@ function mergeFormTrees(treeA: any[], treeB: any[]) { return cTree; } -const multipleTableRef = ref() + + + /** * 提取字符串中最后一个英文冒号后的内容,无冒号则返回原字符串 * @param {string} str - 输入的字符串 @@ -6039,8 +6058,9 @@ const asfsCurrentTable = computed(()=>{ return result }) -// 定义treeSelectRef -const treeSelectRef = ref(); + + + const handleTreeSelectChange = (value: any) => { console.log(value) @@ -8543,6 +8563,7 @@ const updataBase = (val: any) => { />
+ {{zdtcszTableData}}
{{ currentComponentOptions }} { // 表单组件值改变事件 tProp为子表格相关 provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) => { - console.log("表单组件值改变事件----------1--------->", key); - console.log("表单组件值改变事件----------2--------->", value); - console.log("表单组件值改变事件----------3--------->", data); - console.log("表单组件值改变事件----------4--------->", tProp); - console.log("表单组件值改变事件----------5--------->", type); - console.log("表单组件值改变事件----------6--------->", attribute); - console.log("表单组件值改变事件----------11--------->", model.value); + // console.log("表单组件值改变事件----------1--------->", key); + // console.log("表单组件值改变事件----------2--------->", value); + // console.log("表单组件值改变事件----------3--------->", data); + // console.log("表单组件值改变事件----------4--------->", tProp); + // console.log("表单组件值改变事件----------5--------->", type); + // console.log("表单组件值改变事件----------6--------->", attribute); + // console.log("表单组件值改变事件----------11--------->", model.value); let fieldVal: Record = {}; for (let i in model.value) {