新增模块

This commit is contained in:
TS-QD1 2023-11-20 17:56:43 +08:00
parent 1d24ced80c
commit 20413a8cce
22 changed files with 425 additions and 27 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

View File

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

View File

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 394 B

View File

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 383 B

View File

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1,17 +1,29 @@
<template> <template>
<div class="main"> <div class="main">
<CardTwoCount/> <div class="main-title"></div>
<PersonCount2 :bg-type="2"/> <div class="main-body">
<PersonCount2/> <ModuleLeft1 class="left1"/>
<PersonCount1/> <ModuleLeft2 class="left2"/>
<PersonPercent/> <ModuleLeft3 class="left3"/>
<CardCount2/>
<CardCount1 bg="assets/imgs/card/bg2.png"/> <ModuleRight1 class="right1"/>
<Process/> <ModuleRight2 class="right2"/>
<CircleWave/> <ModuleRight3 class="right3"/>
<Bar id="bar" w="300" h="250" :x-data="barChart.xData" :data="barChart.data" />
<BarSpike id="barSpike" w="300" h="250" :x-data="barChart.xData" :data="barChart.data" /> <ModuleBottom class="bottom"/>
<PolarHalf id="polarHalf" w="600" :data="polarHalfChart.data" :unit="polarHalfChart.unit" />
<!-- <CardTwoCount/>
<PersonCount2 :bg-type="2"/>
<PersonCount2/>
<PersonCount1/>
<CardCount2/>
<CardCount1 bg="assets/imgs/card/bg2.png"/>
<Process/>
<CircleWave/>
<Bar id="bar" w="300" h="250" :x-data="barChart.xData" :data="barChart.data" />
<BarSpike id="barSpike" w="300" h="250" :x-data="barChart.xData" :data="barChart.data" />
<PolarHalf id="polarHalf" w="600" :data="polarHalfChart.data" :unit="polarHalfChart.unit" /> -->
</div>
</div> </div>
</template> </template>
@ -29,6 +41,16 @@ import PersonCount1 from './components/card/PersonCount1.vue';
import PersonCount2 from './components/card/PersonCount2.vue'; import PersonCount2 from './components/card/PersonCount2.vue';
import CardTwoCount from './components/card/CardTwoCount.vue'; import CardTwoCount from './components/card/CardTwoCount.vue';
import ModuleLeft1 from './module/ModuleLeft1.vue';
import ModuleLeft2 from './module/ModuleLeft2.vue';
import ModuleLeft3 from './module/ModuleLeft3.vue';
import ModuleRight1 from './module/ModuleRight1.vue';
import ModuleRight2 from './module/ModuleRight2.vue';
import ModuleRight3 from './module/ModuleRight3.vue';
import ModuleBottom from './module/ModuleBottom.vue';
const barChart = reactive({ const barChart = reactive({
xData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], xData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data: [120, 200, 150, 80, 70, 110, 130] data: [120, 200, 150, 80, 70, 110, 130]
@ -61,4 +83,31 @@ const polarHalfChart = reactive({
width 100% width 100%
height 100% height 100%
background-image url('assets/imgs/bg.png') background-image url('assets/imgs/bg.png')
.main-body
display grid
grid-template-columns 400px 1fr 400px
grid-gap 5px
grid-auto-rows auto
.left1
grid-column 1
grid-row 1
.left2
grid-column 1
grid-row 2
.left3
grid-column 1
grid-row 3
.right1
grid-column 3
grid-row 1
.right2
grid-column 3
grid-row 2
.right3
grid-column 3
grid-row 3
.bottom
grid-column 2
grid-row 3
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<div class="left" v-if="props.icon"> <div class="left">
<img :src="props.icon"/> <img :src="iconSrc"/>
</div> </div>
<div class="right"> <div class="right">
<div class="top"> <div class="top">
@ -10,7 +10,7 @@
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="process"> <div class="process">
<div class="value" :style="{width: (props.process * 300) + 'px'}"></div> <div class="value" :style="{width: (props.process * 200) + 'px'}"></div>
</div> </div>
</div> </div>
</div> </div>
@ -21,9 +21,9 @@
import { ref, defineProps } from 'vue'; import { ref, defineProps } from 'vue';
const props = defineProps({ const props = defineProps({
icon: { iconType: {
type: String, type: Number,
default: '' default: 1
}, },
color: { color: {
type: String, type: String,
@ -43,11 +43,19 @@ const props = defineProps({
}, },
process: { process: {
type: Number, type: Number,
default: 0.8 default: 0
} }
}); });
const color = ref(props.color) const color = ref(props.color)
const bgColor = ref(props.bgColor) const bgColor = ref(props.bgColor)
const iconSrc = ref('assets/imgs/icon/shbz1.png');
if(props.iconType === 2) {
iconSrc.value = 'assets/imgs/icon/shbz2.png';
} else if(props.iconType === 3) {
iconSrc.value = 'assets/imgs/icon/shbz3.png';
} else if(props.iconType === 4) {
iconSrc.value = 'assets/imgs/icon/shbz4.png';
}
</script> </script>
@ -55,10 +63,11 @@ const bgColor = ref(props.bgColor)
.container .container
display flex display flex
.left .left
margin-top 5px
margin-right 10px margin-right 10px
img img
width 50px width 30px
height 50px height 30px
.right .right
display flex display flex
flex-direction column flex-direction column
@ -66,19 +75,19 @@ const bgColor = ref(props.bgColor)
display flex display flex
justify-content space-between justify-content space-between
align-items center align-items center
height 22px height 18px
margin 5px 0 margin 5px 0
.title .title
font-size 16px font-size 14px
.sub-title .sub-title
font-size 12px font-size 12px
color v-bind(color) color v-bind(color)
.bottom .bottom
width 300px width 200px
.process .process
background-color v-bind(bgColor) background-color v-bind(bgColor)
width 100% width 100%
height 10px height 6px
position relative position relative
.value .value
background linear-gradient(90deg, v-bind(color), #FFF) background linear-gradient(90deg, v-bind(color), #FFF)
@ -87,7 +96,7 @@ const bgColor = ref(props.bgColor)
top 0 top 0
left 0 left 0
width 120px width 120px
height: 10px height 6px
border-radius 0 5px 5px 0 border-radius 0 5px 5px 0
</style> </style>

View File

@ -0,0 +1,50 @@
<template>
<div class="module">
<ModuleCard3 class="module-card3" title="宗教信仰统计">
<div class="module-container">
<div class="left">
<CircleWave class="circle-container"/>
<CircleWave class="circle-container"/>
<CircleWave class="circle-container"/>
<CircleWave class="circle-container"/>
</div>
<div class="right">
<Process class="process"/>
<Process class="process"/>
<Process class="process"/>
<Process class="process"/>
</div>
</div>
</ModuleCard3>
</div>
</template>
<script setup>
import { reactive } from 'vue';
import ModuleCard3 from './card/ModuleCard3.vue';
import Process from '../components/process/Process.vue';
import CircleWave from '../components/circle/CircleWave.vue';
</script>
<style lang="stylus" scoped>
.module
.module-card3
.module-container
display flex
background-image url(assets/imgs/card/bg9.png)
.left
width 350px
height 200px
position relative
.circle-container
transform scale(0.4)
position absolute
top 10px
left 10px
.right
width 250px
height 200px
.process
margin-top 6px
</style>

View File

View File

@ -0,0 +1,24 @@
<template>
<div class="module">
<ModuleCard1 title="民族分布统计">
<BarSpike id="barSpike" w="400" h="300" :x-data="barChart.xData" :data="barChart.data" />
</ModuleCard1>
</div>
</template>
<script setup>
import { reactive } from 'vue';
import ModuleCard1 from './card/ModuleCard1.vue';
import BarSpike from '../components/echarts/BarSpike.vue';
const barChart = reactive({
xData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data: [120, 200, 150, 80, 70, 110, 130]
})
</script>
<style lang="stylus" scoped>
</style>

View File

@ -0,0 +1,37 @@
<template>
<div class="module">
<ModuleCard1 title="信访管理类人员">
<PolarHalf id="polarHalf" w="440" :data="polarHalfChart.data" :unit="polarHalfChart.unit" />
</ModuleCard1>
</div>
</template>
<script setup>
import { reactive } from 'vue';
import ModuleCard1 from './card/ModuleCard1.vue';
import PolarHalf from '../components/echarts/PolarHalf.vue';
const polarHalfChart = reactive({
unit: '人',
data: [{
name: '矛盾纠纷类',
value: 40
}, {
name: '涉邪人员',
value: 10
}, {
name: '吸毒人员',
value: 20
}, {
name: '社会治安',
value: 10
}, {
name: '重点上访',
value: 900
}]
})
</script>
<style lang="stylus" scoped>
</style>

View File

@ -0,0 +1,16 @@
<template>
<div class="module">
<ModuleCard1 title="宗教信仰统计">
</ModuleCard1>
</div>
</template>
<script setup>
import { reactive } from 'vue';
import ModuleCard1 from './card/ModuleCard1.vue';
</script>
<style lang="stylus" scoped>
</style>

View File

@ -0,0 +1,16 @@
<template>
<div class="module">
<ModuleCard2 title="年龄分布情况">
</ModuleCard2>
</div>
</template>
<script setup>
import { reactive } from 'vue';
import ModuleCard2 from './card/ModuleCard2.vue';
</script>
<style lang="stylus" scoped>
</style>

View File

@ -0,0 +1,16 @@
<template>
<div class="module">
<ModuleCard2 title="特殊信息类人员">
</ModuleCard2>
</div>
</template>
<script setup>
import { reactive } from 'vue';
import ModuleCard2 from './card/ModuleCard2.vue';
</script>
<style lang="stylus" scoped>
</style>

View File

@ -0,0 +1,16 @@
<template>
<div class="module">
<ModuleCard2 title="政治面貌统计">
</ModuleCard2>
</div>
</template>
<script setup>
import { reactive } from 'vue';
import ModuleCard2 from './card/ModuleCard2.vue';
</script>
<style lang="stylus" scoped>
</style>

View File

@ -0,0 +1,54 @@
<template>
<div class="module-card">
<div class="module-card-title">
<span>{{ props.title }}</span>
</div>
<div class="module-card-body">
<slot></slot>
</div>
</div>
</template>
<script setup>
import { ref, defineProps } from 'vue'
const props = defineProps({
w: {
type: Number,
default: 400
},
title: {
type: String,
default: '标题'
}
})
const width = ref(`${props.w}px`);
const height = ref(`${props.w / 4 * 3}px`);
const titleH = ref(`${props.w / 4}px`);
const bodyT = ref(`${props.w / 6}px`)
const bodyH = ref(`${props.w / 2}px`);
</script>
<style lang="stylus" scoped>
.module-card
width v-bind(width)
height v-bind(height)
color #FFFFFF
position relative
.module-card-title
height v-bind(titleH)
background-image url(assets/imgs/module/title-left-bg.png)
background-size auto 100%
background-repeat no-repeat
background-position left
span
display block
padding 25px 0 0 60px
font-weight bold
.module-card-body
position absolute
width 100%
left 0
top v-bind(bodyT)
height v-bind(bodyH)
</style>

View File

@ -0,0 +1,55 @@
<template>
<div class="module-card">
<div class="module-card-title">
<span>{{ props.title }}</span>
</div>
<div class="module-card-body">
<slot></slot>
</div>
</div>
</template>
<script setup>
import { ref, defineProps } from 'vue'
const props = defineProps({
w: {
type: Number,
default: 400
},
title: {
type: String,
default: '标题'
}
})
const width = ref(`${props.w}px`);
const height = ref(`${props.w / 4 * 3}px`);
const titleH = ref(`${props.w / 4}px`);
const bodyT = ref(`${props.w / 6}px`)
const bodyH = ref(`${props.w / 2}px`);
</script>
<style lang="stylus" scoped>
.module-card
width v-bind(width)
height v-bind(height)
color #FFFFFF
position relative
.module-card-title
height v-bind(titleH)
background-image url(assets/imgs/module/title-right-bg.png)
background-size auto 100%
background-repeat no-repeat
background-position right
text-align right
span
display block
padding 25px 60px 0 0
font-weight bold
.module-card-body
position absolute
width 100%
left 0
top v-bind(bodyT)
height v-bind(bodyH)
</style>

View File

@ -0,0 +1,55 @@
<template>
<div class="module-card">
<div class="module-card-title">
<span>{{ props.title }}</span>
</div>
<div class="module-card-body">
<slot></slot>
</div>
</div>
</template>
<script setup>
import { ref, defineProps } from 'vue'
const props = defineProps({
w: {
type: Number,
default: 600
},
title: {
type: String,
default: '标题'
}
})
const width = ref(`${props.w}px`);
const height = ref(`${props.w / 2}px`);
const titleH = ref(`${props.w / 6}px`);
const bodyT = ref(`${props.w / 8}px`)
const bodyH = ref(`${props.w / 3}px`);
</script>
<style lang="stylus" scoped>
.module-card
width v-bind(width)
height v-bind(height)
color #FFFFFF
position relative
.module-card-title
height v-bind(titleH)
background-image url(assets/imgs/module/title-center-bg.png)
background-size auto 100%
background-repeat no-repeat
background-position center
text-align center
span
display block
padding 25px 0 0 0
font-weight bold
.module-card-body
position absolute
width 100%
left 0
top v-bind(bodyT)
height v-bind(bodyH)
</style>

View File

@ -10,7 +10,8 @@
} }
html, body { html, body {
height: 100%; min-width: max-content;
height: max-content;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }