ludc
2023-07-07 2719424e8639a508f716dca2aaa05c340778dff1
解决冲突
已修改8个文件
2240 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/batchImport/index.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/template/templateAttr.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue 1791 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyTemplateController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 155 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/batchImport/index.js
@@ -45,16 +45,16 @@
    params: {redisOid: redisOid + "-class"}
  })
}
// 获取历史数据正确数据
export const getHistorySuccessTable = (params) => {
// 获取正确数据
export const getSuccessTable = (params) => {
  return request({
    url: '/api/ubcs-code/mdmEngineController/gridValidata',
    method: 'get',
    params: params
  })
}
// 获取历史相似项
export const getHistoryResembleTable = (params) => {
// 获取相似项
export const getResembleTable = (params) => {
  return request({
    url: '/api/ubcs-code/mdmEngineController/gridResemble',
    method: 'get',
Source/UBCS-WEB/src/api/template/templateAttr.js
@@ -192,3 +192,29 @@
    }
  })
}
//升版
export const  upVersion = (data) =>{
  return request({
    url:'/api/ubcs-code/codeClassifyTemplateController/upgrade',
    method: 'post',
    data
  })
}
//停用失效
export const  stopLose = (data) =>{
  return request({
    url:'/api/ubcs-code/codeClassifyTemplateController/disableData',
    method: 'post',
    data
  })
}
// 启用发版
export const  startRelease = (data) =>{
  return request({
    url:'/api/ubcs-code/codeClassifyTemplateController/enableData',
    method: 'post',
    data
  })
}
Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
@@ -18,7 +18,11 @@
      ></FormTemplate>
    </div> -->
    <div class="flex_box">
      <div class="left" :style="{ width: leftWidth + 'px' }" v-show="false">
      <div
        class="left"
        :style="{ width: leftWidth + 'px' }"
        v-show="type !== 'batchImportApply'"
      >
        <div class="isExpand_box">
          <el-link type="primary" @click="hideTree">
            <i
@@ -38,6 +42,7 @@
          v-show="isExpand"
          class="filter_tree"
          :data="leftTree"
          node-key="codeClassifyOid"
          default-expand-all
          highlight-current
          :filter-node-method="filterNode"
@@ -49,7 +54,7 @@
        >
        </el-tree>
      </div>
      <div class="right" :style="{ width:  1280 - leftWidth - 60 + 'px' }">
      <div class="right" :style="{ width: 1280 - leftWidth - 60 + 'px' }">
        <div class="tab_box" style="width: 100%">
          <el-tabs
            style="width: 100%"
@@ -69,7 +74,7 @@
                @selection-change="tab1TableSelectChange"
                v-if="cloNamesList.length > 1"
              >
              <el-table-column
                <el-table-column
                  type="selection"
                  width="100px"
                  align="center"
@@ -92,39 +97,41 @@
              </el-table>
              <div v-else style="height: 400px"></div>
              <div>
          <el-table
            border
            :data="currentSelectedResemble"
            style="width: 100%"
            height="200px"
          >
            <el-table-column
              v-for="item in resembleColumList"
              :key="item.field"
              :prop="item.field"
              :label="item.title"
              :minWidth="item.minWidth"
              align="center"
            >
              <template #default="{ row }">
                <span v-if="item.field === 'id'">
                  <el-link type="primary" @click="openFormTemlpate(row)">{{
                    row[item.field]
                  }}</el-link>
                </span>
                <span v-else>
                  {{ row[item.field] }}
                </span>
              </template>
            </el-table-column>
            <el-table-column
              v-show="resembleColumList.length > 0"
              prop="rowIndex"
              label="excel行数"
              align="center"
            ></el-table-column>
          </el-table>
        </div>
                <el-table
                  border
                  :data="currentSelectedResemble"
                  style="width: 100%"
                  height="200px"
                >
                  <el-table-column
                    v-for="item in resembleColumList"
                    :key="item.field"
                    :prop="item.field"
                    :label="item.title"
                    :minWidth="item.minWidth"
                    align="center"
                  >
                    <template #default="{ row }">
                      <span v-if="item.field === 'id'">
                        <el-link
                          type="primary"
                          @click="openFormTemlpate(row)"
                          >{{ row[item.field] }}</el-link
                        >
                      </span>
                      <span v-else>
                        {{ row[item.field] }}
                      </span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    v-show="resembleColumList.length > 0"
                    prop="rowIndex"
                    label="excel行数"
                    align="center"
                  ></el-table-column>
                </el-table>
              </div>
            </el-tab-pane>
            <el-tab-pane :label="tab2Name" name="tab2">
              <el-table border :data="tab2Table" height="600px">
@@ -141,7 +148,6 @@
            </el-tab-pane>
          </el-tabs>
        </div>
      </div>
    </div>
    <template #footer>
@@ -164,8 +170,8 @@
<script>
import {
  getHistorySuccessTable,
  getHistoryResembleTable,
  getSuccessTable,
  getResembleTable,
  getFormTemplate,
  getCurretnSelectedRowResemble,
  submitHistoryimport,
@@ -203,8 +209,8 @@
    type: String,
    secDTOList: {
      type: Array,
      default: () => ({})
    }
      default: () => ({}),
    },
  },
  computed: {
    dialogVisible: {
@@ -220,7 +226,7 @@
    return {
      isExpand: true,
      filterText: "",
      leftWidth: "200",
      leftWidth: 200,
      templateOid: null,
      tab1Name: "相似项",
      tab2Name: "正确数据",
@@ -249,28 +255,29 @@
    },
    hideTree() {
      if (this.isExpand) {
        this.leftWidth = "50";
        this.leftWidth = 50;
      } else {
        this.leftWidth = "200";
        this.leftWidth = 200;
      }
      this.isExpand = !this.isExpand;
    },
    treeNodeClick(data) {
      console.log(data);
      this.localCodeClassifyOid = data.codeclassifyoid;
      this.localCodeClassifyOid = data.codeClassifyOid;
      this.cloNamesList = data.cloNamesList;
      this.templateOid = data.oid;
      getHistorySuccessTable({
        codeClassifyOid: this.templateOid,
        redisOid: this.redisOid + "-ok",
      }).then((res) => {
        this.tab2Table = res.data.data;
      });
      getHistoryResembleTable({
      getResembleTable({
        codeClassifyOid: this.templateOid,
        redisOid: this.redisOid + "-resemble",
      }).then((res) => {
        this.tab1Table = res.data.data;
      });
      // 获取正确数据
      getSuccessTable({
        codeClassifyOid: this.templateOid,
        redisOid: this.redisOid + "-ok",
      }).then((res) => {
        this.tab2Table = res.data.data;
      });
      getFormTemplate({
        templateOid: data.oid,
@@ -300,8 +307,9 @@
    },
    submit() {
      const params = {
        classifyAttr: this.type === 'historyImport' ? this.classifyAttr : undefined,
        improt: this.type === 'historyImport' ? true : false,
        classifyAttr:
          this.type === "historyImport" ? this.classifyAttr : undefined,
        improt: this.type === "historyImport" ? true : false,
        codeImprotSaveDatVOList: [
          {
            Clos: this.cloNamesList.map((item) => item.title),
@@ -332,12 +340,21 @@
      immediate: true,
      deep: true,
      handler(arr) {
        if (arr.length > 0 && this.type === 'batchImportApply') {
          this.treeNodeClick(arr[0])
          this.leftWidth = 0
        if (arr.length > 0) {
          this.treeNodeClick(arr[0]);
          this.$nextTick(() => {
            this.$refs.tree.setCurrentKey(arr[0]["codeClassifyOid"]);
          });
          if (this.type === "batchImportApply") {
            this.leftWidth = 0;
          } else if (this.type === "batchApplyCode") {
            this.tab1Name = "有相似项或错误数据";
            this.tab2Name = "正确数据";
            this.leftWidth = 200;
          }
        }
      }
    }
      },
    },
  },
};
</script>
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -144,7 +144,7 @@
      return this.currentTypeObj[this.type]["action"];
    },
    upParams() {
      if (this.type === "historyImport") {
      if (this.type === "historyImport" || this.type === "batchApplyCode") {
        return {
          codeClassifyOid: this.codeClassifyOid,
          classifyAttr: this.classifyAttr,
@@ -161,11 +161,6 @@
          codeClassifyOid: this.codeClassifyOid,
          secDTOList: JSON.stringify(this.secDTOList),
          ...this.codeApplyForm,
        };
      } else if (this.type === "batchApplyCode") {
        return {
          codeClassifyOid: this.codeClassifyOid,
          classifyAttr: this.classifyAttr,
        };
      }
    },
@@ -227,10 +222,10 @@
        return Promise.reject(false);
      }
      if (this.type === "batchImportApply" && this.showCodeApply) {
        // const flag = await this.$refs.CodeApply.validate();
        // if (!flag) {
        //   return Promise.reject(false);
        // }
        const flag = await this.$refs.CodeApply.validate();
        if (!flag) {
          return Promise.reject(false);
        }
      }
      this.pageLoading = this.$loading({
        lock: true,
@@ -271,10 +266,20 @@
        this.redisOid = res.data.redisUuid;
        importDataShow(res.data.redisUuid).then((res2) => {
          this.leftTree = res2.data.data.map((item) => {
            return {
            if (this.type === 'batchApplyCode') {
              return {
                cloNamesList: item.cloNamesList,
                oid: item.codeTemplateOid,
                codeClassifyOid: item.codeClassifyOid,
                name: item.codeRuleVO.name
              }
            } else {
              return {
              ...item.codeClassifyTemplateVO,
              cloNamesList: item.cloNamesList,
              codeClassifyOid: item.codeClassifyTemplateVO.codeclassifyoid
            };
            }
          });
          this.showVisible = true;
        });
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -3,38 +3,91 @@
  <el-container>
    <!--    左侧菜单-->
    <el-aside>
      <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
      <basic-container
        style="height: 85vh; max-height: 155vh; overflow-y: scroll"
      >
        <div>
          <div style="display: flex;justify-content: space-around">
            <el-button plain size="small" type="primary" @click="TreeAdd">添加</el-button>
            <el-button plain size="small" type="primary" @click="TreeEdit">修改</el-button>
            <el-button plain size="small" type="primary" @click="TreeDel">删除</el-button>
<!--            <el-button plain size="small" type="primary" @click="ExportExcel">导出</el-button>-->
<!--            <el-button plain size="small" type="primary" @click="ImportExcel">导入</el-button>-->
            <el-button plain size="small" type="primary" @click="flushed">刷新</el-button>
          <div style="display: flex; justify-content: space-around">
            <el-button plain size="small" type="primary" @click="TreeAdd"
              >添加</el-button
            >
            <el-button plain size="small" type="primary" @click="TreeEdit"
              >修改</el-button
            >
            <el-button plain size="small" type="primary" @click="TreeDel"
              >删除</el-button
            >
            <!--            <el-button plain size="small" type="primary" @click="ExportExcel">导出</el-button>-->
            <!--            <el-button plain size="small" type="primary" @click="ImportExcel">导入</el-button>-->
            <el-button plain size="small" type="primary" @click="flushed"
              >刷新</el-button
            >
          </div>
          <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px">
          </div>
          <div
            style="
              display: flex;
              justify-content: space-around;
              margin-top: 5px;
              margin-bottom: 5px;
            "
          ></div>
        </div>
        <!--        树节点添加对话框-->
        <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :visible.sync="TreeAddFormVisible" append-to-body
                   style="width: 1700px;margin: auto">
        <el-dialog
          :title="this.TreeFlag ? '添加分类' : '添加主题库'"
          :visible.sync="TreeAddFormVisible"
          append-to-body
          style="width: 1700px; margin: auto"
        >
          <el-form :model="TreeAddform" :rules="rules">
            <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" style="display: inline-block" prop="id">
              <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input>
            <el-form-item
              :label="this.TreeFlag ? '分类编号:' : '主题库编号:'"
              label-width="150px"
              style="display: inline-block"
              prop="id"
            >
              <el-input
                v-model="TreeAddform.id"
                autocomplete="off"
                style="width: 170px"
              ></el-input>
            </el-form-item>
            <el-form-item :label="this.TreeFlag ? '分类名称:' :'主题库名称:'" label-width="110px" style="display: inline-block" prop="name">
              <el-input v-model="TreeAddform.name" autocomplete="off" style="width: 170px"></el-input>
            <el-form-item
              :label="this.TreeFlag ? '分类名称:' : '主题库名称:'"
              label-width="110px"
              style="display: inline-block"
              prop="name"
            >
              <el-input
                v-model="TreeAddform.name"
                autocomplete="off"
                style="width: 170px"
              ></el-input>
            </el-form-item>
            <el-form-item label="描述:" label-width="150px">
              <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input>
              <el-input
                v-model="TreeAddform.description"
                autocomplete="off"
                style="width: 585px"
              ></el-input>
            </el-form-item>
            <el-form-item label="编码规则:" label-width="150px">
              <el-input v-model="TreeAddform.coderuleoidName" readonly autocomplete="off" style="width: 585px" @focus="CodeFoucus"></el-input>
              <el-input
              v-model="TreeAddform.coderuleoidName"
              readonly
              autocomplete="off"
              style="width: 585px"
              @focus="CodeFoucus">
            </el-input>
            </el-form-item>
            <el-form-item label="关键属性查询规则:" label-width="150px">
              <el-input v-model="TreeAddform.codekeyattrrepeatoidName" readonly autocomplete="off" @focus="Keyfouce"
                        style="width: 585px"></el-input>
              <el-input
              v-model="TreeAddform.codekeyattrrepeatoidName"
              readonly
              autocomplete="off"
              @focus="Keyfouce"
              style="width: 585px">
            </el-input>
            </el-form-item>
            <el-form-item label="相似查询规则:" label-width="150px">
              <el-input v-model="TreeAddform.codeResembleRuleOidName"
@@ -50,193 +103,505 @@
          </div>
        </el-dialog>
        <!--        修改对话框-->
        <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}"></classifyTreeform>
        <el-dialog
          :visible.sync="TreeEditFormVisible"
          append-to-body
          title="修改分类"
        >
          <classifyTreeform
            ref="childForm"
            :loneTreeNewForm="TreeList"
            :nodeList="nodeList"
            :flag="'edit'"
            @MasterHandler="MasterHandler"
            :Editclose="
              () => {
                TreeEditFormVisible = false;
              }
            "
          ></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
                   style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px"
                   @node-click=" nodeClick"
                   @check-change="checkChange"
        <avue-tree
          ref="tree"
          v-model="CloneTreeAvueform"
          v-loading="loading"
          :data="CloneTreedata"
          :defaultExpandAll="false"
          :option="Treeoption"
          style="height: 80.5vh; padding-top: 5px; padding-bottom: 30px"
          @node-click="nodeClick"
          @check-change="checkChange"
        >
        </avue-tree>
      </basic-container>
    </el-aside>
    <el-main>
      <basic-container style="height: 85vh; max-height: 155vh; ">
      <basic-container style="height: 85vh; max-height: 155vh">
        <!--        右侧表格-->
        <avue-tabs :option="tabOption" @change="handleChange"></avue-tabs>
        <span v-if="type.prop==='tab1'">
           <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'renonly'"></classifyTreeform>
        <span v-if="type.prop === 'tab1'">
          <classifyTreeform
            ref="childForm"
            :loneTreeNewForm="TreeList"
            :nodeList="nodeList"
            :flag="'renonly'"
          ></classifyTreeform>
        </span>
        <span v-else-if="type.prop==='tab2'">
            <basic-container>
               <avue-crud v-model="crudForm" v-loading="FormLoing" :data="this.Formlist" :option="this.crudTreeOption"
                          @row-save="CrudRowSave"
                          @row-del="CrudRowDel"
                          @row-update="CrudRowUpdata"
                          :before-close="beforeClose"
                          @select="selectHandle"
               >
            <template slot="menuLeft">
              <el-button plain size="small" type="primary" @click="FindeHanler">查询</el-button>
              <el-button plain size="small" type="primary" @click="TemRefresh">刷新</el-button>
            <el-button plain size="small" type="primary" @click="Enable">启用</el-button>
            <el-button plain size="small" type="primary" @click="Deactivate">停用</el-button>
              <el-button plain size="small" type="primary" @click="CloneBtn">从其它模板克隆</el-button>
              <!--              查询对话框-->
           <el-dialog :visible.sync="FindFormVisible" append-to-body title="高级查询">
              <div>
                <el-button size="small" type="primary" @click="AdvQueries">查询</el-button>
                <el-button size="small" type="primary">重置</el-button>
              </div>
             <div style="padding-left: 80px;margin-top: 15px;">
               <template v-for="(value, key) in FindSelect">
                <div style="display: flex; justify-content: space-around; width: 85%; margin-bottom: 15px">
                <el-select v-model="FindSelect[key]" placeholder="请选择" style="width: 28%"
                           @change="handleSelectChange(key)">
                  <el-option label="模板编号" value="0"></el-option>
                  <el-option label="模板名称" value="1"></el-option>
                  <el-option label="模板描述" value="2"></el-option>
                  <el-option label="版本号" value="3"></el-option>
                  <el-option label="状态" value="4"></el-option>
                 </el-select>
                <el-select v-model="condition[0]" placeholder="请选择" style="width: 15%">
                  <el-option label="包含" value="0"></el-option>
                  <el-option label="等于" value="1"></el-option>
                </el-select>
              <el-input v-model="QueryArray[key]" style="width: 49%"></el-input>
          <span> <i class="el-icon-delete" style="font-size: 22px;margin-top:8px;margin-left: 10px"/></span>
             </div>
          </template>
        </div>
           </el-dialog>
              <!--            模板克隆  -->
                <el-dialog :visible.sync="CloneVisible" append-to-body title="克隆模板">
        <span v-else-if="type.prop === 'tab2'">
          <basic-container>
            <avue-crud
              v-model="crudForm"
              v-loading="FormLoing"
              :data="this.Formlist"
              :option="this.crudTreeOption"
              @row-save="CrudRowSave"
              @row-del="CrudRowDel"
              @row-update="CrudRowUpdata"
              :before-close="beforeClose"
              @select="selectHandle"
            >
              <template slot="menuLeft">
                <el-button
                  plain
                  size="small"
                  type="primary"
                  @click="FindeHanler"
                  >查询</el-button
                >
                <el-button plain size="small" type="primary" @click="TemRefresh"
                  >刷新</el-button
                >
                <el-button plain size="small" type="primary" @click="Enable"
                  >启用</el-button
                >
                <el-button plain size="small" type="primary" @click="Deactivate"
                  >停用</el-button
                >
                <el-button plain size="small" type="primary" @click="CloneBtn"
                  >从其它模板克隆</el-button
                >
                <!--              查询对话框-->
                <el-dialog
                  :visible.sync="FindFormVisible"
                  append-to-body
                  title="高级查询"
                >
                  <div>
                    <el-button size="small" type="primary" @click="AdvQueries"
                      >查询</el-button
                    >
                    <el-button size="small" type="primary">重置</el-button>
                  </div>
                  <div style="padding-left: 80px; margin-top: 15px">
                    <template v-for="(value, key) in FindSelect">
                      <div
                        style="
                          display: flex;
                          justify-content: space-around;
                          width: 85%;
                          margin-bottom: 15px;
                        "
                      >
                        <el-select
                          v-model="FindSelect[key]"
                          placeholder="请选择"
                          style="width: 28%"
                          @change="handleSelectChange(key)"
                        >
                          <el-option label="模板编号" value="0"></el-option>
                          <el-option label="模板名称" value="1"></el-option>
                          <el-option label="模板描述" value="2"></el-option>
                          <el-option label="版本号" value="3"></el-option>
                          <el-option label="状态" value="4"></el-option>
                        </el-select>
                        <el-select
                          v-model="condition[0]"
                          placeholder="请选择"
                          style="width: 15%"
                        >
                          <el-option label="包含" value="0"></el-option>
                          <el-option label="等于" value="1"></el-option>
                        </el-select>
                        <el-input
                          v-model="QueryArray[key]"
                          style="width: 49%"
                        ></el-input>
                        <span>
                          <i
                            class="el-icon-delete"
                            style="
                              font-size: 22px;
                              margin-top: 8px;
                              margin-left: 10px;
                            "
                        /></span>
                      </div>
                    </template>
                  </div>
                </el-dialog>
                <!--            模板克隆  -->
                <el-dialog
                  :visible.sync="CloneVisible"
                  append-to-body
                  title="克隆模板"
                >
                  <el-container>
                    <el-aside width="300px">
                      <div style="margin-bottom: 5px"><el-tag>主题库分类</el-tag></div>
                      <div style="margin-bottom: 5px">
                        <el-tag>主题库分类</el-tag>
                      </div>
                      <!--                      克隆模板的树 沿用首页树的loading和option,但是data和v-model绑定的数据创建一个新的变量,另外点击方法也是重新获取来操作克隆模板的数据-->
                        <avue-tree ref="tree" v-model="TreeAvueform" v-loading="loading" :data="Treedata"
                                   :defaultExpandAll="false"
                                   :option="Treeoption"
                                   style="height: 50.5vh;margin-right: 10px"
                                   @node-click="ClonenodeClick"
                        >
                        </avue-tree>
                      <avue-tree
                        ref="tree"
                        v-model="TreeAvueform"
                        v-loading="loading"
                        :data="Treedata"
                        :defaultExpandAll="false"
                        :option="Treeoption"
                        style="height: 50.5vh; margin-right: 10px"
                        @node-click="ClonenodeClick"
                      >
                      </avue-tree>
                    </el-aside>
                     <el-container>
                       <el-main>
                         <div style="padding-left: 10px;height: 50.5vh">
                           <div style="margin: 8px 0;display: flex">
                             <el-select v-model="Clonevalue" size="small" style="width: 130px;">
                               <el-option
                                 v-for="item in this.CloneSelectOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                    <el-container>
                      <el-main>
                        <div style="padding-left: 10px; height: 50.5vh">
                          <div style="margin: 8px 0; display: flex">
                            <el-select
                              v-model="Clonevalue"
                              size="small"
                              style="width: 130px"
                            >
                              <el-option
                                v-for="item in this.CloneSelectOptions"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                              >
                              </el-option>
                             </el-select>
                            <el-input v-model="CloneFind" size="small" style="width: 40%;margin-left: 15px" placeholder="输入值后按回车进行模糊查询"></el-input>
                             <el-button size="small" type="primary" plain style="margin-left: 10px" @click="CloneEnterFind"  @keyup.enter.native="CloneEnterFind">查询</el-button>
                           </div>
                            <avue-crud v-model="ClonecrudForm" v-loading="FormLoing" :data="this.CloneFormlist"
                                       :option="this.ClonecrudTreeOption"
                                       @selection-change="selectionChange"
                            ></avue-crud>
                         </div>
                       </el-main>
                     </el-container>
                    </el-container >
                   <div style="display: flex; justify-content: flex-end; align-items: center;margin-top: 10px" >
                     <el-button size="small " type="primary" @click="Clonehandler">确定</el-button>
                     <el-button size="small" @click="CloneVisible=false" >取消</el-button>
                   </div>
                      <el-dialog
                        width="30%"
                        title="克隆模板"
                        :visible.sync="CloneinnerVisible"
                        append-to-body>
                        <div>
                          <avue-form :option="CloneOption" @submit="Clonesubmit" v-model="CloneModel"></avue-form>
                            </el-select>
                            <el-input
                              v-model="CloneFind"
                              size="small"
                              style="width: 40%; margin-left: 15px"
                              placeholder="输入值后按回车进行模糊查询"
                            ></el-input>
                            <el-button
                              size="small"
                              type="primary"
                              plain
                              style="margin-left: 10px"
                              @click="CloneEnterFind"
                              @keyup.enter.native="CloneEnterFind"
                              >查询</el-button
                            >
                          </div>
                          <avue-crud
                            v-model="ClonecrudForm"
                            v-loading="FormLoing"
                            :data="this.CloneFormlist"
                            :option="this.ClonecrudTreeOption"
                            @selection-change="selectionChange"
                          ></avue-crud>
                        </div>
                    </el-dialog>
                      </el-main>
                    </el-container>
                  </el-container>
                  <div
                    style="
                      display: flex;
                      justify-content: flex-end;
                      align-items: center;
                      margin-top: 10px;
                    "
                  >
                    <el-button
                      size="small "
                      type="primary"
                      @click="Clonehandler"
                      >确定</el-button
                    >
                    <el-button size="small" @click="CloneVisible = false"
                      >取消</el-button
                    >
                  </div>
                  <el-dialog
                    width="30%"
                    title="克隆模板"
                    :visible.sync="CloneinnerVisible"
                    append-to-body
                  >
                    <div>
                      <avue-form
                        :option="CloneOption"
                        @submit="Clonesubmit"
                        v-model="CloneModel"
                      ></avue-form>
                    </div>
                  </el-dialog>
                </el-dialog>
            </template>
          </avue-crud>
              </template>
              <template #menu="{ size, row }">
                <el-button
                  v-show="row.lcStatus === 'Released'"
                  @click="upAndStopAndStart(row, 'upVersion')"
                  :loading="row.upVersionLoad"
                  icon="el-icon-upload2"
                  type="text"
                  :size="size"
                  >升版</el-button
                >
                <el-button
                  v-show="row.lcStatus === 'Released'"
                  @click="upAndStopAndStart(row, 'stopLose')"
                  :loading="row.stopLoseLoad"
                  icon="el-icon-circle-close"
                  type="text"
                  :size="size"
                  >停用/失效</el-button
                >
                <el-button
                  v-show="['Disabled', 'Editing'].includes(row.lcStatus)"
                  @click="upAndStopAndStart(row, 'startRelease')"
                  :loading="row.startReleaseLoad"
                  icon="el-icon-circle-check"
                  type="text"
                  :size="size"
                  >启用/发布</el-button
                >
              </template>
            </avue-crud>
          </basic-container>
          <templatePro :ProData="this.ProData" :crudOid="this.crudOid" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro>
          <templatePro
            :ProData="this.ProData"
            :crudOid="this.crudOid"
            :crudArray="this.crudArray"
            :Formlist="this.Formlist"
            :codeClassifyOid="this.codeClassifyOid"
          ></templatePro>
        </span>
        <!--     编码规则-->
        <el-dialog  :visible.sync="MasterdialogVisible"   title="为【编码规则】选取值" append-to-body>
        <el-dialog
          :visible.sync="MasterdialogVisible"
          title="为【编码规则】选取值"
          append-to-body
        >
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-select
              v-model="SelectValue"
              placeholder="请选择"
              style="width: 135px"
            >
              <el-option
                v-for="item in SelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 150px">
                style="width: 150px"
              >
              </el-option>
            </el-select>
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="SelectFindeHandler" style="margin-left: 20px">查询</el-button>
            <el-input
              style="width: 260px; margin-left: 15px"
              placeholder="输入值后进行模糊查询"
              v-model="SelectFInd"
            ></el-input>
            <el-button
              size="small"
              type="primary"
              plain
              @click="SelectFindeHandler"
              style="margin-left: 20px"
              >查询</el-button
            >
          </template>
          <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud>
          <avue-crud
            :data="masterData"
            :option="masterOption"
            @select="masterSelect"
          ></avue-crud>
          <div style="height: 30px">
            <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.coderuleoidName ==''?'未设置值':this.TreeAddform.coderuleoidName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
              <el-button type="primary" size="small" @click="MasterHandlerClick">确定</el-button>
              <el-button  size="small" @click="MasterdialogVisible=false">取消</el-button>
            <div
              style="
                display: inline-block;
                float: left;
                border: 1px solid #eee;
                padding: 5px;
                margin-top: 5px;
                font-size: 14px;
              "
            >
              已设置的值为:[{{
                this.TreeAddform.coderuleoidName == ""
                  ? "未设置值"
                  : this.TreeAddform.coderuleoidName
              }}]
            </div>
            <div
              style="
                padding-top: 10px;
                display: flex;
                justify-content: flex-end;
                float: right;
                overflow: hidden;
              "
            >
              <el-button type="primary" size="small" @click="MasterHandlerClick"
                >确定</el-button
              >
              <el-button size="small" @click="MasterdialogVisible = false"
                >取消</el-button
              >
            </div>
          </div>
        </el-dialog>
        <!--      关键属性查询规则-->
        <el-dialog  :visible.sync="KeydialogVisible"   title="为【关键属性查询规则】选取值" append-to-body>
        <el-dialog
          :visible.sync="KeydialogVisible"
          title="为【关键属性查询规则】选取值"
          append-to-body
        >
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-select
              v-model="SelectValue"
              placeholder="请选择"
              style="width: 135px"
            >
              <el-option
                v-for="item in SelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 150px">
                style="width: 150px"
              >
              </el-option>
            </el-select>
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="KeySelectFindeHandler" style="margin-left: 20px">查询</el-button>
            <el-input
              style="width: 260px; margin-left: 15px"
              placeholder="输入值后进行模糊查询"
              v-model="SelectFInd"
            ></el-input>
            <el-button
              size="small"
              type="primary"
              plain
              @click="KeySelectFindeHandler"
              style="margin-left: 20px"
              >查询</el-button
            >
          </template>
          <avue-crud :data="KeyData" :option="masterOption" @select="KeySelect"></avue-crud>
          <avue-crud
            :data="KeyData"
            :option="masterOption"
            @select="KeySelect"
          ></avue-crud>
          <div style="height: 30px">
            <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.codekeyattrrepeatoidName ==''?'未设置值':this.TreeAddform.codekeyattrrepeatoidName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
              <el-button type="primary" size="small" @click="KeyHandlerClick">确定</el-button>
              <el-button  size="small" @click="KeydialogVisible=false">取消</el-button>
            <div
              style="
                display: inline-block;
                float: left;
                border: 1px solid #eee;
                padding: 5px;
                margin-top: 5px;
                font-size: 14px;
              "
            >
              已设置的值为:[{{
                this.TreeAddform.codekeyattrrepeatoidName == ""
                  ? "未设置值"
                  : this.TreeAddform.codekeyattrrepeatoidName
              }}]
            </div>
            <div
              style="
                padding-top: 10px;
                display: flex;
                justify-content: flex-end;
                float: right;
                overflow: hidden;
              "
            >
              <el-button type="primary" size="small" @click="KeyHandlerClick"
                >确定</el-button
              >
              <el-button size="small" @click="KeydialogVisible = false"
                >取消</el-button
              >
            </div>
          </div>
        </el-dialog>
        <!--      相似项查询规则-->
        <el-dialog  :visible.sync="SimidialogVisible"   title="为【相似项查询规则】选取值" append-to-body>
        <el-dialog
          :visible.sync="SimidialogVisible"
          title="为【相似项查询规则】选取值"
          append-to-body
        >
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-select
              v-model="SelectValue"
              placeholder="请选择"
              style="width: 135px"
            >
              <el-option
                v-for="item in SelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 150px">
                style="width: 150px"
              >
              </el-option>
            </el-select>
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="SimSelectFindeHandler" style="margin-left: 20px">查询</el-button>
            <el-input
              style="width: 260px; margin-left: 15px"
              placeholder="输入值后进行模糊查询"
              v-model="SelectFInd"
            ></el-input>
            <el-button
              size="small"
              type="primary"
              plain
              @click="SimSelectFindeHandler"
              style="margin-left: 20px"
              >查询</el-button
            >
          </template>
          <avue-crud :data="simData" :option="masterOption" @select="simSelect"></avue-crud>
          <avue-crud
            :data="simData"
            :option="masterOption"
            @select="simSelect"
          ></avue-crud>
          <div style="height: 30px">
            <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.codeResembleRuleOidName ==''?'未设置值':this.TreeAddform.codeResembleRuleOidName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
              <el-button type="primary" size="small" @click="simHandlerClick">确定</el-button>
              <el-button  size="small" @click="SimidialogVisible=false">取消</el-button>
            <div
              style="
                display: inline-block;
                float: left;
                border: 1px solid #eee;
                padding: 5px;
                margin-top: 5px;
                font-size: 14px;
              "
            >
              已设置的值为:[{{
                this.TreeAddform.codeResembleRuleOidName == ""
                  ? "未设置值"
                  : this.TreeAddform.codeResembleRuleOidName
              }}]
            </div>
            <div
              style="
                padding-top: 10px;
                display: flex;
                justify-content: flex-end;
                float: right;
                overflow: hidden;
              "
            >
              <el-button type="primary" size="small" @click="simHandlerClick"
                >确定</el-button
              >
              <el-button size="small" @click="SimidialogVisible = false"
                >取消</el-button
              >
            </div>
          </div>
        </el-dialog>
@@ -260,9 +625,12 @@
  addSave,
  deleteData,
  editSave,
  copy
  copy,
  upVersion,
  stopLose,
  startRelease,
} from "@/api/template/templateAttr";
import {defaultReferDataGrid,referDataGrid} from '@/api/MasterData/master'
import { defaultReferDataGrid, referDataGrid } from "@/api/MasterData/master";
export default {
  name: "classifyTrees.vue",
  //使用inject接收参数
@@ -272,75 +640,71 @@
  data() {
    return {
      //编码规则
      MasterdialogVisible:false,
      masterData:[],
      masterSelectList:[],
      masterName:"",
      masterOid:"",
      MasterdialogVisible: false,
      masterData: [],
      masterSelectList: [],
      masterName: "",
      masterOid: "",
      //关键属性
      KeydialogVisible:false,
      KeyName:"",
      KeyOid:"",
      KeyData:[],
      KeySelectLIst:[],
      KeydialogVisible: false,
      KeyName: "",
      KeyOid: "",
      KeyData: [],
      KeySelectLIst: [],
      //相似项
      simName:"",
      simOid:"",
      simData:[],
      SimidialogVisible:false,
      simSelectList:[],
      masterOption:{
        addBtn:false,
        index:true,
        border:true,
        selection:true,
        menu:false,
        height:380,
        column:[
      simName: "",
      simOid: "",
      simData: [],
      SimidialogVisible: false,
      simSelectList: [],
      masterOption: {
        addBtn: false,
        index: true,
        border: true,
        selection: true,
        menu: false,
        height: 380,
        column: [
          {
            label:'英文名称',
            prop:'id'
            label: "英文名称",
            prop: "id",
          },
          {
            label:'中文名称',
            prop:'name'
            label: "中文名称",
            prop: "name",
          },
          {
            label:'描述',
            prop:'description'
          }
        ]
            label: "描述",
            prop: "description",
          },
        ],
      },
      SelectOption:[
      SelectOption: [
        {
          value: 'name',
          label: '中文名称'
          value: "name",
          label: "中文名称",
        },
        {
          value: 'id',
          label: '英文名称'
        }
          value: "id",
          label: "英文名称",
        },
      ],
      SelectValue:"",
      SelectFInd:"",
      SelectValue: "",
      SelectFInd: "",
      rules: {
        id: [
          { required: true, message: '请输入名称', trigger: 'blur' },
        ],
        name:[
          { required: true, message: '请输入编号', trigger: 'blur' },
        ]
        id: [{ required: true, message: "请输入名称", trigger: "blur" }],
        name: [{ required: true, message: "请输入编号", trigger: "blur" }],
      },
      addFlag:false,
      addFlag: false,
      // 表格当前行id
      crudOid:"",
      crudOid: "",
      //表格当前选择数组
      crudArray:[],
      crudArray: [],
      //模板属性展示内容
      ProData: [],
      //回车键搜索绑定值
      searchTemplate: {
        searchCondition: 'id',
        searchCondition: "id",
        findText: "",
      },
@@ -348,14 +712,14 @@
      FindFormVisible: false,
      //克隆模板对话框
      CloneVisible: false,
      CloneinnerVisible:false,
      CloneinnerVisible: false,
      //高级查询下拉框
      FindSelect: {
        id: "0",
        name: "1",
        description: "2",
        revisionValue: "3",
        lcStatus: "4"
        lcStatus: "4",
      },
      //高级查询条件
      condition: ["0", "0", "0", "0", "0"],
@@ -367,7 +731,7 @@
        name: "",
        description: "",
        revisionValue: "",
        lcStatus: ""
        lcStatus: "",
      },
      //停用启用接收数组
      FlagObj: {},
@@ -377,7 +741,7 @@
      TreeAddFormVisible: false,
      //当前点击项
      nodeClickList: "",
      ClonenodeClickList:"",
      ClonenodeClickList: "",
      //分类和主题库状态
      TreeFlag: false,
      //树加载
@@ -394,14 +758,14 @@
        //编码规则
        coderuleoidName: "",
        //存储的业务类型
        btmtypename: ""
        btmtypename: "",
      },
      //avue-tree数据,暂时没有作用,里面功能用element写了,只用avue的一个树组件不用内置表单了。
      TreeAvueform: {},
      //克隆树
      CloneTreeAvueform:{},
      CloneTreeAvueform: {},
      Treedata: [],
      CloneTreedata:[],
      CloneTreedata: [],
      Treeoption: {
        addBtn: false,
        editBtn: false,
@@ -422,48 +786,54 @@
      //克隆模板下拉框value
      Clonevalue: "0",
      //克隆模板搜索输入框
      CloneFind:"",
      CloneFind: "",
      //克隆模板下拉框数据
      CloneSelectOptions: [{
        value: '0',
        label: '模板编号'
      },
      CloneSelectOptions: [
        {
          value: '1',
          label: '模板名称'
          value: "0",
          label: "模板编号",
        },
        {
          value: "1",
          label: "模板名称",
        },
      ],
      //克隆模板确认表单数据
      CloneOption:{
        column:[
      CloneOption: {
        column: [
          {
            label:'模板编号',
            prop:'id',
            rules: [{
              required: true,
              message: "请输入模板编号",
              trigger: "blur"
            }]
          }, {
            label:'模板名称',
            prop:'name',
            rules: [{
              required: true,
              message: "请输入模板名称",
              trigger: "blur"
            }]
            label: "模板编号",
            prop: "id",
            rules: [
              {
                required: true,
                message: "请输入模板编号",
                trigger: "blur",
              },
            ],
          },
          {
            label:'描述',
            prop:'desc',
            type:'textarea',
            span:24
          }
        ]
            label: "模板名称",
            prop: "name",
            rules: [
              {
                required: true,
                message: "请输入模板名称",
                trigger: "blur",
              },
            ],
          },
          {
            label: "描述",
            prop: "desc",
            type: "textarea",
            span: 24,
          },
        ],
      },
      //克隆模板双向绑定数据
      CloneModel:[],
      CloneSelect:[],
      CloneModel: [],
      CloneSelect: [],
      //克隆模板option
      ClonecrudTreeOption: {
        index: true,
@@ -476,7 +846,7 @@
        column: [
          {
            label: "模板编号",
            prop: "id"
            prop: "id",
          },
          {
            label: "模板名称",
@@ -484,269 +854,298 @@
          },
          {
            label: "模板描述",
            prop: "description"
            prop: "description",
          },
          {
            label: "版本号",
            prop: "revisionSeq",
            display: false
            display: false,
          },
          {
            label: "状态",
            prop: "lcStatusText",
            display: false
          }
        ]
            display: false,
          },
        ],
      },
      //tab状态
      type: {},
      //Tab配置项
      tabOption: {
        column: [{
          label: '基本信息',
          prop: 'tab1',
        }, {
          label: '模板管理',
          prop: 'tab2',
        }]
        column: [
          {
            label: "基本信息",
            prop: "tab1",
          },
          {
            label: "模板管理",
            prop: "tab2",
          },
        ],
      },
      //传递给子组件动态渲染的数据
      TreeList: {},
      codeClassifyOid: ""
    }
      codeClassifyOid: "",
      upAndStopAndStartData: {
        upVersion: {
          tip: "是否进行升版?",
          typeText: "升版",
          funAPi: upVersion,
          load: 'upVersionLoad'
        },
        stopLose: {
          tip: "模板只有发布状态才能被使用,是否确定停用?",
          typeText: "停用/失效",
          funAPi: stopLose,
          load: 'stopLoseLoad'
        },
        startRelease: {
          tip: "是否确定启用/发布这个模板,模板只有发布状态才能被使用,是否继续?",
          typeText: "启用/发布",
          funAPi: startRelease,
          load: 'startReleaseLoad'
        },
      },
    };
  },
  //tab栏默认是表格
  mounted() {
    this.type = this.tabOption.column[0];
    this.getAttr();
  },
  computed:{
    crudTreeOption(){
      return{
  computed: {
    crudTreeOption() {
      return {
        index: true,
        border: true,
        height:180,
        selection:true,
        addBtn:this.Formlist.length<=0  && this.nodeClickList != "",
        height: 180,
        selection: true,
        addBtn: this.Formlist.length <= 0 && this.nodeClickList != "",
        column: [
          {
            label: "模板编号",
            prop: "id"
            prop: "id",
          },
          {
            label:"模板名称",
            prop:"name"
            label: "模板名称",
            prop: "name",
          },
          {
            label: "模板描述",
            prop:"description"
            prop: "description",
          },
          {
            label:"版本号",
            prop:"revisionSeq",
            display:false
            label: "版本号",
            prop: "revisionSeq",
            display: false,
          },
          {
            label:"状态",
            prop:"lcStatusText",
            display:false
          }
        ]
      }
    }
            label: "状态",
            prop: "lcStatusText",
            display: false,
          },
        ],
      };
    },
  },
  methods: {
    //编码规则失焦
    CodeFoucus(){
      this.MasterdialogVisible=true;
      this.MasterdefaultRend()
    CodeFoucus() {
      this.MasterdialogVisible = true;
      this.MasterdefaultRend();
    },
    //编码多选
    masterSelect(row){
    if(row.length>0){
      this.masterSelectList=row;
      this.masterName=row[0].name;
      this.masterOid=row[0].oid;
    }
    masterSelect(row) {
      if (row.length > 0) {
        this.masterSelectList = row;
        this.masterName = row[0].name;
        this.masterOid = row[0].oid;
      }
    },
    //编码规则查询
    SelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
    SelectFindeHandler() {
      if (this.SelectValue == "id") {
        const masterParameter = {
          "conditionMap[id]": this.SelectFInd,
        };
        this.MasterdefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.MasterdefaultRend(masterParameter)
        this.SelectValue=""
        this.SelectFInd=""
        this.SelectValue = "";
        this.SelectFInd = "";
      } else if (this.SelectValue == "name") {
        const masterParameter = {
          "conditionMap[name]": this.SelectFInd,
        };
        this.MasterdefaultRend(masterParameter);
        this.SelectValue = "";
        this.SelectFInd = "";
      }
    },
    //编码规则确定
    MasterHandlerClick(){
      if(this.masterSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.masterSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.MasterdialogVisible=false;
        this.masterSelectList=[]
        this.$set(this.TreeAddform,'coderuleoidName',this.masterName)
        this.$set(this.TreeAddform,'coderuleOid',this.masterOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
        console.log(this.loneTreeNewForm)
    MasterHandlerClick() {
      if (this.masterSelectList.length > 1) {
        this.$message.warning("只能选择一条数据");
      } else if (this.masterSelectList.length <= 0) {
        this.$message.warning("请选择一条数据");
      } else {
        this.MasterdialogVisible = false;
        this.masterSelectList = [];
        this.$set(this.TreeAddform, "coderuleoidName", this.masterName);
        this.$set(this.TreeAddform, "coderuleOid", this.masterOid);
        this.$emit("MasterHandler", this.loneTreeNewForm);
        console.log(this.loneTreeNewForm);
      }
    },
    //编码接口
    MasterdefaultRend(){
    MasterdefaultRend() {
      defaultReferDataGrid({
        referType:'coderule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Released'
      }).then(res=>{
        this.masterData=res.data.records;
      })
        referType: "coderule",
        isMuti: "false",
        'conditionMap["lcstatus"]': "Released",
      }).then((res) => {
        this.masterData = res.data.records;
      });
    },
    Keyfouce(){
      this.KeydialogVisible=true;
      this.KeydefaultRend()
    Keyfouce() {
      this.KeydialogVisible = true;
      this.KeydefaultRend();
    },
    //关键属性确定
    KeyHandlerClick(){
      if(this.KeySelectLIst.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.KeySelectLIst.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.KeydialogVisible=false;
        this.KeySelectLIst=[]
        this.$set(this.TreeAddform,'codeResembleRuleOidName',this.simName)
        this.$set(this.TreeAddform,'codeResembleRuleOid',this.simOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
    KeyHandlerClick() {
      if (this.KeySelectLIst.length > 1) {
        this.$message.warning("只能选择一条数据");
      } else if (this.KeySelectLIst.length <= 0) {
        this.$message.warning("请选择一条数据");
      } else {
        this.KeydialogVisible = false;
        this.KeySelectLIst = [];
        this.$set(this.TreeAddform, "codeResembleRuleOidName", this.simName);
        this.$set(this.TreeAddform, "codeResembleRuleOid", this.simOid);
        this.$emit("MasterHandler", this.loneTreeNewForm);
      }
    },
    //关键属性查询
    KeySelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
    KeySelectFindeHandler() {
      if (this.SelectValue == "id") {
        const masterParameter = {
          "conditionMap[id]": this.SelectFInd,
        };
        this.KeydefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.KeydefaultRend(masterParameter)
        this.SelectValue=""
        this.SelectFInd=""
        this.SelectValue = "";
        this.SelectFInd = "";
      } else if (this.SelectValue == "name") {
        const masterParameter = {
          "conditionMap[name]": this.SelectFInd,
        };
        this.KeydefaultRend(masterParameter);
        this.SelectValue = "";
        this.SelectFInd = "";
      }
    },
    //关键属性接口
    KeydefaultRend(){
    KeydefaultRend() {
      defaultReferDataGrid({
        referType:'codekeyattrrepeat',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled'
      }).then(res=>{
        this.KeyData=res.data.records;
      })
        referType: "codekeyattrrepeat",
        isMuti: "false",
        'conditionMap["lcstatus"]': "Enabled",
      }).then((res) => {
        this.KeyData = res.data.records;
      });
    },
    // 关键多选
    KeySelect(row){
      this.KeySelectLIst=row;
      this.KeyName=row[0].name;
      this.KeyOid=row[0].oid;
    KeySelect(row) {
      this.KeySelectLIst = row;
      this.KeyName = row[0].name;
      this.KeyOid = row[0].oid;
    },
    //关键失焦
    simFouce(){
      this.SimidialogVisible=true;
      this.simdefaultRend()
    simFouce() {
      this.SimidialogVisible = true;
      this.simdefaultRend();
    },
    //相似项确定
    simHandlerClick(){
      if(this.simSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.simSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.SimidialogVisible=false;
        this.simSelectList=[]
        this.$set(this.TreeAddform,'codeResembleRuleOidName',this.simName)
        this.$set(this.TreeAddform,'codeResembleRuleOid',this.simOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
    simHandlerClick() {
      if (this.simSelectList.length > 1) {
        this.$message.warning("只能选择一条数据");
      } else if (this.simSelectList.length <= 0) {
        this.$message.warning("请选择一条数据");
      } else {
        this.SimidialogVisible = false;
        this.simSelectList = [];
        this.$set(this.TreeAddform, "codeResembleRuleOidName", this.simName);
        this.$set(this.TreeAddform, "codeResembleRuleOid", this.simOid);
        this.$emit("MasterHandler", this.loneTreeNewForm);
      }
    },
    //相似项查询
    SimSelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
    SimSelectFindeHandler() {
      if (this.SelectValue == "id") {
        const masterParameter = {
          "conditionMap[id]": this.SelectFInd,
        };
        this.simdefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.simdefaultRend(masterParameter)
        this.SelectValue=""
        this.SelectFInd=""
        this.SelectValue = "";
        this.SelectFInd = "";
      } else if (this.SelectValue == "name") {
        const masterParameter = {
          "conditionMap[name]": this.SelectFInd,
        };
        this.simdefaultRend(masterParameter);
        this.SelectValue = "";
        this.SelectFInd = "";
      }
    },
    //  相似项多选
    simSelect(row){
      this.simSelectList=row;
      this.simName=row[0].name;
      this.simOid=row[0].oid;
      console.log('oid',this.oid)
    simSelect(row) {
      this.simSelectList = row;
      this.simName = row[0].name;
      this.simOid = row[0].oid;
      console.log("oid", this.oid);
    },
    //相似项项接口
    simdefaultRend(){
    simdefaultRend() {
      defaultReferDataGrid({
        referType:'coderesemblerule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled'
      }).then(res=>{
        this.simData=res.data.records;
      })
        referType: "coderesemblerule",
        isMuti: "false",
        'conditionMap["lcstatus"]': "Enabled",
      }).then((res) => {
        this.simData = res.data.records;
      });
    },
    //子传父
    MasterHandler(val){
      this.TreeList=val
    MasterHandler(val) {
      this.TreeList = val;
    },
    //行单选事件
    selectHandle(selection,row){
      this.crudOid=row.oid;
      this.crudArray=selection;
      gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => {
        this.ProData = res.data.data;
      }).catch(res => {
        this.$message.error(res)
    selectHandle(selection, row) {
      this.crudOid = row.oid;
      this.crudArray = selection;
      gridCodeClassifyTemplateAttr({
        "conditionMap[classifyTemplateOid]": this.Formlist[0].oid,
      })
        .then((res) => {
          this.ProData = res.data.data;
        })
        .catch((res) => {
          this.$message.error(res);
        });
    },
    //分类树数据处理
    getAttr() {
      getAtrrList().then(res => {
        this.Treedata = res.data;
        this.CloneTreedata = res.data;
        this.Treedata.forEach(() => {
          for (let i = 0; i < this.Treedata.length; i++) {
            this.Treedata[i].value = i;
          }
      getAtrrList()
        .then((res) => {
          this.Treedata = res.data;
          this.CloneTreedata = res.data;
          this.Treedata.forEach(() => {
            for (let i = 0; i < this.Treedata.length; i++) {
              this.Treedata[i].value = i;
            }
          });
          //调用修改属性名方法
          this.ModifyProperties(this.CloneTreedata, "name", "label");
        })
        //调用修改属性名方法
        this.ModifyProperties(this.CloneTreedata, 'name', 'label');
      }).catch(res => {
        this.$message.error(res)
      })
        .catch((res) => {
          this.$message.error(res);
        });
    },
    //定义一个修改数据属性名的方法
    ModifyProperties(obj, oldName, newName) {
@@ -755,7 +1154,7 @@
          obj[newName] = obj[key];
          delete obj[key];
        }
        if (typeof obj[key] === 'object') {
        if (typeof obj[key] === "object") {
          this.ModifyProperties(obj[key], oldName, newName);
        }
      }
@@ -765,91 +1164,109 @@
      this.TreeAddFormVisible = true;
      // 判断当前是否有点击子项
      if (this.nodeClickList !== "") {
        this.TreeFlag = true
        this.TreeFlag = true;
      }
    },
    //树节点添加事件
    TreeAddHandler() {
      const data = this.TreeAddform
      this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid)
      // console.log('data',data)
      TreeSave(data).then(() => {
        this.$message({
          type: 'success',
          message: '添加成功!'
      const data = this.TreeAddform;
      this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
      // console.log("data", data);
      TreeSave(data)
        .then(() => {
          this.$message({
            type: "success",
            message: "添加成功!",
          });
          this.getAttr();
          this.TreeAddFormVisible = false;
          this.TreeAddform = "";
        })
        .catch((res) => {
          this.$message({
            type: "warning",
            message: res,
          });
        });
        this.getAttr();
        this.TreeAddFormVisible = false
        this.TreeAddform = ""
      }).catch(res => {
        this.$message({
          type: 'warning',
          message: res
        });
      })
    },
    //树节点删除按钮
    TreeDel() {
      this.$confirm('是否删除当前选择的分类,将会把子分类一并删除,如果存在编码数据将不能被删除,是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        customClass: 'my-messagebox',
      }).then(() => {
        TreeCheckDel(this.nodeClickList).then(res => {
          if (res.data.data) {
            TreeDel(this.nodeClickList).then(() => {
              this.$message({
                type: 'success',
                message: '删除成功!'
              });
              this.getAttr();
            }).catch(res => {
              this.$message({
                type: 'warning',
                message: res
              });
            })
          } else {
            this.$confirm('当前数据包含有下级数据,要删除的话会和下级数据一起删除,你确认继续?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
              customClass: 'my-messageboxs',
            }).then(() => {
              TreeDel(this.nodeClickList).then(() => {
                this.$message({
                  type: 'success',
                  message: '删除成功!'
      this.$confirm(
        "是否删除当前选择的分类,将会把子分类一并删除,如果存在编码数据将不能被删除,是否继续?",
        "提示",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
          customClass: "my-messagebox",
        }
      )
        .then(() => {
          TreeCheckDel(this.nodeClickList).then((res) => {
            if (res.data.data) {
              TreeDel(this.nodeClickList)
                .then(() => {
                  this.$message({
                    type: "success",
                    message: "删除成功!",
                  });
                  this.getAttr();
                })
                .catch((res) => {
                  this.$message({
                    type: "warning",
                    message: res,
                  });
                });
                this.getAttr();
              }).catch(res => {
                this.$message({
                  type: 'warning',
                  message: res
            } else {
              this.$confirm(
                "当前数据包含有下级数据,要删除的话会和下级数据一起删除,你确认继续?",
                "提示",
                {
                  confirmButtonText: "确定",
                  cancelButtonText: "取消",
                  type: "warning",
                  customClass: "my-messageboxs",
                }
              )
                .then(() => {
                  TreeDel(this.nodeClickList)
                    .then(() => {
                      this.$message({
                        type: "success",
                        message: "删除成功!",
                      });
                      this.getAttr();
                    })
                    .catch((res) => {
                      this.$message({
                        type: "warning",
                        message: res,
                      });
                    });
                })
                .catch(() => {
                  this.$message({
                    type: "info",
                    message: "已取消删除",
                  });
                });
              })
            }).catch(() => {
              this.$message({
                type: 'info',
                message: '已取消删除'
              });
            });
          }
            }
          });
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
      });
    },
    //修改回填
    TreeEdit() {
      if (this.nodeClickList == "") {
        this.$message({
          type: 'warning',
          message: '请先从树上选择一条数据!'
          type: "warning",
          message: "请先从树上选择一条数据!",
        });
      } else {
        this.TreeEditFormVisible = true;
@@ -857,11 +1274,11 @@
    },
    //树刷新
    flushed() {
      this.loading = true
      this.getAttr()
      this.loading = true;
      this.getAttr();
      setTimeout(() => {
        this.loading = false;
        this.nodeClickList = ""
        this.nodeClickList = "";
      }, 600);
    },
    //启用和停用都先判断状态
@@ -869,102 +1286,120 @@
    Enable() {
      if (this.FlagObj.lcStatus == "Enabled") {
        this.$message({
          type: 'warning',
          message: '当前分类不是停用状态'
          type: "warning",
          message: "当前分类不是停用状态",
        });
      } else {
        this.$confirm('是否将子分类一并启用?', '提示', {
          confirmButtonText: '是',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          TreeEnable(this.nodeClickList).then(() => {
            this.$message({
              type: 'success',
              message: '启用成功!'
        this.$confirm("是否将子分类一并启用?", "提示", {
          confirmButtonText: "是",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            TreeEnable(this.nodeClickList).then(() => {
              this.$message({
                type: "success",
                message: "启用成功!",
              });
              this.getAttr();
            });
            this.getAttr()
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消启用'
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消启用",
            });
          });
        });
      }
    },
    //停用
    Deactivate() {
      if (this.FlagObj.lcStatus === "Disabled") {
        this.$message({
          type: 'warning',
          message: '当前分类不是启用状态!'
          type: "warning",
          message: "当前分类不是启用状态!",
        });
      } else {
        this.$confirm('是否停用当前分类,停用后,子分类也将不能被使用,是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          TreeDeactivate(this.nodeClickList).then(() => {
            this.$message({
              type: 'success',
              message: '停用成功!'
        this.$confirm(
          "是否停用当前分类,停用后,子分类也将不能被使用,是否继续?",
          "提示",
          {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }
        )
          .then(() => {
            TreeDeactivate(this.nodeClickList).then(() => {
              this.$message({
                type: "success",
                message: "停用成功!",
              });
              this.nodeClickList["flag"] = true;
              this.getAttr();
            });
            this.nodeClickList['flag'] = true;
            this.getAttr()
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消停用'
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消停用",
            });
          });
        });
      }
    },
    //树点击事件
    async nodeClick(data) {
      //定义一个模板属性id,数据是模板管理表格里面的oid
      this.nodeClickList = data
      this.ProData=[]
      this.nodeClickList = data;
      this.ProData = [];
      try {
        await TreeObjcet(data.oid).then(res => {
          this.FlagObj = res.data.data
        }).catch(res => {
          this.$message.error(res)
        })
        //模板管理表格数据
        await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res => {
          this.Formlist = res.data.data.filter(item => {
            if (item.codeclassifyoid != "") {
              this.codeClassifyOid = item.codeclassifyoid
              return item.codeclassifyoid == this.nodeClickList.oid
            }
        await TreeObjcet(data.oid)
          .then((res) => {
            this.FlagObj = res.data.data;
          })
        }).catch(res => {
          this.$message.error(res)
          .catch((res) => {
            this.$message.error(res);
          });
        //模板管理表格数据
        await gridCodeClassifyTemplate({
          "conditionMap[codeclassifyoid]": data.oid,
        })
          .then((res) => {
            this.Formlist = res.data.data.filter((item) => {
              if (item.codeclassifyoid != "") {
                this.codeClassifyOid = item.codeclassifyoid;
                return item.codeclassifyoid == this.nodeClickList.oid;
              }
            });
          })
          .catch((res) => {
            this.$message.error(res);
          });
        //  基本信息表单数据
        await getObjectByOid(this.nodeClickList.oid).then(res => {
          this.TreeList = res.data.data;
        }).catch(res => {
          this.$message.error(res)
        })
        await getObjectByOid(this.nodeClickList.oid)
          .then((res) => {
            this.TreeList = res.data.data;
          })
          .catch((res) => {
            this.$message.error(res);
          });
      } catch (error) {
        this.$message.error(error)
        this.$message.error(error);
      }
    },
    //克隆模板树的点击切换数据
    async ClonenodeClick(data){
      this.ClonenodeClickList=data;
      await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res=>{
        this.CloneFormlist = res.data.data.filter(item => {
    async ClonenodeClick(data) {
      this.ClonenodeClickList = data;
      await gridCodeClassifyTemplate({
        "conditionMap[codeclassifyoid]": data.oid,
      }).then((res) => {
        this.CloneFormlist = res.data.data.filter((item) => {
          if (item.codeclassifyoid != "") {
            this.codeClassifyOid = item.codeclassifyoid
            return item.codeclassifyoid == this.ClonenodeClickList.oid
            this.codeClassifyOid = item.codeclassifyoid;
            return item.codeclassifyoid == this.ClonenodeClickList.oid;
          }
        })
      })
        });
      });
    },
    //tab栏切换
    handleChange(column) {
@@ -1009,81 +1444,90 @@
    //   }
    // },
    AdvQueries() {
      this.FindFormVisible = false
      this.FindFormVisible = false;
      //如果全部为空 allEmpty为true
      const allEmpty = Object.values(this.QueryArray).every(value => !value);
      const allEmpty = Object.values(this.QueryArray).every((value) => !value);
      //如果全部为空,点击查询出现所有数据
      if (allEmpty) {
        gridCodeClassifyTemplate().then(res => {
          this.Formlist = res.data.data
        })
        gridCodeClassifyTemplate().then((res) => {
          this.Formlist = res.data.data;
        });
      } else {
        //默认是等于
        gridCodeClassifyFindTemplate({'conditionMap[id]': this.QueryArray.id},
          {'conditionMap[name]': this.QueryArray.name},
          {'conditionMap[description]': this.QueryArray.description},
          {'conditionMap[revisionValue]': this.QueryArray.revisionValue},
          {'conditionMap[lcStatus]': this.QueryArray.lcStatus}
        ).then(res => {
          this.Formlist = res.data.data
        })
        gridCodeClassifyFindTemplate(
          { "conditionMap[id]": this.QueryArray.id },
          { "conditionMap[name]": this.QueryArray.name },
          { "conditionMap[description]": this.QueryArray.description },
          { "conditionMap[revisionValue]": this.QueryArray.revisionValue },
          { "conditionMap[lcStatus]": this.QueryArray.lcStatus }
        ).then((res) => {
          this.Formlist = res.data.data;
        });
      }
    },
    //模板管理渲染
    CrudRend() {
      gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': this.nodeClickList.oid}).then(res => {
        this.Formlist = res.data.data
      })
      gridCodeClassifyTemplate({
        "conditionMap[codeclassifyoid]": this.nodeClickList.oid,
      }).then((res) => {
        this.Formlist = res.data.data;
      });
    },
    //模板管理表格添加
    CrudRowSave(row,done) {
    CrudRowSave(row, done) {
      if (this.nodeClickList.length <= 0) {
        this.$message({
          type: 'warning',
          message: '请先从树上选择一条数据!'
          type: "warning",
          message: "请先从树上选择一条数据!",
        });
      } else {
        this.$set(row, "codeclassifyoid", this.nodeClickList.oid)
        addSave(row).then(() => {
          this.$message({
            type: "success",
            message: "添加成功!"
        this.$set(row, "codeclassifyoid", this.nodeClickList.oid);
        addSave(row)
          .then(() => {
            this.$message({
              type: "success",
              message: "添加成功!",
            });
            done(row);
            this.CrudRend();
          })
          .catch((res) => {
            this.$message({
              type: "info",
              message: res,
            });
          });
          done(row)
          this.CrudRend()
        }).catch(res => {
          this.$message({
            type: 'info',
            message: res
          });
        })
      }
      console.log('123',this.codeClassifyOid)
      console.log("123", this.codeClassifyOid);
    },
    //模板管理修改
    CrudRowUpdata(row,index,done) {
      editSave(row).then(() => {
        this.CrudRend()
        this.$message({
          type: "success",
          message: "操作成功!"
    CrudRowUpdata(row, index, done) {
      editSave(row)
        .then(() => {
          this.CrudRend();
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        })
        .catch((res) => {
          this.$message.error(res);
        });
        done()
      }).catch(res => {
        this.$message.error(res)
      })
    },
    //模板管理删除
    CrudRowDel(row) {
      deleteData(row).then(()=> {
        this.CrudRend()
      }).catch(res => {
        this.$message({
          type: 'info',
          message: res
      deleteData(row)
        .then(() => {
          this.CrudRend();
        })
        .catch((res) => {
          this.$message({
            type: "info",
            message: res,
          });
        });
      })
    },
    //模板管理表格查询,只有一条数据没必要做搜索
    /*nterFind() {
@@ -1100,96 +1544,120 @@
      }
    },*/
    //克隆模板查询
    CloneEnterFind(){
      gridCodeClassifyTemplate().then(res => {
        this.CloneFormlist = res.data.data.filter(item => {
          if(this.Clonevalue == 0){
            return item.id.includes(this.CloneFind)
          }else if(this.Clonevalue == 1){
            return item.name.includes(this.CloneFind)
    CloneEnterFind() {
      gridCodeClassifyTemplate().then((res) => {
        this.CloneFormlist = res.data.data.filter((item) => {
          if (this.Clonevalue == 0) {
            return item.id.includes(this.CloneFind);
          } else if (this.Clonevalue == 1) {
            return item.name.includes(this.CloneFind);
          }
        })
      })
        });
      });
    },
    // 查询
    FindeHanler(){
      if(this.nodeClickList != ""){
        this.FindFormVisible=true
      }else {
        this.$message.warning('请从树上选择一条数据')
    FindeHanler() {
      if (this.nodeClickList != "") {
        this.FindFormVisible = true;
      } else {
        this.$message.warning("请从树上选择一条数据");
      }
    },
    //克隆模板选择确定
    Clonehandler(){
      if(this.CloneSelect.length <= 0){
    Clonehandler() {
      if (this.CloneSelect.length <= 0) {
        this.$message({
          type: 'warning',
          message: '请选择要克隆的模板!'
          type: "warning",
          message: "请选择要克隆的模板!",
        });
      }else if(this.CloneSelect.length >1){
      } else if (this.CloneSelect.length > 1) {
        this.$message({
          type: 'warning',
          message: '只能选择一条数据!'
          type: "warning",
          message: "只能选择一条数据!",
        });
      } else {
        this.CloneinnerVisible=true;
        this.CloneinnerVisible = true;
      }
    },
    //点击从其它模板克隆
    CloneBtn(){
      if(this.nodeClickList.length <= 0){
    CloneBtn() {
      if (this.nodeClickList.length <= 0) {
        this.$message({
          type: 'warning',
          message: '请先从[主题库分类】树上选择一条数据!'
          type: "warning",
          message: "请先从[主题库分类】树上选择一条数据!",
        });
      }else {
        this.CloneVisible=true;
      } else {
        this.CloneVisible = true;
      }
    },
    //克隆模板单选框改变
    selectionChange(row){
      this.CloneSelect=row;
    selectionChange(row) {
      this.CloneSelect = row;
      //双向绑定,提交表单输入框回填上当前选择的数据
      this.CloneModel.id=row[0].id;
      this.CloneModel.name=row[0].name;
      this.CloneModel.id = row[0].id;
      this.CloneModel.name = row[0].name;
      //这里有点绕,CloneSelect是我选择框选择的数据。等于this.nodeClickList.oid是因为,克隆模板传递数据要把当前选择树的oid传递给后端。而不是当前要克隆模板的oid
      this.CloneSelect[0].codeclassifyoid=this.nodeClickList.oid
      this.CloneSelect[0].codeclassifyoid = this.nodeClickList.oid;
    },
    //克隆表单提交
    Clonesubmit(row,done){
    Clonesubmit(row, done) {
      //重新赋值CloneSelect传递的数据为输入框可以修改的数据,CloneModel提交表单输入框双向绑定数据
      this.CloneSelect[0].id=this.CloneModel.id;
      this.CloneSelect[0].name=this.CloneModel.name;
      copy(this.CloneSelect[0]).then(()=>{
        //因为是嵌套弹窗所以手动关闭CloneinnerVisible,CloneVisible两个弹窗。
        this.CloneinnerVisible=false
        this.CloneVisible=false
        this.$message.success("复制成功")
        this.CrudRend()
        done(row)
      }).catch(res=>{
        done(res)
      })
      this.CloneSelect[0].id = this.CloneModel.id;
      this.CloneSelect[0].name = this.CloneModel.name;
      copy(this.CloneSelect[0])
        .then(() => {
          //因为是嵌套弹窗所以手动关闭CloneinnerVisible,CloneVisible两个弹窗。
          this.CloneinnerVisible = false;
          this.CloneVisible = false;
          this.$message.success("复制成功");
          this.CrudRend();
          done(row);
        })
        .catch((res) => {
          done(res);
        });
    },
    //刷新
    TemRefresh() {
      this.FormLoing = true
      this.FormLoing = true;
      if (this.nodeClickList.oid != "") {
        gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': this.nodeClickList.oid}).then(res => {
          this.Formlist = res.data.data.filter(item => {
            return item.codeclassifyoid == this.nodeClickList.oid
          })
        })
        gridCodeClassifyTemplate({
          "conditionMap[codeclassifyoid]": this.nodeClickList.oid,
        }).then((res) => {
          this.Formlist = res.data.data.filter((item) => {
            return item.codeclassifyoid == this.nodeClickList.oid;
          });
        });
      } else {
        this.FormLoing = true
        this.FormLoing = true;
      }
      setTimeout(() => {
        this.FormLoing = false
        this.FormLoing = false;
      }, 600);
    },
  }
}
    upAndStopAndStart(row, type) {
      this.$confirm(this.upAndStopAndStartData[type]["tip"], "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$set(row, this.upAndStopAndStartData[type]["load"], true)
        const { ts, oid } = row;
        this.upAndStopAndStartData[type]['funAPi']({ ts, oid }).then((res) => {
          if (res.data.code === 200) {
            this.$set(row, this.upAndStopAndStartData[type]["load"], false)
            this.TemRefresh();
            this.$message.success(
              this.upAndStopAndStartData[type]["typeText"] + "成功!"
            );
          }
        }).catch(() => {
            this.$set(row, this.upAndStopAndStartData[type]["load"], false)
        });
      });
    },
  },
};
</script>
<style lang="scss" scoped>
@@ -1210,5 +1678,4 @@
.my-messageboxs {
  width: 500px;
}
</style>
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyTemplateController.java
@@ -245,7 +245,7 @@
     * @return
     */
    @PostMapping( "/enableData")
    public R enable( CodeClassifyTemplateDTO codeClstemplateDTO) {
    public R enable(@RequestBody CodeClassifyTemplateDTO codeClstemplateDTO) {
        return plCodeClstemplateService.updateLcStatus(codeClstemplateDTO.getOid(), CodeClassifyTemplateLC.RELEASED.getValue());
    }
@@ -255,7 +255,7 @@
     * @return
     */
    @PostMapping( "/disableData")
    public R disableData( CodeClassifyTemplateDTO codeClassifyDTO) {
    public R disableData(@RequestBody CodeClassifyTemplateDTO codeClassifyDTO) {
        return plCodeClstemplateService.updateLcStatus(codeClassifyDTO.getOid(),CodeClassifyTemplateLC.DISABLED.getValue());
    }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
@@ -487,30 +487,30 @@
        }
        //需要新增的升级模板
//        ClientBusinessObject clientBusinessObject_template = boService.selectCBOByOid(codeClassifyDTO.getOid(), "codeclstemplate");
        CodeClassifyTemplate codeCls_template = baseMapper.selectById(templateOldOid);
        CodeClassifyTemplate codeCls_template_insert = new CodeClassifyTemplate();
//            ClientBusinessObject clientBusinessObject_template_insert = null;
//        try {
//            clientBusinessObject_template_insert = clientBusinessObjectOperation.reviseBusinessObject(clientBusinessObject_template, "");
        codeCls_template_insert.setOid(VciBaseUtil.getPk());
        codeCls_template_insert.setRevisionOid(VciBaseUtil.getPk());
        codeCls_template_insert.setNameOid(codeCls_template.getNameOid());
        codeCls_template_insert.setBtmname(codeCls_template.getBtmname());
        codeCls_template_insert.setLastR(String.valueOf(1));
        codeCls_template_insert.setFirstR(String.valueOf(0));
        codeCls_template_insert.setFirstR(String.valueOf(1));
        codeCls_template_insert.setFirstV(String.valueOf(1));
        codeCls_template_insert.setLastV(String.valueOf(1));
        codeCls_template_insert.setCreator(AuthUtil.getUser().getUserName());
        codeCls_template_insert.setCreateTime(new Date());
        codeCls_template_insert.setTs(new Date());
        codeCls_template_insert.setLastModifier(AuthUtil.getUser().getUserName());
        codeCls_template_insert.setLastModifyTime(new Date());
        codeCls_template_insert.setRevisionRule(codeCls_template.getRevisionRule());
        codeCls_template_insert.setVersionRule(codeCls_template.getVersionRule());
        codeCls_template_insert.setBtmTypeId(codeCls_template.getBtmTypeId());
        codeCls_template_insert.setBtmTypeName(codeCls_template.getBtmTypeName());
        codeCls_template_insert.setCodeClassifyOid(codeCls_template.getCodeClassifyOid());
        codeCls_template_insert.setCodeClassifyOidName(codeCls_template.getCodeClassifyOidName());
        Map rvObj = baseMapper.getNextRevision(codeCls_template.getNameOid());
        codeCls_template_insert.setRevisionSeq(Integer.parseInt(rvObj.get("REVISIONSEQ").toString()));
        codeCls_template_insert.setRevisionValue(rvObj.get("REVISIONVAL").toString());
//            VersionValueObject versionObj = this.getVersionValue(item.verRuleName);
        codeCls_template_insert.setVersionSeq(Integer.parseInt(rvObj.get("VERSIONSEQ").toString()));
        codeCls_template_insert.setVersionValue(rvObj.get("VERSIONVAL").toString());
        codeCls_template_insert.setLctid(codeCls_template.getLctid());
@@ -519,35 +519,18 @@
        codeCls_template_insert.setName(codeCls_template.getName());
        codeCls_template_insert.setDescription(codeCls_template.getDescription());
        codeCls_template_insert.setOwner(AuthUtil.getUser().getUserName());
//            codeCls_template_insert.setCheckinBy(userName);
        codeCls_template_insert.setCopyFromVersion(codeCls_template.getOid());
//        }catch (VCIError e){
//            e.printStackTrace();
//            logger.error("===============>分类模板-升版复制出错oid: "+templateOldOid+",mes"+e.error_message);
//            return BaseResult.error("升版出错");
//        }
        int insertCount = baseMapper.insert(codeCls_template_insert);
//        CodeClstemplateEntity codeClassifyTemplateDO = new CodeClstemplateEntity();
//        BeanUtilForVCI.copyPropertiesIgnoreCase(codeClassifyDTO,codeClassifyTemplateDO);
//        WebUtil.copyValueToObjectFromCbos(clientBusinessObject_template_insert,codeClassifyTemplateDO);
        //modify by weidy@2022-2-27
        //升版后不能使用insert方法,因为那个永远是新增一条数据,
        //上方先从dto转给do,然后把升版的初始化的属性拷贝给do,最后再从do拷贝到cbo上
//        WebUtil.copyValueToCboFromObj(clientBusinessObject_template_insert,codeClassifyTemplateDO);
        //升版过后的模板oid
        String templateNewOid = codeCls_template_insert.getOid();
        //需要复制的模板属性
        //查询老模板下边的所有属性,赋值新模板oid
//        VciQueryWrapperForDO codeClassifyTemplateAttrQuery = new VciQueryWrapperForDO(CodeClassifyTemplateAttrDO.class);
//        codeClassifyTemplateAttrQuery.addQueryMap("classifyTemplateOid",templateOldOid);
        Map<String,Object> condition = new HashMap<>(1);
        condition.put("classifyTemplateOid",templateOldOid);
        List<CodeClassifyTemplateAttr> codeClstempattrEntities = codeClstempattrMapper.selectByMap(condition);
//        List<CodeClassifyTemplateAttrDO> codeClassifyTemplateAttrDOList = codeClassifyTemplateAttrDaoI.selectByWrapper(codeClassifyTemplateAttrQuery);
        for (CodeClassifyTemplateAttr codeClassifyTemplateAttrDO :codeClstempattrEntities){
//            String attrOid = VciBaseUtil.getPk();
            codeClassifyTemplateAttrDO.setOid(null);
            codeClassifyTemplateAttrDO.setOid(VciBaseUtil.getPk());
            codeClassifyTemplateAttrDO.setClassifyTemplateOid(templateNewOid);
            codeClstempattrMapper.insert(codeClassifyTemplateAttrDO);
        }
@@ -563,54 +546,23 @@
        //复制模板按钮
        List<CodeClassifyTemplateButton> codeClassifyTemplateButtonDOList = copyTemplateButton(templateOldOid,templateNewOid);
        //一起保存数据
//        WebUtil.setPersistence(false);//不执行保存
        //保存模板——
//        BatchCBO batchCBOTemplate = new BatchCBO();
        //batchCBO保存的时候没有能够自动update源数据的isLastR
        //batchCBOTemplate.getCreateCbos().add(clientBusinessObject_template_insert);
        //使用saveRevisionBuisnessObject可以解决这个问题,这里先暂时执行两次保存
//        try {
//            clientBusinessObjectOperation.saveRevisionBuinessObject(clientBusinessObject_template_insert);
//        } catch (VCIError vciError) {
//            throw new VciBaseException("升版保存出错了",new String[0],vciError);
//        }
        // end --modify by lihang @20220408
        //codeClassifyTemplateMapper.insert(codeClassifyTemplateDO);
        //保存模板属性
//        if(!CollectionUtils.isEmpty(codeClassifyTemplateAttrDOList)){
//            BatchCBO batchCBOTemplateAttr = codeClassifyTemplateAttrDaoI.batchInsert(codeClassifyTemplateAttrDOList);
//            batchCBOTemplate.copyFromOther(batchCBOTemplateAttr);
//        }
//
//        //保存模板流程
//        if(!CollectionUtils.isEmpty(codeClassifyProcessTempDOList)) {
//            BatchCBO batchCBOTemplateProcessAttr = codeClassifyProcessTempDaoI.batchInsert(codeClassifyProcessTempDOList);
//            batchCBOTemplate.copyFromOther(batchCBOTemplateProcessAttr);
//        }
//        //模板阶段
//        if(!CollectionUtils.isEmpty(codeClassifyPhaseDOList)) {
//            BatchCBO batchCBOTemplatePhaseAttr = codeTemplatePhaseDaoI.batchInsert(codeClassifyPhaseDOList);
//            batchCBOTemplate.copyFromOther(batchCBOTemplatePhaseAttr);
//        }
//
//        //模板阶段属性
//        if(!CollectionUtils.isEmpty(codePhaseAttrDOList)) {
//            BatchCBO batchCBOTemplatePhaseAttrAttr = codePhaseAttrDaoI.batchInsert(codePhaseAttrDOList);
//            batchCBOTemplate.copyFromOther(batchCBOTemplatePhaseAttrAttr);
//        }
//
//        //模板按钮
//        if(!CollectionUtils.isEmpty(codeClassifyTemplateButtonDOList)) {
//            BatchCBO batchCBOTemplateButtonAttr = codeClassifyTemplateButtonDaoI.batchInsert(codeClassifyTemplateButtonDOList);
//            batchCBOTemplate.copyFromOther(batchCBOTemplateButtonAttr);
//        }
//
//        WebUtil.setPersistence(true);//执行保存
//
//        boService.persistenceBatch(batchCBOTemplate);//一起执行保存
        //保存模板流程
        if(!CollectionUtils.isEmpty(codeClassifyProcessTempDOList)) {
            codeClsflowtempServiceImpl.saveBatch(codeClassifyProcessTempDOList);
        }
        //模板阶段
        if(!CollectionUtils.isEmpty(codeClassifyPhaseDOList)) {
            codeTempphaseServiceImpl.saveBatch(codeClassifyPhaseDOList);
        }
//        return BaseResult.success("升版成功!");
        //模板阶段属性
        if(!CollectionUtils.isEmpty(codePhaseAttrDOList)) {
            codePhaseattrServiceImpl.saveBatch(codePhaseAttrDOList);
        }
//        //模板按钮
        if(!CollectionUtils.isEmpty(codeClassifyTemplateButtonDOList)) {
            codeTempbuttonServiceImpl.saveBatch(codeClassifyTemplateButtonDOList);
        }
        return R.success("升版成功!");
    }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -362,10 +362,10 @@
        // 回收需要业务数据删除
        if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) {
            R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(baseModelDTO.getBtmname()));
            if (!listR.isSuccess() || listR.getData().size() == 0) {
                throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
            }
            commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid()));
            if (!listR.isSuccess() || listR.getData().size() == 0) {
                throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
            }
            commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid()));
        } else {
            for (BaseModel baseModel : baseModels) {
                baseModel.setLcStatus(baseModelDTO.getLcStatus());
@@ -646,9 +646,9 @@
//            final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "};
            R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getTopClassifyVO().getBtmtypeid()));
//                String referTable = VciBaseUtil.getTableName(referVO.getReferType());
            if (!listR.isSuccess() || listR.getData().size() == 0) {
                throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
            }
            if (!listR.isSuccess() || listR.getData().size() == 0) {
                throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
            }
            final String[] sql = {"select count(*) from " + listR.getData().get(0).getTableName() + " t where 1 = 1 "};
            conditionMap.forEach((key, value) -> {
                sql[0] += " and " + key + " = " + value;
@@ -1599,9 +1599,9 @@
                //使用传入的业务类型查询表
                R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referVO.getReferType()));
//                String referTable = VciBaseUtil.getTableName(referVO.getReferType());
                if (!listR.isSuccess() || listR.getData().size() == 0) {
                    throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
                }
                if (!listR.isSuccess() || listR.getData().size() == 0) {
                    throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
                }
                String referTable = listR.getData().get(0).getTableName();
//                String referTable = "pl_code_classify";
                String referTableNick = attrVO.getId() + "0";
@@ -1698,9 +1698,9 @@
        }
//        String tableName = VciBaseUtil.getTableName(btmType);
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
//                String referTable = VciBaseUtil.getTableName(referVO.getReferType());
        String tableName = listR.getData().get(0).getTableName();
        String sql = "select " + selectFieldList.stream().map(s -> (s.contains(".") ? s : ("t." + s))).collect(Collectors.joining(","))
@@ -1875,7 +1875,7 @@
//                    String selectKey = referFieldMap.get(key);
//                    return getSqlByValue(selectKey, value, null, btmType);
//                } else {
                    return getSqlByValue(key, value, attrVOMap, btmType);
                return getSqlByValue(key, value, attrVOMap, btmType);
//                }
            }
        }
@@ -1930,7 +1930,7 @@
            }
            if (field.contains(".") && attrVOMap != null && attrVOMap.containsKey(field.split("\\.")[0].toLowerCase(Locale.ROOT))) {
                //是参照
                return "'" + value + "'";
                return "'" + value + "'";
            } else {
                return value;
            }
@@ -1954,13 +1954,13 @@
                        || VciFieldTypeEnum.VTInteger.equals(fieldTypeEnum)) {
                    return value;
                } else {
                    return "'" + value + "'";
                    return "'" + value + "'";
                }
            } else {
                if ((value.startsWith("(") && value.endsWith(")")) || (value.startsWith("'") && value.endsWith("'"))) {
                    return value;
                }
                return "'" + value + "'";
                return "'" + value + "'";
            }
        }
@@ -2239,9 +2239,9 @@
//        baseMapper.deleteBatchIds(cboList);
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getCurrentClassifyVO().getBtmtypeid()));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(),
                "'" + (StringUtils.join(cboList.stream().map(BaseModel::getOid).collect(Collectors.toSet()), "','")) + "'");
        //        );
@@ -2445,27 +2445,27 @@
     */
    @Override
    public R markDataPassing(String oid, String btmName, Boolean pass) {
        VciBaseUtil.alertNotNull(oid, "业务数据主键", btmName, "业务类型", pass, "标记类型");
        boolean flag = true;
        try {
            List<BaseModel> datas = selectByTypeAndOid(btmName, oid);
            if (datas.size() == 0) {
                return R.fail(DATA_OID_NOT_EXIST);
            }
            datas.stream().forEach(data->data.getData().put("PASSING",String.valueOf(pass)));
            R r = updateBatchByBaseModel(btmName, datas);
            if(!r.isSuccess()){
                flag = false;
            }
        } catch (Exception e) {
            flag = false;
            e.printStackTrace();
        }
        if (flag) {
            return R.success("标记成功!");
        } else {
            return R.fail("标记失败!");
        }
        VciBaseUtil.alertNotNull(oid, "业务数据主键", btmName, "业务类型", pass, "标记类型");
        boolean flag = true;
        try {
            List<BaseModel> datas = selectByTypeAndOid(btmName, oid);
            if (datas.size() == 0) {
                return R.fail(DATA_OID_NOT_EXIST);
            }
            datas.stream().forEach(data -> data.getData().put("PASSING", String.valueOf(pass)));
            R r = updateBatchByBaseModel(btmName, datas);
            if (!r.isSuccess()) {
                flag = false;
            }
        } catch (Exception e) {
            flag = false;
            e.printStackTrace();
        }
        if (flag) {
            return R.success("标记成功!");
        } else {
            return R.fail("标记失败!");
        }
    }
    /**
@@ -2777,18 +2777,18 @@
        }
        List<String> oidList = VciBaseUtil.str2List(conditionMap.get("oid"));
        List<BaseModel> cbos = selectByTypeAndOid(btmType,conditionMap.get("oid"));
        List<BaseModel> cbos = selectByTypeAndOid(btmType, conditionMap.get("oid"));
        if (CollectionUtils.isEmpty(cbos)) {
            throw new VciBaseException("未找到业务数据");
        }
        BaseModel cbo = cbos.get(0);
        BaseModel cbo = cbos.get(0);
        String templateOid = cbo.getData().get("CODETEMPLATEOID");
        QueryWrapper<CodeClassifyTemplate> codeClassifyTemplateWrapper = new QueryWrapper<>();
        codeClassifyTemplateWrapper.eq("oid", templateOid);
        List<CodeClassifyTemplate> templateDOList = templateService.list(codeClassifyTemplateWrapper);
        QueryWrapper<CodeClassifyTemplateAttr> codeClassifyTemplateAttrWrapper = new QueryWrapper<>();
        QueryWrapper<CodeClassifyTemplateAttr> codeClassifyTemplateAttrWrapper = new QueryWrapper<>();
        codeClassifyTemplateAttrWrapper.eq("CLASSIFYTEMPLATEOID", templateOid);
        List<CodeClassifyTemplateAttr> attrDOList = codeClassifyTemplateAttrService.list(codeClassifyTemplateAttrWrapper);
@@ -3176,9 +3176,9 @@
    public Integer insertBatchByType(String btmType, List<BaseModel> baseModels) {
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        //将bean转为map,mybatis统一处理
        List<Map<String, String>> maps = new ArrayList<>();
        baseModels.stream().forEach(model -> {
@@ -3203,9 +3203,9 @@
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        //查询数据
        List<Map> maps = commonsMapper.selectBySql("select * from " + listR.getData().get(0).getTableName() + " where oid in ("
                + VciBaseUtil.toInSql(oids.toString()) + ")");
@@ -3261,9 +3261,9 @@
     */
    public BaseModel createBaseModel(String boName) {
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(boName));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        String userName = String.valueOf(AuthUtil.getUser().getUserId());
        BaseModel bo = new BaseModel();
//        bo.setOid(VciBaseUtil.getPk());
@@ -3331,9 +3331,9 @@
    public R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels) {
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        //将bean转为map,mybatis统一处理
        List<Map<String, String>> maps = new ArrayList<>();
@@ -3361,17 +3361,17 @@
     * @return 列表数据
     */
    @Override
    public IPage<BaseModel> referDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject) throws VciBaseException{
        //checkReferConfig(referConfigVO);
    public IPage<BaseModel> referDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject) throws VciBaseException {
        //checkReferConfig(referConfigVO);
        //使用业务类型查询
        R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getAllAttributeByBtmId(referConfigVO.getReferType());
        if (allAttributeByBtmId.getCode() != 200) {
            throw new ServiceException("业务类型feign接口调用错误!");
        }
        if (Func.isEmpty(allAttributeByBtmId.getData())) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        BtmTypeVO btmTypeVO = allAttributeByBtmId.getData();
        if (allAttributeByBtmId.getCode() != 200) {
            throw new ServiceException("业务类型feign接口调用错误!");
        }
        if (Func.isEmpty(allAttributeByBtmId.getData())) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        BtmTypeVO btmTypeVO = allAttributeByBtmId.getData();
        /**
         * 加上查询最新版次
         */
@@ -3388,10 +3388,10 @@
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referConfigVO.getReferType()));
        if (listR.getCode() != 200) {
            throw new ServiceException(Func.isNotBlank(listR.getMsg()) ? listR.getMsg():"业务类型feign接口调用错误!");
            throw new ServiceException(Func.isNotBlank(listR.getMsg()) ? listR.getMsg() : "业务类型feign接口调用错误!");
        }
        if (listR.getData().isEmpty()) {
            throw new VciBaseException(Func.isNotBlank(listR.getMsg()) ? listR.getMsg():"传入业务类型未查询到相应表单,请检查!");
            throw new VciBaseException(Func.isNotBlank(listR.getMsg()) ? listR.getMsg() : "传入业务类型未查询到相应表单,请检查!");
        }
        String namesql = "";
        if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("name"))) {
@@ -3411,13 +3411,18 @@
        if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("lcstatus"))) {
            lcstatusSql = "lcstatus =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lcstatus"));
        }
        String where = "";
        if (StringUtils.isNotBlank(codesql) || StringUtils.isNotBlank(lcstatusSql) || StringUtils.isNotBlank(namesql)) {
             where="where ";
        }
        String num1 = baseQueryObject.getPage() * baseQueryObject.getLimit() + "";
        String num2 = ((baseQueryObject.getPage()) - 1) * baseQueryObject.getLimit() + 1 + "";
        List<Map> maps = commonsMapper.selectBySql("select * from ( select rownum rn, t.* from (select * from " + listR.getData().get(0).getTableName() + SPACE
                + (StringUtils.isNotBlank(listR.getData().get(0).getRevisionRuleId()) ? (" where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString())
                + " and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and":" where") + SPACE
                + " and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and": where) + SPACE
                + lcstatusSql + namesql + codesql + ") t where rownum <=" + num1 + ") where rn >=" + num2
        );
        List<BaseModel> baseModels = new ArrayList<>();
@@ -3461,12 +3466,12 @@
        }
        int total = commonsMapper.queryCountBySql("select count(*) from " + listR.getData().get(0).getTableName() + SPACE
                + (StringUtils.isNotBlank(listR.getData().get(0).getRevisionRuleId()) ? (" where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString())
                + "and lastv = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and":" where") + SPACE
                + "and lastv = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and" : where) + SPACE
                + lcstatusSql + namesql + codesql
        );
        IPage<BaseModel> objectDataGrid = new Page<>();
        IPage<BaseModel> objectDataGrid = new Page<>();
        objectDataGrid.setPages(baseQueryObject.getPage());
        objectDataGrid.setCurrent(baseQueryObject.getPage());
        objectDataGrid.setCurrent(baseQueryObject.getPage());
        objectDataGrid.setRecords(baseModels);
        objectDataGrid.setSize(baseQueryObject.getLimit());
        objectDataGrid.setTotal(total);
@@ -3598,10 +3603,10 @@
        toBo.setVersionRule(fromBo.getVersionRule());
//        RevisionValueObject rvObj = this.getNextRevision(fromBo.getBtmName(), fromBo.getNameoid(), item.revRuleName, item.revInput, revisionVal);
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(fromBo.getBtmname()));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid());
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid());
        toBo.setRevisionSeq(Integer.parseInt(nextRevision.get("REVISIONSEQ").toString()));
        toBo.setRevisionValue(nextRevision.get("REVISIONVAL").toString());
//        VersionValueObject versionObj = this.getVersionValue(item.verRuleName);