378199b5 by “miaofang

--no commit message

1 parent 0a3c79ce
/*
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-15 10:52:40
*/
......@@ -89,12 +89,12 @@ export function getNode (qllx, qlxx, bdcdylx, bdcdyid) {
if (qlxxPage[i].qllx == qllx) {
if (qllx == "A04" || qllx == "A06" || qllx == "A08") {
if (bdcdylx == "4") {
node = { bdcdyid: bdcdyid, id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
node = { bdcdyid: bdcdyid, id: "fdcq1", form: "fdcq1.vue", label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
} else {
node = { bdcdyid: bdcdyid, id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
node = { bdcdyid: bdcdyid, id: "fdcq2", form: "fdcq2.vue", label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
}
} else {
node = { bdcdyid: bdcdyid, id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label + "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
node = { bdcdyid: bdcdyid, id: qlxxPage[i].id, form: qlxxPage[i].form, label: qlxxPage[i].label ,zt: "(临:" + qlxx.linShi + ",现:" + qlxx.xianShi + ",历:" + qlxx.liShi + ")" };
}
break;
}
......
......@@ -26,21 +26,26 @@
:name="index"
>
<template slot="title">
<span class="text" @click="addlist(item)">
<span class="text" @click="tap(item)">
<span>
{{ item.label }}
</span>
</span>
</template>
<el-button
<p
v-for="(item, index) in item.children"
:re='item'
:re="item"
:key="index"
class="sfqcontent"
@click="addlist(item, index)"
:class="[isActive == index ? activeCls : '', errorCls]"
@click="taplist(item, index)"
>
{{ item.label }}
</el-button>
<span>
{{ item.label }}
</span>
<span>
{{ item.zt }}
</span>
</p>
</el-collapse-item>
</el-collapse>
</div>
......@@ -79,6 +84,9 @@ export default {
queryForm: {},
defaultNode: "",
isActive: "",
activeCls: "select",
errorCls: "unselected",
defaultProps: {
value: "id",
children: "children",
......@@ -176,13 +184,9 @@ export default {
return item.bdcdyid == val.bdcdyid;
});
this.activeName = index
this.setstyle(index, 0, this.iskey);
} else {
this.sfqdata.push(loadsfqData(res.result, val.bdcdyh, val.bdcdyid));
this.activeName = this.sfqdata.length - 1;
this.$nextTick(() => {
this.setstyle(this.sfqdata.length - 1, 0, this.iskey);
})
}
}
});
......@@ -215,13 +219,14 @@ export default {
);
this.sfqdata[0].children.forEach((item, index) => {
if (item.id == this.defaultNode.id) {
this.iskey = index
this.loadComponent(item.form);
this.isActive = index;
}
})
// this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
// this.loadComponent(this.defaultNode.form);
this.setstyle(0, 0, this.iskey);
// this.setstyle(0, 0, this.iskey);
});
......@@ -252,50 +257,42 @@ export default {
* @author: renchao
* 设置样式和点击定位到当前功能
*/
setstyle (newindex, index, key) {
if (key != undefined || this.keyy == index) {
if (key != undefined) {
this.keyy = key
}
this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form);
let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
dpme.style.backgroundColor = "#f5f5f5";
dpme.style.color = "#0079fe";
dpme.style.borderRight = "4px solid #0079fe";
} else {
let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
dpme.style.backgroundColor = "#ffffff";
dpme.style.color = "black";
dpme.style.border = "none";
}
},
// setstyle (newindex, index, key) {
// if (key != undefined || this.keyy == index) {
// if (key != undefined) {
// this.keyy = key
// }
// this.loadComponent(this.$refs.sfq[newindex].$children[this.keyy].$attrs.re.form);
// let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
// dpme.style.backgroundColor = "#f5f5f5";
// dpme.style.color = "#0079fe";
// dpme.style.borderRight = "4px solid #0079fe";
// } else {
// let dpme = this.$refs.sfq[newindex].$children[this.keyy].$el
// dpme.style.backgroundColor = "#ffffff";
// dpme.style.color = "black";
// dpme.style.border = "none";
// }
// },
/**
* @description: addlist
* @description: tap
* @param {*} data
* @author: renchao
* 新增列表功能
*/
addlist (data, index) {
if (index != undefined) {
let newindex = this.sfqdata.findIndex((item) => {
return item.bdcdyid == data.bdcdyid;
});
this.setstyle(newindex, index);
this.currentSelectProps.bdcdyid = data.bdcdyid;
this.loadComponent(data.form);
} else {
let newindex = this.sfqdata.findIndex((item) => {
return item.bdcdyid == data.bdcdyid;
});
this.setstyle(newindex, index, this.iskey);
this.currentSelectProps.bdcdyid = data.bdcdyid;
}
},
tap(data, index) {
this.loadComponent(data.form);
},
/**
* @description: taplist
* @param {*} data
* @author: renchao
* 新增列表功能
*/
taplist(data, index) {
this.loadComponent(data.form);
this.isActive = index;
},
/**
* @description: loadComponent
* @param {*} form
......@@ -390,33 +387,41 @@ export default {
/deep/.el-collapse-item__content {
padding-bottom: 5px;
}
/deep/.sfqcontent {
white-space: wrap;
/deep/.unselected {
// white-space: wrap;
border: none;
padding: 0;
margin: 0;
cursor: pointer;
width: 100%;
height: 100px;
word-break: break-word;
display: inline;
span {
font-size: 13px;
display: block;
line-height: 15px;
margin-left: 70px;
}
width: 250px;
height: 45px;
border: 1px solid rgb(228, 228, 228);
border-right: 4px solid #f5f5f5;
margin: auto;
text-align: center;
align-items: center;
span {
width: 100%;
display: inline-block;
justify-content: center;
align-items: center;
}
}
.sfqcontent:hover {
background-color: #f5f5f5;
color: black;
}
.sfqcontent:focus {
.select {
border: none;
cursor: pointer;
width: 250px;
height: 45px;
background-color: #f5f5f5;
color: #0079fe;
border-right: 4px solid #0079fe;
margin: auto;
text-align: center;
align-items: center;
span {
width: 100%;
display: inline-block;
justify-content: center;
align-items: center;
}
}
</style>
......