Commit 92a6b586 authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改安全排查和电梯加装

parent 1e98125b
......@@ -8,7 +8,7 @@ const Axios = axios.create({
})
Axios.interceptors.request.use(
(config) => {
config.baseURL = window._base_url
config.baseURL = window._base_url || api.BASE_URL
// 添加token
// config.headers.Authorization = ''
return config
......
......@@ -28,6 +28,7 @@ export interface ProgressProps {
value?: number
unit?: string
color?: string
decimal?: number
}
export default defineComponent({
name: 'MyProgress',
......
<template>
<m-card title="安全排查">
<div class="summary">
<div v-for="item in list" :key="item.name">
<m-count class="orange-count" :value="item.value" :decimal="2" />%
<p>{{ item.name }}</p>
</div>
</div>
<div class="chart-wrapper">
<template v-if="pieData.source.length > 0">
<div class="chart">
......@@ -21,20 +27,6 @@
</template>
<m-empty v-else />
</div>
<m-progress
v-for="item in list"
:key="item.name"
:value="item.value"
:msg="{
name: item.name,
value: item.value,
unit: '%',
decimal: 2,
color: '#fff',
}"
:color="['rgb(36,59,86)', '#F4923E']"
/>
<p />
</m-card>
</template>
......@@ -123,11 +115,9 @@ const list = ref([
display flex
.chart
width 25%
height .8rem
height 1rem
.legend
flex 1
height .8rem
overflow-y auto
.inner
display flex
flex-wrap wrap
......@@ -150,4 +140,10 @@ const list = ref([
overflow hidden
white-space nowrap
text-overflow ellipsis
.summary
display flex
justify-content space-between
margin-bottom .04rem
>div
text-align center
</style>
......@@ -37,8 +37,8 @@ import { ajax } from '@/ajax'
ajax.get({ url: _config.apis.main }).then((res) => {
const { statistical, streetData = [] } = res?.data?.content || {}
list.value = [
{ name: '多层住宅房屋', value: +statistical.totalNum || 0, unit: '幢' },
{ name: '可加梯门牌数', value: +statistical.caddNum || 0, unit: '幢' },
// { name: '多层住宅房屋', value: +statistical.totalNum || 0, unit: '幢' },
// { name: '可加梯门牌数', value: +statistical.caddNum || 0, unit: '幢' },
{ name: '完成加梯征询', value: +statistical.passNum || 0, unit: '幢' },
{ name: '加梯完工', value: +statistical.finishNum || 0, unit: '幢' },
]
......@@ -100,8 +100,8 @@ const option = {
],
}
const list = ref([
{ name: '多层住宅房屋', value: 0, unit: '幢' },
{ name: '可加梯门牌数', value: 0, unit: '幢' },
// { name: '多层住宅房屋', value: 0, unit: '幢' },
// { name: '可加梯门牌数', value: 0, unit: '幢' },
{ name: '完成加梯征询', value: 0, unit: '幢' },
{ name: '加梯完工', value: 0, unit: '幢' },
])
......@@ -112,9 +112,7 @@ const list = ref([
.sum
display flex
justify-content space-between
flex-wrap wrap
>div
width 50%
display flex
align-items center
font-size .09rem
......
......@@ -60,16 +60,20 @@ const _config = {
export default _config
</script>
<script lang="ts" setup>
import { ref } from 'vue'
import { ref, watch } from 'vue'
import { NSpace, NSelect } from 'naive-ui'
import { ajax } from '@/ajax'
const year = ref('2021')
const total = ref(0)
ajax
watch(
() => year.value,
(val) => {
ajax
.get({
url:_config.apis.main,
params: { year: year.value },
url: _config.apis.main,
params: { year: val },
})
.then((res) => {
const {
......@@ -102,6 +106,9 @@ ajax
{ name: '预销售套数', value: totalSets, unit: '套', decimal: 0 },
]
})
},
{ immediate: true },
)
const yearOptions = [
{ label: '2021', value: '2021' },
......
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