数据统计联调接口

This commit is contained in:
aoli.qu 2023-10-24 23:56:38 +08:00
parent 3ea56e80bf
commit 59ec7b2faf
28 changed files with 739 additions and 544 deletions

View File

@ -1,29 +1,12 @@
import request from '@/utils/request' import request from '@/utils/request'
const dataApi = { const dataApi = {
orgStatistics: 'data/orgStatistics', statistics: 'data/statistics'
personalStatistics: 'data/personalStatistics',
classHourTop: 'data/personalStatistics/classHourTop'
} }
export function dataOrgStatistics (params) { export function dataStatistics () {
return request({ return request({
url: dataApi.orgStatistics, url: dataApi.statistics,
method: 'get', method: 'post'
params: params
})
}
export function dataPersonalStatistics (params) {
return request({
url: dataApi.personalStatistics,
method: 'get',
params: params
})
}
export function dataClassHourTop (params) {
return request({
url: dataApi.classHourTop,
method: 'get',
params: params
}) })
} }

View File

@ -7,7 +7,7 @@ const roomApi = {
list: '/room/list', list: '/room/list',
listAllRoom: '/room/listAllRoom', listAllRoom: '/room/listAllRoom',
listAllBed: '/room/listAllBed', listAllBed: '/room/listAllBed',
} }
export function roomAddOrUpdate (params) { export function roomAddOrUpdate (params) {
@ -41,12 +41,14 @@ export function roomPage (params) {
export function roomListAll (params) { export function roomListAll (params) {
return request({ return request({
url: roomApi.listAllRoom, url: roomApi.listAllRoom,
method: 'post' method: 'post',
data: params
}) })
} }
export function roomListAllBed (params) { export function roomListAllBed (params) {
return request({ return request({
url: roomApi.listAllBed, url: roomApi.listAllBed,
method: 'post' method: 'post',
data: params
}) })
} }

View File

@ -113,7 +113,6 @@ export default {
methods: { methods: {
// //
init () { init () {
console.log(this.arr.length)
const arr = [0] const arr = [0]
if (this.arr.length !== 0) { if (this.arr.length !== 0) {
for (let i = 1; i < (this.arr).length; i++) { for (let i = 1; i < (this.arr).length; i++) {
@ -130,7 +129,6 @@ export default {
return return
} */ } */
this.keysList = this.keysList.filter(item => item !== k) this.keysList = this.keysList.filter(item => item !== k)
console.log(this.keysList)
}, },
// //
addRow () { addRow () {

View File

@ -105,7 +105,6 @@ export default {
return return
} */ } */
this.keysList = this.keysList.filter(item => item !== k) this.keysList = this.keysList.filter(item => item !== k)
console.log(this.keysList)
}, },
// //
addRow () { addRow () {

View File

@ -0,0 +1,109 @@
<template>
<div>
<Echart :options="options" id="bottomLeftChart" height="220px" width="100%" ref="myChart"></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data () {
return {
options: {}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler (newData) {
this.options = {
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
}
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value',
show: false
},
color: [
'#73c0D1',
'#5470c6'
],
textStyle: {
fontSize: 20
},
yAxis: {
type: 'category',
data: ['房间', '床位'],
axisLabel: {
fontSize: 20
}
},
series: [{
name: '入住数',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.cdata.seriesData.map(item => item.value2)
},
{
name: '总数',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.cdata.seriesData.map(item => item.value)
}
]
}
},
immediate: true,
deep: true
}
},
methods: {
},
mounted () {
const myChart = this.$refs['myChart'].chart
//
myChart.on('click', (params) => {
if (params.seriesName == '总数') {
this.$router.push({
path: '/room/list'
})
} else {
this.$router.push({
path: '/room/checkin'
})
}
})
}
}
</script>

View File

@ -0,0 +1,35 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
props: {
roomCountList: {
type: Array,
default: () => ([])
}
},
data () {
return {
cdata: {
xData: this.roomCountList.map(item => item.name),
seriesData: this.roomCountList
}
}
},
components: {
Chart
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -7,7 +7,7 @@
<script> <script>
import Echart from '@/common/echart' import Echart from '@/common/echart'
export default { export default {
data() { data () {
return { return {
options: {} options: {}
} }
@ -23,7 +23,7 @@
}, },
watch: { watch: {
cdata: { cdata: {
handler(newData) { handler (newData) {
this.options = { this.options = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -109,10 +109,10 @@
{ {
name: '集中供养数', name: '集中供养数',
type: 'bar', type: 'bar',
barWidth: 10, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
barBorderRadius: 5, barBorderRadius: 10,
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, offset: 0,
color: '#956FD4' color: '#956FD4'
@ -130,10 +130,10 @@
name: '供养总人数', name: '供养总人数',
type: 'bar', type: 'bar',
barGap: '-100%', barGap: '-100%',
barWidth: 10, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
barBorderRadius: 5, barBorderRadius: 10,
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, offset: 0,
color: 'rgba(156,107,211,0.8)' color: 'rgba(156,107,211,0.8)'
@ -160,29 +160,25 @@
} }
}, },
methods: { methods: {
clickChart() { clickChart () {
console.log(123232)
} }
}, },
mounted() { mounted () {
let myChart = this.$refs["myChart"].chart const myChart = this.$refs['myChart'].chart
console.log(myChart) //
console.log(this.cdata)
//
myChart.getZr().on('click', (params) => { myChart.getZr().on('click', (params) => {
//echartsData // echartsData
if (this.cdata.category.length > 0) { if (this.cdata.category.length > 0) {
const pointInPixel = [params.offsetX, params.offsetY]; const pointInPixel = [params.offsetX, params.offsetY]
// //
let index; let index
if (myChart.containPixel('grid', pointInPixel)) { if (myChart.containPixel('grid', pointInPixel)) {
index = myChart.convertFromPixel({ index = myChart.convertFromPixel({
seriesIndex: 0 seriesIndex: 0
}, [params.offsetX, params.offsetY])[0]; }, [params.offsetX, params.offsetY])[0]
} }
if (index !== undefined) { if (index !== undefined) {
var village = this.cdata.category[index]; var village = this.cdata.category[index]
console.log(village)
this.$router.push({ this.$router.push({
name: 'Console', name: 'Console',
params: { params: {
@ -192,7 +188,7 @@
}) })
} }
} }
}); })
} }
} }
</script> </script>

View File

@ -7,39 +7,21 @@
<script> <script>
import Chart from './chart.vue' import Chart from './chart.vue'
export default { export default {
props: {
villageCountList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.category = this.villageCountList.map(item => ({ value: item.name, id: item.id }));
},
data () { data () {
return { return {
cdata: { cdata: {
category: [ category: [],
{value:'下堡坪村', id:1}, lineData: this.villageCountList.map(item => item.value),
{value:'蛟龙寺村', id:2}, barData: this.villageCountList.map(item => item.value2),
{value:'九山村', id:3},
{value:'马宗岭村', id:4},
{value:'赵勉河村', id:5},
{value:'秀水村', id:6},
{value:'磨坪村', id:7},
{value:'十八湾村', id:8}
],
lineData: [
15,
8,
5,
9,
7,
10,
9,
4
],
barData: [
13,
6,
4,
7,
6,
3,
7,
3
],
rateData: [] rateData: []
} }
} }

View File

@ -7,7 +7,7 @@
<script> <script>
import Echart from '@/common/echart' import Echart from '@/common/echart'
export default { export default {
data() { data () {
return { return {
options: {} options: {}
} }
@ -23,7 +23,7 @@
}, },
watch: { watch: {
cdata: { cdata: {
handler(newData) { handler (newData) {
this.options = { this.options = {
color: [ color: [
'#37a2da', '#37a2da',
@ -41,12 +41,12 @@
legend: { legend: {
orient: 'horizontal', orient: 'horizontal',
icon: 'circle', icon: 'circle',
bottom: 0, bottom: 1,
x: 'center', x: 'center',
data: newData.xData, data: newData.xData,
textStyle: { textStyle: {
color: '#fff', color: '#fff',
"fontSize": 18 'fontSize': 18
} }
}, },
series: [{ series: [{
@ -54,13 +54,13 @@
type: 'pie', type: 'pie',
radius: [20, 100], radius: [20, 100],
roseType: 'area', roseType: 'area',
center: ['50%', '50%'], center: ['50%', '40%'],
data: newData.seriesData, data: newData.seriesData,
label: { label: {
normal: { normal: {
show: false show: false
}, }
}, }
}] }]
} }
}, },
@ -68,18 +68,18 @@
deep: true deep: true
} }
}, },
mounted() { mounted () {
let myChart = this.$refs["myChart2"].chart const myChart = this.$refs['myChart2'].chart
// //
myChart.on('click', (param) => { myChart.on('click', (param) => {
let index; let index
//dataIndex // dataIndex
index = param.dataIndex; index = param.dataIndex
// //
if (index !== undefined) { if (index !== undefined) {
//seriesData // seriesData
if (this.cdata.seriesData[index].value != 0) { if (this.cdata.seriesData[index].value != 0) {
/*跳转路由*/ /* 跳转路由 */
this.$router.push({ this.$router.push({
name: 'Console', name: 'Console',
params: { params: {
@ -88,7 +88,7 @@
}) })
} }
} }
}); })
} }
} }
</script> </script>

View File

@ -7,15 +7,17 @@
<script> <script>
import Chart from './chart.vue' import Chart from './chart.vue'
export default { export default {
props: {
nursingLevelList: {
type: Array,
default: () => ([])
}
},
data () { data () {
return { return {
cdata: { cdata: {
xData: ['一级护理', '二级护理', '三级护理'], xData: this.nursingLevelList.map(item => item.name),
seriesData: [ seriesData: this.nursingLevelList
{ value: 10, name: '一级护理',id: 1 },
{ value: 5, name: '二级护理',id: 2 },
{ value: 15, name: '三级护理',id: 3 }
]
} }
} }
}, },

View File

@ -83,7 +83,6 @@
}, },
mounted() { mounted() {
let myChart = this.$refs["myChart"].chart let myChart = this.$refs["myChart"].chart
console.log(myChart)
// //
myChart.on('click', (param) => { myChart.on('click', (param) => {
let index; let index;

View File

@ -7,14 +7,23 @@
<script> <script>
import Chart from './chart.vue' import Chart from './chart.vue'
export default { export default {
props: {
sexData: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.seriesData = this.sexData.map(item => {
// id
return { ...item, id: item.id.toString() }
})
},
data () { data () {
return { return {
cdata: { cdata: {
xData: ['男', '女'], xData: this.sexData.map(item => item.name),
seriesData: [ seriesData: []
{ value: 42, name: '男', id: "1" },
{ value: 12, name: '女', id: "0" }
]
} }
} }
}, },

View File

@ -74,7 +74,6 @@
}, },
mounted() { mounted() {
let myChart = this.$refs["nlqjChart"].chart let myChart = this.$refs["nlqjChart"].chart
console.log(myChart)
// //
myChart.on('click', (param) => { myChart.on('click', (param) => {
let index; let index;

View File

@ -7,18 +7,23 @@
<script> <script>
import Chart from './chart.vue' import Chart from './chart.vue'
export default { export default {
props: {
ageList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.seriesData = this.ageList.map(item => {
// id
return { ...item, id: item.id.toString() }
})
},
data () { data () {
return { return {
cdata: { cdata: {
xData: ['50岁以下', '50岁-59岁', '60岁-69岁','70岁-79岁','80岁-89岁','90岁以上'], xData: this.ageList.map(item => item.name),
seriesData: [ seriesData: []
{ value: 6, name: '50岁以下', id:'1' },
{ value: 12, name: '50岁-59岁', id:'2' },
{ value: 14, name: '60岁-69岁', id:'3' },
{ value: 21, name: '70岁-79岁', id:'4' },
{ value: 16, name: '80岁-89岁', id:'5' },
{ value: 9, name: '90岁以上', id:'6' },
]
} }
} }
}, },

View File

@ -83,7 +83,6 @@
}, },
mounted() { mounted() {
let myChart = this.$refs["jzfpChart"].chart let myChart = this.$refs["jzfpChart"].chart
console.log(myChart)
// //
myChart.on('click', (param) => { myChart.on('click', (param) => {
let index; let index;

View File

@ -7,14 +7,23 @@
<script> <script>
import Chart from './chart.vue' import Chart from './chart.vue'
export default { export default {
props: {
ifHelpPoorList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.seriesData = this.ifHelpPoorList.map(item => {
// id
return { ...item, id: item.id.toString() }
})
},
data () { data () {
return { return {
cdata: { cdata: {
xData: ['是', '否'], xData: this.ifHelpPoorList.map(item => item.name),
seriesData: [ seriesData: []
{ value: 26, name: '是', id: '1' },
{ value: 11, name: '否', id: '0' }
]
} }
} }
}, },

View File

@ -10,7 +10,7 @@
</div> </div>
</div> </div>
<div> <div>
<BottomLeftChart /> <BottomLeftChart :villageCountList="villageCountList"/>
</div> </div>
</div> </div>
</div> </div>
@ -21,6 +21,12 @@ import BottomLeftChart from '@/components/echart/bottom/bottomLeftChart'
export default { export default {
components: { components: {
BottomLeftChart BottomLeftChart
},
props: {
villageCountList: {
type: Array,
default: () => ([])
}
} }
} }
</script> </script>

View File

@ -1,141 +1,113 @@
<template> <template>
<div id="bottomRight"> <div id="bottomRight">
<div class="bg-color-black" style="cursor:pointer;" @click="jumpPage"> <div class="bg-color-black">
<div class="d-flex pt-2 pl-2"> <div class="d-flex pt-2 pl-2">
<span> <span>
<icon name="align-left" class="text-icon"></icon> <icon name="align-left" class="text-icon"></icon>
</span> </span>
<span class="fs-xl text mx-2" style="font-size: 20px;">入住情况统计</span> <span class="fs-xl text mx-2" style="font-size: 20px;">入住情况统计</span>
</div> </div>
<div class="d-flex ai-center flex-column body-box"> <bottomFj :roomCountList="rzData.roomCountList"/>
<dv-capsule-chart class="dv-cap-chart" :config="config" @click="skipto" />
</div>
<!-- 4个主要的数据 --> <!-- 4个主要的数据 -->
<div class="bottom-data"> <div class="bottom-data">
<div class="item-box mt-2" v-for="(item, index) in numberData" :key="index"> <div class="service-box">
<p class="text" style="text-align: center;"> <div class="service-bag" @click="jumpPage(1)">
<dv-digital-flop class="dv-digital-flop" :config="item.number" /> <div class="service-img"><img alt="" src="@/assets/user_head.png" /></div>
</p> <div class="service-comtemt">
<p class="text"> <div class="servive-title">供养房</div>
{{ item.text }} <div class="service-cont">
<span class="colorYellow" v-if="item.dw">({{ item.dw }})</span> <div class="num">{{ rzData.roomTypeList[0].value }}</div>
</p> <div class="unit"></div>
</div>
</div>
</div>
<div class="service-bag" @click="jumpPage(4)">
<div class="service-img"><img alt="" src="@/assets/user_head.png" /></div>
<div class="service-comtemt">
<div class="servive-title">活动室</div>
<div class="service-cont">
<div class="num">{{ rzData.roomTypeList[3].value }}</div>
<div class="unit"></div>
</div>
</div>
</div>
<div class="service-bag" @click="jumpPage(5)">
<div class="service-img"><img alt="" src="@/assets/user_head.png" /></div>
<div class="service-comtemt">
<div class="servive-title">办公室</div>
<div class="service-cont">
<div class="num">{{ rzData.roomTypeList[4].value }}</div>
<div class="unit"></div>
</div>
</div>
</div>
</div> </div>
<div class="service-box" >
<div class="service-bag" @click="jumpPage(2)">
<div class="service-img"><img alt="" src="@/assets/build.png" /></div>
<div class="service-comtemt">
<div class="servive-title">餐厅</div>
<div class="service-cont">
<div class="num">{{ rzData.roomTypeList[1].value }}</div>
<div class="unit"></div>
</div>
</div>
</div>
<div class="service-bag" @click="jumpPage(3)">
<div class="service-img"><img alt="" src="@/assets/build.png" /></div>
<div class="service-comtemt">
<div class="servive-title">厨房</div>
<div class="service-cont">
<div class="num">{{ rzData.roomTypeList[2].value }}</div>
<div class="unit"></div>
</div>
</div>
</div>
<div class="service-bag">
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import centerRight2Chart1 from '@/components/echart/centerRight/centerRightChart' import bottomFj from '@/components/echart/bottom/bottomFj'
export default { export default {
props: {
rzData: {
type: Object,
default: () => ({})
}
},
components: { components: {
centerRight2Chart1 bottomFj
}, },
data() { data () {
return { return {
config: {
data: [{
name: '供养房',
value: 21
},
{
name: '餐厅',
value: 1
},
{
name: '厨房',
value: 3
},
{
name: '活动室',
value: 1
},
{
name: '办公室',
value: 4
}
],
showValue: true
},
numberData: [{
number: {
number: [22],
toFixed: 0,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 30
}
},
text: '入住房间',
dw: '间'
},
{
number: {
number: [37],
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 30
}
},
text: '供养房间',
dw: '间'
},
{
number: {
number: [52],
toFixed: 0,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 30
}
},
text: '入住床位',
dw: '个'
},
{
number: {
number: [80],
toFixed: 0,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 30
}
},
text: '总床位数',
dw: '个'
},
{},
{
number: {
number: [32.25],
toFixed: 2,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 30
}
},
text: '床位入住率',
dw: '%'
}
]
} }
}, },
methods: { methods: {
skipto(config) { skipto (config) {
console.log('config', config) console.log('config', config)
console.log('ceil', config.ceil) console.log('ceil', config.ceil)
console.log('hang', config.rowIndex) console.log('hang', config.rowIndex)
this.$message.success('查看详情成功,可在控制台查看打印的数据') this.$message.success('查看详情成功,可在控制台查看打印的数据')
}, },
jumpPage() { jumpPage (type) {
this.$router.push({ this.$router.push({
path: '/room/list' name: 'room_bed_mgr',
params: {
roomType: type
}
}) })
} }
} }
@ -174,44 +146,44 @@
} }
} }
.bottom-data { // .bottom-data {
position: absolute; // position: absolute;
top: 270px; // top: 270px;
left: 30px; // left: 30px;
.item-box { // .item-box {
&>div { // &>div {
padding-right: 5px; // padding-right: 5px;
} // }
font-size: 14px; // font-size: 14px;
float: right; // float: right;
position: relative; // position: relative;
width: 50%; // width: 50%;
color: #d3d6dd; // color: #d3d6dd;
.dv-digital-flop { // .dv-digital-flop {
width: 120px; // width: 120px;
height: 30px; // height: 30px;
} // }
// // //
.coin { // .coin {
position: relative; // position: relative;
top: 6px; // top: 6px;
font-size: 20px; // font-size: 20px;
color: #ffc107; // color: #ffc107;
} // }
.colorYellow { // .colorYellow {
color: yellowgreen; // color: yellowgreen;
} // }
/* p { // /* p {
text-align: center; // text-align: center;
} */ // } */
} // }
} // }
::v-deep .label-column { ::v-deep .label-column {
font-size: 18px; font-size: 18px;
@ -222,6 +194,58 @@
::v-deep .dv-capsule-chart .unit-label { ::v-deep .dv-capsule-chart .unit-label {
visibility: hidden; visibility: hidden;
} }
.service-box {
display: flex;
justify-content: flex-start;
.service-bag {
width: 50%;
padding: 20px 5px 0;
display: flex;
justify-content: flex-start;
cursor: pointer;
.service-img {
width: 70px;
height: 70px;
margin-right: 10px;
img {
width: 70px;
height: 70px;
}
}
.service-comtemt {
.servive-title {
color: #c3cbde;
font-size: 20px;
// color: rgba(0, 0, 0, 0.6);
line-height: 20px;
}
.service-cont {
display: flex;
.num {
color: #c3cbde;
font-size: 35px;
// color: rgba(0, 0, 0, 0.8);
line-height: 60px;
font-weight: bold;
}
.unit {
font-size: 13px;
color: #999;
line-height: 75px;
margin-left: 5px;
}
}
}
}
}
</style> </style>
<style> <style>

View File

@ -52,13 +52,21 @@
import CenterChart from '@/components/echart/center/centerChartRate' import CenterChart from '@/components/echart/center/centerChartRate'
export default { export default {
data() { props: {
centerData: {
type: Object,
default: () => ({})
}
},
created () {
},
data () {
return { return {
titleItem: [ titleItem: [
{ {
title: '累计入住数', title: '累计入住数',
number: { number: {
number: [120], number: [this.centerData.countList[0]],
toFixed: 0, toFixed: 0,
textAlign: 'left', textAlign: 'left',
content: '{nt}', content: '{nt}',
@ -70,7 +78,7 @@ export default {
{ {
title: '今年入住数', title: '今年入住数',
number: { number: {
number: [18], number: [this.centerData.countList[1]],
toFixed: 0, toFixed: 0,
textAlign: 'left', textAlign: 'left',
content: '{nt}', content: '{nt}',
@ -82,7 +90,7 @@ export default {
{ {
title: '本月新增数', title: '本月新增数',
number: { number: {
number: [2], number: [this.centerData.countList[2]],
toFixed: 0, toFixed: 0,
textAlign: 'left', textAlign: 'left',
content: '{nt}', content: '{nt}',
@ -94,7 +102,7 @@ export default {
{ {
title: '目前在院数', title: '目前在院数',
number: { number: {
number: [106], number: [this.centerData.countList[3]],
toFixed: 0, toFixed: 0,
textAlign: 'left', textAlign: 'left',
content: '{nt}', content: '{nt}',
@ -106,7 +114,7 @@ export default {
{ {
title: '外出就医数', title: '外出就医数',
number: { number: {
number: [14], number: [this.centerData.countList[4]],
toFixed: 0, toFixed: 0,
textAlign: 'left', textAlign: 'left',
content: '{nt}', content: '{nt}',
@ -116,9 +124,9 @@ export default {
} }
}, },
{ {
title: '今减员数', title: '今减员数',
number: { number: {
number: [1], number: [this.centerData.countList[5]],
toFixed: 0, toFixed: 0,
textAlign: 'left', textAlign: 'left',
content: '{nt}', content: '{nt}',
@ -129,40 +137,7 @@ export default {
} }
], ],
ranking: { ranking: {
data: [ data: this.centerData.villageRankList,
{
name: '下堡坪村',
value: 55
},
{
name: '蛟龙寺村',
value: 120
},
{
name: '九山村',
value: 78
},
{
name: '马宗岭村',
value: 12
},
{
name: '赵勉河村',
value: 32
},
{
name: '秀水村',
value: 16
},
{
name: '磨坪村',
value: 23
},
{
name: '十八湾村',
value: 32
}
],
carousel: 'single', carousel: 'single',
unit: '人' unit: '人'
}, },
@ -176,7 +151,7 @@ export default {
rate: [ rate: [
{ {
id: 'centerRate1', id: 'centerRate1',
tips: 60, tips: this.centerData.jzgyRate,
colorData: { colorData: {
textStyle: '#3fc0fb', textStyle: '#3fc0fb',
series: { series: {
@ -190,7 +165,7 @@ export default {
}, },
{ {
id: 'centerRate2', id: 'centerRate2',
tips: 40, tips: this.centerData.fsgyRate,
colorData: { colorData: {
textStyle: '#67e0e3', textStyle: '#67e0e3',
series: { series: {
@ -209,7 +184,7 @@ export default {
CenterChart CenterChart
}, },
methods: { methods: {
jumpPage() { jumpPage () {
this.$router.push({ this.$router.push({
path: '/room/checkin' path: '/room/checkin'
}) })

View File

@ -11,7 +11,7 @@
</div> </div>
</div> </div>
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<CenterLeft1Chart /> <CenterLeft1Chart :nursingLevelList="nursingLevelList" />
</div> </div>
</div> </div>
</div> </div>
@ -28,6 +28,12 @@ export default {
components: { components: {
CenterLeft1Chart CenterLeft1Chart
}, },
props: {
nursingLevelList: {
type: Array,
default: () => ([])
}
},
mounted () { mounted () {
}, },
methods: { methods: {

View File

@ -1,256 +1,276 @@
<template> <template>
<div> <div>
<scale-box :width="1920" :height="1080" bgc="transparent" :delay="100"> <scale-box :width="1920" :height="1080" bgc="transparent" :delay="100">
<div id="index" ref="appRef" :key="componentKey"> <div id="index" ref="appRef" :key="componentKey">
<div class="bg"> <div class="bg">
<dv-loading v-if="loading">Loading...</dv-loading> <dv-loading v-if="loading">Loading...</dv-loading>
<div v-else class="host-body"> <div v-else class="host-body">
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<dv-decoration-10 class="dv-dec-10" /> <dv-decoration-10 class="dv-dec-10" />
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<dv-decoration-8 class="dv-dec-8" :color="decorationColor" /> <dv-decoration-8 class="dv-dec-8" :color="decorationColor" />
<div class="title" @click="handleWelcome" style="cursor: pointer;"> <div class="title" @click="handleWelcome" style="cursor: pointer;">
<span class="title-text" style="display: inline-block;width: 100%;line-height: 2;"> <span class="title-text" style="display: inline-block;width: 100%;line-height: 2;">
下堡坪乡农村福利院长者管理系统 下堡坪乡农村福利院长者管理系统
</span> </span>
<dv-decoration-6 <dv-decoration-6 class="dv-dec-6" :reverse="true" :color="['#50e3c2', '#67a1e5']" />
class="dv-dec-6" </div>
:reverse="true" <dv-decoration-8 class="dv-dec-8" :reverse="true" :color="decorationColor" />
:color="['#50e3c2', '#67a1e5']" </div>
/> <dv-decoration-10 class="dv-dec-10-s" />
</div> </div>
<dv-decoration-8
class="dv-dec-8"
:reverse="true"
:color="decorationColor"
/>
</div>
<dv-decoration-10 class="dv-dec-10-s" />
</div>
<!-- 第二行 --> <!-- 第二行 -->
<div class="d-flex jc-between px-2"> <div class="d-flex jc-between px-2">
<div class="d-flex aside-width"> <div class="d-flex aside-width">
<!-- <div class="react-left ml-4 react-l-s"> <div class="react-left ml-3 fw-b" style="background-color: #1a5cd7;">
<span class="react-left"></span> <span class="text">数据统计</span>
<span class="text">数据分析1</span> </div>
</div> --> <div class="react-left ml-3 sx">
<div class="react-left ml-3 fw-b" style="background-color: #1a5cd7;"> <span class="text" @click="jumpPage(1)">数据查询</span>
<span class="text">数据统计</span> </div>
<div class="react-left ml-3 sx">
<span class="text" @click="jumpPage(2)">荣誉展示</span>
</div>
</div>
<div class="d-flex aside-width">
<div class="react-right mr-3 react-l-s sx" style="width: 250px;">
<span class="text " @click="jumpPage(3)">实时监控</span>
</div>
<div class="react-right mr-3 react-l-s sx" style="width: 250px;">
<span class="text " @click="jumpPage(4)">健康预警</span>
</div>
<div class="react-right mr-4 react-l-s" style="width: 380px;">
<span class="react-after"></span>
<span class="text">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
</div>
</div>
</div> </div>
<div class="react-left ml-3 sx">
<span class="text" @click="jumpPage(1)">数据查询</span>
</div>
<div class="react-left ml-3 sx">
<span class="text" @click="jumpPage(2)">荣誉展示</span>
</div>
</div>
<!-- <div class="d-flex aside-width">
<div class="react-right mr-3">
<span class="text fw-b">数据统计</span>
</div>
<div class="react-right mr-4 react-l-s">
<span class="react-after"></span>
<span class="text"
>{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span
>
</div>
</div> -->
<div class="d-flex aside-width">
<div class="react-right mr-3 react-l-s sx" style="width: 250px;">
<span class="text " @click="jumpPage(3)">实时监控</span>
</div>
<div class="react-right mr-3 react-l-s sx" style="width: 250px;">
<span class="text " @click="jumpPage(4)">健康预警</span>
</div>
<div class="react-right mr-4 react-l-s" style="width: 380px;">
<span class="react-after"></span>
<span
class="text"
>{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span
>
</div>
</div>
</div>
<div class="body-box"> <div class="body-box">
<!-- 第三行数据 --> <!-- 第三行数据 -->
<div class="content-box"> <div class="content-box">
<div> <div>
<dv-border-box-12> <dv-border-box-12>
<xb /> <xb :sexData="mapData.sexList" />
</dv-border-box-12> </dv-border-box-12>
</div> </div>
<div> <div>
<dv-border-box-12> <dv-border-box-12>
<nltj /> <nltj :ageList="mapData.ageList" />
</dv-border-box-12> </dv-border-box-12>
</div> </div>
<!-- 中间 --> <!-- 中间 -->
<div> <div>
<center /> <center :centerData="mapData.centerData" />
</div> </div>
<!-- 中间 --> <!-- 中间 -->
<div> <div>
<dv-border-box-12> <dv-border-box-12>
<hldj /> <hldj :nursingLevelList="mapData.nursingLevelList" />
</dv-border-box-12> </dv-border-box-12>
</div> </div>
<div> <div>
<dv-border-box-12> <dv-border-box-12>
<jzfp /> <jzfp :ifHelpPoorList="mapData.ifHelpPoorList" />
</dv-border-box-12> </dv-border-box-12>
</div> </div>
</div> </div>
<!-- 第四行数据 --> <!-- 第四行数据 -->
<div class="bottom-box"> <div class="bottom-box">
<dv-border-box-13> <dv-border-box-13>
<bottomRight /> <bottomRight :rzData="mapData.rzData" />
</dv-border-box-13> </dv-border-box-13>
<dv-border-box-12> <dv-border-box-12>
<bottomLeft /> <bottomLeft :villageCountList="mapData.villageCountList"/>
</dv-border-box-12> </dv-border-box-12>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </scale-box>
</div> </div>
</scale-box>
</div>
</template> </template>
<script> <script>
import drawMixin from '../../utils/drawMixin' import drawMixin from '../../utils/drawMixin'
import useDraw from '@/utils/useDraw' import useDraw from '@/utils/useDraw'
import { formatTime } from '../../utils/index.js' import {
import hldj from './hldj' formatTime
import xb from './xb' } from '../../utils/index.js'
import jzfp from './jzfp' import hldj from './hldj'
import nltj from './nltj' import xb from './xb'
import center from './center' import jzfp from './jzfp'
import bottomLeft from './bottomLeft' import nltj from './nltj'
import bottomRight from './bottomRight' import center from './center'
import ScaleBox from "vue2-scale-box"; import bottomLeft from './bottomLeft'
import bottomRight from './bottomRight'
import ScaleBox from 'vue2-scale-box'
export default { import {
mixins: [ drawMixin ], dataStatistics
data () { } from '@/api/data/data'
return {
timing: null,
loading: true,
dateDay: null,
dateYear: null,
dateWeek: null,
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
decorationColor: ['#568aea', '#000000'],
componentKey: 0
}
},
components: {
ScaleBox,
hldj,
xb,
jzfp,
nltj,
center,
bottomLeft,
bottomRight
},
mounted () {
this.timeFn()
this.cancelLoading()
const { calcRate, windowDraw, unWindowDraw } = useDraw(this.$refs.appRef); export default {
mixins: [drawMixin],
// useDraw data () {
windowDraw(); return {
console.log(111) timing: null,
calcRate(); loading: true,
console.log(222) dateDay: null,
this.componentKey += 1 dateYear: null,
console.log(333) dateWeek: null,
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
// this.fullscreenCheck() decorationColor: ['#568aea', '#000000'],
}, componentKey: 0,
beforeDestroy () { mapData: {
clearInterval(this.timing) sexList: [],
ageList: [],
const { unWindowDraw } = useDraw(); nursingLevelList: [],
unWindowDraw(); ifHelpPoorList: [],
}, centerData: {
methods: { countList: [],
timeFn () { jzgyRate: null,
this.timing = setInterval(() => { fsgyRate: null,
this.dateDay = formatTime(new Date(), 'HH: mm: ss') villageRankList: []
this.dateYear = formatTime(new Date(), 'yyyy-MM-dd') },
this.dateWeek = this.weekday[new Date().getDay()] rzData: {
}, 1000) roomTypeList: [],
}, roomCountList: []
cancelLoading () { },
setTimeout(() => { villageCountList: []
this.loading = false
}, 500)
},
handleWelcome () {
this.$router.push({
path: '/welcome'
})
},
fullscreenCheck() {
if (!document.fullscreenElement &&
!document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) { // current working methods
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
}
else {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} }
} }
}, },
jumpPage(type) { components: {
if (type==1){ ScaleBox,
hldj,
xb,
jzfp,
nltj,
center,
bottomLeft,
bottomRight
},
mounted () {
this.timeFn()
this.cancelLoading()
const {
calcRate,
windowDraw,
unWindowDraw
} = useDraw(this.$refs.appRef)
// useDraw
windowDraw()
calcRate()
this.componentKey += 1
},
beforeDestroy () {
clearInterval(this.timing)
const {
unWindowDraw
} = useDraw()
unWindowDraw()
},
// -
created () {
this.getDataAll()
},
methods: {
getDataAll () {
dataStatistics().then((res) => {
if (res.code == 200) {
console.log(res.data)
this.mapData = res.data
this.addCenterData()
this.mapData.centerData.countList.push(this.mapData.ljrzCount)
this.mapData.centerData.countList.push(this.mapData.jnrzCount)
this.mapData.centerData.countList.push(this.mapData.byxzCount)
this.mapData.centerData.countList.push(this.mapData.mqzyCount)
this.mapData.centerData.countList.push(this.mapData.wcjyCount)
this.mapData.centerData.countList.push(this.mapData.jnjyCount)
this.mapData.centerData.jzgyRate = this.mapData.jzgyRate
this.mapData.centerData.fsgyRate = this.mapData.fsgyRate
this.mapData.centerData.villageRankList = this.mapData.villageRankList
this.mapData.rzData.roomTypeList = this.mapData.roomTypeList
this.mapData.rzData.roomCountList = this.mapData.roomCountList
} else {
this.$message.error('数据加载失败')
}
})
},
addCenterData () {
const centerData = {
countList: [],
jzgyRate: null,
fsgyRate: null,
villageRankList: []
}
const rzData = {
roomTypeList: [],
roomCountList: []
}
this.$set(this.mapData, 'centerData', centerData)
this.$set(this.mapData, 'rzData', rzData)
},
timeFn () {
this.timing = setInterval(() => {
this.dateDay = formatTime(new Date(), 'HH: mm: ss')
this.dateYear = formatTime(new Date(), 'yyyy-MM-dd')
this.dateWeek = this.weekday[new Date().getDay()]
}, 1000)
},
cancelLoading () {
setTimeout(() => {
this.loading = false
}, 500)
},
handleWelcome () {
this.$router.push({ this.$router.push({
path: '/welcome' path: '/welcome'
}) })
} else if (type==2) { },
this.$router.push({ jumpPage (type) {
path: '/honor/show' if (type == 1) {
}) this.$router.push({
} else if (type==3) { path: '/welcome'
this.$router.push({ })
path: '/aqld_bjcl' } else if (type == 2) {
}) this.$router.push({
} else if (type==4) { path: '/honor/show'
this.$router.push({ })
path: '/aqld_jkjc' } else if (type == 3) {
}) this.$router.push({
path: '/aqld_bjcl'
})
} else if (type == 4) {
this.$router.push({
path: '/aqld_jkjc'
})
}
} }
}
}
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../assets/scss/index.scss'; @import '../../assets/scss/index.scss';
body {
body {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.sx :hover{cursor:pointer;}
.sx :hover {
cursor: pointer;
}
</style> </style>

View File

@ -11,7 +11,7 @@
</div> </div>
</div> </div>
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<CenterRight2Chart /> <CenterRight2Chart :ifHelpPoorList="ifHelpPoorList"/>
</div> </div>
</div> </div>
</div> </div>
@ -22,6 +22,12 @@ import CenterRight2Chart from '@/components/echart/centerRight/centerRight2Chart
export default { export default {
components: { components: {
CenterRight2Chart CenterRight2Chart
},
props: {
ifHelpPoorList: {
type: Array,
default: () => ([])
}
} }
} }
</script> </script>

View File

@ -6,12 +6,12 @@
<icon name="chart-bar" class="text-icon"></icon> <icon name="chart-bar" class="text-icon"></icon>
</span> </span>
<div class="d-flex"> <div class="d-flex">
<span class="fs-xl text mx-2">是否在院</span> <span class="fs-xl text mx-2">年龄</span>
<dv-decoration-3 class="dv-dec-3" /> <dv-decoration-3 class="dv-dec-3" />
</div> </div>
</div> </div>
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<CenterRight1Chart /> <CenterRight1Chart :ageList="ageList" />
</div> </div>
</div> </div>
</div> </div>
@ -27,6 +27,12 @@ export default {
components: { components: {
CenterRight1Chart CenterRight1Chart
}, },
props: {
ageList: {
type: Array,
default: () => ([])
}
},
mounted () { mounted () {
}, },
methods: { methods: {

View File

@ -11,19 +11,30 @@
</div> </div>
</div> </div>
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<CenterLeft2Chart /> <CenterLeft2Chart :sexData="sexData"/>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import CenterLeft2Chart from "@/components/echart/centerLeft/centerLeft2Chart"; import CenterLeft2Chart from '@/components/echart/centerLeft/centerLeft2Chart'
export default { export default {
components: { components: {
CenterLeft2Chart CenterLeft2Chart
}, },
}; props: {
sexData: {
type: Array,
default: () => ([])
}
},
methods: {
},
mounted () {
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -74,6 +74,9 @@
</a-col> </a-col>
</a-row> </a-row>
<a-space class="table-operator" direction="horizontal">
<a-button type="primary" @click="goback" >返回</a-button>
</a-space>
</a-form> </a-form>
<s-table ref="table" :columns="columns" :data="loadData" :rowKey="(record) => record.id"> <s-table ref="table" :columns="columns" :data="loadData" :rowKey="(record) => record.id">
<template slot="bringTime" slot-scope="text, record"> <template slot="bringTime" slot-scope="text, record">
@ -236,7 +239,10 @@
}).then(res => { }).then(res => {
this.supportTypeData = res.data this.supportTypeData = res.data
}) })
} },
goback () {
this.$router.back()
}
} }
} }
</script> </script>

View File

@ -115,6 +115,7 @@
editDetail () { editDetail () {
const id = this.$route.query.id const id = this.$route.query.id
if (!id) { if (!id) {
this.dataLoaded = true
return return
} }
roomDetail({ roomDetail({

View File

@ -31,6 +31,13 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row>
<a-col :span="12">
<a-form-model-item ref="checkInTime" label="入住时间" prop="checkInTime">
<a-date-picker v-model="form.checkInTime" :format="'YYYY-MM-DD'" valueFormat="YYYY-MM-DD" placeholder="入住时间" />
</a-form-model-item>
</a-col>
</a-row>
<a-row> <a-row>
<a-col> <a-col>
@ -88,6 +95,7 @@
personName: '', personName: '',
roomId: null, roomId: null,
bedId: null, bedId: null,
checkInTime: null,
remark: '' remark: ''
}, },
rules: { rules: {
@ -177,7 +185,7 @@
this.form.personName = personData.name this.form.personName = personData.name
}, },
initRoom () { initRoom () {
roomListAll().then((res) => { roomListAll({ roomType: 1 }).then((res) => {
console.log(res) console.log(res)
this.roomList = res.data this.roomList = res.data
}) })

View File

@ -65,7 +65,7 @@ export default {
data () { data () {
return { return {
// //
queryParam: { name: '', roomType:'' }, queryParam: { name: '', roomType:this.$route.params.roomType },
roomTypeData: [], roomTypeData: [],
// //
columns: [ columns: [