Commit 7f6ca88b authored by 郭铭瑶's avatar 郭铭瑶 🤘

主屏以外板块对接现有接口,暂存

parent 6b66404d
...@@ -21,12 +21,14 @@ ...@@ -21,12 +21,14 @@
<p>整改执行</p> <p>整改执行</p>
<div> <div>
<div> <div>
<p class="count"><m-count :value="63" /></p> <p class="count"><m-count :value="info.alreadyCheckCount" /></p>
<p>已开</p> <p>已开</p>
</div> </div>
| |
<div> <div>
<p class="count"><m-count :value="76" />%</p> <p class="count">
<m-count :value="info.rectifyRatio" :decimal="2" />%
</p>
<p>完成率</p> <p>完成率</p>
</div> </div>
</div> </div>
...@@ -41,10 +43,13 @@ const _config = { ...@@ -41,10 +43,13 @@ const _config = {
title: '物业', title: '物业',
row: 1, row: 1,
baseUrl: window._base_url, baseUrl: window._base_url,
apis: [ apis: {
{ key: 'summary', value: '/api1' }, community: '/service-customkey-ddd/public/communities/v2?pageSize=9000',
{ key: 'list', value: '/api2' }, api1: '/service-basicdatasync-ddd/public/indCous',
], api2: '/service-basicdatasync-ddd/public/residentsCommitteesV2',
api3: '/service-basicdatasync-ddd/public/propCompanies',
checks: '/service-documents-ddd/public/checkOrder/operatingIndex',
},
} }
export default _config export default _config
</script> </script>
...@@ -54,7 +59,8 @@ import icon2 from '@/assets/images/icon2.png' ...@@ -54,7 +59,8 @@ import icon2 from '@/assets/images/icon2.png'
import icon3 from '@/assets/images/icon3.png' import icon3 from '@/assets/images/icon3.png'
import Brief from '@/components/brief.vue' import Brief from '@/components/brief.vue'
import bus from '@/util/event-bus' import bus from '@/util/event-bus'
import { PropType } from '@vue/runtime-core' import { ref, PropType } from 'vue'
import { ajax } from '@/ajax'
const props = defineProps({ const props = defineProps({
title: { title: {
...@@ -63,27 +69,59 @@ const props = defineProps({ ...@@ -63,27 +69,59 @@ const props = defineProps({
}, },
}) })
const summary = [ ajax
{ icon: icon1, name: '小区', value: 904 }, .post({
{ icon: icon2, name: '业委会', value: 400 }, url: _config.apis.community,
{ icon: icon3, name: '物业服务企业', value: 130 }, params: {
] conditions: [{ conditionsGroup: [] }],
const list = [ subject: 'tbl_community',
},
})
.then((res) => {
const communityAmount = (res?.data?.content || [])?.length || 0
Promise.all([
ajax.get({ url: _config.apis.api1, params: { sectType_in: '1' } }),
ajax.get({
url: _config.apis.api3,
params: { sectType_in: '1', managedNum_desc: '1' },
}),
]).then(([data1, data2]) => {
summary.value = [
{ icon: icon1, name: '小区', value: communityAmount },
{ icon: icon2, name: '业委会', value: data1?.data?.totalRows || 0 },
{ icon: icon3, name: '物业企业', value: data2?.data?.totalRows || 0 },
]
})
})
ajax.get({ url: _config.apis.checks }).then((res) => {
const {
alreadyCheckCount = 0, //已开
ycRatio = 0, //月查
rectifyRatio = 0, //执行率
shouldCheckCount = 0, //应开
szRatio = 0, //双周查
zcRatio = 0, //自查
} = res?.data?.content || {}
list.value = [
{ name: '房办月查', value: ycRatio },
{ name: '物企双周查', value: szRatio },
{ name: '物业日查', value: zcRatio },
]
info.value = { alreadyCheckCount, rectifyRatio }
})
const summary = ref([
{ icon: icon1, name: '小区', value: 0 },
{ icon: icon2, name: '业委会', value: 0 },
{ icon: icon3, name: '物业服务企业', value: 0 },
])
const list = ref([
{ name: '房办月查', value: 79 }, { name: '房办月查', value: 79 },
{ name: '物企双周查', value: 83 }, { name: '物企双周查', value: 83 },
{ name: '物业日查', value: 100 }, { name: '物业日查', value: 100 },
] ])
const info = ref({ alreadyCheckCount: 0, rectifyRatio: 0 })
/**
* 'addPoints'
* 'removePoints'
* 'focus'
*
*/
const test = () => {
bus.emit('map', 'A001')
}
bus.on('config-A001', (config) => {})
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
......
<template> <template>
<m-card title="物业体征"> <m-card title="物业体征">
<m-sub :addition="{ value: 1674, unit: '个小区' }"> 住宅房屋 </m-sub> <m-sub :addition="{ value: totalCommunityCount, unit: '个小区' }">
<Brief :list="summary" /> 住宅房屋
<m-sub :addition="{ value: 1264, unit: '个' }"> 物业企业 </m-sub> </m-sub>
<m-sub :addition="{ value: 1015, unit: '个' }"> 业委会 </m-sub> <Brief :list="summary" click-able @touch="onTouch" />
<m-sub :addition="{ value: 1684, unit: '万元' }"> 维修资金 </m-sub> <m-sub :addition="{ value: company, unit: '个' }"> 物业企业 </m-sub>
<m-sub :addition="{ value: committee, unit: '个' }"> 业委会 </m-sub>
<m-sub :addition="{ value: capital, unit: '万元', decimal: 2 }">
维修资金
</m-sub>
<Summary title="续筹分布" :list="list" :avatar="avatar1" /> <Summary title="续筹分布" :list="list" :avatar="avatar1" />
</m-card> </m-card>
</template> </template>
<script lang="ts"> <script lang="ts">
export default { const _config = {
name: 'A002', name: 'A002',
title: '物业体征', title: '物业体征',
row: 2, row: 2,
apis: {
community: '/service-customkey-ddd/public/communities/v2?pageSize=9000',
nonResident: '/service-basicdatasync-ddd/public/nonResi/buildings',
api1: '/service-basicdatasync-ddd/public/indCous',
api2: '/service-basicdatasync-ddd/public/residentsCommitteesV2',
api3: '/service-basicdatasync-ddd/public/propCompanies',
capital: '/service-documents-ddd/public/maintenance/count/amt',
amount: '/service-documents-ddd/public/houseContinuedWarnings',
},
} }
export default _config
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>
import icon4 from '@/assets/images/icon4.png' import icon4 from '@/assets/images/icon4.png'
...@@ -23,28 +37,148 @@ import icon1 from '@/assets/images/icon1.png' ...@@ -23,28 +37,148 @@ import icon1 from '@/assets/images/icon1.png'
import icon6 from '@/assets/images/icon6.png' import icon6 from '@/assets/images/icon6.png'
import icon7 from '@/assets/images/icon7.png' import icon7 from '@/assets/images/icon7.png'
import icon8 from '@/assets/images/icon8.png' import icon8 from '@/assets/images/icon8.png'
import icon9 from '@/assets/images/icon9.png'
import c1 from '@/assets/images/c1.png'
import c2 from '@/assets/images/c2.png'
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 avatar1 from '@/assets/images/avatar1.png' import avatar1 from '@/assets/images/avatar1.png'
import Brief from '@/components/brief.vue' import Brief, { BriefProp } from '@/components/brief.vue'
import Summary from '@/components/summary.vue' import Summary from '@/components/summary.vue'
import eventBus from '@/util/event-bus' import bus from '@/util/event-bus'
import { ref } from 'vue' import { onMounted, ref } from 'vue'
import { ajax } from '@/ajax'
const summary = [
{ icon: icon4, name: '商品房', value: 904 }, const totalCommunityCount = ref(0)
{ icon: icon5, name: '公房', value: 400 }, const summary = ref<BriefProp[]>([
{ icon: icon1, name: '私房/农房', value: 130 }, { icon: icon4, name: '商品房', value: 0 },
{ icon: icon6, name: '商住混合', value: 82 }, { icon: icon5, name: '公房', value: 0 },
{ icon: icon7, name: '军产', value: 12 }, { icon: icon1, name: '公租房', value: 0 },
{ icon: icon8, name: '保障房', value: 46 }, { icon: icon6, name: '混合', value: 0 },
] { icon: icon7, name: '军产', value: 0 },
const list = ref([ { icon: icon8, name: '售后房', value: 0 },
{ name: '分户', value: 47520 },
{ name: '门牌', value: 3960 },
{ name: '小区', value: 45 },
]) ])
eventBus.on('update:A002', (data: any) => {
list.value = data onMounted(() => {
ajax
.post({
url: _config.apis.community,
params: {
conditions: [{ conditionsGroup: [] }],
subject: 'tbl_community',
},
})
.then((res) => {
const data = res?.data?.content || []
bus.emit('communityList', data)
totalCommunityCount.value = data.length
// 1商品房 2动迁房 3共有产权保障房 4售后房 5直管公房 6混合 7系统公房 8集体土地集资房 9军产 10私产 11公租房
const list = {
type1: data.filter((item) => item?.stKind == '01'),
type2: data.filter(
(item) => item?.stKind == '07' || item?.stKind == '05',
),
type3: data.filter((item) => item?.stKind == '11'),
type4: data.filter((item) => item?.stKind == '06'),
type5: data.filter((item) => item?.stKind == '09'),
type6: data.filter((item) => item?.stKind == '04'),
}
summary.value = [
{
icon: icon4,
name: '商品房',
value: list.type1?.length || 0,
data: list.type1,
point: c1,
key: 1,
},
{
icon: icon5,
name: '公房',
value: list.type2?.length || 0,
data: list.type2,
point: c2,
key: 2,
},
{
icon: icon1,
name: '公租房',
value: list.type3?.length || 0,
data: list.type3,
point: c3,
key: 3,
},
{
icon: icon6,
name: '混合',
value: list.type4?.length || 0,
data: list.type4,
point: c4,
key: 4,
},
{
icon: icon7,
name: '军产',
value: list.type5?.length || 0,
data: list.type5,
point: c5,
key: 5,
},
{
icon: icon8,
name: '售后房',
value: list.type6?.length || 0,
data: list.type6,
point: c6,
key: 6,
},
]
})
})
const company = ref(0)
const committee = ref(0)
Promise.all([
ajax.get({ url: _config.apis.api1, params: { sectType_in: '1' } }),
ajax.get({
url: _config.apis.api3,
params: { sectType_in: '1', managedNum_desc: '1' },
}),
]).then(([data1, data2]) => {
committee.value = data1?.data?.totalRows || 0
company.value = data2?.data?.totalRows || 0
})
const capital = ref(0)
ajax.get({ url: _config.apis.capital }).then((res) => {
const { tranAmt = 0 } = res?.data?.content || {}
capital.value = tranAmt / 10000
}) })
ajax.get({ url: _config.apis.amount }).then((res) => {
const {
yjmpzSum = 0, //门牌幢
yjxqSum = 0, //小区
yjfhSum = 0, //分户
} = res?.data?.content || {}
list.value = [
{ name: '分户', value: yjfhSum },
{ name: '门牌', value: yjmpzSum },
{ name: '小区', value: yjxqSum },
]
})
const list = ref([
{ name: '分户', value: 0 },
{ name: '门牌', value: 0 },
{ name: '小区', value: 0 },
])
const onTouch = (i: number) => {
const { data, point, key } = summary.value[i]
bus.emit('addPoints', { icon: point, data })
}
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<m-card title="党建引领"> <m-card title="党建引领">
<div class="sum"> <div class="sum">
<div v-for="item in summary" :key="item.name" class="rate"> <div v-for="item in summary" :key="item.name" class="rate">
<Circle :value="item.value"> <Circle :value="item.ratio">
<div class="content"> <div class="content">
<m-count :value="item.value" /> <m-count :value="item.value" />
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
...@@ -26,22 +26,60 @@ ...@@ -26,22 +26,60 @@
</template> </template>
<script lang="ts"> <script lang="ts">
export default { const _config = {
name: 'A003', name: 'A003',
title: '党建引领', title: '党建引领',
row: 1, row: 1,
apis: {
api1: '/service-basicdatasync-ddd/public/indCous',
api2: '/service-basicdatasync-ddd/public/residentsCommitteesV2',
api3: '/service-basicdatasync-ddd/public/propCompanies',
},
} }
export default _config
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue' import { computed, ref } from 'vue'
import Circle from '@/components/circle.vue' import Circle from '@/components/circle.vue'
import { ajax } from '@/ajax'
const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100)) const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100))
const summary = [ const summary = ref([
{ name: '居委会', value: 10 }, { name: '业委会', value: 0, ratio: 0 },
{ name: '业委会', value: 10 }, { name: '居委会', value: 0, ratio: 0 },
{ name: '物业企业', value: 20 }, { name: '物业企业', value: 0, ratio: 0 },
] ])
Promise.all([
ajax.get({ url: _config.apis.api1, params: { sectType_in: '1' } }),
ajax.get({ url: _config.apis.api2, params: { sectType_in: '1' } }),
ajax.get({
url: _config.apis.api3,
params: { sectType_in: '1', managedNum_desc: '1' },
}),
]).then(([data1, data2, data3]) => {
const total = [data1, data2, data3].reduce(
(acc, cur) => acc + (cur?.data?.totalRows || 0),
0,
)
summary.value = [
{
name: '业委会',
value: data1?.data?.totalRows || 0,
ratio: ((data1?.data?.totalRows || 0) / (total || 1)) * 100,
},
{
name: '居委会',
value: data2?.data?.totalRows || 0,
ratio: ((data2?.data?.totalRows || 0) / (total || 1)) * 100,
},
{
name: '物业企业',
value: data3?.data?.totalRows || 0,
ratio: ((data3?.data?.totalRows || 0) / (total || 1)) * 100,
},
]
})
const barData = { const barData = {
dimensions: [ dimensions: [
{ name: 'street', displayName: '街道' }, { name: 'street', displayName: '街道' },
...@@ -107,6 +145,8 @@ const barOption = { ...@@ -107,6 +145,8 @@ const barOption = {
.content .content
text-align center text-align center
white-space nowrap white-space nowrap
p
font-size .08rem
.sum .sum
display flex display flex
>div >div
......
...@@ -31,18 +31,33 @@ ...@@ -31,18 +31,33 @@
</div> </div>
</div> </div>
</div> </div>
<m-sub :addition="{ value: 1684, unit: '万元' }">维修资金总额</m-sub> <m-sub :addition="{ value: capital, unit: '万元', decimal: 2 }">
维修资金总额
</m-sub>
</m-card> </m-card>
</template> </template>
<script lang="ts"> <script lang="ts">
export default { const _config = {
name: 'A004', name: 'A004',
title: '公共收益', title: '公共收益',
row: 1, row: 1,
apis: {
capital: '/service-documents-ddd/public/maintenance/count/amt',
},
} }
export default _config
</script>
<script lang="ts" setup>
import { ajax } from '@/ajax'
import { ref } from 'vue'
const capital = ref(0)
ajax.get({ url: _config.apis.capital }).then((res) => {
const { tranAmt = 0 } = res?.data?.content || {}
capital.value = tranAmt / 10000
})
</script> </script>
<script lang="ts" setup></script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../components/MyComponent/main.styl' @import '../../components/MyComponent/main.styl'
......
...@@ -5,35 +5,39 @@ ...@@ -5,35 +5,39 @@
<div> <div>
<div> <div>
<span> <span>
<m-count class="count orange-count" :value="31" />/<m-count <m-count
:value="50" class="count orange-count"
:value="info.alreadyCheckCount"
/> />
</span> </span>
<p>督查</p> <p>已开</p>
</div> </div>
<div> <div>
<span> <m-count class="count orange-count" :value="31" />% </span> <span>
<m-count class="count orange-count" :value="info.rectifyRatio" />%
</span>
<p>整改率</p> <p>整改率</p>
</div> </div>
</div> </div>
<div> <div>
<div> <div v-for="item in summary" :key="item.name">
<span> <m-count class="count" :value="90" />% </span> <span> <m-count class="count" :value="item.value" />% </span>
<p>日查</p> <p>{{ item.name }}</p>
</div>
<div>
<span> <m-count class="count" :value="82" />% </span>
<p>双周查</p>
</div>
<div>
<span> <m-count class="count" :value="76" />% </span>
<p>月查</p>
</div> </div>
</div> </div>
</div> </div>
<div class="month"> <div class="month">
<p>房办月查完成情况</p> <p>房办月查完成情况</p>
<div> <div v-if="monthList.length > 0">
<span
v-for="item in monthList"
:key="item.name"
:style="`background:${item.color}`"
>
{{ item.name }}
</span>
</div>
<div v-else>
<span v-for="(_, i) in new Array(12)" :key="i"> <span v-for="(_, i) in new Array(12)" :key="i">
{{ i + 1 }} {{ i + 1 }}
</span> </span>
...@@ -66,13 +70,75 @@ ...@@ -66,13 +70,75 @@
</template> </template>
<script lang="ts"> <script lang="ts">
export default { const _config = {
name: 'A006', name: 'A006',
title: '行业监管', title: '行业监管',
row: 1, row: 1,
apis: {
main: '/service-documents-ddd/public/checkOrder/operatingIndex',
month: '/service-documents-ddd/public/checkOrder/dahboard/countDatas',
},
} }
export default _config
</script>
<script lang="ts" setup>
import { ajax } from '@/ajax'
import { ref } from 'vue'
const monthList = ref<any[]>([])
ajax
.get({
url: _config.apis.month,
})
.then((res) => {
const data = res?.data?.content?.HOUSING_OFFICE?.data || []
const result = data.map((ele, i) => {
let color = 'rgba(0,0,0,.3)'
if (ele.rato == 1) {
// 完成率100 绿色
color = '#6EB629'
} else if (ele.rato < 0.9) {
// 完成率90以下 红色
color = '#CC4D4D'
} else if (ele.rato > 0.9) {
// 完成率90到100之间 黄色
color = '#FFD400'
}
return { name: i + 1, color }
})
while (result.length < 12) {
result.push({ name: result.length + 1, color: 'rgba(0, 0, 0, 0.3)' })
}
monthList.value = result
})
const info = ref({
alreadyCheckCount: 0,
shouldCheckCount: 0,
rectifyRatio: 0,
})
const summary = ref([
{ name: '日查', value: 0 },
{ name: '双周查', value: 0 },
{ name: '月查', value: 0 },
])
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: zcRatio },
{ name: '双周查', value: szRatio },
{ name: '月查', value: ycRatio },
]
info.value = { alreadyCheckCount, shouldCheckCount, rectifyRatio }
})
</script> </script>
<script lang="ts" setup></script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../components/MyComponent/main.styl' @import '../../components/MyComponent/main.styl'
...@@ -82,9 +148,12 @@ export default { ...@@ -82,9 +148,12 @@ export default {
.rate .rate
width 45% width 45%
>div >div
&:first-child
display flex
justify-content space-between
>div >div
display inline-block display inline-block
width 33.3% width 33%
.count .count
font-size .14rem font-size .14rem
color #fff color #fff
...@@ -109,7 +178,8 @@ export default { ...@@ -109,7 +178,8 @@ export default {
span span
$center() $center()
border-radius .02rem border-radius .02rem
background $green // background $green
background rgba(0, 0, 0, 0.3)
.content .content
$box() $box()
padding .04rem .1rem padding .04rem .1rem
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<m-card title="物业报修"> <m-card title="物业报修">
<div class="sum"> <div class="sum">
<div> <div>
全区物业修数 全区物业修数
<span><m-count class="orange-count" :value="100" /></span> <span><m-count class="orange-count" :value="100" /></span>
</div> </div>
......
...@@ -7,26 +7,61 @@ ...@@ -7,26 +7,61 @@
</template> </template>
<script lang="ts"> <script lang="ts">
export default { const _config = {
name: 'A012', name: 'A012',
title: '加装电梯', title: '加装电梯',
row: 1, row: 1,
apis: {
list: '/service-special-ja-ddd/public/elevatorInstallationInfos',
},
} }
export default _config
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>
const data = { import { ajax } from '@/ajax'
import { ref } from 'vue'
const data = ref({
dimensions: [ dimensions: [
{ name: 'year', displayName: '年' }, { name: 'year', displayName: '年' },
{ name: 'value', displayName: '竣工项目' }, { name: 'value', displayName: '竣工项目' },
], ],
source: [ source: [
{ year: '2016', value: 2 }, { year: '2017', value: 0 },
{ year: '2017', value: 4 }, { year: '2018', value: 0 },
{ year: '2018', value: 7 }, { year: '2019', value: 0 },
{ year: '2019', value: 10 }, { year: '2020', value: 0 },
{ year: '2020', value: 18 }, { year: '2021', value: 0 },
], ],
} })
ajax
.get({
url: _config.apis.list,
params: {
state: '7',
createTime_desc: 'desc',
pageSize: 9000,
},
})
.then((res) => {
const result: any = {}
const { content = [] } = res?.data || {}
content.forEach((item) => {
const year = item?.finishInstallationTime?.split('-')?.[0]
if (!result[year]) {
result[year] = 1
} else {
result[year] += 1
}
})
data.value.source =
Object.keys(result)
.map((key) => ({
year: key,
value: result[key],
}))
?.filter((item) => item.value > 1) || []
})
const option = { const option = {
color: [['#8CD5FF', '#1990BE']], color: [['#8CD5FF', '#1990BE']],
legend: { legend: {
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
:key="tab.key" :key="tab.key"
class="tab" class="tab"
:class="{ on: curTab === tab.key }" :class="{ on: curTab === tab.key }"
@click="curTab = tab.key" @click="selectTab(tab.key)"
> >
{{ tab.name }} {{ tab.name }}
</p> </p>
</n-space> </n-space>
<n-space> <n-space>
<n-select <!-- <n-select
v-model:value="year" v-model:value="year"
class="my-select" class="my-select"
size="small" size="small"
:options="yearOptions" :options="yearOptions"
/> /> -->
<n-select <n-select
v-model:value="area" v-model:value="area"
class="my-select" class="my-select"
...@@ -28,55 +28,110 @@ ...@@ -28,55 +28,110 @@
</n-space> </n-space>
</div> </div>
<div class="content"> <div class="content">
<div v-for="(item, i) in list" :key="i"> <template v-if="list.length > 0">
<span>{{ i + 1 }}</span> <div v-for="(item, i) in list" :key="i">
<span>{{ item.name }}</span> <span>{{ i + 1 }}</span>
<span>{{ item.address }}</span> <span :title="item.name">{{ item.name }}</span>
<span class="status">{{ item.status }}</span> <span :title="item.address">{{ item.address }}</span>
</div> <span class="status">{{ item.status }}</span>
</div>
</template>
<m-empty v-else />
</div> </div>
</m-card> </m-card>
</template> </template>
<script lang="ts"> <script lang="ts">
export default { const _config = {
name: 'A013', name: 'A013',
title: '加装电梯', title: '加装电梯',
row: 2, row: 2,
apis: {
streets: '/service-special-ja-ddd/public/getStreetData',
list: '/service-special-ja-ddd/public/elevatorInstallationInfos',
},
} }
export default _config
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from 'vue'
import { NSpace, NSelect } from 'naive-ui' import { NSpace, NSelect } from 'naive-ui'
import { ajax } from '@/ajax'
const tabs = [ const tabs = [
{ name: '开工项目', key: 'start' }, { name: '开工项目', key: '6' },
{ name: '竣工项目', key: 'done' }, { name: '竣工项目', key: '7' },
]
const curTab = ref('start')
const yearOptions = [
{ label: '2021', value: '2021' },
{ label: '2020', value: '2020' },
{ label: '2019', value: '2019' },
]
const areaOptions = [
{ label: '全区', value: '全区' },
{ label: '1区', value: '1区' },
{ label: '2区', value: '2区' },
]
const year = ref('2021')
const area = ref('全区')
const list = [
{ name: '长安小区', address: '长安路288号', status: '不可加装' },
{ name: '闻喜路1110弄小区', address: '曲沃路', status: '不可加装' },
{ name: '象山小区', address: '临山路186号', status: '可加装' },
{ name: '499弄小区', address: '宝山路519号', status: '不可加装' },
{ name: '长安小区', address: '长安路288号', status: '不可加装' },
{ name: '闻喜路1110弄小区', address: '曲沃路', status: '不可加装' },
{ name: '象山小区', address: '临山路186号', status: '可加装' },
{ name: '499弄小区', address: '宝山路519号', status: '不可加装' },
{ name: '长安小区', address: '长安路288号', status: '不可加装' },
{ name: '闻喜路1110弄小区', address: '曲沃路', status: '不可加装' },
] ]
const curTab = ref('6')
function selectTab(key) {
curTab.value = key
fetchList()
}
// const yearOptions = [
// { label: '2021', value: '2021' },
// { label: '2020', value: '2020' },
// { label: '2019', value: '2019' },
// ]
const areaOptions = ref([{ label: '全区', value: 'all' }])
// const year = ref('2021')
const area = ref('all')
ajax
.get({
url: _config.apis.streets,
params: {
pageSize: 9000,
hpbName: '静安区',
},
})
.then((res) => {
const { content = [] } = res?.data || {}
areaOptions.value = [
{ label: '全区', value: 'all' },
...content.map((item) => ({
label: item.streetName,
value: item.streetName,
})),
]
})
const list = ref<any[]>([])
function fetchList() {
const params: any = {
state: curTab.value,
createTime_desc: 'desc',
pageSize: 9000,
}
if (area.value !== 'all') {
params.streetName = area.value
}
ajax
.get({
url: _config.apis.list,
params,
})
.then((res) => {
// 0-可加装 1-较难加装 2-不可加装
const switchType = (type) => {
switch (type) {
case '0':
return '可加装'
case '1':
return '较难加装'
case '2':
return '不可加装'
default:
return ''
}
}
list.value = (res?.data?.content || []).map((item) => ({
name: item.stNameFrst,
address: item.unitAddr,
status: switchType(item.evaluateType),
}))
})
}
fetchList()
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
...@@ -101,6 +156,8 @@ const list = [ ...@@ -101,6 +156,8 @@ const list = [
margin-top .1rem margin-top .1rem
flex 1 flex 1
overflow-y auto overflow-y auto
max-height 60vh
margin-bottom .05rem
>div >div
$box() $box()
display flex display flex
...@@ -115,6 +172,9 @@ const list = [ ...@@ -115,6 +172,9 @@ const list = [
&:nth-of-type(2) &:nth-of-type(2)
&:nth-of-type(3) &:nth-of-type(3)
flex 1 flex 1
overflow hidden
white-space nowrap
text-overflow ellipsis
&.status &.status
color $yellow color $yellow
</style> </style>
......
...@@ -24,7 +24,6 @@ const _config = { ...@@ -24,7 +24,6 @@ const _config = {
row: 1, row: 1,
baseUrl: window._base_url, baseUrl: window._base_url,
apis: { apis: {
// community: '/service-basicdatasync-ddd/public/communities',
community: '/service-customkey-ddd/public/communities/v2?pageSize=9000', community: '/service-customkey-ddd/public/communities/v2?pageSize=9000',
nonResident: '/service-basicdatasync-ddd/public/nonResi/buildings', nonResident: '/service-basicdatasync-ddd/public/nonResi/buildings',
api1: '/service-basicdatasync-ddd/public/indCous', api1: '/service-basicdatasync-ddd/public/indCous',
......
...@@ -27,9 +27,11 @@ ...@@ -27,9 +27,11 @@
{{ item.value }} {{ item.value }}
</span> </span>
<span :style="{ color: item.color }"> <m-count
{{ item.rate }} :value="item.rate"
</span> :decimal="2"
:style="{ color: item.color }"
/>
% %
</p> </p>
<p class="name">{{ item.name }}</p> <p class="name">{{ item.name }}</p>
......
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