优化收藏夹

hn2.0
fanluyan 1 year ago
parent 49eaf122a8
commit eb1dbb22b4

@ -313,7 +313,7 @@
<gps-position ref="gpsdialog_ref"></gps-position>
<morePicPreveiw ref="morePicPreveiw_ref"></morePicPreveiw>
<!-- 收藏弹窗 -->
<el-dialog title="选择收藏夹" :visible.sync="favorListDialog" width="30%">
<el-dialog title="选择收藏夹" :visible.sync="favorListDialog" width="368px">
<el-form :model="favorform" @change="changeFavAl">
<el-form-item label="收藏夹列表">
<el-select
@ -490,17 +490,28 @@ export default {
// console.log(this.dateValue);
// },
//treenode
handleNodeClick(data) {
handleNodeClick(data, node) {
this.clearfun();
console.log(data);
if (
(data.dyValue == null || data.dyValue == bsManufacturer) &&
data.hasOwnProperty("list")
) {
this.$refs.tree.setCurrentKey(this.selectData.id);
return;
console.log(data, node);
if (node) {
if (
node.level == 1 &&
data.dyValue == null &&
data.hasOwnProperty("list")
) {
this.$refs.tree.setCurrentKey(this.selectData.id);
return;
}
if (
node.level == 2 &&
data.bsManufacturer == null &&
data.hasOwnProperty("list")
) {
this.$refs.tree.setCurrentKey(this.selectData.id);
return;
}
}
this.selectData = data;
this.zztermId = data.id;
this.zzprotocol = data.protocol;
@ -764,12 +775,21 @@ export default {
},
addCollectClick() {
if (!this.collectFlag) {
this.favorListDialog = true;
listFavorApi()
.then((res) => {
if (res.code == 200) {
this.favorOptions = res.data;
this.favorform.favorVal = res.data[0].id;
if (this.favorOptions.length !== 0) {
this.favorListDialog = true;
} else {
this.$message({
duration: 1500,
showClose: true,
message: "请到收藏夹管理页面添加收藏夹",
type: "warning",
});
}
}
})
.catch((err) => {});

Loading…
Cancel
Save