详情页技术文档添加暂无上传提示
This commit is contained in:
parent
4774431110
commit
617373eb8e
|
@ -65,6 +65,7 @@
|
|||
|
||||
<script setup>
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { pinyin } from 'pinyin-pro'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
let dataFrom = ref({
|
||||
|
@ -184,12 +185,19 @@
|
|||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '技术文档'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
// console.log('dataFrom.value.link', obj.attrValue)
|
||||
if (obj) {
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
} else {
|
||||
message.config({
|
||||
top: '100px', // 距离顶部的位置
|
||||
})
|
||||
message.error('暂无上传技术文档')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
<!-- 使用方式 -->
|
||||
<div class="usage-mode" v-if="flag">
|
||||
<div class="tltle">
|
||||
<DetalsTitle :title="dataFrom.title" :type="dataFrom.englishTitle"></DetalsTitle>
|
||||
<DetalsTitle
|
||||
:title="dataFrom.title"
|
||||
:type="dataFrom.englishTitle"
|
||||
></DetalsTitle>
|
||||
</div>
|
||||
<div class="content" v-for="item in dataFrom.content" :key="item.title">
|
||||
<div class="content-left">
|
||||
|
@ -87,6 +90,7 @@
|
|||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { pinyin } from 'pinyin-pro'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
let dataFrom = ref({
|
||||
title: '使用方式',
|
||||
englishTitle: 'USAGE',
|
||||
|
@ -202,12 +206,18 @@ function technical() {
|
|||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '技术文档'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
if (obj) {
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
} else {
|
||||
message.config({
|
||||
top: '100px', // 距离顶部的位置
|
||||
})
|
||||
message.error('暂无上传技术文档')
|
||||
}
|
||||
}
|
||||
function technicalNew() {
|
||||
// 拼接路径
|
||||
|
@ -221,11 +231,18 @@ function technicalNew() {
|
|||
(item) => item.attrType === '使用手册'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
if (obj) {
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
} else {
|
||||
message.config({
|
||||
top: '100px', // 距离顶部的位置
|
||||
})
|
||||
message.error('暂无上传使用手册')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -243,7 +260,8 @@ function technicalNew() {
|
|||
.content-left {
|
||||
height: 1.5rem;
|
||||
width: 6.2rem;
|
||||
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png') no-repeat;
|
||||
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
|
||||
no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 0.1rem;
|
||||
|
@ -309,7 +327,8 @@ function technicalNew() {
|
|||
.content-right {
|
||||
height: 1.5rem;
|
||||
width: 6.2rem;
|
||||
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png') no-repeat;
|
||||
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
|
||||
no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 0.1rem;
|
||||
|
|
|
@ -8,7 +8,12 @@
|
|||
<template>
|
||||
<div class="business-navigation" v-if="navList.length > 0">
|
||||
<template v-for="nav in navList" :key="nav.key">
|
||||
<div class="nav" :class="{ select: nav.key == select }" v-if="nav.show" @click="selectNav(nav.key)">
|
||||
<div
|
||||
class="nav"
|
||||
:class="{ select: nav.key == select }"
|
||||
v-if="nav.show"
|
||||
@click="selectNav(nav.key)"
|
||||
>
|
||||
{{ nav.name }}
|
||||
<span class="line"></span>
|
||||
</div>
|
||||
|
@ -215,12 +220,11 @@ watch(
|
|||
item.show = true
|
||||
}
|
||||
})
|
||||
if (list.value.length > 0) {
|
||||
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
|
||||
select.value = navList.value.filter(
|
||||
(item) => item.name === list.value[0]
|
||||
)[0].key
|
||||
}
|
||||
console.log('11111111111111111111111111', list.value, navList.value)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
|
||||
<script setup>
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { pinyin } from 'pinyin-pro'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
let dataFrom = ref({
|
||||
|
@ -213,12 +214,18 @@
|
|||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '技术文档'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
if (obj) {
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
} else {
|
||||
message.config({
|
||||
top: '100px', // 距离顶部的位置
|
||||
})
|
||||
message.error('暂无上传技术文档')
|
||||
}
|
||||
}
|
||||
function technicalNew() {
|
||||
// 拼接路径
|
||||
|
@ -231,12 +238,18 @@
|
|||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '使用手册'
|
||||
)[0]
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
if (obj) {
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
'hisense_office/onlinePreview?url=' +
|
||||
btoa(encodeURI(obj.attrValue))
|
||||
)
|
||||
} else {
|
||||
message.config({
|
||||
top: '100px', // 距离顶部的位置
|
||||
})
|
||||
message.error('暂上传使用手册')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue