修改显示

master
suixy 17 hours ago
parent fd3277c342
commit 1f04de6d40

@ -11,22 +11,33 @@
<!-- </div>-->
<el-table
:data="data.fileList"
class="fileTable"
style="width: 100%">
<el-table-column
prop="name"
width="300"
label="文件名称">
</el-table-column>
<el-table-column
prop="value"
label="文件介绍">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="200">
label="产品说明书">
<template slot-scope="scope">
<el-button @click="downFile(scope.row)" type="text" size="small">下载</el-button>
<div class="fileCell" v-if="hasFile(scope.row.manual)">
<div class="fileName" @click="downFile(scope.row.manual)">{{ scope.row.manual.fileName || scope.row.manual.name }}</div>
</div>
<span v-else class="emptyFile">暂无文件</span>
</template>
</el-table-column>
<el-table-column
label="通讯协议">
<template slot-scope="scope">
<div class="fileCell" v-if="hasFile(scope.row.protocol)">
<div class="fileName" @click="downFile(scope.row.protocol)">{{ scope.row.protocol.fileName || scope.row.protocol.name }}</div>
</div>
<span v-else class="emptyFile">暂无文件</span>
</template>
</el-table-column>
<el-table-column
label="其他">
<template slot-scope="scope">
<div class="fileCell" v-if="hasFile(scope.row.other)">
<div class="fileName" @click="downFile(scope.row.other)">{{ scope.row.other.fileName || scope.row.other.name }}</div>
</div>
<span v-else class="emptyFile">暂无文件</span>
</template>
</el-table-column>
</el-table>
@ -64,6 +75,9 @@ export default {
mounted() {
},
methods: {
hasFile(file) {
return !!(file && file.uuid && (file.fileName || file.name || file.url))
},
async downFile(e) {
console.log(e)
getSecureDocumentAddress({documentId: e.uuid}).then(async (res) => {
@ -141,6 +155,50 @@ export default {
<style lang="less" scoped>
@import "~@/style.less";
.fileTable {
margin-top: 2vw;
/deep/ .el-table__header-wrapper th {
background-color: #eef4ff;
color: #1f3f74;
font-size: 1vw;
font-weight: 600;
letter-spacing: 1px;
}
/deep/ .el-table__body td {
padding: 1vw 0;
}
}
.fileCell {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 2.4vw;
}
.fileName {
min-width: 0;
flex: 1 1 auto;
padding-right: 1vw;
overflow: hidden;
color: @standard-color;
font-size: 0.9vw;
line-height: 1.4vw;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
&:hover {
text-decoration: underline;
}
}
.emptyFile {
color: #999;
font-size: 0.9vw;
}
.fileCard {
vertical-align: top;
@ -190,5 +248,3 @@ export default {
}
}
</style>

@ -7,62 +7,20 @@
<el-input @keyup.enter.native="onSubmit" style="width: 100%" v-model="form.keyword" placeholder="搜索内容">
<i slot="suffix" class="el-input__icon el-icon-search" @click="onSubmit"></i>
</el-input>
<div style="width: 100%;text-align: center;font-size: 1.4vw;line-height: 3vw;font-weight: 600">{{
(list.length + list1.length) || 0
<div class="resultCount">{{
results.length || 0
}}个相关结果
</div>
<div class="container" v-if="list.length > 0">
<div class="tabs">
<div class="content">
<div @click="checkTabs(k)"
style="width:calc(50% - 2px - 4vw);white-space: nowrap;overflow: auto;text-align: center"
:class="`tab ${tabsActive == k ? 'active':''}`" v-for="(i,k) in ['行业方案','产品中心']">
{{ i }}
</div>
</div>
</div>
<div class="classify" v-if="tabsActive == 0">
<div class="item" v-for="i in list" @click="toLink(i.link)">
<div class="img">
<el-image
fit="contain"
style="width: 100%;height: 10vw"
:src="i.img"
></el-image>
</div>
<div class="itemTime">
{{ i.time }}
</div>
<div class="itemTitle" v-html="i.snippet">
</div>
<div class="itemText">
{{ i.title }}
</div>
<div class="itemViewMore">
查看详情
</div>
</div>
</div>
<div class="classify" v-if="tabsActive == 1">
<div class="item" v-for="i in list1" @click="toLink1(i.link)">
<div class="img">
<el-image
fit="contain"
style="width: 100%;height: 10vw"
:src="i.img"
></el-image>
</div>
<div class="itemTime">
{{ i.time }}
</div>
<div class="itemTitle" v-html="i.snippet">
</div>
<div class="itemText">
{{ i.title }}
</div>
<div class="itemViewMore">
查看详情
<div class="container" v-if="results.length > 0">
<div class="resultList">
<div class="resultItem" v-for="(i,k) in results" :key="k" @click="toResult(i)">
<div class="resultMeta">
<span class="source">{{ i.sourceName }}</span>
<span class="index">#{{ k + 1 }}</span>
</div>
<div class="resultTitle" v-html="i.snippet"></div>
<div class="resultText">{{ i.title }}</div>
<div class="itemViewMore">查看详情</div>
</div>
</div>
</div>
@ -77,26 +35,27 @@ export default {
return {
dialogVisible: false,
form: {},
list: [],
list1: [],
tabsActive: 0,
results: [],
}
},
methods: {
onSubmit() {
search(this.form).then(res => {
this.list = []
this.list1 = []
this.results = []
res.data?.rows?.forEach(e => {
if (e.sourceType === 'web1') {
this.list1.push({
this.results.push({
sourceType: e.sourceType,
sourceName: '产品中心',
snippet: e.snippet,
title: e.title,
link: e.title?.split('详情#')?.[1]?.split('-')
})
}
if (e.sourceType === 'web') {
this.list.push({
this.results.push({
sourceType: e.sourceType,
sourceName: '行业方案',
snippet: e.snippet,
title: e.title,
link: e.routeQuery?.id
@ -105,18 +64,16 @@ export default {
})
})
},
toLink(e) {
this.$router.push(`/test?id=${e}`)
toResult(item) {
if (item.sourceType === 'web1') {
if (!item.link || item.link.length < 3) return
this.$router.push(`/productCenter/detail?type=${item.link[0]}&typeId=${item.link[1]}&id=${item.link[2]}`)
} else {
if (!item.link) return
this.$router.push(`/test?id=${item.link}`)
}
this.dialogVisible = false
},
toLink1(e) {
this.$router.push(`/productCenter/detail?type=${e[0]}&typeId=${e[1]}&id=${e[2]}`)
this.dialogVisible = false
},
checkTabs(k) {
console.log(k)
this.tabsActive = k
},
},
mounted() {
},
@ -135,124 +92,94 @@ export default {
.container {
width: calc(100% - 40px);
background-color: #0001;
background-color: #f5f8ff;
height: calc(80vh - 125px - 3vw);
padding: 0 20px;
overflow: auto;
}
.resultCount {
width: 100%;
text-align: center;
font-size: 1.4vw;
line-height: 3vw;
font-weight: 600;
}
em {
color: red;
background: yellow;
font-style: normal;
}
.classify {
.resultList {
padding: 1vw 0;
}
.resultItem {
position: relative;
margin-bottom: 0.8vw;
padding: 1vw 1.2vw;
background-color: #fff;
border-left: 3px solid transparent;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
cursor: pointer;
transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
.classifyName {
background-color: #eee;
position: sticky;
top: 0;
color: #42b983;
font-size: 1.2vw;
line-height: 4vw;
}
.item {
display: inline-block;
width: calc(25% - 2vw);
margin-right: 2vw;
margin-bottom: 2vw;
background-color: #fff;
//border-bottom: 1px solid #ddd;
cursor: pointer;
&:hover {
.itemViewMore {
color: @standard-color;
}
}
.itemTime {
line-height: 3vw;
font-size: 0.8vw;
font-weight: bold;
color: #0006;
}
&:hover {
border-left-color: @standard-color;
box-shadow: 0 8px 18px rgba(51, 114, 254, 0.12);
transform: translateX(0.2vw);
.itemViewMore {
line-height: 3vw;
font-size: 0.8vw;
font-weight: bold;
color: #0006;
}
.itemTitle {
line-height: 1.8vw;
font-size: 1vw;
font-weight: bold;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
/deep/ em {
color: #42b983;
font-style: normal;
}
}
.itemText {
width: 100%;
font-size: 0.8vw;
}
}
}
.tabs {
cursor: pointer;
bottom: 0;
width: 100%;
white-space: nowrap;
.content {
width: 100%;
position: relative;
left: 50%;
bottom: 0;
transform: translateX(-50%);
.tab {
display: inline-block;
line-height: 6.2vw;
letter-spacing: 3px;
font-size: 1vw;
position: relative;
padding: 0 2vw;
&:last-child::after {
display: none;
}
&::after {
content: '';
position: absolute;
right: 0;
width: 1px;
height: 1vw;
background-color: #409eff;
top: calc(50% - 0.5vw);
}
}
.tab.active {
color: @standard-color;
//border: 1px solid #fff6;
//box-shadow: 0 0 3px #0002;
}
}
}
</style>
.resultMeta {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.6vw;
color: #0006;
font-size: 0.8vw;
}
.source {
color: @standard-color;
font-weight: 600;
}
.resultTitle {
display: -webkit-box;
overflow: hidden;
color: #111;
font-size: 1vw;
font-weight: 600;
line-height: 1.6vw;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
/deep/ em {
color: @standard-color;
background-color: rgba(51, 114, 254, 0.12);
font-style: normal;
}
}
.resultText {
width: 100%;
margin-top: 0.5vw;
color: #666;
font-size: 0.85vw;
line-height: 1.4vw;
}
.itemViewMore {
margin-top: 0.7vw;
color: #0006;
font-size: 0.8vw;
font-weight: bold;
}
</style>

@ -0,0 +1,258 @@
<template>
<div>
<div class="searchBtn">
<el-button @click="dialogVisible = true" size="small" icon="el-icon-search" circle></el-button>
</div>
<el-dialog top="5vh" width="80%" :append-to-body="true" title="搜索" :visible.sync="dialogVisible">
<el-input @keyup.enter.native="onSubmit" style="width: 100%" v-model="form.keyword" placeholder="搜索内容">
<i slot="suffix" class="el-input__icon el-icon-search" @click="onSubmit"></i>
</el-input>
<div style="width: 100%;text-align: center;font-size: 1.4vw;line-height: 3vw;font-weight: 600">{{
(list.length + list1.length) || 0
}}个相关结果
</div>
<div class="container" v-if="list.length > 0">
<div class="tabs">
<div class="content">
<div @click="checkTabs(k)"
style="width:calc(50% - 2px - 4vw);white-space: nowrap;overflow: auto;text-align: center"
:class="`tab ${tabsActive == k ? 'active':''}`" v-for="(i,k) in ['行业方案','产品中心']">
{{ i }}
</div>
</div>
</div>
<div class="classify" v-if="tabsActive == 0">
<div class="item" v-for="i in list" @click="toLink(i.link)">
<div class="img">
<el-image
fit="contain"
style="width: 100%;height: 10vw"
:src="i.img"
></el-image>
</div>
<div class="itemTime">
{{ i.time }}
</div>
<div class="itemTitle" v-html="i.snippet">
</div>
<div class="itemText">
{{ i.title }}
</div>
<div class="itemViewMore">
查看详情
</div>
</div>
</div>
<div class="classify" v-if="tabsActive == 1">
<div class="item" v-for="i in list1" @click="toLink1(i.link)">
<div class="img">
<el-image
fit="contain"
style="width: 100%;height: 10vw"
:src="i.img"
></el-image>
</div>
<div class="itemTime">
{{ i.time }}
</div>
<div class="itemTitle" v-html="i.snippet">
</div>
<div class="itemText">
{{ i.title }}
</div>
<div class="itemViewMore">
查看详情
</div>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import {search} from '@/api/search'
export default {
data() {
return {
dialogVisible: false,
form: {},
list: [],
list1: [],
tabsActive: 0,
}
},
methods: {
onSubmit() {
search(this.form).then(res => {
this.list = []
this.list1 = []
res.data?.rows?.forEach(e => {
if (e.sourceType === 'web1') {
this.list1.push({
snippet: e.snippet,
title: e.title,
link: e.title?.split('详情#')?.[1]?.split('-')
})
}
if (e.sourceType === 'web') {
this.list.push({
snippet: e.snippet,
title: e.title,
link: e.routeQuery?.id
})
}
})
})
},
toLink(e) {
this.$router.push(`/test?id=${e}`)
this.dialogVisible = false
},
toLink1(e) {
this.$router.push(`/productCenter/detail?type=${e[0]}&typeId=${e[1]}&id=${e[2]}`)
this.dialogVisible = false
},
checkTabs(k) {
console.log(k)
this.tabsActive = k
},
},
mounted() {
},
}
</script>
<style scoped lang="less">
@import "~@/style.less";
.searchBtn {
position: absolute;
top: 50%;
right: 20px;
transform: translateY(-50%);
z-index: 9;
}
.container {
width: calc(100% - 40px);
background-color: #0001;
height: calc(80vh - 125px - 3vw);
padding: 0 20px;
overflow: auto;
}
em {
color: red;
background: yellow;
font-style: normal;
}
.classify {
position: relative;
.classifyName {
background-color: #eee;
position: sticky;
top: 0;
color: #42b983;
font-size: 1.2vw;
line-height: 4vw;
}
.item {
display: inline-block;
width: calc(25% - 2vw);
margin-right: 2vw;
margin-bottom: 2vw;
background-color: #fff;
//border-bottom: 1px solid #ddd;
cursor: pointer;
&:hover {
.itemViewMore {
color: @standard-color;
}
}
.itemTime {
line-height: 3vw;
font-size: 0.8vw;
font-weight: bold;
color: #0006;
}
.itemViewMore {
line-height: 3vw;
font-size: 0.8vw;
font-weight: bold;
color: #0006;
}
.itemTitle {
line-height: 1.8vw;
font-size: 1vw;
font-weight: bold;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
/deep/ em {
color: #42b983;
font-style: normal;
}
}
.itemText {
width: 100%;
font-size: 0.8vw;
}
}
}
.tabs {
cursor: pointer;
bottom: 0;
width: 100%;
white-space: nowrap;
.content {
width: 100%;
position: relative;
left: 50%;
bottom: 0;
transform: translateX(-50%);
.tab {
display: inline-block;
line-height: 6.2vw;
letter-spacing: 3px;
font-size: 1vw;
position: relative;
padding: 0 2vw;
&:last-child::after {
display: none;
}
&::after {
content: '';
position: absolute;
right: 0;
width: 1px;
height: 1vw;
background-color: #409eff;
top: calc(50% - 0.5vw);
}
}
.tab.active {
color: @standard-color;
//border: 1px solid #fff6;
//box-shadow: 0 0 3px #0002;
}
}
}
</style>

@ -13,7 +13,7 @@
<div class="FloatingWindow">
<div class="item mailAn">
<i class="el-icon-message" style="color:#fff;font-size: 20px"></i>
<div class="mail">hwwlxxxxxxxx@xxxx.con</div>
<div class="mail">market@highwayiot.com</div>
</div>
<div class="item">
<img :src="qrcode" alt="" width="30px" height="30px" style="vertical-align: middle;">

@ -25,6 +25,12 @@
</div>
<br v-if="k === 3"/>
</template>
<div class="productItem moreItem" @click="toProductCenter" v-if="data.length<8">
<div class="moreIcon">
<i class="el-icon-plus"></i>
</div>
<div class="moreText">查看更多</div>
</div>
</div>
</div>
</template>
@ -91,6 +97,9 @@ export default {
this.$router.push(`/productCenter/detail?type=${e.linkData[0]}&typeId=${e.linkData[1]}&id=${e.linkData[2]}`)
console.log(e.configTypeId)
},
toProductCenter() {
this.$router.push('/productCenter')
},
getData() {
// getPortalConfigTypeList({
// configTypeClassfication:1,
@ -177,7 +186,8 @@ export default {
.titleArea {
width: 100%;
height: calc(100% - 14.5vw);
//height: calc(100% - 14.5vw);
height: 7vw;
text-align: center;
background-color: #d8eaff;
transition: all 0.2s;
@ -225,5 +235,43 @@ export default {
}
}
}
.moreItem {
vertical-align: top;
background-color: #f7fbff;
box-shadow: none;
cursor: pointer;
text-align: center;
transition: all 0.2s;
height: 26vw;
.moreIcon {
width: 5vw;
height: 5vw;
margin: 6vw auto 1.6vw;
border-radius: 50%;
background-color: fade(@standard-color, 10);
color: @standard-color;
line-height: 5vw;
font-size: 2vw;
transition: all 0.2s;
}
.moreText {
color: @standard-color;
font-size: 1.4vw;
letter-spacing: 2px;
}
&:hover {
border-color: @standard-color;
background-color: #eef5ff;
.moreIcon {
background-color: @standard-color;
color: #fff;
}
}
}
}
</style>

@ -11,7 +11,7 @@
<div class="content">
<div @click="checkTabs(i,k)"
style="white-space: nowrap;overflow: auto"
:style="{width:`calc(${widthArr[k]}% - 2vw)`,fontSize:`${tabsFontSize}vw`}"
:style="{width:`calc(${widthArr[k]}% - 2vw)`,fontSize:`${1.6 || tabsFontSize}vw`}"
:class="`tab ${tabsActive == i.id ? 'active':''}`" v-for="(i,k) in tabsData">
{{ i.title }}
</div>
@ -137,28 +137,28 @@ export default {
],
tabsData: [
{
title: '成品胎RFID全生命周期',
title: '轮胎RFID',
value: '智能轮胎介绍',
info: '智能轮胎信息',
img: img1,
id: '5'
},
{
title: '工厂制造-RFID全流程管理',
title: '工厂RFID管理',
value: '轮胎工厂介绍',
info: '轮胎工厂信息',
img: img2,
id: '18'
},
{
title: 'RFID包裹分拣',
title: '包裹分拣',
value: '快递物流介绍',
info: '快递物流信息',
img: img3,
id: '19'
},
{
title: '工厂制造-仓储物流',
title: '工厂仓储物流',
value: '畜牧食品介绍',
info: '在畜牧屠宰行业RFID助力车间自动化智能化生产合作客户包括双汇、正大、牧原等',
img: img4,
@ -172,14 +172,14 @@ export default {
id: '21'
},
{
title: '智能制造物联网',
title: '工厂物联网',
value: '智能制造介绍',
info: '智能制造信息',
img: img6,
id: '22'
},
{
title: '信息化数据平台',
title: '信息化平台',
value: '工业物联介绍',
info: '工业物联信息',
img: img5,
@ -245,7 +245,7 @@ export default {
length += this.getTextWidth(item.title)
})
return this.tabsData.map(item => {
return (this.getTextWidth(item.title) / length) * 100
return (this.getTextWidth(item.title) / length) * 85
})
},
activeTab: function () {
@ -373,7 +373,8 @@ export default {
top: 0;
margin-top: calc(-3px);
width: calc(100% - 2px);
height: calc(4.405vw - 2px);
//height: calc(4.405vw - 2px);
height: calc(6.405vw - 2px);
white-space: nowrap;
//background: linear-gradient(to bottom, fade(@standard-color, 10), fade(#fff, 10));
background: linear-gradient(to bottom, #e7efff, #f6faff);
@ -385,8 +386,8 @@ export default {
.content {
width: 100vw;
position: relative;
left: 19%;
left: 0%;
left: 7.5%;
//left: 0%;
bottom: 0;
text-align: left;
//transform: translateX(-50%);
@ -394,7 +395,8 @@ export default {
.tab {
cursor: pointer;
display: inline-block;
line-height: 4.2vw;
//line-height: 4.2vw;
line-height: 6.2vw;
letter-spacing: 3px;
font-size: 1.6vw;
position: relative;

@ -11,7 +11,7 @@
<div class="content">
<div @click="checkTabs(i,k)"
style="white-space: nowrap;overflow: auto;text-align: center"
:style="{width:`calc(${100 / tabsData.length}% - 2vw)`}"
:style="{width:`calc(${85 / tabsData.length}% - 2vw)`}"
:class="`tab ${tabsActive == i.webMenuId ? 'active':''}`" v-for="(i,k) in tabsData">
{{ i.webMenuName }}
</div>
@ -204,6 +204,7 @@ export default {
.content {
width: 100%;
position: relative;
left: 7.5%;
//left: 19%;
bottom: 0;
text-align: left;

@ -1,6 +1,6 @@
<template>
<div class="probg">
<div class="title">
<div class="title">
<span>
{{ data.name }}
</span>

Loading…
Cancel
Save