修改版本规则、元数据页面查看应用范围;修正页面点击编辑时,修改了源数据的问题;
已修改8个文件
653 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/omd/revisionRule.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/Business.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/LinkType.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/Version.vue 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/Versionpackage.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/original.vue 411 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/status.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/omd/revisionRule.js
@@ -1,6 +1,10 @@
import request from '@/router/axios';
export const getPage = (current,size,params) => {
var model = '/api/ubcs-omd';
var controller = '/revision-rule';
export const getPage = (current, size, params) => {
    return request({
        url: '/api/ubcs-omd/revision-rule/page',
        method: 'get',
@@ -62,7 +66,7 @@
    })
}
export const refList = (currentPage,pageSize,params) => {
export const refList = (currentPage, pageSize, params) => {
    return request({
        url: '/api/ubcs-omd/revision-rule/ref',
        method: 'get',
@@ -72,4 +76,14 @@
            pageSize
        }
    })
}
export const getAppayRange = (id) => {
    return request({
        url: model + controller + '/get-apply-range',
        method: 'get',
        params: {
            id
        }
    })
}
Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -258,10 +258,7 @@
            }
          ]
        },
        data: [{
          tableName: '1',
          description: '2'
        }]
        data: [],
      }
    }
  },
@@ -338,7 +335,8 @@
      this.ifRefreshBtmAddRefresh();
    },
    businessEdit(){
      this.$refs.btmAdd.btmType = this.obj;
      var json = JSON.stringify(this.obj);
      this.$refs.btmAdd.btmType = JSON.parse(json);
      this.$refs.btmAdd.showSubmitDialog = true;
      this.ifRefreshBtmAddRefresh();
    },
Source/UBCS-WEB/src/views/modeling/LinkType.vue
@@ -156,7 +156,9 @@
    data() {
        return {
            addOption: {
                linkType: {},
                linkType: {
                    attributes:[]
                },
            },
            domain: null,
            domainOptions: [],
@@ -240,13 +242,20 @@
        },
        // 添加按钮点击事件
        linkTypeAdd() {
            this.$refs.linkAdd.linkType = {};
            this.$refs.linkAdd.showSubmitDialog = true;
        },
        // 编辑按钮点击事件
        linkTypeEdit() {
            this.addOption.linkType = this.obj;
            var linktype = this.obj;
            linktype.fromBtmValues = this.obj.fromBtmTypes;
            linktype.toBtmValues = this.obj.toBtmTypes;
            linktype.attributes = this.obj.attributes;
            var json = JSON.stringify(linktype);
            this.addOption.linkType = JSON.parse(json);
            this.$refs.linkAdd.linkType = this.addOption.linkType;
            this.$refs.linkAdd.showSubmitDialog = true;
            console.log(this.obj);
        },
        // 从已有中获取按钮点击事件
        selectFromTable() {
Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue
@@ -20,7 +20,7 @@
            </el-form-item>
            <el-form-item label="From端类型" label-width="100px">
                <!-- from端业务类型选择 -->
                <el-select v-model="fromBtmValues" :value="fromBtmTypes" value-key="oid" placeholder="请选择From端类型" filterable multiple collapse-tags @change="fromSelectChange">
                <el-select v-model="linkType.fromBtmValues" :value="linkType.fromBtmTypes" value-key="oid" placeholder="请选择From端类型" filterable multiple collapse-tags @change="fromSelectChange">
                    <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name">
                        <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name"
                            :value="item">
@@ -30,7 +30,7 @@
            </el-form-item>
            <el-form-item label="To端类型" label-width="100px">
                <!-- to端业务类型选择 -->
                <el-select v-model="toBtmValues" :value="toBtmTypes" value-key="oid" placeholder="请选择To端类型" filterable multiple collapse-tags @change="toSelectChange">
                <el-select v-model="linkType.toBtmValues" :value="linkType.toBtmTypes" value-key="oid" placeholder="请选择To端类型" filterable multiple collapse-tags @change="toSelectChange">
                    <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name">
                        <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name"
                            :value="item">
@@ -331,6 +331,7 @@
            row.$cellEdit = false;
        },
        fromSelectChange(dataList){
            console.log(dataList);
            this.linkType.fromBtmTypes = [];
            var fromBtmName = "";
            var fromBtmType = "";
@@ -341,6 +342,7 @@
            })
            this.linkType.fromBtmTypeName = fromBtmName;
            this.linkType.fromBtmType = fromBtmType;
            console.log(this.linkType);
        },
        toSelectChange(dataList){
            console.log(dataList);
Source/UBCS-WEB/src/views/modeling/Version.vue
@@ -11,36 +11,41 @@
               @row-del="rowDel"
               @refresh-change="refreshChange"
               @search-reset="searchChange"
               @search-change="searchChange">
               @search-change="searchChange"
               @row-click="rowClick">
      <template slot="menuLeft">
        <el-tooltip class="item" effect="dark" content="查找版本规则使用范围" placement="top">
          <el-button size="small"
                     plain
                     type="primary"
                     icon="el-icon-zoom-in"
                     @click="handleSearch">查看使用范围
                     @click="applyRangeSearch">查看使用范围
          </el-button>
        </el-tooltip>
      </template>>
      </template>
      <template slot="radio"
                  slot-scope="{row}">
                      <el-radio v-model="selectRow"
                          :label="row.$index">&nbsp;
                      </el-radio>
                </template>
    </avue-crud>
    <el-dialog title="查看使用范围"
               append-to-body
               :visible.sync="packageSearchBox"
               width="1200px">
      <versionpackage></versionpackage>
    </el-dialog>
    <versionpackage :rangeData="applyRangeData" ref="applyRange"></versionpackage>
  </basic-container>
</template>
<script>
import { getPage,add,update,remove } from '../../api/omd/revisionRule';
import { getPage,add,update,remove,getAppayRange } from '../../api/omd/revisionRule';
export default {
  name: "Version",
  data(){
    return {
      //查看使用范围
      packageSearchBox:false,
      // 点击数据
      selectRow: '',
      selectRowData: {},
      //分页数据
      page: {
        pageSize: 10,
@@ -56,7 +61,14 @@
        border: true,
        index: true,
        searchMenuSpan:5,
        highlightCurrentRow: true,
        stripe:true,
        column:[
          {
            label: '',
            prop: 'radio',
            width: 120
          },
          {
            label:'英文名称',
            prop: 'id'
@@ -92,12 +104,31 @@
            type:"textarea"
          }
        ]
      }
      },
      applyRangeData: []
    }
  },
  methods:{
    handleSearch(){
      this.packageSearchBox=true
    // 行点击
    rowClick(row){
      this.selectRow = row.$index;
      this.selectRowData = row;
    },
    // 查看应用范围
    applyRangeSearch(){
      if (!this.selectRow && this.selectRow != 0){
        console.log(this.selectRow);
          this.$message({
            type:"warning",
            message: "请先选择属性"
          })
        }
      getAppayRange(this.selectRowData.id).then(res => {
         this.applyRangeData = res.data.data;
         this.$refs.applyRange.rangeData = this.applyRangeData;
         this.$refs.applyRange.showDialog = true;
      })
      // this.packageSearchBox=true
    },
    getList() {
      this.loading = true;
Source/UBCS-WEB/src/views/modeling/Versionpackage.vue
@@ -1,103 +1,69 @@
<template>
  <basic-container>
    <avue-crud ref="crud"
               v-model="form"
               :data="data"
               :option="option"
               @on-load="getList"
               @refresh-change="refreshChange"
               @search-change="searchChange"
    >
    </avue-crud>
  </basic-container>
  <el-dialog title="查看应用范围" :visible.sync="showDialog" append-to-body @close="closeDialog" width="65%"
    style="height: 115vh;">
    <basic-container>
      <avue-crud ref="crud" :data="rangeData" :option="option">
      </avue-crud>
    </basic-container>
  </el-dialog>
</template>
<script>
export default {
  name: "Versionpackage.vue",
  data(){
    return {
  props: {
    rangeData: {
      type: Array
    },
      data:[
        {
          name:"测试1",
          source:"测试1",
          shows:"测试1"
        },
        {
          name:"测试2",
          source:"测试2",
          shows:"测试2"
        },
        {
          name:"测试3",
          source:"测试3",
          shows:"测试3"
        },
        {
          name:"测试4",
          source:"测试4",
          shows:"测试4"
        },
      ],
      form:{},
      option:{
        height:300,
        headerAlign:'center',
  },
  data() {
    return {
      showDialog: false,
      option: {
        height: 300,
        headerAlign: 'center',
        align: 'center',
        border: true,
        menu: false,
        index: true,
        searchMenuSpan:6,
        addBtn:false,
        indexFixed:false,
        menuFixed:false,
        column:[
          {
            label:"名称",
            prop:"name",
          },
          {
            label:"来源",
            prop:"source",
            search:true
          },
          {
            label:"说明",
            prop:"shows",
          },
        addBtn: false,
        indexFixed: false,
        menuFixed: false,
        header: false,
        highlightCurrentRow: true,
        column: [{
          label: '英文名称',
          prop: 'id'
        },
        {
          label: '中文名称',
          prop: 'name',
        },
        {
          label: '所属领域',
          prop: 'domainText',
        },{
          label: '数据表名',
          prop: 'tableName',
          width: 200
        },
        {
          label: '说明',
          prop: 'descirption',
        },
        ]
      }
    }
  },
  methods:{
    // getList () {
    //   this.loading = true;
    //   const data = Object.assign({
    //     pageNum: this.page.currentPage,
    //     pageSize: this.page.pageSize,
    //   }, this.params)
    //   this.data = [];
    //   getList(data).then(res => {
    //     const data = res.data.data
    //     this.loading = false;
    //     this.page.total = data.total;
    //     const result = data.list;
    //     this.data = result;
    //   })
    // },
    //搜索
    searchChange(params, done) {
      if (done) done();
      this.params = params;
      this.page.currentPage = 1;
      this.getList();
      this.$message.success('搜索成功')
  methods: {
    closeDialog() {
      this.rangeData = [];
      this.showDialog = false;
    },
  }
}
</script>
<style scoped>
</style>
Source/UBCS-WEB/src/views/modeling/original.vue
@@ -2,101 +2,90 @@
  <el-container>
    <el-main>
      <basic-container>
        <avue-crud v-model="form"
          ref="crud"
          :option="option"
          :data="data"
          @on-load="onLoad"
          :page.sync="page"
          @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">
             <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave">编辑</el-button>
             <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave">删除</el-button>
        <avue-crud v-model="form" ref="crud" :option="option" :data="data" @on-load="onLoad" :page.sync="page"
          @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="menuLeft">
            <el-button size="small"
              type="primary"
              icon="el-icon-plus"
              @click="addSave">新&nbsp;&nbsp;增
          <template slot="menu">
            <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave">编辑</el-button>
            <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave">删除</el-button>
          </template>
          <template slot="menuLeft">
            <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave">新&nbsp;&nbsp;增
            </el-button>
            <el-button size="small"
                       plain
                       type="primary"
                       icon="el-icon-zoom-in"
                       @click="applyRangeOpen">查看使用范围
            <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">查看使用范围
            </el-button>
          </template>
          <template slot="typeValue" slot-scope="{row}">
            <el-tag>{{ row.typeValue }}</el-tag>
          </template>
        </avue-crud>
        <el-dialog :visible.sync="applyRange.display" append-to-body :title="applyRange.title" width="600px"
        <!-- <el-dialog :visible.sync="applyRange.display" append-to-body :title="applyRange.title" width="600px"
        @close="applyRangeClose">
            <avue-crud v-model="applyRange.model" :option="applyRange.option" :data="applyRange.data" class="applyRangeTable"
            ></avue-crud>
        </el-dialog>
        </el-dialog> -->
        <Versionpackage :rangeData="applyRangeData" ref="applyRange"></Versionpackage>
      </basic-container>
    </el-main>
    <el-aside>
      <basic-container class="itemForm">
            <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>
                {{ 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 style="height:15px"></div>
        <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>
            {{ 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 style="height:15px"></div>
        <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-tab-pane label="参照" name="referTab">
          <el-tab-pane label="参照" name="referTab">
            <el-descriptions class="margin-top" :column="1" size="medium" border>
              <el-descriptions-item>
                <template slot="label">
@@ -148,173 +137,136 @@
  add,
  update, getPage, getApplyRange
} from "@/api/omd/OmdAttribute";
import Versionpackage from "./Versionpackage.vue";
export default {
  name: "original",
  data() {
    return {
    return {
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 100
      },
      selectRow: '',
      selectRow: "",
      data: [],
      form:{},
      form: {},
      attribute: {
        nullable: true
      },
      applyRangeData: [],
      option: {
        height: "550px",
        headerAlign: 'center',
        headerAlign: "center",
        border: true,
        index: true,
        rowKey: 'id',
        rowKey: "id",
        tabs: true,
        stripe:true,
        stripe: true,
        indexFixed: false,
        menuWidth: 150,
        highlightCurrentRow: true,
        addBtn:false,
        editBtn:false,
        delBtn:false,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        column: [{
            label: '选择',
            prop: 'radio',
            width: 60,
            hide: false,
            display: false
          },
          {
            label: '属性编号',
            prop: 'id',
            align: 'left',
            display: false,
            width: 200,
            required: true
          label: "选择",
          prop: "radio",
          width: 60,
          hide: false,
          display: false
        }, {
          label: "属性编号",
          prop: "id",
          align: "left",
          display: false,
          width: 200,
          required: true
        }, {
          label: "属性名称",
          prop: "name",
          align: "left",
          display: false
        }, {
          label: "标签",
          prop: "hashtag",
          // hide: true,
          display: false
        }, {
          label: "是否使用枚举",
          prop: "usingDict",
          type: "switch",
          hide: true,
          labelWidth: 132,
          display: false,
          dicData: [{
            label: "是",
            value: "true"
          }, {
            label: '属性名称',
            prop: 'name',
            align: 'left',
            display: false
          },
          {
            label: '标签',
            prop: 'hashtag',
            // hide: true,
            display: false
          },
          {
            label: '是否使用枚举',
            prop: 'usingDict',
            type: 'switch',
            hide: true,
            labelWidth: 132,
            display: false,
            dicData: [{
              label: '是',
              value: 'true'
            }, {
              label: '否',
              value: 'false'
            }]
          },
          {
            label: '属性类型',
            prop: 'typeValue',
            display: false,
            // hide: true
          },
          {
            label: '默认值',
            prop: 'defaultValue',
            display: false
          },
          {
            label: '允许为空',
            prop: 'nullable',
            type: 'switch',
            display: false,
            hide: true,
            labelWidth: 132,
            dicData: [{
              label: '否',
              value: 'false'
            }, {
              label: '是',
              value: 'true'
            }]
          },
          {
            label: "长度",
            prop: "maxLength",
            hide: true,
            display: false
          },
          {
            label: '描述',
            prop: 'description',
            type: "textarea",
            display: false
          },
            label: "否",
            value: "false"
          }]
        }, {
          label: "属性类型",
          prop: "typeValue",
          display: false,
          // hide: true
        }, {
          label: "默认值",
          prop: "defaultValue",
          display: false
        }, {
          label: "允许为空",
          prop: "nullable",
          type: "switch",
          display: false,
          hide: true,
          labelWidth: 132,
          dicData: [{
            label: "否",
            value: "false"
          }, {
            label: "是",
            value: "true"
          }]
        }, {
          label: "长度",
          prop: "maxLength",
          hide: true,
          display: false
        }, {
          label: "描述",
          prop: "description",
          type: "textarea",
          display: false
        },
        ]
      },
      applyRange: {
        model: "",
        title: "应用的业务类型",
        option: {
          height: 360,
          addBtn: false,
          refreshBtn: false,
          columnBtn: false,
          menu: false,
          border: true,
          reserveSelection: true,
          searchMenuSpan:8,
          searchShowBtn: false,
          highlightCurrentRow: true,
          column: [
            {
                label: '业务类型编号',
                prop: 'id',
                align: 'left',
              },
              {
                label: '业务类型名称',
                prop: 'name',
                align: 'left',
              },
          ]
        },
        data: [],
        display: false,
      },
      itemForm:{
      itemForm: {
        itemData: {},
        activeName: 'referTab',
        form:{}
        activeName: "referTab",
        form: {}
      }
    }
    };
  },
  created() {
  },
  methods: {
    refreshChange() {
      this.onLoad(this.pageParent, this.query);
    },
    addSave(){
    addSave() {
      this.$refs.originalAdd.showSubmitDialog = true;
      this.$refs.originalAdd.attribute = {};
    },
    updateSave(){
    updateSave() {
      this.$refs.originalAdd.showSubmitDialog = true;
      this.$refs.originalAdd.attribute = this.attribute;
    },
    deleteSave(){
    deleteSave() {
      remove(this.itemForm.itemData).then(res => {
        this.$message.success("删除成功");
      })
      });
    },
    onLoad(page, params = {}) {
      this.loading = true;
@@ -323,42 +275,41 @@
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.data = res.data.data.records
        this.data = res.data.data.records;
        this.itemData = this.data[0];
      })
      });
    },
    rowClick(row) {
      this.itemForm.itemData = row;
      this.selectRow = row.$index;
      this.attribute = row;
    }
    ,selectBtmType(){
        this.referType.display = true;
        this.referType.title = "请选择" + this.referType.value
    },
    applyRangeOpen(){
        if (!this.selectRow){
          this.$message({
            type:"warning",
            message: "请先选择属性"
          })
        }
        var oid = this.data[this.selectRow].oid;
        getApplyRange(oid).then(res => {
            this.applyRange.data = res.data.data;
        })
        this.applyRange.display = true;
    selectBtmType() {
      this.referType.display = true;
      this.referType.title = "请选择" + this.referType.value;
    },
    applyRangeClose(){
      this.applyRange.data = [];
      this.applyRange.display = false;
    }
    applyRangeOpen() {
      if (!this.selectRow && this.selectRow != 0) {
        this.$message({
          type: "warning",
          message: "请先选择属性"
        });
      }
      var oid = this.data[this.selectRow].oid;
      getApplyRange(oid).then(res => {
        this.applyRangeData = res.data.data;
        this.$refs.applyRange.rangeData = this.applyRangeData;
        this.$refs.applyRange.showDialog = true;
      });
    },
  },
  components: { Versionpackage }
}
</script>
<style lang="scss">
.applyRangeTable > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{
    display: none !important;
.applyRangeTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
  display: none !important;
}
</style>
Source/UBCS-WEB/src/views/modeling/status.vue
@@ -63,14 +63,14 @@
              search: true
            },
            {
              label:"中文名称",
              prop:"name",
              label:'中文名称',
              prop:'name',
              search:true,
            },
            {
              label: "描述",
              prop:"description",
              type:"textarea"
              label: '描述',
              prop:'description',
              type:'textarea'
            }
          ]
        }
@@ -78,7 +78,7 @@
    },
    methods:{
      handleSearch(){
        this.packageSearchBox=true
        // this.packageSearchBox=true
      },
      getList() {
        this.loading = true;