添加主数据手动同步,元数据管理添加下拉框条件搜索,业务类型修复bug拆分组件
已修改7个文件
已添加1个文件
1178 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/GetItem.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/Business.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/BusinessEdit.vue 830 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/original.vue 225 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/GetItem.js
@@ -136,3 +136,12 @@
    responseType: 'blob'
  })
}
//手动同步
export const syncSearch = (params) => {
  return request({
    url: 'ubcs-code/dockingManagement/searchItemDataForERP',
    method: 'get',
    params
  })
}
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -164,6 +164,21 @@
                           @current-change="handleCurrentChange">
            </el-pagination>
          </div>
          <el-dialog title="手动同步" :visible.sync="syncDialogBox"append-to-body @close="syncClose" top="200px">
            <p style="display: inline-block">最后更新时间:</p>
            <el-date-picker
              style="width: 300px"
              v-model="SyncValue"
              type="date"
              placeholder="选择日期"
              format="yyyy å¹´ MM æœˆ dd æ—¥ HH æ—¶ mm åˆ† ss ç§’"
              value-format="yyyy-MM-dd HH:mm:ss">
            </el-date-picker>
            <div slot="footer" class="dialog-footer">
              <el-button @click="syncClose">取 æ¶ˆ</el-button>
              <el-button type="primary" @click="submitSync">ç¡® å®š</el-button>
            </div>
          </el-dialog>
        </div>
      </div>
      <div class="bottom">
@@ -188,7 +203,8 @@
  applyGroupCode,
  receiveEditApply,
  applySaveCode,
  exportGroupCodeExcel
  exportGroupCodeExcel,
  syncSearch
} from "@/api/GetItem";
import {processTS, changeStatus} from "@/api/template/setPersonnel"
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
@@ -266,6 +282,9 @@
  },
  data() {
    return {
      //手动同步model
      SyncValue:'',
      syncDialogBox:false,
      isTimeStatus: false,
      isTimeName: '',
      dateValue: "",
@@ -587,8 +606,30 @@
        if (uniqueFlag === 'excelGroupCode') return this.excelGroupCode()
        //集团码导入
        if (uniqueFlag === 'importGroupCode') return this.importGroupCode("groupCode")
        //手动同步
        if (uniqueFlag === 'manualSyncing') return this.manualSyncing("groupCode")
      });
    },
    //手动同步
    manualSyncing(){
      this.syncDialogBox = true;
    },
    //手动同步关闭
    syncClose(){
      this.syncDialogBox = false;
    },
    //手动同步确定
    submitSync(){
      if(this.SyncValue){
        syncSearch({enDate:this.SyncValue}).then(res=>{
          this.$message.success('同步成功!')
          this.syncDialogBox = false;
        })
      }else {
        this.$message.warning('请选择最后更新时间!')
      }
    },
    //集团码导入
    importGroupCode(type) {
      this.batchImportData.visible = true
      this.batchImportData.type = type
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -44,7 +44,7 @@
            </el-button>
          </div>
          <!-- å·¦ä¾§æ ‘-->
          <div style="height: 690px;overflow: auto">
          <div style="height:  calc(100vh - 242px);overflow: auto">
            <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
                       :defaultExpandAll="false"
                       :option="Treeoption"
Source/UBCS-WEB/src/main.js
@@ -49,6 +49,7 @@
import cloneOtherBasicSecDialog from "@/components/code-dialog-page/cloneOtherBasicSecDialog"
import advancedQuery from "@/components/advanced-query/advancedQuery"
import businessAdd from "@/views/modeling/BusinessAdd"
import businessEdit from "@/views/modeling/BusinessEdit"
import VciMasterCrud from "@/components/MasterCrud/VciMasterCrud"
import originalAdd from "@/views/modeling/originalAdd"
import FormTemplateDialog from "@/components/FormTemplate/index"
@@ -108,6 +109,7 @@
Vue.component('referConfigDialog',referConfigDialog)
Vue.component('advancedQuery',advancedQuery)
Vue.component('businessAdd',businessAdd)
Vue.component('businessEdit',businessEdit)
Vue.component('attrCrud',attrCrud)
Vue.component('VciMasterCrud',VciMasterCrud)
Vue.component('originalAdd',originalAdd)
Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -6,7 +6,7 @@
    <el-container>
      <el-aside style="width: 300px">
        <basic-container class="businessTreeContainer">
          <div class="app">
          <div class="app"style="overflow: auto;height: 84.3vh;">
            <div style="display: flex;margin-bottom: 10px;justify-content: space-around;">
              <el-button v-if="permissionList.addBtn" plain size="mini"  type="primary"
                         @click="businessAdd">
@@ -20,7 +20,7 @@
                         type="primary" @click="selectFromTable"> ä»Žå·²æœ‰ä¸­èŽ·å–
              </el-button>
            </div>
            <avue-tree :data="treeData" :option="treeOption" class="businessTree" style="height: 70.3vh"
            <avue-tree :data="treeData" :option="treeOption" class="businessTree" style="height: 74.3vh"
                       @node-click="nodeClick">
              <template slot-scope="{ node, data }" class="el-tree-node__label">
                <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
@@ -94,24 +94,6 @@
                </template>
                {{ obj.lifeCycleName ? obj.lifeCycleName + '(' + obj.lifeCycleId + ')' : '' }}
              </el-descriptions-item>
              <!--              <el-descriptions-item :contentStyle="descriptionOption.contentStyle"-->
              <!--                                    :labelStyle="descriptionOption.labelStyle">-->
              <!--                <template slot="label">-->
              <!--                  <i :class="icons.view"></i>-->
              <!--                  è§†å›¾-->
              <!--                </template>-->
              <!--                <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">
              <i class="el-icon-arrow-down"></i>
              å®žçŽ°ç±»
            </template>
            {{ obj.implClass }}
          </el-descriptions-item> -->
              <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
                                    :labelStyle="descriptionOption.labelStyle">
                <template slot="label">
@@ -132,7 +114,7 @@
            </avue-crud>
          </basic-container>
        </el-main>
        <el-dialog :visible="ref.visible" append-to-body title="从数据库中添加" top="9vh" width="700px"
        <el-dialog :visible="ref.visible" append-to-body title="从数据库中添加" top="4vh" width="600px"
                   @close="dialoghandelfalse">
          é€‰æ‹©é¢†åŸŸï¼š
          <el-select v-model="domain" placeholder="请选择" size="small" @change="refOnLoad">
@@ -155,6 +137,10 @@
    <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" :type="type"
                  @refreshTable="initTreeOnLoad">
    </business-add>
    <business-edit ref="btmEdit" :btmType="addOption.btmEditType" :domainOption="domainOptions" :icons="icons" :type="type"
                   @refreshTable="initTreeOnLoad">
    </business-edit>
  </el-container>
</template>
<script>
@@ -193,6 +179,7 @@
      },
      addOption: {
        btmType: {},
        btmEditType:{}
      },
      loadOption: {
        height: 'auto',
@@ -262,6 +249,7 @@
          tabs: true,
          addBtn: false,
          menu: false,
          refreshBtn:false,
          highlightCurrentRow: true,
          column: [
            {
@@ -301,6 +289,7 @@
      if (data.oid) {
        getDetail(data.oid).then(res => {
          this.obj = res.data.data;
          this.addOption.btmEditType = res.data.data;
        })
      } else {
        this.$message.warning('请点击子节点');
@@ -379,9 +368,9 @@
        this.$message.warning("请选择一条叶子节点的业务类型");
        return;
      }
      const json = JSON.stringify(this.obj);
      this.$refs.btmAdd.btmType = JSON.parse(json);
      this.$refs.btmAdd.showSubmitDialog = true;
      // const json = JSON.stringify(this.obj);
      // this.$refs.btmAdd.btmType = JSON.parse(json);
      this.$refs.btmEdit.showSubmitDialog = true;
      this.type = 'edit'
      this.ifRefreshBtmAddRefresh();
    },
@@ -403,10 +392,7 @@
}
.app {
  overflow-y: auto;
  height: 84.3vh;
}
//
//.app::-webkit-scrollbar {
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -2,6 +2,7 @@
  <el-dialog
    title="业务类型"
    :visible.sync="showSubmitDialog"
    v-loading="loading"
    append-to-body
    @close="closeSubmitDialog"
    width="70%"
@@ -11,7 +12,7 @@
    <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm"
             :rules="rules" @resetFields="resetForm" status-icon="true">
      <el-form-item label="英文名称" label-width="100px" required="true" prop="id">
        <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="type !== 'add'"></el-input>
        <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="false"></el-input>
      </el-form-item>
      <el-form-item label="中文名称" label-width="100px">
        <el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input>
@@ -202,20 +203,18 @@
    },
    type: {
      type:String,
    },
    btmEditType:{
      type:Object,
      default: {}
    }
  },
  watch: {
    type: {
      handler(newval, oldval) {
        // console.log('监听', newval)
      },
      deep: true,
      immediate: true
    }
  },
  data() {
    return {
      form: {},
      loading:false,
      showSubmitDialog: false,
      option: {
        height: "330px",
@@ -485,11 +484,11 @@
    // å…³é—­ç»„件弹窗
    closeSubmitDialog() {
      this.showSubmitDialog = false;
      this.btmType.attributes = [];
      this.btmType = {};
      this.attrRef.selectData = [];
      this.attrRef.queryNotIn = null;
      this.resetForm();
      // this.btmType.attributes = [];
      // this.btmType = {};
      // this.attrRef.selectData = [];
      // this.attrRef.queryNotIn = null;
      // this.resetForm();
    },
    // å…³é—­å±žæ€§æ± æŸ¥è¯¢å¼¹çª—
    closeAttrDialog() {
Source/UBCS-WEB/src/views/modeling/BusinessEdit.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,830 @@
<template>
  <el-dialog
    title="业务类型"
    :visible.sync="showSubmitDialog"
    v-loading="loading"
    append-to-body
    @close="closeSubmitDialog"
    width="70%"
    top="6vh"
    style="height: 115vh;"
  >
    <el-form ref="form" :model="btmEditType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm"
             :rules="rules" @resetFields="resetForm" status-icon="true">
      <el-form-item label="英文名称" label-width="100px"  prop="id">
        <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="true"></el-input>
      </el-form-item>
      <el-form-item label="中文名称" label-width="100px">
        <el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input>
      </el-form-item>
      <!-- <el-form-item label="数据库表名" label-width="100px">
        <el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input>
      </el-form-item> -->
      <el-form-item label="所属领域" label-width="100px" prop="domain" class="domainSelect">
        <el-select  placeholder="请选择领域" v-model="btmType.bizDomain" :prefix-icon="icons.domain">
          <el-option v-for="item in domainOption"
                     :label="item.label" :value="item.value" :key="item.value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="版本规则" label-width="100px">
        <el-input v-model="btmType.revisionRuleName"
                  :prefix-icon="icons.revisionRule"
                  class="revisionRule"
                  @focus="openRevision"
                  clearable
                  @clear="clearRevision"
                  :suffix-icon="icons.referType"
                  placeholder="请选择,留空则不进行管理">
        </el-input>
      </el-form-item>
      <el-form-item label="生命周期" label-width="100px">
        <el-input v-model="btmType.lifeCycleName"
                  :prefix-icon="icons.lifeCycle"
                  class="lifeCycle"
                  @focus="openLifeCycle"
                  clearable
                  @clear="clearLifeCycle"
                  :suffix-icon="icons.referType"
                  placeholder="请选择,留空则不进行管理">
        </el-input>
      </el-form-item>
      <!--      <div>-->
      <!--        <el-form-item label="开启视图" label-width="100px" class="viewFlag">-->
      <!--          <el-switch v-model="btmType.viewFlag" active-color="#13ce66" @change="viewChange"></el-switch>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="视图语句" label-width="100px" class="viewInput">-->
      <!--          <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>-->
      <!--        </el-form-item>-->
      <!--      </div>-->
      <el-form-item label="描述" label-width="100px" class="description">
        <el-input v-model="btmType.description"
                  :prefix-icon="icons.desc"
                  class="descClass"
                  id="descId"
        ></el-input>
      </el-form-item>
    </el-form>
    <avue-crud :option="option"
               :data="btmType.attributes"
               :page.sync="page"
               ref="attrTable">
      <template slot-scope="scope" slot="menuLeft">
        <el-button type="danger"
                   icon="el-icon-plus"
                   size="small"
                   @click="rowAdd()">属性选择
        </el-button>
      </template>
      <template slot="attrDataTypeText" slot-scope="{row}">
        <el-tag>{{ row.attrDataTypeText }}</el-tag>
      </template>
      <template slot="menu" slot-scope="{row,index}">
        <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row,index)">编辑
        </el-button>
        <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit"
                   @click="removeFormAttrTable(row,index)">移除
        </el-button>
        <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="cellEditSave(row,index)">
          ä¿å­˜
        </el-button>
      </template>
    </avue-crud>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="submitBtmType">确定</el-button>
      <el-button @click="cancleSubmitBtmType">取消</el-button>
    </div>
    <!-- å±žæ€§æ± çš„选择 -->
    <el-dialog title="属性池"
               :visible="attrRef.visible"
               append-to-body
               @close="closeAttrDialog"
               width="80%"
    >
      <avue-crud class="attrRef"
                 :option="attrRef.option"
                 :data="attrRef.data"
                 :page.sync="attrRef.page"
                 ref="attrRef"
                 @on-load="attrRefOnLoad"
                 @search-change="attrRefSearch"
                 @selection-change="selectionChange"
                 v-loading="attrRef.loading">
        <template slot="typeValue" slot-scope="scope">
          <el-tag>{{ scope.row.typeValue }}</el-tag>
        </template>
      </avue-crud>
      <div slot="footer" class="dialog-footer">
        <el-button @click="confirmSelectAttr">确定</el-button>
        <el-button @click="cancleSelectAttr">取消</el-button>
      </div>
    </el-dialog>
    <!-- ç‰ˆæœ¬è§„则的参照 -->
    <el-dialog title="请选择版本规则"
               :visible.sync="revisionRef.visible"
               append-to-body
               width="80%">
      <avue-crud class="revisionRef"
                 :option="revisionRef.option"
                 :data="revisionRef.data"
                 :page.sync="revisionRef.page"
                 ref="revisionRef"
                 @row-click="revisionClick"
                 v-loading="revisionRef.loading"
                 @search-change="searchRevisionRule"
                 @search-reset="clearSearchRevisionRule">
        <template slot="radio"
                  slot-scope="{row}">
          <el-radio v-model="revisionRef.selectRow"
                    :label="row.$index">&nbsp;
          </el-radio>
        </template>
      </avue-crud>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="confirmRevision">确定</el-button>
        <el-button @click="cancelRevision">取消</el-button>
      </div>
    </el-dialog>
    <!-- ç”Ÿå‘½å‘¨æœŸçš„参照 -->
    <el-dialog title="请选择生命周期"
               :visible.sync="lifeCycleRef.visible"
               append-to-body
               width="80%">
      <avue-crud class="lifeCycleRef"
                 :option="lifeCycleRef.option"
                 :data="lifeCycleRef.data"
                 :page.sync="lifeCycleRef.page"
                 ref="lifeCycleRef"
                 @row-click="lifeCycleClick"
                 v-loading="lifeCycleRef.loading"
                 @search-change="searchLifeCycle"
                 @search-reset="clearSearchLifeCycle">
        <template slot="radio"
                  slot-scope="{row}">
          <el-radio v-model="lifeCycleRef.selectRow"
                    :label="row.$index">&nbsp;
          </el-radio>
        </template>
      </avue-crud>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="confirmLifeCycle">确定</el-button>
        <el-button @click="cancelLifeCycle">取消</el-button>
      </div>
    </el-dialog>
  </el-dialog>
</template>
<script>
import {add, update} from '@/api/omd/btmType';
import {queryPage} from '@/api/omd/OmdAttribute';
import {getPage} from '@/api/omd/revisionRule';
import {getList} from '@/api/modeling/cycle';
export default {
  name: 'BusinessEdit',
  props: {
    btmType: {
      type: Object,
      default:{}
    },
    domainOption: {
      type: Array
    },
    icons: {
      type: Array
    },
    type: {
      type:String,
    },
    btmEditType:{
      type:Object,
      default: {}
    }
  },
  watch: {
  },
  data() {
    return {
      form: {},
      loading:false,
      showSubmitDialog: false,
      option: {
        height: "330px",
        selection: false,
        headerAlign: 'center',
        border: true,
        index: true,
        rowKey: 'id',
        tabs: true,
        menu: true,
        editBtn: false,
        delBtn: false,
        columnBtn: false,
        menuWidth: 150,
        refreshBtn:false,
        addBtn: false,
        highlightCurrentRow: true,
        column: [
          {
            label: '英文名称',
            prop: 'id',
            align: 'center',
            disabled:true
          }, {
            label: '中文名称',
            prop: 'name',
            align: 'center',
            cell: true
          },{
            label: "类型",
            prop: "attrDataTypeText",
            align: 'center',
            slot: true
          },
          {
            label: "默认值",
            prop: "defaultValue",
            align: 'center',
            cell: true
          },
          {
            label: "说明",
            prop: "description",
            align: 'center',
            cell: true
          }
        ]
      },
      attrRef: {
        visible: false,
        page: {
          currentPage: 1,
          pageSize: 10,
        },
        loading: false,
        key: null,
        option: {
          height: 360,
          addBtn: false,
          refreshBtn: false,
          columnBtn: false,
          selection: true,
          menu: false,
          border: true,
          reserveSelection: true,
          searchMenuSpan: 8,
          highlightCurrentRow: true,
          rowKey: 'id',
          column: [
            {
              label: '英文名称',
              prop: 'id',
              align: 'left',
              search: true,
              disabled:true,
              width: 230
            }, {
              label: '中文名称',
              prop: 'name',
              align: 'center',
            },
            {
              label: "类型",
              prop: "typeValue",
              align: 'center',
              slot: true,
            },
            {
              label: "默认值",
              prop: "defaultValue",
              align: 'center'
            },
            {
              label: '允许为空',
              prop: 'nullable',
              type: 'switch',
              display: false,
              hide: true,
              labelWidth: 132,
              dicData: [{
                label: '否',
                value: 1
              }, {
                label: '是',
                value: 0
              }]
            },
            {
              label: "说明",
              prop: "description",
              cell: true,
              align: 'center'
            }
          ]
        },
        data: [],
        queryNotIn: ''
      },
      revisionRef: {
        visible: false,
        page: {
          currentPage: 1,
          pageSize: 10
        },
        loading: false,
        selectRow: '',
        searchKey: null,
        option: {
          height: 360,
          addBtn: false,
          refreshBtn: false,
          columnBtn: false,
          menu: false,
          border: true,
          reserveSelection: true,
          searchMenuSpan: 8,
          searchShowBtn: false,
          highlightCurrentRow: true,
          column: [{
            label: '选择',
            prop: 'radio',
            width: 60,
            hide: false
          },
            {
              label: '英文名称',
              prop: 'id',
              disabled:true,
              search: true
            },
            {
              label: "中文名称",
              prop: "name",
              search: true,
            },
            {
              label: "跳跃字符",
              prop: "skipCode"
            },
            {
              label: "初始值",
              prop: "startCode"
            },
            {
              label: "步长",
              prop: "serialStep"
            },
            {
              label: "前缀",
              prop: "prefixCode"
            },
            {
              label: "后缀",
              prop: "suffixCode"
            },
            {
              label: "描述",
              prop: "description",
              type: "textarea"
            }
          ]
        },
      },
      lifeCycleRef: {
        visible: false,
        page: {
          currentPage: 1,
          pageSize: 10
        },
        loading: false,
        selectRow: '',
        searchKey: null,
        option: {
          height: 360,
          addBtn: false,
          refreshBtn: false,
          columnBtn: false,
          menu: false,
          border: true,
          reserveSelection: true,
          searchMenuSpan: 8,
          searchShowBtn: false,
          highlightCurrentRow: true,
          column: [{
            label: '选择',
            prop: 'radio',
            width: 60,
            hide: false
          },
            {
              label: '英文名称',
              prop: 'id',
              disabled:true,
              search: true
            },
            {
              label: "中文名称",
              prop: "name",
              search: true,
            },
            {
              label: "跳跃字符",
              prop: "skipCode"
            },
            {
              label: "初始值",
              prop: "startCode"
            },
            {
              label: "步长",
              prop: "serialStep"
            },
            {
              label: "前缀",
              prop: "prefixCode"
            },
            {
              label: "后缀",
              prop: "suffixCode"
            },
            {
              label: "描述",
              prop: "description",
              type: "textarea"
            }
          ]
        },
      },
      rules: {
        id: [
          {required: true, message: '请输入业务类型编号', trigger: 'blur'},
          {pattern: /^[A-Za-z]+$/, message: '业务类型编号只能为英文', trigger: 'blur'},
          {min: 2, max: 20, message: '长度在2到20个字符', trigger: 'blur'}
        ],
        name: [
          {required: true, message: '请输入业务类型中文名称', trigger: 'blur'}
        ],
        domain: [
          {required: true, message: '请选择所属领域', trigger: 'blur'}
        ]
      },
    }
  },
  created() {
  },
  methods: {
    // å…³é—­ç»„件弹窗
    closeSubmitDialog() {
      this.showSubmitDialog = false;
      // this.btmType.attributes = [];
      // this.btmType = {};
      // this.attrRef.selectData = [];
      // this.attrRef.queryNotIn = null;
      // this.resetForm();
    },
    // å…³é—­å±žæ€§æ± æŸ¥è¯¢å¼¹çª—
    closeAttrDialog() {
      this.attrRef.visible = false;
    },
    // å±žæ€§é€‰æ‹©æ·»åŠ 
    async rowAdd() {
      await this.attrRefOnLoad();
      this.attrRef.visible = true;
    },
    // å±žæ€§æ± åŠ è½½
    attrRefOnLoad() {
      if (this.attrRef.queryNotIn != '' && this.btmType.attributes !== undefined && this.btmType.attributes.length > 0) {
        this.attrRef.queryNotIn = '';
        this.btmType.attributes.forEach(item => {
          this.attrRef.queryNotIn += (item.id + ",")
        })
      }
      this.attrRef.loading = true;
      queryPage(this.attrRef.key, this.attrRef.queryNotIn, this.attrRef.page.currentPage, this.attrRef.page.pageSize).then(res => {
        const data = res.data.data;
        this.attrRef.page.total = data.total;
        this.attrRef.data = data.records;
      });
      setTimeout(() => {
        this.attrRef.loading = false;
      }, 600)
      this.$nextTick(() => {
        this.$refs.attrRef.refreshTable();
      });
    },
    // å±žæ€§æ± æ£€ç´¢
    attrRefSearch(form, done) {
      this.attrRef.key = form.id;
      this.attrRefOnLoad();
      done();
      this.attrRef.key = null;
    },
    // ä»Žå±žæ€§æ± ä¸­ç§»é™¤
    removeFormAttrTable(row, index) {
      this.btmType.attributes.splice(index, 1);
      this.attrRef.queryNotIn = "";
      this.btmType.attributes.forEach(item => {
        this.attrRef.queryNotIn += (item.id + ",")
      })
    },
    // å±žæ€§æ± å‹¾é€‰äº‹ä»¶
    selectionChange(list) {
      this.attrRef.selectData = list;
    },
    // ç¡®è®¤å±žæ€§æ± å‹¾é€‰
    confirmSelectAttr() {
      if (!this.btmType.attributes) {
        this.btmType.attributes = [];
      }
      // console.log(this.attrRef.selectData);
      this.attrRef.selectData.forEach(item => {
        this.btmType.attributes.push({
          id: item.id,
          name: item.name,
          attrDataType: item.typeKey,
          attrDataTypeText: item.typeValue,
          defaultValue: item.defaultValue,
          description: item.description,
          attributeLength: item.maxLength,
          referBtmTypeId: item.referTypeCode,
          referBtmTypeName: item.referToName,
          enumId: item.dictCode,
        });
        this.attrRef.queryNotIn += (item.id + ",")
      });
      this.attrRef.data = [];
      this.closeAttrDialog();
    },
    // å–消属性池勾选
    cancleSelectAttr() {
      this.attrRef.selectData = [];
      this.closeAttrDialog();
    },
    // æ·»åŠ ä¸šåŠ¡ç±»åž‹
    submitBtmType() {
      // console.log(this.btmType);
      if (!this.btmType.attributes){
        this.$message.warning("还没有为业务类型选择属性");
        return;
      }else{
        let nullFlag = false;
        this.btmType.attributes.forEach(item => {
          if (!item.name){
            this.$message.warning("第" + (item.$index+1) + "行的中文名称不能为空");
            nullFlag = true;
            return;
          }
        })
        if (nullFlag){
          return;
        }
      }
      add(this.btmType, true).then(res => {
        // æ·»åŠ å®Œæˆï¼Œå›žè°ƒçˆ¶ç»„ä»¶çš„åˆ·æ–°
        this.$message.success('保存成功');
        this.cancleSubmitBtmType();
        this.$emit('refreshTable');
      })
    },
    // å–消添加业务类型
    cancleSubmitBtmType() {
      this.btmType = {};
      this.btmType.attributes = [];
      this.showSubmitDialog = false;
    },
    // åˆ·æ–°å±žæ€§åˆ—表
    refreshAttrTable() {
      this.$nextTick(() => {
        this.$refs.attrTable.refreshTable();
      })
    },
    //
    viewChange() {
    },
    // åˆ—表编辑
    cellEditClick(cell) {
      // console.log(cell);
      cell.$cellEdit = true;
    },
    // åˆ—表编辑保存
    cellEditSave(row,index) {
      this.btmType.attributes[index].name = row.name
      this.btmType.attributes[index].defaultValue = row.defaultValue;
      this.btmType.attributes[index].description = row.description;
      row.$cellEdit = false;
      // console.log(this.btmType.attributes);
      this.$refs.attrTable.refreshTable();
    },
    // æ‰“开版本规则参照
    openRevision() {
      this.revisionRef.visible = true;
      this.revisionRuleOnLoad();
    },
    // ç‰ˆæœ¬å‚照列表的默认查询方法
    revisionRuleOnLoad(){
      this.revisionRef.loading = true;
      getPage().then(res => {
        this.revisionRef.data = res.data.data.records;
      });
      setTimeout(() => {
        this.revisionRef.loading = false;
      }, 600)
      this.$nextTick(() => {
        this.$refs.revisionRef.refreshTable();
      });
    },
    // æ‰“开版本规则参照
    openLifeCycle() {
      this.lifeCycleRef.visible = true;
      this.lifeCycleOnLoad();
    },
    // ç”Ÿå‘½å‘¨æœŸåˆ—表的默认查询方法
    lifeCycleOnLoad(){
      this.lifeCycleRef.loading = true;
      getList().then(res => {
        this.lifeCycleRef.data = res.data.data.records;
      });
      setTimeout(() => {
        this.lifeCycleRef.loading = false;
      }, 600)
      this.$nextTick(() => {
        this.$refs.lifeCycleRef.refreshTable();
      });
    },
    // å…³é—­ç‰ˆæœ¬è§„则参照弹窗
    closeRevisionDialog() {
      this.revisionRef.visible = false;
    },
    // å…³é—­ç”Ÿå‘½å‘¨æœŸå‚照弹窗
    closeLifeCycleDialog() {
      this.lifeCycleRef.visible = false;
    },
    // ç¡®è®¤é€‰ä¸­ç‰ˆæœ¬è§„则
    confirmRevision() {
      this.btmType.revisionFlag = true;
      this.btmType.revisionRuleId = this.revisionRef.selectData.id;
      this.btmType.revisionRuleName = this.revisionRef.selectData.name;
      this.btmType.inputRevisionFlag = false;
      this.cancelRevision();
    },
    // ç¡®è®¤é€‰ä¸­ç”Ÿå‘½å‘¨æœŸ
    confirmLifeCycle() {
      this.btmType.lifeCycleFlag = true;
      this.btmType.lifeCycleId = this.lifeCycleRef.selectData.id;
      this.btmType.lifeCycleName = this.lifeCycleRef.selectData.name;
      this.cancelLifeCycle();
    },
    // å–消选中版本规则
    cancelRevision() {
      this.revisionRef.selectRow = '';
      this.revisionRef.selectData = {};
      this.closeRevisionDialog();
    },
    // å–消选中生命周期
    cancelLifeCycle() {
      this.lifeCycleRef.selectRow = '';
      this.lifeCycleRef.selectData = {};
      this.closeLifeCycleDialog();
    },
    // ç‰ˆæœ¬è§„则单选
    revisionClick(row) {
      this.revisionRef.selectRow = row.$index;
      this.revisionRef.selectData = {
        id: row.id,
        name: row.name,
      };
    },
    // ç”Ÿå‘½å‘¨æœŸå•选
    lifeCycleClick(row) {
      this.lifeCycleRef.selectRow = row.$index;
      this.lifeCycleRef.selectData = {
        id: row.id,
        name: row.name,
      };
    },
    // å–消版本规则
    clearRevision() {
      this.$delete(this.btmType, 'revisionFlag');
      this.$delete(this.btmType, 'revisionRuleId');
      this.$delete(this.btmType, 'revisionRuleName');
      this.$delete(this.btmType, 'inputRevisionFlag');
    },
    // å–消生命周期
    clearLifeCycle() {
      this.$delete(this.btmType, 'lifeCycleFlag');
      this.$delete(this.btmType, 'lifeCycleId');
      this.$delete(this.btmType, 'lifeCycleName');
    },
    // è¡¨å•重置
    resetForm() {
      this.btmType = {};
      this.$refs.form.resetFields();
    },
    /**
     * æœç´¢ç‰ˆæœ¬è§„则
     * @param params æœç´¢æ¡†è¾“入值  {id: '',name: ''} ç›´æŽ¥èŽ·å–å°±è¡Œ
     * @param done æ‰§è¡Œå®ŒæˆåŽçš„回调
     */
    searchRevisionRule(params,done){
      let condition = {};
      if (params.id){
        condition['id_like'] = params.id;
      }
      if (params.name){
        condition['name_like'] = params.name;
      }
      this.revisionRef.loading = true;
      getPage(this.revisionRef.page.currentPage,this.revisionRef.page.pageSize,condition).then(res => {
        this.revisionRef.data = res.data.data.records;
      });
      setTimeout(() => {
        done();
        this.revisionRef.loading = false;
      }, 600);
      this.$nextTick(() => {
        this.$refs.revisionRef.refreshTable();
      });
    },
    /**
     * æœç´¢ç”Ÿå‘½å‘¨æœŸ
     * @param params æœç´¢æ¡†è¾“入值
     * @param done æ‰§è¡Œå®ŒæˆåŽçš„回调
     */
    searchLifeCycle(params,done){
      let condition = {};
      if (params.id){
        condition['id_like'] = params.id;
      }
      if (params.name){
        condition['name_like'] = params.name;
      }
      this.lifeCycleRef.loading = true;
      getList(this.lifeCycleRef.page.currentPage,this.lifeCycleRef.page.pageSize,condition).then(res => {
        this.lifeCycleRef.data = res.data.data.records;
      });
      setTimeout(() => {
        done();
        this.lifeCycleRef.loading = false;
      }, 600);
      this.$nextTick(() => {
        this.$refs.lifeCycleRef.refreshTable();
      });
    },
    // å–消版本规则搜索
    clearSearchRevisionRule(item){
      this.revisionRuleOnLoad();
    },
    // å–消生命周期搜索
    clearSearchLifeCycle(item){
      this.lifeCycleOnLoad();
      console.log(item);
    }
  }
}
</script>
<style>
/* å±žæ€§æ± å‚照列表 */
.attrRef > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
  display: none !important;
}
.revisionRef > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
  display: none !important;
}
.lifeCycleRef > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
  display: none !important;
}
.btmTypeForm > .el-form-item > .el-form-item__content > .el-input > .el-input__inner {
  width: 260px;
}
.domainSelect > .el-form-item__content > .el-select > .el-input > .el-input__inner {
  width: 260px;
}
.viewFlag {
  width: 360px;
}
.viewInput > .el-form-item__content > .el-input > .el-input__inner {
  width: 630px;
}
.descClass > .el-input__inner {
  width: 1000px;
}
</style>
Source/UBCS-WEB/src/views/modeling/original.vue
@@ -1,25 +1,43 @@
  <template>
<template>
  <el-container>
    <el-main>
      <basic-container>
        <avue-crud v-model="form" ref="crud" :option="option" :data="data" @on-load="onLoad" :page.sync="page" :permission="permissionList"
          @refresh-change="refreshChange" @row-click="rowClick" style="height: calc(100vh - 148px)">
        <avue-crud ref="crud" v-model="form" :data="data" :option="option" :page.sync="page"
                   :permission="permissionList"
                   style="height: calc(100vh - 148px)"
                   @on-load="onLoad" @refresh-change="refreshChange" @row-click="rowClick">
          <template slot="radio" slot-scope="{row}">
            <el-radio v-model="selectRow" :label="row.$index">&nbsp;
            </el-radio>
          </template>
          <template slot="menu" slot-scope="{row,index}">
            <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave(row,index)" v-if="permissionList.editBtn">编辑</el-button>
            <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave(row,index)" v-if="permissionList.delBtn">删除</el-button>
            <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="text"
                       @click="updateSave(row,index)">编辑
            </el-button>
            <el-button v-if="permissionList.delBtn" icon="el-icon-delete" size="small" type="text"
                       @click="deleteSave(row,index)">删除
            </el-button>
          </template>
            <template slot="menuLeft">
            <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave" v-if="permissionList.addBtn">新&nbsp;&nbsp;增
            </el-button>
            <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen" v-if="permissionList.apply">查看使用范围
            </el-button>
            <el-input placeholder="按属性编号查询" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch"
              size="small" @change="doSearch" type="text"></el-input>
            <el-button size="small" plain type="primary" icon="el-icon-search" @click="doSearch">&nbsp;搜索</el-button>
          <template slot="menuLeft">
            <div>
              <el-button v-if="permissionList.addBtn" icon="el-icon-plus" size="small" type="primary" @click="addSave">新&nbsp;&nbsp;增
              </el-button>
              <el-button v-if="permissionList.apply" icon="el-icon-zoom-in" plain size="small" type="primary"
                         @click="applyRangeOpen">查看使用范围
              </el-button>
              <span style="width: 200px;display: inline-block">
                <el-select slot="prepend" v-model="oriValue" placeholder="请选择" size="small">
                <el-option v-for="item in oriData" :key="item.prop" :label="item.label" :value="item.prop"
                ></el-option>
              </el-select>
            </span>
              <span>
                 <el-input v-model="searchId" class="attrSearch" clearable placeholder="请输入内容"
                           prefix-icon="el-icon-search"
                           size="small" type="text" @change="doSearch"></el-input>
              <el-button icon="el-icon-search" plain size="small" type="primary" @click="doSearch">&nbsp;搜索</el-button>
              </span>
            </div>
          </template>
          <template slot="typeValue" slot-scope="{row}">
            <el-tag>{{ row.typeValue }}</el-tag>
@@ -30,68 +48,68 @@
            <avue-crud v-model="applyRange.model" :option="applyRange.option" :data="applyRange.data" class="applyRangeTable"
            ></avue-crud>
        </el-dialog> -->
        <Versionpackage :rangeData="applyRangeData" ref="applyRange"></Versionpackage>
        <Versionpackage ref="applyRange" :rangeData="applyRangeData"></Versionpackage>
      </basic-container>
    </el-main>
    <el-aside>
      <basic-container class="itemForm">
      <div style="height: 44vh">
        <el-descriptions class="margin-top" :column="1" size="medium" border title="属性项" >
          <el-descriptions-item>
            <template slot="label">
              å±žæ€§ç¼–号
            </template>
            {{ itemForm.itemData.id }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              å±žæ€§åç§°
            </template>
            {{ itemForm.itemData.name }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              å±žæ€§ç±»åž‹
            </template>
            {{ itemForm.itemData.typeValue }}
          </el-descriptions-item>
          <!--          <el-descriptions-item>
                      <template slot="label">
                        æ ‡ç­¾
                      </template>
                      {{ itemForm.itemData.hashtag }}
                    </el-descriptions-item>-->
          <el-descriptions-item>
            <template slot="label">
              é»˜è®¤å€¼
            </template>
            {{ itemForm.itemData.defaultValue }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              å…è®¸ä¸ºç©º
            </template>
            {{ 'true' == itemForm.itemData.nullable ? '是' : '否'}}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              é•¿åº¦
            </template>
            {{ itemForm.itemData.maxLength }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              æè¿°
            </template>
            {{ itemForm.itemData.description }}
          </el-descriptions-item>
        </el-descriptions>
      </div>
        <div style="height: 44vh">
          <el-descriptions :column="1" border class="margin-top" size="medium" title="属性项">
            <el-descriptions-item>
              <template slot="label">
                å±žæ€§ç¼–号
              </template>
              {{ itemForm.itemData.id }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                å±žæ€§åç§°
              </template>
              {{ itemForm.itemData.name }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                å±žæ€§ç±»åž‹
              </template>
              {{ itemForm.itemData.typeValue }}
            </el-descriptions-item>
            <!--          <el-descriptions-item>
                        <template slot="label">
                          æ ‡ç­¾
                        </template>
                        {{ itemForm.itemData.hashtag }}
                      </el-descriptions-item>-->
            <el-descriptions-item>
              <template slot="label">
                é»˜è®¤å€¼
              </template>
              {{ itemForm.itemData.defaultValue }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                å…è®¸ä¸ºç©º
              </template>
              {{ 'true' == itemForm.itemData.nullable ? '是' : '否' }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                é•¿åº¦
              </template>
              {{ itemForm.itemData.maxLength }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                æè¿°
              </template>
              {{ itemForm.itemData.description }}
            </el-descriptions-item>
          </el-descriptions>
        </div>
        <div style="height: 40vh">
          <el-descriptions class="margin-top" :column="1" size="medium" border title="属性配置"></el-descriptions>
          <el-tabs v-model="itemForm.activeName" @tab-click="handleClick" stretch="true" style="height:235px">
          <el-descriptions :column="1" border class="margin-top" size="medium" title="属性配置"></el-descriptions>
          <el-tabs v-model="itemForm.activeName" stretch="true" style="height:235px" @tab-click="handleClick">
            <el-tab-pane label="参照" name="referTab">
              <el-descriptions class="margin-top" :column="1" size="medium" border>
              <el-descriptions :column="1" border class="margin-top" size="medium">
                <el-descriptions-item>
                  <template slot="label">
                    ä½¿ç”¨å‚ç…§
@@ -113,7 +131,7 @@
              </el-descriptions>
            </el-tab-pane>
            <el-tab-pane label="枚举" name="enumTab">
              <el-descriptions class="margin-top" :column="1" :size="small" border>
              <el-descriptions :column="1" :size="small" border class="margin-top">
                <el-descriptions-item>
                  <template slot="label">
                    ä½¿ç”¨æžšä¸¾
@@ -132,7 +150,7 @@
        </div>
      </basic-container>
    </el-aside>
    <originalAdd ref="originalAdd" @refreshTable="refreshChange" :attribute="editAttribute"></originalAdd>
    <originalAdd ref="originalAdd" :attribute="editAttribute" @refreshTable="refreshChange"></originalAdd>
  </el-container>
</template>
@@ -151,6 +169,22 @@
  name: "original",
  data() {
    return {
      oriData: [
        {
          label: "属性编号",
          prop: "id",
          align: "left",
          display: false,
          width: 200,
          required: true
        }, {
          label: "属性名称",
          prop: "name",
          align: "left",
          display: false
        }
      ],
      oriValue: "id",
      page: {
        pageSize: 10,
        currentPage: 1,
@@ -165,8 +199,8 @@
      editAttribute: {},
      applyRangeData: [],
      option: {
        height:'auto',
        calcHeight:20,
        height: 'auto',
        calcHeight: 20,
        headerAlign: "center",
        border: true,
        index: true,
@@ -179,7 +213,7 @@
        addBtn: false,
        editBtn: false,
        delBtn: false,
        columnBtn:false,
        columnBtn: false,
        column: [{
          label: "选择",
          prop: "radio",
@@ -256,21 +290,21 @@
      itemForm: {
        itemData: {},
        activeName: "referTab",
        enumInitFlag:false,
        enumInitFlag: false,
        referInitFlag: false,
        form: {}
      },
      searchId: '',
    };
  },
  computed:{
  computed: {
    ...mapGetters(["permission"]),
    permissionList(){
      return{
        addBtn:this.vaildData(this.permission.modeling_original.original_add,false),
        apply:this.vaildData(this.permission.modeling_original.original_applyopen,false),
        delBtn:this.vaildData(this.permission.modeling_original.original_delete,false),
        editBtn:this.vaildData(this.permission.modeling_original.original_edit,false),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.modeling_original.original_add, false),
        apply: this.vaildData(this.permission.modeling_original.original_applyopen, false),
        delBtn: this.vaildData(this.permission.modeling_original.original_delete, false),
        editBtn: this.vaildData(this.permission.modeling_original.original_edit, false),
      }
    },
  },
@@ -286,7 +320,7 @@
      newAttr.nullable = true;
      this.$refs.originalAdd.attribute = newAttr;
    },
    updateSave(row,index) {
    updateSave(row, index) {
      this.selectRow = index;
      var json = JSON.stringify(row);
      this.editAttribute = JSON.parse(json);
@@ -299,7 +333,7 @@
      this.$refs.originalAdd.referInitFlag = this.itemForm.referInitFlag;
      // this.refreshChange()
    },
    deleteSave(row,index) {
    deleteSave(row, index) {
      this.$confirm("删除元数据将无法被恢复, æ˜¯å¦ç»§ç»­?", "提示", {
        iconClass: 'el-icon-question',
        confirmButtonText: "确定",
@@ -330,12 +364,12 @@
      this.attribute = row;
      this.checkUsingReferDict(row);
    },
    checkUsingReferDict(row){
      if (row.referToId !== null && row.referToId !== ""){
    checkUsingReferDict(row) {
      if (row.referToId !== null && row.referToId !== "") {
        this.itemForm.activeName = 'referTab';
        this.itemForm.referInitFlag = true;
        this.itemForm.enumInitFlag = false;
      }else if (row.usingDict === 'true'){
      } else if (row.usingDict === 'true') {
        this.itemForm.activeName = 'enumTab';
        this.itemForm.referInitFlag = false;
        this.itemForm.enumInitFlag = true;
@@ -344,7 +378,7 @@
          this.itemForm.itemData.dictValue = this.editAttribute.dictValue;
          this.$refs.originalAdd.dictEnums = res.data.data;
        })
      }else {
      } else {
        this.itemForm.activeName = 'referTab';
        this.itemForm.referInitFlag = true;
        this.itemForm.enumInitFlag = false;
@@ -369,22 +403,25 @@
      });
    },
    doSearch(){
      var params = {"id_like":this.searchId};
      this.onLoad(this.page,params);
    doSearch() {
      var params = {[this.oriValue + "_like"]: this.searchId};
      this.onLoad(this.page, params);
    }
  },
  components: { Versionpackage }
  components: {Versionpackage}
}
</script>
<style lang="scss">
.applyRangeTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
.applyRangeTable > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
  display: none !important;
}
.attrSearch {
  width:201px;
  width: 201px;
}
.attrSearch > .el-input__inner {
  width: 200px;
}