Commit 07f7d217 authored by 郭铭瑶's avatar 郭铭瑶 🤘

更新接口

parent a4313de3
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script src="/SMap.min.js"></script> <!-- <script src="/SMap.min.js"></script> -->
<script src="/dev/SMap.min.js"></script>
<script src="/Plugins.min.js"></script> <script src="/Plugins.min.js"></script>
<script src="/hls.js"></script> <script src="/hls.js"></script>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"echarts-wordcloud": "^2.0.0", "echarts-wordcloud": "^2.0.0",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"qs": "^6.9.6", "qs": "^6.9.6",
"vue": "^3.0.5", "vue": "^3.1.5",
"vue-router": "^4.0.6", "vue-router": "^4.0.6",
"vuex": "^4.0.0" "vuex": "^4.0.0"
}, },
......
...@@ -35,6 +35,7 @@ export default { ...@@ -35,6 +35,7 @@ export default {
GET_CASE: '/service-special-nandong/compairs', // 案件汇总列表 GET_CASE: '/service-special-nandong/compairs', // 案件汇总列表
GET_CASE_DETAIL: '/service-special-nandong/compair', // 案件详情 GET_CASE_DETAIL: '/service-special-nandong/compair', // 案件详情
GET_FOR_OLD: '/service-special-nandong/forOldFacilitiess', // 为老
GET_MARKETS: '/service-special-nandong/vegetableMarkets', // 菜场、药店、便利店 GET_MARKETS: '/service-special-nandong/vegetableMarkets', // 菜场、药店、便利店
GET_DUNGS: '/service-special-nandong/urDungs', // 倒粪口 GET_DUNGS: '/service-special-nandong/urDungs', // 倒粪口
GET_BINS: '/service-special-nandong/internalDustbins', // 垃圾箱 GET_BINS: '/service-special-nandong/internalDustbins', // 垃圾箱
...@@ -55,8 +56,8 @@ export default { ...@@ -55,8 +56,8 @@ export default {
// 左侧公共 // 左侧公共
GET_PUBLICSAFE_COMMANDSYSTEM: '/service-special-nandong/commandSystem', // 指挥体系 GET_PUBLICSAFE_COMMANDSYSTEM: '/service-special-nandong/commandSystem', // 指挥体系
GET_PUBLICSAFE_STREETPOWER: '/service-special-nandong/streetPower', // 网格工作站(原名街道力量) GET_PUBLICSAFE_STREETPOWER: '/service-special-nandong/workstations', // 网格工作站(原名街道力量)
GET_PUBLICSAFE_PARTY: '/service-special-nandong/party', // 党建 GET_PUBLICSAFE_PARTY: '/service-special-nandong/partyConstruction/1', // 党建
GET_PUBLICSAFE_ECONOMIC: '/service-special-nandong/economic', // 经济 GET_PUBLICSAFE_ECONOMIC: '/service-special-nandong/economic', // 经济
/** 小区屏 */ /** 小区屏 */
...@@ -102,5 +103,9 @@ export default { ...@@ -102,5 +103,9 @@ export default {
GET_ECOLOGY_PHOTO: '/service-special-nandong/buildingPhotos', // 生态 - 商业综合体、文保、历保照片 GET_ECOLOGY_PHOTO: '/service-special-nandong/buildingPhotos', // 生态 - 商业综合体、文保、历保照片
GET_ELEV_COUNT: '/service-special-nandong/elevatorAdd/workstation', // 美丽家园-电梯加装统计数字 GET_ELEV_COUNT: '/service-special-nandong/elevatorAdd/workstation', // 美丽家园-电梯加装统计数字
GET_ELEV_LIST: '/service-special-nandong/elevatorAdds', // 美丽家园 - 根据名称查询列表 GET_ELEV_LIST: '/service-special-nandong/elevatorAdds', // 美丽家园 - 根据名称查询列表
GET_TOILET: '/service-special-nandong/toilet/renovation', // 马桶改造 GET_TOILET: '/service-special-nandong/toiletRenovations', // 马桶改造
GET_BEAUTY_STREET: '/service-special-nandong/beautifulStreets', // 美丽街区
GET_BEAUTY_HOME: '/service-special-nandong/beautifulHomes', // 美丽家园
GET_EVENTS: '/service-special-nandong/compairs', // 事件
} }
...@@ -11,7 +11,7 @@ Axios.interceptors.request.use( ...@@ -11,7 +11,7 @@ Axios.interceptors.request.use(
(config) => { (config) => {
// 添加token // 添加token
config.headers.Authorization = config.headers.Authorization =
'bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMiIsImp0aSI6IjdiMWQ3ODRhLWY2ZjEtNGM5ZS1iYTRlLWJhM2FiMDNkYzRiZCIsImVuYWJsZSI6dHJ1ZSwiY2xpZW50X2lkIjoic3NvIiwidGltZXN0YW1wIjoxNjE4NDYzMzQ5NTY4LCJzY29wZSI6WyJyZWFkIiwid3JpdGUiLCJ0cnVzdCJdfQ.JnyKdHUPFIrb4CWZg2JyoU8JTXGZvWVN2kQNYnhKj-vBBt7eAmmJ9I3JqYBC2MieAF-qiNPvJDO0_pL54Ko2xZ0JpeflXMbr5GMqKoozNiZYcNdqsN8AWew4PPKTGr7gcdGQEO1_eLtTXvwnGVTiAP8vqPpLGFaKs282yWc9tdDp1976RjEEi4Knb5VEbnHiW1oyyCZ3WPGHCjO7M6s7iNNh0inA5Af-r7JZNTNL89gEH1lj3dEHReiPMylnwMCi4F5oOY4er6PNIkIjEoA0ydEpaC4YyEhbXGHrXKUsXZxQc8XoS99PLdVumWreDq6KCuZis-qm_T_lfFTTp1gmJA' 'bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMCIsImVuYWJsZSI6dHJ1ZSwic2NvcGUiOlsicmVhZCIsIndyaXRlIiwidHJ1c3QiXSwiZXhwIjoxNjMyNDc4MjczLCJqdGkiOiJiNWJlNjVhMS0xOTZmLTQ0MWQtYWUxYy1hNjFhMTM3YTE1ZmYiLCJjbGllbnRfaWQiOiJzc28iLCJ0aW1lc3RhbXAiOjE2MzI0NzEwNzMwNTh9.BppOUuGxmYTgAPr2XloyhaxrKI49_loj901RPLyizu9wEgVr40CpBGOcTDSy4LlYAwcRYCcRxm6xYBW5TNm5jH5iljHRi796CRnO6kyQUycnwdog4J-J3n_vkVPTqOg-CfO6KThnbrqkksxI14Lv8sYQXcT03ypMQlwC-_P56WK7h2N50dS4O-RY1P2iElzZcaDq_Q5icx2hsWeyPDDpSDYcyRIp5dVgBQLjqf0clH_FK2o4N7c6vnkC5Se6VTGbBRBCkhEi9JM0FkcpP8Fj-VbXBYO4HPQ-1ddiMRdxRx-nPT69lOTA_iGJteHruAA9EK2kFDHLsGdbiW2vB5WBlQ'
return config return config
}, },
(error) => { (error) => {
......
...@@ -43,7 +43,7 @@ export default defineComponent({ ...@@ -43,7 +43,7 @@ export default defineComponent({
viewMode: '3D', viewMode: '3D',
center: [1019.614669, 54.167243], center: [1019.614669, 54.167243],
// center: [-135.98002789627407, -722.1597065437004], // center: [-135.98002789627407, -722.1597065437004],
zooms: [7, 20], zooms: [6, 20],
zoom: 8, zoom: 8,
pitch: 45, pitch: 45,
mapStyle: 'smap://styles/dark', mapStyle: 'smap://styles/dark',
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, defineComponent, onBeforeUnmount, onMounted, PropType, ref } from 'vue' import { computed, defineComponent, PropType } from 'vue'
import MonitorCount from '../MyCount/my-count.vue' import MonitorCount from '../MyCount/my-count.vue'
export interface ProgressProps { export interface ProgressProps {
...@@ -67,17 +67,7 @@ export default defineComponent({ ...@@ -67,17 +67,7 @@ export default defineComponent({
} }
return { background: props.color } return { background: props.color }
}) })
const percent = ref(0) const percent = computed(() => (props.value > 100 ? 100 : props.value))
const timer = ref<any>(null)
onMounted(() => {
timer.value = setTimeout(() => {
percent.value = props.value > 100 ? 100 : props.value
}, 500)
})
onBeforeUnmount(() => {
clearTimeout(timer.value)
timer.value = null
})
return { return {
barColor, barColor,
bgColor, bgColor,
......
...@@ -67,6 +67,9 @@ export default { ...@@ -67,6 +67,9 @@ export default {
dispatch('getEcologyConvenient') dispatch('getEcologyConvenient')
dispatch('getEcologyPhoto') dispatch('getEcologyPhoto')
dispatch('getElevCount') dispatch('getElevCount')
dispatch('GET_BEAUTY_STREET')
dispatch('GET_BEAUTY_HOME')
dispatch('GET_FACILITY_CONVENIENT')
}, },
// 物业三架马车数据 (缺交叉任职数) // 物业三架马车数据 (缺交叉任职数)
...@@ -234,7 +237,6 @@ export default { ...@@ -234,7 +237,6 @@ export default {
const { content } = ( const { content } = (
await ajax.get({ url: api.GET_PUBLICSAFE_SOS_MATERIAL }) await ajax.get({ url: api.GET_PUBLICSAFE_SOS_MATERIAL })
).data ).data
// console.log(content)
commit('SET_PUBLICSAFE_SOS_MATERIAL', content) commit('SET_PUBLICSAFE_SOS_MATERIAL', content)
}, },
...@@ -360,7 +362,7 @@ export default { ...@@ -360,7 +362,7 @@ export default {
const { content } = ( const { content } = (
await ajax.get({ url: api.GET_PUBLICSAFE_STREETPOWER }) await ajax.get({ url: api.GET_PUBLICSAFE_STREETPOWER })
).data ).data
commit('SET_PUBLICSAFE_STREETPOWER', content.workStation || []) commit('SET_PUBLICSAFE_STREETPOWER', content || [])
}, },
// 左侧公共 - 党建 // 左侧公共 - 党建
...@@ -445,7 +447,7 @@ export default { ...@@ -445,7 +447,7 @@ export default {
}, },
async getDutyList( async getDutyList(
{ commit }: Method, { commit }: Method,
params: { [key: string]: string } params: { [key: string]: string | number }
): Promise<void> { ): Promise<void> {
if (!params.gridId) return if (!params.gridId) return
const { content } = ( const { content } = (
...@@ -668,4 +670,92 @@ export default { ...@@ -668,4 +670,92 @@ export default {
).data ).data
commit('SET_RESPONSIVITY', content) commit('SET_RESPONSIVITY', content)
}, },
async GET_BEAUTY_STREET({ commit }: Method): Promise<void> {
const { content } = (
await ajax.get({
url: api.GET_BEAUTY_STREET,
params: { pageSize: 10000 },
})
).data
commit('SET_BEAUTY_STREET', content)
},
async GET_BEAUTY_HOME({ commit }: Method): Promise<void> {
const { content } = (
await ajax.get({
url: api.GET_BEAUTY_HOME,
params: { pageSize: 10000 },
})
).data
commit('SET_BEAUTY_HOME', content)
},
async GET_FACILITY_CONVENIENT({ commit }: Method): Promise<void> {
const result = {
为老:
(
await ajax.get({
url: api.GET_FOR_OLD,
params: { pageSize: 10000 },
})
)?.data?.content || [],
菜场:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '菜场', pageSize: 10000 },
})
)?.data?.content || [],
便利店:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '便利店', pageSize: 10000 },
})
)?.data?.content || [],
电话亭:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '电话亭', pageSize: 10000 },
})
)?.data?.content || [],
餐车:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '餐车', pageSize: 10000 },
})
)?.data?.content || [],
公厕:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '公厕', pageSize: 10000 },
})
)?.data?.content || [],
街面废物箱:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '街面废物箱', pageSize: 10000 },
})
)?.data?.content || [],
垃圾箱房:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '垃圾箱房', pageSize: 10000 },
})
)?.data?.content || [],
药房:
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '药房', pageSize: 10000 },
})
)?.data?.content || [],
}
commit('SET_FACILITY_CONVENIENT', result)
},
} }
...@@ -166,6 +166,9 @@ export interface GlobalStateProps { ...@@ -166,6 +166,9 @@ export interface GlobalStateProps {
responsivity: ResponsivityProp[] responsivity: ResponsivityProp[]
entry: EntryProp[] entry: EntryProp[]
emergencyPoints: any[] emergencyPoints: any[]
beautyStreet: any[]
beautyHome: any[]
facilityConvenient: any
} }
/** ------------------------------------- 分隔线 --------------------------------------- */ /** ------------------------------------- 分隔线 --------------------------------------- */
......
...@@ -308,4 +308,15 @@ export default { ...@@ -308,4 +308,15 @@ export default {
SET_EMERGENCY_POINTS(state: GlobalStateProps, data: any[]): void { SET_EMERGENCY_POINTS(state: GlobalStateProps, data: any[]): void {
state.emergencyPoints = data state.emergencyPoints = data
}, },
SET_BEAUTY_STREET(state: GlobalStateProps, data: any[]): void {
state.beautyStreet = data
},
SET_BEAUTY_HOME(state: GlobalStateProps, data: any[]): void {
state.beautyHome = data
},
SET_FACILITY_CONVENIENT(state: GlobalStateProps, data: any): void {
state.facilityConvenient = data
},
} }
...@@ -245,4 +245,7 @@ export default { ...@@ -245,4 +245,7 @@ export default {
responsivity: [], responsivity: [],
entry: [], entry: [],
emergencyPoints: [], emergencyPoints: [],
beautyStreet: [],
beautyHome: [],
facilityConvenient: {},
} as GlobalStateProps } as GlobalStateProps
...@@ -165,8 +165,6 @@ export default defineComponent({ ...@@ -165,8 +165,6 @@ export default defineComponent({
} }
const map = ref<any>(null) const map = ref<any>(null)
onMounted(async () => { onMounted(async () => {
console.log('route', route)
curId.value = route.query.id || communityOptions.value[0].type curId.value = route.query.id || communityOptions.value[0].type
initData(curId.value) initData(curId.value)
store.commit( store.commit(
...@@ -196,7 +194,6 @@ export default defineComponent({ ...@@ -196,7 +194,6 @@ export default defineComponent({
icon: getIcon(item.classification, item.relationName), icon: getIcon(item.classification, item.relationName),
}) })
}) })
console.log(pointData)
points.value = map.value.addPoint({ points.value = map.value.addPoint({
key: key, key: key,
size: [100, 500], size: [100, 500],
......
...@@ -166,6 +166,7 @@ export default function useSwitchMap(map: any): any { ...@@ -166,6 +166,7 @@ export default function useSwitchMap(map: any): any {
} else { } else {
hideCommunity() hideCommunity()
} }
// TODO 现在衣食住行不撒点的原因是分辨的标签没有了
const yiPoints = pointData.filter((e) => e.labelName === '衣') const yiPoints = pointData.filter((e) => e.labelName === '衣')
const shiPoints = pointData.filter((e) => e.labelName === '食') const shiPoints = pointData.filter((e) => e.labelName === '食')
const zhuPoints = pointData.filter((e) => e.labelName === '住') const zhuPoints = pointData.filter((e) => e.labelName === '住')
......
...@@ -146,7 +146,7 @@ export default defineComponent({ ...@@ -146,7 +146,7 @@ export default defineComponent({
personnelNight: '夜间人', personnelNight: '夜间人',
workTimeDay: '8时-18时', workTimeDay: '8时-18时',
workTimeNight: '18时-8时', workTimeNight: '18时-8时',
number: '5', number: 0,
}, },
{ {
group: '第二工作站', group: '第二工作站',
...@@ -154,7 +154,7 @@ export default defineComponent({ ...@@ -154,7 +154,7 @@ export default defineComponent({
personnelNight: '夜间人', personnelNight: '夜间人',
workTimeDay: '8时-18时', workTimeDay: '8时-18时',
workTimeNight: '18时-8时', workTimeNight: '18时-8时',
number: '5', number: 0,
}, },
{ {
group: '第三工作站', group: '第三工作站',
...@@ -162,26 +162,23 @@ export default defineComponent({ ...@@ -162,26 +162,23 @@ export default defineComponent({
personnelNight: '夜间人', personnelNight: '夜间人',
workTimeDay: '8时-18时', workTimeDay: '8时-18时',
workTimeNight: '18时-8时', workTimeNight: '18时-8时',
number: '5', number: 0,
}, },
]) ])
watch( watch(
// 监听改变网格工作站的数据 // 监听改变网格工作站的数据
[() => streetPower.value, () => dutyTableData.value], () => streetPower.value,
([data, dutyData]) => { (data) => {
if (data.length === 0) return if (data.length === 0) return
dutyData.forEach((ele: any, i: number) => { dutyTableData.value = data.map((item: any) => {
const duty = data.find((e: any) => e.workstationName === ele.group) return {
if (duty) { group: item.stationName,
dutyTableData.value[i] = { personnelDay: item.personnelDay,
group: ele.group, personnelNight: item.personnelNight,
personnelDay: duty.personnelDay, workTimeDay: item.workTimeDay,
personnelNight: duty.personnelNight, workTimeNight: item.workTimeNight,
workTimeDay: duty.workTimeDay, number: item.stationPersonnelNum,
workTimeNight: duty.workTimeNight,
number: duty.num,
}
} }
}) })
}, },
...@@ -242,7 +239,7 @@ export default defineComponent({ ...@@ -242,7 +239,7 @@ export default defineComponent({
] ]
}) })
const propertySummary = computed(() => { const propertySummary = computed(() => {
const { wy, com, ywh, cross } = store.state.pubulicLeftParty const { wy, com, ywh, crossOffice } = party.value
return [ return [
{ {
name: '居委会', name: '居委会',
...@@ -261,7 +258,7 @@ export default defineComponent({ ...@@ -261,7 +258,7 @@ export default defineComponent({
}, },
{ {
name: '交叉任职', name: '交叉任职',
value: cross || 0, value: crossOffice || 0,
}, },
] ]
}) })
......
...@@ -34,12 +34,13 @@ ...@@ -34,12 +34,13 @@
</div> </div>
</m-card> </m-card>
<m-card class="card" mode="4" title="网格力量"> <m-card class="card" mode="4" title="网格力量">
<div class="table"> <div v-if="gridList.length > 0" class="table">
<div v-for="(item, i) in gridList" :key="i"> <div v-for="(item, i) in gridList" :key="i">
<p>{{ item.department }}</p> <p>{{ item.department }}</p>
<p>{{ item.persons }}</p> <p>{{ item.persons }}</p>
</div> </div>
</div> </div>
<m-empty v-else />
</m-card> </m-card>
</m-card> </m-card>
</template> </template>
...@@ -58,7 +59,12 @@ import store from '@/store' ...@@ -58,7 +59,12 @@ import store from '@/store'
export default defineComponent({ export default defineComponent({
name: 'ManageBasic', name: 'ManageBasic',
setup() { setup() {
const stationInfo = computed(() => store.state.stationInfo) const streetPower = computed(() => store.state.pubulicLeftStreetPower)
const stationInfo = computed(
() =>
streetPower.value.find((e: any) => e.id === store.state.curView.id) ||
{}
)
const basicList = computed(() => { const basicList = computed(() => {
const { const {
totalArea = 0, totalArea = 0,
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<m-sub2 <m-sub2
click-able click-able
:addition="{ value: elevNum, unit: '幢' }" :addition="{ value: elevAmount, unit: '幢' }"
@select="handleClick" @select="handleClick"
> >
电梯加装(排摸) 电梯加装(排摸)
...@@ -24,9 +24,14 @@ ...@@ -24,9 +24,14 @@
<m-sub2>马桶改造</m-sub2> <m-sub2>马桶改造</m-sub2>
<Brief :list="toiletSituation" color="#fff" /> <Brief :list="toiletSituation" color="#fff" />
<m-progress <m-progress
:value="80" :value="rate"
:color="['rgba(253,211,116,.15)', '#F7933E']" :color="['rgba(253,211,116,.15)', '#F7933E']"
:msg="{ value: 80, unit: '%', name: '改造进度', color: '#fff' }" :msg="{
value: rate,
unit: '%',
name: '改造进度',
color: '#fff',
}"
/> />
</div> </div>
</m-card> </m-card>
...@@ -38,16 +43,16 @@ ...@@ -38,16 +43,16 @@
offset="-44%" offset="-44%"
> >
<div class="elev-modal"> <div class="elev-modal">
<div v-for="item in elevData" :key="item.id"> <div v-for="item in elevList" :key="item.id">
<p>{{ item.sectAddr }}</p> <p>{{ item.sectAddr || '无' }}</p>
<p>{{ item.cmtName }} | {{ item.sectName }}</p> <p>{{ item.cmtName }} | {{ item.sectName || '无' }}</p>
</div> </div>
</div> </div>
</m-modal> </m-modal>
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, defineComponent, ref } from 'vue' import { computed, defineComponent, onMounted, ref } from 'vue'
import Brief, { BriefProp } from '../components/brief.vue' import Brief, { BriefProp } from '../components/brief.vue'
import store from '@/store' import store from '@/store'
import icon31 from '@/assets/images/icon31.png' import icon31 from '@/assets/images/icon31.png'
...@@ -63,34 +68,75 @@ export default defineComponent({ ...@@ -63,34 +68,75 @@ export default defineComponent({
components: { Brief }, components: { Brief },
setup() { setup() {
const curViewType = computed(() => store.state.curView.type) const curViewType = computed(() => store.state.curView.type)
const summary = ref([ const beautyHome = computed(() => store.state.beautyHome)
{ name: '2020年', value: 26 }, const summary = computed(() => {
{ name: '2019年', value: 24 }, const result: any = {}
{ name: '2018年', value: 18 }, beautyHome.value.forEach((item) => {
]) const year = item.implementYear?.slice(0, 4) + '年'
const situation = ref<BriefProp[]>([ if (!result[year]) {
{ name: '小区微更新', value: 26, icon: icon31 }, result[year] = []
{ name: '门岗规范化', value: 12, icon: icon32 }, }
{ name: '充电桩', value: 64, icon: icon33 }, result[year].push(item)
{ name: '雨污混接', value: 18, icon: icon34 }, })
return Object.keys(result).map((key: string) => ({
name: key,
value: result[key]?.length || 0,
}))
})
const situation = computed<BriefProp[]>(() => [
{
name: '小区微更新',
value:
beautyHome.value.filter((e) => e.projectType == '小区微更新')
?.length || 0,
icon: icon31,
},
{
name: '门岗规范化',
value:
beautyHome.value.filter((e) => e.projectType == '门岗规范化')
?.length || 0,
icon: icon32,
},
{
name: '充电桩',
value:
beautyHome.value.filter((e) => e.projectType == '充电桩')?.length ||
0,
icon: icon33,
},
{
name: '雨水混接',
value:
beautyHome.value.filter((e) => e.projectType == '雨水混接')?.length ||
0,
icon: icon34,
},
]) ])
const toiletSituation = ref<BriefProp[]>([ const toiletSituation = ref<BriefProp[]>([
{ name: '已完成改造', value: 26, icon: icon35 }, { name: '已完成改造', value: 0, icon: icon35 },
{ name: '应改造', value: 64, icon: icon36 }, { name: '应改造', value: 0, icon: icon36 },
]) ])
const barData = { const rate = ref(0)
onMounted(async () => {
const { content } = (await ajax.get({ url: api.GET_TOILET })).data
let totalNum = 0,
completeNum = 0
content.forEach((item: any) => {
totalNum += item.totalNum || 0
completeNum += item.completeNum || 0
})
toiletSituation.value[0].value = completeNum
toiletSituation.value[1].value = totalNum
rate.value = Math.round((completeNum / totalNum) * 100)
})
const barData = computed(() => ({
dimensions: [ dimensions: [
{ name: 'name', displayName: '类型' }, { name: 'name', displayName: '类型' },
{ name: 'value', displayName: '' }, { name: 'value', displayName: '' },
], ],
source: [ source: [...situation.value],
{ name: '架空线梳理', value: 16 }, }))
{ name: '店招店牌美化', value: 26 },
{ name: '绿化整治', value: 15 },
{ name: '外立面整治', value: 8 },
{ name: '公共设置', value: 8 },
],
}
const chartOption = { const chartOption = {
color: [['#F7943C', '#FF6C2E']], color: [['#F7943C', '#FF6C2E']],
legend: { show: false }, legend: { show: false },
...@@ -100,6 +146,9 @@ export default defineComponent({ ...@@ -100,6 +146,9 @@ export default defineComponent({
barWidth: '20%', barWidth: '20%',
}, },
], ],
yAxis: {
minInterval: 1,
},
xAxis: { xAxis: {
axisLabel: { axisLabel: {
formatter: (value: string) => { formatter: (value: string) => {
...@@ -109,32 +158,34 @@ export default defineComponent({ ...@@ -109,32 +158,34 @@ export default defineComponent({
}, },
}, },
} }
const elevNum = computed(() => { const elevList = ref<any[]>([])
const data = store.state.elevCount const elevAmount = ref(0)
const { id } = store.state.curView ajax
return data .get({
.filter((e) => e.workstationId === id) url: api.GET_ELEV_LIST,
.reduce((acc, cur) => acc + cur.num, 0) params: { pageSize: 1000 },
})
.then((res) => {
const result: any = {}
const data = res?.data?.content || []
data.forEach((e: any) => {
if (!result[e.cmtName]) {
result[e.cmtName] = 0
}
result[e.cmtName] += 1
})
elevList.value = data
elevAmount.value = data.length || 0
}) })
const showElevModal = ref(false) const showElevModal = ref(false)
const elevData = ref<any>([])
const dic: any = { const dic: any = {
'01001': ['振兴', '新昌', '江阴', '顺天村'], '01001': ['振兴', '新昌', '江阴', '顺天村'],
'01002': ['小花园'], '01002': ['小花园'],
'01003': ['福海', '定兴'], '01003': ['福海', '定兴'],
} }
const handleClick = async () => { const handleClick = async () => {
const { content } = (
await ajax.get({
url: api.GET_ELEV_LIST,
params: { pageSize: 1000 },
})
).data
const { id } = store.state.curView
elevData.value = content.filter(
(e: any) => id && dic[id].includes(e.cmtName)
)
showElevModal.value = true showElevModal.value = true
} }
...@@ -143,11 +194,12 @@ export default defineComponent({ ...@@ -143,11 +194,12 @@ export default defineComponent({
summary, summary,
situation, situation,
toiletSituation, toiletSituation,
rate,
barData, barData,
chartOption, chartOption,
elevNum, elevAmount,
showElevModal, showElevModal,
elevData, elevList,
handleClick, handleClick,
} }
}, },
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
</div> </div>
</div> </div>
<Brief :list="situation" color="#fff" /> <Brief :list="situation" color="#fff" />
<m-sub2 :addition="{ value: 33, unit: '幢' }">电梯加装(排摸)</m-sub2> <m-sub2 :addition="{ value: elevAmount, unit: '幢' }">
电梯加装(排摸)
</m-sub2>
<div class="sum-card"> <div class="sum-card">
<div <div
v-for="item in elevList" v-for="item in elevList"
...@@ -25,16 +27,10 @@ ...@@ -25,16 +27,10 @@
<Brief :list="toiletSituation" color="#fff" /> <Brief :list="toiletSituation" color="#fff" />
<m-progress <m-progress
v-if="show" v-if="show"
:value=" :value="rate"
Math.round(
(toiletSituation[0].value / toiletSituation[1].value) * 100
)
"
:color="['rgba(253,211,116,.15)', '#F7933E']" :color="['rgba(253,211,116,.15)', '#F7933E']"
:msg="{ :msg="{
value: Math.round( value: rate,
(toiletSituation[0].value / toiletSituation[1].value) * 100
),
unit: '%', unit: '%',
name: '改造进度', name: '改造进度',
color: '#fff', color: '#fff',
...@@ -75,21 +71,77 @@ export default defineComponent({ ...@@ -75,21 +71,77 @@ export default defineComponent({
components: { Brief }, components: { Brief },
setup() { setup() {
const show = computed(() => store.state.curTheme === 'service') const show = computed(() => store.state.curTheme === 'service')
const summary = ref([ const beautyHome = computed(() => store.state.beautyHome)
{ name: '2020年', value: 26 }, const summary = computed(() => {
{ name: '2019年', value: 24 }, const result: any = {}
{ name: '2018年', value: 18 }, beautyHome.value.forEach((item) => {
]) const year = item.implementYear?.slice(0, 4) + '年'
const situation = ref<BriefProp[]>([ if (!result[year]) {
{ name: '小区微更新', value: 26, icon: icon31 }, result[year] = []
{ name: '门岗规范化', value: 12, icon: icon32 }, }
{ name: '充电桩', value: 64, icon: icon33 }, result[year].push(item)
{ name: '雨污混接', value: 18, icon: icon34 }, })
return Object.keys(result).map((key: string) => ({
name: key,
value: result[key]?.length || 0,
}))
})
const situation = computed<BriefProp[]>(() => [
{
name: '小区微更新',
value:
beautyHome.value.filter((e) => e.projectType == '小区微更新')
?.length || 0,
icon: icon31,
},
{
name: '门岗规范化',
value:
beautyHome.value.filter((e) => e.projectType == '门岗规范化')
?.length || 0,
icon: icon32,
},
{
name: '充电桩',
value:
beautyHome.value.filter((e) => e.projectType == '充电桩')?.length ||
0,
icon: icon33,
},
{
name: '雨水混接',
value:
beautyHome.value.filter((e) => e.projectType == '雨水混接')?.length ||
0,
icon: icon34,
},
]) ])
const elevList = computed(() => store.state.elevCount) const elevList = ref<any[]>([])
const curCmtName = ref<string | null>(null) const curCmtName = ref<string | null>(null)
const elevData = ref<any>([]) const elevData = ref<any>([])
const showElevModal = ref(false) const showElevModal = ref(false)
const elevAmount = ref(0)
ajax
.get({
url: api.GET_ELEV_LIST,
params: { pageSize: 1000 },
})
.then((res) => {
const result: any = {}
const data = res?.data?.content || []
data.forEach((e: any) => {
if (!result[e.cmtName]) {
result[e.cmtName] = 0
}
result[e.cmtName] += 1
})
elevList.value = Object.keys(result).map((key: string) => ({
cmtName: key,
num: result[key],
}))
elevAmount.value = data.length || 0
})
const handleSelect = async (name: string) => { const handleSelect = async (name: string) => {
curCmtName.value === name curCmtName.value === name
? (curCmtName.value = null) ? (curCmtName.value = null)
...@@ -112,29 +164,31 @@ export default defineComponent({ ...@@ -112,29 +164,31 @@ export default defineComponent({
{ name: '已完成改造', value: 0, icon: icon35 }, { name: '已完成改造', value: 0, icon: icon35 },
{ name: '应改造', value: 0, icon: icon36 }, { name: '应改造', value: 0, icon: icon36 },
]) ])
const rate = ref(0)
onMounted(async () => { onMounted(async () => {
const { content } = (await ajax.get({ url: api.GET_TOILET })).data const { content } = (await ajax.get({ url: api.GET_TOILET })).data
toiletSituation.value[0].value = content.completeNum let totalNum = 0,
toiletSituation.value[1].value = content.totalNum completeNum = 0
content.forEach((item: any) => {
totalNum += item.totalNum || 0
completeNum += item.completeNum || 0
})
toiletSituation.value[0].value = completeNum
toiletSituation.value[1].value = totalNum
rate.value = Math.round((completeNum / totalNum) * 100)
}) })
const workStationProjects = ref([
{ name: '架空线梳理', value: 16 },
{ name: '店招店牌美化', value: 26 },
{ name: '绿化整治', value: 15 },
{ name: '外立面整治', value: 8 },
{ name: '公共设置', value: 8 },
])
return { return {
show, show,
summary, summary,
situation, situation,
elevAmount,
elevList, elevList,
curCmtName, curCmtName,
elevData, elevData,
showElevModal, showElevModal,
handleSelect, handleSelect,
toiletSituation, toiletSituation,
workStationProjects, rate,
} }
}, },
}) })
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div v-if="showChart" class="chart"> <div v-if="showChart" class="chart">
<a-select v-model:value="year"> <a-select :value="curYear" @change="handleSelect">
<a-select-option <a-select-option
v-for="item in summary" v-for="item in summary"
:key="item.name" :key="item.name"
...@@ -26,29 +26,93 @@ ...@@ -26,29 +26,93 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, computed } from 'vue' import { defineComponent, ref, computed, watch } from 'vue'
import store from '@/store' import store from '@/store'
export default defineComponent({ export default defineComponent({
name: 'BeautyStreet', name: 'BeautyStreet',
setup() { setup() {
const summary = ref([ const beautyStreet = computed(() => store.state.beautyStreet)
{ name: '2020年', value: 26 }, const list = ref<any>({})
{ name: '2019年', value: 24 }, const summary = ref<{ name: string; value: any }[]>([])
{ name: '2018年', value: 18 }, const curYear = ref('')
]) const handleSelect = (val: string) => {
curYear.value = val
}
const barData = ref({ const barData = ref({
dimensions: [ dimensions: [
{ name: 'name', displayName: '项目' }, { name: 'name', displayName: '项目' },
{ name: 'value', displayName: '数量' }, { name: 'value', displayName: '数量' },
], ],
source: [ source: [
{ name: '架空线梳理', value: 15 }, { name: '架空线梳理', value: 0 },
{ name: '店招店牌美化', value: 9 }, { name: '店招店牌美化', value: 0 },
{ name: '绿化整治', value: 4 }, { name: '绿化整治', value: 0 },
{ name: '外立面整治', value: 5 }, { name: '外立面整治', value: 0 },
{ name: '公共设施', value: 3 }, { name: '公共设施', value: 0 },
], ],
}) })
watch(
() => curYear.value,
(
year: string = summary.value?.[summary.value.length - 1]?.name || ''
) => {
barData.value.source = [
{
name: '架空线梳理',
value:
list.value[year]?.filter(
(e: any) => e.projectType == '架空线梳理'
)?.length || 0,
},
{
name: '店招店牌美化',
value:
list.value[year]?.filter(
(e: any) => e.projectType == '店招店牌美化'
)?.length || 0,
},
{
name: '绿化整治',
value:
list.value[year]?.filter((e: any) => e.projectType == '绿化整治')
?.length || 0,
},
{
name: '外立面整治',
value:
list.value[year]?.filter(
(e: any) => e.projectType == '外立面整治'
)?.length || 0,
},
{
name: '公共设施',
value:
list.value[year]?.filter((e: any) => e.projectType == '公共设施')
?.length || 0,
},
]
},
{ immediate: true }
)
watch(
() => beautyStreet.value,
(data: any[]) => {
const result: any = {}
data.forEach((item) => {
const year = item.implementYear?.slice(0, 4) + '年'
if (!result[year]) {
result[year] = []
}
result[year].push(item)
})
list.value = result
summary.value = Object.keys(list.value).map((key: string) => ({
name: key,
value: list.value?.[key]?.length || 0,
}))
curYear.value = summary.value?.[summary.value.length - 1]?.name || ''
}
)
const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100)) const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100))
const barOption = ref({ const barOption = ref({
color: [['#F7973D', 'rgba(234,173,0,.1)']], color: [['#F7973D', 'rgba(234,173,0,.1)']],
...@@ -83,14 +147,14 @@ export default defineComponent({ ...@@ -83,14 +147,14 @@ export default defineComponent({
}, },
], ],
}) })
const year = ref('2020年')
const showChart = computed(() => store.state.curTheme === 'service') const showChart = computed(() => store.state.curTheme === 'service')
return { return {
summary, summary,
barData, barData,
barOption, barOption,
year, curYear,
showChart, showChart,
handleSelect,
} }
}, },
}) })
...@@ -117,7 +181,6 @@ export default defineComponent({ ...@@ -117,7 +181,6 @@ export default defineComponent({
.chart .chart
width 100% width 100%
height 1.2rem height 1.2rem
margin-bottom .1rem
position relative position relative
</style> </style>
<style lang="stylus"> <style lang="stylus">
......
...@@ -30,11 +30,27 @@ export default defineComponent({ ...@@ -30,11 +30,27 @@ export default defineComponent({
name: 'Convenient', name: 'Convenient',
components: { Brief }, components: { Brief },
setup() { setup() {
const forOld = computed(() => store.state.oldService) const workstationId = computed(() => store.state.curView.id)
const convenientList = computed(() => store.state.lifeConvenient) const convenients = computed(() => store.state.facilityConvenient)
const forOld = computed(() => {
const data =
convenients.value?.['为老']?.filter(
(e: any) => e.workstationId == workstationId.value
) || []
const result: any = {}
data.forEach((item: any) => {
if (!result[item.facilitiesType]) {
result[item.facilitiesType] = 0
}
result[item.facilitiesType] += 1
})
return Object.keys(result).map((key: string) => ({
facilitiesType: key,
num: result[key],
}))
})
function getNum(name: string): number { function getNum(name: string): number {
const result = convenientList.value.find((e) => e.labelName === name) return convenients.value[name]?.length || 0
return (result && result.num) || 0
} }
const forLive = computed(() => { const forLive = computed(() => {
return [ return [
......
...@@ -23,7 +23,13 @@ ...@@ -23,7 +23,13 @@
<div> <div>
<m-sub2>商业综合体</m-sub2> <m-sub2>商业综合体</m-sub2>
<div class="business"> <div class="business">
<img v-for="photo in businessPhotos" :key="photo" :src="photo" /> <!-- <img v-for="photo in businessPhotos" :key="photo" :src="photo" /> -->
<div
v-for="photo in businessPhotos"
:key="photo"
class="photo"
:style="`background-image:url('${photo}')`"
/>
</div> </div>
</div> </div>
<div> <div>
...@@ -95,6 +101,7 @@ import img5 from '@/assets/images/img5.png' ...@@ -95,6 +101,7 @@ import img5 from '@/assets/images/img5.png'
import img6 from '@/assets/images/img6.png' import img6 from '@/assets/images/img6.png'
import img7 from '@/assets/images/img7.png' import img7 from '@/assets/images/img7.png'
import img8 from '@/assets/images/img8.png' import img8 from '@/assets/images/img8.png'
import img9 from '@/assets/images/img9.png'
import photo1 from '@/assets/images/photo1.png' import photo1 from '@/assets/images/photo1.png'
import photo2 from '@/assets/images/photo2.png' import photo2 from '@/assets/images/photo2.png'
import store from '@/store' import store from '@/store'
...@@ -108,11 +115,12 @@ export default defineComponent({ ...@@ -108,11 +115,12 @@ export default defineComponent({
return data.filter((e) => keys.includes(e.labelName)) return data.filter((e) => keys.includes(e.labelName))
}) })
const sumList = computed(() => { const sumList = computed(() => {
return store.state.ecologyConvenient.map((item) => { const data = store.state.facilityConvenient
return Object.keys(data).map((key: string) => {
return { return {
name: item.labelName, name: key,
value: item.num, value: data?.[key]?.length || 0,
icon: whichIcon(item.labelName), icon: whichIcon(key),
} }
}) })
}) })
...@@ -123,13 +131,19 @@ export default defineComponent({ ...@@ -123,13 +131,19 @@ export default defineComponent({
case '公厕': case '公厕':
return img7 return img7
case '药房': case '药房':
return img8 return img9
case '菜场': case '菜场':
return img5 return img5
case '菜店': case '菜店':
return img2 return img2
case '为老设施': case '为老':
return img1 return img1
case '电话亭':
return img4
case '垃圾箱房':
return img8
case '街面废物箱':
return img6
default: default:
return img3 return img3
} }
...@@ -228,6 +242,10 @@ export default defineComponent({ ...@@ -228,6 +242,10 @@ export default defineComponent({
display flex display flex
justify-content space-between justify-content space-between
margin-bottom .02rem margin-bottom .02rem
>img .photo
width 48% width 48%
height 1.1rem
background-repeat no-repeat
background-size cover
background-position bottom center
</style> </style>
...@@ -39,5 +39,5 @@ export default defineComponent({ ...@@ -39,5 +39,5 @@ export default defineComponent({
.beauty1 .beauty1
flex 1 flex 1
.beauty2 .beauty2
flex 1.6 flex 2
</style> </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