bl-common-vue3 3.8.114 → 3.8.115
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
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<bl-icon v-if="dataRef.slotIcon === 'topCompanyIcon'" type="tree-jigou" class="tree-icon" />
|
|
32
32
|
<GoldenFilled v-if="dataRef.slotIcon === 'departmentIcon'" class="tree-icon" />
|
|
33
33
|
<bl-icon v-if="dataRef.slotIcon === 'villageIcon'" type="tree-xiangmu" class="tree-icon" />
|
|
34
|
-
<bl-icon v-if="dataRef.slotIcon === 'buildIcon'" :type="getIcon('buildIcon')" class="tree-icon" />
|
|
34
|
+
<bl-icon v-if="dataRef.slotIcon === 'buildIcon'" :type="getIcon('buildIcon', dataRef)" class="tree-icon" />
|
|
35
35
|
<bl-icon v-if="dataRef.slotIcon === 'layerIcon'" :type="getIcon('layerIcon')" class="tree-icon" />
|
|
36
36
|
<bl-icon v-if="dataRef.slotIcon === 'roomIcon'" :type="getIcon('roomIcon')" class="tree-icon" />
|
|
37
37
|
</template>
|
|
@@ -87,6 +87,9 @@ import utils from "../../common/utils/util";
|
|
|
87
87
|
import { ROOM_TYPE_ICONS } from "../../common/utils/constant";
|
|
88
88
|
import {t, loadLanguageAsync} from "../../locale";
|
|
89
89
|
|
|
90
|
+
const VENUE_BUILD_TYPE = 1;
|
|
91
|
+
const isVenueBuild = (buildType) => Number(buildType) === VENUE_BUILD_TYPE;
|
|
92
|
+
|
|
90
93
|
export default defineComponent({
|
|
91
94
|
name: "VillageTree",
|
|
92
95
|
props: {
|
|
@@ -187,12 +190,11 @@ export default defineComponent({
|
|
|
187
190
|
return props.roomType?.length && props.roomType.every((v) => [4, 5].includes(Number(v)))
|
|
188
191
|
});
|
|
189
192
|
|
|
190
|
-
const getIcon = (type) => {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return icon;
|
|
193
|
+
const getIcon = (type, data = {}) => {
|
|
194
|
+
const iconType = type === "buildIcon" && isVenueBuild(data.build_type)
|
|
195
|
+
? "area"
|
|
196
|
+
: props.iconType;
|
|
197
|
+
return ROOM_TYPE_ICONS[iconType]?.[type] || ROOM_TYPE_ICONS.default[type];
|
|
196
198
|
};
|
|
197
199
|
|
|
198
200
|
/** 点击选中当前项 */
|
|
@@ -539,10 +541,11 @@ export default defineComponent({
|
|
|
539
541
|
type_txt: village.type_txt,
|
|
540
542
|
},
|
|
541
543
|
slotIcon: "buildIcon",
|
|
542
|
-
|
|
544
|
+
// 场地没有楼层层级,作为叶子节点展示,避免继续请求楼层数据。
|
|
545
|
+
isLeaf: isVenueBuild(build.build_type) || props.display == 2,
|
|
543
546
|
disabled : props.isdisabledNumber ? ( props.isdisabledNumber == 2 ? false : true ) : false,
|
|
544
547
|
};
|
|
545
|
-
const match = regExp.exec(build.build_name);
|
|
548
|
+
const match = isVenueBuild(build.build_type) ? null : regExp.exec(build.build_name);
|
|
546
549
|
if (match) {
|
|
547
550
|
const group1 = match[1]; // 提取"数字栋"
|
|
548
551
|
if (group1.length >= 2 && build.build_name.slice(group1.length).length > 0) {
|