<template> <div class="container"> <!-- 顶部内容框 --> <div class="topButton"> <!-- 左侧业务功能按钮 --> <ul> <li @click="operation(index, item)" v-for="(item, index) in leftButtonList" :key="index" > <svg-icon :icon-class="item.icon" /> <span class="iconName">{{ item.name }}</span> </li> </ul> <!-- 右侧流程按钮 --> <ul> <li @click="operation(index, item)" v-for="(item, index) in rightButtonList" :key="index" > <svg-icon class="icon" :icon-class="item.icon" /> <span class="iconName">{{ item.name }}</span> </li> </ul> </div> <!-- 内容框架 --> <div id="ContainerFrame"> <!-- 左侧菜单栏 --> <div id="leftmenu"> <ul> <p class="title">申请单元列表({{ unitData.length }})</p> <div v-for="(item, index) in unitData" :key="index"> <li @click="unitClick(item)"> <p>{{ item.bdcdyh }}</p> <p>{{ item.zl }}</p> </li> <!-- <div class="xian"></div> --> </div> </ul> </div> <!-- 表单内容区域 --> <div id="rightContainer"> <div class="tabDiv"> <el-tabs v-model="activeName" @tab-click="tabClick"> <el-tab-pane :label="item.name" :name="item.value" v-for="(item, index) in tabList" :key="index" > </el-tab-pane> </el-tabs> <component :is="componentTag" v-bind="currentSelectProps" /> </div> <!-- <div style="width: 100%"> </div> --> </div> </div> </div> </template> <style scoped lang='scss'> @import "~@/styles/mixin.scss"; #ContainerFrame { // margin-left: 5px; // border: 1px solid #ebeef5; // position: relative; // box-sizing: border-box; // width: 100%; // height: 100%; // display: inline; height: 100%; width: 100%; position: sticky; top: 80px; //background-color: #ffffff; border: 1px solid #ebeef5; z-index: 100; @include flex; } #leftmenu { width: 250px; border-right: 1px solid #ebeef5; position: relative; box-sizing: border-box; ul { position: relative; .xian { background: #f2f2f2; padding: 2px; } .title { padding: 5px; text-align: center; } li { padding: 5px; font-size: 14px; color: #606266; line-height: 20px; } li:hover { color: #0f93f6; cursor: pointer; } } } #rightContainer { .tabDiv { width: 100%; height: 100%; } // .fenpin { // min-width: 50%; // border-right: 1px solid #ebeef5; // } background-color: #ffffffe7; width: 100%; height: 100%; z-index: 100; @include flex; } .svg-icon { width: 2.5em; height: 2.5em; } .iconName { line-height: 24px; font-size: 12px; } .container { width: 100%; height: 100%; padding: 0; box-sizing: border-box; background-color: #ffffff; overflow: hidden; } .topButton { @include flex; width: 100%; height: 80px; background-color: #3498db; color: #ffffff; justify-content: space-between; padding-left: 15px; position: sticky; top: 0; z-index: 100; ul { @include flex; li { @include flex-center; cursor: pointer; flex-direction: column; margin-right: 15px; box-sizing: border-box; width: 70px; margin: 0 5px; } li:hover { border: 1px solid #ffffff; border-radius: 5px; //color: $light-blue ; .svg-icon { //color: $light-blue ; } } } } </style> <script> import { leftMenu, stepExpandInfo, record } from "@/api/fqsq.js"; export default { components: { slxx: () => import("./components/slxx.vue"), spyj: () => import("./components/spyj.vue"), zdjbxx: () => import("../../zhcx/djbcx/components/zdxx.vue"), qlxx: () => import("../../components/jsydsyq/jsydsyq.vue"), }, data() { return { bsmSlsq: "", bestepid: "", leftButtonList: [], rightButtonList: [], unitData: [], activeName: "", tabList: [], componentTag: "", currentSelectProps: {}, }; }, mounted() { this.bsmSlsq = this.$route.query.bsmSlsq; this.bestepid = this.$route.query.bestepid; this.loadBdcdylist(); this.flowInitParam(); }, methods: { //加载流程初始参数 flowInitParam() { var formdata = new FormData(); formdata.append("bsmSlsq", this.bsmSlsq); formdata.append("bestepid", this.bestepid); stepExpandInfo(formdata).then((res) => { if (res.code === 200) { this.leftButtonList = res.result.button; this.rightButtonList = res.result.operation; this.tabList = res.result.form; //默认选择第一个选项卡内容 this.activeName = res.result.form[0].value; //默认加载第一个选项卡的组件内容 this.componentTag = res.result.form[0].value; } }); }, //流程环节操作按钮 operation(index, item) { let that = this; switch (item.value) { case "zsyl": this.zsylFlag = true; break; case "clfp": this.key++; this.issplitScreen = !this.issplitScreen; this.flag = !this.flag; if (this.issplitScreen) { this.tabList.splice(1, 1); } else { this.tabList = [...this.tabList1]; } break; case "th": this.thflag = true; this.$nextTick(() => { this.$refs.thdialogRef.tablelistFn(); }); break; case "zc": this.zcDialog = true; this.$refs.zcDialogRef.tablelistFn(); break; case "tc": window.close(); break; case "db": var formdata = new FormData(); formdata.append("bsmSlsq", this.bsmSlsq); formdata.append("bestepid", this.bestepid); // comMsg; this.$confirm("请确认是否登簿", "提示", { iconClass: "el-icon-question", //自定义图标样式 confirmButtonText: "确认", //确认按钮文字更换 cancelButtonText: "取消", //取消按钮文字更换 showClose: true, //是否显示右上角关闭按钮 type: "warning", //提示类型 success/info/warning/error }).then(function () { record(formdata).then((res) => { if (res.code === 200 || res.code === 2002) { that.$alert(res.message); } }); }); break; } }, loadBdcdylist() { var formdata = new FormData(); formdata.append("bsmSlsq", this.bsmSlsq); formdata.append("bestepid", this.bestepid); leftMenu(formdata).then((res) => { if (res.code === 200) { this.unitData = res.result; this.currentSelectProps = res.result[0]; //debugger; //this.$alert(res.result[0].bsmSldy); // setTimeout(() => { // that.$refs.slxx?.[0].list(that.unitData?.[0]?.bsmSldy); // this.bsmBusiness = that.unitData?.[0]?.bsmBusiness; // }, 300); } }); }, // 左侧列表点击调用接口 unitClick(item) { // this.bsmBusiness = item.bsmBusiness // var activeTabName = this.activeName // if(activeTabName == 'slxx'){ // //受理信息页面接口调取 // this.$nextTick(() => { // this.$refs.slxx[0].list(item.bsmSldy) // }) // }else if(activeTabName == 'spyj'){ // //审批页面接口调取 // this.$nextTick(() => { // this.$refs.spyj[0].list(this.bsmBusiness,this.queryForm.bestepid) // }) // } }, tabClick(tab, event) { this.componentTag = tab.name; }, }, }; </script>