Compare commits

...

10 Commits

Author SHA1 Message Date
wuhongjian da68d9117c 合并版本v0.8.2.4 2022-07-19 14:11:58 +08:00
gaoyuanwei 00af09c4f0 bug! 2022-07-19 14:05:47 +08:00
gaoyuanwei b75e6a4fb0 还原 2022-07-19 13:59:26 +08:00
gaoyuanwei 9a681317f0 Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev 2022-07-19 11:26:29 +08:00
gaoyuanwei 4d01131e74 来源应用穿梭框左侧实现单选 2022-07-19 11:26:18 +08:00
851673013@qq.com 4b33b089f1 我的浏览模糊查询 2022-07-19 11:14:46 +08:00
a0049873 a52966d68a BUG修改 2022-07-19 11:13:15 +08:00
a0049873 dbe0edfcd7 BUG修改 2022-07-19 11:08:32 +08:00
851673013@qq.com 7c63022fc5 Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev 2022-07-19 10:25:16 +08:00
851673013@qq.com b15efd9206 bug629 2022-07-19 10:25:10 +08:00
8 changed files with 167 additions and 89 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"
@ -300,6 +308,7 @@
</div>
</div>
</div>
<!-- 来源应用 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplication"
@ -321,6 +330,28 @@
</div>
</a-modal>
</div>
<!-- 关联组件 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplication"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 960px"
>
<div>
<a-transfer
v-model:target-keys="targetKeys2"
v-model:selected-keys="selectedKeys2"
:data-source="mockData2"
:titles="titles"
:render="(item) => item.title"
@change="handleChange1"
@selectChange="handleSelectChange1"
/>
</div>
</a-modal>
</div>
</div>
</template>
</div>
@ -622,11 +653,13 @@
//
const visibleAssociatedApplication = ref(false)
const mockData = ref([])
const mockData2 = ref([])
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
const titleName = ref('来源应用')
const targetKeys = ref([])
const targetKeys2 = ref([])
//
const targetKeysBack = ref([])
// const targetKeysBack = ref([])
const sourceClick = () => {
mockData.value = []
@ -671,7 +704,7 @@
const componentsClick = () => {
titles.value = ['未关联的组件名称', '已关联的组件名称']
titleName.value = '关联组件'
mockData.value = []
mockData2.value = []
visibleAssociatedApplication.value = true
props.dataFrom.infoList.forEach((val) => {
if (val.attrType === '关联组件信息' && val.attrValue != '') {
@ -682,18 +715,18 @@
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
mockData2.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
targetKeys.value = []
targetKeys2.value = []
val.attrValue.split(',').forEach((item) => {
targetKeys.value.push(item)
targetKeys2.value.push(item)
})
console.log(targetKeys.value)
console.log(targetKeys2.value)
// console.log('wowowo')
} else if (val.attrType === '关联组件信息' && val.attrValue == '') {
queryResourceRelByKeyId({
@ -703,7 +736,7 @@
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
mockData2.value.push({
key: val.id,
title: val.name,
description: val.id,
@ -714,6 +747,7 @@
})
}
const selectedKeys = ref([])
const selectedKeys2 = ref([])
const handleChange = (nextTargetKeys, direction, moveKeys) => {
console.log('targetKeys: ', nextTargetKeys)
@ -723,9 +757,22 @@
targetKeys.value = moveKeys.filter((item, index) => index === 0)
}
}
const handleChange1 = (nextTargetKeys1, direction1, moveKeys1) => {
console.log('targetKeys: ', nextTargetKeys1)
console.log('direction: ', direction1)
console.log('moveKeys: ', moveKeys1)
}
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
console.log('after', sourceSelectedKeys)
}
const handleSelectChange1 = (sourceSelectedKeys1, targetSelectedKeys1) => {
console.log(
'targetSelectedKeys: ',
targetSelectedKeys1,
sourceSelectedKeys1
)
}
const handleOk = (e) => {
@ -733,8 +780,10 @@
visibleAssociatedApplication.value = false
// console.log('2222222222222', props.refData)
data.value.list.map((item) => {
if (item.name === '来源应用' || item.name === '关联组件信息') {
if (item.name === '来源应用') {
item.note1 = targetKeys.value + ''
} else if (item.name === '关联组件信息') {
item.note1 = targetKeys2.value + ''
}
})
}

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 {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 16:43:11
* @LastEditTime: 2022-07-19 14:11:50
* @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
}
}
}
)

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
}
}
}
)

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
}
}
}
)

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
}
}
}
)

View File

@ -367,12 +367,12 @@
p {
// width: 1.60rem;
height: 0.2rem;
margin-right: 0.15rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
// overflow: hidden;
white-space: nowrap;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
margin-right: 0.15rem;
word-break: break-all;
span {

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 {