zydx-plus 1.19.95 → 1.19.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -53,6 +53,11 @@ export default {
|
|
|
53
53
|
required: true,
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
|
+
data () {
|
|
57
|
+
return {
|
|
58
|
+
pcatalogIds: ''
|
|
59
|
+
}
|
|
60
|
+
},
|
|
56
61
|
computed: {
|
|
57
62
|
targetTree: function () {
|
|
58
63
|
let that = this;
|
|
@@ -109,7 +114,10 @@ export default {
|
|
|
109
114
|
},
|
|
110
115
|
// 点击回调事件
|
|
111
116
|
clickItem(item) {
|
|
117
|
+
this.getPcatalogIds(item.pcatalogId);
|
|
118
|
+
item["catalogPIds"] = this.pcatalogIds.split("").reverse().join("");
|
|
112
119
|
this.$emit("clickItem", item);
|
|
120
|
+
this.pcatalogIds = '';
|
|
113
121
|
},
|
|
114
122
|
// 递归调用修改状态
|
|
115
123
|
setIsShowUpDown(item, index) {
|
|
@@ -123,6 +131,20 @@ export default {
|
|
|
123
131
|
}
|
|
124
132
|
}
|
|
125
133
|
},
|
|
134
|
+
// 获取当前节点的父级id
|
|
135
|
+
getPcatalogIds: function (pcatalogId) {
|
|
136
|
+
let that = this
|
|
137
|
+
if (pcatalogId === '-1') {
|
|
138
|
+
that.pcatalogIds += ','
|
|
139
|
+
} else {
|
|
140
|
+
this.treeData.some(function (item) {
|
|
141
|
+
if (item.catalogId === pcatalogId) {
|
|
142
|
+
that.pcatalogIds += ',' + item.catalogId
|
|
143
|
+
that.getPcatalogIds(item.pcatalogId)
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
}
|
|
147
|
+
},
|
|
126
148
|
},
|
|
127
149
|
};
|
|
128
150
|
</script>
|
|
@@ -134,6 +156,7 @@ export default {
|
|
|
134
156
|
text-overflow: ellipsis;
|
|
135
157
|
padding: 0px 10px;
|
|
136
158
|
width: 100%;
|
|
159
|
+
box-sizing: border-box;
|
|
137
160
|
}
|
|
138
161
|
|
|
139
162
|
</style>
|
|
@@ -24,6 +24,7 @@ selectItem 传入当前选择的节点,是一个对象
|
|
|
24
24
|
class="widthB100 ellipse cursor "
|
|
25
25
|
:class="menuTitleStyle"
|
|
26
26
|
@click.stop="clickItem(menuInfo)"
|
|
27
|
+
:title="menuInfo.title"
|
|
27
28
|
>
|
|
28
29
|
<template v-if="menuConfig.isCheckBox">
|
|
29
30
|
<checkBox v-model="menuConfig.checkBoxValue" :value="menuInfo.catalogId"></checkBox>
|