wangting
2024-10-23 bf22977631345620486d3929e285ae9212ecac3e
Merge remote-tracking branch 'origin/master'
已修改10个文件
346 ■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogQueryCriteriaDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/LogBasicController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsAttributeController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue 129 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/tableDialog.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/LogQueryCriteriaDTO.java
@@ -34,11 +34,11 @@
    int pageNo;
    //页面条数
    int pageSize;
    //查询类型(管理员日志,普通日志)
    //查询类型(管理员日志1,普通日志2)
    String roleType;
    /**
     * 根绝roleType查询出来的用户名,后续根据这个参数查询指定的日志
     * 根据roleType查询出来的用户名,后续根据这个参数查询指定的日志
     */
    private List<String> userNameList;
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/LogBasicController.java
@@ -4,13 +4,20 @@
import com.vci.starter.web.annotation.log.VciBusinessLog;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.util.ControllerUtil;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.LogBasicServiceI;
import com.vci.web.util.Func;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
/**
 * 平台日志控制器
@@ -125,4 +132,28 @@
            throw new VciBaseException(errorMsg);
        }
    }
    /**
     * 导出日志
     * @param dto 导出查询传参数对象
     * @param response
     */
    @PostMapping( "/exportLogs")
    @VciBusinessLog(operateName = "导出日志")
    public void exportLogs(@RequestBody LogQueryCriteriaDTO dto, HttpServletResponse response){
        try {
            String excelPath = logBasicServiceI.exportLogs(dto);
            ControllerUtil.writeFileToResponse(response,excelPath);
        } catch (Exception e) {
            String msg = "导出日志时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            try {
                //出错时
                e.printStackTrace();
                ControllerUtil.writeDataToResponse(response,"error_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss") + ".txt", StringUtils.isNotBlank(msg)?msg.getBytes():new byte[0],null);
            } catch (IOException ioException) {
                ioException.printStackTrace();
            }
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsAttributeController.java
@@ -191,7 +191,7 @@
            String excelPath = attributeService.exportAttributes(exportFileName,attrNames,false);
            ControllerUtil.writeFileToResponse(response,excelPath);
        } catch (Exception e) {
            String msg = "导出枚举时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            String msg = "导出属性时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            try {
                //出错时
                e.printStackTrace();
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LogBasicServiceI.java
@@ -16,18 +16,21 @@
     * @return 查询结果
     */
    BaseResult getPeroid() throws PLException;
    /**
     * 保存期限设置
     * period 期限编码
     * @return 保存结果
     */
    BaseResult savePeriod(String period) throws PLException;
    /**
     * 删除日志
     * period 期限编码
     * @return 保存结果
     */
    BaseResult deleteLog(String deleteDate) throws PLException;
    /**
     * 查询日志
     * @param dto 查询条件传输对象
@@ -35,8 +38,12 @@
     * @throws PLException
     */
    BaseResult getLogListByContion(LogQueryCriteriaDTO dto) throws PLException;
    /**
     * 操作用户获取
     */
    BaseResult getOperatingUsers() throws PLException;
    String exportLogs(LogQueryCriteriaDTO dto) throws PLException;
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LogBasicServiceImpl.java
@@ -10,7 +10,14 @@
import com.vci.dto.LogPeriodInfoDTO;
import com.vci.dto.LogQueryCriteriaDTO;
import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
import com.vci.starter.poi.bo.WriteExcelData;
import com.vci.starter.poi.bo.WriteExcelOption;
import com.vci.starter.poi.util.ExcelUtil;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.util.LangBaseUtil;
import com.vci.starter.web.util.LocalFileUtil;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.*;
import com.vci.web.util.*;
import org.apache.commons.lang3.StringUtils;
@@ -19,9 +26,11 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.File;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
@@ -136,6 +145,7 @@
     */
    @Override
    public BaseResult getLogListByContion(LogQueryCriteriaDTO queryDto) throws PLException {
        VciBaseUtil.alertNotNull(queryDto,"日志查询参数对象");
        List<String> userNameList = userQueryServiceI.queryUserNameByRoleType(queryDto.getRoleType());
        queryDto.setUserNameList(userNameList);
        String querySql = getSQL(queryDto);
@@ -188,13 +198,66 @@
    }
    /**
     * 导出日志
     * @param dto 导出的文件名
     * @return
     */
    @Override
    public String exportLogs(LogQueryCriteriaDTO dto) throws PLException{
        BaseResult logListByContion = this.getLogListByContion(dto);
        Collection<LogInfoDTO> logList = logListByContion.getData();
        //界面没传名称,使用默认导出名称
        String exportFileName = "日志导出_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss");
        //设置列名
        List<String> columns = new ArrayList<>(
                Arrays.asList("用户名", "姓名", "用户ip","模块", "操作", "时间", "操作结果","描述")
        );
        //写excel
        String excelPath = LocalFileUtil.getDefaultTempFolder() + File.separator + exportFileName +  ".xls";
        try {
            new File(excelPath).createNewFile();
        } catch (Throwable e) {
            throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[]{excelPath}, e);
        }
        //设置列
        List<WriteExcelData> excelDataList = new ArrayList<>();
        //设置列头
        for (int index = 0; index < columns.size(); index++) {
            excelDataList.add(new WriteExcelData(0,index, columns.get(index)));
        }
        if(Func.isEmpty(logList)){
            excelDataList.add(new WriteExcelData(1,1, "导出的日志列表为空!"));
        }else{
            //先按照属性类型排序,不同属性类型导出的数据乱的效果
            AtomicInteger i = new AtomicInteger();
            logList.stream().forEach(log->{
                excelDataList.add(new WriteExcelData(i.get() +1,0, log.getUsername()));
                excelDataList.add(new WriteExcelData(i.get() +1,1, log.getTruename()));
                excelDataList.add(new WriteExcelData(i.get() +1,2, log.getUserIp()));
                excelDataList.add(new WriteExcelData(i.get() +1,3, log.getModuleName()));
                excelDataList.add(new WriteExcelData(i.get() +1,4, log.getType()));
                excelDataList.add(new WriteExcelData(i.get() +1,5, log.getDate()));
                excelDataList.add(new WriteExcelData(i.get() +1,6, log.getLogType()));
                excelDataList.add(new WriteExcelData(i.get() +1,7, log.getResult()));
                i.getAndIncrement();
            });
        }
        WriteExcelOption excelOption = new WriteExcelOption(excelDataList);
        ExcelUtil.writeDataToFile(excelPath, excelOption);
        return excelPath;
    }
    /**
     * 获取用户信息
     * @param userNames 用户名称
     * @return 用户信息
     * @throws PLException
     */
    private List<UserObject> getUsersByUserNames(List<String> userNames) throws PLException {
        List<UserObject> userList = new ArrayList<UserObject>();
        List<UserObject> userList = new ArrayList<>();
        for(String userName : userNames){
            UserInfo userInfo = platformClientUtil.getFrameworkService().fetchUserInfoByName(userName);
            UserObject user = new UserObject();
@@ -250,7 +313,7 @@
    public String getSQL(LogQueryCriteriaDTO dto) throws PLException {
        StringBuffer sql = new StringBuffer("");
        // int period = getPeriod(LOG_SAVE_PERIOD);//获取保存期限,以月为单位
        int period = platformClientUtil.getLogService().getCurPeriod();;//获取保存期限,以月为单位
        int period = platformClientUtil.getLogService().getCurPeriod();//获取保存期限,以月为单位
        //下面是拼出SQL
        if(period != 0){
            sql.append(" to_date(PLDATE) >= add_months(to_date(sysdate),"+(-period)+")");
@@ -413,4 +476,6 @@
        res = true;
        return res;
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -1,5 +1,7 @@
package com.vci.web.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.PLException;
import com.vci.corba.common.data.UserEntityInfo;
@@ -1788,8 +1790,13 @@
            convertTreeDOO2Map(treeList,allTreeMap);
            List<RoleRightDTO> roleRightDTOList = new ArrayList<>();
            List<Tree> selectTreeList = uiAuthorDTO.getSelectTreeList();
            List<Tree> selectTreeList2 = this.authTreeListConvert(selectTreeList);
            getSelectedRoleRightObjs_old(uiAuthorDTO.getRoleId(),selectTreeList2,allTreeMap,roleRightDTOList);
            List<Tree> filterSelectTreeList = this.authTreeListConvert(selectTreeList);
            //过滤出选择的按钮
            List<String> checkButtonList = selectTreeList.stream()
                    .filter(item -> item.getData() instanceof PLTabButton || item.isLeaf())
                    .map(item -> item.getOid()).collect(Collectors.toList());
            getSelectedRoleRightObjs(uiAuthorDTO.getRoleId(),filterSelectTreeList,checkButtonList,allTreeMap,roleRightDTOList);
            SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread();
            String currentUserName = sessionInfo.getUserId();
            //boolean isDeveloper = rightControlUtil.isDeveloper(currentUserName);
@@ -1811,7 +1818,6 @@
     * @param selectTreeList
     */
    private List<Tree> authTreeListConvert(List<Tree> selectTreeList){
        // 创建一个包含另一个集合中满足条件的 oid 的集合
        List<String> validOids = selectTreeList.stream()
                .filter(Tree::isChecked) // checked 为 true
@@ -1830,19 +1836,20 @@
     * @param allTreeMap
     * @param roleRightDTOList
     */
    private void getSelectedRoleRightObjs_old(String roleOid, List<Tree> selectTreeList, HashMap<String,Tree> allTreeMap, List<RoleRightDTO> roleRightDTOList){
    private void getSelectedRoleRightObjs(String roleOid, List<Tree> selectTreeList, List<String> checkButtonList, HashMap<String,Tree> allTreeMap, List<RoleRightDTO> roleRightDTOList){
        Map<String,RoleRightDTO> roleRightDTOMap = new HashMap<>();
        if(!CollectionUtil.isEmpty(selectTreeList)){
            selectTreeList.stream().forEach(tree -> {
                String oid = tree.getOid();
                if(allTreeMap.containsKey(oid)){
                    tree = allTreeMap.get(oid);
                   Object data = tree.getData();
                    Object data = tree.getData();
                    if (data instanceof String) {
                        getRightValue(roleOid, tree, allTreeMap, false, roleRightDTOMap);//向下获取所有模块的权限值
                        getRightValue(roleOid, tree, allTreeMap, checkButtonList,false, roleRightDTOMap);//向下获取所有模块的权限值
                    } else if (!(data instanceof PLTabButton)) {//业务类型
                        getRightValue(roleOid, tree, allTreeMap, true, roleRightDTOMap);//向上处理
                        getRightValue(roleOid, tree, allTreeMap, false, roleRightDTOMap);//向下处理(包含当前节点)
                        getRightValue(roleOid, tree, allTreeMap, checkButtonList, true, roleRightDTOMap);//向上处理
                        getRightValue(roleOid, tree, allTreeMap, checkButtonList, false, roleRightDTOMap);//向下处理(包含当前节点)
                    } else if (data instanceof PLTabButton) {//按钮
                        String parrentId=tree.getParentId();
                        if(allTreeMap.containsKey(parrentId)){
@@ -1851,7 +1858,7 @@
                            boolean isDeveloper = rightControlUtil.isDeveloper(currentUserName);
                            Tree parentNode= allTreeMap.get(parrentId);
                            String funcId = parentNode.getOid();
                            getRightValue(roleOid, tree, allTreeMap, true, roleRightDTOMap);//向上处理该操作父级的上级模块权限(不包含父节点)
                            getRightValue(roleOid, parentNode, allTreeMap, checkButtonList, true, roleRightDTOMap);//向上处理该操作父级的上级模块权限(不包含父节点)
                            if(!roleRightDTOMap.containsKey(funcId)){
                                RoleRightDTO roleRightDTO = new RoleRightDTO();
                                roleRightDTO.setId(ObjectUtility.getNewObjectID36());//主键
@@ -1862,7 +1869,7 @@
                                }else{
                                    roleRightDTO.setRightType((short) 2);
                                }
                                roleRightDTO.setRightValue(countRightValue(parentNode,false));// 权限值,没有操作的模块权限值存储为0
                                roleRightDTO.setRightValue(countRightValue(parentNode,checkButtonList,false));// 权限值,没有操作的模块权限值存储为0
                                roleRightDTO.setRoleId(roleOid);//角色ID
                                roleRightDTO.setCreateUser(currentUserName);//创建者
                                roleRightDTO.setCreateTime(VciDateUtil.date2Str(new Date(),""));//创建时间
@@ -1891,16 +1898,18 @@
     * 获取权限
     * @param isUp 是否是向上获取,如果是向上获取,传进来的必然是模块节点,且上级模块必然是没有选中
     */
    private void getRightValue(String roleId,Tree node,HashMap<String,Tree> allTreeMap,boolean isUp,Map<String,RoleRightDTO> rightMap){
    private void getRightValue(String roleId,Tree node,Map<String,Tree> allTreeMap,List<String> checkButton,boolean isUp,Map<String,RoleRightDTO> rightMap){
        SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread();
        String currentUserName = sessionInfo.getUserId();
        boolean isDeveloper= rightControlUtil.isDeveloper(currentUserName);
        String id=ObjectUtility.getNewObjectID36();
        Object data=node.getData();
        if(isUp) {//向上获取,存储每个上级模块的权限值
            while (!"root".equals(node.getData())){
                data=node.getData();
               String oid=node.getOid();
            String parentId = node.getParentId();
            Tree parentNode = allTreeMap.get(parentId);
            while (!"root".equals(parentNode.getData())){
                data=parentNode.getData();
                String oid=parentNode.getOid();
                if(allTreeMap.containsKey(oid)){
                    String funcId = "";
                    if (data instanceof BizType) {
@@ -1937,9 +1946,9 @@
                    if(!rightMap.containsKey(funcId)){
                        rightMap.put(funcId, roleRightDTO);
                    }
                    oid= node.getParentId();
                    oid = parentNode.getParentId();
                    if(allTreeMap.containsKey(oid)) {
                        node=allTreeMap.get(oid);
                        parentNode = allTreeMap.get(oid);
                    }
                }
            }
@@ -1983,14 +1992,14 @@
                }
                for (int i = 0; i < node.getChildren().size(); i++) {
                    //对每个子向下递归遍历
                    getRightValue(roleId, node.getChildren().get(i), allTreeMap, false, rightMap);
                    getRightValue(roleId, node.getChildren().get(i), allTreeMap, checkButton,false, rightMap);
                }
            } else {
                if (!rightMap.containsKey(funcId)) {
                    RoleRightDTO roleRightDTO = new RoleRightDTO();
                    roleRightDTO.setFuncId(funcId);
                    roleRightDTO.setRightType((short) 2); // 设置UI权限
                    roleRightDTO.setRightValue(countRightValue(node, true));//没有操作的模块权限值存储为0
                    roleRightDTO.setRightValue(countRightValue(node, checkButton,true));//没有操作的模块权限值存储为0
                    roleRightDTO.setRoleId(roleId);
                    roleRightDTO.setCreateUser(currentUserName);
@@ -2010,11 +2019,12 @@
     * @param isAll 是否子级全部选中
     * @return
     */
    private long countRightValue(Tree node,boolean isAll){
    private long countRightValue(Tree node,List<String> checkButton,boolean isAll){
        long value = 0;
        for(int i = 0; i < node.getChildren().size(); i++){
            Tree childNode = (Tree)node.getChildren().get(i);
            if(isAll || node.getData() instanceof PLTabButton ){
            //node.getData() instanceof PLTabButton这儿应该换成是否是选中的按钮节点
            if(isAll || checkButton.contains(node.getOid())){
                PLTabButton obj = (PLTabButton)childNode.getData();
                value += (long)Math.pow(2, obj.plSeq);//累计加上各个操作的权限值
            }
Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue
@@ -250,31 +250,35 @@
          checked: true,
          expanded: true,
          data:item.data,
          parentId:item.parentId,
          level: item.level,
          leaf:item.leaf,
          oid: item.oid,
          text: item.text
        }
      })
      // const parentData = selectParentList.map(item => {
      //   return {
      //     checked: false,
      //     expanded: true,
      //     data:item.data,
      //     level: item.level,
      //     oid: item.oid,
      //     text: item.text
      //   }
      // })
      // // 在半选状态中过滤掉顶级节点 oid 为 root
      // const filterSelectTreeData = parentData.filter(item => item.oid !== 'root');
      const parentData = selectParentList.map(item => {
        return {
          checked: false,
          expanded: true,
          data:item.data,
          parentId:item.parentId,
          level: item.level,
          leaf:item.leaf,
          oid: item.oid,
          text: item.text
        }
      })
      // 在半选状态中过滤掉顶级节点 oid 为 root
      const filterSelectTreeData = parentData.filter(item => item.oid !== 'root');
      const data = [...selectTreeData];
      const data = [...selectTreeData,...filterSelectTreeData];
      const formData = {
        roleId: this.nodeRow.oid,
        type: this.type,
        context: this.context,
        selectTreeList: selectTreeList
        selectTreeList: data
      }
      authorizedUI(formData).then(res => {
        if (res.data.success) {
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
@@ -129,7 +129,7 @@
              </el-button>
              <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addCustomClickHandler">添加自定义组件
              </el-button>
              <el-button icon="el-icon-zoom-in" plain size="small" type="primary">预览</el-button>
              <el-button icon="el-icon-zoom-in" plain size="small" type="primary" @click="checkViewHandler" >预览</el-button>
            </div>
          </basic-container>
        </el-main>
@@ -408,7 +408,7 @@
      append-to-body="true"
      class="avue-dialog"
      title="表单"
      width="40%"
      width="50%"
      @close="closeCustomDialog">
      <el-form ref="form" :model="customForm" :rules="rules" label-position="left" label-width="85px">
        <el-row style="border-bottom: 1px solid #878585;padding-bottom: 10px">
@@ -436,7 +436,7 @@
          <el-col :span="12">
            <el-form-item class="rightLabel" label="显示类型">
              <el-select v-model="customForm.itemType" placeholder="请选择类型" size="mini">
              <el-select v-model="customForm.itemType" placeholder="请选择类型" size="mini" @change="customItemTypeChange">
                <el-option v-for="(item,index) in showSelectList" :key="index" :label="item.label"
                           :value="item.value"></el-option>
              </el-select>
@@ -668,6 +668,82 @@
         <el-button type="primary" @click="customSaveHandler">确 定</el-button>
    </span>
    </el-dialog>
    <el-dialog
      v-dialogDrag
      :visible.sync="checkViewVisible"
      append-to-body="true"
      class="avue-dialog"
      title="预览"
      width="80%">
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-row>
          <el-col v-for="(item,index) in formList" :key="index" :span="topForm.columnNumber">
            <el-form-item :class="['hiddenLabel', { 'active-border': activeItem.text === item.text }]"
                          :label="item.itemName + ':'"
                          style="padding-left: 5px" @click.native="formItemClick(item,index)">
              <el-input
                v-if="item.itemType === 'text' ||
                         item.itemType === 'custom' ||
                         item.itemType === 'customform'||
                         item.itemType === 'hidden' ||
                         item.itemType === 'specialCharacter'"
                v-model="item.value" :placeholder="item.text"
                size="mini"></el-input>
              <div v-if="item.itemType === 'textbtn'" style="display: flex;align-items: center">
                <el-input v-model="item.value" :placeholder="item.text" size="mini"></el-input>
                <el-button icon="el-icon-edit" plain size="mini" style="height: 28px;"
                           type="primary"></el-button>
              </div>
              <el-input
                v-if="item.itemType === 'textarea' || item.itemType === 'richtext' || item.itemType === 'webeditor'"
                v-model="item.value"
                :placeholder="item.text"
                :rows="2"
                type="textarea">
              </el-input>
              <el-input-number v-if="item.itemType === 'number'" v-model="item.value" :max="99999"
                               :min="1"></el-input-number>
              <el-input v-if="item.itemType === 'password'" v-model="input" placeholder="请输入密码"
                        show-password></el-input>
              <el-radio v-if="item.itemType === 'radio'" v-model="item.value"></el-radio>
              <el-checkbox v-if="item.itemType === 'checkbox'" v-model="item.value"></el-checkbox>
              <el-select v-if="item.itemType === 'select' || item.itemType === 'multiselect'"
                         v-model="item.value" :disabled="true" placeholder="请选择" size="mini">
              </el-select>
              <el-date-picker
                v-if="item.itemType === 'date' || item.itemType === 'datetime'"
                v-model="item.value"
                :placeholder="item.itemType === 'date' ? '请选择日期' : '请选择日期时间'"
                type="date">
              </el-date-picker>
              <el-time-select
                v-if="item.itemType === 'time'"
                v-model="item.value"
                :picker-options="{
                         start: '08:30',
                         step: '00:15',
                         end: '18:30'
                         }"
                placeholder="选择时间">
              </el-time-select>
              <el-button v-if="item.itemType === 'file'"
                         v-model="item.value" plain size="mini" type="primary">
                上传文件
              </el-button>
              <el-button v-if="item.itemType === 'multiFile'"
                         v-model="item.value" plain size="mini" type="primary">
                多文件上传
              </el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-dialog>
  </el-dialog>
</template>
@@ -695,6 +771,7 @@
  },
  data() {
    return {
      checkViewVisible: false,
      optionObj: {
        optionName: '',
        optionValue: ''
@@ -908,6 +985,7 @@
      this.activeItem = item;
      this.activeItemIndex = index;
      this.form = {...item};
      // console.log(item,index);
      this.topForm.position = index += 1;
    },
@@ -1088,10 +1166,8 @@
          prmItemList: this.formList
        },
      }
      console.log(params);
      savePortalVI(params).then(res => {
        console.log(res);
        if(res.data.code === 200){
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.visible = false;
          this.closeDialog();
@@ -1110,12 +1186,14 @@
        this.$message.error('请在右侧选择数据后进行操作!');
        return;
      }
      const targetObject = this.formList.find(item => item.text === this.form.text);
      if (targetObject) {
        targetObject.itemType = val;
    },
    // 自定义组件修改显示类型
    customItemTypeChange(val) {
      if (val) {
        this.customClearFormBottom();
      }
      this.form.itemType = val;
    },
    // 自定义组件保存
@@ -1126,6 +1204,11 @@
      }
      if (!this.customForm.itemType) {
        this.$message.error('请选择显示类型');
        return;
      }
      const status = this.formList.some(item => item.text === this.customForm.text);
      if(status){
        this.$message.error('请检查是否添加相同项');
        return;
      }
      this.formList.push(this.customForm);
@@ -1148,6 +1231,13 @@
      this.form.itemListTable = this.form.itemListTxt = this.form.itemListVal = this.form.itemStyle = "";
    },
    // 自定义组件清空不同类型表单下方绑定值
    customClearFormBottom() {
      this.customOptionObj = {};
      this.customForm.itemKeyValueList = [];
      this.customForm.itemListTable = this.customForm.itemListTxt = this.customForm.itemListVal = this.customForm.itemStyle = "";
    },
    // 自定义表单使用字段选择
    customTextHandler() {
@@ -1155,17 +1245,22 @@
    // 右侧表单应用按钮
    asideFormHandler() {
      if(!this.form.text){
        this.$message.error('请添加一条数据进行保存!');
        return;
      }
      this.formList = this.formList.map(item =>
        item.text === this.form.text ? this.form : item
      );
      this.$message.success('应用成功');
    },
    customClearFormBottom() {
      this.optionObj = {};
      this.form.itemKeyValueList = [];
      this.form.itemListTable = "";
      this.form.itemListTxt = "";
      this.form.itemListVal = "";
      this.form.itemStyle = "";
    // 预览按钮
    checkViewHandler(){
      this.checkViewVisible = true;
    }
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/tableDialog.vue
@@ -284,7 +284,8 @@
      <el-col :span="24">
        <el-form-item label="查询模板">
          <el-select v-model="form.itemQtName" placeholder="请选择查询模板" size="mini">
            <el-option v-for="(item,index) in searchQtNameList" :key="index" :label="item.qtName" :value="item.qtName"></el-option>
            <el-option v-for="(item,index) in searchQtNameList" :key="index" :label="item.qtName"
                       :value="item.qtName"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
@@ -344,7 +345,7 @@
  },
  data() {
    return {
      searchQtNameList:[],
      searchQtNameList: [],
      formLoading: false,
      itemImgHeight: '',
      itemImgWidth: '',
@@ -509,7 +510,7 @@
    },
    // 查询模板下拉接口查询
    getSearchSelectList(){
    getSearchSelectList() {
      getObjTypeQTs({btName: this.treeRadio === '0' ? this.TreeNodeRow.id : this.TreeNodeRow.name}).then(res => {
        this.searchQtNameList = res.data.data;
      })
@@ -604,6 +605,18 @@
        this.$message.error('请选择一条数据');
        return;
      }
      const onlyFlag = this.form.itemOutFieldList.some(item => item.id === this.showLabelLeftRow.id);
      if (onlyFlag) {
        this.$message.error('请检查是否有重复项');
        this.form.itemSelectOutFieldList = this.form.itemSelectOutFieldList.filter(selectItem =>
          !this.form.itemOutFieldList.some(outItem => outItem.id === selectItem.id)
      )
        return;
      }
      this.form.itemOutFieldList.push(this.showLabelLeftRow);
      this.form.itemSearchFieldList = this.form.itemOutFieldList;
@@ -679,7 +692,7 @@
    // 查询模板添加
    searchAddClickHandler() {
      if(!this.form.searchLabel){
      if (!this.form.searchLabel) {
        this.$message.error('查询字段不能为空!');
        return;
      }
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
@@ -264,7 +264,6 @@
    // 左侧树点击
    nodeClick(row) {
      console.log(row);
      this.tableRadio = null;
      this.nodeRow = row;
      this.getRightPortalVIDatas(row);