整合代码&&表单定义扩展属性添加提示文字&&显示类型修改默认值和绑定值
已修改5个文件
203 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/store/modules/user.js 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/util/func.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/role/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/wel/index.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/store/modules/user.js
@@ -2,7 +2,7 @@
import {Message} from 'element-ui'
import {setStore, getStore} from '@/util/store'
import {isURL, validatenull} from '@/util/validate'
import {deepClone,queryStringToObject} from '@/util/util'
import {deepClone, queryStringToObject} from '@/util/util'
import website from '@/config/website'
import {loginByUsername, loginBySocial, loginBySso, getUserInfo, logout, refreshToken, getButtons} from '@/api/user'
import {getTopMenu, getRoutes} from '@/api/system/menu'
@@ -38,7 +38,7 @@
    item.pathValue = item.path;
    item.path = '/' + item.code;
    item.query = {}; // 初始化 item.query
    if(item.pathValue.indexOf('?')!=-1) {
    if (item.pathValue.indexOf('?') != -1) {
      item.query = queryStringToObject(item.pathValue)
    }
    if (item.children && item.children.length > 0) {
@@ -63,8 +63,8 @@
    //根据用户名登录
    LoginByUsername({commit}, userInfo) {
      return new Promise((resolve, reject) => {
        let passwordDes = func.encryptData(userInfo.password,'daliantan0v0vcip')
        loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username,passwordDes, userInfo.type, userInfo.key,).then(res => {
        let passwordDes = func.encryptData(userInfo.password, 'daliantan0v0vcip')
        loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username, passwordDes, userInfo.type, userInfo.key,).then(res => {
          const data = res.data;
          if (data.obj.failCode === 'loginSuccess') {
            commit('SET_TOKEN', data.obj.tokenVO.accessToken);
@@ -210,7 +210,7 @@
      return new Promise((resolve, reject) => {
        getUserInfo().then((res) => {
          const data = res.data.data;
          console.log('user',res)
          console.log('user', res)
          // commit('SET_USER_INFO', data.roles);
          resolve(data);
        }).catch(err => {
@@ -296,8 +296,20 @@
    SET_ROLES: (state, roles) => {
      state.roles = roles;
    },
    SET_PERMISSION: (state, permission) => {
      let permission_new = {};
      permission.forEach(item => {
        let children = {};
        if (item.children && item.children.length > 0) {
          item.children.forEach(child => {
            Vue.set(children, child.code, true);
          });
        }
        Vue.set(permission_new, item.code, children);
      });
      state.permission = permission_new;
      setStore({name: "permission", content: permission_new});
    },
  }
}
export default user
Source/plt-web/plt-web-ui/src/util/func.js
@@ -4,6 +4,38 @@
import CryptoJS from 'crypto-js'
export default class func {
  static getSvgList() {
    const fs = require('fs');
    const path = require('path');
    // 指定文件夹路径
    const directoryPath = "../config/svg"; // 修改为你的文件夹路径
    // 存储 .svg 文件路径的数组
    let svgFiles = [];
    // 读取文件夹
    fs.readdir(directoryPath, (err, files) => {
      if (err) {
        return console.error('无法读取目录: ' + err);
      }
      // 遍历文件
      files.forEach(file => {
        // 检查文件后缀名
        if (path.extname(file).toLowerCase() === '.svg') {
          // 构建文件的完整路径
          const filePath = path.join(directoryPath, file);
          svgFiles.push(filePath);
        }
      });
      // 输出结果
      console.log(JSON.stringify(svgFiles, null, 2));
    });
  }
  /**
   * 单选表格行
   * 时间戳格式化
@@ -92,9 +124,9 @@
   */
  static isEmptyObject(obj) {
    if(obj){
    if (obj) {
      return Object.keys(obj).length === 0;
    }else {
    } else {
      return true;
    }
  }
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue
@@ -56,6 +56,29 @@
        <span v-else-if="form.searchTarger === '1'">源对象</span>
        <span v-else-if="form.searchTarger === '2'">目标对象</span>
      </template>
      <template slot="extAttrLabel" slot-scope="{}">
        <el-tooltip placement="top">
          <div slot="content">示例:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx;
            <br/>1、用英交半角分号:分隔各组值;
            <br/>2、每组用英交半角冒号:分隔单一扩展属性名称及属性值;
            <br/>3、可以定义任意组,但总字符长度不得超过4000;
            <br/>4、输入时,不要敲回车换行;
          </div>
          <span>扩展属性 <i class="el-icon-warning" style="color:red;"></i> </span>
        </el-tooltip>
      </template>
      <template slot="templateIdForm" slot-scope="{}">
        <el-select v-model="form.templateId" filterable placeholder="请选择">
          <el-option
            v-for="item in templateIdList"
            :key="item.viName"
            :label="item.viName"
            :value="item.viName">
          </el-option>
        </el-select>
      </template>
    </avue-crud>
    <el-dialog
      v-dialogDrag
@@ -216,7 +239,8 @@
  delPageDefination,
  joinBtn,
  exitBtn,
  updatePageDefination
  updatePageDefination,
  getPortalVIDatasByPage
} from "@/api/UI/uiDefine";
import actionDialog from '@/views/modelingMenu/ui/Aciton/components/dialog';
import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog";
@@ -240,6 +264,8 @@
  name: "index",
  data() {
    return {
      templateIdList: [],
      searchTargerChangeFlag: false,
      formBtnOid: '',
      sourceBtnOid: '',
      sourceOId: '',
@@ -397,7 +423,7 @@
            hide: true,
          },
          {
            label: '扩展属性',
            label: '',
            prop: 'extAttr',
            hide: true,
          },
@@ -469,7 +495,7 @@
            dicData: [
              {
                label: '不显示',
                value: '3'
                value: '1'
              },
              {
                label: '显示角色',
@@ -477,7 +503,7 @@
              },
              {
                label: '显示Folder',
                value: '1',
                value: '3',
              },
            ],
          },
@@ -507,11 +533,15 @@
                const obj = this.option.group[0].column.find(item => item.prop === 'linkType');
                obj.display = val.value !== '1';
              }
              // 切换清空模板类型
              const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType'];
              // list.forEach(item => {
              //   this.form[item] = '';
              // })
              if (this.searchTargerChangeFlag) {
                // 切换清空模板类型
                const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl'];
                list.forEach(item => {
                  this.form[item] = '';
                })
              } else {
                this.searchTargerChangeFlag = true;
              }
            }
          },
          {
@@ -534,6 +564,17 @@
                placeholder: "请输入内容",
                dicUrl: '/api/uiManagerController/getBtmDatasByPage?page=1&limit=-1',
                filterable: true,
                change: (val) => {
                  console.log('val', val);
                  if (val) {
                    let params = {
                      'conditionMap[selectBtmType]': this.form.searchTarger === '1' ? this.form.showType : this.form.linkType
                    }
                    getPortalVIDatasByPage(1, -1, params).then(res => {
                      this.templateIdList = res.data.data;
                    })
                  }
                },
                props: {
                  label: 'name',
                  value: 'name',
@@ -564,9 +605,7 @@
                label: '选择模板',
                prop: 'templateId',
                display: false,
                type: 'select',
                filterable: true,
                dicUrl: '/api/uiManagerController/getPortalVIDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}',
                formslot: true,
                rules: [
                  {
                    required: true,
@@ -574,11 +613,6 @@
                    trigger: 'submit'
                  }
                ],
                props: {
                  label: 'viName',
                  value: 'viName',
                  desc: 'viType'
                },
              },
              {
                label: 'UI定义',
@@ -692,6 +726,20 @@
                labelWidth: 135,
                span: 12
              },
              {
                label: 'B/S自定义查询',
                prop: 'bsCustQueryCLsOrUrl',
                display: false,
                labelWidth: 115,
                span: 12
              },
              {
                label: 'C/S自定义查询',
                prop: 'csCustQueryCLsOrUrl',
                display: false,
                labelWidth: 115,
                span: 12
              },
            ]
          },
          {
@@ -779,21 +827,11 @@
    // 增加
    addClickHandler() {
      console.log(this.sourceData);
      if (!this.sourceData || !this.sourceData.plOId) {
        this.$message.error('请在上方选择一条数据后进行添加');
        return;
      }
      this.$refs.crud.rowAdd();
    },
    // 编辑打开表单前
    beforeOpen(done, type) {
      // if (type === 'edit') {
      //   console.log('edit');
      //   this.form.showType = 'Ludc';
      // }
      done();
    },
    // 增加关闭对话框 清空event数组
@@ -819,12 +857,10 @@
        });
      }
      this.$refs.crud.rowEdit(row);
      console.log(this.form);
    },
    // 删除
    rowDeleteHandler(row) {
      console.log(row);
      this.$confirm('您确定要删除所选择的数据吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
@@ -853,13 +889,11 @@
        row.SubUIObjType = row.showType;
        row.showType = "";
      }
      console.log(this.sourceData);
      const params = {
        ...row,
        tabPageOId: this.sourceData.plOId
      }
      addPageDefination(params).then(res => {
        console.log(res);
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
@@ -870,18 +904,16 @@
      })
    },
    rowUpdateHandler(row,index,done,loading){
    rowUpdateHandler(row, index, done, loading) {
      if (row.templateType === '6') {
        row.SubUIObjType = row.showType;
        row.showType = "";
      }
      console.log(this.sourceData);
      const params = {
        ...row,
        tabPageOId: this.sourceData.plOId
      }
      updatePageDefination(params).then(res => {
        console.log(res);
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
@@ -943,7 +975,7 @@
    // 模板类型为表格
    templateTypeTable(val) {
      if (!val) return;
      this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']);
      this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
    },
    // 模板类型为自定义模板
@@ -957,13 +989,13 @@
    // 模板类型为树表
    templateTypeTreeTable(val) {
      if (!val) return;
      this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode']);
      this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
    },
    // 模板类型为表单
    templateTypeForm(val) {
      if (!val) return;
      this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']);
      this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
    },
    // 模板类型为树
@@ -971,7 +1003,7 @@
      if (!val) return;
      const searchTarger = this.option.column.find(item => item.prop === 'searchTarger');  // 获取搜索类型配置项
      searchTarger.display = false; // 不展示搜索类型
      this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType']);
      this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
    },
    // 模板类型为UI定义
@@ -979,7 +1011,7 @@
      if (!val) return;
      const searchTarger = this.option.column.find(item => item.prop === 'searchTarger');  // 获取搜索类型配置项
      searchTarger.display = false; // 不展示搜索类型
      this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName']);
      this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
    },
    // 查找数组中对象索引
@@ -1013,7 +1045,6 @@
        this.$message.error('请选择一条数据');
        return;
      }
      console.log(this.selectList);
      this.btnDesignVisible = true;
      this.formBtnOid = this.selectList[0].id;
      this.getTabBtnTree();
@@ -1059,7 +1090,7 @@
    // 按钮设计信息参数信息修改
    paramsRowEditHandler(row) {
      this.$refs.paramsCrud.rowEdit(row,row.$index);
      this.$refs.paramsCrud.rowEdit(row, row.$index);
    },
    // 按钮设计参数信息添加按钮
@@ -1069,7 +1100,6 @@
    // 按钮设计参数信息修改保存
    paramsRowUpdate(row, index, done, loading) {
      console.log(row,index);
      this.paramsData.splice(index, 1, row);
      done();
    },
@@ -1179,7 +1209,6 @@
        type: 'warning'
      }).then(() => {
        deleteTabButton(this.nodeTreeRow).then(res => {
          // console.log(res);
          if (res.data.code === 200) {
            this.$message.success('删除成功');
            this.getTabBtnTree();
@@ -1222,7 +1251,6 @@
    // 打开克隆对话框
    rowCloneHandler(row) {
      console.log(row);
      this.fromOid = this.sourceData.plOId;
      this.sourceOId = row.id;
      this.$refs.cloneDialog.openDialog(row);
@@ -1240,7 +1268,6 @@
        return;
      }
      joinBtn(this.nodeTreeRow).then(res => {
        // console.log(res);
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTabBtnTree();
@@ -1254,7 +1281,6 @@
        this.$message.error('请选择节点进行修改');
        return;
      }
      if (this.nodeTreeRow.oId === "parentNode") {
        this.$message.error('顶层节点不允许调整');
        return;
Source/plt-web/plt-web-ui/src/views/system/role/index.vue
@@ -190,7 +190,6 @@
    rowSaveHandler(row, done, loading) {
      delete row.roleClassifyText;
      addRole(row).then(res => {
        console.log(res)
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
@@ -213,7 +212,6 @@
        }
      }).catch(err => {
        loading();
        console.log(err);
      });
    },
@@ -325,7 +323,6 @@
        return;
      }
      listUserByRoleOid({pkRole: this.selectList[0].oid}).then(res => {
        console.log(res)
        if (res.data.code === 200) {
          const data = res.data.data;
          this.countData = data.map(item => {
@@ -338,8 +335,6 @@
          });
          this.statisticsVisible = true;
        }
      }).catch(err => {
        console.log(err)
      })
    },
Source/plt-web/plt-web-ui/src/views/wel/index.vue
@@ -10,7 +10,7 @@
    <el-row>
      <el-col :span="16" style="height: 560px">
        <basic-container>
          <el-collapse v-model="activeNames" @change="handleChange">
          <el-collapse v-model="activeNames">
            <el-collapse-item name="1" title="欢迎使用PLT-WEB平台">
              <div>
                1、北京宏博远达科技有限公司(以下简称“宏博远达”)长期专注于制造业信息化建设,为客户提供企业信息化整体解决方案及相关软件研发、咨询及实施服务。宏博远达客户群体涵盖航空、航天、船舶、兵器、汽车、通用机械、电子等制造行业,通过与客户深度合作,承担了多项国家级软件研发与技术服务项目,拥有多项具有自主知识产权的软件产品。
@@ -18,7 +18,9 @@
              <div>
                2、为了给客户提供更多的技术创新能力及相应的企业级管理支撑平台,宏博远达研发了具有自主知识产权的企业级信息化整体解决方案,同时针对客户的特定需求,提供了高度可定制的专业应用。为了进一步提升技术服务能力,宏博远达投入专门力量在前沿技术方面进行探索,在企业私有云计算和大数据等领域不断取得突破。随着新一代业务与管理技术平台的推出,更增强了公司为客户提供高质量、全方位、深层次服务的技术能力。
              </div>
              <div>3、宏博远达一直秉承“用智慧为客户创造价值”的宗旨,愿以“诚信负责”的态度和专业化的服务,在企业信息化发展的道路上,与客户一起成长,共同见证成功!</div>
              <div>
                3、宏博远达一直秉承“用智慧为客户创造价值”的宗旨,愿以“诚信负责”的态度和专业化的服务,在企业信息化发展的道路上,与客户一起成长,共同见证成功!
              </div>
            </el-collapse-item>
            <el-collapse-item name="2" title="服务计划制定">
@@ -57,8 +59,11 @@
              <span>说明文档</span>
              <el-divider direction="vertical"/>
              <span><el-link href="https://bladex.vip" target="_blank"
                             type="primary">https://bladex.vip</el-link></span>
              <span>
                <el-link href="https://bladex.vip" target="_blank"
                         type="primary">https://bladex.vip
                </el-link>
              </span>
              <el-divider content-position="right"><i class="el-icon-star-off"/></el-divider>
            </div>
@@ -82,6 +87,7 @@
import 'echarts/lib/chart/pie' // 导入柱状图组件
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/legend'
import func from "@/util/func";
export default {
  name: "wel",
@@ -147,10 +153,6 @@
    this.getLogHandler();
  },
  methods: {
    handleChange(val) {
      window.console.log(val);
    },
    getLogHandler() {
      this.loading = true;