田源
2023-08-28 ba65926011f36ae9e98d373d33b33f9ad024d6c8
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -63,7 +63,8 @@
          </el-dialog>
          <!--        修改对话框-->
          <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" :flag="'edit'"
            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode"
                              :flag="'edit'"
                              :loneTreeNewForm="TreeList" :nodeClickList="nodeClickList"
                              :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed"
                              @referTreeForm="referTreeForm"></classifyTreeform>
@@ -233,7 +234,8 @@
                       :rowIndex="this.selectRow"></templatePro>
        </span>
        <!--     编码规则-->
        <el-dialog :visible.sync="MasterdialogVisible" append-to-body title="为【编码规则】选取值" :before-close="masterEscHandler">
        <el-dialog :before-close="masterEscHandler" :visible.sync="MasterdialogVisible" append-to-body
                   title="为【编码规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
@@ -248,7 +250,7 @@
            <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SelectFindeHandler">查询
            </el-button>
          </template>
          <avue-crud :data="masterData" :option="masterOption" @row-click="masterSelect">
          <avue-crud :data="masterData" :option="Option" @row-click="masterSelect">
            <template slot="radio" slot-scope="{row}">
              <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
              </el-radio>
@@ -266,7 +268,7 @@
          </div>
        </el-dialog>
        <!--      关键属性查询规则-->
        <el-dialog :visible.sync="KeydialogVisible" append-to-body title="为【关键属性查询规则】选取值" :before-close="KeyEscHandler">
        <el-dialog :before-close="KeyEscHandler" :visible.sync="KeydialogVisible" append-to-body title="为【关键属性查询规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
@@ -281,7 +283,7 @@
            <el-button plain size="small" style="margin-left: 20px" type="primary" @click="KeySelectFindeHandler">查询
            </el-button>
          </template>
          <avue-crud :data="KeyData" :option="masterOption" @row-click="KeySelect">
          <avue-crud :data="KeyData" :option="Option" @row-click="KeySelect">
            <template slot="radio" slot-scope="{row}">
              <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
              </el-radio>
@@ -290,7 +292,9 @@
          <div style="height: 30px">
            <div
              style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px ">
              已设置的值为:[{{ this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '未设置值' : this.TreeAddform.codekeyattrrepeatoidName }}]
              已设置的值为:[{{
                this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '未设置值' : this.TreeAddform.codekeyattrrepeatoidName
              }}]
            </div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
              <el-button size="small" type="primary" @click="KeyHandlerClick">确定</el-button>
@@ -299,7 +303,7 @@
          </div>
        </el-dialog>
        <!--      相似项查询规则-->
        <el-dialog :visible.sync="SimidialogVisible" append-to-body title="为【相似项查询规则】选取值" :before-close="simEscHandler">
        <el-dialog :before-close="simEscHandler" :visible.sync="SimidialogVisible" append-to-body title="为【相似项查询规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
@@ -314,7 +318,7 @@
            <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SimSelectFindeHandler">查询
            </el-button>
          </template>
          <avue-crud :data="simData" :option="masterOption" @row-click="simSelect">
          <avue-crud :data="simData" :option="Option" @row-click="simSelect">
            <template slot="radio" slot-scope="{row}">
              <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
              </el-radio>
@@ -323,7 +327,9 @@
          <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 }}]
              已设置的值为:[{{
                this.TreeAddform.codeResembleRuleOidName == '' ? '未设置值' : this.TreeAddform.codeResembleRuleOidName
              }}]
            </div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
              <el-button size="small" type="primary" @click="simHandlerClick">确定</el-button>
@@ -332,7 +338,7 @@
          </div>
        </el-dialog>
        <!--        业务类型-->
        <el-dialog :visible.sync="BtmdialogVisible" append-to-body title="为【业务类型规则】选取值" :before-close="BtmEscHandler">
        <el-dialog :before-close="BtmEscHandler" :visible.sync="BtmdialogVisible" append-to-body title="为【业务类型规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px !important;">
              <el-option
@@ -466,6 +472,33 @@
          }
        ]
      },
      Option: {
        addBtn: false,
        index: true,
        border: true,
        menu: false,
        height: 380,
        column: [
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label: '英文名称',
            prop: 'id'
          },
          {
            label: '中文名称',
            prop: 'name'
          },
          {
            label: '描述',
            prop: 'description'
          }
        ]
      },
      SelectOption: [
        {
          value: 'name',
@@ -476,7 +509,7 @@
          label: '英文名称'
        }
      ],
      masterSelectOption:[
      masterSelectOption: [
        {
          value: 'id',
          label: '业务类型编号'
@@ -804,28 +837,32 @@
  },
  methods: {
    //存储的业务类型关闭
    BtmEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.BtmdialogVisible=false;
    BtmEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.BtmdialogVisible = false;
    },
    //相似项关闭
    simEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.SimidialogVisible=false;
    simEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.SimidialogVisible = false;
    },
    //关键属性关闭
    KeyEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.KeydialogVisible=false;
    KeyEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.KeydialogVisible = false;
    },
    //编码规则关闭
    masterEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.MasterdialogVisible=false;
    masterEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.MasterdialogVisible = false;
    },
    // 关闭弹窗
    /** 导入 */
@@ -881,6 +918,7 @@
        referType: 'coderule',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Released',
        'limit':'-1',
        ...masterParameter
      }).then(res => {
        this.masterData = res.data.records;
@@ -915,6 +953,7 @@
        referType: 'codekeyattrrepeat',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res => {
        this.KeyData = res.data.records;
@@ -965,6 +1004,7 @@
        referType: 'coderesemblerule',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res => {
        this.simData = res.data.records;
@@ -982,6 +1022,7 @@
      } else if (this.btmSelectList.length <= 0) {
        this.$message.warning('请选择一条数据')
      } else {
        this.$refs.myForm.clearValidate();
        this.BtmdialogVisible = false;
        this.btmSelectList = []
        this.$set(this.TreeAddform, 'btmTypeName', this.btmName)
@@ -993,7 +1034,7 @@
    BtmSelectFindeHandler() {
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`;
        this.btmdefaultRend(masterParameter);
      this.btmdefaultRend(masterParameter);
    },
    //业务类型多选
    btmSelect(row) {
@@ -1004,7 +1045,7 @@
    },
    //业务类型接口
    btmdefaultRend(masterParameter) {
      referDataGrid({valueField: 'id', isMuti: 'false', ...masterParameter}).then(res => {
      referDataGrid({valueField: 'id', isMuti: 'false','limit':'-1', ...masterParameter}).then(res => {
        this.BtmData = res.data.data.records
      })
    },
@@ -1031,7 +1072,6 @@
        })
        //调用修改属性名方法
        this.ModifyProperties(this.CloneTreedata, 'name', 'label');
        console.log(this.CloneTreedata)
        this.CloneTreedata = this.CloneTreedata.map(item => {
          if (item.attributes.lcStatus === "Disabled") {
            item.label += '【停用】';
@@ -1087,7 +1127,6 @@
        this.$message.warning('请输入内容!');
      } else {
        const data = this.TreeAddform;
        // data.btmtypename= this.TreeList.btmtypename
        this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
        TreeSave(data)
          .then(() => {
@@ -1254,11 +1293,9 @@
          });
        }
      }
    },
    //树点击事件
    async nodeClick(data) {
      console.log(data);
      //操作新增和修改的业务类型隐藏
      this.TreeFlagCode = !data;
      this.editTreeFLagCode = !data.parentId;
@@ -1480,9 +1517,6 @@
      const {id, name} = row[0];
      this.CloneModel = {id, name};
      this.CloneSelect[0].codeclassifyoid = this.nodeClickList.oid;
      console.log('row', row)
      console.log('CloneSelect', this.CloneSelect)
      console.log('CloneModel', this.CloneModel)
    },
    //克隆表单提交
    Clonesubmit(row, done) {