|
|
@ -1,11 +1,12 @@ |
|
|
|
<template> |
|
|
|
<div class="inner equ-box"> |
|
|
|
<div class="equ-info d-flex"> |
|
|
|
<img :src="obj.img" alt="" /> |
|
|
|
<img :src="obj.img" alt v-if="listState === 1" /> |
|
|
|
<img :src="obj.visitLocation" alt v-if="listState === 3" /> |
|
|
|
<div class="equ-info-box"> |
|
|
|
<p class="equ-name">{{ obj.name }}</p> |
|
|
|
<div class="d-flex flex-wrap"> |
|
|
|
<div style="width: 200px" class="equ-info-left"> |
|
|
|
<div class="d-flex flex-wrap" v-if="listState === 1"> |
|
|
|
<div class="equ-info-left" style="width: 200px"> |
|
|
|
<p>仪器名字:</p> |
|
|
|
<p>制造商:</p> |
|
|
|
<p>型号:</p> |
|
|
@ -21,15 +22,32 @@ |
|
|
|
<p>{{ obj.specifications }}</p> |
|
|
|
<p>{{ obj.performance }}</p> |
|
|
|
<p> |
|
|
|
<span v-for="(item, index) in obj.selPeoList" :key="index">{{ item.contactsName }}、</span> |
|
|
|
<span :key="index" v-for="(item, index) in obj.selPeoList">{{ item.contactsName }}、</span> |
|
|
|
</p> |
|
|
|
<p> |
|
|
|
<span v-for="(item, index) in obj.selPeoList" :key="index">{{ item.contactsPhone }}、</span> |
|
|
|
<span :key="index" v-for="(item, index) in obj.selPeoList">{{ item.contactsPhone }}、</span> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="d-flex flex-wrap" v-if="listState === 3"> |
|
|
|
<div class="equ-info-left" style="width: 200px"> |
|
|
|
<p>公司名称:</p> |
|
|
|
<p>产品编号:</p> |
|
|
|
<p>联系人:</p> |
|
|
|
</div> |
|
|
|
<div style="width: 500px"> |
|
|
|
<p>{{ obj.companyname }}</p> |
|
|
|
<p>{{ obj.identifier }}</p> |
|
|
|
<p> |
|
|
|
<span :key="index" v-for="(item, index) in obj.selPeoList">{{ item.contactsName }}、</span> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p class="equ-btn"> |
|
|
|
<intention-model :type-data="typeData" style="margin-right: 20px; float: left" /> |
|
|
|
<intention-model |
|
|
|
:type-data="listState === 1 ? typeData : typeProductData" |
|
|
|
style="margin-right: 20px; float: left" |
|
|
|
/> |
|
|
|
<!-- <a-button style="margin-right: 20px">转化意向</a-button> --> |
|
|
|
<!-- <a-button type="primary">加入购物车</a-button> --> |
|
|
|
<add-shopping :type-data="typeData" style="margin-right: 20px; float: right" /> |
|
|
@ -37,13 +55,15 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="content-box"> |
|
|
|
<div v-dompurify-html="obj.purpose"></div> |
|
|
|
<div v-dompurify-html="obj.purpose" v-if="listState === 1"></div> |
|
|
|
<div v-dompurify-html="obj.details" v-if="listState === 3"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { selInstrumentMes } from 'config/api'; |
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import { selInstrumentMes, selProductMes } from 'config/api'; |
|
|
|
import IntentionModel from 'components/Introduce/IntentionModel.vue'; |
|
|
|
import AddShopping from 'components/Introduce/AddShopping.vue'; |
|
|
|
export default { |
|
|
@ -56,13 +76,24 @@ export default { |
|
|
|
type: 1, |
|
|
|
Id: '', |
|
|
|
}, |
|
|
|
typeProductData: { |
|
|
|
type: 3, |
|
|
|
Id: '', |
|
|
|
}, |
|
|
|
id: 0, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: mapState('home', ['listState']), |
|
|
|
created() { |
|
|
|
this.id = this.$route.params.id; |
|
|
|
this.typeData.Id = this.$route.params.id; |
|
|
|
this.getData(); |
|
|
|
if (this.listState === 1) { |
|
|
|
this.typeData.Id = this.$route.params.id; |
|
|
|
this.getData(); |
|
|
|
} |
|
|
|
if (this.listState === 3) { |
|
|
|
this.typeProductData.Id = this.$route.params.id; |
|
|
|
this.getProductData(); |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async getData() { |
|
|
@ -70,6 +101,20 @@ export default { |
|
|
|
const params = { param: { id: this.id } }; |
|
|
|
const res = await selInstrumentMes(params); |
|
|
|
const { code, data, msg } = res.data; |
|
|
|
if (code === 200) { |
|
|
|
this.obj = data; |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询 产品列表 详情 |
|
|
|
async getProductData() { |
|
|
|
try { |
|
|
|
const params = { param: { id: this.id } }; |
|
|
|
const res = await selProductMes(params); |
|
|
|
const { code, data, msg } = res.data; |
|
|
|
if (code === 200) { |
|
|
|
console.log(data); |
|
|
|
this.obj = data; |
|
|
|