Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-07-15 17:33:47 +08:00
commit 497e3f5dbc
16 changed files with 1115 additions and 742 deletions

View File

@ -36,8 +36,8 @@
<div class="add">添加更多{{ configure.name }}</div> <div class="add">添加更多{{ configure.name }}</div>
<div class="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index"> <div class="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index">
<span>{{ val.name }}</span> <span>{{ val.name }}</span>
<!-- <a-input v-model:value="val.note1" ::maxlength="24" placeholder="'请填写' + val.name + ',不超过24个字符'" <a-input v-model:value="val.note1" ::maxlength="24" :placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"/> --> v-if="val.type == 'input'"/>
<template v-if="val.type == 'input2'"> <template v-if="val.type == 'input2'">
<a-input <a-input
v-model:value="val.note1" v-model:value="val.note1"

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 17:48:03 * @Date: 2022-03-29 17:48:03
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-04-12 10:07:15 * @LastEditTime: 2022-07-15 16:42:22
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -30,6 +30,13 @@ export function getUserInfo() {
method: 'get', method: 'get',
}) })
} }
export function getDeptAll() {
//mock.js使dataaccessToken使mockheaders
return request({
url: '/sys/dept/all',
method: 'get',
})
}
export function logout() { export function logout() {
return request({ return request({

View File

@ -46,6 +46,7 @@
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:fileList="fileList" :fileList="fileList"
:packageList="packageList"
:imgList="imgList" :imgList="imgList"
:externalField="['接口服务', '接口请求方式']" :externalField="['接口服务', '接口请求方式']"
:configure="bs" :configure="bs"
@ -197,6 +198,7 @@
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
const packageList = ref({})
const imgList = ref({}) const imgList = ref({})
const videoList = ref({}) const videoList = ref({})
const data = ref({}) const data = ref({})
@ -310,6 +312,18 @@
key: val.name, key: val.name,
}) })
navList2.value.push(val.name) navList2.value.push(val.name)
if (val.name === '部署与使用') {
console.log(val, '部署与使用')
val.children.forEach((valChild) => {
if (valChild.name === '使用方式') {
valChild.children.forEach((valChilds) => {
if (valChilds.name === '使用方式') {
valChilds.note1 = '调用接口'
}
})
}
})
}
}) })
data.value = res.data.data.children data.value = res.data.data.children
refData.value = data.value.filter( refData.value = data.value.filter(
@ -342,6 +356,9 @@
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {
fileList.value = obj fileList.value = obj
}) })
mybus.on('chagePackageList', (obj) => {
packageList.value = obj
})
mybus.on('chageImgList', (obj) => { mybus.on('chageImgList', (obj) => {
imgList.value = obj imgList.value = obj
}) })
@ -432,10 +449,15 @@
background: #999; background: #999;
} }
} }
.finish { .btn {
color: #0087ff; display: flex;
.bg-box { justify-content: space-around;
background: #9ccefa; padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
height: 35px;
text-align: center;
color: #fff; color: #fff;
border: 1px solid #9ccefa; border: 1px solid #9ccefa;
span { span {
@ -446,12 +468,22 @@
.line { .line {
background: #0087ff; background: #0087ff;
} }
button:nth-of-type(1) {
color: #0087ff;
background: #e1edfa;
}
button:nth-of-type(2) {
background: #01c5dc;
}
}
.first {
justify-content: space-around;
} }
} }
.btn { .btn {
display: flex; display: flex;
justify-content: space-around; justify-content: space-between;
padding: 10px 350px 0; padding: 10px 400px 0;
button { button {
cursor: pointer; cursor: pointer;
width: 80px; width: 80px;
@ -471,7 +503,7 @@
} }
} }
.first { .first {
justify-content: space-around; justify-content: center;
} }
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 16:21:41 * @LastEditTime: 2022-07-15 16:56:49
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -117,7 +117,23 @@
</template> </template>
<template v-else> <template v-else>
<div class="bottom"> <div class="bottom">
<div class="form" v-for="item in title.children" :key="item.id"> <div
class="form"
v-for="item in title.children"
:key="item.id"
v-show="
!(
(showType == '调用接口' && item.name == '平台地址') ||
(showType == '调用接口' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == '接口请求方式') ||
(showType == '平台对接' && item.name == '服务接口') ||
(showType == 'SDK' && item.name == '平台地址') ||
(showType == 'SDK' && item.name == '接口请求方式') ||
(showType == 'SDK' && item.name == '服务接口')
)
"
>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<a-input <a-input
v-if="item.type == 'input'" v-if="item.type == 'input'"
@ -176,6 +192,15 @@
:list="props.fileList2" :list="props.fileList2"
tip="支持文件类型大小不超过100M" tip="支持文件类型大小不超过100M"
></upload> ></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div <div
class="Technical-text" class="Technical-text"
v-else-if="item.type == 'richText'" v-else-if="item.type == 'richText'"
@ -211,6 +236,21 @@
> >
请选择关联组件 请选择关联组件
</a-button> </a-button>
<a-select
v-else-if="item.type == 'select' && item.name == '使用方式'"
style="width: 240px"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
>
{{ itemSelect.dictLabel }}
</a-select-option>
</a-select>
<a-select <a-select
v-else-if="item.type == 'select'" v-else-if="item.type == 'select'"
style="width: 240px" style="width: 240px"
@ -225,6 +265,18 @@
{{ itemSelect.dictLabel }} {{ itemSelect.dictLabel }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-select
v-else-if="item.name === '归属部门'"
style="width: 240px"
v-model:value="item.note1"
show-search
placeholder="请输入关键字"
:options="item.options"
:filter-option="filterOption"
@focus="handleFocus"
@blur="handleBlur"
@change="handleChange2"
></a-select>
<div <div
v-else-if="item.type == 'checkBox'" v-else-if="item.type == 'checkBox'"
class="application-Area" class="application-Area"
@ -277,6 +329,7 @@
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import upload from '@/views/components/upload' import upload from '@/views/components/upload'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { getUserInfo, getDeptAll } from '@/api/user'
import { import {
getCategoryTreePage, getCategoryTreePage,
queryApplicationRelByResourceId, queryApplicationRelByResourceId,
@ -296,6 +349,8 @@
// //
fileList: { type: Array, default: null }, fileList: { type: Array, default: null },
fileList2: { type: Array, default: null }, fileList2: { type: Array, default: null },
//
packageList: { type: Array, default: null },
// //
imgList: { type: Array, default: null }, imgList: { type: Array, default: null },
// //
@ -412,6 +467,25 @@
} }
data.value.list.push(item) data.value.list.push(item)
}) })
} else if (item.name === '归属部门') {
getDeptAll().then((res) => {
const dataList = []
res.data.data.forEach((element) => {
dataList.push({
value: element.id,
label: element.name,
})
})
item.options = dataList
if (!item.note1) {
getUserInfo().then(({ data: res1 }) => {
console.log(res1.data)
item.note1 = res1.data.deptId
console.log('默认部门=========>', item, res1.data)
data.value.list.push(item)
})
}
})
} else { } else {
data.value.list.push(item) data.value.list.push(item)
} }
@ -591,6 +665,13 @@
visibleAssociatedApplication.value = false visibleAssociatedApplication.value = false
} }
const showType = ref('')
const showTypeClick = (e) => {
showType.value = e
console.log(e, 'showType', showType.value)
}
showTypeClick('调用接口')
watch(data.value.list, (newProps, oldProps) => { watch(data.value.list, (newProps, oldProps) => {
// console.log(newProps, oldProps) // console.log(newProps, oldProps)
newProps.forEach((val) => { newProps.forEach((val) => {
@ -624,6 +705,21 @@
} }
}) })
}) })
const handleChange2 = (value) => {
console.log(`selected ${value}`)
}
const handleBlur = () => {
console.log('blur')
}
const handleFocus = () => {
console.log('focus')
}
const filterOption = (input, option) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
</script> </script>
<style></style> <style></style>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -76,6 +76,8 @@
file.type === 'application/msword' || file.type === 'application/msword' ||
file.type === file.type ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
} else if (props.type === '压缩包') {
flag = file.type === 'application/x-zip-compressed'
} }
console.log(flag) console.log(flag)
if (!flag) { if (!flag) {
@ -115,6 +117,8 @@
} else { } else {
mybus.emit('chageFileList', fileList.value) mybus.emit('chageFileList', fileList.value)
} }
} else if (props.type === '压缩包') {
mybus.emit('chagePackageList', fileList.value)
} else if (props.type === '视频') { } else if (props.type === '视频') {
mybus.emit('chageVideoList', fileList.value) mybus.emit('chageVideoList', fileList.value)
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:41:52 * @LastEditTime: 2022-07-15 17:30:19
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -58,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -67,7 +69,7 @@
<script setup> <script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -75,6 +77,7 @@
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
// console.log('==================>', props.dataList.isCollect)
const router = useRouter() const router = useRouter()
const applicationArea = ref('') const applicationArea = ref('')
const deploymentLocation = ref('') // const deploymentLocation = ref('') //
@ -121,12 +124,38 @@
} }
const componentType = ref('') const componentType = ref('')
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
}) })
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
if (props.dataList.infoList) { if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(

View File

@ -8,10 +8,10 @@
></DetalsTitle> ></DetalsTitle>
</div> </div>
<div class="content" v-for="item in dataFrom.content" :key="item.title"> <div class="content" v-for="item in dataFrom.content" :key="item.title">
<div class="content-left"> <div class="content-left" v-if="item.titleType === '调用接口'">
<div class="left"> <div class="left">
<div class="content-left-title"> <div class="content-left-title">
<span>{{ item.title }}</span> <span>{{ item.title }}{{ item.titleType }}</span>
</div> </div>
<div class="content-left-content"> <div class="content-left-content">
<p> <p>
@ -29,7 +29,41 @@
</div> </div>
<div class="right"> <div class="right">
<div @click="technical()">技术文档</div> <div @click="technical()">技术文档</div>
<div @click="technicalNew()">新手指引</div> <!-- <div @click="technicalNew()">新手指引</div> -->
<!-- <div @click="SDKClick()">SDK安装包</div> -->
</div>
</div>
<div class="content-left" v-else-if="item.titleType === '平台对接'">
<div class="left">
<div class="content-left-title">
<span>{{ item.title }}{{ item.titleType }}</span>
</div>
<div class="content-left-content">
<p>
<span>{{ item.linkPlatform.name }}</span>
<a-tooltip>
<template #title>{{ item.linkPlatform.value }}</template>
<span>{{ item.linkPlatform.value }}</span>
</a-tooltip>
</p>
</div>
</div>
<div class="right">
<div @click="technical()">技术文档</div>
<!-- <div @click="technicalNew()">新手指引</div> -->
<!-- <div @click="SDKClick()">SDK安装包</div> -->
</div>
</div>
<div class="content-left" v-else-if="item.titleType === 'SDK'">
<div class="left">
<div class="content-left-title">
<span>{{ item.title }}{{ item.titleType }}</span>
</div>
</div>
<div class="right">
<div @click="technical()">技术文档</div>
<!-- <div @click="technicalNew()">新手指引</div> -->
<div @click="SDKClick()">SDK安装包</div>
</div> </div>
</div> </div>
<div class="content-right"> <div class="content-right">
@ -98,13 +132,19 @@
let dataFrom = ref({ let dataFrom = ref({
title: '使用方式', title: '使用方式',
englishTitle: 'USAGE', englishTitle: 'USAGE',
SDK: '',
content: [ content: [
{ {
title: '组件地址', title: '使用方式',
titleType: '',
link: { link: {
name: '服务接口:', name: '服务接口:',
value: '', value: '',
}, },
linkPlatform: {
name: '平台地址:',
value: '',
},
postMethod: { postMethod: {
name: '请求方式:', name: '请求方式:',
value: '', value: '',
@ -151,7 +191,7 @@
dataFrom.value.content[0].facilitator.value = props.dataList.deptName dataFrom.value.content[0].facilitator.value = props.dataList.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone dataFrom.value.content[0].phone.value = props.dataList.deptPhone
dataFrom.value.content[0].postMethod.value = val.apiMethodType dataFrom.value.content[0].postMethod.value = props.dataList.apiMethodType
console.log('dataList', props.dataList) console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') { if (item.attrType === '组件地址') {
@ -163,8 +203,13 @@
} else if (item.attrType === '服务商联系电话') { } else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--' dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') { } else if (item.attrType === '服务接口') {
debugger
dataFrom.value.content[0].link.value = item.attrValue || '--' dataFrom.value.content[0].link.value = item.attrValue || '--'
} else if (item.attrType === '平台地址') {
dataFrom.value.content[0].linkPlatform.value = item.attrValue || '--'
} else if (item.attrType === 'SDK安装包') {
dataFrom.value.SDK = item.attrValue || '--'
} else if (item.attrType === '使用方式') {
dataFrom.value.content[0].titleType = item.attrValue || '--'
} }
}) })
} }
@ -203,8 +248,14 @@
} else if (item.attrType === '服务商联系电话') { } else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--' dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') { } else if (item.attrType === '服务接口') {
debugger
dataFrom.value.content[0].link.value = item.attrValue || '--' dataFrom.value.content[0].link.value = item.attrValue || '--'
} else if (item.attrType === '平台地址') {
dataFrom.value.content[0].linkPlatform.value =
item.attrValue || '--'
} else if (item.attrType === 'SDK安装包') {
dataFrom.value.SDK = item.attrValue || '--'
} else if (item.attrType === '使用方式') {
dataFrom.value.content[0].titleType = item.attrValue || '--'
} }
}) })
} }
@ -257,6 +308,19 @@
message.error('暂未上传使用手册') message.error('暂未上传使用手册')
} }
} }
function SDKClick() {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === 'SDK安装包'
)[0]
if (obj) {
window.open(dataFrom.value.SDK)
} else {
message.config({
top: '100px', //
})
message.error('SDK安装包')
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -282,6 +346,7 @@
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4); box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
padding: 0 0.35rem; padding: 0 0.35rem;
.left { .left {

View File

@ -68,11 +68,13 @@
item.attrType === '部署位置' item.attrType === '部署位置'
) { ) {
dataFrom.value.content[0].childrenContent.push(item) dataFrom.value.content[0].childrenContent.push(item)
} else if ( } else if (item.attrType === '等保定级') {
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
dataFrom.value.content[1].childrenContent.push(item) dataFrom.value.content[1].childrenContent.push(item)
let isAndNo = {
attrType: '是否等保备案',
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') { } else if (item.attrType === '访问地址') {
let obj = { let obj = {
attrType: '访问地址', attrType: '访问地址',
@ -85,7 +87,7 @@
let data = [ let data = [
{ {
attrType: '是否等保备案', attrType: '是否等保备案',
attrValue: '------', attrValue: '',
}, },
{ {
attrType: '等保定级', attrType: '等保定级',
@ -116,11 +118,13 @@
item.attrType === '部署位置' item.attrType === '部署位置'
) { ) {
dataFrom.value.content[0].childrenContent.push(item) dataFrom.value.content[0].childrenContent.push(item)
} else if ( } else if (item.attrType === '等保定级') {
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
dataFrom.value.content[1].childrenContent.push(item) dataFrom.value.content[1].childrenContent.push(item)
let isAndNo = {
attrType: '是否等保备案',
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') { } else if (item.attrType === '访问地址') {
let obj = { let obj = {
attrType: '访问地址', attrType: '访问地址',
@ -130,10 +134,11 @@
} }
}) })
if (dataFrom.value.content[1].childrenContent.length <= 0) { if (dataFrom.value.content[1].childrenContent.length <= 0) {
debugger
let data = [ let data = [
{ {
attrType: '是否等保备案', attrType: '是否等保备案',
attrValue: '------', attrValue: '',
}, },
{ {
attrType: '等保定级', attrType: '等保定级',

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:31:12 * @LastEditTime: 2022-07-15 17:30:26
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -53,13 +53,19 @@
加入购物车 加入购物车
</a-button> --> </a-button> -->
<!-- 融合服务 存在fuseResourceList --> <!-- 融合服务 存在fuseResourceList -->
<a-button type="primary" @click="handleAKeyApplication()" v-if="dataList.fuseResourceList"> <a-button
type="primary"
@click="handleAKeyApplication()"
v-if="dataList.fuseResourceList"
>
<template #icon> <template #icon>
<form-outlined /> <form-outlined />
</template> </template>
申请使用 申请使用
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -68,7 +74,7 @@
<script setup> <script setup>
// import { ShoppingCartOutlined } from '@ant-design/icons-vue' // import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
// import { sgcInsert } from '@/api/home' // import { sgcInsert } from '@/api/home'
// import { useRouter } from 'vue-router' // import { useRouter } from 'vue-router'
// import mybus from '@/myplugins/mybus' // import mybus from '@/myplugins/mybus'
@ -81,7 +87,7 @@ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
console.log('dataList------------>', props.dataList); console.log('dataList------------>', props.dataList)
// const router = useRouter() // const router = useRouter()
const applicationArea = ref('') const applicationArea = ref('')
@ -111,8 +117,8 @@ const applicationArea = ref('')
// } // }
// -- // --
const handleAKeyApplication = () => { const handleAKeyApplication = () => {
let _applyList = []; let _applyList = []
(props.dataList.fuseResourceList || []).map(v => { ;(props.dataList.fuseResourceList || []).map((v) => {
let resource = v.resource || {} let resource = v.resource || {}
let obj = { let obj = {
arr: [ arr: [
@ -131,22 +137,45 @@ const handleAKeyApplication = () => {
_applyList.push(obj) _applyList.push(obj)
}) })
localStorage.setItem( localStorage.setItem('applyList', JSON.stringify(_applyList))
'applyList',
JSON.stringify(_applyList)
)
router.push({ router.push({
path: '/apply', path: '/apply',
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
}) })
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
if (props.dataList.infoList) { if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
@ -157,7 +186,7 @@ watch(
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
console.log('props.dataList-----watch------->', val); console.log('props.dataList-----watch------->', val)
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:42:27 * @LastEditTime: 2022-07-15 17:31:32
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -62,7 +62,9 @@
</template> </template>
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -71,7 +73,7 @@
<script setup> <script setup>
import { ShoppingCartOutlined } from '@ant-design/icons-vue' import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -125,12 +127,38 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
}) })
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
if (props.dataList.infoList) { if (props.dataList.infoList) {
businessArea.value = props.dataList.infoList.filter( businessArea.value = props.dataList.infoList.filter(

View File

@ -138,10 +138,12 @@
flag.value = false flag.value = false
} else { } else {
// eslint-disable-next-line vue/no-setup-props-destructure // eslint-disable-next-line vue/no-setup-props-destructure
dataFrom.value.content[0].link.value = props.dataList.apiUrl dataFrom.value.content[0].link.value = props.dataList.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = props.dataList.deptName dataFrom.value.content[0].facilitator.value =
dataFrom.value.content[0].people.value = props.dataList.deptContacts props.dataList.deptName || '--'
dataFrom.value.content[0].phone.value = props.dataList.deptPhone dataFrom.value.content[0].people.value =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].phone.value = props.dataList.deptPhone || '--'
console.log('dataList', props.dataList) console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') { if (item.attrType === '组件地址') {
@ -173,10 +175,10 @@
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.content[0].link.value = val.apiUrl dataFrom.value.content[0].link.value = val.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = val.deptName dataFrom.value.content[0].facilitator.value = val.deptName || '--'
dataFrom.value.content[0].people.value = val.deptContacts dataFrom.value.content[0].people.value = val.deptContacts || '--'
dataFrom.value.content[0].phone.value = val.deptPhone dataFrom.value.content[0].phone.value = val.deptPhone || '--'
console.log('dataList', val) console.log('dataList', val)
val.infoList.map((item) => { val.infoList.map((item) => {
if (item.attrType === '组件地址') { if (item.attrType === '组件地址') {

View File

@ -103,23 +103,23 @@
flag.value = false flag.value = false
} else { } else {
dataFrom.value.content[0].childrenContent[1].attrValue = dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue = dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptPhone props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue = dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName props.dataList.deptName || '--'
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') { if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') { } else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue = dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue item.attrValue || '--'
} else if (item.attrType == '服务商' || item.attrType == '服务商名') { } else if (item.attrType == '服务商' || item.attrType == '服务商名') {
dataFrom.value.content[1].childrenContent[0].attrValue = dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue item.attrValue || '--'
} }
}) })
} }
@ -165,26 +165,26 @@
flag.value = false flag.value = false
} else { } else {
dataFrom.value.content[0].childrenContent[1].attrValue = dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue = dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptPhone props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue = dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName props.dataList.deptName || '--'
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') { if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') { } else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue = dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue item.attrValue || '--'
} else if ( } else if (
item.attrType == '服务商' || item.attrType == '服务商' ||
item.attrType == '服务商名' item.attrType == '服务商名'
) { ) {
dataFrom.value.content[1].childrenContent[0].attrValue = dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue item.attrValue || '--'
} }
}) })
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:42:59 * @LastEditTime: 2022-07-15 17:32:08
* @Description: 开发组件详情页头部 * @Description: 开发组件详情页头部
--> -->
<template> <template>
@ -58,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入购物车 加入购物车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -67,7 +69,7 @@
<script setup> <script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -120,12 +122,38 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
}) })
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
const componentType = ref('') const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:43:18 * @LastEditTime: 2022-07-15 17:32:31
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -58,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -67,7 +69,7 @@
<script setup> <script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -120,12 +122,38 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
}) })
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
} }
const componentType = ref('') const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {

View File

@ -142,10 +142,12 @@
flag.value = false flag.value = false
} else { } else {
// eslint-disable-next-line vue/no-setup-props-destructure // eslint-disable-next-line vue/no-setup-props-destructure
dataFrom.value.content[0].link.value = props.dataList.apiUrl dataFrom.value.content[0].link.value = props.dataList.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = props.dataList.deptName dataFrom.value.content[0].facilitator.value =
dataFrom.value.content[0].people.value = props.dataList.deptContacts props.dataList.deptName || '--'
dataFrom.value.content[0].phone.value = props.dataList.deptPhone dataFrom.value.content[0].people.value =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].phone.value = props.dataList.deptPhone || '--'
console.log('dataList', props.dataList) console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType === '服务地址') { if (item.attrType === '服务地址') {
@ -179,10 +181,10 @@
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.content[0].link.value = val.apiUrl dataFrom.value.content[0].link.value = val.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = val.deptName dataFrom.value.content[0].facilitator.value = val.deptName || '--'
dataFrom.value.content[0].people.value = val.deptContacts dataFrom.value.content[0].people.value = val.deptContacts || '--'
dataFrom.value.content[0].phone.value = val.deptPhone dataFrom.value.content[0].phone.value = val.deptPhone || '--'
console.log('dataList', val) console.log('dataList', val)
val.infoList.map((item) => { val.infoList.map((item) => {
if (item.attrType === '服务地址') { if (item.attrType === '服务地址') {

View File

@ -136,7 +136,7 @@
</div> </div>
</div> </div>
<div class="dec"> <div class="dec">
<div <!-- <div
v-if=" v-if="
selectCardsname !== '基础设施' && selectCardsname !== '基础设施' &&
selectCardsname !== '数据资源' && selectCardsname !== '数据资源' &&
@ -144,17 +144,22 @@
" "
> >
<span>{{ item.shareType || '--' }}</span> <span>{{ item.shareType || '--' }}</span>
</div> </div> -->
<div v-if="selectCardsname !== '融合服务'"> <div v-if="selectCardsname !== '融合服务'">
<span>{{ item.deptName || '--' }}</span> <span>{{ item.deptName || '--' }}</span>
</div> </div>
<div v-if="selectCardsname !== '基础设施'"> </div>
<div
v-if="selectCardsname !== '基础设施'"
style="margin-top: 0.1rem"
class="description"
>
<a-tooltip> <a-tooltip>
<template #title>{{ item.description }}</template> <template #title>{{ item.description }}</template>
{{ item.description || '--' }} {{ item.description || '--' }}
</a-tooltip> </a-tooltip>
</div> </div>
</div> <div class="btn">
<div class="bottom" v-if="selectCardsname !== '基础设施'"> <div class="bottom" v-if="selectCardsname !== '基础设施'">
<div> <div>
<div <div
@ -196,7 +201,6 @@
</a-tooltip> </a-tooltip>
</div> --> </div> -->
</div> </div>
<div class="btn">
<div class="right" v-if="selectCardsname !== '基础设施'"> <div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey"> <div class="shopping" :key="shoppingKey">
<template v-if="selectCardsname == '组件服务'"> <template v-if="selectCardsname == '组件服务'">
@ -916,7 +920,7 @@
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
div:nth-child(3) { div:nth-child(2) {
max-width: 200px; max-width: 200px;
display: -webkit-box; display: -webkit-box;
/*设置为弹性盒子*/ /*设置为弹性盒子*/
@ -1049,4 +1053,18 @@
} }
} }
} }
.description {
max-width: 990px;
height: 52px;
font-size: 14px;
line-height: 18px;
display: -webkit-box;
-webkit-line-clamp: 3;
/*最多显示3行*/
overflow: hidden;
/*超出隐藏*/
text-overflow: ellipsis;
/*超出显示为省略号*/
-webkit-box-orient: vertical;
}
</style> </style>