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="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index">
<span>{{ val.name }}</span>
<!-- <a-input v-model:value="val.note1" ::maxlength="24" placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"/> -->
<a-input v-model:value="val.note1" ::maxlength="24" :placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"/>
<template v-if="val.type == 'input2'">
<a-input
v-model:value="val.note1"

View File

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

View File

@ -46,6 +46,7 @@
:refData="refData"
:dataFrom="dataFrom"
:fileList="fileList"
:packageList="packageList"
:imgList="imgList"
:externalField="['接口服务', '接口请求方式']"
:configure="bs"
@ -197,6 +198,7 @@
const navList = ref([])
const navList2 = ref([])
const fileList = ref({})
const packageList = ref({})
const imgList = ref({})
const videoList = ref({})
const data = ref({})
@ -310,6 +312,18 @@
key: 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
refData.value = data.value.filter(
@ -342,6 +356,9 @@
mybus.on('chageFileList', (obj) => {
fileList.value = obj
})
mybus.on('chagePackageList', (obj) => {
packageList.value = obj
})
mybus.on('chageImgList', (obj) => {
imgList.value = obj
})
@ -380,7 +397,7 @@
})
</script>
<style lang="less" scoped>
.box {
.box {
position: relative;
top: 64px;
margin: 15px 400px;
@ -432,10 +449,15 @@
background: #999;
}
}
.finish {
color: #0087ff;
.bg-box {
background: #9ccefa;
.btn {
display: flex;
justify-content: space-around;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
height: 35px;
text-align: center;
color: #fff;
border: 1px solid #9ccefa;
span {
@ -446,12 +468,22 @@
.line {
background: #0087ff;
}
button:nth-of-type(1) {
color: #0087ff;
background: #e1edfa;
}
button:nth-of-type(2) {
background: #01c5dc;
}
}
.first {
justify-content: space-around;
}
}
.btn {
display: flex;
justify-content: space-around;
padding: 10px 350px 0;
justify-content: space-between;
padding: 10px 400px 0;
button {
cursor: pointer;
width: 80px;
@ -471,7 +503,7 @@
}
}
.first {
justify-content: space-around;
}
justify-content: center;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 16:21:41
* @LastEditTime: 2022-07-15 16:56:49
* @Description: 上架
-->
<template>
@ -117,7 +117,23 @@
</template>
<template v-else>
<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>
<a-input
v-if="item.type == 'input'"
@ -176,6 +192,15 @@
:list="props.fileList2"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@ -211,6 +236,21 @@
>
请选择关联组件
</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
v-else-if="item.type == 'select'"
style="width: 240px"
@ -225,6 +265,18 @@
{{ itemSelect.dictLabel }}
</a-select-option>
</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
v-else-if="item.type == 'checkBox'"
class="application-Area"
@ -277,6 +329,7 @@
import mybus from '@/myplugins/mybus'
import upload from '@/views/components/upload'
import { message } from 'ant-design-vue'
import { getUserInfo, getDeptAll } from '@/api/user'
import {
getCategoryTreePage,
queryApplicationRelByResourceId,
@ -296,6 +349,8 @@
//
fileList: { type: Array, default: null },
fileList2: { type: Array, default: null },
//
packageList: { type: Array, default: null },
//
imgList: { type: Array, default: null },
//
@ -412,6 +467,25 @@
}
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 {
data.value.list.push(item)
}
@ -591,6 +665,13 @@
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) => {
// console.log(newProps, oldProps)
newProps.forEach((val) => {
@ -624,10 +705,25 @@
}
})
})
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>
<style></style>
<style lang="less" scoped>
.put-on-the-shelf {
.put-on-the-shelf {
height: 680px;
overflow: scroll;
display: flex;
@ -784,9 +880,9 @@
& > div:nth-of-type(1) {
margin-top: 0;
}
}
}
.application-Area {
.application-Area {
width: 520px;
display: grid;
margin-top: -5px;
@ -812,68 +908,68 @@
background: #0087ff;
color: #fff;
}
}
}
:deep(.ant-image-img) {
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
}
:deep(.ant-modal) {
:deep(.ant-modal) {
width: 960px;
}
}
:deep(.ant-transfer-list) {
:deep(.ant-transfer-list) {
width: 39.5%;
height: 520px;
}
}
:deep(.ant-transfer-operation) {
:deep(.ant-transfer-operation) {
flex-direction: row-reverse;
margin: 0 30px;
}
}
:deep(.ant-btn) {
:deep(.ant-btn) {
width: 56px;
height: 40px;
border-radius: 4px;
}
}
:deep(.ant-btn:first-child) {
:deep(.ant-btn:first-child) {
margin-left: 4px;
}
}
:deep(.ant-modal-footer) {
:deep(.ant-modal-footer) {
border: 0;
}
}
:deep(.ant-modal-header) {
:deep(.ant-modal-header) {
border: 0;
}
}
:deep(.ant-modal-title) {
:deep(.ant-modal-title) {
line-height: 24px;
font-size: 18px;
color: #303133;
}
}
:deep(.ant-transfer-list-header) {
:deep(.ant-transfer-list-header) {
background: #f5f7fa;
}
}
:deep(.ant-transfer-list-header-selected) {
:deep(.ant-transfer-list-header-selected) {
display: flex;
width: 90%;
flex-direction: row-reverse;
justify-content: space-between;
align-items: center;
}
}
:deep(.ant-transfer-list-header-title) {
:deep(.ant-transfer-list-header-title) {
font-size: 16px;
color: #303133;
font-weight: 400;
text-align: left;
}
}
</style>

View File

@ -76,6 +76,8 @@
file.type === 'application/msword' ||
file.type ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
} else if (props.type === '压缩包') {
flag = file.type === 'application/x-zip-compressed'
}
console.log(flag)
if (!flag) {
@ -115,6 +117,8 @@
} else {
mybus.emit('chageFileList', fileList.value)
}
} else if (props.type === '压缩包') {
mybus.emit('chagePackageList', fileList.value)
} else if (props.type === '视频') {
mybus.emit('chageVideoList', fileList.value)
}
@ -129,7 +133,7 @@
}
</script>
<style lang="less" scoped>
.upload-list-inline {
.upload-list-inline {
width: unset;
button {
height: 30px;
@ -140,5 +144,5 @@
color: #0087ff;
font-size: 14px;
}
}
}
</style>

View File

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

View File

@ -8,10 +8,10 @@
></DetalsTitle>
</div>
<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="content-left-title">
<span>{{ item.title }}</span>
<span>{{ item.title }}{{ item.titleType }}</span>
</div>
<div class="content-left-content">
<p>
@ -29,7 +29,41 @@
</div>
<div class="right">
<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 class="content-right">
@ -98,13 +132,19 @@
let dataFrom = ref({
title: '使用方式',
englishTitle: 'USAGE',
SDK: '',
content: [
{
title: '组件地址',
title: '使用方式',
titleType: '',
link: {
name: '服务接口:',
value: '',
},
linkPlatform: {
name: '平台地址:',
value: '',
},
postMethod: {
name: '请求方式:',
value: '',
@ -151,7 +191,7 @@
dataFrom.value.content[0].facilitator.value = props.dataList.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts
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)
props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') {
@ -163,8 +203,13 @@
} else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') {
debugger
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 === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') {
debugger
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,10 +308,23 @@
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>
<style lang="less" scoped>
.usage-mode {
.usage-mode {
display: flex;
flex-direction: column;
align-items: center;
@ -282,6 +346,7 @@
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.35rem;
.left {
@ -392,5 +457,5 @@
}
}
}
}
}
</style>

View File

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

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:31:12
* @LastEditTime: 2022-07-15 17:30:26
* @Description: 算法详情页头部
-->
<template>
@ -53,66 +53,72 @@
加入购物车
</a-button> -->
<!-- 融合服务 存在fuseResourceList -->
<a-button type="primary" @click="handleAKeyApplication()" v-if="dataList.fuseResourceList">
<a-button
type="primary"
@click="handleAKeyApplication()"
v-if="dataList.fuseResourceList"
>
<template #icon>
<form-outlined />
</template>
申请使用
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
<a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div>
</div>
<div class="right"></div>
</div>
</template>
<script setup>
// import { 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 { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
//
const router = useRouter()
// 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 { useRouter } from 'vue-router'
//
const router = useRouter()
const props = defineProps({
const props = defineProps({
dataList: { type: Object, default: null },
})
})
console.log('dataList------------>', props.dataList);
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')
// })
// }
// //
// function toView() {
// // window.open(newpage.href, '_blank')
// router.push({
// path: '/apply',
// query: {
// name: props.dataList.name,
// resourceId: [props.dataList.id],
// },
// })
// }
// --
const handleAKeyApplication = () => {
let _applyList = [];
(props.dataList.fuseResourceList || []).map(v => {
// 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 handleAKeyApplication = () => {
let _applyList = []
;(props.dataList.fuseResourceList || []).map((v) => {
let resource = v.resource || {}
let obj = {
arr: [
@ -131,43 +137,66 @@ const handleAKeyApplication = () => {
_applyList.push(obj)
})
localStorage.setItem(
'applyList',
JSON.stringify(_applyList)
)
localStorage.setItem('applyList', JSON.stringify(_applyList))
router.push({
path: '/apply',
})
}
}
//
const goTOCollection = () => {
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
if (scFlag2.value) {
scFlag2.value = false
if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
}
if (props.dataList.infoList) {
} 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) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
}
watch(
}
watch(
() => props.dataList,
(val) => {
if (val) {
console.log('props.dataList-----watch------->', val);
console.log('props.dataList-----watch------->', val)
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
}
}
)
)
</script>
<style lang="less" scoped>
.algorithm-top-details {
.algorithm-top-details {
height: 6rem;
padding: 1.8rem 0 0;
background: url('~@/assets/detailsAll/sf_top_bg.png') no-repeat;
@ -230,13 +259,13 @@ watch(
font-size: 0.18rem;
line-height: 0.34rem;
&>div:nth-of-type(1) {
& > div:nth-of-type(1) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&>div:nth-of-type(2) {
& > div:nth-of-type(2) {
max-height: 1rem;
overflow: hidden;
text-overflow: ellipsis;
@ -284,5 +313,5 @@ watch(
background-size: 100%;
margin-top: -0.4rem;
}
}
}
</style>

View File

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

View File

@ -138,10 +138,12 @@
flag.value = false
} else {
// 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.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
dataFrom.value.content[0].link.value = props.dataList.apiUrl || '--'
dataFrom.value.content[0].facilitator.value =
props.dataList.deptName || '--'
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 === '组件地址') {
@ -173,10 +175,10 @@
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].link.value = val.apiUrl
dataFrom.value.content[0].facilitator.value = val.deptName
dataFrom.value.content[0].people.value = val.deptContacts
dataFrom.value.content[0].phone.value = val.deptPhone
dataFrom.value.content[0].link.value = val.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = val.deptName || '--'
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 === '组件地址') {

View File

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

View File

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

View File

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

View File

@ -142,10 +142,12 @@
flag.value = false
} else {
// 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.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
dataFrom.value.content[0].link.value = props.dataList.apiUrl || '--'
dataFrom.value.content[0].facilitator.value =
props.dataList.deptName || '--'
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 === '服务地址') {
@ -179,10 +181,10 @@
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].link.value = val.apiUrl
dataFrom.value.content[0].facilitator.value = val.deptName
dataFrom.value.content[0].people.value = val.deptContacts
dataFrom.value.content[0].phone.value = val.deptPhone
dataFrom.value.content[0].link.value = val.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = val.deptName || '--'
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 === '服务地址') {

View File

@ -136,7 +136,7 @@
</div>
</div>
<div class="dec">
<div
<!-- <div
v-if="
selectCardsname !== '基础设施' &&
selectCardsname !== '数据资源' &&
@ -144,17 +144,22 @@
"
>
<span>{{ item.shareType || '--' }}</span>
</div>
</div> -->
<div v-if="selectCardsname !== '融合服务'">
<span>{{ item.deptName || '--' }}</span>
</div>
<div v-if="selectCardsname !== '基础设施'">
</div>
<div
v-if="selectCardsname !== '基础设施'"
style="margin-top: 0.1rem"
class="description"
>
<a-tooltip>
<template #title>{{ item.description }}</template>
{{ item.description || '--' }}
</a-tooltip>
</div>
</div>
<div class="btn">
<div class="bottom" v-if="selectCardsname !== '基础设施'">
<div>
<div
@ -196,7 +201,6 @@
</a-tooltip>
</div> -->
</div>
<div class="btn">
<div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey">
<template v-if="selectCardsname == '组件服务'">
@ -916,7 +920,7 @@
padding-left: 10px;
padding-right: 10px;
}
div:nth-child(3) {
div:nth-child(2) {
max-width: 200px;
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>