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>
<a-input
v-if="item.type == 'input'"
v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1"
: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
v-else-if="item.type == 'radio'"
v-model:value="item.note1"

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 17:30:19
* @LastEditTime: 2022-07-19 11:07:46
* @Description: 算法详情页头部
-->
<template>
@ -62,7 +62,7 @@
加入申购车
</a-button>
<a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
{{ props.dataList.isCollect == 'true' ? '已' : '' }}收藏
</a-button>
</div>
</div>
@ -127,40 +127,6 @@
})
}
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) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
@ -217,12 +183,44 @@
if (obj) {
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>
<style lang="less" scoped>
.algorithm-top-details {
@ -316,8 +314,6 @@
}
.ant-btn:nth-of-type(3) {
width: 145px;
background: #fff;
color: #526aff;
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -468,10 +468,14 @@
})
console.log('提交数据==========================>', formName, ids)
if (formName.system.length !== 0) {
if (formName.applicationSystem.length == 0) {
formName.applicationSystem = ''
}
submitApply(formName).then((res) => {
// applySuccess.value = false
message.success('申请提交成功,请到消息中心查看!')
console.log('能力申请================>', res)
if (res.data.code == 0) {
if (ids && ids.length > 0) {
sgcDel({ ids: ids }).then((res) => {
if (res.data.msg === 'success') {
@ -492,6 +496,9 @@
},
})
}
} else {
message.error('申请失败!')
}
})
}
} else {

View File

@ -141,7 +141,7 @@
</div>
</template>
<script setup>
import { onMounted, ref } from 'vue'
import { onMounted, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue'
import { updateVisits, browsingInsert } from '@/api/home'
@ -218,6 +218,7 @@
type.value = ''
pageNum.value = '1'
pageSize.value = '5'
tabIndex.value = 0
showKey.value++
checkAll.value = false
getList()
@ -229,6 +230,8 @@
getBsList({
limit: pageSize.value,
page: pageNum.value,
type: tabList.value[tabIndex.value],
name: name.value,
}).then((res) => {
checkAll.value = true
console.log('申购车列表================>', res)
@ -328,7 +331,7 @@
showKey.value++
}
//
const tabIndex = ref(-1)
const tabIndex = ref(0)
const changeTab = (index) => {
console.log('tabIndex', tabIndex.value, index, tabList)
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>
<style lang="less" scoped>
.ant-list {