331-开发组件
This commit is contained in:
parent
0f6b37e52e
commit
c6c820c827
|
@ -28,18 +28,19 @@
|
|||
name: '组件展示',
|
||||
key: 'business-presentation',
|
||||
},
|
||||
{
|
||||
name: '关联能力',
|
||||
key: 'business-associated-ability',
|
||||
},
|
||||
{
|
||||
name: '功能介绍',
|
||||
key: 'function-introduction',
|
||||
},
|
||||
|
||||
{
|
||||
name: '应用场景',
|
||||
key: 'application-scenarios',
|
||||
},
|
||||
{
|
||||
name: '关联能力',
|
||||
key: 'business-associated-ability',
|
||||
},
|
||||
{
|
||||
name: '应用案例',
|
||||
key: 'application-case',
|
||||
|
@ -68,6 +69,7 @@
|
|||
list.value = []
|
||||
let arr = [
|
||||
'组件视频介绍',
|
||||
'关联能力',
|
||||
'功能介绍',
|
||||
'应用场景',
|
||||
'应用案例',
|
||||
|
@ -117,6 +119,7 @@
|
|||
list.value = []
|
||||
let arr = [
|
||||
'组件视频介绍',
|
||||
'关联能力',
|
||||
'功能介绍',
|
||||
'应用场景',
|
||||
'应用案例',
|
||||
|
|
|
@ -115,6 +115,8 @@
|
|||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
dataFrom.value.content[0].link.value = props.dataList.apiUrl
|
||||
dataFrom.value.content[0].facilitator.value = props.dataList.deptContacts
|
||||
dataFrom.value.content[0].people.value = props.dataList.deptContacts
|
||||
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
|
||||
console.log('dataList', props.dataList)
|
||||
props.dataList.infoList.map((item) => {
|
||||
if (item.attrType === '组件地址') {
|
||||
|
@ -139,6 +141,8 @@
|
|||
} else {
|
||||
dataFrom.value.content[0].link.value = val.apiUrl
|
||||
dataFrom.value.content[0].facilitator.value = val.deptContacts
|
||||
dataFrom.value.content[0].people.value = val.deptContacts
|
||||
dataFrom.value.content[0].phone.value = val.deptPhone
|
||||
console.log('dataList', val)
|
||||
val.infoList.map((item) => {
|
||||
if (item.attrType === '组件地址') {
|
||||
|
|
|
@ -34,14 +34,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="bottom" v-if="props.dataList.id">
|
||||
<!-- <a-button type="primary" @click="toView()">
|
||||
<a-button type="primary" @click="toView()">
|
||||
<template #icon><form-outlined /></template>
|
||||
申请使用
|
||||
</a-button>
|
||||
<a-button type="primary" @click="addShoppingCart()">
|
||||
<template #icon><shopping-cart-outlined /></template>
|
||||
加入购物车
|
||||
</a-button> -->
|
||||
</a-button>
|
||||
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -49,42 +49,42 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
// import { ShoppingCartOutlined } from '@ant-design/icons-vue'
|
||||
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
|
||||
import { defineProps, ref, watch } from 'vue'
|
||||
import { scInsert } from '@/api/personalCenter'
|
||||
// import { sgcInsert } from '@/api/home'
|
||||
// import { useRouter } from 'vue-router'
|
||||
// import mybus from '@/myplugins/mybus'
|
||||
import { sgcInsert } from '@/api/home'
|
||||
import { useRouter } from 'vue-router'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import { message } from 'ant-design-vue'
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
// const router = useRouter()
|
||||
const router = useRouter()
|
||||
const applicationArea = ref('')
|
||||
// // 加入申购车
|
||||
// const addShoppingCart = () => {
|
||||
// console.log('加入申购车==================>', props.dataList)
|
||||
// sgcInsert({
|
||||
// delFlag: '0',
|
||||
// resourceId: props.dataList.id,
|
||||
// // userId: userId.value,
|
||||
// }).then((res) => {
|
||||
// console.log(res)
|
||||
// message.success('添加申购车成功!')
|
||||
// mybus.emit('getSgcNum')
|
||||
// })
|
||||
// }
|
||||
// // 立即申请
|
||||
// function toView() {
|
||||
// // window.open(newpage.href, '_blank')
|
||||
// router.push({
|
||||
// path: '/apply',
|
||||
// query: {
|
||||
// name: props.dataList.name,
|
||||
// resourceId: [props.dataList.id],
|
||||
// },
|
||||
// })
|
||||
// }
|
||||
// 加入申购车
|
||||
const addShoppingCart = () => {
|
||||
console.log('加入申购车==================>', props.dataList)
|
||||
sgcInsert({
|
||||
delFlag: '0',
|
||||
resourceId: props.dataList.id,
|
||||
// userId: userId.value,
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
message.success('添加申购车成功!')
|
||||
mybus.emit('getSgcNum')
|
||||
})
|
||||
}
|
||||
// 立即申请
|
||||
function toView() {
|
||||
// window.open(newpage.href, '_blank')
|
||||
router.push({
|
||||
path: '/apply',
|
||||
query: {
|
||||
name: props.dataList.name,
|
||||
resourceId: [props.dataList.id],
|
||||
},
|
||||
})
|
||||
}
|
||||
// 收藏
|
||||
const goTOCollection = () => {
|
||||
console.log('收藏===================》', props.dataList)
|
||||
|
|
Loading…
Reference in New Issue