diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index 90a17c59c..7a010a2f2 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -26,6 +26,13 @@ import LayoutPage from '@/components/DesignForm/layoutPage/index.vue' import { Plus } from '@element-plus/icons-vue' + + + import request from '@/utils/request'; + + + + const props = withDefaults( //接收父级参数 @@ -623,6 +630,73 @@ 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, @@ -631,6 +705,23 @@ vIf: state.isSearch, vShow: ['lowcodeCarsusel'] }, + + { + label: '穿梭框名', + value: config.transfer, + path: 'config.transfer', + type: 'transfer_name', + vIf: state.isSearch, + vShow: ['lowcodeTransfer'] + }, + { + label: '选项数据源', + value: config.transfer, + path: 'config.transfer', + type: 'transfer_options_datasource', + vIf: state.isSearch, + vShow: ['lowcodeTransfer'] + }, { label: '上传视频', value: config.uploadvideo, @@ -1060,6 +1151,10 @@ const newVal = obj.isNum ? formatNumber(val) : val // 类型为数字时转整数 obj.path && getPropByPath(controlData.value, obj.path, newVal) } +<<<<<<< HEAD +======= + +>>>>>>> lwx_v6 } /** * 获取非负整数随机数 @@ -1430,7 +1525,7 @@ mathBoxShow.value = true } //返回值处理 - const updataDigit = (key:sring,val:any) => { + const updataDigit = (key:string,val:any) => { // console.log("默认值处理-1-->",props.formList) // console.log("默认值处理-2-->",props.formConfig) @@ -1511,13 +1606,15 @@ //liwenxuan 20240111 carousel start - import { Delete,Plus } from '@element-plus/icons-vue' + import { Delete } from '@element-plus/icons-vue' import { CarsuselConfig } from '@/api/DesignForm/types' import errimg from '@/assets/404_images/untilUploadImg.png' import { v4 as uuidv4 } from "uuid"; //轮播图设置弹窗显示控制 const dialogTableVisible = ref(false) + //穿梭框设置弹窗显示控制 + const transferDialogTableVisible = ref(false) //图片展示显示控制 const showImagePreview = ref(false) @@ -1603,6 +1700,230 @@ const changeCurrentUploadImgid = (clickedRow:any) => { currentUploadImgid = clickedRow.imgId } + + + + + + + +//liwenxuan 20240111 carousel end + + +//liwenxuan 20240217 transfer start + +const showModeSelectOptions = [ + { + value: '自定义像素值', + label: '自定义像素值', + }, + { + value: '自定义占父容器比例', + label: '自定义占父容器比例', + }, +] + +const floatSelectOptions = [ + { + value: 'left', + label: '左', + }, + { + value: 'right', + label: '右', + }, +] + + + +//!!!!!!!!!!!!!!!树数据start + + +const dataSource = ref([]) +interface Tree { + id?: string + label: string + disabled?: boolean + children?: Tree[] + parentId?: string + [key: string]: any +} + +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] + +} + + + + + +//!!!!!!!!!!!!!!!树数据end + + +//liwenxuan 20240217 transfer end + + +//liwenxuan20240313 lowcodeImage start + +//图片上传成功钩子 +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 radio = ref(controlData.value.control.fit) + +//liwenxuan20240313 lowcodeImage end + + +//liwenxuan20240403 associatedForms start + +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) +} + +//liwenxuan20240403 associatedForms end const showModeSelectOptions = [ { @@ -1621,6 +1942,7 @@ { label: '每行三列', value: 'form-row-3' }, { label: '每行四列', value: 'form-row-4' } ] +<<<<<<< HEAD const floatSelectOptions = [ { @@ -1642,6 +1964,8 @@ interface Tree { [key: string]: any } +======= +>>>>>>> lwx_v6 const layouytStyle = reactive(controlData.value.styles) @@ -2031,6 +2355,7 @@ const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => 轮播图设置 +<<<<<<< HEAD +======= + + + + + + + + + + + + + +
+ 编辑固定选项 +
+
+ + + + +
+
+ + + + + + + + + + + 点此上传 + 已上传,点击修改 + + + + + + + + +
+ 宽度(像素)
+ 高度(像素) +
+
+ 百分比宽
+ 百分比高 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 外边距(上)
+ 外边距(下)
+ 外边距(左)
+ 外边距(右)
+ 内边距(上)
+ 内边距(下)
+ 内边距(左)
+ 内边距(右)
+
+
+ + + + + + + + + + + + + 设置隐藏条件 + + + + +>>>>>>> lwx_v6 @close="closePreview" /> +<<<<<<< HEAD +======= + + + +>>>>>>> lwx_v6
- 新增根节点 + 新增根节点
@@ -2918,7 +3463,7 @@ const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => :data="controlData.control.fixedOptions" show-checkbox node-key="id" - default-expand-all + :default-expand-all = "false" :expand-on-click-node="false" > +<<<<<<< HEAD +======= + + + +>>>>>>> lwx_v6 diff --git a/src/types/components.d.ts b/src/types/components.d.ts index e39ad0445..b807106ac 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -21,14 +21,16 @@ 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'] @@ -51,7 +53,6 @@ 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'] @@ -63,21 +64,22 @@ 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'] @@ -86,8 +88,6 @@ 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,6 +117,7 @@ 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'] @@ -129,6 +130,14 @@ 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'] diff --git a/src/widget/lowcodetransfer/lowcodeTransfer.vue b/src/widget/lowcodetransfer/lowcodeTransfer.vue index ca14c428e..eed446e2b 100644 --- a/src/widget/lowcodetransfer/lowcodeTransfer.vue +++ b/src/widget/lowcodetransfer/lowcodeTransfer.vue @@ -63,7 +63,7 @@ const treeProps = { } let dataFinished = false const treeRef = ref() -const isExpandAll = ref(true) // 是否全展开 +const isExpandAll = ref(false) // 是否全展开 const keyword = ref('') // 搜索关键字 const checkList = ref([]) // 选中的list const userList = ref([])