From 71dda8466c59ee59d17883a2528c14361ab931ff Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 12 Apr 2024 08:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/formControlAttr.vue | 530 +----------------- src/types/components.d.ts | 21 +- 2 files changed, 13 insertions(+), 538 deletions(-) diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index 7a010a2f2..da832d301 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -26,11 +26,7 @@ import LayoutPage from '@/components/DesignForm/layoutPage/index.vue' import { Plus } from '@element-plus/icons-vue' - - - import request from '@/utils/request'; - @@ -630,73 +626,6 @@ vIf: state.isSearch, vShow: ['associatedForms'] }, -<<<<<<< HEAD -======= - { - label: '上传图片', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_url', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, - { - label: '尺寸', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_showMode', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, - { - label: '契合度', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_fit', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, - { - label: '圆角', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_radius', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, - { - label: '边框和阴影', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_boderAndShadow', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, - { - label: '图片链接', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_link', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, - { - label: '浮动', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_float', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, - { - label: '内外四边距', - value: config.lowcodeImage, - path: 'config.lowcodeImage', - type: 'lowcodeImage_marginAndPadding', - vIf: state.isSearch, - vShow: ['lowcodeImage'] - }, ->>>>>>> lwx_v6 { label: '轮播图设置', value: config.carousel, @@ -1151,10 +1080,6 @@ const newVal = obj.isNum ? formatNumber(val) : val // 类型为数字时转整数 obj.path && getPropByPath(controlData.value, obj.path, newVal) } -<<<<<<< HEAD -======= - ->>>>>>> lwx_v6 } /** * 获取非负整数随机数 @@ -1735,10 +1660,6 @@ const floatSelectOptions = [ ] - -//!!!!!!!!!!!!!!!树数据start - - const dataSource = ref([]) interface Tree { id?: string @@ -1809,14 +1730,8 @@ const setNodeEnable = (node:Node,data:Tree) =>{ -//!!!!!!!!!!!!!!!树数据end - - -//liwenxuan 20240217 transfer end -//liwenxuan20240313 lowcodeImage start - //图片上传成功钩子 function lowcodeImageUploadSuccess(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles){ const element = controlData.value.control @@ -1923,18 +1838,7 @@ const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => return associatedFormsCurrentFormFieldTree.label.includes(value) } -//liwenxuan20240403 associatedForms end - - const showModeSelectOptions = [ - { - value: '自定义像素值', - label: '自定义像素值', - }, - { - value: '自定义占父容器比例', - label: '自定义占父容器比例', - }, - ] + const optionsCss = [ { label: '无样式', value: '' }, @@ -1942,32 +1846,6 @@ const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => { label: '每行三列', value: 'form-row-3' }, { label: '每行四列', value: 'form-row-4' } ] -<<<<<<< HEAD - - const floatSelectOptions = [ - { - value: 'left', - label: '左', - }, - { - value: 'right', - label: '右', - }, - ] -const dataSource = ref([]) -interface Tree { - id?: string - label: string - disabled?: boolean - children?: Tree[] - parentId?: string - [key: string]: any -} - -======= ->>>>>>> lwx_v6 - - const layouytStyle = reactive(controlData.value.styles) watch(()=>layouytStyle,(val : any)=>{ console.log("监听样式处理",val) @@ -2091,145 +1969,8 @@ const loadNextPage = () => { loadingnomore.value = true } } -const addRootNode = () => { - let onlyNumber = uuidv4().replaceAll('-','').toString(); - controlData.value.control.fixedOptions.push({ - id: onlyNumber, - label: '新根节点', - disabled: false, - children: [], - }) -} -const append = (data: Tree) => { - let onlyNumber = uuidv4().replaceAll('-','').toString(); - const newChild = { id: onlyNumber, label: '新节点', disabled:false,children: [] } - if (!data.children) { - data.children = [] - } - data.children.push(newChild) - dataSource.value = [...dataSource.value] -} -const remove = (node: Node, data: Tree) => { - let really = confirm("确认删除吗?\n将删除本节点与本节点的所有子孙节点!"); - if(really){ - const parent = node.parent - const children: Tree[] = parent.data.children || parent.data - const index = children.findIndex((d) => d.id === data.id) - children.splice(index, 1) - dataSource.value = [...dataSource.value] - } - -} -const changeLabel = (node:Node,data:Tree) =>{ - let favDrink = prompt("请输入:"); - if(favDrink!=null && favDrink.length>0){ - const parent = node.parent - const children: Tree[] = parent.data.children || parent.data - const index = children.findIndex((d) => d.id === data.id) - children[index].label = favDrink - dataSource.value = [...dataSource.value] - } - - -} -const setNodeEnable = (node:Node,data:Tree) =>{ - const parent = node.parent - const children: Tree[] = parent.data.children || parent.data - const index = children.findIndex((d) => d.id === data.id) - children[index].disabled = !children[index].disabled - dataSource.value = [...dataSource.value] - -} -function lowcodeImageUploadSuccess(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles){ - const element = controlData.value.control - element.imgUrl=response.data.url - element.uploadFlag=true -} -const transferDataSourceOptions = [ - { - value: '数据源', - label: '数据源', - }, - { - value: '固定选项', - label: '固定选项', - }, -] -const associatedFormsHideDialogFlag = ref(false) - -const defaultProps = { - children: 'children', - label: 'label', -} -function getAssociatedFormsCurrentFieldTree() { - return request({ - url: '/javasys/lowCode/AssociatedForms/getFieldTree', - method: 'post', - data: { - cfid:'13' - }, - }); -} -function getAssociatedFormsOrgAndManTree() { - return request({ - url: '/javasys/lowCode/transfer/getOrgAndManTree', - method: 'post', - }); -} -const associatedFormsCurrentFormFieldTree = ref() -getAssociatedFormsCurrentFieldTree().then(({ data }) => { - let resData = ref(data.children) - //let rootid_ = data.value.label - associatedFormsCurrentFormFieldTree.value = [{ - id: 'rootid_'+data.label, - label: '当前表单', - children: [...resData.value] - }] -}); -const orgAndManTree = ref() - getAssociatedFormsOrgAndManTree().then(({ data }) => { - let resData = ref(data.children) - orgAndManTree.value = [{ - id: data.id, - //label: data.label, - label: '组织机构', - children: [...resData.value] - }] -}); -const fieldTreeSearchFlag = ref(false) -function handleFieldTreeExpand(){ - - fieldTreeSearchFlag.value = true; -} - -function handleFieldTreeCollapse(){ - - fieldTreeSearchFlag.value = false; -} -function handleFieldTreeNodeclick(){ - -} -function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ - //console.log(MouseEvent) - console.log(object) - //console.log(Node) - //console.log(element) - -} -import { ElTree } from 'element-plus' -const fieldTreeFilterText = ref('') -const fieldTreeRef = ref>() - -watch(fieldTreeFilterText, (val) => { - fieldTreeRef.value!.filter(val) -}) - -const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => { - if (!value) return true - return associatedFormsCurrentFormFieldTree.label.includes(value) -} -<<<<<<< HEAD + - -======= - - ->>>>>>> lwx_v6 diff --git a/src/types/components.d.ts b/src/types/components.d.ts index b807106ac..e39ad0445 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -21,16 +21,14 @@ declare module '@vue/runtime-core' { DesignLayoutPage: typeof import('./../components/DesignForm/designLayout/designLayoutPage.vue')['default'] DiyIconfont: typeof import('./../components/DesignForm/public/expand/diy-iconfont.vue')['default'] DragControl: typeof import('./../components/DesignForm/dragControl.vue')['default'] -<<<<<<< HEAD ElAffix: typeof import('element-plus/es')['ElAffix'] ElAlert: typeof import('element-plus/es')['ElAlert'] -======= ->>>>>>> lwx_v6 ElAside: typeof import('element-plus/es')['ElAside'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] + ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] ElCard: typeof import('element-plus/es')['ElCard'] ElCarousel: typeof import('element-plus/es')['ElCarousel'] ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] @@ -53,6 +51,7 @@ declare module '@vue/runtime-core' { ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] @@ -64,22 +63,21 @@ declare module '@vue/runtime-core' { ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElProgress: typeof import('element-plus/es')['ElProgress'] ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElResult: typeof import('element-plus/es')['ElResult'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelectV2: typeof import('element-plus/es')['ElSelectV2'] ElSlider: typeof import('element-plus/es')['ElSlider'] -<<<<<<< HEAD ElSpace: typeof import('element-plus/es')['ElSpace'] ElStep: typeof import('element-plus/es')['ElStep'] ElSteps: typeof import('element-plus/es')['ElSteps'] -======= ->>>>>>> lwx_v6 ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] @@ -88,6 +86,8 @@ declare module '@vue/runtime-core' { ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] ElText: typeof import('element-plus/es')['ElText'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTimePicker: typeof import('element-plus/es')['ElTimePicker'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTransfer: typeof import('element-plus/es')['ElTransfer'] @@ -117,7 +117,6 @@ declare module '@vue/runtime-core' { IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default'] IEpCaretTop: typeof import('~icons/ep/caret-top')['default'] IEpClose: typeof import('~icons/ep/close')['default'] -<<<<<<< HEAD IEpCollection: typeof import('~icons/ep/collection')['default'] IEpDelete: typeof import('~icons/ep/delete')['default'] IEpDownload: typeof import('~icons/ep/download')['default'] @@ -130,14 +129,6 @@ declare module '@vue/runtime-core' { IEpPosition: typeof import('~icons/ep/position')['default'] IEpRefresh: typeof import('~icons/ep/refresh')['default'] IEpRefreshLeft: typeof import('~icons/ep/refresh-left')['default'] -======= - IEpDelete: typeof import('~icons/ep/delete')['default'] - IEpEdit: typeof import('~icons/ep/edit')['default'] - IEpMessageBox: typeof import('~icons/ep/message-box')['default'] - IEpOperation: typeof import('~icons/ep/operation')['default'] - IEpPlus: typeof import('~icons/ep/plus')['default'] - IEpRefresh: typeof import('~icons/ep/refresh')['default'] ->>>>>>> lwx_v6 IEpSearch: typeof import('~icons/ep/search')['default'] IEpSetting: typeof import('~icons/ep/setting')['default'] IEpTop: typeof import('~icons/ep/top')['default']