Commit a41c5207 authored by zhangrui123's avatar zhangrui123

增加来福士的专题屏

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