完善业务类型创建索引&&完善系统配置模块(管理功能模块、业务功能模块、操作类型管理、系统配置、系统运行监控)
已修改10个文件
已添加3个文件
1341 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/systemModel/operateType/api.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transferSelect.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue 109 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue 199 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue 433 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js
@@ -98,3 +98,22 @@
    params
  });
}
// åˆ é™¤ç´¢å¼•
export function delIndex(params) {
  return request({
    url: "/api/btmTypeController/delIndex",
    method: "delete",
    params
  });
}
// åˆ›å»ºç´¢å¼•
export function addIndex(params) {
  return request({
    url: "/api/btmTypeController/addIndex",
    method: "post",
    data:params
  });
}
Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js
@@ -50,9 +50,37 @@
// å¢žåŠ æ“ä½œç±»åž‹
export function addOperationType(data) {
  return request({
    url: "/api/hmSysModConfigController/addOperationType",
    url: "/api/hmSysModConfigController/addFuncOperationType",
    method: "post",
    data
  });
}
// å¯¼å‡º
export const exportModule = (params) => {
  return request({
    url: '/api/hmSysModConfigController/exportModule',
    method: 'get',
    headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
    responseType: 'blob',
    params
  })
}
// ä¿®æ”¹åˆ«å
export function updateAlias(params) {
  return request({
    url: "/api/hmSysModConfigController/updateAlias",
    method: "put",
    data:params
  });
}
// åˆ é™¤æ¨¡å—下关联的操作类型
export function delFuncOperation(params) {
  return request({
    url: "/api/hmSysModConfigController/delFuncOperation",
    method: "delete",
    data:params
  });
}
Source/plt-web/plt-web-ui/src/api/systemModel/operateType/api.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
import request from '@/router/axios';
// æ–°å¢ž
export function addOperationType(params) {
  return request({
    url: "/api/hmSysModConfigController/addOperationType",
    method: "post",
    data:params
  });
}
// ä¿®æ”¹
export function updateOperationType(params) {
  return request({
    url: "/api/hmSysModConfigController/updateOperationType",
    method: "put",
    data:params
  });
}
// åˆ é™¤
export function delOperationType(params) {
  return request({
    url: "/api/hmSysModConfigController/delOperationType",
    method: "delete",
    data:params
  });
}
Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
import request from '@/router/axios';
// åˆ—表查询
export function getAppConfigCategoryInfo(params) {
  return request({
    url: "/api/hmSysModConfigController/getAppConfigCategoryInfo",
    method: "get",
    params
  });
}
// é…ç½®é¡¹æŸ¥è¯¢
export function getAppConfigDetailsByID(params) {
  return request({
    url: "/api/hmSysModConfigController/getAppConfigDetailsByID",
    method: "get",
    params
  });
}
// å¢žåŠ é…ç½®
export function addAppConf(params) {
  return request({
    url: "/api/hmSysModConfigController/addAppConf",
    method: "post",
    data: params
  });
}
// ä¿®æ”¹é…ç½®
export function updateAppConf(params) {
  return request({
    url: "/api/hmSysModConfigController/updateAppConf",
    method: "put",
    data: params
  });
}
// å¯¼å‡º
export function exportSysConf(params) {
  return request({
    url: '/api/hmSysModConfigController/exportSysConf',
    method: 'post',
    headers: {'Content-Type': 'application/json;charset=UTF-8'},
    responseType: 'blob',
    data: params
  })
}
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
@@ -9,6 +9,18 @@
    style="text-align: center"
    width="50%"
    @close="dialogClose">
    <div style="margin-bottom: 20px;" v-if="topMethodsObj !== {} && topMethodsObj">
      <div>
        <span>导出方式:</span>
        <el-radio-group v-model="radio">
          <el-radio :label="0" v-if="topMethodsObj.select">选择</el-radio>
          <el-radio :label="1" v-if="topMethodsObj.all">全部</el-radio>
          <el-radio :label="2" v-if="topMethodsObj.page">页码</el-radio>
        </el-radio-group>
        <span v-if="radio === 2" style="margin-left: 20px;color: #F56C6C; ">
          <el-input v-model="pageExport" style="width: 150px"></el-input> ï¼ˆè¾“入页码或者页面范围,如:1-10)</span>
      </div>
    </div>
    <el-transfer
      v-model="rightRoleData"
      v-loading="loading"
@@ -21,19 +33,32 @@
      style="text-align: left; display: inline-block;">
    </el-transfer>
    <div slot="footer" class="dialog-footer">
      <div class="valueInfo" v-if="bottomValue">已设置的值为:[{{bottomValue}}]</div>
      <el-button @click="visible = false" size="small">取 æ¶ˆ</el-button>
      <el-button type="primary" @click="sendHandler" size="small">ç¡® å®š</el-button>
      <div v-if="bottomValue" class="valueInfo">已设置的值为:[{{ bottomValue }}]</div>
      <el-button size="small" @click="visible = false">取 æ¶ˆ</el-button>
      <el-button size="small" type="primary" @click="sendHandler">ç¡® å®š</el-button>
    </div>
  </el-dialog>
</template>
<script>
import func from "@/util/func";
export default {
  name: "transfer",
  props: ['title', 'leftRoleData', 'rightRoleData', 'transferTitle' , 'bottomValue'],
  props: ['title', 'leftRoleData', 'rightRoleData', 'transferTitle', 'bottomValue', 'topMethodsObj', 'selectList'],
  /**
   * topMethodsObj:{
        select:true,
        all:true,
        page:false
      },
   æŽ§åˆ¶é¡¶å±‚选择项是否展示,需要配合selectList使用
   * @returns {object}
   */
  data() {
    return {
      radio: 0,
      pageExport: "",
      visible: false, // é€šè¿‡ this.$refs.transfer.visible = true; å¼€å¯å­ç»„件对话框
      data: [],
      loading: false,
@@ -73,7 +98,20 @@
      this.leftRoleData = [];
    },
    sendHandler() {
      this.$emit('transferSend', this.rightRoleData);
      if (func.isEmptyObject(this.topMethodsObj)) {
        this.$emit('transferSend', this.rightRoleData);
      } else {
        if (this.radio === 0) {
          if (this.selectList.length <= 0) {
            this.$message.warning('请选择要导出的模板')
            return
          }
          this.$emit('transferSend', this.rightRoleData, 0);
        } else if (this.radio === 1) {
          this.$emit('transferSend', this.rightRoleData, 1);
        }
      }
      this.visible = false;
    },
  }
@@ -89,7 +127,8 @@
/deep/ .el-transfer-panel__list.is-filterable {
  height: 323px; /* ç©¿æ¢­æ¡†åˆ—表高度 */
}
.valueInfo{
.valueInfo {
  float: left;
  border: 1px solid #E9E7E7;
  display: inline-block;
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transferSelect.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <p>transferSelect</p>
</template>
<script>
export default {
  name: "transferSelect"
}
</script>
<style scoped>
</style>
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
@@ -22,6 +22,7 @@
    </ul>
    <Divider left="30px" text="选择文件后会自动上传"></Divider>
    <el-upload
      :name="fileName"
      :action="fileUrl"
      :before-upload="beforeUpload"
      :data="fileData"
@@ -52,6 +53,10 @@
      type: Array,
      default: () => []
    },
    fileName: {
      type: String,
      default: () => "file"
    },
    // å¯¹è¯æ¡†å¤´éƒ¨åç§°
    title: {
      type: String,
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -451,7 +451,7 @@
        </span>
    </el-dialog>
    <!-- ä¸€è‡´æ€§æ£€æŸ¥ -->
    <!-- æŸ¥çœ‹ç´¢å¼• -->
    <el-dialog
      v-dialogDrag
      :visible.sync="indexVisible"
@@ -459,8 +459,61 @@
      class="avue-dialog"
      title="索引信息"
      width="60%"
      @close="indexDialogClose"
    >
      <div v-loading="indexLoading" style="display: flex;height: 500px;width: 100%">
        <basic-container>
          <div style="height: 390px">
            <el-button plain size="mini" style="margin-bottom: 5px" type="danger"
                       @click="deleteIndexLeftTreeClickHandler">删除索引
            </el-button>
            <avue-tree
              :data="indexLeftData"
              :option="indexLeftOption"
              @node-click="indexLeftNodeClick"></avue-tree>
          </div>
        </basic-container>
        <div style="padding: 20px;width: 75%">
          <div>
            <el-form ref="form" :model="indexForm" label-width="90px" size="mini">
              <el-form-item label="索引名称:">
                <el-input v-model="indexForm.name" :readOnly="indexFormRead"></el-input>
              </el-form-item>
              <el-form-item label="描述:">
                <el-input v-model="indexForm.desc"></el-input>
              </el-form-item>
            </el-form>
            <div style="display: flex;justify-content: center">
              <el-button plain size="mini" type="success" @click="rightIndexAddClick">增加</el-button>
              <el-button plain size="mini" type="danger">删除</el-button>
            </div>
          </div>
          <avue-crud
            :data="indexData"
            :option="indexOption"></avue-crud>
        </div>
      </div>
      <el-dialog
        v-dialogDrag
        :visible.sync="indexAttrVisible"
        append-to-body="true"
        class="avue-dialog"
        title="属性信息"
        width="60%"
      >
        <avue-crud
          :data="indexAttrData"
          :option="indexAttrOption"
          @row-click="indexAttrRowClick"></avue-crud>
        <span slot="footer" class="dialog-footer">
         <el-button @click="indexAttrVisible = false">取 æ¶ˆ</el-button>
         <el-button type="primary" @click="indexAttrClickAddHandler">ç¡® å®š</el-button>
        </span>
      </el-dialog>
      <span slot="footer" class="dialog-footer">
         <el-button @click="indexDialogClose">取 æ¶ˆ</el-button>
         <el-button type="primary" @click="indexClickAddHandler">保 å­˜</el-button>
        </span>
    </el-dialog>
  </el-container>
@@ -478,7 +531,10 @@
  getUsedBtmLinkList,
  checkBtmConsistency,
  executeRepair,
  getIndexByCondition
  getIndexByCondition,
  delIndex,
  getAllAttributesByBtmId,
  addIndex
} from "@/api/modeling/businessType/api"
import {gridAttribute} from "@/api/modeling/attributePool/api";
import func from "@/util/func";
@@ -489,7 +545,79 @@
  name: "index",
  data() {
    return {
      indexVisible:false,
      indexLoading: false,
      indexFormRead: false,
      indexAttrRow: {},
      indexAttrOption: {
        ...basicOption,
        height: 380,
        highlightCurrentRow: true,
        addBtn: false,
        refreshBtn: false,
        editBtn: false,
        delBtn: false,
        selection: false,
        menu: false,
        column: [
          {
            label: '属性信息',
            prop: 'id',
            sortable: true,
          },
        ]
      },
      indexAttrData: [],
      indexData: [],
      indexAttrVisible: false,
      indexLeftNodeRow: {},
      indexForm: {
        name: '',
        desc: ''
      },
      indexLeftData: [],
      indexLeftOption: {
        height: 'auto',
        menu: false,
        addBtn: false,
        props: {
          label: 'name',
          value: 'id',
          children: 'children',
        },
      },
      indexOption: {
        ...basicOption,
        height: 280,
        addBtn: false,
        refreshBtn: false,
        editBtn: false,
        delBtn: false,
        selection: false,
        menu: false,
        column: [
          {
            label: '业务类型名称',
            prop: 'typeName',
            sortable: true,
          },
          {
            label: '索引名称',
            prop: 'indexName',
            sortable: true,
          },
          {
            label: '属性名称',
            prop: 'attrNames',
            sortable: true,
          },
          {
            label: '描述',
            prop: 'desc',
            sortable: true,
          },
        ]
      },
      indexVisible: false,
      conDefaultCheckData: [], // ä¿ç•™ä¸Šä¸ªæŽ¥å£è¿”回的数据
      conCheckLoading: false,
      conCheckOption: {
@@ -1305,9 +1433,9 @@
        if (res.data.code === 200) {
          this.checkViewVisible = true;
          const data = res.data.data.map(item => {
            return{
              name:this.nodeRow.id,
              source:item
            return {
              name: this.nodeRow.id,
              source: item
            }
          });
          this.checkViewData = data;
@@ -1340,12 +1468,14 @@
    },
    // ä¸€è‡´æ€§æ£€æŸ¥æŒ‰é’®ç‚¹å‡»
    checkClickHandler(){
      checkBtmConsistency().then(res =>{
        if(res && res.data && res.data.data){
    checkClickHandler() {
      this.createViewLoading = true;
      checkBtmConsistency().then(res => {
        this.createViewLoading = false;
        if (res && res.data && res.data.data) {
          this.conCheckVisible = true;
          this.conCheckLoading = true;
          if(res.data.code === 200){
          if (res.data.code === 200) {
            const data = res.data.data[0];
            this.conDefaultCheckData = data; // ä¿ç•™ä¸€ä»½åŽŸå§‹æ•°æ®
            this.conCheckLoading = false;
@@ -1374,7 +1504,7 @@
            })
            this.conCheckData = outputData;
          }
        }else {
        } else {
          this.$message.success(res.data.msg);
        }
      })
@@ -1395,17 +1525,130 @@
    },
    // åˆ›å»ºç´¢å¼•按钮点击
    indexClickHandler(){
      if(func.isEmptyObject(this.nodeRow)){
    indexClickHandler() {
      if (func.isEmptyObject(this.nodeRow)) {
        this.$message.error('请至少选择一条数据');
        return;
      }
      this.getLeftIndex();
      this.indexVisible = true;
    },
    // å·¦ä¾§æ ‘æ›´æ–°
    getLeftIndex() {
      const params = {
        "conditionMap[typename]":this.nodeRow.id
        "conditionMap[typename]": this.nodeRow.id
      }
      getIndexByCondition(params).then(res => {
        console.log(res);
        if (res.data.code === 200) {
          const data = res.data.data.map(item => {
            return {
              indexName: item.indexName,
              name: `${item.indexName} ${item.attrNames}`,
              id: item.oid
            }
          })
          this.indexLeftData = data;
        }
      })
    },
    // ç´¢å¼•左侧树点击
    indexLeftNodeClick(row) {
      this.indexLeftNodeRow = row;
    },
    // åˆ é™¤å·¦ä¾§æ ‘索引
    deleteIndexLeftTreeClickHandler() {
      if (func.isEmptyObject(this.indexLeftNodeRow)) {
        this.$message.error('请选择一条数据进行删除');
        return;
      }
      const params = {
        btmName: this.nodeRow.id,
        indexName: this.indexLeftNodeRow.indexName
      };
      delIndex(params).then(res => {
        if (res.data.code === 200) {
          this.$message.success('删除索引成功');
          this.getLeftIndex();
        }
      })
    },
    //右侧表格添加属性
    indexAttrClickAddHandler() {
      if (func.isEmptyObject(this.indexAttrRow)) {
        this.$message.error('请至少选择一条数据');
        return;
      }
      this.indexData.push(
        {
          typeName: this.nodeRow.id,
          attrNames: this.indexAttrRow.id,
          indexName: this.indexForm.name,
          desc: this.indexForm.desc
        }
      )
      this.indexFormRead = true;
      this.indexAttrVisible = false;
    },
    // å³ä¾§å±žæ€§è¡¨æ ¼è¡Œç‚¹å‡»
    indexAttrRowClick(row) {
      this.indexAttrRow = row;
    },
    // å³ä¾§è¡¨æ ¼å¢žåŠ 
    rightIndexAddClick() {
      if (!this.indexForm.name) {
        this.$message.error('请输入索引名称');
        return;
      }
      // æ£€æŸ¥æ˜¯å¦ä¸ºè‹±æ–‡å­—符
      const englishRegex = /^[A-Za-z]+$/;
      if (!englishRegex.test(this.indexForm.name)) {
        this.$message.error('索引名称只能包含英文字符');
        return;
      }
      this.indexLoading = true;
      getAllAttributesByBtmId({btmId: this.nodeRow.id}).then(res => {
        if (res.data.code === 200) {
          const data = res.data.data.map(item => {
            return {
              id: item.id
            }
          })
          this.indexAttrData = data;
        }
        this.indexLoading = false;
        this.indexAttrVisible = true;
      })
    },
    // åˆ›å»ºä¿å­˜ç´¢å¼•
    indexClickAddHandler() {
      const params = {
        typeName: this.nodeRow.id,
        attrNames: this.indexData.map(item => item.attrNames).join(','),
        indexName: this.indexForm.name,
      }
      addIndex([params]).then(res => {
        console.log(res)
        this.$message.success('创建成功');
        this.indexDialogClose();
      }).catch(err => {
        this.indexDialogClose();
      })
    },
    // ç´¢å¼•对话框取消
    indexDialogClose() {
      this.indexFormRead = false;
      this.indexForm = {};
      this.indexData = [];
      this.indexVisible = false;
    }
  }
}
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
@@ -1,5 +1,5 @@
<template>
  <el-container>
  <el-container v-loading="createdLoading">
    <el-aside>
      <basic-container>
        <div style="max-height: calc(100vh - 170px);overflow: auto">
@@ -120,9 +120,9 @@
          </el-button>
        </div>
        <div v-if="form.childType === 0" class="btnBox">
          <el-button icon="el-icon-edit" plain size="small" type="primary">修改别名
          <el-button icon="el-icon-edit" plain size="small" type="primary" @click="updataAliasClickHandler">修改别名
          </el-button>
          <el-button icon="el-icon-close" plain size="small" type="danger">删除
          <el-button icon="el-icon-close" plain size="small" type="danger" @click="deleteOperationClickHandler">删除
          </el-button>
        </div>
      </basic-container>
@@ -149,6 +149,9 @@
         <el-button type="primary" @click="methodsSaveClickHandler">保 å­˜</el-button>
        </span>
    </el-dialog>
    <!--导入    -->
    <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" fileName="files" title="导入"
                 @updata="resetFormValue"></upload-file>
  </el-container>
</template>
@@ -160,7 +163,10 @@
  updateModel,
  delModule,
  exportFunctionSql,
  addOperationType
  addOperationType,
  exportModule,
  updateAlias,
  delFuncOperation
} from "@/api/systemModel/mangeModel/api"
import func from "@/util/func";
import basicOption from "@/util/basic-option";
@@ -169,6 +175,10 @@
  name: "index",
  data() {
    return {
      tipList: [],
      upFileType: ['xls', 'xlsx'],
      fileUrl: 'api/hmSysModConfigController/importModule',
      createdLoading: false,
      lastIndex: null,
      methodsList: [],
      methodsData: [],
@@ -246,7 +256,6 @@
  methods: {
    // æ ‘行点击
    nodeClick(row) {
      console.log(row.childType);
      this.form = {...row};
      this.nodeRow = {...row};
      this.addStatus = false;
@@ -255,17 +264,19 @@
    // æ–°å¢žæŒ‰é’®
    addClickHandler() {
      this.resetFormValue();
      // this.resetFormValue();
      this.defalutName.forEach(key => {
        this.form[key] = null;
      })
      this.form.isValid = false;
      this.addStatus = true;
      this.editStatus = false;
    },
    // æ¸…空表单绑定值
    resetFormValue() {
      this.defalutName.forEach(key => {
        this.form[key] = null;
      })
      this.form.isValid = false;
      this.form = {};
      this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
    },
    // æ–°å¢žä¿å­˜æŒ‰é’®
@@ -275,23 +286,23 @@
        return
      }
      if (this.form.name.length > 128) {
        this.$message.error('模块名长度超过128!');
        this.$message.error('模块名长度不能超过128!');
        return
      }
      if (this.form.remark && this.form.remark.length > 255) {
        this.$message.error('描述长度超过255!');
        this.$message.error('描述长度不能超过255!');
        return
      }
      if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) {
        this.$message.error('.NET标识长度不能255!');
        this.$message.error('.NET标识长度不能超过255!');
        return
      }
      if (this.form.pathC && this.form.pathC.length > 255) {
        this.$message.error('C/S标识长度不能255!');
        this.$message.error('C/S标识长度不能超过255!');
        return
      }
      if (this.form.resourceMobile && this.form.resourceMobile.length > 255) {
        this.$message.error('Mobile标识长度不能255!');
        this.$message.error('Mobile标识长度不能超过255!');
        return
      }
      this.form.parentId = this.form.id;
@@ -299,6 +310,8 @@
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
          this.addStatus = false;
          // this.resetFormValue();
          this.form.childType = null;
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
@@ -306,7 +319,6 @@
    // ä¿®æ”¹æŒ‰é’®
    editClickHandler() {
      console.log(this.form);
      this.editStatus = true;
      this.addStatus = false;
    },
@@ -342,6 +354,8 @@
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
          this.editStatus = false;
          // this.resetFormValue();
          this.form.childType = null;
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
@@ -355,13 +369,11 @@
        type: 'warning'
      }).then(() => {
        delModule(this.form).then(res => {
          console.log(res);
          if (res.data.code === 200) {
            this.$message.success(res.data.msg);
            this.resetFormValue();
            this.addStatus = false;
            this.editStatus = false;
            this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
          }
        })
      }).catch(() => {
@@ -417,9 +429,8 @@
        if (res.data.code === 200) {
          this.methodsVisble = false;
          this.$message.success(res.data.msg);
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
          this.resetFormValue();
          this.form.childType = null;
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
    },
@@ -438,6 +449,64 @@
        }
      );
    },
    // ä¿®æ”¹åˆ«å
    updataAliasClickHandler() {
      const params = {
        id: this.form.id,
        isValid: this.form.isValid,
        alias: this.form.alias
      }
      updateAlias(params).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
    },
    // åˆ é™¤æ¨¡å—下关联的操作类型
    deleteOperationClickHandler() {
      this.$confirm('您确定要删除所选择的数据吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const params = {
          funcId: this.form.funcId,
          operId: this.form.operId
        }
        delFuncOperation(params).then(res => {
          console.log(res);
          if (res.data.code === 200) {
            this.$message.success(res.data.msg);
            this.resetFormValue();
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // å¯¼å‡º
    exportClickHandler() {
      this.createdLoading = true;
      exportModule().then(res => {
        func.downloadFileByBlobHandler(res);
        this.createdLoading = false
        this.$message.success('导出成功');
      }).catch(err => {
        this.$message.error(err);
      })
    },
    // å¯¼å…¥
    upLoadClickHandler() {
      this.$refs.upload.visible = true;
    }
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
@@ -1,5 +1,5 @@
<template>
  <el-container>
  <el-container v-loading="createdLoading">
    <el-aside>
      <basic-container>
        <div style="max-height: calc(100vh - 170px);overflow: auto">
@@ -120,9 +120,9 @@
          </el-button>
        </div>
        <div v-if="form.childType === 0" class="btnBox">
          <el-button icon="el-icon-edit" plain size="small" type="primary">修改别名
          <el-button icon="el-icon-edit" plain size="small" type="primary" @click="updataAliasClickHandler">修改别名
          </el-button>
          <el-button icon="el-icon-close" plain size="small" type="danger">删除
          <el-button icon="el-icon-close" plain size="small" type="danger" @click="deleteOperationClickHandler">删除
          </el-button>
        </div>
      </basic-container>
@@ -149,6 +149,9 @@
         <el-button type="primary" @click="methodsSaveClickHandler">保 å­˜</el-button>
        </span>
    </el-dialog>
    <!--导入    -->
    <upload-file ref="upload" fileName="files" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导入"
                 @updata="resetFormValue"></upload-file>
  </el-container>
</template>
@@ -160,7 +163,10 @@
  updateModel,
  delModule,
  exportFunctionSql,
  addOperationType
  addOperationType,
  exportModule,
  updateAlias,
  delFuncOperation
} from "@/api/systemModel/mangeModel/api"
import func from "@/util/func";
import basicOption from "@/util/basic-option";
@@ -169,6 +175,10 @@
  name: "index",
  data() {
    return {
      tipList: [],
      upFileType: ['xls', 'xlsx'],
      fileUrl: 'api/hmSysModConfigController/importModule',
      createdLoading: false,
      lastIndex: null,
      methodsList: [],
      methodsData: [],
@@ -255,17 +265,19 @@
    // æ–°å¢žæŒ‰é’®
    addClickHandler() {
      this.resetFormValue();
      // this.resetFormValue();
      this.defalutName.forEach(key => {
        this.form[key] = null;
      })
      this.form.isValid = false;
      this.addStatus = true;
      this.editStatus = false;
    },
    // æ¸…空表单绑定值
    resetFormValue() {
      this.defalutName.forEach(key => {
        this.form[key] = null;
      })
      this.form.isValid = false;
      this.form = {};
      this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
    },
    // æ–°å¢žä¿å­˜æŒ‰é’®
@@ -275,23 +287,23 @@
        return
      }
      if (this.form.name.length > 128) {
        this.$message.error('模块名长度超过128!');
        this.$message.error('模块名长度不能超过128!');
        return
      }
      if (this.form.remark && this.form.remark.length > 255) {
        this.$message.error('描述长度超过255!');
        this.$message.error('描述长度不能超过255!');
        return
      }
      if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) {
        this.$message.error('.NET标识长度不能255!');
        this.$message.error('.NET标识长度不能超过255!');
        return
      }
      if (this.form.pathC && this.form.pathC.length > 255) {
        this.$message.error('C/S标识长度不能255!');
        this.$message.error('C/S标识长度不能超过255!');
        return
      }
      if (this.form.resourceMobile && this.form.resourceMobile.length > 255) {
        this.$message.error('Mobile标识长度不能255!');
        this.$message.error('Mobile标识长度不能超过255!');
        return
      }
      this.form.parentId = this.form.id;
@@ -299,6 +311,8 @@
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
          this.addStatus = false;
          // this.resetFormValue();
          this.form.childType = null;
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
@@ -306,7 +320,6 @@
    // ä¿®æ”¹æŒ‰é’®
    editClickHandler() {
      console.log(this.form);
      this.editStatus = true;
      this.addStatus = false;
    },
@@ -342,6 +355,8 @@
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
          this.editStatus = false;
          // this.resetFormValue();
          this.form.childType = null;
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
@@ -355,13 +370,11 @@
        type: 'warning'
      }).then(() => {
        delModule(this.form).then(res => {
          console.log(res);
          if (res.data.code === 200) {
            this.$message.success(res.data.msg);
            this.resetFormValue();
            this.addStatus = false;
            this.editStatus = false;
            this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
          }
        })
      }).catch(() => {
@@ -417,9 +430,8 @@
        if (res.data.code === 200) {
          this.methodsVisble = false;
          this.$message.success(res.data.msg);
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
          this.resetFormValue();
          this.form.childType = null;
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
    },
@@ -438,6 +450,54 @@
        }
      );
    },
    // ä¿®æ”¹åˆ«å
    updataAliasClickHandler() {
      const params = {
        id: this.form.id,
        isValid: this.form.isValid,
        alias: this.form.alias
      }
      updateAlias(params).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
      })
    },
    // åˆ é™¤æ¨¡å—下关联的操作类型
    deleteOperationClickHandler() {
      console.log(this.form);
      const params = {
        funcId: this.form.funcId,
        operId: this.form.operId
      }
      delFuncOperation(params).then(res => {
        console.log(res);
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
          this.resetFormValue();
        }
      })
    },
    // å¯¼å‡º
    exportClickHandler() {
      this.createdLoading = true;
      exportModule().then(res => {
        func.downloadFileByBlobHandler(res);
        this.createdLoading = false
        this.$message.success('导出成功');
      }).catch(err => {
        this.$message.error(err);
      })
    },
    // å¯¼å…¥
    upLoadClickHandler() {
      this.$refs.upload.visible = true;
    }
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue
@@ -3,7 +3,7 @@
    <el-aside>
      <basic-container>
        <div style="max-height: calc(100vh - 170px);overflow: auto">
          <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
          <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
              <i class="el-icon-s-promotion"></i>
@@ -27,28 +27,31 @@
          <el-form-item label="别名:">
            <el-input v-model="form.alias" placeholder="请输入别名"></el-input>
          </el-form-item>
          <el-form-item label="编号:">
            <el-input v-model="form.sort" placeholder="请输入编号"></el-input>
          <el-form-item label="顺序:">
            <el-input-number v-model="form.sort" :min="0" :max="9999" label="顺序"></el-input-number>
          </el-form-item>
          <el-form-item label="描述:">
            <el-input v-model="form.remark" placeholder="请输入描述"></el-input>
          </el-form-item>
        </el-form>
        <div class="btnBox">
          <el-button v-if="!addStatus" :disabled="mangeShowBtn ? false : !childTypeBtn" icon="el-icon-plus" plain
        <div v-if="nodeRow.childType === 0 || nodeRow.childType === -1" class="btnBox">
          <el-button v-if="!addStatus" :disabled="nodeRow.childType === 0" icon="el-icon-plus" plain
                     size="small"
                     type="primary" @click="addClickHandler">增加
          </el-button>
          <el-button v-if="addStatus" icon="el-icon-check" plain size="small"
                     type="success" @click="addSaveClickHandler">保存
          </el-button>
          <el-button :disabled="mangeShowBtn" icon="el-icon-edit" plain size="small" type="primary"
                     @click="addClickHandler">修改
          <el-button v-if="!editStatus" :disabled="nodeRow.childType === -1" icon="el-icon-edit" plain size="small" type="primary"
                     @click="editClickHandler">修改
          </el-button>
          <el-button :disabled="mangeShowBtn" icon="el-icon-close" plain size="small" type="danger"
                     @click="addClickHandler">删除
          <el-button v-if="editStatus" icon="el-icon-check" plain size="small"
                     type="success" @click="editSaveClickHandler">保存
          </el-button>
          <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导入sql
          <el-button :disabled="nodeRow.childType === -1" icon="el-icon-close" plain size="small" type="danger"
                     @click="delClickHandler">删除
          </el-button>
          <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="sqlClickExportClick">导出sql
          </el-button>
        </div>
      </basic-container>
@@ -58,12 +61,16 @@
<script>
//管理功能模块
import {getSysModelTreeMenuByPID, addModel} from "@/api/systemModel/mangeModel/api"
import {exportFunctionSql, getSysModelTreeMenuByPID} from "@/api/systemModel/mangeModel/api"
import {addOperationType,updateOperationType,delOperationType} from "@/api/systemModel/operateType/api"
import func from "@/util/func";
export default {
  name: "index",
  data() {
    return {
      refresh:Math.random(),
      editStatus:false,
      addStatus: false,
      nodeRow: {},
      form: {},
@@ -82,7 +89,7 @@
        treeLoad: (node, resolve) => {
          const params = {
            parentId: node.level === 0 ? "operateNode" : node.data.id,
            modeType: node.level === 0 ? "firstNode" : node.data.modeType,
            modeType: node.level === 0 ? 'firstNode' : "",
          }
          getSysModelTreeMenuByPID(params).then(res => {
            resolve(res.data.data.map(item => {
@@ -101,21 +108,6 @@
  created() {
  },
  computed: {
    /**
     * childType
     * ä¸º-1   å…¨éƒ¨æŒ‰é’®å±•示 ç¦ç”¨ä¿®æ”¹ åˆ é™¤ å¢žåŠ æ“ä½œç±»åž‹
     * ä¸ä¸º-1 éšè— åˆ é™¤éžç³»ç»Ÿæ¨¡å— åˆ é™¤ä¸šåŠ¡æ¨¡å—
     * ä¸º1时 ç¦ç”¨æ“ä½œç±»åž‹ã€å¯¼å…¥ã€å¯¼å‡º
     * ä¸º2时 ç¦ç”¨å¢žåŠ  å¯¼å…¥ å¯¼å‡º
     * mangeShowBtn ä¸º true è¯´æ˜Žæ˜¯é¡¶å±‚节点 å…¨éƒ¨æŒ‰é’®å±•示 ç¦ç”¨ä¿®æ”¹ åˆ é™¤ å¢žåŠ æ“ä½œç±»åž‹
     * @returns {Number}
     */
    mangeShowBtn() {
      return this.form.childType === -1;
    },
    childTypeBtn() {
      return this.form.childType === 1;
    }
  },
  methods: {
    // æ ‘行点击
@@ -124,53 +116,156 @@
      this.form = {...row};
      this.nodeRow = {...row};
      this.addStatus = false;
      this.editStatus = false;
    },
    // æ¸…空表单绑定值
    resetFormValue() {
      this.form = {};
      this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
    },
    // æ–°å¢žæŒ‰é’®
    addClickHandler() {
      for (const key in this.form) {
        if (this.form.hasOwnProperty(key)) {
          this.form[key] = null;
        }
      }
      this.form = {};
      this.addStatus = true;
      this.editStatus = false;
    },
    // ä¿å­˜æŒ‰é’®
    addSaveClickHandler() {
      console.log(this.form)
      if (!this.form.name) {
        this.$message.error('模块名不能为空');
        this.$message.error('名称不能为空');
        return
      }
      if (!this.form.code) {
        this.$message.error('标识不能为空');
        return
      }
      if (!this.form.alias) {
        this.$message.error('别名不能为空');
        return
      }
      if (!this.form.sort) {
        this.$message.error('顺序不能为空');
        return
      }
      if (this.form.name.length > 128) {
        this.$message.error('模块名长度超过128!');
        this.$message.error('名称长度不能超过128!');
        return
      }
      if (this.form.remark && this.form.remark.length > 255) {
        this.$message.error('描述长度超过255!');
        this.$message.error('描述长度不能超过255!');
        return
      }
      if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) {
        this.$message.error('.NET标识长度不能255!');
      if (this.form.alias && this.form.alias.length > 255) {
        this.$message.error('别名长度不能超过255!');
        return
      }
      if (this.form.pathc && this.form.pathc.length > 255) {
        this.$message.error('C/S标识长度不能255!');
        return
      }
      if (this.form.resourceMobile && this.form.resourceMobile.length > 255) {
        this.$message.error('Mobile标识长度不能255!');
        return
      }
      console.log(this.nodeRow);
      this.form.parentId = this.nodeRow.id;
      this.form.modeType = this.nodeRow.modeType;
      addModel(this.form).then(res => {
        console.log(res)
        this.addStatus = false;
      const params = {
        name:this.form.name,
        identify:this.form.code,
        alias:this.form.alias,
        desc:this.form.remark,
        seq:this.form.sort
      }
      addOperationType(params).then(res => {
        if(res.data.code === 200){
          this.$message.success(res.data.msg);
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
          this.addStatus = false;
        }
      })
    }
    },
    // ä¿®æ”¹æŒ‰é’®
    editClickHandler(){
      this.addStatus = false;
      this.editStatus = true;
    },
    // ä¿®æ”¹ä¿å­˜
    editSaveClickHandler(){
      console.log(this.form);
      if (!this.form.name) {
        this.$message.error('名称不能为空');
        return
      }
      if (!this.form.code) {
        this.$message.error('标识不能为空');
        return
      }
      if (!this.form.alias) {
        this.$message.error('别名不能为空');
        return
      }
      if (!this.form.sort) {
        this.$message.error('顺序不能为空');
        return
      }
      if (this.form.name.length > 128) {
        this.$message.error('名称长度不能超过128!');
        return
      }
      if (this.form.remark && this.form.remark.length > 255) {
        this.$message.error('描述长度不能超过255!');
        return
      }
      if (this.form.alias && this.form.alias.length > 255) {
        this.$message.error('别名长度不能超过255!');
        return
      };
      const params = {
        id:this.form.id,
        name:this.form.name,
        identify:this.form.code,
        alias:this.form.alias,
        desc:this.form.remark,
        seq:this.form.sort
      }
      updateOperationType(params).then(res => {
        if(res.data.code === 200){
          this.$message.success(res.data.msg);
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
          this.editStatus = false;
        }
      })
    },
    // åˆ é™¤
    delClickHandler(){
      this.$confirm('您确定要删除所选择的数据吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        delOperationType(this.form).then(res => {
          if (res.data.code === 200) {
            this.$message.success(res.data.msg);
            this.resetFormValue();
            this.addStatus = false;
            this.editStatus = false;
            this.nodeRow = {};
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // å¯¼å‡ºsql
    sqlClickExportClick() {
      exportFunctionSql({isFunction: false}).then(res => {
        func.downloadFileByBlobHandler(res);
        this.$message.success('导出成功');
      }).catch(err => {
        this.$message.error(err);
      });
    },
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
@@ -1,10 +1,441 @@
<template>
  <el-container>
    <el-aside>
      <basic-container>
        <div style="max-height: calc(100vh - 170px);overflow: auto">
          <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
          <span slot-scope="{ node, data }" class="el-tree-node__label">
           <span style="font-size: 15px">
              <i class="el-icon-s-promotion"></i>
                {{ (node || {}).label }}
            </span>
          </span>
          </avue-tree>
        </div>
      </basic-container>
    </el-aside>
    <el-main>
      <basic-container>
        <avue-crud
          ref="crud"
          :data="configData"
          :option="nodeRow.id === 'firstNode'? firstOption : configOption"
          :table-loading="configLoading"
          @selection-change="selectChange"
          @row-click="rowClickHandler">
          <template slot="menuLeft">
            <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">增加
            </el-button>
            <el-button icon="el-icon-close" plain size="small" type="danger" @click="delClickHandler">删除
            </el-button>
            <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出
            </el-button>
          </template>
          <template #menu="{row,index,size}">
            <el-button icon="el-icon-edit" size="small" type="text" @click.stop="rowEditHandler(row,index)">编辑
            </el-button>
            <el-button icon="el-icon-delete" size="small" type="text" @click.stop="rowDeleteHandler(row)">删除</el-button>
          </template>
        </avue-crud>
      </basic-container>
    </el-main>
    <el-dialog
      v-dialogDrag
      :title="nodeRow.id === 'firstNode' ? '配置项分类' : '配置项'"
      :visible.sync="addVisible"
      append-to-body="true"
      class="avue-dialog"
      width="50%"
      @close="addVisibleClose">
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="名称:">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item v-if="nodeRow.id !== 'firstNode'" label="key:">
          <el-input v-model="form.key"></el-input>
        </el-form-item>
        <el-form-item v-if="nodeRow.id !== 'firstNode'" label="value:">
          <el-input v-model="form.value"></el-input>
        </el-form-item>
        <el-form-item label="描述:">
          <el-input v-model="form.desc" type="textarea"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="addVisibleClose">取 æ¶ˆ</el-button>
        <el-button size="small" type="primary" @click="addSaveClickHandler">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <!-- å¯¼å‡ºç©¿æ¢­æ¡† -->
    <transfer ref="transfer" :left-role-data="leftRoleData" :right-role-data="rightRoleData"
              :select-list="selectList" :top-methods-obj="topMethodsObj" :transferTitle="transferTitle" title="导出"
              @transferSend="exportSendHandler">
    </transfer>
  </el-container>
</template>
<script>
import {
  getAppConfigCategoryInfo,
  getAppConfigDetailsByID,
  addAppConf,
  updateAppConf,
  exportSysConf
} from "@/api/systemModel/systemConfig/api"
import basicOption from "@/util/basic-option";
import func from "@/util/func";
export default {
  name: "index"
  name: "index",
  data() {
    return {
      topMethodsObj: {
        select: true,
        all: true,
        page: false
      },
      transferTitle: ['未选择', '已选择'],
      leftRoleData: [],
      rightRoleData: [],
      editStatus: false,
      form: {
        name: "",
        desc: ""
      },
      addVisible: false,
      nodeRow: {},
      configLoading: false,
      configData: [],
      configOption: {
        ...basicOption,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        column: [
          {
            label: '名称',
            prop: 'name',
            sortable: true
          },
          {
            label: 'key',
            prop: 'key',
            sortable: true
          },
          {
            label: 'value',
            prop: 'value',
            overHidden: true,
            sortable: true
          },
          {
            label: '描述',
            overHidden: true,
            prop: 'desc',
          }
        ]
      },
      defaultData: [], // é¡¶å±‚节点新增后赋值数组
      firstOption: {
        ...basicOption,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        column: [
          {
            label: '名称',
            prop: 'name',
            sortable: true
          },
          {
            label: '描述',
            prop: 'desc',
          }
        ]
      },
      refresh: Math.random(),
      treeOption: {
        height: 'auto',
        menu: false,
        addBtn: false,
        defaultExpandAll: true,
        props: {
          label: 'name',
          value: 'id',
          children: 'children',
        },
      },
      treeData: [
        {
          name: '系统配置分类',
          id: 'firstNode',
          children: []
        }
      ],
      selectList: [],
      lastIndex: null
    }
  },
  created() {
    this.getTreeList();
  },
  methods: {
    // å·¦ä¾§æ ‘查询
    getTreeList(val) {
      getAppConfigCategoryInfo().then(res => {
        if (res.data.code === 200) {
          const data = res.data.data;
          this.treeData[0].children = data;
          if (val === 'save') {
            this.configData = data;
          }
        }
      })
    },
    // æ ‘节点点击
    nodeClick(row) {
      console.log(row);
      this.nodeRow = row;
      if (row.id === 'firstNode') {
        this.configData = row.children;
      } else {
        this.configLoading = true;
        getAppConfigDetailsByID({clsId: row.id}).then(res => {
          if (res.data.code === 200) {
            const data = res.data.data;
            this.configData = data;
            this.configLoading = false;
          }
        })
      }
    },
    // å¢žåŠ æŒ‰é’®
    addClickHandler() {
      if (func.isEmptyObject(this.nodeRow)) {
        this.$message.error('请选择一条节点进行添加!')
        return;
      }
      this.addVisible = true;
      this.editStatus = false;
    },
    // æ–°å¢žå¯¹è¯æ¡†å…³é—­
    addVisibleClose() {
      Object.keys(this.form).forEach(key => {
        this.form[key] = "";
      })
      this.addVisible = false;
    },
    // ä¿å­˜
    addSaveClickHandler() {
      if (this.nodeRow.id === 'firstNode') {
        if (!this.form.name) {
          this.$message.error('名称不能为空!');
          return;
        }
      } else {
        if (!this.form.name) {
          this.$message.error('名称不能为空!');
          return;
        }
        if (!this.form.key) {
          this.$message.error('key值不能为空!');
          return;
        }
        if (!this.form.value) {
          this.$message.error('value值不能为空!');
          return;
        }
      }
      const params = this.nodeRow.id === 'firstNode' ? {
        appConfigDetailInfo: {
          name: this.form.name,
          desc: this.form.desc,
          id: this.editStatus ? this.form.id : null
        },
        isConfCategorys: true //true表示给顶层添加配置项分类
      } : {
        appConfigDetailInfo: {
          categoryId: this.nodeRow.id,
          name: this.form.name,
          desc: this.form.desc,
          key: this.form.key,
          value: this.form.value,
          id: this.editStatus ? this.form.id : null
        },
        isConfCategorys: false //true表示给顶层添加配置项分类
      }
      const saveApi = this.editStatus ? updateAppConf : addAppConf;
      saveApi(params).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.addVisibleClose();
          if (this.nodeRow.id === 'firstNode') {
            this.getTreeList('save');
          } else {
            this.configLoading = true;
            getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
              if (res.data.code === 200) {
                const data = res.data.data;
                this.configData = data;
                this.configLoading = false;
              }
            })
          }
        }
      })
    },
    // ç¼–辑按钮
    rowEditHandler(row) {
      this.addVisible = true;
      this.form = {...row};
      this.editStatus = true;
    },
    // è¡Œåˆ é™¤
    rowDeleteHandler(row) {
      const params = {
        ids: row.id,
        isConfCategorys: this.nodeRow.id === 'firstNode' ? true : false
      }
      getAppConfigCategoryInfo(params).then(res => {
        console.log(res)
        if (res.data.code === 200) {
          this.$message.success('删除成功');
          if (this.nodeRow.id === 'firstNode') {
            this.getTreeList('save');
          } else {
            this.configLoading = true;
            getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
              if (res.data.code === 200) {
                const data = res.data.data;
                this.configData = data;
                this.configLoading = false;
              }
            })
          }
        }
      })
    },
    // é€‰æ‹©æ¡†
    selectChange(row) {
      this.selectList = row;
    },
    // ç‚¹å‡»è¡Œ
    rowClickHandler(row) {
      func.rowClickHandler(
        row,
        this.$refs.crud,
        this.lastIndex,
        (newIndex) => {
          this.lastIndex = newIndex;
        },
        () => {
          this.selectList = [];
        }
      );
    },
    // å¤šé€‰åˆ é™¤
    delClickHandler() {
      if (this.selectList.length <= 0) {
        this.$message.error('请至少选择一条数据');
        return;
      }
      const params = {
        ids: this.selectList.map(item => {
          return item.id
        }).join(','),
        isConfCategorys: this.nodeRow.id === 'firstNode' ? true : false
      }
      getAppConfigCategoryInfo(params).then(res => {
        console.log(res)
        if (res.data.code === 200) {
          this.$message.success('删除成功');
          if (this.nodeRow.id === 'firstNode') {
            this.getTreeList('save');
          } else {
            this.configLoading = true;
            getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
              if (res.data.code === 200) {
                const data = res.data.data;
                this.configData = data;
                this.configLoading = false;
              }
            })
          }
        }
      })
    },
    // å¯¼å‡ºæŒ‰é’®
    exportClickHandler() {
      if (func.isEmptyObject(this.nodeRow)) {
        this.$message.error('请至少选择一条数据');
        return;
      }
      this.leftRoleData = this.nodeRow.id === 'firstNode' ? [
        {
          name: '名称',
          oid: 'name'
        },
        {
          name: '描述',
          oid: 'desc'
        }
      ] : [
        {
          name: '名称',
          oid: 'name'
        },
        {
          name: 'key',
          oid: 'key'
        },
        {
          name: 'value',
          oid: 'value'
        },
        {
          name: '描述',
          oid: 'desc'
        }
      ]
      this.$refs.transfer.visible = true;
    },
    // å¯¼å‡ºä¿å­˜
    exportSendHandler(row, index) {
      console.log(row, index);
      const params = {
        expType: index === 0 ? 'select' : index === 1 ? 'all' : '',
        expAttrNames: row,
        selectDataIdentify: index === 0 ? this.selectList.map(item => {
          return item.id
        }) : null,
        conditionMap: {
          "isExpAppConfDetail": this.nodeRow.id === 'firstNode' ? false : true,
          "clsId": this.nodeRow.id !== 'firstNode' ? this.nodeRow.id : null
        }
      }
      exportSysConf(params).then(res => {
        func.downloadFileByBlobHandler(res);
        this.$message.success('导出成功');
      }).catch(err => {
        this.$message.error(err);
      })
    }
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
@@ -1,13 +1,38 @@
<template>
  <basic-container>
    <div class="container">
      <el-form ref="form" :model="form" label-width="150px">
        <el-form-item label="当前在线用户人数">
          <div style="display: flex;">
            <el-input v-model="form.name" :readOnly="true"></el-input>
            <el-button plain style="margin-left: 10px"> åˆ·æ–°</el-button>
          </div>
        </el-form-item>
      </el-form>
    </div>
  </basic-container>
</template>
<script>
export default {
  name: "index"
  name: "index",
  data() {
    return {
      form: {
        name: '0'
      }
    }
  }
}
</script>
<style scoped>
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 500px;
  height: 500px;
  margin: auto;
}
</style>