xiejun
2023-12-29 f02a461cd0e0c6ad326cd71e3af733e3292407fc
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -32,7 +32,11 @@
              </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>
@@ -47,7 +51,8 @@
                       @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"
              <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item"
                          effect="dark"
                            open-delay="500"
                            placement="right-start">
                <span style="font-size: 14px;">
@@ -110,10 +115,15 @@
          <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode"
                              :flag="'edit'"
                              :loneTreeNewForm="TreeList" :nodeClickList="nodeClickList"
                            :loneTreeNewForm="TreeEditObj" :nodeClickList="nodeClickList"
                              :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed"
                              @referTreeForm="referTreeForm"></classifyTreeform>
          </el-dialog>
        <!-- 分类授权对话框-->
        <classify-auth-dialog
          :classifyData="classifyData"
          :visible.sync="classifyAuthVisible"
        ></classify-auth-dialog>
      </basic-container>
    </el-aside>
    <el-main>
@@ -121,7 +131,7 @@
        <!--        右侧表格-->
        <avue-tabs :option="tabOption" @change="handleChange"></avue-tabs>
        <span v-if="type.prop==='tab1'">
           <classifyTreeform ref="childForm" :flag="'renonly'" :loneTreeNewForm="TreeList"
           <classifyTreeform ref="childForm" :flag="'renonly'" :loneTreeNewForm="TreeEditObj"
                             :nodeList="nodeList"></classifyTreeform>
        </span>
        <span v-else-if="type.prop==='tab2'">
@@ -440,8 +450,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 {
@@ -607,6 +619,8 @@
      TreeEditFormVisible: false,
      //添加对话框
      TreeAddFormVisible: false,
      //分类授权对话框
      classifyAuthVisible: false,
      //当前点击项
      nodeClickList: "",
      ClonenodeClickList: "",
@@ -778,7 +792,7 @@
        }
      ],
      //传递给子组件动态渲染的数据
      TreeList: {},
      TreeEditObj: {},
      codeClassifyOid: "",
      upAndStopAndStartData: {
        upVersion: {
@@ -802,6 +816,8 @@
      },
      //模板管理编辑
      showEditBtn: false,
      //传递给分类授权子组件对话框的当前选中的分类节点信息
      classifyData: "",
    }
  },
  watch: {},
@@ -811,9 +827,8 @@
    const treeEle = this.$refs.tree.$el
    treeEle.addEventListener('click', (e) => {
      if (e.target.nodeName !== 'SPAN') {
        this.$refs.tree.setCurrentKey(null)
        this.nodeClickList = {}
        this.TreeList = []
        this.$refs.tree.setCurrentKey(null);
        this.nodeClickList = {};
        this.TreeFlagCode = true;
      }
    }, true)
@@ -834,6 +849,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() {
@@ -896,10 +912,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;
@@ -1133,7 +1155,7 @@
    },
    //子传父
    MasterHandler(val) {
      this.TreeList = val;
      this.TreeEditObj = val;
    },
    rowHandle(row, column) {
      this.selectRow = row.$index;
@@ -1315,8 +1337,8 @@
    async flushed() {
        await this.getAttr()
        this.$refs.tree.setCurrentKey(null);
        this.nodeClickList = {}
        this.TreeList = []
      this.nodeClickList = {};
      this.TreeEditObj = {};
        this.TreeFlagCode = true;
    },
    //启用和停用都先判断状态
@@ -1435,9 +1457,9 @@
          this.ProData = [];
          this.crudOid = ''
        }
        this.TreeList = res3.data.data;
        if (this.TreeList.isParticipateCheck === null || this.TreeList.isParticipateCheck === undefined || this.TreeList.isParticipateCheck === "") {
          this.$set(this.TreeList, "isParticipateCheck", 1)
        this.TreeEditObj = res3.data.data;
        if (this.TreeEditObj.isParticipateCheck === null || this.TreeEditObj.isParticipateCheck === undefined || this.TreeEditObj.isParticipateCheck === "") {
          this.$set(this.TreeEditObj, "isParticipateCheck", 1)
          return
        }
      } catch (error) {
@@ -1474,7 +1496,7 @@
    //基本信息表单刷新
    referTreeForm() {
      getObjectByOid(this.nodeClickList.oid).then(res => {
        this.TreeList = res.data.data;
        this.TreeEditObj = res.data.data;
      }).catch(res => {
        this.$message.error(res)
      })