ludc
2023-07-11 9d8be8e7580ef577def96c852288a5a95eab4ea3
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -2,7 +2,7 @@
  <div>
    <avue-form v-model="loneTreeNewForm" :option="option" v-if="flag == 'renonly'">
    </avue-form>
    <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
    <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'">
    </avue-form>
    <div>
<!--     编码规则-->
@@ -78,15 +78,15 @@
        </div>
      </el-dialog>
<!--      存储的业务类型-->
      <el-dialog  :visible.sync="BtmdialogVisible"   title="为【相似项查询规则】选取值" append-to-body>
      <el-dialog  :visible.sync="BtmdialogVisible"   title="为【业务类型】选取值" append-to-body>
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px !important;">
            <el-option
              v-for="item in SelectOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              style="width: 150px">
              style="width: 130px">
            </el-option>
          </el-select>
          <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
@@ -110,7 +110,7 @@
import {TreeEditSave} from '@/api/template/templateAttr'
export default {
  name: "classifyTreeform.vue",
  props: ['loneTreeNewForm','flag','Editclose'],
  props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
  data() {
    return {
      SelectFInd:"",
@@ -198,9 +198,9 @@
        column: [
          {
            label: '主题库/分类编号',
            prop: 'btmtypeid',
            prop: 'id',
            labelWidth:135,
            readonly: true,
            disabled: true,
            rules: [{
              required: true,
              message: "主题库/分类编号",
@@ -210,7 +210,7 @@
          {
            label: '主题库/分类名称',
            prop: 'name',
            readonly: true,
            disabled: true,
            labelWidth:135,
            rules: [{
              required: true,
@@ -222,13 +222,13 @@
            label:"描述",
            prop:"description",
            labelWidth:128,
            readonly: true,
            disabled: true,
          },
          {
            label: '存储的业务类型',
            prop: 'btmtypename',
            labelWidth:128,
            readonly: true,
            disabled: true,
            rules: [{
              required: true,
              message: "存储的业务类型",
@@ -239,86 +239,113 @@
            label:"编码规则",
            prop:"coderuleoidName",
            labelWidth:128,
            readonly: true,
            disabled: true,
          },
          {
            label:"关键属性查询规则",
            prop:"codekeyattrrepeatoidName",
            labelWidth:128,
            readonly: true,
            disabled: true,
          },
          {
            label:"相似查询规则",
            prop:"codeResembleRuleOidName",
            labelWidth:128,
            readonly: true,
            disabled: true,
          },
        ]
      },
      options: {
        column: [
          {
            label: '主题库/分类编号',
            prop: 'btmtypeid',
            labelWidth:128,
            rules: [{
              required: true,
              message: "主题库/分类编号",
              trigger: "blur"
            }]
          },
          {
            label: '主题库/分类名称',
            prop: 'name',
            labelWidth:128,
            rules: [{
              required: true,
              message: "主题库/分类名称",
              trigger: "blur"
            }]
          },
          {
            label:"描述",
            prop:"description",
            labelWidth:128,
          },
          {
            label: '存储的业务类型',
            prop: 'btmtypename',
            labelWidth:128,
            focus:this.btmFoucus,
            rules: [{
              required: true,
              message: "存储的业务类型",
              trigger: "blur"
            }]
          },
          {
            label:"编码规则",
            prop:"coderuleoidName",
            labelWidth:128,
            focus:this.CodeFoucus
          },
          {
            label:"关键属性查询规则",
            prop:"codekeyattrrepeatoidName",
            labelWidth:128,
            focus:this.Keyfouce
          },
          {
            label:"相似查询规则",
            prop:"codeResembleRuleOidName",
            labelWidth:128,
            focus: this.simFouce
          },
        ]
      },
      FormList: {},
      masterSelectList:[],
      KeySelectLIst:[],
      simSelectList:[],
      btmSelectList:[]
    }
  },
  computed:{
    options(){
      return{
          column: [
            {
              label: '主题库/分类编号',
              prop: 'id',
              labelWidth:128,
              rules: [{
                required: true,
                message: "主题库/分类编号",
                trigger: "blur"
              }]
            },
            {
              label: '主题库/分类名称',
              prop: 'name',
              labelWidth:128,
              rules: [{
                required: true,
                message: "主题库/分类名称",
                trigger: "blur"
              }]
            },
            {
              label:"描述",
              prop:"description",
              labelWidth:128,
            },
            {
              label: '存储的业务类型',
              prop: 'btmtypename',
              labelWidth:128,
              focus:this.btmFoucus,
                // readonly: true,
              display:this.TreeFlag,
              rules: [{
                required: true,
                message: "存储的业务类型",
                trigger: "blur"
              }]
            },
            {
              label:"编码规则",
              prop:"coderuleoidName",
              labelWidth:128,
              focus:this.CodeFoucus,
              readonly: true,
            },
            {
              label:"关键属性查询规则",
              prop:"codekeyattrrepeatoidName",
              labelWidth:128,
              focus:this.Keyfouce,
              readonly: true,
            },
            {
              label:"相似查询规则",
              prop:"codeResembleRuleOidName",
              labelWidth:128,
              focus: this.simFouce,
              readonly: true,
            },
          ]
      }
    }
  },
  watch:{
    nodeClickList:{
      handler(newval,oldval){
        console.log('newVal',newval,oldval)
      },
      deep:true,
      immediate:true
    },
    TreeFlag:{
      handler(newval,oldval){
        console.log('树状态',newval,oldval)
      },
      deep:true,
      immediate:true
    }
  },
  created() {
@@ -368,9 +395,9 @@
        this.MasterdialogVisible=false;
        this.masterSelectList=[]
        this.$set(this.loneTreeNewForm,'coderuleoidName',this.masterName)
        this.$set(this.loneTreeNewForm,'coderuleOid',this.masterOid)
        this.$set(this.loneTreeNewForm,'coderuleoid',this.masterOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
        console.log(this.loneTreeNewForm)
        // console.log(this.loneTreeNewForm)
      }
    },
    //编码多选
@@ -378,7 +405,7 @@
      this.masterSelectList=row;
      this.masterName=row[0].name;
      this.masterOid=row[0].oid;
      console.log('oid',this.oid)
      // console.log('oid',this.oid)
    },
    //编码接口
    MasterdefaultRend(masterParameter){
@@ -391,7 +418,7 @@
        this.masterData=res.data.records;
      })
    },
    // 关键属性失焦
    //关键属性失焦
    Keyfouce(){
      this.KeydialogVisible=true;
      this.KeydefaultRend()
@@ -405,9 +432,10 @@
      }else {
        this.KeydialogVisible=false;
        this.KeySelectLIst=[]
        this.$set(this.loneTreeNewForm,'codeResembleRuleOidName',this.simName)
        this.$set(this.loneTreeNewForm,'codeResembleRuleOid',this.simOid)
        this.$set(this.loneTreeNewForm,'codekeyattrrepeatoidName',this.KeyName)
        this.$set(this.loneTreeNewForm,'codekeyattrrepeatoid',this.KeyOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
        console.log(this.loneTreeNewForm)
      }
    },
    //关键属性查询
@@ -438,13 +466,13 @@
        this.KeyData=res.data.records;
      })
    },
    // 关键多选
    //关键多选
    KeySelect(row){
      this.KeySelectLIst=row;
      this.KeyName=row[0].name;
      this.KeyOid=row[0].oid;
    },
    // 相似项失焦
    //相似项失焦
    simFouce(){
      this.SimidialogVisible=true;
      this.simdefaultRend()
@@ -481,7 +509,7 @@
        this.SelectFInd=""
      }
    },
  //  相似项多选
    //相似项多选
    simSelect(row){
      this.simSelectList=row;
      this.simName=row[0].name;
@@ -503,17 +531,17 @@
      this.BtmdialogVisible=true;
      this.btmdefaultRend()
    },
  //  业务类型确定
    //业务类型确定
    btmHandlerClick(){
      if(this.btmSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.btmSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.SimidialogVisible=false;
        this.simSelectList=[]
        this.$set(this.loneTreeNewForm,'btmtypename',this.btmName)
        this.$set(this.loneTreeNewForm,'btmtypeoid',this.btmOid)
        this.BtmdialogVisible=false;
        this.btmSelectList=[]
        this.$set(this.loneTreeNewForm,'btmtypename',this.btmName ||this.btmOid)
        this.$set(this.loneTreeNewForm,'btmtypeid',this.btmOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
@@ -535,7 +563,7 @@
        this.SelectFInd=""
      }
    },
  //  业务类型多选
    //业务类型多选
    btmSelect(row){
      this.btmSelectList=row;
      this.btmName=row[0].name;
@@ -544,7 +572,8 @@
    //业务类型接口
    btmdefaultRend(masterParameter){
      referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
        console.log(res)
        // console.log(res)
        this.BtmData=res.data.data.records
      })
    }
  }