Commit a41c5207 authored by zhangrui123's avatar zhangrui123

增加来福士的专题屏

parent b5ae21a9
This diff is collapsed.
......@@ -47,4 +47,4 @@
"vite": "^2.0.1",
"vue-eslint-parser": "^7.4.1"
}
}
\ No newline at end of file
}
......@@ -27,6 +27,7 @@ export default {
{ name: '第一工作站', type: 'work1', id: '01001' },
{ name: '第二工作站', type: 'work2', id: '01002' },
{ name: '第三工作站', type: 'work3', id: '01003' },
{ name: '来福士专题屏', type: 'lfs' },
// {name: "振兴小区", type: url: "/community?id=527635870583459840"}
// {name: "威海路62弄", type: url: "/community?id=527635870583459841"}
],
......
......@@ -3,7 +3,11 @@
id="site-selector"
class="site-selector"
:style="`left:${
isNaN(+curViewType) ? 'calc(20vw + .1rem)' : 'calc(16vw + .1rem)'
isNaN(+curViewType) && curViewType != 'lfs'
? 'calc(20vw + .1rem)'
: isNaN(+curViewType) && curViewType == 'lfs'
? 'calc(32vw + .1rem)'
: 'calc(16vw + .1rem)'
}`"
>
<a-select
......@@ -26,6 +30,7 @@
import { computed, defineComponent } from 'vue'
import store from '@/store'
import { useRouter } from 'vue-router'
import { log } from 'console'
export default defineComponent({
name: 'SiteSelector',
......@@ -44,11 +49,16 @@ export default defineComponent({
if (store.state.curView.id) {
store.dispatch('initStationData', store.state.curView.id)
}
if (isNaN(+type)) {
console.log(type)
if (isNaN(+type) && type != 'lfs') {
// 小区以外的屏
router.push({
name: 'main',
})
} else if (isNaN(+type) && type == 'lfs') {
router.push({
name: 'raffles',
})
} else {
router.push({
name: 'community',
......@@ -67,20 +77,18 @@ export default defineComponent({
<style lang="stylus">
@import '../../components/MyComponent/main.styl'
$bg = rgba(13, 39, 76, .7)
$size = .1rem
$height = .26rem
$bg = rgba(13, 39, 76, 0.7)
$size = 0.1rem
$height = 0.26rem
#site-selector.site-selector
position fixed
top .45rem
top 0.45rem
z-index 99
.ant-select
background $bg
min-width .9rem
min-width 0.9rem
.ant-select-selector
min-width .9rem
min-width 0.9rem
border-top none
border-left none
border-right none
......
......@@ -10,19 +10,32 @@
<m-animate enter="fadeInLeft" leave="fadeOutLeft">
<LeftSection :info="rafflesDetail" area="left" />
</m-animate>
<SiteSelector />
<m-animate enter="fadeInRight" leave="fadeOutRight">
<RightSection :info="rafflesDetail" area="right" />
</m-animate>
</m-grid>
</template>
<script lang="ts" setup>
<script lang="ts">
import Title from './title.vue'
import LeftSection from './left.vue'
import RightSection from './right.vue'
import { ajax, api } from '@/ajax'
import { ref } from 'vue'
import { ref, defineComponent } from 'vue'
import SiteSelector from '@/view/community/site-selector.vue'
export default defineComponent({
name: 'Raffles',
components: {
SiteSelector,
},
setup() {
return {}
},
})
</script>
<script lang="ts" setup>
const rafflesDetail = ref<any>({})
ajax
.get({
......@@ -32,5 +45,4 @@ ajax
rafflesDetail.value = res?.data?.content?.[0] || {}
})
</script>
<style lang="stylus" scoped></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment