Ldc
2024-04-07 930a0652ab5b2e34c8b3b184659f84ae82e8ce25
Merge remote-tracking branch 'origin/master'
已修改8个文件
145 ■■■■■ 文件已修改
Source/ProjectWeb/src/router/avue-router.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/router/page/index.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/store/modules/user.js 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/pom.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-server-starter/pom.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-web/pom.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/controller/WebUIDataController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/router/avue-router.js
@@ -97,7 +97,9 @@
      // 设置 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',
@@ -110,15 +112,25 @@
        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],
@@ -134,7 +146,7 @@
        //是否有子路由
        const isChild = children.length !== 0;
        const oRouter = {
          path: path,
          path: '/' + code,
          component(resolve) {
            // 判断是否为首路由
            if (first) {
@@ -162,7 +174,7 @@
          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)
Source/ProjectWeb/src/router/page/index.js
@@ -90,6 +90,18 @@
    ]
  },
  {
    path: '/UIContentViewer',
    name: '动态表格页面',
    component: Layout,
    children: [
      {
        path: '', // 空路径表示访问 '/dynamic-form' 时加载 Layout 组件
        component: () => import('@/views/base/UIContentViewer'),
        props: true
      }
    ]
  },
  {
    path: '/referIndex',
    name: '动态表格页面',
    component: Layout,
Source/ProjectWeb/src/store/modules/user.js
@@ -27,10 +27,22 @@
  } 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: {
@@ -208,10 +220,12 @@
          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)
        })
      })
Source/platformProject/pom.xml
@@ -2,12 +2,15 @@
<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>
@@ -18,7 +21,8 @@
        <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>
@@ -27,7 +31,19 @@
            <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>
Source/platformProject/vci-platform-server-starter/pom.xml
@@ -104,7 +104,6 @@
            <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>
Source/platformProject/vci-platform-web/pom.xml
@@ -11,7 +11,7 @@
    <artifactId>vci-platform-web</artifactId>
   <dependencies>
    <dependencies>
       <dependency>
           <groupId>com.vci</groupId>
           <artifactId>vci-starter-parent</artifactId>
@@ -21,9 +21,7 @@
       <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>
@@ -154,24 +152,18 @@
       <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>
@@ -250,4 +242,5 @@
        </plugins>
    </build>
</project>
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/controller/WebUIDataController.java
@@ -1,5 +1,6 @@
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.*;
@@ -64,6 +65,7 @@
     * @return 树的数据
     */
    @PostMapping("/getDataForTree")
    @VciUnCheckRight
    @VciBusinessLog(operateName = "树的查询",description = "${param.btmname}")
    public List<Tree> getDataForTree(UITreeQuery treeQuery){
        return uiDataService.getDataForTree(treeQuery);
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -1194,19 +1194,20 @@
        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;
    }