田源
2023-11-02 67de2ff2f4ad0f09594edb6ef5222b03c1a8e266
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -5,6 +5,7 @@
    append-to-body
    @close="closeSubmitDialog"
    width="70%"
    top="6vh"
    style="height: 115vh;"
  >
    <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm"
@@ -15,9 +16,9 @@
      <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-form-item label="数据库表名" label-width="100px">
        <el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input>
      </el-form-item>
      </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"
@@ -78,7 +79,7 @@
        <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)">编辑
        <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)">移除
@@ -202,7 +203,7 @@
  watch: {
    btmType: {
      handler(newval, oldval) {
        console.log('监听', newval, oldval)
        // console.log('监听', newval, oldval)
      },
      deep: true,
      immediate: true
@@ -536,7 +537,7 @@
      if (!this.btmType.attributes) {
        this.btmType.attributes = [];
      }
      console.log(this.attrRef.selectData);
      // console.log(this.attrRef.selectData);
      this.attrRef.selectData.forEach(item => {
        this.btmType.attributes.push({
          id: item.id,
@@ -562,7 +563,7 @@
    },
    // 添加业务类型
    submitBtmType() {
      console.log(this.btmType);
      // console.log(this.btmType);
      if (!this.btmType.attributes){
         this.$message.warning("还没有为业务类型选择属性");
         return;
@@ -605,15 +606,17 @@
    },
    // 列表编辑
    cellEditClick(cell) {
      console.log(cell);
      // console.log(cell);
      cell.$cellEdit = true;
    },
    // 列表编辑保存
    cellEditSave(row) {
      this.btmType.attributes[row.$index].name = row.name
      this.btmType.attributes[row.$index].defaultValue = row.defaultValue;
      this.btmType.attributes[row.$index].description = row.description;
    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() {