wangting
2025-01-02 6825bbb953ba08ebcf747417ab3954639c909494
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue
@@ -13,14 +13,14 @@
      @selection-change="selectChangeHandler"
      @row-click="rowClickHandler">
      <template slot="menuLeft">
        <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">创建</el-button>
        <el-button v-if="permissionChildrenList.UiTabAddBtn" icon="el-icon-plus" size="small" type="primary" @click="addHandler">创建</el-button>
        <!--<el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">修改</el-button>
        <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">删除</el-button>-->
      </template>
      <template slot="menu" slot-scope="scope">
        <el-button icon="el-icon-edit" size="small" type="text" @click="rowEditBtnClick(scope.row)">编辑</el-button>
        <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除</el-button>
        <el-button icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">克隆</el-button>
        <el-button v-if="permissionChildrenList.UiTabEditBtn" icon="el-icon-edit" size="small" type="text" @click="rowEditBtnClick(scope.row)">编辑</el-button>
        <el-button v-if="permissionChildrenList.UiTabDelBtn" icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除</el-button>
        <el-button v-if="permissionChildrenList.UiTabCloneBtn" icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">克隆</el-button>
      </template>
      <template slot="plIsOpen" slot-scope="{row}">
        <el-tag v-if="row.plIsOpen === 1" type="success">启用</el-tag>
@@ -54,7 +54,8 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="序号:" prop="plSeq">
              <el-input v-model="form.plSeq"></el-input>
              <el-input-number  v-model="form.plSeq" :max="9999" :min="1"
                                controls-position="right"></el-input-number >
            </el-form-item>
          </el-col>
          <el-col :span="12">
@@ -113,6 +114,7 @@
import func from "@/util/func";
import bottomTable from "./bottomTable/index";
import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog";
import {mapGetters} from "vuex";
export default {
name: "plShow",
@@ -207,6 +209,17 @@
      },
    }
  },
  computed:{
    ...mapGetters(["permission"]),
    permissionChildrenList() {
      return {
        UiTabAddBtn: this.vaildData(this.permission[this.$route.query.id].UiTabADD, false),
        UiTabEditBtn: this.vaildData(this.permission[this.$route.query.id].UiTabEdit, false),
        UiTabDelBtn: this.vaildData(this.permission[this.$route.query.id].UiTabDel, false),
        UiTabCloneBtn: this.vaildData(this.permission[this.$route.query.id].UiTabClone, false),
      }
    }
  },
  watch: {
    uiDefineData:{
      handler(val) {
@@ -238,9 +251,9 @@
        areaType:this.areaType
      }
      getTabByContextIdAndType( params).then(res => {
        this.$refs.crud.clearSelection();
        this.data = res.data.data;
        this.selectList=[];
        this.$refs.crud.clearSelection();
        this.tableLoading = false;
      })
    },
@@ -257,7 +270,7 @@
          this.lastIndex = newIndex;
        },
        () => {
          this.selectList = [];
          this.selectList = [row];
        }
      );
    },
@@ -312,7 +325,7 @@
    },
    // 编辑按钮
    rowEditBtnClick(row) {
      this.form=row;
      this.form=JSON.parse(JSON.stringify(row));
      this.dialogType = 'edit';
      this.dialogVisible = true;
    },
@@ -376,6 +389,7 @@
        } else {
          return false;
        }
        done();
      });
    },
    rowCloneHandler(row) {