From 715792aa7d31b8b3b897ceb30b3017ac815882fd Mon Sep 17 00:00:00 2001 From: guoyue Date: Thu, 8 Sep 2022 14:21:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E8=B5=84=E6=BA=90=E5=92=8C?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=9C=8D=E5=8A=A1=E8=B0=83=E6=8D=A2=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/global/GlobalConfig.js | 3 + front/src/views/capacitySquare/index.vue | 5 +- front/src/views/home/DetailsPageconetent.vue | 2595 ++++++++--------- front/src/views/home/apply.vue | 92 +- front/src/views/home/components/header.vue | 31 +- front/src/views/home/constantData/showData.js | 8 +- front/src/views/home/latestAbility.vue | 5 +- .../instructionManual/components/menuBook.vue | 4 +- .../newHome/components/LatestCapabilities.vue | 4 +- .../newHome/components/PopularAbility.vue | 5 +- .../components/RecommendationAbility.vue | 3 +- .../views/newHome/components/WorkDynamics.vue | 14 +- 12 files changed, 1354 insertions(+), 1415 deletions(-) diff --git a/front/src/global/GlobalConfig.js b/front/src/global/GlobalConfig.js index dcee9c52..b3d218e3 100644 --- a/front/src/global/GlobalConfig.js +++ b/front/src/global/GlobalConfig.js @@ -505,3 +505,6 @@ export const RECOURCE_G_ICON = { resourceProtection: '/src/assets/resourceManageMap/pic/point-resettlement-circle.png', } + +// 能力集市-默认选中tab +export const DETAIL_PAGE_CONTENT_DEFAULT_TAB = '应用资源' diff --git a/front/src/views/capacitySquare/index.vue b/front/src/views/capacitySquare/index.vue index dddb0bb7..8f3d993e 100644 --- a/front/src/views/capacitySquare/index.vue +++ b/front/src/views/capacitySquare/index.vue @@ -26,6 +26,8 @@ import layer from './components/layer.vue' import application from './components/application.vue' import { useRouter } from 'vue-router' + import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' + const router = useRouter() const abilityToType = router.currentRoute.value.query.abilityToType const show = ref('algorithm') @@ -47,7 +49,8 @@ const newpage = router.resolve({ path: '/DetailsPageconetent', query: { - select: '组件服务', + // select: '组件服务', + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB }, }) window.location.href = newpage.href diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue index 5279f043..f7cc45a0 100644 --- a/front/src/views/home/DetailsPageconetent.vue +++ b/front/src/views/home/DetailsPageconetent.vue @@ -787,528 +787,428 @@ diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index 4305c07b..d47f4091 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -199,6 +199,8 @@ import { getCategoryTreePage, endProcess } from '@/api/personalCenter' import mybus from '@/myplugins/mybus' import { sgcDel, getApplyForm } from '@/api/personalCenter' import { pageWithAttrs, updateIntegrationServices } from '@/api/home' +import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' + export default { name: '', props: {}, @@ -336,6 +338,17 @@ export default { const resetFields = () => { window.history.go(-1) } + + // 跳转到能力集市 + const jumpToDetailsPageconetent = () => { + router.push({ + path: '/DetailsPageconetent', + query: { + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB + }, + }) + } + const processStartHandle = () => { debugger formRef.value.validate().then(() => { @@ -408,12 +421,7 @@ export default { sxt = false } mybus.emit('getSgcNum') - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } }) } else { @@ -421,12 +429,7 @@ export default { message.success('申请提交成功,请到消息中心查看!') sxt = false } - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } }) } @@ -450,12 +453,7 @@ export default { sgcDel({ ids: ids }).then((res) => { if (res.data.msg === 'success') { mybus.emit('getSgcNum') - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } }) } else { @@ -463,12 +461,7 @@ export default { if (Object.keys(integrationServicesItemInfo).length > 0) { updateIntegrationServiceAction() } - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } } else { message.error('申请失败!') @@ -483,12 +476,7 @@ export default { // 单兵设备为了演示 添加 不做处理 if (list.value[0].arr[0].type == '单兵设备') { message.success('单兵设备申请提交成功!') - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } else { let ids = [] let falgNum = 0 @@ -550,12 +538,7 @@ export default { sxt = false } mybus.emit('getSgcNum') - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } }) } else { @@ -563,12 +546,7 @@ export default { message.success('申请提交成功,请到消息中心查看!') sxt = false } - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } }) } @@ -588,12 +566,7 @@ export default { sgcDel({ ids: ids }).then((res) => { if (res.data.msg === 'success') { mybus.emit('getSgcNum') - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } }) } else { @@ -601,12 +574,7 @@ export default { if (Object.keys(integrationServicesItemInfo).length > 0) { updateIntegrationServiceAction() } - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } } else { message.error('申请失败!') @@ -619,12 +587,7 @@ export default { applyAllApplication(formName).then((res) => { if (res.data.code == 0) { message.success('申请提交成功,请到消息中心查看!') - router.push({ - path: '/DetailsPageconetent', - query: { - select: '组件服务', - }, - }) + jumpToDetailsPageconetent() } else { message.error('申请失败!') } @@ -663,9 +626,7 @@ export default { processDefinitionKey: processDefinitionKey, businessKey: businessKey, }) - updateInstanceId(params).then( - () => {} - ) + updateInstanceId(params).then(() => {}) } }) .catch(() => {}) @@ -779,14 +740,15 @@ export default { } } } - + onBeforeUnmount(() => { mybus.off('reomveOldData') }) // 融合服务-更新 todo const updateIntegrationServiceAction = () => { - let _applyCount = Number(integrationServicesItemInfo.value.applyCount || 0) + 1 + let _applyCount = + Number(integrationServicesItemInfo.value.applyCount || 0) + 1 let _data = Object.assign({}, integrationServicesItemInfo.value, { applyCount: _applyCount, }) diff --git a/front/src/views/home/components/header.vue b/front/src/views/home/components/header.vue index 0096d28f..dcb4585f 100644 --- a/front/src/views/home/components/header.vue +++ b/front/src/views/home/components/header.vue @@ -131,43 +131,28 @@ import { getSgcTotal } from '@/api/home' import Cookies from 'js-cookie' import mybus from '@/myplugins/mybus' + import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' + const store = useStore() const router = useRouter() const route = useRoute() - // const navListManagement = ref([ - // { name: '共享门户', key: 'home' }, - // { name: '能力集市', key: 'DetailsPageconetent' }, - // { name: '能力云图', key: 'capabilityCloud' }, - // { name: '能力统计', key: 'abilityStatistics' }, - // { name: '开发指南', key: 'developmentGuide' }, - // { name: '需求中心', key: 'demandCenter' }, - // // { name: '个人中心', key: 'personalCenter' }, - // { name: '区市站点', key: 'mapTest' }, - // // { name: '后台管理', key: 'houtaiguanli' }, - // { name: '赋能案例', key: 'assignCase' }, - // ]) + const whoShow1 = whoShow const user = ref({ username: store.getters['user/username'], }) - // user.username.value = store.getters(['user/username']) const select = ref(router.currentRoute.value.name) const mynoticeFlag = ref(false) const mynoticeData = ref([]) console.log('navListManagement------------>', navListManagement) - // eslint-disable-next-line no-undef const navList = ref(navListManagement.navList) console.log('navList------------>', navList) const props = defineProps({ showView: { type: String, default: '' }, }) - // // 获取用户信息 - // getUser().then((res) => { - // user.value = res.data.data - // // console.log('user===============>', user.value) - // }) + // 退出登录 const logout = async () => { await store.dispatch('user/logout') @@ -208,7 +193,8 @@ router.push({ path: '/DetailsPageconetent', query: { - select: '组件服务', + // select: '组件服务', + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB }, }) break @@ -217,11 +203,6 @@ path: '/capabilityCloud', }) break - // case '技术文档': - // router.push({ - // path: '/developmentGuide', - // }) - // break case '技术文档': router.push({ path: '/instructionManual', diff --git a/front/src/views/home/constantData/showData.js b/front/src/views/home/constantData/showData.js index 4c344a63..85602f8a 100644 --- a/front/src/views/home/constantData/showData.js +++ b/front/src/views/home/constantData/showData.js @@ -1,12 +1,12 @@ export const titleNameArray = [ - { - photo: require('@/assets/newHome/banner-zj.png'), - name: '组件服务', - }, { photo: require('@/assets/newHome/banner-yy.png'), name: '应用资源', }, + { + photo: require('@/assets/newHome/banner-zj.png'), + name: '组件服务', + }, { photo: require('@/assets/newHome/banner-jc.png'), name: '基础设施', diff --git a/front/src/views/home/latestAbility.vue b/front/src/views/home/latestAbility.vue index f31415d9..028afcf1 100644 --- a/front/src/views/home/latestAbility.vue +++ b/front/src/views/home/latestAbility.vue @@ -35,6 +35,8 @@ import { useRouter } from 'vue-router' import { ref } from 'vue' import { selectNewest } from '@/api/home' + import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' + export default { name: 'latestAbility', components: {}, @@ -45,7 +47,8 @@ router.push({ path: '/DetailsPageconetent', query: { - select: '组件服务', + // select: '组件服务', + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB }, }) } diff --git a/front/src/views/instructionManual/components/menuBook.vue b/front/src/views/instructionManual/components/menuBook.vue index e03dfdd5..548ad4fe 100644 --- a/front/src/views/instructionManual/components/menuBook.vue +++ b/front/src/views/instructionManual/components/menuBook.vue @@ -118,6 +118,7 @@ import TheOverallProcess from './TheOverallProcess.vue' import { useRouter } from 'vue-router' import { message } from 'ant-design-vue' + import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' const router = useRouter() const seviceList = ref([ { @@ -255,7 +256,8 @@ const newpage = router.resolve({ path: '/DetailsPageconetent', query: { - select: '组件服务', + // select: '组件服务', + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB }, }) window.location.href = newpage.href diff --git a/front/src/views/newHome/components/LatestCapabilities.vue b/front/src/views/newHome/components/LatestCapabilities.vue index 59ab9956..a51403f2 100644 --- a/front/src/views/newHome/components/LatestCapabilities.vue +++ b/front/src/views/newHome/components/LatestCapabilities.vue @@ -32,6 +32,7 @@ import { ref } from 'vue' import { useRouter } from 'vue-router' import { useStore } from 'vuex' + import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' const store = useStore() const router = useRouter() const productServiceData = ref([]) @@ -76,7 +77,8 @@ router.push({ path: '/DetailsPageconetent', query: { - select: '组件服务', + // select: '组件服务', + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB }, }) } diff --git a/front/src/views/newHome/components/PopularAbility.vue b/front/src/views/newHome/components/PopularAbility.vue index 0ec931e8..f9b7ef49 100644 --- a/front/src/views/newHome/components/PopularAbility.vue +++ b/front/src/views/newHome/components/PopularAbility.vue @@ -61,6 +61,7 @@ import { pageWithAttrs } from '@/api/home.js' import { useRouter } from 'vue-router' import { useStore } from 'vuex' + import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' const store = useStore() const router = useRouter() const select = ref('浏览量') @@ -134,11 +135,11 @@ '选中===================>', store.getters['home/selectCardsnum'] ) - // router.push({ path: '/DetailsPageconetent' }) router.push({ path: '/DetailsPageconetent', query: { - select: '组件服务', + // select: '组件服务', + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB }, }) } diff --git a/front/src/views/newHome/components/RecommendationAbility.vue b/front/src/views/newHome/components/RecommendationAbility.vue index 4b772bb5..3b87a72d 100644 --- a/front/src/views/newHome/components/RecommendationAbility.vue +++ b/front/src/views/newHome/components/RecommendationAbility.vue @@ -47,6 +47,7 @@ import { selectRecommend } from '@/api/home.js' import { useRouter } from 'vue-router' import { useStore } from 'vuex' + import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' const store = useStore() const router = useRouter() let dataList = ref([]) @@ -94,7 +95,7 @@ router.push({ path: '/DetailsPageconetent', query: { - select: '组件服务', + select: DETAIL_PAGE_CONTENT_DEFAULT_TAB }, }) } diff --git a/front/src/views/newHome/components/WorkDynamics.vue b/front/src/views/newHome/components/WorkDynamics.vue index 4f609744..6013b08d 100644 --- a/front/src/views/newHome/components/WorkDynamics.vue +++ b/front/src/views/newHome/components/WorkDynamics.vue @@ -255,24 +255,14 @@ const toView = () => { window.open(newpage.href, '_blank') } - // const toApply = () => { - // window.open(applypage.href, '_blank') - // } + getList() - // dataList.value.map((item, index) => { - // dataList.value[index].tupian = tupain.value[index] - // console.log('item', item, dataList.value) - // }) + function jumpPage() { - // 点击内存入store - // store.commit('WorkDynList', { - // selectCardsnum: '组件服务', - // }) console.log( '选中===================>', store.getters['home/selectCardsnum'] ) - // router.push({ path: '/DetailsPageconetent' }) router.push({ path: '/WorkDynList', })