能力广场弹窗

This commit is contained in:
gaoyuanwei 2022-08-09 11:31:14 +08:00
parent b7afa338a6
commit d2d18fc0a6
2 changed files with 85 additions and 7 deletions

View File

@ -1,23 +1,35 @@
<template> <template>
<home-header></home-header> <!-- <home-header></home-header> -->
<div class="box"> <div class="box">
<algorithm v-if="show === 'algorithm'"></algorithm> <algorithm v-if="show === 'algorithm'"></algorithm>
<layer v-else-if="show === 'layer'"></layer> <layer v-else-if="show === 'layer'"></layer>
<application v-else-if="show === 'application'"></application> <application v-else-if="show === 'application'"></application>
</div> </div>
<home-footer></home-footer> <!-- <home-footer></home-footer> -->
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import HomeHeader from '@/views/home/components/header' // import HomeHeader from '@/views/home/components/header'
import HomeFooter from '@/views/newHome/components/Footer' // import HomeFooter from '@/views/newHome/components/Footer'
import algorithm from './components/algorithm.vue' import algorithm from './components/algorithm.vue'
import layer from './components/layer.vue' import layer from './components/layer.vue'
import application from './components/application.vue' import application from './components/application.vue'
const show = ref('application') import { useRouter } from 'vue-router'
const router = useRouter()
const abilityToType = router.currentRoute.value.query.abilityToType
const show = ref('algorithm')
if (abilityToType === '应用资源') {
show.value = 'application'
} else if (abilityToType === '图层服务') {
show.value = 'layer'
} else if (abilityToType === '智能算法') {
show.value = 'algorithm'
} else {
console.log('no')
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.box { .box {
padding-top: 0.64rem; // padding-top: 0.64rem;
} }
</style> </style>

View File

@ -113,6 +113,37 @@
</div> </div>
</a-modal> </a-modal>
</div> </div>
<div @click="showAbilitySquare">
<p></p>
<p>能力广场</p>
<a-modal
v-model:visible="visibleAbilitySquare"
@ok="handleOkAbilitySquare"
class="shangjia-class"
@cancel="handlecancelAbilitySquare"
>
<div class="ant-modal-title" id="vcDialogTitle1">
<div class="showBg"></div>
能力广场目录
</div>
<div class="ability-to-type">
<div class="ability-to-type-content">
<div
v-for="item in abilitySquare"
:key="item"
@click="abilitySquareFunction(item)"
:class="
abilitySquareFunctionData == item
? 'ability-to-type-down'
: ''
"
>
{{ item }}
</div>
</div>
</div>
</a-modal>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -142,6 +173,7 @@
abilityToTypeFunctionData.value = item abilityToTypeFunctionData.value = item
} }
let abilityToType = ref(['组件服务', '应用资源']) let abilityToType = ref(['组件服务', '应用资源'])
let abilitySquare = ref(['智能算法', '图层服务', '应用资源'])
let componentType = ref([ let componentType = ref([
'智能算法', '智能算法',
'图层服务', '图层服务',
@ -154,6 +186,11 @@
const showModal = () => { const showModal = () => {
visible.value = true visible.value = true
} }
// 广
const visibleAbilitySquare = ref(false)
const showAbilitySquare = () => {
visibleAbilitySquare.value = true
}
let componentTypeValueOld = ref('') let componentTypeValueOld = ref('')
function componentTypeValueFunction(item) { function componentTypeValueFunction(item) {
if (componentTypeValueOld.value != item) { if (componentTypeValueOld.value != item) {
@ -252,6 +289,28 @@
watch(abilityToTypeFunctionData, () => { watch(abilityToTypeFunctionData, () => {
componentTypeValue.value = '' componentTypeValue.value = ''
}) })
// 广
const handleOkAbilitySquare = (e) => {
let snumSquare = ref({})
snumSquare.value = {
abilityToType: abilitySquareFunctionData.value,
}
const applypage = router.resolve({
path: '/capacitySquare', //
query: snumSquare.value,
})
window.open(applypage.href, '_blank')
console.log(e, abilitySquareFunctionData.value, 'hahhaha')
visibleAbilitySquare.value = false
abilitySquareFunctionData.value = '智能算法'
}
let abilitySquareFunctionData = ref('智能算法')
function abilitySquareFunction(item) {
abilitySquareFunctionData.value = item
}
function handlecancelAbilitySquare() {
abilitySquareFunctionData.value = '智能算法'
}
</script> </script>
<style lang="less"> <style lang="less">
.shangjia-class { .shangjia-class {
@ -520,7 +579,7 @@
} }
.fixedmount { .fixedmount {
height: 1.5rem; height: 2.3rem;
display: flex; display: flex;
position: fixed; position: fixed;
bottom: 2.56rem; bottom: 2.56rem;
@ -571,4 +630,11 @@
background-size: contain; background-size: contain;
background-position: center; background-position: center;
} }
.fixedmount div:nth-child(3) p:nth-child(1) {
height: 0.24rem;
width: 0.24rem;
background: url('~@/assets/home/shangjia.png') no-repeat;
background-size: contain;
background-position: center;
}
</style> </style>