This commit is contained in:
木瓜一块八 2025-08-15 13:38:27 +08:00
parent 7d80025171
commit a21262bced
6 changed files with 142 additions and 122 deletions

View File

@ -301,89 +301,7 @@ export const asyncRoutes = [
// name: 'productHome',
// meta: {title: "概览", fullPath: "/productHome", noCache: true}
// },
{
hidden: true,
path: "/approveMangement",
component:Layout,
name: "approveMangement",
redirect: "/approveMangement/index",
meta: { fullPath: "/approveMangement", title: "审核管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "pendingPro",
component: () => import("@/views/customer/approveMangement/pendingPro.vue"),
name: "pendingPro",
meta: { title: "待审清单", fullPath: "/approveMangement/index" },
},
{
path: "approvedPro",
component: () => import("@/views/customer/approveMangement/approvedPro.vue"),
name: "approvedPro",
meta: { title: "已审清单", fullPath: "/approveMangement/approvedPro" },
},
]
},
{
hidden: true,
path: "/productMangement",
component:Layout,
name: "productMangement",
redirect: "/productMangement/index",
meta: { fullPath: "/productMangement", title: "商品管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "index",
component: () => import("@/views/customer/productMangement/productList/index.vue"),
name: "productList",
meta: { title: "商品发布清单", fullPath: "/productMangement/index" },
},
{
path: "rejectedPro",
component: () => import("@/views/customer/productMangement/rejectedPro/index.vue"),
name: "rejectedPro",
meta: { title: "商品未通过清单", fullPath: "/productMangement/index" },
},
]
},
{
hidden: true,
path: "/menuMangement",
component:Layout,
name: "menuMangement",
redirect: "/menuMangement/index",
meta: { fullPath: "/menuMangement", title: "菜单管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "index",
component: () => import("@/views/operation/menuMangement/index.vue"),
name: "menuMangement",
meta: { title: "菜单管理", fullPath: "/menuMangement/index" },
},
]
},
{
hidden: true,
path: "/demandMangement",
component:Layout,
name: "demandMangement",
redirect: "/demandMangement/index",
meta: { fullPath: "/demandMangement", title: "需求管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "index",
component: () => import("@/views/customer/demand/demandList.vue"),
name: "demandList",
meta: { title: "需求发布清单", fullPath: "/demandMangement/index" },
},
{
path: "rejectDemand",
component: () => import("@/views/customer/demand/rejectDemand.vue"),
name: "rejectDemand",
meta: { title: "需求未通过清单", fullPath: "/demandMangement/rejectDemand" },
},
]
},
{
path: getHomePath() == '/ncmatchHome/index' ? "/ncmatchHome" : "/homePage",
@ -936,7 +854,90 @@ export const asyncRoutes = [
name: "ProductIndex",
meta: { title: "产品最新页", fullPath: "/product/productHome/productIndex", noCache: true },
},],
}, {
},
{
path: "/approveMangement",
component:Layout,
name: "approveMangement",
redirect: "/approveMangement/index",
meta: { fullPath: "/approveMangement", title: "审核管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "pendingPro",
component: () => import("@/views/customer/approveMangement/pendingPro.vue"),
name: "pendingPro",
meta: { title: "待审清单", fullPath: "/approveMangement/index" },
},
{
path: "approvedPro",
component: () => import("@/views/customer/approveMangement/approvedPro.vue"),
name: "approvedPro",
meta: { title: "已审清单", fullPath: "/approveMangement/approvedPro" },
},
]
},
{
path: "/productMangement",
component:Layout,
name: "productMangement",
redirect: "/productMangement/index",
meta: { fullPath: "/productMangement", title: "商品管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "index",
component: () => import("@/views/customer/productMangement/productList/index.vue"),
name: "productList",
meta: { title: "商品发布清单", fullPath: "/productMangement/index" },
},
{
path: "rejectedPro",
component: () => import("@/views/customer/productMangement/rejectedPro/index.vue"),
name: "rejectedPro",
meta: { title: "商品未通过清单", fullPath: "/productMangement/index" },
},
]
},
{
hidden: true,
path: "/menuMangement",
component:Layout,
name: "menuMangement",
redirect: "/menuMangement/index",
meta: { fullPath: "/menuMangement", title: "菜单管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "index",
component: () => import("@/views/operation/menuMangement/index.vue"),
name: "menuMangement",
meta: { title: "菜单管理", fullPath: "/menuMangement/index" },
},
]
},
{
path: "/demandMangement",
component:Layout,
name: "demandMangement",
redirect: "/demandMangement/index",
meta: { fullPath: "/demandMangement", title: "需求管理", noCache: true, icon: 'el-icon-s-home' },
children: [
{
path: "index",
component: () => import("@/views/customer/demand/demandList.vue"),
name: "demandList",
meta: { title: "需求发布清单", fullPath: "/demandMangement/index" },
},
{
path: "rejectDemand",
component: () => import("@/views/customer/demand/rejectDemand.vue"),
name: "rejectDemand",
meta: { title: "需求未通过清单", fullPath: "/demandMangement/rejectDemand" },
},
]
},
{
path: "/sales", component: Layout,
meta: {

View File

@ -14,7 +14,8 @@ export default {
return {
role:{
role_type:'customer',
audit_status:'pending'
audit_status:'pending',
type:'app'
}
}
},

View File

@ -22,7 +22,7 @@
</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"
<el-radio-group v-if="role.type == 'app'" 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 }}
@ -32,24 +32,24 @@
<i class="el-icon-plus"></i> 添加{{ searchData.radioType === '1' || searchData.radioType === '3' ?
'需求' : '商品' }}
</el-button> -->
<!-- <el-button style="margin-left: 10px;" size="mini" @click="exportData">
<i class="el-icon-upload2"></i> 导出
<!-- <el-button style="margin-left: 10px;" size="mini" @click="exportAllData">
<i class="el-icon-upload2"></i> 全部导出
</el-button> -->
</div>
<el-table border height="calc(100vh - 210px)" v-loading="loading" :data="tableData"
<el-table size="mini" border height="calc(100vh - 210px)" v-loading="loading" :data="tableData"
style="width: 100%;border:1px solid #ccc;" element-loading-text="加载中..."
element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.8)">
<el-table-column prop="date" label="商品图片" width="180">
<el-table-column prop="date" label="图片" width="180">
<template slot-scope="scope">
<el-image :src="scope.row.img || 'https://www.kaiyuancloud.cn/idfile?path=logo_ncmatch.png'"
<el-image v-if="scope.row.img" :src="scope.row.img || 'https://www.kaiyuancloud.cn/idfile?path=logo_ncmatch.png'"
style="width: 80px; height: 60px;border: 1px solid #ccc;border-radius: 6px;"
:preview-src-list="[scope.row.img || 'https://www.kaiyuancloud.cn/idfile?path=logo_ncmatch.png']"
fit="cover" :initial-index="0" preview-teleported :z-index="3000">
</el-image>
<span v-else>/</span>
</template>
</el-table-column>
<el-table-column prop="product_name" show-overflow-tooltip label="商品名称" min-width="180">
<el-table-column prop="product_name" show-overflow-tooltip label="名称" min-width="180">
</el-table-column>
<el-table-column prop="product_category" show-overflow-tooltip label="所属类别" min-width="180">
</el-table-column>
@ -82,7 +82,7 @@
</el-table-column>
<el-table-column prop="create_at" show-overflow-tooltip label="创建时间" min-width="180">
</el-table-column>
<el-table-column fixed="right" min-width="240" label="操作">
<el-table-column fixed="right" min-width="260" label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="openDetail(scope.row, 1)">查看</el-button>
<el-button @click="editProduct(scope.row)" type="text" style="color: #409EFF;"
@ -92,11 +92,11 @@
<!-- <el-button type="text" style="color: #E6A23C;" size="small">导出</el-button> -->
<el-button
:disabled="scope.row.audit_status === 'approved' && scope.row.listing_status === 'listing'"
:disabled="scope.row.audit_status=='rejected'||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'"
:disabled="scope.row.audit_status=='rejected'||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="确定删除该条目吗?"
@ -281,6 +281,9 @@ export default {
}
},
methods: {
exportAllData(){
console.log("全部导出");
},
deleteProduct(row) {
console.log(row);
let ploay = {

View File

@ -31,7 +31,7 @@
<div class="user-area">
<a @click="$router.push('/product/productHome')" v-if="loginState" class="login-btn">控制台</a>
<a @click="goB" v-if="loginState" class="login-btn">控制台</a>
<a @click="$router.push({
path:'/login',
query:{
@ -306,6 +306,13 @@ export default Vue.extend({
// },
methods: {
goB() {
if (sessionStorage.getItem('jueseNew').includes('客户')) {
this.$router.push('/product/productHome')
} else if (sessionStorage.getItem('jueseNew').includes('运营')) {
this.$router.push('/operation/supplierManagement')
}
},
init() {
// let params = {
// url_link: this.GetQueryString(window.location.href)

View File

@ -10,8 +10,7 @@
<span class="category-name">{{ category.first_level_name }}</span>
<span style="display: flex;margin-left: 0px;padding-left: 0px;">|</span>
<div class="menu-item">
<span v-for="(secondary, index) in category.secondaryClassification"
:key="secondary.id">
<span v-for="(secondary, index) in category.secondaryClassification" :key="secondary.id">
{{ secondary.second_level_name }}{{ index < category.secondaryClassification.length - 1 ? ' / '
: '' }} </span>
</div>
@ -19,13 +18,14 @@
</ul>
<transition name="slide-fade">
<!-- v-if="currentCategory" -->
<div v-loading="loading" element-loading-text="加载中..." element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.8)" class="rightBox" v-if="currentCategory" @mouseenter="keepProductList" @mouseleave="hideProductList">
<div v-loading="loading" element-loading-text="加载中..." element-loading-spinner="el-icon-loading"
element-loading-background="rgba(255, 255, 255, 0.8)" class="rightBox" v-if="currentCategory"
@mouseenter="keepProductList" @mouseleave="hideProductList">
<div class="rightBox-content">
<!-- 二级菜单标题 -->
<div class="secondary-menu">
<div v-for="secondary in currentCategory.secondaryClassification"
:key="secondary.id" class="secondary-item"
:class="{ active: selectedSecondary === secondary }"
<div v-for="secondary in currentCategory.secondaryClassification" :key="secondary.id"
class="secondary-item" :class="{ active: selectedSecondary === secondary }"
@mouseenter="selectSecondary(secondary)">
{{ secondary.second_level_name }}
</div>
@ -47,14 +47,15 @@
<!-- 如果有四级菜单product_list直接显示所有四级菜单项 -->
<div v-if="third.product_list && third.product_list.length > 0"
class="product-grid">
<div v-for="(product, index) in third.product_list"
:key="product.id" class="product-tag">
<div @click="openTalk" v-for="(product, index) in third.product_list"
:key="product.id"
class="product-tag">
{{ product.first_level_name }}
</div>
</div>
<!-- 如果没有四级菜单将三级菜单项视为四级菜单项显示 -->
<div v-else class="product-grid">
<div class="product-tag ">
<div @click="openTalk" class="product-tag ">
{{ third.third_level_name }}
</div>
</div>
@ -81,8 +82,8 @@
<!-- 默认显示所有二级菜单项 -->
<div v-else class="jd-style-menu">
<div v-for="secondary in currentCategory.secondaryClassification"
:key="secondary.id" class="category-section">
<div v-for="secondary in currentCategory.secondaryClassification" :key="secondary.id"
class="category-section">
<div class="section-header">
<span class="section-title">{{ secondary.second_level_name }}</span>
<span class="section-arrow">></span>
@ -100,19 +101,24 @@
</div>
</div>
</transition>
<Talk></Talk>
</aside>
</template>
<script>
import { reqNcMatchMenu } from '@/api/ncmatch';
import { buildDynamicStructure } from './buildNcmatchTree';
import Talk from '@/views/homePage/dialog/talk/index.vue';
export default {
name: 'menuAside',
components: {
Talk
},
data() {
return {
currentCategory: null,
selectedSecondary: null,
hideTimer: null,
categories: [ ],
categories: [],
loading: false,
}
},
@ -120,13 +126,17 @@ export default {
this.getCategories();
},
methods: {
async openTalk() {
await this.hideProductList('quick')
this.$store.commit('setShowTalk', true);
},
getCategories() {
this.loading = true;
reqNcMatchMenu({ url_link: window.location.href }).then(res => {
this.loading = false;
if (res.status) {
this.categories = buildDynamicStructure(res.data)
console.log("测试",this.categories);
console.log("测试", this.categories);
// this.categories = res.data.map(item => {
// return {
@ -163,7 +173,13 @@ export default {
this.hideTimer = null;
}
},
hideProductList() {
hideProductList(type) {
if (type === 'quick') {
this.currentCategory = null;
this.selectedSecondary = null;
this.hideTimer = null;
return
}
// rightBox
this.hideTimer = setTimeout(() => {
this.currentCategory = null;
@ -258,14 +274,13 @@ export default {
position: absolute;
left: 100%;
top: 0;
border: 1px solid red;
width: 1000px;
background: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 9999;
padding: 25px;
// height: 500px;
min-height: 350px;
margin-left: 10px;
overflow: visible;
white-space: nowrap;
@ -316,20 +331,17 @@ export default {
height: 100%;
max-height: calc(100vh - 280px);
overflow-y: auto;
border: 5px solid red;
.jd-style-menu {
width: 100%;
display: flex;
flex-direction: column;
gap: 20px;
border: 1px solid red;
.category-section {
display: flex;
justify-content: flex-start;
align-items: center;
border: 1px solid blue;
.section-header {
display: flex;
@ -340,8 +352,6 @@ export default {
font-size: 12px;
font-weight: 600;
color: #333;
border: 1px solid red;
;
margin-right: 8px;
}
@ -361,9 +371,7 @@ export default {
align-items: center;
.product-tag {
border: 1px solid red;
height: fit-content !important;
background: #f8f9fa;
font-size: 12px;
color: #666;
cursor: pointer;

View File

@ -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 || '';