ludc
2023-12-26 ff15fb3ec4e29dc0ddcddfda711209831fd2ac59
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -32,28 +32,39 @@
              </div>
            </div>
            <div style="display: flex;margin-top: 5px;margin-bottom: 5px">
              <el-button v-if="permissionList.flowingBtnStuatus" plain size="mini" type="primary" @click="testHandler">流水处理
              <el-button v-if="permissionList.flowingBtnStuatus" plain size="mini" type="primary" @click="flowingDependHandler">流水处理
              </el-button>
              <el-button v-if="permissionList.classifyAuth" plain size="mini" type="primary" @click="classifyAuthHandler">分类授权
              </el-button>
            </div>
          </div>
        </div>
          <!--          左侧树-->
          <!-- 左侧树-->
          <div style="height: calc(100vh - 230px);overflow: auto">
            <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
                       :defaultExpandAll="false"
                       :option="Treeoption"
                       class="classifyTree"
                       style="height: calc(100vh - 280px)"
                       style="height: calc(100vh - 290px)"
                       @node-click="nodeClick"
            >
              <template slot-scope="{ node, data }" class="el-tree-node__label">
                <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
                            open-delay="500"
                            placement="right-start">
                <span style="font-size: 14px;">
                {{ (node || {}).label }}
              </span>
                </el-tooltip>
              </template>
            </avue-tree>
          </div>
          <!--        树节点添加对话框-->
          <!-- 树节点添加对话框-->
          <el-dialog v-loading="AddLoading" :before-close="TreeEscHandler"
                     :title="this.TreeFlag ? '添加分类' :'添加主题库'" :visible.sync="TreeAddFormVisible" append-to-body
                     style="width: 1700px;margin: auto">
            <el-form ref="myForm" :model="TreeAddform" :rules="rules">
            <el-form ref="myForm" :model="TreeAddform" :rules=  "rules">
              <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" prop="id"
                            style="display: inline-block">
                <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input>
@@ -97,7 +108,7 @@
              <el-button type="primary" @click="TreeAddHandler">确 定</el-button>
            </div>
          </el-dialog>
          <!--        修改对话框-->
          <!-- 修改对话框-->
          <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode"
                              :flag="'edit'"
@@ -105,6 +116,11 @@
                              :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed"
                              @referTreeForm="referTreeForm"></classifyTreeform>
          </el-dialog>
           <!-- 分类授权对话框-->
           <classify-auth-dialog
              :visible.sync="classifyAuthVisible"
              :classifyData="classifyData"
              ></classify-auth-dialog>
      </basic-container>
    </el-aside>
    <el-main>
@@ -431,8 +447,10 @@
import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master'
import func from "@/util/func";
import {mapGetters} from "vuex";
import ClassifyAuth from './ClassifyAuthDialog.vue';
export default {
  components: { ClassifyAuth },
  name: "classifyTrees.vue",
  data() {
    return {
@@ -476,6 +494,8 @@
      masterOption: {
        addBtn: false,
        index: true,
        refreshBtn:false,
        columnBtn: false,
        border: true,
        menu: false,
        height: 380,
@@ -504,6 +524,7 @@
        addBtn: false,
        index: true,
        columnBtn: false,
        refreshBtn:false,
        border: true,
        menu: false,
        height: 380,
@@ -595,6 +616,8 @@
      TreeEditFormVisible: false,
      //添加对话框
      TreeAddFormVisible: false,
      //分类授权对话框
      classifyAuthVisible: false,
      //当前点击项
      nodeClickList: "",
      ClonenodeClickList: "",
@@ -790,6 +813,8 @@
      },
      //模板管理编辑
      showEditBtn: false,
      //传递给分类授权子组件对话框的当前选中的分类节点信息
      classifyData: "",
    }
  },
  watch: {},
@@ -822,6 +847,7 @@
        TemRefreshStatus: this.vaildData(this.permission.classifyTree.manage_break, false),
        CloneBtnStuatus: this.vaildData(this.permission.classifyTree.manage_clone, false),
        flowingBtnStuatus: this.vaildData(this.permission.classifyTree.tree_flowing, false),
        classifyAuth: this.vaildData(this.permission.classifyTree.classify_auth, false),
      }
    },
    crudTreeOption() {
@@ -884,10 +910,16 @@
  created() {
  },
  methods: {
    handleTabClick(){
    // 分类授权对话框打开
    classifyAuthHandler(){
      if(this.nodeClickList.oid === '' || this.nodeClickList.oid === undefined){
        this.$message.warning('请至少选择一条数据!')
        return;
      }
      this.classifyData = this.nodeClickList;
      this.classifyAuthVisible = true;
    },
    testHandler(){
    flowingDependHandler(){
      if(this.nodeClickList.length <=0 ){
        this.$message.warning('请至少选择一条数据!')
        return;