main #139

Merged
charles merged 2 commits from main into prod 2026-07-15 17:04:36 +08:00
2 changed files with 14 additions and 18 deletions

View File

@ -338,7 +338,10 @@ export default Vue.extend({
supplySquare: isEn ? 'Supply Square' : '供需广场',
// about: isEn ? 'About Us' : ''
}
return this.productMenuItems.map(item => ({ ...item, label: labels[item.action] || item.action }))
const hiddenNcmatchActions = ['computeMarket', 'trainPlatform', 'agentStore']
return this.productMenuItems
.filter(item => !this.isNcmatchDomain || !hiddenNcmatchActions.includes(item.action))
.map(item => ({ ...item, label: labels[item.action] || item.action }))
},
aiPanelStyle() {
if (this.aiPanelPosition.left === null || this.aiPanelPosition.top === null) return {}

View File

@ -152,11 +152,11 @@
</div>
<div class="card-foot">
<span class="price">{{ getPriceText(item) }}</span>
<button type="button" @click="openDetail(item)">
<!-- <button type="button" @click="openDetail(item)">
查看详情
<i v-if="loadingStates[item.id]" class="el-icon-loading"></i>
<span v-else></span>
</button>
</button> -->
</div>
</article>
</div>
@ -209,7 +209,7 @@
<div class="modal-body">
<div class="form-item">
<label>所属类别 <span>*</span></label>
<el-cascader
<el-cascader
v-model="demandForm.product_category"
class="demand-category-cascader"
:options="demandCategoryOptions"
@ -278,7 +278,7 @@ import {
reqGetProductCategorySearch,
reqGetProductDetail,
reqGetSupplyAndDemandSquareList,
reqPublishProductAdd,
reqPublishProductAdd,
reqSupplyAndDemandFirstCategory
} from '@/api/ncmatch'
import { buildCaTree } from '@/views/homePage/ncmatch/mainPage/sendProduct/buildCaTree'
@ -381,6 +381,7 @@ export default {
filteredPlazaDemandList() {
const keyword = this.keyword.toLowerCase()
return this.plazaDemandData.filter(item => {
if (item.isPublishedDemand) return false
const matchTab = this.currentPlazaTab === '全部' || item.type === this.currentPlazaTab
const matchSearch = !keyword || [
item.title,
@ -524,24 +525,16 @@ export default {
formData.append('contact_person', this.demandForm.contact)
formData.append('phone_number', this.demandForm.phone)
formData.append('application_scenario', this.demandForm.scenario)
const submittedDemand = {
title: this.demandForm.title,
company: this.demandForm.company,
type: this.demandForm.type,
scenario: this.demandForm.scenario,
tags: [this.demandForm.type].filter(Boolean),
desc: this.demandForm.desc
}
reqPublishProductAdd(formData).then(res => {
if (res.status) {
this.plazaDemandData.unshift(submittedDemand)
this.currentPlazaTab = '全部'
this.plazaDemandData = this.plazaDemandData.filter(item => {
return item.title !== this.demandForm.title || item.desc !== this.demandForm.desc
})
this.publishDemandVisible = false
this.resetDemandForm()
this.$message.success(res.msg || '需求发布成功!')
this.$message.success('需求发布成功!')
} else {
this.$message.error(res.msg || '需求发布失败')
this.$message.error('需求发布失败')
}
}).catch(() => {
this.$message.error('需求发布失败,请稍后重试')