田源
2023-08-02 1f3c092f70509645ffa4a7c6b246d3a1fbc6324e
主题库枚举注入样式优化
已修改2个文件
76 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -88,6 +88,12 @@
      <el-dialog :visible.sync="enumVisible" append-to-body title="枚举注入" :before-close="this.enumBeforeClose">
        <!-- 渲染表格及按钮 -->
        <!-- 渲染表格及按钮 -->
        <el-alert
          title="请新增后点击单元格输入枚举数据"
          type="success"
          style="margin-bottom: 10px;display: inline-block"
          :closable="false">
        </el-alert>
        <div>
          <el-button icon="el-icon-plus" type="primary" @click="addRow">新增</el-button>
          <el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick"
@@ -1799,29 +1805,33 @@
    },
    //枚举注入保存
    enumAddHandle() {
      let hasError = false; // 添加一个变量
      this.tableData.forEach((item, index) => {
        if (item.key === '') {
          this.$message.warning(`第${index + 1}行的选项值不能为空`);
          hasError = true;
          return;
        } else if (item.value === '') {
          this.$message.warning(`第${index + 1}行的选项中文标签不能为空`);
          hasError = true;
          return;
        }
      });
        // 保存执行逻辑
      if (!hasError) {
        if (this.CurrentCell) {
          this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
          this.enumVisible = false;
        } else {
          this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
          this.tableData=[];
          this.enumVisible = false;
        }
      }
     if(this.tableData.length>=1){
       let hasError = false; // 添加一个变量
       this.tableData.forEach((item, index) => {
         if (item.key === '') {
           this.$message.warning(`第${index + 1}行的选项值不能为空`);
           hasError = true;
           return;
         } else if (item.value === '') {
           this.$message.warning(`第${index + 1}行的选项中文标签不能为空`);
           hasError = true;
           return;
         }
       });
       // 保存执行逻辑
       if (!hasError) {
         if (this.CurrentCell) {
           this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
           this.enumVisible = false;
         } else {
           this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
           this.tableData=[];
           this.enumVisible = false;
         }
       }
     }else {
       this.$message.warning('请添加枚举注入数据!')
     }
    },
    // 将正在编辑的行的状态变为 null,即退出编辑状态
    saveRow() {
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -92,7 +92,11 @@
          <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
          <el-button size="small"  type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">查询</el-button>
        </template>
        <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud>
        <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect">
          <template slot="radio" slot-scope="{row}">
            <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio>
          </template>
        </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.loneTreeNewForm.btmTypeName}}]</div>
          <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
@@ -113,6 +117,7 @@
  props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
  data() {
    return {
      masterRow:0,
      SelectFInd:"",
      masterName:"",
      masterOid:"",
@@ -166,10 +171,15 @@
        addBtn:false,
        index:true,
        border:true,
        selection:true,
        menu:false,
        height:380,
        column:[
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label:'英文名称',
            prop:'id'
@@ -567,9 +577,9 @@
    //业务类型多选
    btmSelect(row){
      this.btmSelectList=row;
      this.btmName=row[0].name;
      this.btmOid=row[0].oid;
      this.btmId=row[0].id;
      this.btmName=row.name;
      this.btmOid=row.oid;
      this.btmId=row.id;
    },
    //业务类型接口
    btmdefaultRend(masterParameter){