Commit bd781487 authored by zhanglw's avatar zhanglw

询价记录

parent 09303bef
......@@ -54,12 +54,20 @@ export const constantRouterMap = [
},
{
path: '/product/details/:id',
meta: { title: '供应商黄页', noCache: true },
meta: { title: '产品详情', noCache: true },
component: (resolve) => {
return require(['@/views/homepage/product/details'], resolve)
},
hidden: true
},
{
path: '/product/hardware/:type',
meta: { title: '硬件产品', noCache: true },
component: (resolve) => {
return require(['@/views/homepage/product/hardware'], resolve)
},
hidden: true
},
{
path: '/supplier',
meta: { title: '优质供应商', noCache: true },
......@@ -188,6 +196,22 @@ export const constantRouterMap = [
},
hidden: true
},
{
path: '/console/replyLog',
meta: { title: '个人中心-被询价记录', noCache: true },
component: (resolve) => {
return require(['@/views/homepage/console/replyLog'], resolve)
},
hidden: true
},
{
path: '/console/askLog',
meta: { title: '个人中心-询价记录', noCache: true },
component: (resolve) => {
return require(['@/views/homepage/console/askLog'], resolve)
},
hidden: true
},
{
path: '/backstage',
component: Layout,
......
......@@ -118,20 +118,6 @@ export default {
})
this.loadData()
})
},
changeEnabled(data, val) {
this.$confirm('此操作将 "' + this.dict.label.user_status[val] + '" ' + data.username + ', 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).catch(() => {
data.enabled = !data.enabled
})
},
toAdd() {
},
toView(item) {
this.$refs.viewPage.loadData(item.informationId)
......
......@@ -5,7 +5,7 @@
<span>供应</span>
</div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='1'?'active':''" @click="menuClick('/console/product')">产品管理</span></div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='2'?'active':''" @click="menuClick('/home')">被询价记录</span></div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='2'?'active':''" @click="menuClick('/console/replyLog')">被询价记录</span></div>
<el-divider />
<div class="vertical-menu-title">
<img src="@/assets/home_images/mark_pro.png">
......@@ -13,7 +13,7 @@
</div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='3'?'active':''" @click="menuClick('/console/collectPro')">收藏的产品</span></div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='4'?'active':''" @click="menuClick('/console/collectSup')">收藏的供应商</span></div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='5'?'active':''" @click="menuClick('/home')">询价记录</span></div>
<div class="vertical-menu-label touch"><span :class="menuIndex==='5'?'active':''" @click="menuClick('/console/askLog')">询价记录</span></div>
</div>
</template>
<script>
......
<template>
<div class="page-body">
<div class="head-box">
<div class="head-box-top">
<div class="top-call" />
<div class="top-call"><img src="@/assets/home_images/gemho_logo_b.png"></div>
<div class="top-call"><title-menus ref="titleMenus" menu-index="99" style="padding-top: 15px" /></div>
<div class="top-call"><user-login ref="userLogin" /></div>
<div class="top-call"><language-setting ref="languageSetting" /></div>
</div>
</div>
<div class="content-box">
<div style="width: 88%;padding-left: 9%;">
<el-row :gutter="20" style="padding-top: 10px">
<el-col :span="3">
<user-menus menu-index="5" />
</el-col>
<el-col :span="21" style="padding: 0 20px">
<!-- 表格 -->
<div class="content" style="padding-top: 4px">
<el-table id="dataTable" ref="dataTable" v-loading="loading" :data="tableData" border height="65vh" :header-cell-style="{background:'#F8F8F8',color:'#333'}" tooltip-effect="dark" @selection-change="handleSelectionChange">
<el-table-column type="index" width="55" label="序号" :index="indexMethod" />
<el-table-column prop="productName" label="询价产品" align="center" />
<el-table-column prop="productId" label="咨询内容" align="center" />
<el-table-column label="状态" align="center" width="120">
<template slot-scope="scope">
<div :style="'color:'+textColors[scope.row.status]">{{ dict.label.consult_status[scope.row.status] }}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="咨询日期" align="center" width="180" />
<el-table-column prop="handleTime" label="处理日期" align="center" width="180" />
</el-table>
<!--分页组件-->
<el-pagination :total="total" :current-page="page" :page-size="pageSize" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChange" @current-change="pageChange" />
</div>
</el-col>
</el-row>
</div>
</div>
<home-footer ref="homeFooter" />
<inquiry-view ref="inquiryView" />
<el-backtop />
</div>
</template>
<script>
import default_product from '@/assets/home_images/default_product.png'
import titleMenus from '../components/titleMenusV2'
import userLogin from '../components/userLoginV2'
import languageSetting from '../components/languageSettingV2'
import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView'
import userMenus from '../components/userMenus'
import { HttpReq } from '@/api/common'
export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, userMenus },
dicts: ['consult_status'],
data() {
return {
defaultImgProduct: default_product,
imgSrcStart: process.env.VUE_APP_BASE_API,
textColors: ['#ccc', '#00008b', '#F98052', '#bba'],
loading: false,
page: 1,
pageSize: 20,
total: 0,
query: {},
tableData: [],
multipleSelection: [],
tabIndex: '1',
throttle: null, // 节流器
throttleTime: 300
}
},
mounted() {
this.$nextTick(() => {
this.loadData()
})
},
methods: {
indexMethod(index) {
return 1 + index + this.page * this.pageSize - this.pageSize
},
tabChange(tabIndex) {
if (this.tabIndex === tabIndex) {
return
}
this.tabIndex = tabIndex
},
handleSelectionChange(val) {
this.multipleSelection = val
},
loadData() {
// 清除参数无值的情况
Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
})
HttpReq.backstageApi.queryInformation({
page: this.page - 1,
pageSize: this.pageSize,
...this.query
}).then((res) => {
this.tableData = res.data.data
this.total = res.data.total
})
},
batchOperate(type, row) {
if (!row && !this.multipleSelection.length) {
return this.$message({
message: '未选取数据',
type: 'info'
})
}
HttpReq.backstageApi.batchInformationProcessing({
ids: row ? [row.informationId] : this.multipleSelection.map(item => { return item.informationId })
}).then((res) => {
this.$notify({
title: res.msg,
type: res.code === 200 ? 'success' : 'error',
duration: 2500
})
this.loadData()
})
},
toAdd() {
this.$refs.addPage.loadData()
},
toEdit(item) {
this.$refs.editPage.loadData(item.productId)
},
toView(item) {
this.$refs.viewPage.loadData(item.productId)
},
toSearch() {
this.page = 1
this.loadData()
},
clearLimit() {
this.query = {}
this.loadData()
},
pageChange(e) {
this.page = e
this.loadData()
},
sizeChange(e) {
this.page = 1
this.pageSize = e
this.loadData()
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.touch {
cursor:pointer;
}
.clear {
clear: both
}
.inline-block {
display: inline-block;
}
.ellipsis {
// 多行溢出省略号
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
.pagination {
margin-top: 23px;
text-align: center;
padding: 10px;
display: flex;
justify-content: center;
align-items: center;
>>>.el-pagination.is-background .el-pager li {
font-style: normal;
font-weight: 400;
font-size: 14px;
text-align: center;
background-color: #fff;
color: #000000;
border: 1px solid #e5e5ea;
}
/* 激活后的样式 */
>>>.el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #ffffff;
color: #0366ed;
border: 1px solid #0366ed;
text-align: center;
}
/* 修改左右箭头样式 */
>>>.el-pagination .btn-next .el-icon, >>>.el-pagination .btn-prev .el-icon {
font-style: normal;
font-weight: 400;
font-size: 14px;
text-align: center;
background-color: #fff;
color: #e5e5ea;
border: 1px solid #e5e5ea;
}
>>>.el-pager {
height: 35.5px !important;
}
>>>.number, >>>.el-icon {
height: 35.5px !important;
line-height: 35.5px !important;
}
}
.head-box {
width: 100vw;
top: 0;
position: fixed;
background: none repeat scroll 0 0 white;
z-index: 999;
box-shadow: 0px 3px 7px 0px rgba(0,0,0,0.2);
.head-box-top {
display: flex;
justify-content: space-evenly;
align-items: center;
.top-call {
height: 80px;
padding-top: 15px;
}
}
}
.content-box {
min-height: 70vh;
margin-top: 94px;
font-family: Source Han Sans CN;
user-select: none;
>>>.el-table--mini {
font-size: 14px;
}
>>>.el-button--mini {
font-size: 14px;
}
}
.toolbar {
display: flex;
justify-content: space-between;
}
.content {
margin-top: 10px;
.table-btn {
display: inline-block;
margin: 0 10px;
color: #1791E7;
opacity: 0.8;
}
.table-btn:hover {
opacity: 1;
}
}
.tab-box {
margin: 20px 0;
width: 100%;
display: flex;
justify-content: flex-start;
border-bottom: 2px solid rgba(3,66,171,0.2);
.tab-item {
width: 120px;
padding-top: 10px;
padding-bottom: 8px;
text-align: center;
font-size: 14px;
color: #666;
}
.active {
background: rgba(183,210,248,0.25);
color: #1961C5;
border-bottom: 3px solid rgba(3,66,171,0.8);
}
}
</style>
<template>
<div class="page-body">
<div class="head-box">
<div class="head-box-top">
<div class="top-call" />
<div class="top-call"><img src="@/assets/home_images/gemho_logo_b.png"></div>
<div class="top-call"><title-menus ref="titleMenus" menu-index="99" style="padding-top: 15px" /></div>
<div class="top-call"><user-login ref="userLogin" /></div>
<div class="top-call"><language-setting ref="languageSetting" /></div>
</div>
</div>
<div class="content-box">
<div style="width: 88%;padding-left: 9%;">
<el-row :gutter="20" style="padding-top: 10px">
<el-col :span="3">
<user-menus menu-index="2" />
</el-col>
<el-col :span="21" style="padding: 0 20px">
<div class="tab-box">
<div class="tab-item touch" :class="tabIndex==='1'?'active':''" @click="tabChange('1')">待处理询价记录</div>
<div class="tab-item touch" :class="tabIndex==='2'?'active':''" @click="tabChange('2')">已处理询价记录</div>
</div>
<!-- 表格 -->
<div class="content">
<el-table id="dataTable" ref="dataTable" v-loading="loading" :data="tableData" border height="58vh" :header-cell-style="{background:'#F8F8F8',color:'#333'}" tooltip-effect="dark" @selection-change="handleSelectionChange">
<el-table-column type="index" width="55" label="序号" :index="indexMethod" />
<el-table-column prop="productName" label="询价产品" align="center" />
<el-table-column prop="productId" label="咨询内容" align="center" />
<el-table-column label="状态" align="center" width="120">
<template slot-scope="scope">
<div :style="'color:'+textColors[scope.row.status]">{{ dict.label.consult_status[scope.row.status] }}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="咨询日期" align="center" width="180" />
<el-table-column prop="handleTime" label="处理日期" align="center" width="180" />
<el-table-column label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button type="text" :disabled="scope.row.status>1" @click="batchOperate(1, scope.row)">处理</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination :total="total" :current-page="page" :page-size="pageSize" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChange" @current-change="pageChange" />
</div>
</el-col>
</el-row>
</div>
</div>
<home-footer ref="homeFooter" />
<inquiry-view ref="inquiryView" />
<el-backtop />
</div>
</template>
<script>
import default_product from '@/assets/home_images/default_product.png'
import titleMenus from '../components/titleMenusV2'
import userLogin from '../components/userLoginV2'
import languageSetting from '../components/languageSettingV2'
import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView'
import userMenus from '../components/userMenus'
import { HttpReq } from '@/api/common'
export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, userMenus },
dicts: ['consult_status'],
data() {
return {
defaultImgProduct: default_product,
imgSrcStart: process.env.VUE_APP_BASE_API,
textColors: ['#ccc', '#00008b', '#F98052', '#bba'],
loading: false,
page: 1,
pageSize: 20,
total: 0,
query: {},
tableData: [],
multipleSelection: [],
tabIndex: '1',
throttle: null, // 节流器
throttleTime: 300
}
},
mounted() {
this.$nextTick(() => {
this.loadData()
})
},
methods: {
indexMethod(index) {
return 1 + index + this.page * this.pageSize - this.pageSize
},
tabChange(tabIndex) {
if (this.tabIndex === tabIndex) {
return
}
this.tabIndex = tabIndex
},
handleSelectionChange(val) {
this.multipleSelection = val
},
loadData() {
// 清除参数无值的情况
Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
})
HttpReq.backstageApi.queryInformation({
page: this.page - 1,
pageSize: this.pageSize,
...this.query
}).then((res) => {
this.tableData = res.data.data
this.total = res.data.total
})
},
batchOperate(type, row) {
this.$confirm('确定处理词条记录?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
HttpReq.backstageApi.batchInformationProcessing({
ids: row.informationId
}).then((res) => {
this.$notify({
title: res.msg,
type: res.code === 200 ? 'success' : 'error',
duration: 2500
})
this.loadData()
})
})
},
toAdd() {
this.$refs.addPage.loadData()
},
toEdit(item) {
this.$refs.editPage.loadData(item.productId)
},
toView(item) {
this.$refs.viewPage.loadData(item.productId)
},
toSearch() {
this.page = 1
this.loadData()
},
clearLimit() {
this.query = {}
this.loadData()
},
pageChange(e) {
this.page = e
this.loadData()
},
sizeChange(e) {
this.page = 1
this.pageSize = e
this.loadData()
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.touch {
cursor:pointer;
}
.clear {
clear: both
}
.inline-block {
display: inline-block;
}
.ellipsis {
// 多行溢出省略号
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
.pagination {
margin-top: 23px;
text-align: center;
padding: 10px;
display: flex;
justify-content: center;
align-items: center;
>>>.el-pagination.is-background .el-pager li {
font-style: normal;
font-weight: 400;
font-size: 14px;
text-align: center;
background-color: #fff;
color: #000000;
border: 1px solid #e5e5ea;
}
/* 激活后的样式 */
>>>.el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #ffffff;
color: #0366ed;
border: 1px solid #0366ed;
text-align: center;
}
/* 修改左右箭头样式 */
>>>.el-pagination .btn-next .el-icon, >>>.el-pagination .btn-prev .el-icon {
font-style: normal;
font-weight: 400;
font-size: 14px;
text-align: center;
background-color: #fff;
color: #e5e5ea;
border: 1px solid #e5e5ea;
}
>>>.el-pager {
height: 35.5px !important;
}
>>>.number, >>>.el-icon {
height: 35.5px !important;
line-height: 35.5px !important;
}
}
.head-box {
width: 100vw;
top: 0;
position: fixed;
background: none repeat scroll 0 0 white;
z-index: 999;
box-shadow: 0px 3px 7px 0px rgba(0,0,0,0.2);
.head-box-top {
display: flex;
justify-content: space-evenly;
align-items: center;
.top-call {
height: 80px;
padding-top: 15px;
}
}
}
.content-box {
min-height: 70vh;
margin-top: 94px;
font-family: Source Han Sans CN;
user-select: none;
>>>.el-table--mini {
font-size: 14px;
}
>>>.el-button--mini {
font-size: 14px;
}
}
.toolbar {
display: flex;
justify-content: space-between;
}
.content {
margin-top: 10px;
.table-btn {
display: inline-block;
margin: 0 10px;
color: #1791E7;
opacity: 0.8;
}
.table-btn:hover {
opacity: 1;
}
}
.tab-box {
margin: 20px 0;
width: 100%;
display: flex;
justify-content: flex-start;
border-bottom: 2px solid rgba(3,66,171,0.2);
.tab-item {
width: 120px;
padding-top: 10px;
padding-bottom: 8px;
text-align: center;
font-size: 14px;
color: #666;
}
.active {
background: rgba(183,210,248,0.25);
color: #1961C5;
border-bottom: 3px solid rgba(3,66,171,0.8);
}
}
</style>
......@@ -61,7 +61,7 @@
<div class="btn-o" style="width: 150px;border-radius: 10px;box-shadow: 0 1px 2px 0 rgba(0,0,0,0.2);font-size:20px;" @click="inquiry(item, 'product')">询 价</div>
</div>
</div>
<div style="padding: 15px 50px;text-align: right"><span class="more touch" title="点击查看更多..." @click="moreTo('product')">更多产品>></span></div>
<div style="padding: 15px 50px;text-align: right"><span class="more touch" title="点击查看更多..." @click="moreTo('hardware')">更多产品>></span></div>
</div>
<!--供应商展柜-->
<div class="line-title"><div class="title-point" /><span class="title-text">供应商</span><div class="title-line" /></div>
......@@ -455,7 +455,24 @@ export default {
},
// 点击更多
moreTo(type) {
console.log(type)
if (type === 'supplier') {
this.$router.push({ path: `/supplier` })
}
if (type === 'hardware') {
switch (this.currentProductTypeObj.value) {
case '5':
this.$router.push({ path: `/project` })
break
case '6':
this.$router.push({ path: `/software` })
break
case '7':
this.$router.push({ path: `/course` })
break
default:
this.$router.push({ path: `/product/hardware/${this.currentProductTypeObj.value}` })
}
}
},
goTop() {
document.body.scrollTop = 0
......
<template>
<div class="page-body">
<div class="head-box">
<div class="head-box-top">
<div class="top-call" />
<div class="top-call"><img src="@/assets/home_images/gemho_logo_b.png"></div>
<div class="top-call"><title-menus ref="titleMenus" menu-index="99" style="padding-top: 15px" /></div>
<div class="top-call"><user-login ref="userLogin" /></div>
<div class="top-call"><language-setting ref="languageSetting" /></div>
</div>
</div>
<div class="content-box">
<div style="width: 88%;padding-left: 9%;">
<div class="showcase">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>硬件产品</el-breadcrumb-item>
<el-breadcrumb-item>{{ title }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
<!--查询面板-->
<div class="search-box">
<el-row style="padding-top: 16px">
<el-col :span="2"><div class="area-title">地区选择</div></el-col>
<el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);">
<div v-for="(item,index) in areaOpts" :key="'a_'+index" class="area_item touch" :class="query.area===item.value?'active':''" @click="query.area=item.value">{{ item.label }}</div>
</el-col>
</el-row>
<el-row style="padding-top: 10px">
<el-col :span="2">
<div class="search-item" :class="query.type===undefined?'active':''">
<span class="touch label" @click="setQuertType()">默认排序</span>
<span v-if="query.type===undefined">
<i v-if="query.sort" class="el-icon-sort-up touch" />
<i v-else class="el-icon-sort-down touch" />
</span>
</div>
</el-col>
<el-col :span="2">
<div class="search-item" :class="query.type==='hot'?'active':''">
<span class="touch label" @click="setQuertType('hot')">人气排序</span>
<span v-if="query.type==='hot'">
<i v-if="query.sort" class="el-icon-sort-up touch" />
<i v-else class="el-icon-sort-down touch" />
</span>
</div>
</el-col>
<el-col :span="2">
<div class="search-item" :class="query.type==='time'?'active':''">
<span class="touch label" @click="setQuertType('time')">上架时间</span>
<span v-if="query.type==='time'">
<i v-if="query.sort" class="el-icon-sort-up touch" />
<i v-else class="el-icon-sort-down touch" />
</span>
</div>
</el-col>
<el-col :span="18">
<div class="search-item">
<span>产品价格区间</span>
<div style="position: absolute;top: 15px;left: 35%;">
<el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
~
<el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
<div class="btn touch">确 定</div>
</div>
</div>
</el-col>
</el-row>
</div>
<!--硬件产品展柜-->
<div style="padding-top: 6px">
<div v-for="(item,index) in hardwareList" :key="'p_'+index" class="box-card">
<img v-if="item.isGood" src="@/assets/home_images/recommend.png" class="stamp" title="推荐" style="top: 10px;right: 8px">
<img v-if="item.isHot" src="@/assets/home_images/hot.png" class="stamp" title="热门" style="top: 0;left: 0">
<el-image
:src="item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgProduct"
:preview-src-list="item.imgSrcList.length?item.imgSrcList:[defaultImgProduct]"
style="width:284px;height: 284px;margin: 0 32px 4px"
>
<div slot="placeholder" class="image-slot">加载中<span class="dot">...</span></div>
</el-image>
<el-row>
<el-col :span="21">
<div class="title touch" :title="item.title" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
</el-col>
<el-col :span="3">
<img v-if="item.isStore" class="touch" src="@/assets/home_images/to_like_h.png" title="点击取消收藏" @click="storeShowcase(item, 'product')">
<img v-else class="touch" src="@/assets/home_images/to_like.png" title="点击收藏" @click="storeShowcase(item, 'product')">
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="subTitle" :title="item.subTitle">{{ item.subTitle }}</div>
</el-col>
</el-row>
<el-row style="margin-top: 6px">
<el-col :span="3" style="padding-left: 20px">
<img src="@/assets/home_images/locate.png">
</el-col>
<el-col :span="13">
<div class="area">{{ item.area }}</div>
</el-col>
<el-col :span="8">
<div class="date">{{ item.date }}</div>
</el-col>
</el-row>
<div class="line-btn" style="margin-top: 4px">
<div class="btn-o" style="width: 150px;border-radius: 10px;box-shadow: 0 1px 2px 0 rgba(0,0,0,0.2);font-size:20px;" @click="inquiry(item, 'product')">询 价</div>
</div>
</div>
</div>
<div class="pagination">
<!-- <span style="font-size: 14px; color: #666; margin-right: 8px">{{ total }} 条记录</span>-->
<el-pagination
:hide-on-single-page="true"
:background="true"
:current-page.sync="page"
:page-size="pageSize"
:total="total"
layout=" prev, pager, next"
@current-change="pageChange"
/>
</div>
</div>
</div>
<home-footer ref="homeFooter" />
<inquiry-view ref="inquiryView" />
<el-backtop />
</div>
</template>
<script>
import default_product from '@/assets/home_images/default_product.png'
import titleMenus from '../components/titleMenusV2'
import userLogin from '../components/userLoginV2'
import languageSetting from '../components/languageSettingV2'
import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView'
export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView },
dicts: ['product_type', 'area_province'],
data() {
return {
defaultImgProduct: default_product,
imgSrcStart: process.env.VUE_APP_BASE_API,
page: 1,
pageSize: 12,
total: 0,
title: '',
query: {
keyword: '',
area: undefined,
type: undefined,
sort: false
},
areaOpts: [],
keywords: ['曲线记录仪', '液位控制器', '双金属温度计', '位移传感器'],
hardwareList: [
{
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: true,
isStore: true,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: true,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}
],
throttle: null, // 节流器
throttleTime: 300
}
},
mounted() {
this.$nextTick(() => {
})
},
methods: {
onDictReady(dict) {
this.areaOpts = [{ value: undefined, label: '全部' }, ...dict.area_province]
this.title = dict.product_type[this.$route.params.type - 1].label
},
keywordClick(item, type) {
this.query.keyword = item
},
setQuertType(type) {
if (type === this.query.type) {
this.query.sort = !this.query.sort
} else {
this.query.type = type
this.query.sort = false
}
},
// 点击询价
inquiry(item, type) {
console.log(item, type)
this.$refs.inquiryView.initView(item.id, type)
},
// 点击收藏
storeShowcase(item, type) {
item.isStore = !item.isStore
this.$message.warning({
message: `您${item.isStore ? '' : '已取消'}收藏了该产品!`
})
console.log(item, type)
},
// 跳转到详情
goToDetails(item, path) {
if (item) {
this.$router.push({ path: `${path}/${item.id || 123}` })
} else {
this.$router.push({ path: `${path}` })
}
},
pageChange(e) {
this.page = e
this.loadData()
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.touch {
cursor:pointer;
}
.clear {
clear: both
}
.ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
-webkit-line-clamp: 6;
text-overflow: ellipsis;
}
.pagination {
margin-top: 23px;
text-align: center;
padding: 10px;
display: flex;
justify-content: center;
align-items: center;
>>>.el-pagination.is-background .el-pager li {
font-style: normal;
font-weight: 400;
font-size: 14px;
text-align: center;
background-color: #fff;
color: #000000;
border: 1px solid #e5e5ea;
}
/* 激活后的样式 */
>>>.el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #ffffff;
color: #0366ed;
border: 1px solid #0366ed;
text-align: center;
}
/* 修改左右箭头样式 */
>>>.el-pagination .btn-next .el-icon, >>>.el-pagination .btn-prev .el-icon {
font-style: normal;
font-weight: 400;
font-size: 14px;
text-align: center;
background-color: #fff;
color: #e5e5ea;
border: 1px solid #e5e5ea;
}
>>>.el-pager {
height: 35.5px !important;
}
>>>.number, >>>.el-icon {
height: 35.5px !important;
line-height: 35.5px !important;
}
}
.head-box {
width: 100vw;
top: 0;
position: fixed;
background: none repeat scroll 0 0 white;
z-index: 999;
box-shadow: 0px 3px 7px 0px rgba(0,0,0,0.2);
.head-box-top {
display: flex;
justify-content: space-evenly;
align-items: center;
.top-call {
height: 80px;
padding-top: 15px;
}
}
}
.content-box {
margin-top: 94px;
user-select: none;
.box-block {
width: 100%;
margin: 12px 0;
border: 1px solid rgba(0,0,0,0.12);
box-shadow: 1px 2px 8px 0 rgba(0,0,0,0.12);
border-radius: 10px;
.box-title {
padding-top: 20px;
padding-left: 10px;
font-size: 22px;
font-weight: bold;
}
.box-title:hover {
color: #0457C7
}
.content {
height: 200px;
padding: 4px 30px 20px 10px;
font-size: 16px;
font-weight: 600;
line-height: 32px;
color: #666;
}
}
.box-card {
display: inline-block;
position: relative;
margin: 12px;
padding: 10px 0;
width: 350px;
background: #FFFFFF;
border: 1px solid rgba(0,0,0,0.12);
box-shadow: 1px 2px 8px 0 rgba(0,0,0,0.12);
border-radius: 10px;
.line-text {
width: 100%;
text-align: center;
padding: 5px;
font-size: 18px;
font-weight: bolder;
opacity: 0.85;
}
.line-text:hover {
opacity: 1;
}
.float-title {
width: 344px;
position: absolute;
padding: 5px;
top: 200px;
left: 2px;
text-align: center;
font-weight: 600;
color: #fff;
background: rgba(0,0,0,0.6);
opacity: 0.9;
}
.float-title:hover {
opacity: 1;
}
.title {
width: 305px;
padding: 2px 20px;
font-size: 18px;
color: #333333;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.title:hover {
font-weight: 600;
}
.subTitle {
width: 260px;
padding: 2px 20px;
font-size: 15px;
color: #1961C5;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.area {
padding: 2px 0;
font-size: 17px;
color: #666666;
}
.date {
padding: 2px 10px;
font-size: 17px;
color: #999999;
}
.stamp {
border-style: none;
position: absolute;
z-index: 99;
}
}
.more {
font-size: 18px;
font-weight: 600;
color: #0457C7;
opacity: 0.7;
}
.more:hover {
opacity: 1;
}
.line-title {
padding: 6px 0;
position: relative;
border-bottom: 3px solid #0457C7;
font-size: 24px;
color: #333333;
.title-point {
width: 8px;
height: 21px;
position: absolute;
top: 9px;
background: #0457c7;
}
.title-text {
padding-left: 14px;
font-weight: 600;
}
.title-line{
width: 100%;
position: absolute;
bottom: -7px;
border-bottom: 2px solid #1961C5;
opacity: 0.35
}
}
}
.search-box {
padding-top: 12px;
width: 100%;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
user-select: none;
.search-item {
width: 100%;
height: 38px;
display: inline-block;
padding: 8px 20px;
background: #F7F7F7;
border: 1px solid rgba(0,0,0,0.12);
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
.label:hover {
font-weight: 600;
}
.btn {
width: 74px;
padding: 3px;
margin-left: 12px;
display: inline-block;
background: #1961C5;
border-radius: 6px;
color: white;
text-align: center;
opacity: 0.7;
}
.btn:hover {
opacity: 1;
}
}
.area-title {
height: 62px;
background: #F7F7F7;
border: 1px solid rgba(0,0,0,0.12);
text-align: center;
line-height: 60px;
}
.area_item {
height: 30px;
padding: 6px 12px;
display: inline-block;
}
.area_item:hover {
font-weight: 600;
}
.active {
color: #1961C5;
}
.search-tools {
width: 100%;
.btn{
width: 76%;
height: 38px;
border: 2px solid #1961C5;
border-radius: 8px;
background: #1961C5;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 21px;
color: #ffffff;
opacity: 0.7;
}
.btn:hover {
opacity: 1;
}
>>>.el-input__inner {
height: 38px;
border: 2px solid #1961C5;
border-radius: 8px;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 18px;
color: #333333;
opacity: 0.7;
}
>>>.el-input__inner:hover {
opacity: 1;
}
}
.search-keyword {
padding: 5px 0;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 14px;
text-align: left;
.label {
padding: 1px 15px 1px;
color: #333333;
cursor:pointer;
user-select: none;
}
.label:hover {
color: #1961C5;
}
}
}
.line-btn {
display: flex;
justify-content: center;
font-family: Source Han Sans CN;
font-weight: 400;
.btn-o {
margin: 0 25px;
width: 360px;
padding: 6px 10px;
background: #F7601A;
box-shadow: 0 3px 6px 0 rgba(0,0,0,0.2);
text-align: center;
border: 1px solid transparent;
font-size: 22px;
color: #FFFFFF;
cursor:pointer;
user-select: none;
}
.btn-o:hover {
border: 1px solid rgba(30, 144, 255, 0.8);
color: #1482f0;
}
.btn-l {
margin: 0 25px;
width: 360px;
padding: 10px;
background: #1961C5;
box-shadow: 0 3px 6px 0 rgba(0,0,0,0.2);
text-align: center;
border: 1px solid transparent;
font-size: 22px;
color: #FFFFFF;
cursor:pointer;
user-select: none;
}
.btn-l:hover {
border: 1px solid rgba(0,0,0,0.3);
color: #F7601A;
}
.btn-b {
margin: 0 10px;
width: 168px;
padding: 6px;
background: #EFF6FF;
border: 1px solid transparent;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.2);
text-align: center;
font-size: 20px;
color: #1961C5;
cursor:pointer;
user-select: none;
}
.btn-b:hover {
border: 1px solid rgba(30, 144, 255, 0.9);
}
.active {
color: #FFFFFF;
font-weight: 400;
background: #1961C5;
}
}
</style>
......@@ -388,7 +388,15 @@ export default {
},
// 点击更多
moreTo(type) {
console.log(type)
if (type === 'project') {
this.$router.push({ path: `/project` })
}
if (type === 'software') {
this.$router.push({ path: `/software` })
}
if (type === 'course') {
this.$router.push({ path: `/course` })
}
},
goTop() {
document.body.scrollTop = 0
......
......@@ -480,7 +480,9 @@ export default {
},
// 点击更多
moreTo(type) {
console.log(type)
if (type === 'product') {
this.tabChange('3')
}
},
loadData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment