Commit 10f2b16b authored by 郭铭瑶's avatar 郭铭瑶 🤘

小区档案:监管和履职&热线信息

parent 2c4d3b2a
......@@ -10,9 +10,14 @@ switch (process.env.NODE_ENV) {
export default {
BASE_URL,
CONFIGS: '/service-bigscreen/public/bigscreenConfigs', // 配置
COMMUNITY: '/service-customkey-ddd/public/communities/v2', // 小区
GET_COMMUNITY: '/service-basicdatasync-ddd/public/community/{id}', // 根据id获取小区详情
POST_COMMUNITY: '/service-customkey-ddd/public/communities/v2', // 小区
BUILDINGS: '/service-basicdatasync-ddd/public/community/buildings', // 门牌幢
BUILDING: '/service-basicdatasync-ddd/public/building/{id}', // 根据id查楼栋信息
RISK_BUILDINGS: '/service-special-ja-ddd/public/getRiskByBuilding', // 安全排查结果
ORDERS: '/service-documents-ddd/public/dr/check/orders', // 月查
ORDER: '/service-documents-ddd/public/dr/check/order/{id}', // 根据id查月查详情
ORDER: '/service-documents-ddd/public/dr/check/order/{id}', // 根据id查检查单
CHECK_ORDERS: '/service-documents-ddd/public/checkOrder/pages', // 检查单列表
BX: '/service-documents-ddd/public/reportBX', // 物业报修
TS: '/service-documents-ddd/public/reportTS', // 物业投诉
}
......@@ -87,9 +87,47 @@
:formatter="formatter"
/>
</template>
<template v-else-if="showRiskDetail">
<n-space justify="end">
<n-button
type="primary"
ghost
size="small"
@click="showRiskDetail = false"
>返回</n-button
>
</n-space>
<SafetyInfo :info="riskDetail" />
</template>
<template v-else-if="showRiskBuilding">
<div class="search-bar">
<p>房屋安全排查结果</p>
<n-button
type="primary"
ghost
size="small"
@click="showRiskBuilding = false"
>返回</n-button
>
</div>
<n-data-table
size="small"
:columns="riskBuildingColumn"
:data="riskBuildingData"
:pagination="pagination"
/>
</template>
<template v-else>
<div class="search-bar">
<n-space align="center">
<n-button
v-if="showRiskBtn"
type="primary"
size="small"
@click="showRiskBuilding = true"
>
查看安全排查结果
</n-button>
门牌幢地址:<n-input
v-model:value="searchKey"
size="small"
......@@ -114,15 +152,15 @@
</template>
</template>
<template v-else-if="curMenu === 3">
<n-tabs type="line" size="small">
<n-tabs type="line" size="small" @update:value="showOrderInfo = false">
<n-tab-pane name="1" tab="房办月查">
<template v-if="showMonthCheckInfo">
<template v-if="showOrderInfo">
<n-space justify="end">
<n-button
type="primary"
ghost
size="small"
@click="showMonthCheckInfo = false"
@click="showOrderInfo = false"
>返回</n-button
>
</n-space>
......@@ -133,14 +171,14 @@
'check_user_name:检查人|check_result:检查情况>switchCheckState|order_status:整改情况>switchOrderState',
'csp_name:物业公司||',
]"
:data="monthCheckInfo"
:data="orderInfo"
:formatter="formatter"
/>
<m-sub>检查指标</m-sub>
<n-data-table
size="small"
:columns="monthCheckInfoColumn"
:data="monthCheckInfo?.norms || []"
:columns="orderInfoColumn"
:data="orderInfo?.norms || []"
/>
</template>
<template v-else>
......@@ -152,8 +190,142 @@
/>
</template>
</n-tab-pane>
<n-tab-pane name="2" tab="小区经理自查">Hey Jude</n-tab-pane>
<n-tab-pane name="3" tab="物企双周查">七里香</n-tab-pane>
<n-tab-pane name="2" tab="小区经理自查">
<template v-if="showOrderInfo">
<n-space justify="end">
<n-button
type="primary"
ghost
size="small"
@click="showOrderInfo = false"
>返回</n-button
>
</n-space>
<m-sub>基础信息</m-sub>
<m-form
:template="[
'community_name:小区名称|street_name:街道名称|check_time:检查时间',
'check_user_name:检查人|check_result:检查情况>switchCheckState|order_status:整改情况>switchOrderState',
'csp_name:物业公司||',
]"
:data="orderInfo"
:formatter="formatter"
/>
<m-sub>检查指标</m-sub>
<n-data-table
size="small"
:columns="orderInfoColumn"
:data="orderInfo?.norms || []"
/>
</template>
<template v-else>
<m-sub>基础信息</m-sub>
<m-form
:template="[
'stNameFrst:小区名称|addrFrst:小区地址',
'csName:管理处名称|csAddress:管理处地址',
'csDayTel:日间报修电话|nightTel:夜间报修电话',
'csTel:管理处电话|cspName:物业企业名称',
'csmName:物业经理|csmTel:物业经理联系电话',
]"
:data="selfCheckBasic"
/>
<m-sub>检查单</m-sub>
<n-data-table
size="small"
:columns="selfCheckColumn"
:data="selfCheckData"
:pagination="pagination"
/>
</template>
</n-tab-pane>
<n-tab-pane name="3" tab="物企双周查">
<template v-if="showOrderInfo">
<n-space justify="end">
<n-button
type="primary"
ghost
size="small"
@click="showOrderInfo = false"
>返回</n-button
>
</n-space>
<m-sub>基础信息</m-sub>
<m-form
:template="[
'community_name:小区名称|street_name:街道名称|check_time:检查时间',
'check_user_name:检查人|check_result:检查情况>switchCheckState|order_status:整改情况>switchOrderState',
'csp_name:物业公司||',
]"
:data="orderInfo"
:formatter="formatter"
/>
<m-sub>检查指标</m-sub>
<n-data-table
size="small"
:columns="orderInfoColumn"
:data="orderInfo?.norms || []"
/>
</template>
<template v-else>
<n-data-table
size="small"
:columns="doubleCheckColumn"
:data="doubleCheckData"
:pagination="pagination"
/>
</template>
</n-tab-pane>
</n-tabs>
</template>
<template v-else-if="curMenu === 4">
<n-tabs type="line" size="small" @update:value="showBxInfo = false">
<n-tab-pane name="1" tab="物业报修">
<template v-if="showBxInfo">
<n-space justify="end">
<n-button
type="primary"
ghost
size="small"
@click="showBxInfo = false"
>返回</n-button
>
</n-space>
<m-sub>基础信息</m-sub>
<m-form
:template="[
'communityName:小区名称|address:地址',
'district:行政区|street:街道',
'troubleType:报修类型|troublePhenomenon:报修项目',
'billNumber:工单号|reportContent:反映问题',
'feedBackDate:反馈时间|acceptTime:受理时间',
'backTime:回访时间|status:维修状态',
'feedbackStatus:浦房反馈状态|feedbackPhone:反馈人电话',
'feedbackTime:浦房反馈时间|updateTime:最后修改时间',
'bxmaintainType:是否是险单>yesOrNo|signStatus:接收方>switchReceiver',
'signForTime:签收时间|',
]"
:data="bxInfo"
:formatter="formatter"
/>
</template>
<template v-else>
<n-data-table
size="small"
:columns="bxColumn"
:data="bxData"
:pagination="pagination"
/>
</template>
</n-tab-pane>
<n-tab-pane name="2" tab="物业投诉">
<n-data-table
size="small"
:columns="tsColumn"
:data="tsData"
:pagination="pagination"
/>
</n-tab-pane>
</n-tabs>
</template>
</div>
......@@ -170,9 +342,11 @@ import {
NDataTable,
NTabs,
NTabPane,
NDivider,
} from 'naive-ui'
import { ajax, api } from '@/ajax'
import { switchUnitKind, switchOrderState } from '@/utils'
import SafetyInfo from './safety-info.vue'
const props = defineProps({
info: {
......@@ -186,7 +360,7 @@ const menus = [
{ label: '门牌幢', key: 2 },
{ label: '监管和履职', key: 3 },
{ label: '热线信息', key: 4 },
{ label: '维修资金', key: 5 },
{ label: '维修资金', key: 5, disabled: true },
]
const searchKey = ref<undefined | string>()
const showBuildingInfo = ref(false)
......@@ -250,7 +424,61 @@ const pagination = reactive({
pagination.page = page
},
})
const showRiskBuilding = ref(false)
const showRiskDetail = ref(false)
const riskDetail = ref<{ [key: string]: unknown }>({})
const riskBuildingColumn = [
{
title: '小区名称',
key: 'stNameFrst',
},
{
title: '项目地址',
key: 'sectAddr',
},
{
title: '自然幢地址',
key: 'wholeBuildingAddr',
},
{
title: '安全排查结果',
key: 'judgeType',
},
{
title: '风险类型描述',
key: 'riskTypeDesc',
},
{
title: '小梁薄板',
key: 'isThinPlate',
render({ isThinPlate }) {
return h('span', null, {
default: () => (isThinPlate === true ? '是' : '否'),
})
},
},
{
title: '操作',
key: 'actions',
render(row) {
return h(
NButton,
{
text: true,
textColor: '#1890ff',
size: 'small',
onClick: () => {
riskDetail.value = { ...row }
showRiskDetail.value = true
},
},
{ default: () => '查看' },
)
},
},
]
const showRiskBtn = ref(false)
const riskBuildingData = ref<any[]>([])
async function getBuildingList() {
buildingsData.value =
(
......@@ -263,6 +491,19 @@ async function getBuildingList() {
},
})
)?.data?.content || []
const unitIds = buildingsData.value.map((item) => item.unitId)
riskBuildingData.value =
(
await ajax.get({
url: api.RISK_BUILDINGS,
params: {
unitId_in: unitIds.join(','),
pageSize: 9000,
},
})
)?.data?.content || []
showRiskBtn.value = riskBuildingData.value?.length > 0
}
function reset() {
searchKey.value = ''
......@@ -271,20 +512,47 @@ function reset() {
}
const formatter = {
trueOrFalse: (val: unknown) => (val === true ? '有' : '无'),
yesOrNo: (val: unknown) => (val == 1 ? '是' : '否'),
switchUnitKind,
switchOrderState,
switchReceiver: (key: unknown) => {
let result = '应急中心已签收'
if (key == 0) {
result = '其他'
} else if (key == 1) {
result = '物业已签收'
}
return result
},
switchCheckState: (checkState: unknown) => {
let result = '暂无'
if (checkState == '0') {
result = '合格'
} else if (checkState == '1') {
result = '需整改'
result = '不合格'
}
return result
},
}
const showMonthCheckInfo = ref(false)
const monthCheckInfo = ref<{ [key: string]: unknown }>({})
const showOrderInfo = ref(false)
const orderInfo = ref<{ [key: string]: unknown }>({})
const orderInfoColumn = [
{
title: '指标名称',
key: 'normName',
},
{
title: '指标状态',
key: 'normState',
render({ normState }) {
return h('span', null, {
default: () => formatter.switchCheckState(normState),
})
},
},
]
const monthCheckColumn = [
{
title: '小区名称',
......@@ -325,13 +593,13 @@ const monthCheckColumn = [
textColor: '#1890ff',
size: 'small',
onClick: async () => {
monthCheckInfo.value =
orderInfo.value =
(
await ajax.get({
url: api.ORDER.replace('{id}', row.id),
})
)?.data?.content || {}
showMonthCheckInfo.value = true
showOrderInfo.value = true
},
},
{ default: () => '查看' },
......@@ -339,22 +607,231 @@ const monthCheckColumn = [
},
},
]
const monthCheckInfoColumn = [
const monthCheckData = ref<any[]>([])
const selfCheckBasic = ref<{ [key: string]: unknown }>({})
const selfCheckColumn = [
{
title: '检查时间',
key: 'checkTime',
},
{
title: '检查人',
key: 'checkPersonName',
},
{
title: '检查状态',
key: 'checkState',
render({ checkState }) {
return h('span', null, {
default: () => formatter.switchCheckState(checkState),
})
},
},
{
title: '整改情况',
key: 'checkStateDegree',
render({ checkStateDegree }) {
return h('span', null, {
default: () => {
// 0无需整改 1已整改 2整改中
switch (checkStateDegree) {
case '0':
return '无需整改'
case '1':
return '已整改'
case '2':
return '整改中'
default:
return '暂无'
}
},
})
},
},
{
title: '操作',
key: 'actions',
render(row) {
return h(
NButton,
{
text: true,
textColor: '#1890ff',
size: 'small',
onClick: async () => {
orderInfo.value =
(
await ajax.get({
url: api.ORDER.replace('{id}', row.id),
})
)?.data?.content || {}
showOrderInfo.value = true
},
},
{ default: () => '查看检查单' },
)
},
},
]
const selfCheckData = ref<any[]>([])
const doubleCheckColumn = [
{
title: '指标名称',
key: 'norName',
title: '小区名称',
key: 'communityName',
},
{
title: '指标状态',
key: 'normState',
render({ normState }) {
title: '小区地址',
key: 'communityAddress',
},
{
title: '检查人/检查日期',
key: 'check',
render({ checkPersonName, checkTime }) {
return h('span', null, {
default: () => formatter.switchCheckState(normState),
default: () => `${checkPersonName}/${checkTime}`,
})
},
},
{
title: '检查状态',
key: 'checkState',
render({ checkState }) {
return h('span', null, {
default: () => formatter.switchCheckState(checkState),
})
},
},
{
title: '整改情况',
key: 'checkStateDegree',
render({ checkStateDegree }) {
return h('span', null, {
default: () => {
// 0无需整改 1已整改 2整改中
switch (checkStateDegree) {
case '0':
return '无需整改'
case '1':
return '已整改'
case '2':
return '整改中'
default:
return '暂无'
}
},
})
},
},
{
title: '操作',
key: 'actions',
render(row) {
return h(
NButton,
{
text: true,
textColor: '#1890ff',
size: 'small',
onClick: async () => {
orderInfo.value =
(
await ajax.get({
url: api.ORDER.replace('{id}', row.id),
})
)?.data?.content || {}
showOrderInfo.value = true
},
},
{ default: () => '查看检查单' },
)
},
},
]
const monthCheckData = ref<any[]>([])
const doubleCheckData = ref<any[]>([])
const bxInfo = ref<{ [key: string]: unknown }>({})
const showBxInfo = ref(false)
const bxColumn = [
{
title: '报修项目',
key: 'troublePhenomenon',
},
{
title: '报修类型',
key: 'troubleType',
},
{
title: '受理时间',
key: 'acceptTime',
},
{
title: '完成时间',
key: 'feedBackDate',
},
{
title: '反馈人电话',
key: 'feedbackPhone',
},
{
title: '状态',
key: 'status',
},
{
title: '操作',
key: 'actions',
render(row) {
return h(
NButton,
{
text: true,
textColor: '#1890ff',
size: 'small',
onClick: async () => {
bxInfo.value =
(
await ajax.get({
url: `${api.BX}/${row.id}`,
})
)?.data?.content || {}
showBxInfo.value = true
},
},
{ default: () => '查看' },
)
},
},
]
const bxData = ref<any[]>([])
const tsColumn = [
{
title: '小区名称',
key: 'communityName',
},
{
title: '地址',
key: 'address',
},
{
title: '反应问题',
key: 'problem',
},
{
title: '受理时间',
key: 'acceptDate',
},
{
title: '反馈时间',
key: 'feedBackDate',
},
{
title: '状态',
key: 'status',
},
]
const tsData = ref<any[]>([])
watch(
() => curMenu.value,
......@@ -362,21 +839,84 @@ watch(
pagination.page = 1
switch (menu) {
case 2:
showRiskBuilding.value = false
showBuildingInfo.value = false
reset()
break
case 3:
showOrderInfo.value = false
monthCheckData.value =
(
await ajax.get({
url: api.ORDERS,
params: {
communityName: props.info.stNameFrst,
communityName: props.info?.stNameFrst,
orderType: 1,
pageSize: 9000,
},
})
)?.data?.content || []
const basicInfo =
(
await ajax.get({
url: api.GET_COMMUNITY.replace(
'{id}',
props.info?.sectId as string,
),
})
)?.data?.content || {}
selfCheckBasic.value = {
...(basicInfo?.cmInfo || {}),
...(basicInfo?.caoInfo || {}),
...basicInfo,
}
selfCheckData.value =
(
await ajax.get({
url: api.CHECK_ORDERS,
params: {
orderType: '4',
communityId: props.info?.sectId as string,
pageSize: 9000,
checkTime_desc: 'desc',
},
})
)?.data?.content || []
doubleCheckData.value =
(
await ajax.get({
url: api.CHECK_ORDERS,
params: {
orderType: '5',
communityId: props.info?.sectId as string,
pageSize: 9000,
checkTime_desc: 'desc',
},
})
)?.data?.content || []
break
case 4:
showBxInfo.value = false
bxData.value =
(
await ajax.get({
url: api.BX,
params: {
communityId: props.info?.sectId as string,
pageSize: 9000,
},
})
)?.data?.content || []
tsData.value =
(
await ajax.get({
url: api.TS,
params: {
communityId: props.info?.sectId as string,
pageSize: 9000,
},
})
)?.data?.content || []
break
default:
break
......
......@@ -52,7 +52,6 @@ function onComplete() {
}
function setCommunityPoints(query = "HPB_NAME = '静安区'") {
console.log(query)
map.instance.getLayer('wg_gis_xq_point').visible = false
map.instance.setFilter('wg_gis_mpz', query)
map.instance.setFilter('wg_gis_xq_poly', query)
......
......@@ -78,7 +78,7 @@ const onSearch = async () => {
list.value =
(
await ajax.post({
url: api.COMMUNITY + '?pageSize=9000',
url: api.POST_COMMUNITY + '?pageSize=9000',
params: {
conditions: [
{
......
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