diff --git a/src/api/doc/index.ts b/src/api/doc/index.ts index df9310a..52932c3 100644 --- a/src/api/doc/index.ts +++ b/src/api/doc/index.ts @@ -99,6 +99,23 @@ export function getMatterList( uid:string,data?: matterPage): AxiosPromise { +export function getRecyclingList( uid:string,data?: matterPage): AxiosPromise { + return request({ + url: '/hxpan/api/matter/recycling', + method: 'post', + headers: { + 'Identifier':uid, + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: data + }); +} + /** * 新建目录 */ diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index 1d8c278..8ce24d1 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -1043,7 +1043,9 @@ export default [ iconFont: 'fa-user-o', control: { // 组件所有属性 - modelValue: '' + modelValue: '', + range:[], + queryBy:'org' }, config: {}, // 其他配置信息 styles: { diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index 6f4cdfb..c522f0b 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -15,6 +15,8 @@ import { ElMessage } from "element-plus"; import { formatNumber } from "@/api/DesignForm/utils"; import { getOrgTreeList } from "@/api/hr/org/index"; import { orgInfo } from "@/api/hr/org/type"; + + import { PublicAtrr, formStruct, @@ -851,6 +853,14 @@ const attrList = computed(() => { vIf: state.isSearch, vShow: ["orgCentent"], }, + { + label: "数据范围", + value: config.expandUser, + path: "config.expand-user", + type: "expand-user", + vIf: state.isSearch, + vShow: ["expand-user"], + }, /* { label: "添加时间水印", value: config.lowcodeImage, @@ -2068,6 +2078,8 @@ watch( .toString(); }else if(controlData.value.type === "orgCentent"){ haveOrgTreeInfo() + }else if(controlData.value.type === "expand-user"){ + } //实现关联表单设置可选字段中没有当前字段效果 start // console.log(controlData.value.name) @@ -2386,6 +2398,10 @@ import AssociatedFormsTinyace from "@/widget/associatedforms/associatedFormsTiny import AssociatedFormsTinyaceRange from "@/widget/associatedforms/associatedFormsTinyaceRange.vue"; import AssociatedFormsFillRole from "@/widget/associatedforms/associatedFormsFillRole.vue"; import AssociatedFormsChildFillRole from "@/widget/associatedforms/associatedFormsChildFillRole.vue"; +import TransferSelectUserRange from "@/widget/lowcodetransfer/lowcodeTransfer1.vue"; + +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 treeDefaultProps = { // @@ -4044,6 +4060,31 @@ watch( } ); +//选择用户数据范围 + +const userRangeDialogFlag = ref(false) +function handleUserRangeDialogFlag(){ + userRangeDialogFlag.value = true +} + +function checkedIdListChangedIndex(val:any){ + //console.log(val) + controlData.value.control.range = val +} + +let componentKey = 0 + +function reRenderComponent() { + componentKey++; +} + +function handleExpandTabChange(){ + controlData.value.control.range = [] +} + + + + /** @ 作者: 秦东 @ 时间: 2024-12-23 10:39:48 @@ -4463,6 +4504,9 @@ const aiAgentList = ref([ show-checkbox multiple style="width: 200px" + collapse-tags + collapse-tags-tooltip + :max-collapse-tags="2" /> @@ -4476,6 +4520,13 @@ const aiAgentList = ref([ + + + {{controlData.control.range}} + 可选用户设置 + + + @@ -5629,6 +5680,37 @@ const aiAgentList = ref([ + + + + + + + + + +
+ 根据角色筛选 + +
+
+ +
+ +
+ + 确定 + +
+ +
+ +
diff --git a/src/components/DesignForm/public/expand/userDialog.vue b/src/components/DesignForm/public/expand/userDialog.vue index 30fc785..b7eaa0a 100644 --- a/src/components/DesignForm/public/expand/userDialog.vue +++ b/src/components/DesignForm/public/expand/userDialog.vue @@ -196,7 +196,7 @@ const defaultProps = { draggable > - + - +
- + 回收站 + 根目录/ @@ -815,7 +915,7 @@ const handleSelectionChange = (val:matterInfo[]) => { - +
{ :row-style ="() => ({ lineHeight: '36px' })" @selection-change="handleSelectionChange" @cell-mouse-enter="handleMouseEnter"> - + @@ -711,7 +693,7 @@ function isOwner(){
  • 下载
  • 编辑
  • -
  • 重命名
  • +
  • 重命名
  • 删除
  • @@ -744,7 +726,7 @@ function isOwner(){ } .search{ margin-left: auto; - margin-right: 20px; + margin-right: -4px; display:inherit; } diff --git a/src/widget/lowcodetransfer/lowcodeTransfer.vue b/src/widget/lowcodetransfer/lowcodeTransfer.vue index a7b9525..b0b79e7 100644 --- a/src/widget/lowcodetransfer/lowcodeTransfer.vue +++ b/src/widget/lowcodetransfer/lowcodeTransfer.vue @@ -196,7 +196,70 @@ const selectedValueCompu = computed({ const url = transferConfig.value.apiUrl;/* '/javasys/lowCode/transfer/getOrgAndManTree' */ let resData = ref([]) - +function endsWithGetOrgAndManTree(str) { + // 检查输入是否为字符串 + if (typeof str !== 'string') { + return false; + } + const suffix = 'getOrgAndManTree'; + // 当字符串长度小于后缀长度时,直接返回false + if (str.length < suffix.length) { + return false; + } + // 获取字符串末尾与后缀长度相同的子字符串并比较 + return str.slice(-suffix.length) === suffix; +} +function processTreeData(node) { + if(!endsWithGetOrgAndManTree(url)){ + return node + } + // 检查节点及其所有子孙节点中是否存在id长度大于4的节点 + function hasLongIdNode(node) { + // 检查当前节点id长度 + if (node.id && node.id.length > 4) { + return true; + } + + // 处理子节点(考虑children为null的情况) + if (node.children && Array.isArray(node.children) && node.children.length > 0) { + for (const child of node.children) { + if (hasLongIdNode(child)) { + return true; + } + } + } + + return false; + } + + // 递归处理节点 + function processNode(node) { + // 如果当前节点及其所有子孙都没有长id,则移除该节点 + if (!hasLongIdNode(node)) { + return null; + } + + // 复制节点避免修改原对象 + const newNode = {...node}; + + // 处理子节点 + if (newNode.children && Array.isArray(newNode.children) && newNode.children.length > 0) { + // 递归处理每个子节点并过滤掉需要移除的 + newNode.children = newNode.children + .map(child => processNode(child)) + .filter(child => child !== null); + + // 如果所有子节点都被移除,保持children为null + if (newNode.children.length === 0) { + newNode.children = null; + } + } + + return newNode; + } + + return processNode(node); +} function getDetail() { //console.log(11111) @@ -209,8 +272,15 @@ function getDetail() { } if (transferConfig.value.transferDataSource === "数据源") { getDetail().then(({ data }) => { + + + const data1 = processTreeData(data) + + + + //console.log(`获取穿梭框接口数据`); - resData.value = data.children + resData.value = data1.children // 全选方法2:插入 全选node userList.value = [{ id: '全选', @@ -408,7 +478,7 @@ const filterNode = (value, data, node) => { } // 通过tag 取消勾选 const handleCloseTag = (tag) => { - + checkedIdList.value = checkedIdList.value.filter(item => item !== tag.data.id); if (!treeRef?.value) return checkList.value = checkList.value.filter(item => { treeRef.value.setChecked(tag, false) @@ -614,8 +684,10 @@ watch(transferConfig, (newValue, oldValue) => { getDetail().then(({ data }) => { + + const data1 = processTreeData(data) //console.log(`获取穿梭框接口数据`); - resData.value = data.children + resData.value = data1.children // 全选方法2:插入 全选node userList.value = [{ id: '全选', diff --git a/src/widget/lowcodetransfer/lowcodeTransfer1.vue b/src/widget/lowcodetransfer/lowcodeTransfer1.vue new file mode 100644 index 0000000..33c733d --- /dev/null +++ b/src/widget/lowcodetransfer/lowcodeTransfer1.vue @@ -0,0 +1,896 @@ + + + + + + + +