应用资源和组件服务调换位置

This commit is contained in:
guoyue 2022-09-08 14:21:42 +08:00
parent 510e72f35e
commit 715792aa7d
12 changed files with 1354 additions and 1415 deletions

View File

@ -505,3 +505,6 @@ export const RECOURCE_G_ICON = {
resourceProtection: resourceProtection:
'/src/assets/resourceManageMap/pic/point-resettlement-circle.png', '/src/assets/resourceManageMap/pic/point-resettlement-circle.png',
} }
// -tab
export const DETAIL_PAGE_CONTENT_DEFAULT_TAB = '应用资源'

View File

@ -26,6 +26,8 @@
import layer from './components/layer.vue' import layer from './components/layer.vue'
import application from './components/application.vue' import application from './components/application.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const router = useRouter() const router = useRouter()
const abilityToType = router.currentRoute.value.query.abilityToType const abilityToType = router.currentRoute.value.query.abilityToType
const show = ref('algorithm') const show = ref('algorithm')
@ -47,7 +49,8 @@
const newpage = router.resolve({ const newpage = router.resolve({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', // select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
}, },
}) })
window.location.href = newpage.href window.location.href = newpage.href

View File

@ -787,36 +787,36 @@
<home-footer></home-footer> <home-footer></home-footer>
</template> </template>
<script> <script>
import HomeFooter from '@/views/newHome/components/Footer' import HomeFooter from '@/views/newHome/components/Footer'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { defineComponent, reactive, ref, toRefs, onMounted, watch } from 'vue' import { defineComponent, reactive, ref, toRefs, onMounted, watch } from 'vue'
import { UpOutlined, DownOutlined } from '@ant-design/icons-vue' import { UpOutlined, DownOutlined } from '@ant-design/icons-vue'
import { import {
selectDicStoreAll, selectDicStoreAll,
pageWithAttrs, pageWithAttrs,
getDataResource, getDataResource,
getIntegrationServicesList, getIntegrationServicesList,
getCountByFuzzyQuery, getCountByFuzzyQuery,
} from '@/api/home.js' } from '@/api/home.js'
import { getSgcList } from '@/api/personalCenter' import { getSgcList } from '@/api/personalCenter'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import detailsPageconetentTree from '@/views/home/detailsPageconetentTree.vue' import detailsPageconetentTree from '@/views/home/detailsPageconetentTree.vue'
import searchResultList from '@/views/home/components/searchResultList.vue' import searchResultList from '@/views/home/components/searchResultList.vue'
import KnowledgeBase from '@/views/home/components/KnowledgeBase.vue' import KnowledgeBase from '@/views/home/components/KnowledgeBase.vue'
// //
import DetailsPageResource from '@/views/home/components/DetailsPageResource.vue' import DetailsPageResource from '@/views/home/components/DetailsPageResource.vue'
// //
import infrastructurePage from '@/views/home/infrastructurePage.vue' import infrastructurePage from '@/views/home/infrastructurePage.vue'
import detailsPageInfrastructureTree from '@/views/home/detailsPageInfrastructureTree.vue' import detailsPageInfrastructureTree from '@/views/home/detailsPageInfrastructureTree.vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { import {
titleNameArray, titleNameArray,
keyongziyuanqingkaungArray, keyongziyuanqingkaungArray,
shujuziyuanqingkuangArray, shujuziyuanqingkuangArray,
} from './constantData/showData.js' } from './constantData/showData.js'
export default defineComponent({ export default defineComponent({
setup() { setup() {
//6 //6
const flag = ref('') const flag = ref('')
@ -1011,10 +1011,7 @@
attrValue: tag.dict_label, attrValue: tag.dict_label,
}) })
} else { } else {
val.selectedTags.splice( val.selectedTags.splice(val.selectedTags.indexOf(tag.dict_label), 1)
val.selectedTags.indexOf(tag.dict_label),
1
)
} }
} }
}) })
@ -1277,11 +1274,7 @@
paramsGetResources.pageNum = 1 paramsGetResources.pageNum = 1
} }
pageWithAttrs(paramsGetResources).then((res) => { pageWithAttrs(paramsGetResources).then((res) => {
console.log( console.log('查询列表============>', resourceList, res.data.data)
'查询列表============>',
resourceList,
res.data.data
)
resourceList.data = [] resourceList.data = []
videoList.data = [] videoList.data = []
if (Cardsname.value === '基础设施') { if (Cardsname.value === '基础设施') {
@ -1535,9 +1528,7 @@
router.currentRoute.value.query.appLiCation = '' router.currentRoute.value.query.appLiCation = ''
tecHnosphere = router.currentRoute.value.query.tecHnosphere tecHnosphere = router.currentRoute.value.query.tecHnosphere
appLiCation = router.currentRoute.value.query.appLiCation appLiCation = router.currentRoute.value.query.appLiCation
let newQuery = JSON.parse( let newQuery = JSON.parse(JSON.stringify(router.currentRoute.value.query))
JSON.stringify(router.currentRoute.value.query)
)
Cardsname.value = name Cardsname.value = name
console.log( console.log(
'更改前url中的select=====================>', '更改前url中的select=====================>',
@ -1675,14 +1666,14 @@
mybus.off('changePage') mybus.off('changePage')
mybus.off('changeInfo') mybus.off('changeInfo')
}, },
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@font-face { @font-face {
font-family: 'webfont'; font-family: 'webfont';
src: url('~@/assets/capacitySquare/webfont.ttf'); src: url('~@/assets/capacitySquare/webfont.ttf');
} }
.resultListSearchInput-father { .resultListSearchInput-father {
background: #f3f5f9; background: #f3f5f9;
padding: 0.2rem; padding: 0.2rem;
@ -1699,9 +1690,9 @@
margin-top: 0.2rem; margin-top: 0.2rem;
} }
} }
} }
.resultListSearchInput { .resultListSearchInput {
margin-left: 0.1rem; margin-left: 0.1rem;
:deep(.ant-input) { :deep(.ant-input) {
@ -1726,9 +1717,9 @@
:deep(.ant-input-group-addon) { :deep(.ant-input-group-addon) {
left: 0 !important; left: 0 !important;
} }
} }
.button-reset { .button-reset {
border: 0; border: 0;
outline: none; outline: none;
width: 0.8rem; width: 0.8rem;
@ -1741,9 +1732,9 @@
line-height: 0.34rem; line-height: 0.34rem;
margin-left: 2.5rem; margin-left: 2.5rem;
cursor: pointer; cursor: pointer;
} }
.details-pageconetent { .details-pageconetent {
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;
@ -2073,9 +2064,9 @@
} }
} }
} }
} }
.shrinkTag { .shrinkTag {
width: 0.5rem; width: 0.5rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -2085,14 +2076,14 @@
span { span {
cursor: pointer; cursor: pointer;
} }
} }
.shrink { .shrink {
height: unset !important; height: unset !important;
overflow: unset !important; overflow: unset !important;
} }
.talk-monitor { .talk-monitor {
position: fixed; position: fixed;
bottom: 0.5rem; bottom: 0.5rem;
right: 0.1rem; right: 0.1rem;
@ -2106,8 +2097,8 @@
background: url('~@/assets/home/icon-talk.png'); background: url('~@/assets/home/icon-talk.png');
background-size: cover; background-size: cover;
} }
} }
.abilitySquare { .abilitySquare {
width: 0.7rem; width: 0.7rem;
height: 0.7rem; height: 0.7rem;
border-radius: 0.04rem; border-radius: 0.04rem;
@ -2195,9 +2186,9 @@
transform: scale(0); transform: scale(0);
} }
} }
} }
.top-content-father { .top-content-father {
width: 10.87rem; width: 10.87rem;
padding-left: 0.2rem; padding-left: 0.2rem;
@ -2284,13 +2275,13 @@
.top-content:nth-child(1) { .top-content:nth-child(1) {
margin-top: 0.41rem !important; margin-top: 0.41rem !important;
} }
} }
:deep(.ant-card-grid) { :deep(.ant-card-grid) {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
word-break: break-all; word-break: break-all;
} }
</style> </style>

View File

@ -199,6 +199,8 @@ import { getCategoryTreePage, endProcess } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { sgcDel, getApplyForm } from '@/api/personalCenter' import { sgcDel, getApplyForm } from '@/api/personalCenter'
import { pageWithAttrs, updateIntegrationServices } from '@/api/home' import { pageWithAttrs, updateIntegrationServices } from '@/api/home'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
export default { export default {
name: '', name: '',
props: {}, props: {},
@ -336,6 +338,17 @@ export default {
const resetFields = () => { const resetFields = () => {
window.history.go(-1) window.history.go(-1)
} }
//
const jumpToDetailsPageconetent = () => {
router.push({
path: '/DetailsPageconetent',
query: {
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
},
})
}
const processStartHandle = () => { const processStartHandle = () => {
debugger debugger
formRef.value.validate().then(() => { formRef.value.validate().then(() => {
@ -408,12 +421,7 @@ export default {
sxt = false sxt = false
} }
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
}) })
} else { } else {
@ -421,12 +429,7 @@ export default {
message.success('申请提交成功,请到消息中心查看!') message.success('申请提交成功,请到消息中心查看!')
sxt = false sxt = false
} }
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
}) })
} }
@ -450,12 +453,7 @@ export default {
sgcDel({ ids: ids }).then((res) => { sgcDel({ ids: ids }).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
}) })
} else { } else {
@ -463,12 +461,7 @@ export default {
if (Object.keys(integrationServicesItemInfo).length > 0) { if (Object.keys(integrationServicesItemInfo).length > 0) {
updateIntegrationServiceAction() updateIntegrationServiceAction()
} }
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
} else { } else {
message.error('申请失败!') message.error('申请失败!')
@ -483,12 +476,7 @@ export default {
// //
if (list.value[0].arr[0].type == '单兵设备') { if (list.value[0].arr[0].type == '单兵设备') {
message.success('单兵设备申请提交成功!') message.success('单兵设备申请提交成功!')
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} else { } else {
let ids = [] let ids = []
let falgNum = 0 let falgNum = 0
@ -550,12 +538,7 @@ export default {
sxt = false sxt = false
} }
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
}) })
} else { } else {
@ -563,12 +546,7 @@ export default {
message.success('申请提交成功,请到消息中心查看!') message.success('申请提交成功,请到消息中心查看!')
sxt = false sxt = false
} }
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
}) })
} }
@ -588,12 +566,7 @@ export default {
sgcDel({ ids: ids }).then((res) => { sgcDel({ ids: ids }).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
}) })
} else { } else {
@ -601,12 +574,7 @@ export default {
if (Object.keys(integrationServicesItemInfo).length > 0) { if (Object.keys(integrationServicesItemInfo).length > 0) {
updateIntegrationServiceAction() updateIntegrationServiceAction()
} }
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} }
} else { } else {
message.error('申请失败!') message.error('申请失败!')
@ -619,12 +587,7 @@ export default {
applyAllApplication(formName).then((res) => { applyAllApplication(formName).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
message.success('申请提交成功,请到消息中心查看!') message.success('申请提交成功,请到消息中心查看!')
router.push({ jumpToDetailsPageconetent()
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} else { } else {
message.error('申请失败!') message.error('申请失败!')
} }
@ -663,9 +626,7 @@ export default {
processDefinitionKey: processDefinitionKey, processDefinitionKey: processDefinitionKey,
businessKey: businessKey, businessKey: businessKey,
}) })
updateInstanceId(params).then( updateInstanceId(params).then(() => {})
() => {}
)
} }
}) })
.catch(() => {}) .catch(() => {})
@ -786,7 +747,8 @@ export default {
// - todo // - todo
const updateIntegrationServiceAction = () => { const updateIntegrationServiceAction = () => {
let _applyCount = Number(integrationServicesItemInfo.value.applyCount || 0) + 1 let _applyCount =
Number(integrationServicesItemInfo.value.applyCount || 0) + 1
let _data = Object.assign({}, integrationServicesItemInfo.value, { let _data = Object.assign({}, integrationServicesItemInfo.value, {
applyCount: _applyCount, applyCount: _applyCount,
}) })

View File

@ -131,43 +131,28 @@
import { getSgcTotal } from '@/api/home' import { getSgcTotal } from '@/api/home'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const route = useRoute() 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 whoShow1 = whoShow
const user = ref({ const user = ref({
username: store.getters['user/username'], username: store.getters['user/username'],
}) })
// user.username.value = store.getters(['user/username'])
const select = ref(router.currentRoute.value.name) const select = ref(router.currentRoute.value.name)
const mynoticeFlag = ref(false) const mynoticeFlag = ref(false)
const mynoticeData = ref([]) const mynoticeData = ref([])
console.log('navListManagement------------>', navListManagement) console.log('navListManagement------------>', navListManagement)
// eslint-disable-next-line no-undef
const navList = ref(navListManagement.navList) const navList = ref(navListManagement.navList)
console.log('navList------------>', navList) console.log('navList------------>', navList)
const props = defineProps({ const props = defineProps({
showView: { type: String, default: '' }, showView: { type: String, default: '' },
}) })
// //
// getUser().then((res) => {
// user.value = res.data.data
// // console.log('user===============>', user.value)
// })
// 退 // 退
const logout = async () => { const logout = async () => {
await store.dispatch('user/logout') await store.dispatch('user/logout')
@ -208,7 +193,8 @@
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', // select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
}, },
}) })
break break
@ -217,11 +203,6 @@
path: '/capabilityCloud', path: '/capabilityCloud',
}) })
break break
// case '':
// router.push({
// path: '/developmentGuide',
// })
// break
case '技术文档': case '技术文档':
router.push({ router.push({
path: '/instructionManual', path: '/instructionManual',

View File

@ -1,12 +1,12 @@
export const titleNameArray = [ export const titleNameArray = [
{
photo: require('@/assets/newHome/banner-zj.png'),
name: '组件服务',
},
{ {
photo: require('@/assets/newHome/banner-yy.png'), photo: require('@/assets/newHome/banner-yy.png'),
name: '应用资源', name: '应用资源',
}, },
{
photo: require('@/assets/newHome/banner-zj.png'),
name: '组件服务',
},
{ {
photo: require('@/assets/newHome/banner-jc.png'), photo: require('@/assets/newHome/banner-jc.png'),
name: '基础设施', name: '基础设施',

View File

@ -35,6 +35,8 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { ref } from 'vue' import { ref } from 'vue'
import { selectNewest } from '@/api/home' import { selectNewest } from '@/api/home'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
export default { export default {
name: 'latestAbility', name: 'latestAbility',
components: {}, components: {},
@ -45,7 +47,8 @@
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', // select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
}, },
}) })
} }

View File

@ -118,6 +118,7 @@
import TheOverallProcess from './TheOverallProcess.vue' import TheOverallProcess from './TheOverallProcess.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const router = useRouter() const router = useRouter()
const seviceList = ref([ const seviceList = ref([
{ {
@ -255,7 +256,8 @@
const newpage = router.resolve({ const newpage = router.resolve({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', // select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
}, },
}) })
window.location.href = newpage.href window.location.href = newpage.href

View File

@ -32,6 +32,7 @@
import { ref } from 'vue' import { ref } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const productServiceData = ref([]) const productServiceData = ref([])
@ -76,7 +77,8 @@
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', // select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
}, },
}) })
} }

View File

@ -61,6 +61,7 @@
import { pageWithAttrs } from '@/api/home.js' import { pageWithAttrs } from '@/api/home.js'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const select = ref('浏览量') const select = ref('浏览量')
@ -134,11 +135,11 @@
'选中===================>', '选中===================>',
store.getters['home/selectCardsnum'] store.getters['home/selectCardsnum']
) )
// router.push({ path: '/DetailsPageconetent' })
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', // select: '',
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
}, },
}) })
} }

View File

@ -47,6 +47,7 @@
import { selectRecommend } from '@/api/home.js' import { selectRecommend } from '@/api/home.js'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
let dataList = ref([]) let dataList = ref([])
@ -94,7 +95,7 @@
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
select: '组件服务', select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
}, },
}) })
} }

View File

@ -255,24 +255,14 @@
const toView = () => { const toView = () => {
window.open(newpage.href, '_blank') window.open(newpage.href, '_blank')
} }
// const toApply = () => {
// window.open(applypage.href, '_blank')
// }
getList() getList()
// dataList.value.map((item, index) => {
// dataList.value[index].tupian = tupain.value[index]
// console.log('item', item, dataList.value)
// })
function jumpPage() { function jumpPage() {
// store
// store.commit('WorkDynList', {
// selectCardsnum: '',
// })
console.log( console.log(
'选中===================>', '选中===================>',
store.getters['home/selectCardsnum'] store.getters['home/selectCardsnum']
) )
// router.push({ path: '/DetailsPageconetent' })
router.push({ router.push({
path: '/WorkDynList', path: '/WorkDynList',
}) })