|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
+ <view class="device-type-modal">
|
|
|
<scroll-view>
|
|
|
<!-- 通风设备 -->
|
|
|
<view v-for="(typeitem, index) in typeList" :key="index">
|
|
@@ -55,6 +55,25 @@ export default {
|
|
|
dot: {
|
|
|
mailHome: false,
|
|
|
},
|
|
|
+ iconMap: {
|
|
|
+ gate: "/static/sidebar/ventS/gate.svg",
|
|
|
+ window: "/static/sidebar/ventS/window.svg",
|
|
|
+ windrect: "/static/sidebar/ventS/windrect.svg",
|
|
|
+ fanmain: "/static/sidebar/ventS/fanmain.svg",
|
|
|
+ fanlocal: "/static/sidebar/ventS/fanlocal.svg",
|
|
|
+ drilling: "/static/sidebar/gasS/drilling.svg",
|
|
|
+ gasmonitor: "/static/sidebar/gasS/gasmonitor.svg",
|
|
|
+ pump: "/static/sidebar/gasS/pump.svg",
|
|
|
+ unit: "/static/sidebar/gasS/unit.svg",
|
|
|
+ dusting: "/static/sidebar/dustS/dusting.svg",
|
|
|
+ spray: "/static/sidebar/dustS/spray.svg",
|
|
|
+ bundletube: "/static/sidebar/fireS/bundletube.svg",
|
|
|
+ fiber: "/static/sidebar/fireS/fiber.svg",
|
|
|
+ nitrogen: "/static/sidebar/fireS/nitrogen.svg",
|
|
|
+ obfurage: "/static/sidebar/fireS/obfurage.svg",
|
|
|
+ pulping: "/static/sidebar/fireS/pulping.svg",
|
|
|
+ atomizing: "/static/sidebar/dustS/atomizing.svg",
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -86,37 +105,26 @@ export default {
|
|
|
goPage(page) {
|
|
|
this.$emit("menuClick", page);
|
|
|
},
|
|
|
-
|
|
|
getIcon(itemValue) {
|
|
|
- const iconMap = {
|
|
|
- gate: "/static/sidebar/ventS/gate.svg",
|
|
|
- window: "/static/sidebar/ventS/window.svg",
|
|
|
- windrect: "/static/sidebar/ventS/windrect.svg",
|
|
|
- fanmain: "/static/sidebar/ventS/fanmain.svg",
|
|
|
- fanlocal: "/static/sidebar/ventS/fanlocal.svg",
|
|
|
- drilling: "/static/sidebar/gasS/drilling.svg",
|
|
|
- gasmonitor: "/static/sidebar/gasS/gasmonitor.svg",
|
|
|
- pump: "/static/sidebar/gasS/pump.svg",
|
|
|
- unit: "/static/sidebar/gasS/unit.svg",
|
|
|
- dusting: "/static/sidebar/dustS/dusting.svg",
|
|
|
- spray: "/static/sidebar/dustS/spray.svg",
|
|
|
- bundletube: "/static/sidebar/fireS/bundletube.svg",
|
|
|
- fiber: "/static/sidebar/fireS/fiber.svg",
|
|
|
- nitrogen: "/static/sidebar/fireS/nitrogen.svg",
|
|
|
- obfurage: "/static/sidebar/fireS/obfurage.svg",
|
|
|
- pulping: "/static/sidebar/fireS/pulping.svg",
|
|
|
- atomizing: "/static/sidebar/dustS/atomizing.svg",
|
|
|
- };
|
|
|
- // 根据itemValue获取对应的图标路径,如果找不到对应关系则返回默认图标
|
|
|
- return iconMap[itemValue];
|
|
|
+ const defaultIconPath = "/static/sidebar/fireS/pulping.svg";
|
|
|
+
|
|
|
+ // 检查 iconMap 中是否存在对应的图标路径
|
|
|
+ if (itemValue && this.iconMap[itemValue]) {
|
|
|
+ return "/static/sidebar/" + itemValue + ".svg";
|
|
|
+ }
|
|
|
+ // 如果不存在对应的图标路径,则返回默认图标路径
|
|
|
+ return defaultIconPath;
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style scoped lang="scss">
|
|
|
+.device-type-modal {
|
|
|
+ margin-top: 30rpx;
|
|
|
+}
|
|
|
.cu-list.grid > .cu-item {
|
|
|
- padding: 0px 0px;
|
|
|
+ padding: 0rpx 0rpx;
|
|
|
background: linear-gradient(
|
|
|
to right,
|
|
|
rgba(55, 135, 254, 0.08),
|
|
@@ -125,15 +133,15 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
.line2-icon {
|
|
|
- width: 60px;
|
|
|
- height: 60px;
|
|
|
+ width: 60rpx;
|
|
|
+ height: 60rpx;
|
|
|
}
|
|
|
.icon {
|
|
|
position: absolute;
|
|
|
- top: 5px;
|
|
|
+ top: 5rpx;
|
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
+ width: 20rpx;
|
|
|
+ height: 20rpx;
|
|
|
}
|
|
|
</style>
|