ordinaryMenu.vue 6.22 KB
<!--
 * @Description: workFrame左侧菜单列表-普通
 * @Autor: renchao
 * @LastEditTime: 2023-05-25 10:42:50
-->
<template>
  <div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
    <div v-if="this.isShowdrawer">
    <el-menu :default-active="activeIndex" @select="djbClick" class="title-batch">
      <el-menu-item index="-1" key="-1" class="menus">
        <div>登记簿</div>
      </el-menu-item>
    </el-menu>
    <div class="blxx">
         <el-menu :default-active="activeIndex" @select="blxxClick"  class="title-batch">
      <el-menu-item index="-1" key="-1" class="menus">
        <div>补录信息</div>
      </el-menu-item>
    </el-menu>
      <el-menu :default-active="activeIndex" @select="unitClick">
        <el-menu-item v-for="(item, index) in supplementarylist" :index="index.toString()" :key="index">
          <div>
            <p>{{ item.qllxmc }} ||{{ item.operate }} </p>
            <!-- <p class="title-detail">{{ item.zl }}</p> -->
          </div>
          <i class="el-icon-delete" v-if="supplementarylist.length > 1" @click.stop="handleDel(item)"></i>
        </el-menu-item>
      </el-menu>
    </div>

    </div>
    <div class="map-drawer-click map-drawer" v-if="!isShowdrawer" @click="
          () => {
            this.isShowdrawer = !this.isShowdrawer;
          }
        "></div>
    <div class="map-drawer-expand map-drawer" v-else @click="
          () => {
            this.isShowdrawer = !this.isShowdrawer;
          }
        "></div>
  </div>
</template>
<script>
  import { mapGetters } from 'vuex'
  import { leftMenu } from "@/api/fqsq.js"
   import { deleteRepairRecord } from "@/api/djbbl.js"
     import { leftMenubl } from "@/api/djbbl.js"
  import { deleteSlbdcdy } from "@/api/ywbl.js";
  import { getBdcqljqtsx } from "@/api/registerBook.js";
import { loadTreeData, getNode } from "./djbFrameData.js";
  export default {
    data () {
      return {
        supplementarylist:[],
           //受理申请标识码
        bsmSlsq: this.$route.query.bsmSlsq,
        //当前流程所在环节
        bestepid: this.$route.query.bestepid,
           //受理申请标识码
        bdcdyid: this.$route.query.bdcdyid,
        //当前流程所在环节
        bdcdyh: this.$route.query.bdcdyh,
        qllx:this.$route.query.qllx,
        // 默认选中
        activeIndex: '0',
        // 折叠
        isShowdrawer: true,
        //批量操作按钮名称
        batchButtonName: '',
        //左侧菜单数据集合
        unitData: [],
        // 设置表单传递数据
        currentSelectProps: {},
          //左侧树形结构数据
      treedata: [],
      defaultNode: "",
           defaultProps: {
        value: "id",
        children: "children",
        label: "label",
      },
      showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断
      }
    },
    mounted () {
      this.loadBdcdylist();
    },
    computed: {
      ...mapGetters(['isRefresh'])
    },
    watch: {
      isRefresh: {
        handler (newVal, oldVal) {
          if (newVal) this.loadBdcdylist()
        },
        immediate: true
      }
    },
    methods: {
      //读取申请单元信息
      loadBdcdylist () {
         var formdata = new FormData();
        formdata.append("bsmSlsq", this.bsmSlsq);
        formdata.append("bestepid", this.bestepid);
        leftMenu(formdata).then((res) => {
          if (res.code === 200 && res.result) {
           this.currentSelectProps = res.result[0];
             this.$emit('getCurrentSelectProps', this.currentSelectProps);
          }
        })
        this.getleftMenubl()
      },
      // 获取右侧菜单
      getleftMenubl(){
      //   var formdata = new FormData();
      //  formdata.append("bsmSlsq", this.bsmSlsq);
        leftMenubl(this.bsmSlsq).then((res) => {
        this.supplementarylist=res.result;
        }
        )
      },
    handleNodeClick (data, node, elem) {
      this.$parent.loadComponent(this.currentSelectProps,data);
      this.$parent.tabset();
    },
  //申请单元点击事件
    unitClick (index) {
       this.currentSelectProps=this.supplementarylist[index];
        // this.$parent.tabset();
     // console.log("this.currentSelectProps", this.supplementarylist[index]);
      // this.currentSelectProps.batchOperation = false;
      // this.activeIndex = index.toString();
      // //选中表单传递数据
      this.$emit('getCurrentSelectProps', this.currentSelectProps);
      // this.$parent.stepForm(index);
      // this.$store.dispatch('user/refreshPage', false);
    },
     //登记簿点击事件
    djbClick () {
      this.loadBdcdylist ()
      // console.log("this.currentSelectProps",this.currentSelectProps);
      this.currentSelectProps.batchOperation = true;
       this.$parent.getdjblist()

    },
    // 删除补录记录
    handleDel(row){
  console.log("是",row);
  deleteRepairRecord(row.bsmRepair).then((res) => {
          if (res.code === 200) {
         alert("删除成功")
          }
        })
    },
      //补录信息点击事件
    blxxClick () {
    this.$parent.tabset()

    },
  }
  }
</script>
<style scoped lang='scss'>
  @import "~@/styles/mixin.scss";
  @import "../../workFrame.scss";
  .leftmenu ul {
    height: calc(100vh - 120px);
  }
  /deep/.rollTable {
  height: calc(100vh - 240px) !important;
}

.content {
  width: 100%;
  height: 100%;
  display: flex;

  .left {
    width: 256px;
    height: 704px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid rgb(228, 228, 228);
  }

  .right {
    width: calc(100% - 256px);
    height: 704px;
    // overflow-y: scroll;
    overflow: auto;
    background-color: #f5f5f5;
    border: 1px solid rgb(228, 228, 228);
  }
}

/deep/ .expanded.el-tree-node__expand-icon,
/deep/ .el-tree-node__expand-icon {
  visibility: hidden;
}

/deep/ .el-tree-node__content {
  border: 1px solid rgb(228, 228, 228);
  height: 45px;
}

/deep/ .el-tree-node:focus>.el-tree-node__content {
  background-color: #f5f5f5;
  color: #0079fe;
  border-right: 4px solid #0079fe;
}

/deep/.el-tree-node {
  white-space: pre-wrap;
}

/deep/ .is-current>.el-tree-node__content {
  background-color: #f5f5f5;
  color: #0079fe;
  border-right: 4px solid #0079fe;
}
.menus{
     background-color: #e7f4fe;
}
.blxx{
  border:#b0d9f8 solid 1px;
}
</style>