383a07c7 by renchao@pashanhoo.com

style:申请查询

1 parent 904af2b4
<!--
* @Description: workFrame左侧菜单列表-普通
* @Autor: renchao
* @LastEditTime: 2023-05-25 10:42:50
* @LastEditTime: 2023-07-17 16:16:13
-->
<template>
<div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
<div v-if="this.isShowdrawer">
<el-menu
@select="djbClick"
class="title-batch"
>
class="title-batch">
<el-menu-item index="-1" key="-1" class="menus">
<div>登记簿</div>
</el-menu-item>
......@@ -17,8 +16,7 @@
<div class="blxx">
<el-menu
@select="blxxClick"
class="title-batch"
>
class="title-batch">
<el-menu-item index="-1" key="-1" class="menus">
<div>补录信息</div>
</el-menu-item>
......@@ -27,11 +25,10 @@
<el-menu-item
v-for="(item, index) in supplementarylist"
:index="index.toString()"
:key="index"
>
:key="index">
<div>
<p v-if="item.operate=='D'">{{ item.qllxmc }} <span class="tpcolor">(删除)</span></p>
<p v-else >{{ item.qllxmc }} <span class="tpcolor">({{ item.operate=="U"?"编辑":"新增" }})</span></p>
<p v-else>{{ item.qllxmc }} <span class="tpcolor">({{ item.operate=="U"?"编辑":"新增" }})</span></p>
</div>
<i class="el-icon-delete" @click.stop="handleDel(item)" v-if="delel"></i>
</el-menu-item>
......@@ -45,8 +42,7 @@
() => {
this.isShowdrawer = !this.isShowdrawer;
}
"
></div>
"></div>
<div
class="map-drawer-expand map-drawer"
v-else
......@@ -54,246 +50,240 @@
() => {
this.isShowdrawer = !this.isShowdrawer;
}
"
></div>
"></div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { leftMenu, deleteSlbdcdy } from "@/api/workFlow.js";
import { deleteRepairRecord } from"@/api/djbRepair.js";
import { leftMenubl } from"@/api/djbRepair.js";
import { getBdcqljqtsx } from "@/api/djbDetail.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,
delel: true,
//批量操作按钮名称
batchButtonName: "",
//左侧菜单数据集合
unitData: [],
// 设置表单传递数据
currentSelectProps: {},
//左侧树形结构数据
treedata: [],
defaultNode: "",
defaultProps: {
value: "id",
children: "children",
label: "label",
},
showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断
};
},
mounted() {
this.delel=this.$parent.isEdit
this.loadBdcdylist();
// this.getleftMenubl();
},
computed: {
// ...mapGetters(["isRefresh"]),
},
watch: {
// isRefresh: {
// handler(newVal, oldVal) {
// if (newVal) this.loadBdcdylist();
// },
// immediate: true,
// },
},
methods: {
//读取申请单元信息
loadBdcdylist() {
var formdata = new FormData();
if(this.bsmSlsq){
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);
}
});
}
},
// 获取右侧菜单
getleftMenubl(row) {
leftMenubl(this.bsmSlsq).then((res) => {
this.supplementarylist = res.result;
if(row==1){
this.delel=false
}
if(row&&row!=1){
this.supplementarylist.forEach((item,index) => {
if(item.bsmRepair==row.bsmRepair){
this.activeIndex=index.toString()
// 补录成功后定位到该条记录
this.unitClick(index)
}
})
}
if(this.supplementarylist.length){
this.unitClick(0)
}else{
this.$emit("getCurrentSelectProps", this.currentSelectProps);
}
});
import { mapGetters } from "vuex";
import { leftMenu, deleteSlbdcdy } from "@/api/workFlow.js";
import { deleteRepairRecord } from "@/api/djbRepair.js";
import { leftMenubl } from "@/api/djbRepair.js";
import { getBdcqljqtsx } from "@/api/djbDetail.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,
delel: true,
//批量操作按钮名称
batchButtonName: "",
//左侧菜单数据集合
unitData: [],
// 设置表单传递数据
currentSelectProps: {},
//左侧树形结构数据
treedata: [],
defaultNode: "",
defaultProps: {
value: "id",
children: "children",
label: "label",
},
showTab: "bdcqldjml", // 选中状态,根据表格中权利类型判断
};
},
handleNodeClick(data, node, elem) {
this.$parent.loadComponent(this.currentSelectProps, data);
this.$parent.tabset();
mounted () {
this.delel = this.$parent.isEdit
this.loadBdcdylist();
},
//申请单元点击事件
unitClick(index) {
this.currentSelectProps = this.supplementarylist[index];
this.$emit("getCurrentSelectProps", this.currentSelectProps);
computed: {
// ...mapGetters(["isRefresh"]),
},
//登记簿点击事件
djbClick() {
this.loadBdcdylist();
watch: {
// isRefresh: {
// handler(newVal, oldVal) {
// if (newVal) this.loadBdcdylist();
// },
// immediate: true,
// },
},
// 删除补录记录
handleDel(row) {
this.$confirm("此操作将永久删除该条补录记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteRepairRecord(row.bsmRepair).then((res) => {
this.$message({
type: "success",
message: "删除成功!",
});
this.$nextTick(() => {
this.getleftMenubl();
this.blxxClick()
if(!this.supplementarylist.length){
getdjblist()
methods: {
//读取申请单元信息
loadBdcdylist () {
var formdata = new FormData();
if (this.bsmSlsq) {
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);
}
});
}
},
// 获取右侧菜单
getleftMenubl (row) {
leftMenubl(this.bsmSlsq).then((res) => {
this.supplementarylist = res.result;
if (row == 1) {
this.delel = false
}
if (row && row != 1) {
this.supplementarylist.forEach((item, index) => {
if (item.bsmRepair == row.bsmRepair) {
this.activeIndex = index.toString()
// 补录成功后定位到该条记录
this.unitClick(index)
}
})
}
if (this.supplementarylist.length) {
this.unitClick(0)
} else {
this.$emit("getCurrentSelectProps", this.currentSelectProps);
}
});
},
handleNodeClick (data, node, elem) {
this.$parent.loadComponent(this.currentSelectProps, data);
this.$parent.tabset();
},
//申请单元点击事件
unitClick (index) {
this.currentSelectProps = this.supplementarylist[index];
this.$emit("getCurrentSelectProps", this.currentSelectProps);
},
//登记簿点击事件
djbClick () {
this.loadBdcdylist();
},
// 删除补录记录
handleDel (row) {
this.$confirm("此操作将永久删除该条补录记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteRepairRecord(row.bsmRepair).then((res) => {
this.$message({
type: "success",
message: "删除成功!",
});
this.$nextTick(() => {
this.getleftMenubl();
this.blxxClick()
if (!this.supplementarylist.length) {
getdjblist()
}
});
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//补录信息点击事件默认展示第一条补录记录
blxxClick() {
if(this.supplementarylist.length){
this.unitClick(0);
}
},
//补录信息点击事件默认展示第一条补录记录
blxxClick () {
if (this.supplementarylist.length) {
this.unitClick(0);
}
},
},
},
};
};
</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);
@import "~@/styles/mixin.scss";
@import "../../workFrame.scss";
.leftmenu ul {
height: calc(100vh - 120px);
}
.right {
width: calc(100% - 256px);
height: 704px;
// overflow-y: scroll;
overflow: auto;
background-color: #f5f5f5;
border: 1px solid rgb(228, 228, 228);
/deep/.rollTable {
height: calc(100vh - 240px) !important;
}
}
/deep/ .expanded.el-tree-node__expand-icon,
/deep/ .el-tree-node__expand-icon {
visibility: hidden;
}
.content {
width: 100%;
height: 100%;
display: flex;
/deep/ .el-tree-node__content {
border: 1px solid rgb(228, 228, 228);
height: 45px;
}
.left {
width: 256px;
height: 704px;
background-color: #f5f5f5;
color: #333;
border: 1px solid rgb(228, 228, 228);
}
/deep/ .el-tree-node:focus > .el-tree-node__content {
background-color: #f5f5f5;
color: #0079fe;
border-right: 4px solid #0079fe;
}
.right {
width: calc(100% - 256px);
height: 704px;
// overflow-y: scroll;
overflow: auto;
background-color: #f5f5f5;
border: 1px solid rgb(228, 228, 228);
}
}
/deep/.el-tree-node {
white-space: pre-wrap;
}
/deep/ .expanded.el-tree-node__expand-icon,
/deep/ .el-tree-node__expand-icon {
visibility: hidden;
}
/deep/ .is-current > .el-tree-node__content {
background-color: #f5f5f5;
color: #0079fe;
border-right: 4px solid #0079fe;
}
.menus {
background-color: #e7f4fe;
div{
font-size: 16px;
font-weight: 600;
/deep/ .el-tree-node__content {
border: 1px solid rgb(228, 228, 228);
height: 45px;
}
}
.blxx {
.el-menu-item{
display: flex;
justify-content: space-between;
/deep/ .el-tree-node:focus > .el-tree-node__content {
background-color: #f5f5f5;
color: #0079fe;
border-right: 4px solid #0079fe;
}
border: #b0d9f8 solid 1px;
.tpcolor{
color: red;
line-height: 22px;
/deep/.el-tree-node {
white-space: pre-wrap;
}
.el-icon-delete{
margin-right: 3px;
// background-color: saddlebrown;
height: 27px;
float: left;
/deep/ .is-current > .el-tree-node__content {
background-color: #f5f5f5;
color: #0079fe;
border-right: 4px solid #0079fe;
}
.menus {
background-color: #e7f4fe;
div {
font-size: 16px;
font-weight: 600;
}
}
.blxx {
.el-menu-item {
display: flex;
justify-content: space-between;
}
border: #b0d9f8 solid 1px;
.tpcolor {
color: red;
line-height: 22px;
}
.el-icon-delete {
margin-right: 3px;
// background-color: saddlebrown;
height: 27px;
float: left;
}
}
}
</style>
......
/*
* @Description:workFramezu.vue组件的方法 头部按钮弹框方法
* @Autor: miaofang
* @LastEditTime: 2023-07-17 14:20:28
* @LastEditTime: 2023-07-17 16:14:23
*/
import { getPrintTemplateByCode } from "@/api/print";
import { getQllxByBdcdyid } from "@/api/djbDetail.js";
......@@ -18,7 +18,6 @@ import {
unClaimTask
} from "@/api/workFlow.js";
import { mapGetters } from 'vuex'
import { log } from "bpmn-js-token-simulation";
export default {
data () {
return {
......
......@@ -12,8 +12,7 @@
<li
@click="operation(item)"
v-for="(item, index) in leftButtonList"
:key="index"
>
:key="index">
<svg-icon class="icon" :icon-class="item.icon" />
<span class="iconName">{{ item.name }}</span>
</li>
......@@ -22,8 +21,7 @@
<li
@click="operation(item)"
v-for="(item, index) in rightButtonList"
:key="index"
>
:key="index">
<svg-icon class="icon" :icon-class="item.icon" />
<span class="iconName">{{ item.name }}</span>
</li>
......@@ -50,15 +48,13 @@
:label="item.name"
:name="item.value"
v-for="item in tabList"
:key="item.value"
>
:key="item.value">
</el-tab-pane>
</el-tabs>
<component
:key="fresh"
:is="componentTag"
v-bind="currentSelectProps"
/>
v-bind="currentSelectProps" />
</div>
</div>
</div>
......@@ -67,184 +63,185 @@
</div>
</template>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "./workFrame.scss";
@import "~@/styles/mixin.scss";
@import "./workFrame.scss";
</style>
<script>
import WorkFlow from "./mixin/index";
import { getForm } from "./flowform";
import { getBlYbxStepFormInfo } from "@/api/workFlow.js";
import NoticeBar from "@/components/NoticeBar/index";
import ProcessViewer from "./components/processViewer.vue";
// 引入左侧菜单
import { leftMenubl } from "@/api/djbRepair.js";
import ordinaryMenu from "./components/leftmenu/ordinaryMenu.vue";
import qllxDailog from "./djbBook/components/qllxDailog";
import selectBdc from "@/views/ywbl/ywsq/selectBdc.vue";
import { loadTreeData, getNode } from "./components/leftmenu/djbFrameData.js";
// 登记簿数据信息
import { addRepairRecord } from "@/api/djbRepair.js";
import WorkFlow from "./mixin/index";
import { getForm } from "./flowform";
import { getBlYbxStepFormInfo } from "@/api/workFlow.js";
import NoticeBar from "@/components/NoticeBar/index";
import ProcessViewer from "./components/processViewer.vue";
// 引入左侧菜单
import { leftMenubl } from "@/api/djbRepair.js";
import ordinaryMenu from "./components/leftmenu/ordinaryMenu.vue";
import qllxDailog from "./djbBook/components/qllxDailog";
import selectBdc from "@/views/ywbl/ywsq/selectBdc.vue";
import { loadTreeData, getNode } from "./components/leftmenu/djbFrameData.js";
// 登记簿数据信息
import { addRepairRecord } from "@/api/djbRepair.js";
import { getBdcqljqtsx } from "@/api/djbDetail.js";
export default {
components: {
selectBdc,
NoticeBar,
ProcessViewer,
ordinaryMenu,
qllxDailog,
},
mixins: [WorkFlow],
data() {
return {
bsmSlsq: this.$route.query.bsmSlsq,
bestepid: this.$route.query.bestepid,
//设置那个表单选中
tabName: "",
// 弹框显示
dialogVisible: true,
isEdit:false,
//表单集合
tabList: [],
type: "READ_ONLY",
//选择加载哪一个组件
componentTag: "",
//设置表单传递数据
currentSelectProps: {},
// 首次拿到的业务信息
oneSelectProps: {},
//材料信息选择卡索引
oneget: true,
//页面监听时间
_beforeUnload_time: "",
treedata: {},
bsmRepair:"",
tabdata: [],
defaultNode: {},
ableOperation:false
};
},
mounted() {
// this.getleftMenubl()
},
methods: {
stepForm(qllx) {
this.oneSelectProps.qllx = qllx;
if (this.$refs.Menu.supplementarylist.length) {
this.oneSelectProps.type = this.type
getBlYbxStepFormInfo(this.oneSelectProps).then((res) => {
this.$nextTick(function () {
this.tabList = res.result;
this.tabName = this.tabList[0].value;
console.log("是否只读",this.tabList[0].ableOperation);
this.ableOperation=this.tabList[0].ableOperation
this.getFromRouter(this.tabName);
});
});
}
import { getBdcqljqtsx } from "@/api/djbDetail.js";
export default {
components: {
selectBdc,
NoticeBar,
ProcessViewer,
ordinaryMenu,
qllxDailog,
},
// 获取右侧选项卡
getCurrentSelectProps(val) {
this.bsmRepair= val.bsmRepair
if (val.bdcdyid) {
this.oneSelectProps = val;
}
this.currentSelectProps = val;
if (this.currentSelectProps.bsmRepair) {
this.stepForm(this.currentSelectProps.qllx);
} else if (!this.oneget) {
this.getdjblist();
}
if (this.oneget) {
this.oneget = false;
this.stepForm(this.currentSelectProps.qllx);
}
mixins: [WorkFlow],
data () {
return {
bsmSlsq: this.$route.query.bsmSlsq,
bestepid: this.$route.query.bestepid,
bsmBusiness: this.$route.query.bsmBusiness,
//设置那个表单选中
tabName: "",
// 弹框显示
dialogVisible: true,
isEdit: false,
//表单集合
tabList: [],
type: "READ_ONLY",
//选择加载哪一个组件
componentTag: "",
//设置表单传递数据
currentSelectProps: {},
// 首次拿到的业务信息
oneSelectProps: {},
//材料信息选择卡索引
oneget: true,
//页面监听时间
_beforeUnload_time: "",
treedata: {},
bsmRepair: "",
tabdata: [],
defaultNode: {},
ableOperation: false
};
},
mounted () {
// this.getleftMenubl()
},
// 获取渲染登记簿列表
getdjblist() {
getBdcqljqtsx({
bdcdyid: this.currentSelectProps.bdcdyid,
bdcdyh: this.currentSelectProps.bdcdyh,
}).then((res) => {
if (res.code === 200) {
this.treedata = loadTreeData(res.result, this.bdcdyh);
this.$nextTick(function () {
this.defaultNode = getNode(this.currentSelectProps.qllx, {
linShi: 0,
xianShi: 0,
liShi: 0,
methods: {
stepForm (qllx) {
this.oneSelectProps.qllx = qllx;
if (this.$refs.Menu.supplementarylist.length) {
this.oneSelectProps.type = this.type
getBlYbxStepFormInfo(this.oneSelectProps).then((res) => {
this.$nextTick(function () {
this.tabList = res.result;
this.tabName = this.tabList[0].value;
console.log("是否只读", this.tabList[0].ableOperation);
this.ableOperation = this.tabList[0].ableOperation
this.getFromRouter(this.tabName);
});
this.tabName = this.defaultNode.id; //data[0].id为默认选中的节点
});
let settree = JSON.parse(JSON.stringify(this.treedata));
this.tabdata = [
...settree,
...settree[1].children[0].children[0].children,
];
this.tabdata.forEach((item, index, arr) => {
arr[index].name = item.label;
arr[index].value = item.id;
});
this.tabList = this.tabdata;
}
});
},
//右侧表单选项卡事件
beforeLeave(activeName) {
if (activeName && activeName != 0) this.getFromRouter(activeName);
},
//切换选项卡内容组件
getFromRouter(tabname) {
this.componentTag = getForm(tabname);
},
closefp() {
this.splitScreen = this.splitScreen ? false : true;
this.$store.dispatch("app/set1tScreen", this.splitScreen);
this.getFromRouter(this.tabList[0].value);
this.clxxForm = getForm(this.tabList[1].value);
},
// 增加补录记录
addRepairRecord(row, del) {
let from = {
bsmQlxx: "",
bsmSlsq: this.bsmSlsq,
bsmSldy: this.currentSelectProps.bsmSldy,
operate: "C",
qllx: "",
};
if (row) {
from.bsmQlxx = row.bsmQlxx;
if (del) {
from.operate = del;
} else {
from.operate = row.bsmQlxx ? "U" : "C";
},
// 获取右侧选项卡
getCurrentSelectProps (val) {
this.bsmRepair = val.bsmRepair
if (val.bdcdyid) {
this.oneSelectProps = val;
}
this.currentSelectProps = val;
if (this.currentSelectProps.bsmRepair) {
this.stepForm(this.currentSelectProps.qllx);
} else if (!this.oneget) {
this.getdjblist();
}
if (this.oneget) {
this.oneget = false;
this.stepForm(this.currentSelectProps.qllx);
}
from.qllx = row.qllx;
}
addRepairRecord(from)
.then((res) => {
if (res.code == "200") {
this.$refs.qllxlist.dialogVisible = false;
this.$nextTick(() => {
this.$refs.Menu.getleftMenubl(res.result);
this.$message({
type: "success",
message: "补录成功!",
},
// 获取渲染登记簿列表
getdjblist () {
getBdcqljqtsx({
bdcdyid: this.currentSelectProps.bdcdyid,
bdcdyh: this.currentSelectProps.bdcdyh,
}).then((res) => {
if (res.code === 200) {
this.treedata = loadTreeData(res.result, this.bdcdyh);
this.$nextTick(function () {
this.defaultNode = getNode(this.currentSelectProps.qllx, {
linShi: 0,
xianShi: 0,
liShi: 0,
});
this.tabName = this.defaultNode.id; //data[0].id为默认选中的节点
});
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
type: "warning",
let settree = JSON.parse(JSON.stringify(this.treedata));
this.tabdata = [
...settree,
...settree[1].children[0].children[0].children,
];
this.tabdata.forEach((item, index, arr) => {
arr[index].name = item.label;
arr[index].value = item.id;
});
this.tabList = this.tabdata;
}
})
.catch((res) => {
console.log("错", res);
});
},
//右侧表单选项卡事件
beforeLeave (activeName) {
if (activeName && activeName != 0) this.getFromRouter(activeName);
},
//切换选项卡内容组件
getFromRouter (tabname) {
this.componentTag = getForm(tabname);
},
closefp () {
this.splitScreen = this.splitScreen ? false : true;
this.$store.dispatch("app/set1tScreen", this.splitScreen);
this.getFromRouter(this.tabList[0].value);
this.clxxForm = getForm(this.tabList[1].value);
},
// 增加补录记录
addRepairRecord (row, del) {
let from = {
bsmQlxx: "",
bsmSlsq: this.bsmSlsq,
bsmSldy: this.currentSelectProps.bsmSldy,
operate: "C",
qllx: "",
};
if (row) {
from.bsmQlxx = row.bsmQlxx;
if (del) {
from.operate = del;
} else {
from.operate = row.bsmQlxx ? "U" : "C";
}
from.qllx = row.qllx;
}
addRepairRecord(from)
.then((res) => {
if (res.code == "200") {
this.$refs.qllxlist.dialogVisible = false;
this.$nextTick(() => {
this.$refs.Menu.getleftMenubl(res.result);
this.$message({
type: "success",
message: "补录成功!",
});
});
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
type: "warning",
});
}
})
.catch((res) => {
console.log("错", res);
});
},
},
},
};
};
</script>
<style scoped lang="scss"></style>
......
<!--
* @Description: workFrame左侧菜单列表-普通
* @Autor: renchao
* @LastEditTime: 2023-05-25 10:42:50
* @LastEditTime: 2023-07-17 16:20:37
-->
<template>
<div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
......@@ -39,157 +39,160 @@
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { leftMenu, deleteSlbdcdy } from "@/api/workFlow.js"
export default {
data () {
return {
//受理申请标识码
bsmSlsq: this.$route.query.bsmSlsq,
//当前流程所在环节
bestepid: this.$route.query.bestepid,
// 默认选中
activeIndex: '0',
// 折叠
isShowdrawer: true,
// 批量操作
showBatch: false,
//批量操作按钮名称
batchButtonName: '',
//左侧菜单数据集合
unitData: [],
// 设置表单传递数据
currentSelectProps: {}
}
},
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.unitData = res.result;
this.currentSelectProps = res.result[0];
this.$emit('getCurrentSelectProps', this.currentSelectProps);
this.judgeBatchShow();
if (this.showBatch) {
//满足批量查封/批量抵押按钮出现 即先展示批量表单
this.batchUnitClick();
} else {
//默认选择单元列表第一个
this.unitClick(0);
}
}
})
import { mapGetters } from 'vuex'
import { leftMenu, deleteSlbdcdy } from "@/api/workFlow.js"
export default {
data () {
return {
//受理申请标识码
bsmSlsq: this.$route.query.bsmSlsq,
//当前流程所在环节
bestepid: this.$route.query.bestepid,
// 默认选中
activeIndex: '0',
// 折叠
isShowdrawer: true,
// 批量操作
showBatch: false,
//批量操作按钮名称
batchButtonName: '',
//左侧菜单数据集合
unitData: [],
// 设置表单传递数据
currentSelectProps: {}
}
},
//批量按钮判断
judgeBatchShow () {
this.showBatch = false;
if (this.unitData.length > 1) {
let qllx = this.$route.query?.sqywbm?.substring(0, 3);
switch (qllx) {
case 'A04':
this.showBatch = true;
this.batchButtonName = '房屋批量操作';
break;
case 'B39':
this.showBatch = true;
this.batchButtonName = '查封批量操作';
break;
case 'A37':
this.showBatch = true;
this.batchButtonName = '抵押批量操作';
break;
case 'B37':
this.showBatch = true;
this.batchButtonName = '在建工程抵押批量操作';
break;
}
mounted () {
this.loadBdcdylist();
},
computed: {
...mapGetters(['isRefresh'])
},
watch: {
isRefresh: {
handler (newVal, oldVal) {
if (newVal) this.loadBdcdylist()
},
immediate: true
}
},
/**
* @description: 删除左侧列表
* @param {*} item
* @author: renchao
*/
handleDel (item) {
this.$confirm("确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
var formdata = new FormData();
formdata.append("bsmSldyList", item.bsmSldy.split(","));
// formdata.append("bsmSlsq", this.bsmSlsq);
deleteSlbdcdy(formdata).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
/**
* @description: 更新列表
* @author: miaofang
*/
this.loadBdcdylist()
// this.$parent.updateDialog();
methods: {
//读取申请单元信息
loadBdcdylist () {
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
formdata.append("bestepid", this.bestepid);
if (this.$route.query.bsmBusiness) {
formdata.append("bsmBusiness", this.$route.query.bsmBusiness);
}
leftMenu(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.unitData = res.result;
this.currentSelectProps = res.result[0];
this.$emit('getCurrentSelectProps', this.currentSelectProps);
this.judgeBatchShow();
if (this.showBatch) {
//满足批量查封/批量抵押按钮出现 即先展示批量表单
this.batchUnitClick();
} else {
this.$message.error(res.message);
//默认选择单元列表第一个
this.unitClick(0);
}
});
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
},
//批量按钮判断
judgeBatchShow () {
this.showBatch = false;
if (this.unitData.length > 1) {
let qllx = this.$route.query?.sqywbm?.substring(0, 3);
switch (qllx) {
case 'A04':
this.showBatch = true;
this.batchButtonName = '房屋批量操作';
break;
case 'B39':
this.showBatch = true;
this.batchButtonName = '查封批量操作';
break;
case 'A37':
this.showBatch = true;
this.batchButtonName = '抵押批量操作';
break;
case 'B37':
this.showBatch = true;
this.batchButtonName = '在建工程抵押批量操作';
break;
}
}
},
/**
* @description: 删除左侧列表
* @param {*} item
* @author: renchao
*/
handleDel (item) {
this.$confirm("确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
var formdata = new FormData();
formdata.append("bsmSldyList", item.bsmSldy.split(","));
// formdata.append("bsmSlsq", this.bsmSlsq);
deleteSlbdcdy(formdata).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
/**
* @description: 更新列表
* @author: miaofang
*/
this.loadBdcdylist()
// this.$parent.updateDialog();
} else {
this.$message.error(res.message);
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
});
},
//批量按钮点击事件
batchUnitClick () {
this.currentSelectProps.batchOperation = true;
this.activeIndex = "-1";
this.$parent.stepForm();
},
//批量按钮点击事件
batchUnitClick () {
this.currentSelectProps.batchOperation = true;
this.activeIndex = "-1";
this.$parent.stepForm();
},
//批量操作
handleBatchDel () {
this.$popupDialog("批量删除", "workflow/components/batchDel", {
bsmSlsq: this.bsmSlsq,
dataList: this.unitData,
}, '50%', true)
},
//申请单元点击事件
unitClick (index) {
this.currentSelectProps = this.unitData[index];
this.currentSelectProps.batchOperation = false;
this.activeIndex = index.toString();
//选中表单传递数据
this.$emit('getCurrentSelectProps', this.currentSelectProps);
this.$parent.stepForm(index);
this.$store.dispatch('user/refreshPage', false);
},
//批量操作
handleBatchDel () {
this.$popupDialog("批量删除", "workflow/components/batchDel", {
bsmSlsq: this.bsmSlsq,
dataList: this.unitData,
}, '50%', true)
},
//申请单元点击事件
unitClick (index) {
this.currentSelectProps = this.unitData[index];
this.currentSelectProps.batchOperation = false;
this.activeIndex = index.toString();
//选中表单传递数据
this.$emit('getCurrentSelectProps', this.currentSelectProps);
this.$parent.stepForm(index);
this.$store.dispatch('user/refreshPage', false);
}
}
}
}
</script>
<style scoped lang='scss'>
@import "~@/styles/mixin.scss";
@import "../../workFrame.scss";
.leftmenu ul {
height: calc(100vh - 120px);
}
@import "~@/styles/mixin.scss";
@import "../../workFrame.scss";
.leftmenu ul {
height: calc(100vh - 120px);
}
</style>
......
<!--
* @Description: workFrame左侧菜单列表-分割
* @Autor: renchao
* @LastEditTime: 2023-05-25 10:18:02
* @LastEditTime: 2023-07-17 16:21:24
-->
<template>
<div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
......@@ -99,6 +99,9 @@
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
formdata.append("bestepid", this.bestepid);
if (this.$route.query.bsmBusiness) {
formdata.append("bsmBusiness", this.$route.query.bsmBusiness);
}
leftMenu(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.aroundUnitData = res.result.filter(item => item.bglx == '1')
......