Commit b4f284cd authored by 郭铭瑶's avatar 郭铭瑶 🤘

添加非居撒点

parent 687bda87
import { ref } from 'vue'
import bus from '@/util/event-bus'
export default function usePointType() {
const curPointType = ref<number>(0)
bus.on('curPointType', (key: unknown | number) => {
if (typeof key === 'number') {
curPointType.value = key
}
})
const setCurPointType = (key: number | unknown = 0) => {
bus.emit('curPointType', key)
}
return { curPointType, setCurPointType }
}
......@@ -48,19 +48,21 @@ import c3 from '@/assets/images/c3.png'
import c4 from '@/assets/images/c4.png'
import c5 from '@/assets/images/c5.png'
import c6 from '@/assets/images/c6.png'
import NoresIcon from '@/assets/images/yellow-point.png'
import Brief, { BriefProp } from '@/components/brief.vue'
import { onMounted, ref } from 'vue'
import { ajax } from '@/ajax'
import bus from '@/util/event-bus'
import usePointType from '@/hooks/usePointType'
const totalCommunityCount = ref(0)
const summary = ref<BriefProp[]>([
{ icon: icon4, name: '商品房', value: 0, point: c1 },
{ icon: icon5, name: '公房', value: 0, point: c2 },
{ icon: icon1, name: '公租房', value: 0, point: c3 },
{ icon: icon6, name: '混合', value: 0, point: c4 },
{ icon: icon7, name: '军产', value: 0, point: c5 },
{ icon: icon8, name: '售后房', value: 0, point: c6 },
{ icon: icon4, name: '商品房', value: 0 },
{ icon: icon5, name: '公房', value: 0 },
{ icon: icon1, name: '公租房', value: 0 },
{ icon: icon6, name: '混合', value: 0 },
{ icon: icon7, name: '军产', value: 0 },
{ icon: icon8, name: '售后房', value: 0 },
])
onMounted(() => {
ajax
......@@ -73,7 +75,7 @@ onMounted(() => {
})
.then((res) => {
const data = res?.data?.content || []
bus.emit('communityList', { icon: c6, data })
bus.emit('communityList', data)
totalCommunityCount.value = data.length
// 1商品房 2动迁房 3共有产权保障房 4售后房 5直管公房 6混合 7系统公房 8集体土地集资房 9军产 10私产 11公租房
const list = {
......@@ -93,6 +95,7 @@ onMounted(() => {
value: list.type1?.length || 0,
data: list.type1,
point: c1,
key: 1,
},
{
icon: icon5,
......@@ -100,6 +103,7 @@ onMounted(() => {
value: list.type2?.length || 0,
data: list.type2,
point: c2,
key: 2,
},
{
icon: icon1,
......@@ -107,6 +111,7 @@ onMounted(() => {
value: list.type3?.length || 0,
data: list.type3,
point: c3,
key: 3,
},
{
icon: icon6,
......@@ -114,6 +119,7 @@ onMounted(() => {
value: list.type4?.length || 0,
data: list.type4,
point: c4,
key: 4,
},
{
icon: icon7,
......@@ -121,6 +127,7 @@ onMounted(() => {
value: list.type5?.length || 0,
data: list.type5,
point: c5,
key: 5,
},
{
icon: icon8,
......@@ -128,14 +135,18 @@ onMounted(() => {
value: list.type6?.length || 0,
data: list.type6,
point: c6,
key: 6,
},
]
})
})
const { curPointType, setCurPointType } = usePointType()
const onTouch = (i: number) => {
const { data, point } = summary.value[i]
const { data, point, key } = summary.value[i]
bus.emit('addPoints', { icon: point, data })
setCurPointType(key)
}
const nonResident = ref([])
......@@ -145,7 +156,8 @@ ajax
nonResident.value = res?.data?.content || []
})
const onSelect = () => {
bus.emit('addPoints', { icon: c1, data: nonResident.value })
bus.emit('addPoints', { icon: NoresIcon, size: 6, data: nonResident.value })
setCurPointType(7)
}
const list = ref([
......
......@@ -11,6 +11,7 @@
value: item.value,
unit: '%',
color: '#fff',
decimal: 2,
}"
:color="['rgb(36,59,86)', '#F4923E']"
/>
......@@ -19,12 +20,12 @@
<p>整改执行</p>
<div>
<div>
<p class="count"><m-count :value="63" /></p>
<p class="count"><m-count :value="info.alreadyCheckCount" /></p>
<p>已开</p>
</div>
|
<div>
<p class="count"><m-count :value="76" />%</p>
<p class="count"><m-count :value="info.rectifyRatio" />%</p>
<p>完成率</p>
</div>
</div>
......@@ -62,22 +63,49 @@
</template>
<script lang="ts">
export default {
const _config = {
name: 'A016',
title: '物业监管',
row: 2,
apis: {
main: '/service-documents-ddd/public/checkOrder/operatingIndex',
},
}
export default _config
</script>
<script lang="ts" setup>
import avatar1 from '@/assets/images/avatar1.png'
import Summary from '@/components/summary.vue'
import { ref } from 'vue'
import { onMounted, ref } from 'vue'
import { ajax } from '@/ajax'
const summary = [
{ name: '房办月查', value: 79 },
{ name: '物企双周查', value: 83 },
{ name: '物业日查', value: 100 },
]
onMounted(() => {
ajax.get({ url: _config.apis.main }).then((res) => {
const {
alreadyCheckCount = 0, //已开
ycRatio = 0, //月查
rectifyRatio = 0, //执行率
shouldCheckCount = 0, //应开
szRatio = 0, //双周查
zcRatio = 0, //自查
} = res?.data?.content || {}
summary.value = [
{ name: '房办月查', value: ycRatio },
{ name: '物企双周查', value: szRatio },
{ name: '物业日查', value: zcRatio },
]
info.value = { alreadyCheckCount, rectifyRatio }
})
})
const info = ref({
alreadyCheckCount: 0,
rectifyRatio: 0,
})
const summary = ref([
{ name: '房办月查', value: 0 },
{ name: '物企双周查', value: 0 },
{ name: '物业日查', value: 0 },
])
const list = ref([
{ name: '续筹预警', value: 47520 },
{ name: '涉及门牌', value: 3960 },
......
......@@ -141,7 +141,6 @@ const list = ref([
])
const onClick = (state) => {
console.log('---', state)
const icon = state === '2' ? ele1 : ele2
ajax
.get({
......
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