Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
dc0a44dab7
|
@ -223,3 +223,11 @@ export function queryApplicationRelByResourceId(params) {
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取关联组件列表
|
||||||
|
export function queryResourceRelByKeyId(params) {
|
||||||
|
return request({
|
||||||
|
url: '/dataResourceRel/queryResourceRelByKeyId',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: hisense.zhangfeihu
|
* @Author: hisense.zhangfeihu
|
||||||
* @Date: 2022-06-13 10:22:27
|
* @Date: 2022-06-13 10:22:27
|
||||||
* @LastEditors: hisense.liangjunhua
|
* @LastEditors: hisense.liangjunhua
|
||||||
* @LastEditTime: 2022-07-04 15:32:52
|
* @LastEditTime: 2022-07-05 11:25:25
|
||||||
* @Description: 赋能案例-详情页
|
* @Description: 赋能案例-详情页
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -131,19 +131,16 @@
|
||||||
tabName.value = '案例背景'
|
tabName.value = '案例背景'
|
||||||
selectOne(val).then((res) => {
|
selectOne(val).then((res) => {
|
||||||
res.data.data.infoList.map((item, index) => {
|
res.data.data.infoList.map((item, index) => {
|
||||||
console.log('res.data.data.infoList', res.data.data.infoList)
|
|
||||||
if (item.attrType == '图片') {
|
if (item.attrType == '图片') {
|
||||||
res.data.data.infoList.splice(index, 1)
|
res.data.data.infoList.splice(index, 1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
res.data.data.infoList.map((item, index) => {
|
res.data.data.infoList.map((item, index) => {
|
||||||
console.log('res.data.data.infoList', res.data.data.infoList)
|
|
||||||
if (item.attrType == '应用领域') {
|
if (item.attrType == '应用领域') {
|
||||||
res.data.data.infoList.splice(index, 1)
|
res.data.data.infoList.splice(index, 1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
dataFrom.value = res.data.data
|
dataFrom.value = res.data.data
|
||||||
console.log('dataFrom.value', dataFrom.value)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//其他案例
|
//其他案例
|
||||||
|
@ -165,7 +162,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
dataList.value = res.data.data.records
|
dataList.value = res.data.data.records
|
||||||
console.log('dataList.value', dataList.value)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//监听路由发生变化
|
//监听路由发生变化
|
||||||
|
@ -181,70 +177,98 @@
|
||||||
//tab点击事件
|
//tab点击事件
|
||||||
const tabSwitch = (item, index) => {
|
const tabSwitch = (item, index) => {
|
||||||
tabName.value = item.attrType
|
tabName.value = item.attrType
|
||||||
if (index != 0 && index != 3) {
|
|
||||||
let top =
|
let top =
|
||||||
document.querySelector(
|
document.querySelector(
|
||||||
'#assign-case-detail-page-content-center-card' + index
|
'#assign-case-detail-page-content-center-card' + index
|
||||||
).offsetTop -
|
).offsetTop -
|
||||||
document.querySelector(
|
330 -
|
||||||
'#assign-case-detail-page-content-center-card' + (index - 1)
|
60 * index
|
||||||
).offsetHeight
|
|
||||||
let view = document.getElementById(
|
|
||||||
'assign-case-detail-page-content-left-border-id'
|
|
||||||
)
|
|
||||||
view.style.top =
|
|
||||||
document.querySelector(
|
|
||||||
'#assign-case-detail-page-content-center-card' + (index - 1)
|
|
||||||
).offsetHeight + 'px'
|
|
||||||
console.log('view.style.top', view.style.top)
|
|
||||||
document.documentElement.scrollTop = top
|
document.documentElement.scrollTop = top
|
||||||
document.body.scrollTop = top
|
document.body.scrollTop = top
|
||||||
} else if (index == 0) {
|
|
||||||
let top = 0
|
|
||||||
let view = document.getElementById(
|
|
||||||
'assign-case-detail-page-content-left-border-id'
|
|
||||||
)
|
|
||||||
document.documentElement.scrollTop = top
|
|
||||||
document.body.scrollTop = top
|
|
||||||
view.style.top = '490px'
|
|
||||||
} else if (index == 3) {
|
|
||||||
let top = document.querySelector(
|
|
||||||
'#assign-case-detail-page-content-center-card' + index
|
|
||||||
).offsetTop
|
|
||||||
let view = document.getElementById(
|
|
||||||
'assign-case-detail-page-content-left-border-id'
|
|
||||||
)
|
|
||||||
document.documentElement.scrollTop = top
|
|
||||||
document.body.scrollTop = top
|
|
||||||
view.style.top = '220px'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
// init()
|
||||||
// console.clear()
|
// console.clear()
|
||||||
window.addEventListener('scroll', () => {
|
window.addEventListener('scroll', () => {
|
||||||
domArr.value = document.querySelectorAll(
|
let top = document.documentElement.scrollTop
|
||||||
'.assign-case-detail-page-content-center-card'
|
|
||||||
)
|
|
||||||
scrollTop.value =
|
|
||||||
document.documentElement.scrollTop || document.body.scrollTop
|
|
||||||
for (let i = 0; i < domArr.value.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
|
|
||||||
selectNow.value = domArr.value[i].id
|
|
||||||
}
|
|
||||||
} else if (i == domArr.value.length - 1) {
|
|
||||||
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
|
|
||||||
selectNow.value = domArr.value[i].id
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (
|
if (
|
||||||
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
|
top <
|
||||||
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
|
100 +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card0'
|
||||||
|
).offsetHeight -
|
||||||
|
1
|
||||||
) {
|
) {
|
||||||
selectNow.value = domArr.value[i].id
|
tabName.value = '案例背景'
|
||||||
}
|
} else if (
|
||||||
}
|
top >=
|
||||||
|
100 +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card0'
|
||||||
|
).offsetHeight &&
|
||||||
|
top <
|
||||||
|
100 +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card0'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card1'
|
||||||
|
).offsetHeight -
|
||||||
|
1
|
||||||
|
) {
|
||||||
|
tabName.value = '业务挑战'
|
||||||
|
} else if (
|
||||||
|
top >=
|
||||||
|
100 +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card0'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card1'
|
||||||
|
).offsetHeight &&
|
||||||
|
top <
|
||||||
|
100 +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card0'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card1'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card2'
|
||||||
|
).offsetHeight -
|
||||||
|
1
|
||||||
|
) {
|
||||||
|
tabName.value = '解决方案'
|
||||||
|
} else if (
|
||||||
|
top >=
|
||||||
|
100 +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card0'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card1'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card2'
|
||||||
|
).offsetHeight &&
|
||||||
|
top <
|
||||||
|
100 +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card0'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card1'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card2'
|
||||||
|
).offsetHeight +
|
||||||
|
document.querySelector(
|
||||||
|
'#assign-case-detail-page-content-center-card3'
|
||||||
|
).offsetHeight -
|
||||||
|
1
|
||||||
|
) {
|
||||||
|
tabName.value = '案例成效'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -327,7 +351,7 @@
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 4.9rem;
|
top: 3.9rem;
|
||||||
div {
|
div {
|
||||||
height: 0.3rem;
|
height: 0.3rem;
|
||||||
padding-right: 0.7rem;
|
padding-right: 0.7rem;
|
||||||
|
|
|
@ -79,6 +79,9 @@
|
||||||
<a-button v-else-if="item.type == 'dialog'" @click="sourceClick">
|
<a-button v-else-if="item.type == 'dialog'" @click="sourceClick">
|
||||||
请选择来源应用
|
请选择来源应用
|
||||||
</a-button>
|
</a-button>
|
||||||
|
<a-button v-else-if="item.type == 'dialog2'" @click="componentsClick">
|
||||||
|
请选择关联组件
|
||||||
|
</a-button>
|
||||||
<a-select v-else-if="item.type == 'select'" style="width: 240px" v-model:value="item.note1"
|
<a-select v-else-if="item.type == 'select'" style="width: 240px" v-model:value="item.note1"
|
||||||
:placeholder="'请选择' + item.name">
|
:placeholder="'请选择' + item.name">
|
||||||
<a-select-option v-for="(itemSelect, indexSelect) in item.options" :key="indexSelect"
|
<a-select-option v-for="(itemSelect, indexSelect) in item.options" :key="indexSelect"
|
||||||
|
@ -98,12 +101,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="AssociatedApplication">
|
<div class="AssociatedApplication">
|
||||||
<a-modal v-model:visible="visibleAssociatedApplication" title="关联应用" @ok="handleOk" @cancel="handleCancel"
|
<a-modal v-model:visible="visibleAssociatedApplication" :title="titleName" @ok="handleOk"
|
||||||
style="width: 960px">
|
@cancel="handleCancel" style="width: 960px">
|
||||||
<div>
|
<div>
|
||||||
<a-transfer v-model:target-keys="targetKeys" v-model:selected-keys="selectedKeys"
|
<a-transfer v-model:target-keys="targetKeys" v-model:selected-keys="selectedKeys"
|
||||||
:data-source="mockData" :titles="['未关联的应用名称', '已关联的应用名称']" :render="(item) => item.title"
|
:data-source="mockData" :titles="titles" :render="(item) => item.title" @change="handleChange"
|
||||||
@change="handleChange" @selectChange="handleSelectChange" />
|
@selectChange="handleSelectChange" />
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
|
@ -120,6 +123,7 @@ import { message } from 'ant-design-vue'
|
||||||
import {
|
import {
|
||||||
getCategoryTreePage,
|
getCategoryTreePage,
|
||||||
queryApplicationRelByResourceId,
|
queryApplicationRelByResourceId,
|
||||||
|
queryResourceRelByKeyId,
|
||||||
} from '@/api/personalCenter'
|
} from '@/api/personalCenter'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
@ -327,6 +331,8 @@ const ApplicationArea = (item, itemson) => {
|
||||||
// 来源应用
|
// 来源应用
|
||||||
const visibleAssociatedApplication = ref(false)
|
const visibleAssociatedApplication = ref(false)
|
||||||
const mockData = ref([])
|
const mockData = ref([])
|
||||||
|
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
|
||||||
|
const titleName = ref('关联应用')
|
||||||
|
|
||||||
const sourceClick = () => {
|
const sourceClick = () => {
|
||||||
visibleAssociatedApplication.value = true
|
visibleAssociatedApplication.value = true
|
||||||
|
@ -344,6 +350,28 @@ const sourceClick = () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 关联组件
|
||||||
|
const componentsClick = () => {
|
||||||
|
titles.value = ['未关联的组件名称', '已关联的组件名称']
|
||||||
|
titleName.value = '关联组件'
|
||||||
|
|
||||||
|
visibleAssociatedApplication.value = true
|
||||||
|
queryResourceRelByKeyId({
|
||||||
|
keyId: 0,
|
||||||
|
type: '组件服务',
|
||||||
|
referenceName: '',
|
||||||
|
}).then((res) => {
|
||||||
|
// console.log(res.data.data.notLinked)
|
||||||
|
res.data.data.notLinked.forEach((val, index) => {
|
||||||
|
// console.log(val, index)
|
||||||
|
mockData.value.push({
|
||||||
|
key: val.id,
|
||||||
|
title: val.name,
|
||||||
|
description: val.id,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
const targetKeys = ref([])
|
const targetKeys = ref([])
|
||||||
const selectedKeys = ref([])
|
const selectedKeys = ref([])
|
||||||
|
|
||||||
|
@ -362,7 +390,7 @@ const handleOk = (e) => {
|
||||||
visibleAssociatedApplication.value = false
|
visibleAssociatedApplication.value = false
|
||||||
// console.log('2222222222222', props.refData)
|
// console.log('2222222222222', props.refData)
|
||||||
data.value.list.map((item) => {
|
data.value.list.map((item) => {
|
||||||
if (item.name === '来源应用') {
|
if (item.name === '来源应用' || item.name === '关联组件信息') {
|
||||||
item.note1 = targetKeys.value + ''
|
item.note1 = targetKeys.value + ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -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-01 14:16:18
|
* @LastEditTime: 2022-07-05 11:41:52
|
||||||
* @Description: 算法详情页头部
|
* @Description: 算法详情页头部
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -96,6 +96,7 @@
|
||||||
resourceName: props.dataList.name,
|
resourceName: props.dataList.name,
|
||||||
time: props.dataList.createDate,
|
time: props.dataList.createDate,
|
||||||
type: props.dataList.type,
|
type: props.dataList.type,
|
||||||
|
componentType: '智能算法',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
deptId: props.dataList.deptId,
|
deptId: props.dataList.deptId,
|
||||||
|
|
|
@ -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-01 14:20:52
|
* @LastEditTime: 2022-07-05 11:42:27
|
||||||
* @Description: 算法详情页头部
|
* @Description: 算法详情页头部
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -96,6 +96,7 @@
|
||||||
resourceName: props.dataList.name,
|
resourceName: props.dataList.name,
|
||||||
time: props.dataList.createDate,
|
time: props.dataList.createDate,
|
||||||
type: props.dataList.type,
|
type: props.dataList.type,
|
||||||
|
componentType: '业务组件',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
deptId: props.dataList.deptId,
|
deptId: props.dataList.deptId,
|
||||||
|
|
|
@ -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-01 14:21:04
|
* @LastEditTime: 2022-07-05 11:42:59
|
||||||
* @Description: 开发组件详情页头部
|
* @Description: 开发组件详情页头部
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -96,6 +96,7 @@
|
||||||
resourceName: props.dataList.name,
|
resourceName: props.dataList.name,
|
||||||
time: props.dataList.createDate,
|
time: props.dataList.createDate,
|
||||||
type: props.dataList.type,
|
type: props.dataList.type,
|
||||||
|
componentType: '开发组件',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
deptId: props.dataList.deptId,
|
deptId: props.dataList.deptId,
|
||||||
|
|
|
@ -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-01 18:52:34
|
* @LastEditTime: 2022-07-05 11:43:18
|
||||||
* @Description: 算法详情页头部
|
* @Description: 算法详情页头部
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -96,6 +96,7 @@
|
||||||
resourceName: props.dataList.name,
|
resourceName: props.dataList.name,
|
||||||
time: props.dataList.createDate,
|
time: props.dataList.createDate,
|
||||||
type: props.dataList.type,
|
type: props.dataList.type,
|
||||||
|
componentType: '图层服务',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
deptId: props.dataList.deptId,
|
deptId: props.dataList.deptId,
|
||||||
|
|
|
@ -277,22 +277,24 @@
|
||||||
})
|
})
|
||||||
console.log(
|
console.log(
|
||||||
'list',
|
'list',
|
||||||
list.value,
|
list.value
|
||||||
list.value[0].children.filter(
|
// list.value[0].children.filter(
|
||||||
(val) => val.id == list.value[0].checkedList[0]
|
// (val) => val.id == list.value[0].checkedList[0]
|
||||||
)[0].resourceName
|
// )[0].resourceName
|
||||||
)
|
)
|
||||||
const baseURL = window.SITE_CONFIG.apiURL
|
const baseURL = window.SITE_CONFIG.apiURL
|
||||||
let record = ref('1')
|
let record = ref('1')
|
||||||
const text = ref('')
|
const text = ref('')
|
||||||
const formName = reactive({
|
const formName = reactive({
|
||||||
title: list.value[0].children
|
title: list.value[0].children
|
||||||
|
? list.value[0].children
|
||||||
.filter((val) => val.id == list.value[0].checkedList[0])[0]
|
.filter((val) => val.id == list.value[0].checkedList[0])[0]
|
||||||
.resourceName.concat(
|
.resourceName.concat(
|
||||||
list.value[0].checkedList.length > 0
|
list.value[0].checkedList.length > 0
|
||||||
? '等能力申请' + num.value + '个'
|
? '等能力申请' + num.value + '个'
|
||||||
: '能力申请'
|
: '能力申请'
|
||||||
), // 标题
|
)
|
||||||
|
: list.value[0].arr[0].resourceName.concat('能力申请'), // 标题
|
||||||
applicationSystem: [], // 应用系统
|
applicationSystem: [], // 应用系统
|
||||||
applicationScene: [], // 应用场景
|
applicationScene: [], // 应用场景
|
||||||
applicationBackground: '', // 应用背景
|
applicationBackground: '', // 应用背景
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
:class="
|
:class="
|
||||||
item.type == '应用资源'
|
item.type == '应用资源'
|
||||||
? 'yyzy'
|
? 'yyzy'
|
||||||
: item.type == '数据资源'
|
: !item.type
|
||||||
? 'sjzy'
|
? 'sjzy'
|
||||||
: item.infoList &&
|
: item.infoList &&
|
||||||
item.infoList.filter((val) => val.attrType == '组件类型')[0]
|
item.infoList.filter((val) => val.attrType == '组件类型')[0]
|
||||||
|
|
Loading…
Reference in New Issue