bugfix
This commit is contained in:
parent
285c9409d5
commit
de745e2d52
@ -115,4 +115,13 @@ export function reqSearch(data){
|
||||
headers: { 'Content-Type': 'application/js1on' },
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
//导出 //reqExportProduct
|
||||
export function reqExportProduct(data){
|
||||
return request({
|
||||
url: '/product/publish_product_to_excel.dspy',
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'application/js1on' },
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@ -302,6 +302,7 @@ export const asyncRoutes = [
|
||||
// meta: {title: "概览", fullPath: "/productHome", noCache: true}
|
||||
// },
|
||||
{
|
||||
hidden: true,
|
||||
path: "/approveMangement",
|
||||
component:Layout,
|
||||
name: "approveMangement",
|
||||
@ -324,6 +325,7 @@ export const asyncRoutes = [
|
||||
]
|
||||
},
|
||||
{
|
||||
hidden: true,
|
||||
path: "/productMangement",
|
||||
component:Layout,
|
||||
name: "productMangement",
|
||||
@ -345,6 +347,7 @@ export const asyncRoutes = [
|
||||
]
|
||||
},
|
||||
{
|
||||
hidden: true,
|
||||
path: "/menuMangement",
|
||||
component:Layout,
|
||||
name: "menuMangement",
|
||||
@ -360,6 +363,7 @@ export const asyncRoutes = [
|
||||
]
|
||||
},
|
||||
{
|
||||
hidden: true,
|
||||
path: "/demandMangement",
|
||||
component:Layout,
|
||||
name: "demandMangement",
|
||||
|
||||
@ -22,8 +22,8 @@
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<el-radio-group v-if="role.role_type=='customer'" v-model="searchData.radioType" class="radio-group" size="mini"
|
||||
@change="handleRadioChange">
|
||||
<el-radio-group v-if="role.role_type == 'customer'" v-model="searchData.radioType" class="radio-group"
|
||||
size="mini" @change="handleRadioChange">
|
||||
<el-radio-button v-for="item in radioOptions" :key="item.value" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-radio-button>
|
||||
@ -32,9 +32,9 @@
|
||||
<i class="el-icon-plus"></i> 添加{{ searchData.radioType === '1' || searchData.radioType === '3' ?
|
||||
'需求' : '商品' }}
|
||||
</el-button> -->
|
||||
<el-button style="margin-left: 10px;" size="mini" @click="exportData">
|
||||
<!-- <el-button style="margin-left: 10px;" size="mini" @click="exportData">
|
||||
<i class="el-icon-upload2"></i> 导出
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
<el-table border height="calc(100vh - 210px)" v-loading="loading" :data="tableData"
|
||||
style="width: 100%;border:1px solid #ccc;" element-loading-text="加载中..."
|
||||
@ -53,15 +53,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="product_category" show-overflow-tooltip label="所属类别" min-width="180">
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="审核状态" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-table-column show-overflow-tooltip label="审核状态" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.audit_status === 'approved'" type="success">审核通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.audit_status === 'rejected'" type="danger">审核不通过</el-tag>
|
||||
<el-tag v-else type="warning">待审核</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="上架状态" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.listing_status === 'listing'" type="success">已上架</el-tag>
|
||||
<el-tag v-else-if="scope.row.listing_status === 'delisting'" type="danger">已下架</el-tag>
|
||||
<el-tag v-else type="warning">未上架</el-tag>
|
||||
@ -84,17 +84,25 @@
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" min-width="240" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="openDetail(scope.row,1)">查看</el-button>
|
||||
<el-button type="text" size="small" @click="openDetail(scope.row, 1)">查看</el-button>
|
||||
<el-button @click="editProduct(scope.row)" type="text" style="color: #409EFF;"
|
||||
size="small">修改</el-button>
|
||||
<el-button v-if="role.role_type=='customer'" type="text" size="small" @click="openDetail(scope.row,2)">审核</el-button>
|
||||
|
||||
size="small">修改</el-button>
|
||||
<el-button v-if="role.role_type == 'customer'" type="text" size="small"
|
||||
@click="openDetail(scope.row, 2)">审核</el-button>
|
||||
|
||||
<!-- <el-button type="text" style="color: #E6A23C;" size="small">导出</el-button> -->
|
||||
<el-button :disabled="scope.row.audit_status === 'approved'&&scope.row.listing_status === 'listing'" v-if="role.role_type=='customer'" @click="grounding(scope.row, 'listing')" type="text" style="color: #67C23A;"
|
||||
<el-button
|
||||
:disabled="scope.row.audit_status === 'approved' && scope.row.listing_status === 'listing'"
|
||||
@click="grounding(scope.row, 'listing')" type="text" style="color: #67C23A;"
|
||||
size="small">上架</el-button>
|
||||
<el-button :disabled="scope.row.audit_status === 'approved'&&scope.row.listing_status === 'delisting'" v-if="role.role_type=='customer'" @click="grounding(scope.row, 'delisting')" type="text" size="small">下架</el-button>
|
||||
<el-popconfirm v-if="role.role_type=='customer'" title="确定删除该条目吗?" @confirm="deleteProduct(scope.row)">
|
||||
<el-button slot="reference" type="text" style="color: #F56C6C;margin-left: 10px;" size="small">删除</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.audit_status === 'approved' && scope.row.listing_status === 'delisting'"
|
||||
@click="grounding(scope.row, 'delisting')" type="text" size="small">下架</el-button>
|
||||
<el-button type="text" size="small" @click="exportData(scope.row)">导出</el-button>
|
||||
<el-popconfirm v-if="role.role_type == 'customer'" title="确定删除该条目吗?"
|
||||
@confirm="deleteProduct(scope.row)">
|
||||
<el-button slot="reference" type="text" style="color: #F56C6C;margin-left: 10px;"
|
||||
size="small">删除</el-button>
|
||||
</el-popconfirm>
|
||||
|
||||
|
||||
@ -106,8 +114,8 @@
|
||||
layout="total, prev, pager, next" :total="total_count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<commonDetail :showType="detailType" :visible="showProductDetail" @close="handleDetailClose" @approve="handleApprove"
|
||||
@reject="handleReject">
|
||||
<commonDetail :showType="detailType" :visible="showProductDetail" @close="handleDetailClose"
|
||||
@approve="handleApprove" @reject="handleReject">
|
||||
</commonDetail>
|
||||
|
||||
<!-- 编辑商品弹窗 -->
|
||||
@ -128,7 +136,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reqSearchByMangement, reqGetProductDetail, reqEditProduct, reqEditProductNoImg } from '@/api/ncmatch';
|
||||
import XLSX from 'xlsx';
|
||||
import { reqSearchByMangement, reqGetProductDetail, reqEditProduct, reqEditProductNoImg, reqExportProduct } from '@/api/ncmatch';
|
||||
import commonDetail from '@/views/customer/productMangement/commonDetail/index.vue';
|
||||
import { mapState } from 'vuex';
|
||||
import sendProduct from '@/views/homePage/ncmatch/mainPage/sendProduct/index.vue';
|
||||
@ -238,10 +247,10 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log("父组件传来的值是",this.role);
|
||||
console.log("父组件传来的值是", this.role);
|
||||
// 在 created 生命周期中设置 audit_status
|
||||
if (this.role && this.role.audit_status) {
|
||||
|
||||
|
||||
this.searchData.audit_status = this.role.audit_status;
|
||||
}
|
||||
if (this.role && this.role.publish_type) {
|
||||
@ -330,8 +339,23 @@ export default {
|
||||
this.searchData.audit_status = this.role.audit_status;
|
||||
this.getTableData();
|
||||
},
|
||||
exportData() {
|
||||
this.$message.info('导出功能开发中...');
|
||||
exportData(row) {
|
||||
let ploay = {
|
||||
// ids: [row.id]
|
||||
ids:["fYHuG9eXwLi7949Rg9mRg", "vTv8KuqfDhT1efC8prs9y"]
|
||||
}
|
||||
reqExportProduct(ploay).then(res => {
|
||||
console.log(res);
|
||||
// 创建一个Workbook对象
|
||||
const wb = XLSX.utils.book_new();
|
||||
// 创建第一个sheet
|
||||
const ws1 = XLSX.utils.json_to_sheet(res.data);
|
||||
XLSX.utils.book_append_sheet(wb, ws1, 'sheet1');
|
||||
// 导出Excel文件
|
||||
XLSX.writeFile(wb, '产品列表.xlsx');
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
handleDetailClose() {
|
||||
// 弹窗关闭时的处理逻辑
|
||||
@ -403,7 +427,7 @@ export default {
|
||||
this.getTableData();
|
||||
console.log(`当前页: ${val}`);
|
||||
},
|
||||
openDetail(item,type) {
|
||||
openDetail(item, type) {
|
||||
this.detailType = type;
|
||||
this.loading = true;
|
||||
reqGetProductDetail({
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div
|
||||
id="topContainer"
|
||||
<div id="topContainer"
|
||||
style="min-width: 1400px; width: 100%;display: flex;flex-direction: column;justify-content: flex-start;align-items: center">
|
||||
<div class="banner">
|
||||
<img src="./img/detailBg.jpg" alt="">
|
||||
@ -13,81 +12,36 @@
|
||||
</div>
|
||||
<!-- 产品优势 -->
|
||||
<div class="proAd">
|
||||
<div v-show="detailData.title==='裸金属产品'" class="title">产品规格</div>
|
||||
<div v-show="detailData.title === '裸金属产品'" class="title">产品规格</div>
|
||||
|
||||
<div v-show="detailData.title==='裸金属产品'" class="cardBox">
|
||||
<div v-show="detailData.title === '裸金属产品'" class="cardBox">
|
||||
<div class="card">
|
||||
<ul class="cardUl">
|
||||
<li class="cardLi">
|
||||
<span class="title"> {{ data4090.title }}</span>
|
||||
<!-- ::{{ JSON.stringify(detailData) }} -->
|
||||
<li class="cardLi" v-for="(i, index) in detailData.products" :key="index">
|
||||
<span class="title"> {{ i.title }}</span>
|
||||
<ul class="tagUl">
|
||||
<li v-for="(item,index) in data4090.list" :key="index">
|
||||
<li v-for="(item,index) in i.list" :key="index">
|
||||
{{ item.name }}:{{ item.content }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="towBtn">
|
||||
<span class="basePrice"><span style="font-weight: bold;">¥</span><span
|
||||
style="font-weight: bold;font-size: 48px">{{ data4090.price }}</span> <span
|
||||
style="color: #7A82A0">/{{ data910B.price_unit }}</span> <span
|
||||
style="color: #222F60">(可短租)</span></span>
|
||||
style="font-weight: bold;font-size: 48px">{{ i.price }}</span> <span
|
||||
style="color: #7A82A0">/{{ i.price_unit }}</span><span style="color: #222F60">(可短租)</span></span>
|
||||
<span @click="openTalk" class="zixun">立即咨询</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="cardLi">
|
||||
<span class="title"> {{ dataA100.title }}</span>
|
||||
<ul class="tagUl">
|
||||
<li v-for="(item,index) in dataA100.list" :key="index">
|
||||
{{ item.name }}:{{ item.content }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="towBtn">
|
||||
<span class="basePrice"><span style="font-weight: bold;">¥</span><span
|
||||
style="font-weight: bold;font-size: 48px">{{ dataA100.price }}</span> <span
|
||||
style="color: #7A82A0">/{{ data910B.price_unit }}</span><span style="color: #222F60">(可短租)</span></span>
|
||||
<span @click="openTalk" class="zixun">立即咨询</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="cardLi">
|
||||
<span class="title"> {{ dataA800.title }}</span>
|
||||
<ul class="tagUl">
|
||||
<li v-for="(item,index) in dataA800.list" :key="index">
|
||||
{{ item.name }}:{{ item.content }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="towBtn">
|
||||
<span class="basePrice"><span style="font-weight: bold;">¥</span><span
|
||||
style="font-weight: bold;font-size: 48px">{{ dataA800.price }}</span> <span
|
||||
style="color: #7A82A0">/{{ data910B.price_unit }}</span> <span
|
||||
style="color: #222F60">(可短租)</span></span>
|
||||
<span @click="openTalk" class="zixun">立即咨询</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="cardLi">
|
||||
<span class="title"> {{ data910B.title }}</span>
|
||||
<ul class="tagUl">
|
||||
<li v-for="(item,index) in data910B.list" :key="index">
|
||||
{{ item.name }}:{{ item.content }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="towBtn">
|
||||
<span class="basePrice"><span style="font-weight: bold;">¥</span><span
|
||||
style="font-weight: bold;font-size: 48px">{{ data910B.price }}</span> <span
|
||||
style="color: #7A82A0">/{{ data910B.price_unit }}</span> <span
|
||||
style="color: #222F60">(可短租)</span></span>
|
||||
<span @click="openTalk" class="zixun">立即咨询</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="padding-top: 50px" v-if="detailData.title!=='裸金属产品'" class="title">产品优势</div>
|
||||
<ul v-if="detailData.title!=='裸金属产品'" class="adUl">
|
||||
<div style="padding-top: 50px" v-if="detailData.title !== '裸金属产品'" class="title">产品优势</div>
|
||||
<ul v-if="detailData.title !== '裸金属产品'" class="adUl">
|
||||
<li v-for="(item, index) in detailData.adList" :key="index">
|
||||
<div class="leftBox">
|
||||
<img :src="item.img" alt="">
|
||||
@ -100,39 +54,36 @@
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 产品功能-->
|
||||
<div v-if="detailData.title!=='裸金属产品'" style="justify-content: flex-start!important;" class="proUse">
|
||||
<div v-if="detailData.title !== '裸金属产品'" style="justify-content: flex-start!important;" class="proUse">
|
||||
<div style="padding-top: 50px" class="title">产品功能</div>
|
||||
<ul class="useUl">
|
||||
<li v-for="(item,index) in detailData.useList" :key="index" class="useLi">
|
||||
<span v-if=" item.title" class="useTitle">{{ item.title }}</span>
|
||||
<span v-if=" item.description" class="useDescription">{{ item.description }}</span>
|
||||
<li v-for="(item, index) in detailData.useList" :key="index" class="useLi">
|
||||
<span v-if="item.title" class="useTitle">{{ item.title }}</span>
|
||||
<span v-if="item.description" class="useDescription">{{ item.description }}</span>
|
||||
<ul class="inUl">
|
||||
<li :style="{ justifyContent: i.description ? 'space-around' : 'center' }" v-for="(i,d) in item.content"
|
||||
:key="d"
|
||||
class="inLi">
|
||||
<li :style="{ justifyContent: i.description ? 'space-around' : 'center' }" v-for="(i, d) in item.content"
|
||||
:key="d" class="inLi">
|
||||
<span class="inTitle" style="margin-bottom: 10px;font-size: 16px;">{{ i.title }}</span>
|
||||
<span style="color: #666;line-height: 1.8;font-size: 14px" class="inDescription">{{
|
||||
i.description
|
||||
}}</span>
|
||||
i.description
|
||||
}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Application-->
|
||||
<div v-if="detailData.title!=='裸金属产品'" class="application">
|
||||
<div v-if="detailData.title !== '裸金属产品'" class="application">
|
||||
<div class="title">应用场景</div>
|
||||
<ul class="menu">
|
||||
<li v-for="(item,index) in detailData.applicationList" :key="index" @click="clickMenu(item)"
|
||||
:class="activeMenu===item.id?'activeLi':''">
|
||||
<li v-for="(item, index) in detailData.applicationList" :key="index" @click="clickMenu(item)"
|
||||
:class="activeMenu === item.id ? 'activeLi' : ''">
|
||||
{{ item.memuName }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="realApp">
|
||||
<div style="display: none" class="leftBox">
|
||||
<img
|
||||
:src="menuObj.img"
|
||||
alt="">
|
||||
<img :src="menuObj.img" alt="">
|
||||
</div>
|
||||
<div class="rightBox">
|
||||
<div v-if="menuObj.title_r" class="topBox">
|
||||
@ -141,8 +92,7 @@
|
||||
</div>
|
||||
<div class="boxBox">
|
||||
|
||||
<div v-for="(item,index) in menuObj.provide"
|
||||
class="bottomBox">
|
||||
<div v-for="(item, index) in menuObj.provide" class="bottomBox">
|
||||
<span style="margin: 15px 0">{{ item.title }}</span>
|
||||
<span class="content">{{ item.content }}</span>
|
||||
</div>
|
||||
@ -158,9 +108,9 @@
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
// import {detailData} from "@/views/homePage/detail/data";
|
||||
import {reqHotProduct, reqNewHomeDetail} from "@/api/newHome";
|
||||
import { reqHotProduct, reqNewHomeDetail } from "@/api/newHome";
|
||||
import Talk from "@/views/homePage/dialog/talk/index.vue";
|
||||
import {luojinshuData} from "@/views/homePage/detail/luojinshu";
|
||||
|
||||
|
||||
export default Vue.extend({
|
||||
name: "detail",
|
||||
@ -169,7 +119,7 @@ export default Vue.extend({
|
||||
// return luojinshuData
|
||||
// }
|
||||
// },
|
||||
components: {Talk},
|
||||
components: { Talk },
|
||||
// computed: {
|
||||
// detailData() {
|
||||
// return detailData
|
||||
@ -177,11 +127,6 @@ export default Vue.extend({
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
data4090: luojinshuData["4090"],
|
||||
dataA100: luojinshuData["A100"],
|
||||
dataA800: luojinshuData["A800"],
|
||||
data910B: luojinshuData["910B"],
|
||||
|
||||
loading: null,
|
||||
activeMenu: 0,
|
||||
detailData: {},
|
||||
@ -243,7 +188,7 @@ export default Vue.extend({
|
||||
},
|
||||
getDetail() {
|
||||
this.openFullScreen2()
|
||||
reqNewHomeDetail({id: this.$route.query.id}).then(res => {
|
||||
reqNewHomeDetail({ id: this.$route.query.id }).then(res => {
|
||||
this.loading.close()
|
||||
this.detailData = res.data
|
||||
this.activeMenu = res.data.applicationList[0].id
|
||||
|
||||
@ -1,237 +1,2 @@
|
||||
export const luojinshuData = {
|
||||
"hot": {
|
||||
"title": "NVIDIA-4090",
|
||||
"description": "配备GPU的云端服务器,可以为机器学习、高性能计算、图形图像渲染等计算密集型应用提供加速处理能力。根据需求场景的不同,既可提供弹性的GPU云服务器,也可提供高性能的GPU裸金属服务器,助力您的业务创新,提升竞争优势。",
|
||||
"price": "6000",
|
||||
"pre_price": "7143",
|
||||
"price_unit": "台/月",
|
||||
"discount": 8.4,
|
||||
"bgImgUrl": "https://www.kaiyuancloud.cn/idfile?path=firstpagebg/1.png",
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "CPU",
|
||||
"content": "AMD EPYC 7542 32 C * 2",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "内存",
|
||||
"content": "64G DDR4-3200 * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "GPU",
|
||||
"content": "NVIDIA-4090-24GB * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "系统盘",
|
||||
"content": "960G SATA SSD * 2 (Raid)",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "数据盘",
|
||||
"content": "3.84T U.2 NVMe SSD * 1",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "网卡",
|
||||
"content": "Mellanox Connect4 25G SFP28 2-port * 1",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssdr2x.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"4090": {
|
||||
"title": "NVIDIA-4090",
|
||||
"description": "轻量应用服务器(Light server)是一种内置应用型镜像或系统型镜像的小规格云服务器, 绑定适配大小的磁盘和带宽,为中小型企业和个人用户提供官网搭建、web应用搭建、云上学习和测试等场景的服务。",
|
||||
"price": "6000",
|
||||
"pre_price": "7143",
|
||||
"price_unit": "台/月",
|
||||
"discount": 8.4,
|
||||
"bgImgUrl": "https://www.kaiyuancloud.cn/idfile?path=firstpagebg/2.png",
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "CPU",
|
||||
"content": "AMD EPYC 7542 32 C * 2",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "内存",
|
||||
"content": "64G DDR4-3200 * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "GPU",
|
||||
"content": "NVIDIA-4090-24GB * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "系统盘",
|
||||
"content": "960G SATA SSD * 2 (Raid)",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "数据盘",
|
||||
"content": "3.84T U.2 NVMe SSD * 1",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "网卡",
|
||||
"content": "Mellanox Connect4 25G SFP28 2-port * 1",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssdr2x.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"A100": {
|
||||
"title": "NVIDIA-A100",
|
||||
"description": "对象存储BOS(Baidu Object Storage)是一款稳定、安全、高效、高可拓展的云存储服务,支持标准、低频、冷和归档存储等多种存储类型满足多场景的存储需求。用户可以将任意数量和形式的非结构化数据存入BOS,并对数据进行管理和处理。",
|
||||
"price": "31000",
|
||||
"pre_price": null,
|
||||
"price_unit": "台/月",
|
||||
"discount": null,
|
||||
"bgImgUrl": "https://www.kaiyuancloud.cn/idfile?path=firstpagebg/3.png",
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "CPU",
|
||||
"content": "AMD EPYC 7543 32 C * 2",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "内存",
|
||||
"content": "64G DDR4-3200 * 32",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "GPU",
|
||||
"content": "NVIDIA-A100-80GB-Nvlink * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "系统盘",
|
||||
"content": "960G SATA SSD * 2",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "数据盘",
|
||||
"content": "3.84T U.2 NVMe SSD * 1",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "网卡",
|
||||
"content": "MCX653105A - HDAT CX6 200G 1P HDR * 4",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssdr2x.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"A800": {
|
||||
"title": "NVIDIA-A800",
|
||||
"description": "云数据库 RDS为用户提供高性价比、安全可靠、性能卓越、易于维护的企业级云数据库服务。",
|
||||
"price": "32000",
|
||||
"pre_price": null,
|
||||
"price_unit": "台/月",
|
||||
"discount": null,
|
||||
"bgImgUrl": "https://www.kaiyuancloud.cn/idfile?path=firstpagebg/4.png",
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "CPU",
|
||||
"content": "Intel (R) Xeon (R) Platinum 8358 32 C * 2",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "内存",
|
||||
"content": "64G DDR4-3200 * 32",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "GPU",
|
||||
"content": "NVIDIA-A800-80GB-Nvlink * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "系统盘",
|
||||
"content": "960G SATA SSD * 2",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "数据盘",
|
||||
"content": "3.84T U.2 NVMe SSD * 1",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "网卡",
|
||||
"content": "MCX653105A - HDAT CX6 200G 1P HDR *4",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssdr2x.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"910B": {
|
||||
"title": "昇腾-910B",
|
||||
"description": "裸金属服务器是一种融合了高性能 GPU 计算能力、裸金属服务器物理资源独占性及云计算弹性扩展特性的新型服务器形态。它既具备传统裸金属服务器的强劲性能与安全性,又能像云服务器一样按需灵活调整资源,适用于对算力、资源独占性和弹性要求极高的场景。",
|
||||
"price": "22000",
|
||||
"pre_price": "27500",
|
||||
"price_unit": "台/月",
|
||||
"discount": 8,
|
||||
"bgImgUrl": "https://www.kaiyuancloud.cn/idfile?path=firstpagebg/5.png",
|
||||
"list": [
|
||||
{
|
||||
"id": 23,
|
||||
"name": "CPU",
|
||||
"content": "鲲鹏920 * 4",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "内存",
|
||||
"content": "32G DDR4-3200 * 32",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"name": "GPU",
|
||||
"content": "昇腾-910B-64GB * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png"
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"name": "系统盘",
|
||||
"content": "480G SATA SSD * 2",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"name": "数据盘",
|
||||
"content": "3.84T U.2 NVMe SSD * 1",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"name": "网卡",
|
||||
"content": "200G QSFP ROCE * 8",
|
||||
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssdr2x.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
export const luo=[]
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="search-box">
|
||||
<search></search>
|
||||
</div>
|
||||
<div style="width: 90%;max-width: 1600px;border:1px solid red;">
|
||||
<div style="width: 90%;max-width: 1600px;">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
<el-dialog :title="productDetailInfo.publish_type==='1'? '商品详情' :'需求详情'" top="5vh" :visible.sync="showProductDetail" width="80%" @open="scrollToTop">
|
||||
@ -173,8 +173,7 @@ export default Vue.extend({
|
||||
<style scoped lang="scss">
|
||||
.search-box {
|
||||
width: 100%;
|
||||
margin-top: 55px;
|
||||
border: 1px solid red;
|
||||
margin-top: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
<script >
|
||||
import Vue from 'vue'
|
||||
import { reqPublishProductSearchFirstPage } from '@/api/ncmatch'
|
||||
import {mapGetters, mapState} from "vuex";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
export default Vue.extend({
|
||||
name: "mainPage",
|
||||
components: {
|
||||
@ -15,6 +15,7 @@ export default Vue.extend({
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
publish_type: null,
|
||||
sendProductVisible: false,
|
||||
currentHotMenu: "",
|
||||
@ -142,6 +143,10 @@ export default Vue.extend({
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleCurrentChange(val) {
|
||||
this.current_page = val
|
||||
this.init_product_list()
|
||||
},
|
||||
sendInfo(type) {
|
||||
if (this.loginState) {
|
||||
this.publish_type = type
|
||||
@ -157,6 +162,7 @@ export default Vue.extend({
|
||||
this.currentHotMenu = res.data[0].id
|
||||
this.hotProductList = res.data[0].product_list
|
||||
this.product = res.data
|
||||
this.total = res.data[0].total_count
|
||||
}
|
||||
|
||||
}
|
||||
@ -167,6 +173,7 @@ export default Vue.extend({
|
||||
this.init_product_list()
|
||||
},
|
||||
clickNetMenu(menu) {
|
||||
this.current_page = 1
|
||||
this.currentHotMenu = menu.id;
|
||||
this.hotProductList = menu.product_list || [];
|
||||
},
|
||||
@ -212,7 +219,7 @@ export default Vue.extend({
|
||||
</section>
|
||||
|
||||
<!-- 右侧用户信息栏 -->
|
||||
<aside class="user-sidebar" style="background-color: #f8fbfe;padding: 10px;padding-top: 20px;">
|
||||
<aside class="user-sidebar" style="background-color: #f8fbfe;padding: 10px;padding-top: 20px;">
|
||||
<span class="publish-goods" @click="$router.push('/ncmatchHome/supplyAndDemandSquare')"> 算力供需广场</span>
|
||||
<span class="publish-goods" @click="sendInfo('2')">发布需求</span>
|
||||
<span class="publish-goods" @click="sendInfo('1')">发布商品</span>
|
||||
@ -236,9 +243,13 @@ export default Vue.extend({
|
||||
|
||||
|
||||
<productCard :productList="hotProductList"></productCard>
|
||||
<el-pagination style="background-color: white;" @current-change="handleCurrentChange" :page-size="page_size"
|
||||
layout="total, prev, pager, next" :total="total">
|
||||
</el-pagination>
|
||||
<el-dialog :title="publish_type === '2' ? '发布需求' : '发布商品'" width="60vw" top="5vh"
|
||||
:visible.sync="sendProductVisible">
|
||||
<sendProduct :isEdit="false" v-if="publish_type" @success="sendProductSuccess" :publish_type="publish_type"></sendProduct>
|
||||
<sendProduct :isEdit="false" v-if="publish_type" @success="sendProductSuccess" :publish_type="publish_type">
|
||||
</sendProduct>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
@ -283,7 +294,7 @@ export default Vue.extend({
|
||||
width: 100%;
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 45px;
|
||||
// padding-bottom: 45px;
|
||||
}
|
||||
|
||||
.publish-goods {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
style="display: flex;align-items: center;justify-content: center;border:1px solid red;width: 100%;max-width: 1400px;">
|
||||
style="display: flex;align-items: center;justify-content: center;width: 100%;max-width: 1400px;">
|
||||
|
||||
<img @click="goHome" class="logo-clickable" style="width: 180px;height: 60px;padding-right: 20px;"
|
||||
src="https://www.kaiyuancloud.cn/idfile?path=logo_ncmatch.png" alt="">
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
<!-- 热搜关键词 -->
|
||||
<div class="hot-search">
|
||||
<span class="search-label">热门搜索:</span>
|
||||
|
||||
<a v-for="keyword in hotSearchKeywords" :key="keyword" href="#" class="hot-keyword"
|
||||
@click="handleHotKeywordClick(keyword)">
|
||||
{{ keyword }}
|
||||
@ -559,10 +559,9 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.search-section {
|
||||
border: 1px solid red;
|
||||
flex: 1;
|
||||
min-width: 850px;
|
||||
|
||||
padding-bottom: 10px;
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -658,6 +657,8 @@ export default {
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
|
||||
|
||||
.search-label {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
|
||||
@ -57,15 +57,20 @@
|
||||
<!-- 产品 -->
|
||||
|
||||
<div class="product-card-container">
|
||||
<productCard v-if="productList.length > 0" type="supplyAndDemandSquare" :publish_type="publish_type"
|
||||
:productList="productList">
|
||||
</productCard>
|
||||
<div v-if="productList.length > 0">
|
||||
<productCard type="supplyAndDemandSquare" :publish_type="publish_type"
|
||||
:productList="productList">
|
||||
</productCard>
|
||||
<el-pagination @current-change="handleCurrentChange" :page-size="page_size"
|
||||
layout="total, prev, pager, next" :total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<div v-else class="no-data">
|
||||
<img style="width: 150px;height: 10px;" src="./img/empty.svg" alt="">
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -121,6 +126,10 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleCurrentChange(val) {
|
||||
this.current_page = val
|
||||
this.initData()
|
||||
},
|
||||
initAllData() {
|
||||
// 先初始化产品类别,确保 selectedCategory 设置完成
|
||||
this.init_product_category().then(() => {
|
||||
@ -194,7 +203,7 @@ export default {
|
||||
} else {
|
||||
this.productList = res.data[0].product_list
|
||||
}
|
||||
|
||||
this.total = res.data[0].total_count
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
export function getHomePath() {
|
||||
// let homePath= "/homePage/index"
|
||||
let homePath= "/ncmatchHome/index"
|
||||
let homePath= "/homePage/index"
|
||||
// let homePath= "/ncmatchHome/index"
|
||||
|
||||
// 业主机构信息
|
||||
let url_link = window.location.href || '';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user