From 4c85700094b1f4f4696ed2fb0d5985f0f2602ae0 Mon Sep 17 00:00:00 2001 From: gaoyuanwei <2826352639@qq.com> Date: Tue, 5 Jul 2022 10:11:50 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=B3=E8=81=94=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/api/personalCenter.js | 8 ++++ .../components/PutOnTheShelf.vue | 38 ++++++++++++++++--- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/front/src/api/personalCenter.js b/front/src/api/personalCenter.js index d6a61432..67079961 100644 --- a/front/src/api/personalCenter.js +++ b/front/src/api/personalCenter.js @@ -223,3 +223,11 @@ export function queryApplicationRelByResourceId(params) { params, }) } +// 获取关联组件列表 +export function queryResourceRelByKeyId(params) { + return request({ + url: '/dataResourceRel/queryResourceRelByKeyId', + method: 'get', + params, + }) +} diff --git a/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue b/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue index 789dabd6..96eae8fe 100644 --- a/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue +++ b/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue @@ -79,6 +79,9 @@ 请选择来源应用 + + 请选择关联组件 + - + + :data-source="mockData" :titles="titles" :render="(item) => item.title" @change="handleChange" + @selectChange="handleSelectChange" /> @@ -120,6 +123,7 @@ import { message } from 'ant-design-vue' import { getCategoryTreePage, queryApplicationRelByResourceId, + queryResourceRelByKeyId, } from '@/api/personalCenter' import { useRouter } from 'vue-router' @@ -327,6 +331,8 @@ const ApplicationArea = (item, itemson) => { // 来源应用 const visibleAssociatedApplication = ref(false) const mockData = ref([]) +const titles = ref(['未关联的应用名称', '已关联的应用名称']) +const titleName = ref('关联应用') const sourceClick = () => { 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 selectedKeys = ref([]) @@ -362,7 +390,7 @@ const handleOk = (e) => { visibleAssociatedApplication.value = false // console.log('2222222222222', props.refData) data.value.list.map((item) => { - if (item.name === '来源应用') { + if (item.name === '来源应用' || item.name === '关联组件信息') { item.note1 = targetKeys.value + '' } }) From a6488d0c9293e06336c857bad3976a4e6de2df1b Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 5 Jul 2022 10:39:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/components/searchResultList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/views/home/components/searchResultList.vue b/front/src/views/home/components/searchResultList.vue index db9ced7a..9d40a781 100644 --- a/front/src/views/home/components/searchResultList.vue +++ b/front/src/views/home/components/searchResultList.vue @@ -37,7 +37,7 @@ :class=" item.type == '应用资源' ? 'yyzy' - : item.type == '数据资源' + : !item.type ? 'sjzy' : item.infoList && item.infoList.filter((val) => val.attrType == '组件类型')[0] From ae188ef656e6d3a2de28b54d8df6071f2195ac8f Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 5 Jul 2022 11:28:30 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B5=8B=E8=83=BD=E6=A1=88=E4=BE=8B=20?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E8=81=94=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AssignCaseDetailPage.vue | 154 ++++++++++-------- 1 file changed, 89 insertions(+), 65 deletions(-) diff --git a/front/src/views/assignCase/components/AssignCaseDetailPage.vue b/front/src/views/assignCase/components/AssignCaseDetailPage.vue index dd6bf0a5..fdde065e 100644 --- a/front/src/views/assignCase/components/AssignCaseDetailPage.vue +++ b/front/src/views/assignCase/components/AssignCaseDetailPage.vue @@ -2,7 +2,7 @@ * @Author: hisense.zhangfeihu * @Date: 2022-06-13 10:22:27 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-07-04 15:32:52 + * @LastEditTime: 2022-07-05 11:25:25 * @Description: 赋能案例-详情页 --> @@ -131,19 +131,16 @@ tabName.value = '案例背景' selectOne(val).then((res) => { res.data.data.infoList.map((item, index) => { - console.log('res.data.data.infoList', res.data.data.infoList) if (item.attrType == '图片') { res.data.data.infoList.splice(index, 1) } }) res.data.data.infoList.map((item, index) => { - console.log('res.data.data.infoList', res.data.data.infoList) if (item.attrType == '应用领域') { res.data.data.infoList.splice(index, 1) } }) dataFrom.value = res.data.data - console.log('dataFrom.value', dataFrom.value) }) } //其他案例 @@ -165,7 +162,6 @@ } }) dataList.value = res.data.data.records - console.log('dataList.value', dataList.value) }) } //监听路由发生变化 @@ -181,70 +177,98 @@ //tab点击事件 const tabSwitch = (item, index) => { tabName.value = item.attrType - if (index != 0 && index != 3) { - let top = - document.querySelector( - '#assign-case-detail-page-content-center-card' + index - ).offsetTop - - document.querySelector( - '#assign-case-detail-page-content-center-card' + (index - 1) - ).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.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( + 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' - } + ).offsetTop - + 330 - + 60 * index + document.documentElement.scrollTop = top + document.body.scrollTop = top } onMounted(() => { - init() + // init() // console.clear() window.addEventListener('scroll', () => { - domArr.value = document.querySelectorAll( - '.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 ( - scrollTop.value >= domArr.value[i].offsetTop - 50 && - scrollTop.value <= domArr.value[i + 1].offsetTop - 50 - ) { - selectNow.value = domArr.value[i].id - } - } + let top = document.documentElement.scrollTop + if ( + top < + 100 + + document.querySelector( + '#assign-case-detail-page-content-center-card0' + ).offsetHeight - + 1 + ) { + 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-bottom: 5px; position: fixed; - top: 4.9rem; + top: 3.9rem; div { height: 0.3rem; padding-right: 0.7rem; From 5e91ab13a9648632bf1df280fb8e239ed1c71d1d Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 5 Jul 2022 11:51:31 +0800 Subject: [PATCH 4/4] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Algorithm/AlgorithmTopDetails.vue | 3 ++- .../Business/BusinessTopDetails.vue | 3 ++- .../Developer/DeveloperTopDetails.vue | 3 ++- .../LayerService/LayerServiceTopDetails.vue | 3 ++- front/src/views/home/apply.vue | 22 ++++++++++--------- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue index d07af6cc..06303258 100644 --- a/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue +++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue @@ -2,7 +2,7 @@ * @Author: hisense.liangjunhua * @Date: 2022-06-08 11:56:28 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-07-01 14:16:18 + * @LastEditTime: 2022-07-05 11:41:52 * @Description: 算法详情页头部 --> @@ -96,6 +96,7 @@ resourceName: props.dataList.name, time: props.dataList.createDate, type: props.dataList.type, + componentType: '智能算法', }, ], deptId: props.dataList.deptId, diff --git a/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue b/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue index 8f5f245c..317e5387 100644 --- a/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue +++ b/front/src/views/detailsAll/components/Business/BusinessTopDetails.vue @@ -2,7 +2,7 @@ * @Author: hisense.liangjunhua * @Date: 2022-06-08 11:56:28 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-07-01 14:20:52 + * @LastEditTime: 2022-07-05 11:42:27 * @Description: 算法详情页头部 --> @@ -96,6 +96,7 @@ resourceName: props.dataList.name, time: props.dataList.createDate, type: props.dataList.type, + componentType: '业务组件', }, ], deptId: props.dataList.deptId, diff --git a/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue b/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue index 30fd34a2..0655035e 100644 --- a/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue +++ b/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue @@ -2,7 +2,7 @@ * @Author: hisense.liangjunhua * @Date: 2022-06-08 11:56:28 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-07-01 14:21:04 + * @LastEditTime: 2022-07-05 11:42:59 * @Description: 开发组件详情页头部 --> @@ -96,6 +96,7 @@ resourceName: props.dataList.name, time: props.dataList.createDate, type: props.dataList.type, + componentType: '开发组件', }, ], deptId: props.dataList.deptId, diff --git a/front/src/views/detailsAll/components/LayerService/LayerServiceTopDetails.vue b/front/src/views/detailsAll/components/LayerService/LayerServiceTopDetails.vue index 954e2ae4..04c67bc2 100644 --- a/front/src/views/detailsAll/components/LayerService/LayerServiceTopDetails.vue +++ b/front/src/views/detailsAll/components/LayerService/LayerServiceTopDetails.vue @@ -2,7 +2,7 @@ * @Author: hisense.liangjunhua * @Date: 2022-06-08 11:56:28 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-07-01 18:52:34 + * @LastEditTime: 2022-07-05 11:43:18 * @Description: 算法详情页头部 --> @@ -96,6 +96,7 @@ resourceName: props.dataList.name, time: props.dataList.createDate, type: props.dataList.type, + componentType: '图层服务', }, ], deptId: props.dataList.deptId, diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index f4fc6801..44123dad 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -277,22 +277,24 @@ }) console.log( 'list', - list.value, - list.value[0].children.filter( - (val) => val.id == list.value[0].checkedList[0] - )[0].resourceName + list.value + // list.value[0].children.filter( + // (val) => val.id == list.value[0].checkedList[0] + // )[0].resourceName ) const baseURL = window.SITE_CONFIG.apiURL let record = ref('1') const text = ref('') const formName = reactive({ title: list.value[0].children - .filter((val) => val.id == list.value[0].checkedList[0])[0] - .resourceName.concat( - list.value[0].checkedList.length > 0 - ? '等能力申请' + num.value + '个' - : '能力申请' - ), // 标题 + ? list.value[0].children + .filter((val) => val.id == list.value[0].checkedList[0])[0] + .resourceName.concat( + list.value[0].checkedList.length > 0 + ? '等能力申请' + num.value + '个' + : '能力申请' + ) + : list.value[0].arr[0].resourceName.concat('能力申请'), // 标题 applicationSystem: [], // 应用系统 applicationScene: [], // 应用场景 applicationBackground: '', // 应用背景