BUG修改
This commit is contained in:
parent
2c95fa65af
commit
f3499c31b0
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-05-06 11:12:00
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-07-21 15:32:49
|
||||
* @LastEditTime: 2022-07-21 16:00:17
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-08 11:56:28
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-07-19 15:02:23
|
||||
* @LastEditTime: 2022-07-21 16:18:54
|
||||
* @Description: 算法详情页头部
|
||||
-->
|
||||
<template>
|
||||
|
@ -44,14 +44,14 @@
|
|||
</a-tooltip>
|
||||
</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>
|
||||
<!-- 融合服务 存在fuseResourceList -->
|
||||
<a-button
|
||||
type="primary"
|
||||
|
@ -75,11 +75,10 @@
|
|||
// import { ShoppingCartOutlined } from '@ant-design/icons-vue'
|
||||
import { defineProps, ref, watch } from 'vue'
|
||||
import { scInsert, scDel } from '@/api/personalCenter'
|
||||
// import { sgcInsert } from '@/api/home'
|
||||
// import { useRouter } from 'vue-router'
|
||||
// import mybus from '@/myplugins/mybus'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { sgcInsert } from '@/api/home'
|
||||
import { useRouter } from 'vue-router'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import { message } from 'ant-design-vue'
|
||||
// 获取当前路由地址
|
||||
const router = useRouter()
|
||||
|
||||
|
@ -88,25 +87,23 @@
|
|||
})
|
||||
|
||||
console.log('dataList------------>', props.dataList)
|
||||
|
||||
// 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')
|
||||
// })
|
||||
// }
|
||||
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')
|
||||
function toView() {
|
||||
// window.open(newpage.href, '_blank')
|
||||
// router.push({
|
||||
// path: '/apply',
|
||||
// query: {
|
||||
|
@ -114,7 +111,31 @@
|
|||
// resourceId: [props.dataList.id],
|
||||
// },
|
||||
// })
|
||||
// }
|
||||
console.log('一键申请===================>', props.dataList)
|
||||
localStorage.setItem(
|
||||
'applyList',
|
||||
JSON.stringify([
|
||||
{
|
||||
arr: [
|
||||
{
|
||||
delFlag: props.dataList.delFlag,
|
||||
description: props.dataList.description,
|
||||
resourceId: props.dataList.id,
|
||||
resourceName: props.dataList.name,
|
||||
time: props.dataList.createDate,
|
||||
type: props.dataList.type,
|
||||
// componentType: '智能算法',
|
||||
},
|
||||
],
|
||||
deptId: props.dataList.deptId,
|
||||
deptName: props.dataList.deptName,
|
||||
},
|
||||
])
|
||||
)
|
||||
router.push({
|
||||
path: '/apply',
|
||||
})
|
||||
}
|
||||
// 融合服务--一键申请
|
||||
const handleAKeyApplication = () => {
|
||||
let _applyList = []
|
||||
|
@ -149,7 +170,7 @@
|
|||
console.log('收藏===================》', props.dataList)
|
||||
if (scFlag2.value) {
|
||||
scFlag2.value = false
|
||||
if (props.dataList.isCollect) {
|
||||
if (props.dataList.isCollect == 'true') {
|
||||
scDel([props.dataList.id]).then((res) => {
|
||||
if (res.data.msg === 'success') {
|
||||
message.success('取消成功')
|
||||
|
|
Loading…
Reference in New Issue