ludc
2024-04-09 fecc7305a48f8ce6e283434718da33e143885c75
Merge remote-tracking branch 'origin/master'
已修改10个文件
已删除1个文件
1594 ■■■■■ 文件已修改
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/page/index/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/page/index/layout.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/base/UIContentViewer.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/base/uiDefineVOInDialog.js 1469 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/controller/WebUIController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
@@ -39,6 +39,17 @@
        {{ item.name }}
      </el-button>
    </div>
    <div v-else-if="type === 'tree'" class="tree-buttons">
      <el-button v-for="item in basicButtonList"
                 :key="item.oid"
                 :icon="item.paramVOS.webUiButtonIcon"
                 :type="(item.paramVOS.webUiButtonType !== 'text' ? item.paramVOS.webUiButtonType : 'primary') || 'primary'"
                 plain
                 size="small"
                 @click="buttonClick(item)">
        {{ item.name }}
      </el-button>
    </div>
  </div>
</template>
@@ -240,7 +251,7 @@
    basicButtonList() {
      const basicColumn = this.butttonList;
      if (this.type === 'form') {
      if (this.type === 'form' || this.type=='tree') {
        return basicColumn;
      } else if (this.type === 'table' || this.type === 'TreeTable') {
        const top = basicColumn.filter(item => item.paramVOS.webUiButtonLocation === 'top' || func.isEmpty(item.paramVOS.webUiButtonLocation)); // è¿‡æ»¤å‡ºæ¥è¡¨æ ¼ä¸Šé¢åŒºåŸŸå±•示的按钮
Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
@@ -1,6 +1,13 @@
<template>
  <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
    <div v-if="isError" style="color: #F56C6C">这个自定义页面的地址格式不正确。推荐使用bs=组件name?type=xxx&context=yyy&pparam=zzz这种形式</div>
    <el-alert
      class="alert"
      v-if="isError"
      title="自定义组件配置信息错误!"
      type="error"
      show-icon
      description="这个自定义页面的地址格式不正确。推荐使用bs=组件name?type=xxx&context=yyy&pparam=zzz这种形式">
    </el-alert>
    <component v-else :is="currentComponent"
               :btmType="btmType"
               :content="content"
@@ -115,6 +122,6 @@
}
</script>
<style scoped>
<style scoped lang="scss">
</style>
Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
@@ -25,7 +25,6 @@
</template>
<script>
import {treeMenu} from '@/api/treeMyMenu'
import {validatenull} from '@/util/validate'
export default {
  name: "dynamic-table",
Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
@@ -1,5 +1,6 @@
<template>
  <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
    <dynamic-button v-if="componentVO.buttons && componentVO.buttons.length>0" :butttonList="componentVO.buttons" :selectList="checkDatas" type="tree" style="margin-bottom: 10px;"></dynamic-button>
    <el-input
      placeholder="输入关键字进行过滤"
      v-model="filterText">
@@ -82,8 +83,7 @@
    sourceData:{
      handler(newval) {
        //源数据有变化时变更当前区域数据
        console.log(this.areasName);
        console.log(newval);
        this.initData();
      }
    }
  },
@@ -95,7 +95,7 @@
        label: 'text'
      },
      lazy:this.componentVO.treeDefineVO.loadType == 'node',
      isMuti:true,
      isMuti:false,
      data:[],
      checkDatas:[]
    }
@@ -104,7 +104,9 @@
    this.initData();
  },
  mounted() {
    console.log(this.$el.clientHeight)
    if(this.componentVO.buttons && this.componentVO.buttons.length>0){
      this.$children[2].$el.style.height = 'calc(100% - 50px - '+this.$children[0].$el.clientHeight+'px - 10px)';
    }
  },
  methods: {
    filterNode(value, data) {
@@ -2000,12 +2002,7 @@
      //逐级加载
      const parentOid = (node.level === 0) ? 0 : node.data.oid;
      setTimeout(() => {
        const data = [{
          name: 'leaf',
          leaf: true
        }, {
          name: 'zone'
        }];
        const data = this.data;
        resolve(data);
      }, 500);
Source/ProjectWeb/src/page/index/index.vue
@@ -16,7 +16,7 @@
          <search class="avue-view" v-show="isSearch"></search>
        </transition>
        <!-- ä¸»ä½“视图层 -->
        <div style="height:100%;overflow-y:auto;overflow-x:hidden;" id="avue-view" v-show="!isSearch">
        <div style="height:100%;overflow-y:auto;overflow-x:hidden;padding-bottom: 38px;box-sizing: border-box" id="avue-view" v-show="!isSearch">
          <keep-alive>
            <router-view class="avue-view" v-if="$route.meta.keepAlive"/>
          </keep-alive>
@@ -152,6 +152,6 @@
<style lang="scss">
#avue-view > .avue-view{
  height: 100%;
  padding: 0 6px !important;
  padding: 0 !important;
}
</style>
Source/ProjectWeb/src/page/index/layout.vue
@@ -6,3 +6,8 @@
    <router-view class="avue-view" v-if="!$route.meta.keepAlive" />
  </div>
</template>
<style lang="scss">
.avue-view{
  padding: 0 6px!important;
}
</style>
Source/ProjectWeb/src/views/base/UIContentViewer.vue
@@ -1,6 +1,6 @@
<template>
  <!--UI上下文的展示器-->
  <div style="height:calc(100% - 4px);min-width:1200px">
  <div style="height:calc(100% - 4px);min-width:1200px" >
    <el-header v-if="uiDefineVO.northAreas && uiDefineVO.northAreas.length>0">
      <UIContentArea :key="'northArea-'+uiDefineVO.oid" :areasData="uiDefineVO.northAreas"
                     :dataStore="checkedData.northArea"
@@ -24,8 +24,8 @@
                       @setDataStore="setDataStore">
        </UIContentArea>
      </el-aside>
      <el-container style="height: 100%">
        <el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" :style="'height: '+centerHeight">
      <el-container style="height: 100%;display: block">
        <el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" :style="'min-height: 300px;height: '+centerHeight">
          <UIContentArea :key="'centerArea-'+uiDefineVO.oid" :areasData="uiDefineVO.centerAreas"
                         :dataStore="checkedData.centerArea"
                         :inDialog="inDialog"
@@ -36,7 +36,7 @@
          </UIContentArea>
        </el-main>
        <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="35%"
                   style="max-height: 300px">
                   style="min-height: 150px;">
          <UIContentArea :key="'southArea-'+uiDefineVO.oid" :areasData="uiDefineVO.southAreas"
                         :dataStore="checkedData.southArea"
                         :inDialog="inDialog"
@@ -78,13 +78,9 @@
    }
  },
  watch: {
    typeAContent:{
      handler(newV,oldV){
        if(oldV!=newV && !verifyNull(newV)){
          this.initUI();
        }
      },
      immediate: true,
    $route(to, from) {
      this.getTheParameters()
      this.initUI();
    }
  },
  computed: {
@@ -97,21 +93,24 @@
      this.$message.error("配置的信息错误,请参考bs=组件name?type=xxx&context=yyy&param=zzz这种形式。其中type是业务类型(或链接类型),context是UI上下文的名称");
      return false;
    }
    this.btmType = this.$route.query.type;
    this.content = this.$route.query.context || this.$route.query.content;
    this.sourceData = this.$route.query;
    this.getTheParameters()
    this.initUI();
  },
  methods: {
    getTheParameters(){
      this.btmType = this.$route.query.type;
      this.content = this.$route.query.context || this.$route.query.content;
      this.sourceData = this.$route.query;
    },
    initUI() {
      getUIContent({btmType: this.btmType, id: this.content}).then(res => {
        console.log(res.data.obj)
        this.uiDefineVO = res.data.obj;
        this.initContent();
      })
    },
    initContent() {
      if (this.uiDefineVO.southAreas && this.uiDefineVO.southAreas.length > 0) {
        this.centerHeight = 'calc(100% - 310px)';
        this.centerHeight = '65%';
      } else {
        this.centerHeight = '100%';
      }
Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue
@@ -23,8 +23,8 @@
                       @setDataStore="setDataStore">
        </UIContentArea>
      </el-aside>
      <el-container style="height: 100%">
        <el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" :style="'height: '+centerHeight">
      <el-container style="height: 100%;display: block">
        <el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" :style="'min-height: 260px;height: '+centerHeight">
          <UIContentArea :key="'centerArea-'+uiDefineVO.oid" areas-name="centerAreaInDialog"
                         cradStyle=""
                         :areasData="uiDefineVO.centerAreas"
@@ -35,7 +35,7 @@
                         @setDataStore="setDataStore">
          </UIContentArea>
        </el-main>
        <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="35%" style="max-height: 300px">
        <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="35%" style="min-height: 150px;">
          <UIContentArea :key="'southArea-'+uiDefineVO.oid" areas-name="southAreaInDialog"
                         cradStyle=""
                         :areasData="uiDefineVO.southAreas"
@@ -122,14 +122,13 @@
  methods: {
    initUI() {
      getUIContent({btmType: this.btmType, id: this.content}).then(res => {
        console.log(res.data.obj)
        this.uiDefineVO = res.data.obj;
        this.initContent();
      })
    },
    initContent() {
      if (this.uiDefineVO.southAreas && this.uiDefineVO.southAreas.length > 0) {
        this.centerHeight = 'calc(100% - 310px)';
        this.centerHeight = '65%';
      } else {
        this.centerHeight = '100%';
      }
Source/ProjectWeb/src/views/base/uiDefineVOInDialog.js
ÎļþÒÑɾ³ý
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/controller/WebUIController.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.BaseResult;
import com.vci.web.pageModel.UIContentVO;
@@ -41,6 +42,7 @@
     * @return UI上下文
     */
    @GetMapping("/getUIContentByBtmTypeAndId")
    @VciUnCheckRight
    public UIContentVO getUIContentByBtmTypeAndId(String btmType,String id){
        return uiService.getUIContentByBtmTypeAndId(btmType,id);
    }
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -837,8 +837,8 @@
            actionVO.setCreator(action.plCreateUser);
            actionVO.setLastModifier(action.plModifyUser);
            try {
                actionVO.setCreateTime(VciDateUtil.str2Date(String.valueOf(action.plCreateTime), VciDateUtil.DateTimeFormat));
                actionVO.setLastModifyTime(VciDateUtil.str2Date(String.valueOf(action.plCreateTime), VciDateUtil.DateTimeFormat));
                actionVO.setCreateTime(new Date(action.plCreateTime));
                actionVO.setLastModifyTime(new Date(action.plCreateTime));
            }catch (Throwable e){
                logger.error("转换时间",e);
            }
@@ -922,8 +922,8 @@
            contentVO.setDescription(pageLayoutDefination.plDesc);
            contentVO.setCreator(pageLayoutDefination.plCreateUser);
            try {
                contentVO.setCreateTime(VciDateUtil.str2Date(String.valueOf(pageLayoutDefination.plCreateTime),VciDateUtil.DateTimeFormat));
                contentVO.setLastModifyTime(VciDateUtil.str2Date(String.valueOf(pageLayoutDefination.plModifyTime),VciDateUtil.DateTimeFormat));
                contentVO.setCreateTime(new Date(pageLayoutDefination.plCreateTime));
                contentVO.setLastModifyTime(new Date(pageLayoutDefination.plModifyTime));
            } catch (Exception e) {
                e.printStackTrace();
            }
@@ -1144,8 +1144,8 @@
            }
            layoutVO.setCreator(page.plCreateUser);
            try {
                layoutVO.setCreateTime(VciDateUtil.str2Date(String.valueOf(page.plCreateTime),VciDateUtil.DateTimeFormat));
                layoutVO.setLastModifyTime(VciDateUtil.str2Date(String.valueOf(page.plModifyTime),VciDateUtil.DateTimeFormat));
                layoutVO.setCreateTime(new Date(page.plCreateTime));
                layoutVO.setLastModifyTime(new Date(page.plModifyTime));
            } catch (Exception e) {
                e.printStackTrace();
            }
@@ -1223,7 +1223,7 @@
     * @param pages æ•°æ®å¯¹è±¡
     * @return æ˜¾ç¤ºå¯¹è±¡
     */
    private List<UIComponentVO> uiComponentDO2VOs(Collection<PLPageDefination> pages, boolean queryDetail){
    private List<UIComponentVO> uiComponentDO2VOs(Collection<com.vci.corba.portal.data.PLPageDefination> pages, boolean queryDetail){
        List<UIComponentVO> componentVOS = new ArrayList<>();
        pages.stream().forEach(page->{
            componentVOS.add(uiComponentDO2VO(page,queryDetail));
@@ -1454,10 +1454,10 @@
     * @return æ˜¾ç¤ºå¯¹è±¡
     */
    @Override
    public UIButtonDefineVO buttonDO2VO(PLTabButton button)  {
    public UIButtonDefineVO buttonDO2VO(com.vci.corba.portal.data.PLTabButton button)  {
        UIButtonDefineVO buttonVO = new UIButtonDefineVO();
        Map<String, UIActionVO> actionVOMap = self.selectAllActionMap();
        //Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction();
//        Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction();
        if(button !=null){
            buttonVO.setOid(button.plOId);
            buttonVO.setPkComponent(button.plTableOId);
@@ -1553,22 +1553,24 @@
    @Cacheable(value = VCI_OBJECT_SERVICE,key = "#p0.concat('${uicache}').concat(#p1)",unless = "#result == null || #p0 == null || #p1 ==null")
    public UIContentVO getUIContentByBtmTypeAndId(String btmType, String id) {
        WebUtil.alertNotNull(btmType,"业务类型或者链接类型",id,"UI上下文的编号");
        PLPageLayoutDefination[] obj = null;
        PLUILayout[] obj = null;
        try {
            obj = platformClientUtil.getPortalService().getPLPageLayoutDefinationsByRelatedType(btmType);
            obj = ServiceProvider.getUIService().getPLUILayoutsByRelatedType(btmType);
//            obj = platformClientUtil.getPortalService().getPLPageLayoutDefinationsByRelatedType(btmType);
//            obj = ServiceProvider.geT(btmType);
        } catch (VCIError vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        PLPageLayoutDefination context = null;
        PLUILayout context = null;
        for (int i = 0; i < obj.length; i++) {
            if (obj[i].plCode.equals(id)) {
                context = obj[i];
                break;
            }
        }
        //return UIContentDO2VO(context,true);
        return UIContentDO2VO(null,true);
        return UIContentDO2VO(context,true);
//        return UIContentDO2VO(null,true);
    }
}