Merge remote-tracking branch 'origin/master'
| | |
| | | // 设置 props默认值 作用就是将字段设置成配置的 |
| | | const propsDefault = { |
| | | label: propsConfig.label || 'name', |
| | | path: propsConfig.path || 'path', |
| | | path:'code', |
| | | code: 'code', |
| | | pathValue:'pathValue', |
| | | icon: propsConfig.icon || 'icon', |
| | | children: propsConfig.children || 'children', |
| | | meta: propsConfig.meta || 'meta', |
| | |
| | | const oMenu = aMenu[i]; |
| | | // 这一块的赋值 也就是取到返回的值 |
| | | let path = (() => { |
| | | if (first) { |
| | | // 将 '/index' 替换为 '' |
| | | return oMenu[propsDefault.path].replace('/index', '') |
| | | } else { |
| | | return oMenu[propsDefault.path] |
| | | } |
| | | })(), |
| | | //特殊处理组件 执行完这个 component 也就是精确到具体的文件了 views文件夹下面就是具体的页面代码 |
| | | component = 'views' + path, |
| | | if (first) { |
| | | // 将 '/index' 替换为 '' |
| | | return oMenu[propsDefault.pathValue].replace('/index', '') |
| | | } else { |
| | | return oMenu[propsDefault.pathValue] |
| | | } |
| | | })(); |
| | | let code = (() => { |
| | | return oMenu[propsDefault.code] |
| | | })(); |
| | | // 将字符串分割成数组,以'?'作为分隔符 |
| | | let parts = path.split("?"); |
| | | // 如果数组的长度大于1,表示有'?',则取第一个元素的第一个部分,否则直接取整个字符串 |
| | | let bsValue = parts.length > 1 ? parts[0].split("=")[1] : path.split("=")[1]; |
| | | if (bsValue === '' || bsValue === undefined || bsValue === null) { |
| | | bsValue = "UI"; |
| | | } |
| | | //特殊处理组件 执行完这个 component 也就是精确到具体的文件了 views文件夹下面就是具体的页面代码 |
| | | let component = bsValue === 'UI' ? 'views/base/UIContentViewer' : `views/custom-ui/${bsValue}`, |
| | | name = oMenu[propsDefault.label], |
| | | icon = oMenu[propsDefault.icon], |
| | | children = oMenu[propsDefault.children], |
| | |
| | | //是否有子路由 |
| | | const isChild = children.length !== 0; |
| | | const oRouter = { |
| | | path: path, |
| | | path: '/' + code, |
| | | component(resolve) { |
| | | // 判断是否为首路由 |
| | | if (first) { |
| | |
| | | children: !isChild ? (() => { |
| | | if (first) { |
| | | // 这里的isURL判断,因为这个网站有使用 iframe。所以需要判断是否为网页链接 |
| | | if (!isURL(path)) oMenu[propsDefault.path] = `${path}/index`; |
| | | if (!isURL(path)) oMenu[propsDefault.pathValue] = `${path}/index`; |
| | | return [{ |
| | | component(resolve) { |
| | | require([`../${component}.vue`], resolve) |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/UIContentViewer', |
| | | name: '动态表格页面', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '', // 空路径表示访问 '/dynamic-form' 时加载 Layout 组件 |
| | | component: () => import('@/views/base/UIContentViewer'), |
| | | props: true |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/referIndex', |
| | | name: '动态表格页面', |
| | | component: Layout, |
| | |
| | | } else { |
| | | ele[propsDefault.children].forEach(child => { |
| | | addPath(child); |
| | | }) |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | function updateCode(items) { |
| | | items.forEach(item => { |
| | | item.pathValue = item.path; |
| | | item.path = '/' + item.code; |
| | | if (item.children && item.children.length > 0) { |
| | | updateCode(item.children); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | const user = { |
| | | state: { |
| | |
| | | let menu = deepClone(data); |
| | | menu.forEach(ele => { |
| | | addPath(ele, true); |
| | | updateCode([ele]); |
| | | }); |
| | | |
| | | commit('SET_MENU_ALL', menu) |
| | | commit('SET_MENU', menu) |
| | | //dispatch('GetButtons'); |
| | | //dispatch('GetButtons');s |
| | | resolve(menu) |
| | | }) |
| | | }) |
| | |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <modules> |
| | | <module>vci-platform-web</module> |
| | | <module>vci-platform-starter</module> |
| | | <module>vci-platform-server-starter</module> |
| | | </modules> |
| | | |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>platform-parent</artifactId> |
| | | <version>2022.1-SNAPSHOT</version> |
| | |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | <java.version>1.8</java.version> |
| | | </properties> |
| | | <distributionManagement> |
| | | |
| | | <!-- <distributionManagement> |
| | | <repository> |
| | | <id>rdc-releases</id> |
| | | <url>http://nexus.vci-tech.com:9000/repository/maven-releases/</url> |
| | |
| | | <id>rdc-snapshots</id> |
| | | <url>http://nexus.vci-tech.com:9000/repository/maven-snapshots/</url> |
| | | </snapshotRepository> |
| | | </distributionManagement>--> |
| | | <!-- Maven分发构件的位置,私服地址 --> |
| | | <distributionManagement> |
| | | <repository> |
| | | <id>rdc-releases</id> |
| | | <url>http://dev.yunkeruida.top:9000/repository/maven-releases/</url> |
| | | </repository> |
| | | <snapshotRepository> |
| | | <id>rdc-snapshots</id> |
| | | <url>http://dev.yunkeruida.top:9000/repository/maven-snapshots/</url> |
| | | </snapshotRepository> |
| | | </distributionManagement> |
| | | |
| | | <dependencyManagement> |
| | | <dependencies> |
| | | <dependency> |
| | |
| | | <artifactId>UIService-server</artifactId> |
| | | <version>2024.RELEASE</version> |
| | | <scope>system</scope> |
| | | <systemPath>D:/work/newplatform/Bin/lib/service/UIService.jar</systemPath> |
| | | </dependency> |
| | | <dependency><!--UI工厂,部分jar引用--> |
| | | <groupId>com.vci.platform</groupId> |
| | |
| | | |
| | | <artifactId>vci-platform-web</artifactId> |
| | | |
| | | <dependencies> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>vci-starter-parent</artifactId> |
| | |
| | | <dependency> |
| | | <groupId>com.vci.corba</groupId> |
| | | <artifactId>plt-slice</artifactId> |
| | | <version>1.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>D:/work/newplatform/Bin/lib/common/plt-slice.jar</systemPath> |
| | | <version>1.0.RELEASE</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | |
| | | <dependency> |
| | | <groupId>com.vci.client</groupId> |
| | | <artifactId>plt-clientbase</artifactId> |
| | | <version>1.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>D:/work/newplatform/Bin/lib/client/plt-clientbase.jar</systemPath> |
| | | <version>1.0.RELEASE</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.zeroc</groupId> |
| | | <artifactId>icegridgui.jar</artifactId> |
| | | <version>1.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>D:/work/newplatform/Bin/lib/common/icegridgui.jar</systemPath> |
| | | <artifactId>icegridgui</artifactId> |
| | | <version>1.0.RELEASE</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.common</groupId> |
| | | <artifactId>plt-common.jar</artifactId> |
| | | <version>1.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>D:/work/newplatform/Bin/lib/common/plt-common.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.common</groupId> |
| | | <artifactId>plt-common</artifactId> |
| | | <version>1.0.RELEASE</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>vci-platform-starter</artifactId> |
| | |
| | | |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.web.dto.*; |
| | |
| | | * @return 树的数据 |
| | | */ |
| | | @PostMapping("/getDataForTree") |
| | | @VciUnCheckRight |
| | | @VciBusinessLog(operateName = "树的查询",description = "${param.btmname}") |
| | | public List<Tree> getDataForTree(UITreeQuery treeQuery){ |
| | | return uiDataService.getDataForTree(treeQuery); |
| | |
| | | if(StringUtils.isBlank(componentOid)){ |
| | | return null; |
| | | } |
| | | // if(!QUERY_BY_CACHE){ |
| | | // try { |
| | | // return uiComponentDO2VO(platformClientUtil.getPortalService().getPLPageDefinationById(componentOid),true); |
| | | // } catch (VCIError vciError) { |
| | | // throw WebUtil.getVciBaseException(vciError); |
| | | // } |
| | | // }else{ |
| | | // List<UIComponentVO> componentVOS = self.selectAllUIComponent(); |
| | | // List<UIComponentVO> componentVOList = Optional.ofNullable(componentVOS).orElseGet(() -> new ArrayList<>()).stream().filter(s -> s.getOid().equalsIgnoreCase(componentOid)).collect(Collectors.toList()); |
| | | // if(!CollectionUtils.isEmpty(componentVOList)){ |
| | | // return componentVOList.get(0); |
| | | // } |
| | | // } |
| | | if(!QUERY_BY_CACHE){ |
| | | try { |
| | | platformClientUtil.getPortalService().getPLPageDefinationById(componentOid); |
| | | return uiComponentDO2VO(null,true); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | }else{ |
| | | List<UIComponentVO> componentVOS = self.selectAllUIComponent(); |
| | | List<UIComponentVO> componentVOList = Optional.ofNullable(componentVOS).orElseGet(() -> new ArrayList<>()).stream().filter(s -> s.getOid().equalsIgnoreCase(componentOid)).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(componentVOList)){ |
| | | return componentVOList.get(0); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |