main #139
@ -338,7 +338,10 @@ export default Vue.extend({
|
|||||||
supplySquare: isEn ? 'Supply Square' : '供需广场',
|
supplySquare: isEn ? 'Supply Square' : '供需广场',
|
||||||
// about: isEn ? 'About Us' : '关于我们'
|
// 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() {
|
aiPanelStyle() {
|
||||||
if (this.aiPanelPosition.left === null || this.aiPanelPosition.top === null) return {}
|
if (this.aiPanelPosition.left === null || this.aiPanelPosition.top === null) return {}
|
||||||
|
|||||||
@ -152,11 +152,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-foot">
|
<div class="card-foot">
|
||||||
<span class="price">{{ getPriceText(item) }}</span>
|
<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>
|
<i v-if="loadingStates[item.id]" class="el-icon-loading"></i>
|
||||||
<span v-else>→</span>
|
<span v-else>→</span>
|
||||||
</button>
|
</button> -->
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
@ -209,7 +209,7 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<label>所属类别 <span>*</span></label>
|
<label>所属类别 <span>*</span></label>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="demandForm.product_category"
|
v-model="demandForm.product_category"
|
||||||
class="demand-category-cascader"
|
class="demand-category-cascader"
|
||||||
:options="demandCategoryOptions"
|
:options="demandCategoryOptions"
|
||||||
@ -278,7 +278,7 @@ import {
|
|||||||
reqGetProductCategorySearch,
|
reqGetProductCategorySearch,
|
||||||
reqGetProductDetail,
|
reqGetProductDetail,
|
||||||
reqGetSupplyAndDemandSquareList,
|
reqGetSupplyAndDemandSquareList,
|
||||||
reqPublishProductAdd,
|
reqPublishProductAdd,
|
||||||
reqSupplyAndDemandFirstCategory
|
reqSupplyAndDemandFirstCategory
|
||||||
} from '@/api/ncmatch'
|
} from '@/api/ncmatch'
|
||||||
import { buildCaTree } from '@/views/homePage/ncmatch/mainPage/sendProduct/buildCaTree'
|
import { buildCaTree } from '@/views/homePage/ncmatch/mainPage/sendProduct/buildCaTree'
|
||||||
@ -381,6 +381,7 @@ export default {
|
|||||||
filteredPlazaDemandList() {
|
filteredPlazaDemandList() {
|
||||||
const keyword = this.keyword.toLowerCase()
|
const keyword = this.keyword.toLowerCase()
|
||||||
return this.plazaDemandData.filter(item => {
|
return this.plazaDemandData.filter(item => {
|
||||||
|
if (item.isPublishedDemand) return false
|
||||||
const matchTab = this.currentPlazaTab === '全部' || item.type === this.currentPlazaTab
|
const matchTab = this.currentPlazaTab === '全部' || item.type === this.currentPlazaTab
|
||||||
const matchSearch = !keyword || [
|
const matchSearch = !keyword || [
|
||||||
item.title,
|
item.title,
|
||||||
@ -524,24 +525,16 @@ export default {
|
|||||||
formData.append('contact_person', this.demandForm.contact)
|
formData.append('contact_person', this.demandForm.contact)
|
||||||
formData.append('phone_number', this.demandForm.phone)
|
formData.append('phone_number', this.demandForm.phone)
|
||||||
formData.append('application_scenario', this.demandForm.scenario)
|
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 => {
|
reqPublishProductAdd(formData).then(res => {
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
this.plazaDemandData.unshift(submittedDemand)
|
this.plazaDemandData = this.plazaDemandData.filter(item => {
|
||||||
this.currentPlazaTab = '全部'
|
return item.title !== this.demandForm.title || item.desc !== this.demandForm.desc
|
||||||
|
})
|
||||||
this.publishDemandVisible = false
|
this.publishDemandVisible = false
|
||||||
this.resetDemandForm()
|
this.resetDemandForm()
|
||||||
this.$message.success(res.msg || '需求发布成功!')
|
this.$message.success('需求发布成功!')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg || '需求发布失败')
|
this.$message.error('需求发布失败')
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.error('需求发布失败,请稍后重试')
|
this.$message.error('需求发布失败,请稍后重试')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user