ludc
2023-07-28 fe903b2a6834ac06a2d1b49b705c74ad1ccb10d8
Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -1,6 +1,6 @@
<template>
  <el-container>
    <el-header class="businessHeader" style="height: 40px;">
    <el-header class="businessHeader" style="height: 40px;padding:0 8px">
      <el-button-group>
        <el-button type="primary" @click="businessAdd" size="small"> <i class="el-icon-plus"></i>&nbsp; 新增</el-button>
        <el-button type="primary" @click="businessEdit" size="small"><i class="el-icon-edit"></i>&nbsp; 修改</el-button>
@@ -15,7 +15,7 @@
          <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick" class="businessTree">
            <span class="el-tree-node__label" slot-scope="{ node, data }">
              <span>
                <i class="el-icon-star-on"></i>
                <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i>
                {{ (node || {}).label }}
              </span>
            </span>
@@ -58,9 +58,10 @@
                  <i :class="icons.domain"></i>
                  所属领域
                </template>
                <el-tag size="small">
                <el-tag v-if="obj.domainText" size="small">
                  {{ obj.domainText }}
                </el-tag>
                <span v-else></span>
              </el-descriptions-item>
              <!-- <el-descriptions-item>
            <template slot="label">
@@ -82,7 +83,7 @@
                  <i :class="icons.revisionRule"></i>
                  版本规则
                </template>
                {{ obj.versionRule }}
                {{ obj.revisionRuleName ? obj.revisionRuleName+ '(' + obj.revisionRuleId + ')' : ''}}
              </el-descriptions-item>
              <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
                :contentStyle="descriptionOption.contentStyle">
@@ -90,7 +91,7 @@
                  <i :class="icons.lifeCycle"></i>
                  生命周期
                </template>
                {{ obj.lifeCycleId }}
                {{ obj.lifeCycleName ? obj.lifeCycleName + '(' + obj.lifeCycleId + ')' : ''}}
              </el-descriptions-item>
              <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
                :contentStyle="descriptionOption.contentStyle">
@@ -98,9 +99,10 @@
                  <i :class="icons.view"></i>
                  视图
                </template>
                <el-tag size="small">
                <el-tag v-if="obj.viewText" size="small">
                  {{ obj.viewText }}
                </el-tag>
                <span v-else></span>
              </el-descriptions-item>
              <!-- <el-descriptions-item>
            <template slot="label">
@@ -176,6 +178,7 @@
        defaultExpandAll: true,
        title: '业务类型树',
        addBtn: false,
        menu:false,
        props: {
          labelText: '',
          label: 'label',
@@ -188,7 +191,7 @@
      },
      loadOption: {
        border: true,
        height: 466,
        height: 478,
        editBtn: false,
        addBtn: false,
        menu: false,
@@ -237,7 +240,8 @@
        revisionRule: 'el-icon-s-check',
        lifeCycle: 'el-icon-refresh-right',
        view: 'el-icon-view',
        desc: 'el-icon-chat-line-square'
        desc: 'el-icon-chat-line-square',
        referType: 'el-icon-search'
      },
      ref: {
        // 从表中选择dialog状态
@@ -278,7 +282,7 @@
    this.initDomainOption();
  },
  methods: {
    nodeClick(data) {
    nodeClick(data,node,leaf) {
      if (data.oid) {
        getDetail(data.oid).then(res => {
          this.obj = res.data.data;
@@ -347,11 +351,16 @@
    },
    businessAdd() {
      this.$refs.btmAdd.showSubmitDialog = true;
      this.$refs.btmAdd.btmType = {};
      this.ifRefreshBtmAddRefresh();
    },
    businessEdit() {
      var json = JSON.stringify(this.obj);
      this.$refs.btmAdd.btmType = JSON.parse(json);
      if (!this.obj.oid){
        this.$message.warning("请选择一条叶子节点的业务类型");
        return;
      }
      const json = JSON.stringify(this.obj);
      this.$refs.btmAdd.btmType =JSON.parse(json);
      this.$refs.btmAdd.showSubmitDialog = true;
      this.ifRefreshBtmAddRefresh();
    },