|
@@ -1,19 +1,148 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="Device"></div>
|
|
|
|
|
|
|
+ <div class="Device" :class="{ DeviceNo: noInfo }">
|
|
|
|
|
+ <!-- 关闭按钮 -->
|
|
|
|
|
+ <div class="close" v-show="!noInfo">
|
|
|
|
|
+ <img
|
|
|
|
|
+ @click="$emit('closePage')"
|
|
|
|
|
+ src="../assets/images/close2.png"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="main" v-show="!noInfo">
|
|
|
|
|
+ <!-- 标题 -->
|
|
|
|
|
+ <div class="title">
|
|
|
|
|
+ <img src="../assets/images/logo.png" alt="" />
|
|
|
|
|
+ <div class="xian"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="titleTxt">Equipment</div>
|
|
|
|
|
+ <!-- 设备列表 -->
|
|
|
|
|
+ <div class="forBox">
|
|
|
|
|
+ <div class="noneInfo0" v-show="isAllNoFu">No Information</div>
|
|
|
|
|
+ <div class="noneInfo1" v-if="!data.length">No Information</div>
|
|
|
|
|
+ <div class="one" v-for="item1 in data" :key="item1.id" v-else>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="oneName"
|
|
|
|
|
+ v-show="
|
|
|
|
|
+ item1.children && item1.children.length && isInfo(item1.children)
|
|
|
|
|
+ "
|
|
|
|
|
+ :title="item1.name"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item1.name }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="noneInfo2"
|
|
|
|
|
+ v-if="!(item1.children && item1.children.length)"
|
|
|
|
|
+ >
|
|
|
|
|
+ No Information
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="tow"
|
|
|
|
|
+ v-for="item2 in item1.children"
|
|
|
|
|
+ :key="item2.id"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ >
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="towName"
|
|
|
|
|
+ v-show="item2.children && item2.children.length"
|
|
|
|
|
+ :title="item2.name"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item2.name }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="noneInfo2"
|
|
|
|
|
+ v-if="!(item2.children && item2.children.length)"
|
|
|
|
|
+ >
|
|
|
|
|
+ No Information
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="three"
|
|
|
|
|
+ v-for="item3 in item2.children"
|
|
|
|
|
+ :key="item3.id"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ @click="downFu(item3)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img src="../assets/images/group.png" alt="" />
|
|
|
|
|
+ <div class="threeName" :title="item3.name">{{ item3.name }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- a标签的下载 -->
|
|
|
|
|
+ <a :href="doHref" download target="_blank" id="aref" ref="doHref"></a>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 没有手册的消息 -->
|
|
|
|
|
+ <div class="noInfoBox" :class="{ noInfoBoxAc: noInfo }">
|
|
|
|
|
+ <div class="noClose">
|
|
|
|
|
+ <img @click="noInfo = false" src="../assets/images/close2.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="noLogo">
|
|
|
|
|
+ <img src="../assets/images/logo.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="noTxt1">Lead-Form submitted</div>
|
|
|
|
|
+ <div class="noTxt2">Local sales will contact you</div>
|
|
|
|
|
+ <div class="noInco">
|
|
|
|
|
+ <img src="../assets/images/noInco.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+const baseUrl =
|
|
|
|
|
+ process.env.NODE_ENV === "development" ? "https://haidebao.4dage.com" : "";
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
name: "Device",
|
|
name: "Device",
|
|
|
components: {},
|
|
components: {},
|
|
|
data() {
|
|
data() {
|
|
|
- return {};
|
|
|
|
|
|
|
+ return {
|
|
|
|
|
+ doHref: "",
|
|
|
|
|
+ data: [],
|
|
|
|
|
+ noInfo: false,
|
|
|
|
|
+ isAllNoFu: true,
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
computed: {},
|
|
computed: {},
|
|
|
watch: {},
|
|
watch: {},
|
|
|
- methods: {},
|
|
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ // 点击下载手册
|
|
|
|
|
+ async downFu(item) {
|
|
|
|
|
+ // console.log(123, item);
|
|
|
|
|
+ if (!item.filePath) return (this.noInfo = true);
|
|
|
|
|
+ this.doHref = baseUrl + item.filePath;
|
|
|
|
|
+ await this.$http.get(`${baseUrl}/api/show/visit/product/${item.id}`);
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$refs.doHref.click();
|
|
|
|
|
+ }, 20);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 判断类别下面是否有操作手册
|
|
|
|
|
+ isInfo(val) {
|
|
|
|
|
+ // console.log(val);
|
|
|
|
|
+ const flag = val.some((v) => v.children);
|
|
|
|
|
+ return flag;
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
created() {},
|
|
created() {},
|
|
|
- mounted() {},
|
|
|
|
|
|
|
+ async mounted() {
|
|
|
|
|
+ const res = await (
|
|
|
|
|
+ await this.$http.get(`${baseUrl}/api/show/product/getTree`)
|
|
|
|
|
+ ).data;
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ res.data.forEach((v1) => {
|
|
|
|
|
+ if (v1.children && v1.children.length) {
|
|
|
|
|
+ v1.children.forEach((v2) => {
|
|
|
|
|
+ if (v2.children && v2.children.length) {
|
|
|
|
|
+ this.isAllNoFu = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ this.data = res.data;
|
|
|
|
|
+ // 获取设备列表
|
|
|
|
|
+ },
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
|
beforeMount() {}, //生命周期 - 挂载之前
|
|
beforeMount() {}, //生命周期 - 挂载之前
|
|
|
beforeUpdate() {}, //生命周期 - 更新之前
|
|
beforeUpdate() {}, //生命周期 - 更新之前
|
|
@@ -24,4 +153,202 @@ export default {
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
<style lang='less' scoped>
|
|
|
|
|
+.Device {
|
|
|
|
|
+ .aref {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 50%;
|
|
|
|
|
+ left: 50%;
|
|
|
|
|
+ width: 660px;
|
|
|
|
|
+ height: 760px;
|
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
|
+ border-top: 10px solid #00a0e6;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ .close {
|
|
|
|
|
+ padding: 20px 20px 0 0;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ & > img {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .main {
|
|
|
|
|
+ padding-left: 40px;
|
|
|
|
|
+ height: calc(100% - 80px);
|
|
|
|
|
+ .title {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ & > img {
|
|
|
|
|
+ width: 247px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .xian {
|
|
|
|
|
+ width: 200px;
|
|
|
|
|
+ height: 2px;
|
|
|
|
|
+ background-color: #1f3e7c;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ &::before {
|
|
|
|
|
+ content: "";
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ top: -3px;
|
|
|
|
|
+ width: 8px;
|
|
|
|
|
+ height: 8px;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ background-color: #1f3e7c;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .titleTxt {
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ font-size: 30px;
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ margin: 10px 0 0px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .forBox {
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding-right: 40px;
|
|
|
|
|
+ width: 620px;
|
|
|
|
|
+ height: calc(100% - 100px);
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+ &::-webkit-scrollbar {
|
|
|
|
|
+ /*滚动条整体样式*/
|
|
|
|
|
+ width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
|
|
|
|
|
+ height: 1px;
|
|
|
|
|
+ }
|
|
|
|
|
+ &::-webkit-scrollbar-thumb {
|
|
|
|
|
+ /*滚动条里面小方块*/
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ -webkit-box-shadow: inset 0 0 5px transparent;
|
|
|
|
|
+ background: #00a0e6;
|
|
|
|
|
+ }
|
|
|
|
|
+ &::-webkit-scrollbar-track {
|
|
|
|
|
+ /*滚动条里面轨道*/
|
|
|
|
|
+ -webkit-box-shadow: inset 0 0 5px transparent;
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ }
|
|
|
|
|
+ div {
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ }
|
|
|
|
|
+ .one {
|
|
|
|
|
+ margin-top: 15px;
|
|
|
|
|
+ .oneName {
|
|
|
|
|
+ padding: 0 5px;
|
|
|
|
|
+ line-height: 36px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 36px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ word-wrap: break-word;
|
|
|
|
|
+ background-image: linear-gradient(
|
|
|
|
|
+ to right,
|
|
|
|
|
+ #1f3e7c,
|
|
|
|
|
+ rgba(31, 62, 124, 0.2)
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ .tow {
|
|
|
|
|
+ .towName {
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ word-wrap: break-word;
|
|
|
|
|
+ margin-top: 15px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ color: #1f3e7c;
|
|
|
|
|
+ }
|
|
|
|
|
+ .three {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ & > img {
|
|
|
|
|
+ margin-right: 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .threeName {
|
|
|
|
|
+ width: calc(100% - 20px);
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ word-wrap: break-word;
|
|
|
|
|
+ color: #00a0e6;
|
|
|
|
|
+ text-decoration-line: underline;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .noneInfo0 {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 80%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ color: #1f3e7c;
|
|
|
|
|
+ }
|
|
|
|
|
+ .noneInfo1 {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .noneInfo2 {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .noInfoBox {
|
|
|
|
|
+ border-top: 10px solid #00a0e6;
|
|
|
|
|
+ opacity: 0;
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 50%;
|
|
|
|
|
+ left: 50%;
|
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
|
+ z-index: 9999;
|
|
|
|
|
+ width: 480px;
|
|
|
|
|
+ height: 560px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ .noClose {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ padding: 20px 20px 0 0;
|
|
|
|
|
+ height: 36px;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ }
|
|
|
|
|
+ .noLogo {
|
|
|
|
|
+ margin: 20px 0 100px 0;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
|
|
+ .noTxt1 {
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #1f3e7c;
|
|
|
|
|
+ font-size: 30px;
|
|
|
|
|
+ margin-bottom: 25px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
|
|
+ .noTxt2 {
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ color: #00a0e6;
|
|
|
|
|
+ font-size: 30px;
|
|
|
|
|
+ margin-bottom: 50px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .noInco {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .noInfoBoxAc {
|
|
|
|
|
+ opacity: 1;
|
|
|
|
|
+ pointer-events: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.DeviceNo {
|
|
|
|
|
+ border-top: none;
|
|
|
|
|
+ background-color: transparent;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|