Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gaoyuanwei 2022-07-19 11:26:29 +08:00
commit 9a681317f0
8 changed files with 145 additions and 111 deletions

View File

@ -138,10 +138,18 @@
> >
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<a-input <a-input
v-if="item.type == 'input'" v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请输入' + item.name" :placeholder="'请输入' + item.name"
/> />
<a-input
v-else-if="
item.type == 'input' && item.name.indexOf('名称') != -1
"
:maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
/>
<a-radio-group <a-radio-group
v-else-if="item.type == 'radio'" v-else-if="item.type == 'radio'"
v-model:value="item.note1" v-model:value="item.note1"

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-15 17:30:19 * @LastEditTime: 2022-07-19 11:07:46
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -62,7 +62,7 @@
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()"> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏 {{ props.dataList.isCollect == 'true' ? '已' : '' }}收藏
</a-button> </a-button>
</div> </div>
</div> </div>
@ -127,40 +127,6 @@
}) })
} }
const componentType = ref('') const componentType = ref('')
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
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) { if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
@ -217,12 +183,44 @@
if (obj) { if (obj) {
componentType.value = obj.attrValue componentType.value = obj.attrValue
} }
if (val.isCollect) {
scFlag.value = true
}
} }
} }
) )
//
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
if (scFlag2.value) {
scFlag2.value = false
if (props.dataList.isCollect == 'true') {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
// eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = 'false'
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
// eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = 'true'
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.algorithm-top-details { .algorithm-top-details {
@ -316,8 +314,6 @@
} }
.ant-btn:nth-of-type(3) { .ant-btn:nth-of-type(3) {
width: 145px; width: 145px;
background: #fff;
color: #526aff;
} }
} }
} }

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-15 17:30:26 * @LastEditTime: 2022-07-19 11:09:23
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -64,7 +64,7 @@
申请使用 申请使用
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()"> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏 {{ props.dataList.isCollect == 'true' ? '已' : '' }}收藏
</a-button> </a-button>
</div> </div>
</div> </div>
@ -144,17 +144,17 @@
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true) const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
if (scFlag2.value) { if (scFlag2.value) {
scFlag2.value = false scFlag2.value = false
if (scFlag.value) { if (props.dataList.isCollect) {
scDel([props.dataList.id]).then((res) => { scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('取消成功') message.success('取消成功')
scFlag.value = false // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = false
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -166,7 +166,8 @@
]).then((res) => { ]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('添加收藏成功!') message.success('添加收藏成功!')
scFlag.value = true // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = true
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -191,9 +192,6 @@
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
if (val.isCollect) {
scFlag.value = true
}
} }
} }
) )
@ -305,8 +303,6 @@
.ant-btn:nth-of-type(3) { .ant-btn:nth-of-type(3) {
width: 1.45rem; width: 1.45rem;
background: #fff;
color: #526aff;
} }
} }
} }

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-15 17:31:32 * @LastEditTime: 2022-07-19 11:09:52
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -63,7 +63,7 @@
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()"> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏 {{ props.dataList.isCollect == 'true' ? '已' : '' }}收藏
</a-button> </a-button>
</div> </div>
</div> </div>
@ -127,17 +127,17 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true) const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
if (scFlag2.value) { if (scFlag2.value) {
scFlag2.value = false scFlag2.value = false
if (scFlag.value) { if (props.dataList.isCollect) {
scDel([props.dataList.id]).then((res) => { scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('取消成功') message.success('取消成功')
scFlag.value = false // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = false
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -149,7 +149,8 @@
]).then((res) => { ]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('添加收藏成功!') message.success('添加收藏成功!')
scFlag.value = true // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = true
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -200,9 +201,6 @@
if (obj) { if (obj) {
componentType.value = obj.attrValue componentType.value = obj.attrValue
} }
if (val.isCollect) {
scFlag.value = true
}
} }
} }
) )
@ -308,8 +306,6 @@
} }
.ant-btn:nth-of-type(3) { .ant-btn:nth-of-type(3) {
width: 145px; width: 145px;
background: #fff;
color: #526aff;
} }
} }
} }

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-15 17:32:08 * @LastEditTime: 2022-07-19 11:10:06
* @Description: 开发组件详情页头部 * @Description: 开发组件详情页头部
--> -->
<template> <template>
@ -59,7 +59,7 @@
加入购物车 加入购物车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()"> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏 {{ props.dataList.isCollect == 'true' ? '已' : '' }}收藏
</a-button> </a-button>
</div> </div>
</div> </div>
@ -122,17 +122,17 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true) const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
if (scFlag2.value) { if (scFlag2.value) {
scFlag2.value = false scFlag2.value = false
if (scFlag.value) { if (props.dataList.isCollect) {
scDel([props.dataList.id]).then((res) => { scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('取消成功') message.success('取消成功')
scFlag.value = false // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = false
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -144,7 +144,8 @@
]).then((res) => { ]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('添加收藏成功!') message.success('添加收藏成功!')
scFlag.value = true // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = true
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -206,9 +207,6 @@
if (obj) { if (obj) {
componentType.value = obj.attrValue componentType.value = obj.attrValue
} }
if (val.isCollect) {
scFlag.value = true
}
} }
} }
) )
@ -304,8 +302,6 @@
} }
.ant-btn:nth-of-type(3) { .ant-btn:nth-of-type(3) {
width: 1.45rem; width: 1.45rem;
background: #fff;
color: #526aff;
} }
} }
} }

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-15 17:32:31 * @LastEditTime: 2022-07-19 11:10:20
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -59,7 +59,7 @@
加入申购车 加入申购车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()"> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏 {{ props.dataList.isCollect == 'true' ? '已' : '' }}收藏
</a-button> </a-button>
</div> </div>
</div> </div>
@ -122,17 +122,17 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true) const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
if (scFlag2.value) { if (scFlag2.value) {
scFlag2.value = false scFlag2.value = false
if (scFlag.value) { if (props.dataList.isCollect) {
scDel([props.dataList.id]).then((res) => { scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('取消成功') message.success('取消成功')
scFlag.value = false // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = false
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -144,7 +144,8 @@
]).then((res) => { ]).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
message.success('添加收藏成功!') message.success('添加收藏成功!')
scFlag.value = true // eslint-disable-next-line vue/no-mutating-props
props.dataList.isCollect = true
scFlag2.value = true scFlag2.value = true
} }
}) })
@ -199,9 +200,6 @@
if (obj) { if (obj) {
componentType.value = obj.attrValue componentType.value = obj.attrValue
} }
if (val.isCollect) {
scFlag.value = true
}
} }
} }
) )
@ -298,8 +296,6 @@
} }
.ant-btn:nth-of-type(3) { .ant-btn:nth-of-type(3) {
width: 1.45rem; width: 1.45rem;
background: #fff;
color: #526aff;
} }
} }
} }

View File

@ -454,11 +454,11 @@
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', select: '组件服务',
}, },
}) })
} }
}) })
} }
@ -468,29 +468,36 @@
}) })
console.log('提交数据==========================>', formName, ids) console.log('提交数据==========================>', formName, ids)
if (formName.system.length !== 0) { if (formName.system.length !== 0) {
if (formName.applicationSystem.length == 0) {
formName.applicationSystem = ''
}
submitApply(formName).then((res) => { submitApply(formName).then((res) => {
// applySuccess.value = false // applySuccess.value = false
message.success('申请提交成功,请到消息中心查看!') message.success('申请提交成功,请到消息中心查看!')
console.log('能力申请================>', res) console.log('能力申请================>', res)
if (ids && ids.length > 0) { if (res.data.code == 0) {
sgcDel({ ids: ids }).then((res) => { if (ids && ids.length > 0) {
if (res.data.msg === 'success') { sgcDel({ ids: ids }).then((res) => {
mybus.emit('getSgcNum') if (res.data.msg === 'success') {
router.push({ mybus.emit('getSgcNum')
path: '/DetailsPageconetent', router.push({
query: { path: '/DetailsPageconetent',
select: '组件服务', query: {
}, select: '组件服务',
}) },
} })
}) }
})
} else {
router.push({
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
}
} else { } else {
router.push({ message.error('申请失败!')
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
}) })
} }

View File

@ -141,7 +141,7 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { onMounted, ref } from 'vue' import { onMounted, ref, watch } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { updateVisits, browsingInsert } from '@/api/home' import { updateVisits, browsingInsert } from '@/api/home'
@ -218,6 +218,7 @@
type.value = '' type.value = ''
pageNum.value = '1' pageNum.value = '1'
pageSize.value = '5' pageSize.value = '5'
tabIndex.value = 0
showKey.value++ showKey.value++
checkAll.value = false checkAll.value = false
getList() getList()
@ -229,6 +230,8 @@
getBsList({ getBsList({
limit: pageSize.value, limit: pageSize.value,
page: pageNum.value, page: pageNum.value,
type: tabList.value[tabIndex.value],
name: name.value,
}).then((res) => { }).then((res) => {
checkAll.value = true checkAll.value = true
console.log('申购车列表================>', res) console.log('申购车列表================>', res)
@ -328,7 +331,7 @@
showKey.value++ showKey.value++
} }
// //
const tabIndex = ref(-1) const tabIndex = ref(0)
const changeTab = (index) => { const changeTab = (index) => {
console.log('tabIndex', tabIndex.value, index, tabList) console.log('tabIndex', tabIndex.value, index, tabList)
if (tabIndex.value == index) { if (tabIndex.value == index) {
@ -381,6 +384,42 @@
} }
} }
} }
//tabindex
watch(tabIndex, (val) => {
getBsList({
limit: pageSize.value,
page: pageNum.value,
type: tabList.value[val],
name: name.value,
}).then((res) => {
checkAll.value = true
console.log('申购车列表================>', res)
initLoading.value = false
list.value = []
total.value = res.data.data.total
res.data.data.list.forEach((val) => {
const obj = {
loading: false,
name: val.resourceDTO.name,
id: val.id,
checked: false,
visits: val.resourceDTO.visits,
type: val.resourceDTO.type,
link: val.resourceDTO.link,
resourceId: val.resourceId,
createDate: val.createDate,
description: val.resourceDTO.description,
delFlag: val.resourceDTO.delFlag,
}
if (checkedList.value.indexOf(val.id) == -1) {
checkAll.value = false
} else {
obj.checked = true
}
list.value.push(obj)
})
})
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ant-list { .ant-list {