数据统计联调接口

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'
const dataApi = {
orgStatistics: 'data/orgStatistics',
personalStatistics: 'data/personalStatistics',
classHourTop: 'data/personalStatistics/classHourTop'
statistics: 'data/statistics'
}
export function dataOrgStatistics (params) {
export function dataStatistics () {
return request({
url: dataApi.orgStatistics,
method: 'get',
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
url: dataApi.statistics,
method: 'post'
})
}

View File

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

View File

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

View File

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

View File

@ -7,39 +7,21 @@
<script>
import Chart from './chart.vue'
export default {
props: {
villageCountList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.category = this.villageCountList.map(item => ({ value: item.name, id: item.id }));
},
data () {
return {
cdata: {
category: [
{value:'下堡坪村', id:1},
{value:'蛟龙寺村', id:2},
{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
],
category: [],
lineData: this.villageCountList.map(item => item.value),
barData: this.villageCountList.map(item => item.value2),
rateData: []
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,18 +7,23 @@
<script>
import Chart from './chart.vue'
export default {
props: {
ageList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.seriesData = this.ageList.map(item => {
// id
return { ...item, id: item.id.toString() }
})
},
data () {
return {
cdata: {
xData: ['50岁以下', '50岁-59岁', '60岁-69岁','70岁-79岁','80岁-89岁','90岁以上'],
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' },
]
xData: this.ageList.map(item => item.name),
seriesData: []
}
}
},

View File

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

View File

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

View File

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

View File

@ -1,141 +1,113 @@
<template>
<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">
<span>
<icon name="align-left" class="text-icon"></icon>
</span>
<span class="fs-xl text mx-2" style="font-size: 20px;">入住情况统计</span>
</div>
<div class="d-flex ai-center flex-column body-box">
<dv-capsule-chart class="dv-cap-chart" :config="config" @click="skipto" />
</div>
<bottomFj :roomCountList="rzData.roomCountList"/>
<!-- 4个主要的数据 -->
<div class="bottom-data">
<div class="item-box mt-2" v-for="(item, index) in numberData" :key="index">
<p class="text" style="text-align: center;">
<dv-digital-flop class="dv-digital-flop" :config="item.number" />
</p>
<p class="text">
{{ item.text }}
<span class="colorYellow" v-if="item.dw">({{ item.dw }})</span>
</p>
<div class="service-box">
<div class="service-bag" @click="jumpPage(1)">
<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[0].value }}</div>
<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 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>
</template>
<script>
import centerRight2Chart1 from '@/components/echart/centerRight/centerRightChart'
import bottomFj from '@/components/echart/bottom/bottomFj'
export default {
props: {
rzData: {
type: Object,
default: () => ({})
}
},
components: {
centerRight2Chart1
bottomFj
},
data() {
data () {
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: {
skipto(config) {
skipto (config) {
console.log('config', config)
console.log('ceil', config.ceil)
console.log('hang', config.rowIndex)
this.$message.success('查看详情成功,可在控制台查看打印的数据')
},
jumpPage() {
jumpPage (type) {
this.$router.push({
path: '/room/list'
name: 'room_bed_mgr',
params: {
roomType: type
}
})
}
}
@ -174,44 +146,44 @@
}
}
.bottom-data {
position: absolute;
top: 270px;
left: 30px;
// .bottom-data {
// position: absolute;
// top: 270px;
// left: 30px;
.item-box {
&>div {
padding-right: 5px;
}
// .item-box {
// &>div {
// padding-right: 5px;
// }
font-size: 14px;
float: right;
position: relative;
width: 50%;
color: #d3d6dd;
// font-size: 14px;
// float: right;
// position: relative;
// width: 50%;
// color: #d3d6dd;
.dv-digital-flop {
width: 120px;
height: 30px;
}
// .dv-digital-flop {
// width: 120px;
// height: 30px;
// }
//
.coin {
position: relative;
top: 6px;
font-size: 20px;
color: #ffc107;
}
// //
// .coin {
// position: relative;
// top: 6px;
// font-size: 20px;
// color: #ffc107;
// }
.colorYellow {
color: yellowgreen;
}
// .colorYellow {
// color: yellowgreen;
// }
/* p {
text-align: center;
} */
}
}
// /* p {
// text-align: center;
// } */
// }
// }
::v-deep .label-column {
font-size: 18px;
@ -222,6 +194,58 @@
::v-deep .dv-capsule-chart .unit-label {
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>

View File

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

View File

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

View File

@ -1,256 +1,276 @@
<template>
<div>
<scale-box :width="1920" :height="1080" bgc="transparent" :delay="100">
<div id="index" ref="appRef" :key="componentKey">
<div class="bg">
<dv-loading v-if="loading">Loading...</dv-loading>
<div v-else class="host-body">
<div class="d-flex jc-center">
<dv-decoration-10 class="dv-dec-10" />
<div class="d-flex jc-center">
<dv-decoration-8 class="dv-dec-8" :color="decorationColor" />
<div class="title" @click="handleWelcome" style="cursor: pointer;">
<span class="title-text" style="display: inline-block;width: 100%;line-height: 2;">
下堡坪乡农村福利院长者管理系统
</span>
<dv-decoration-6
class="dv-dec-6"
:reverse="true"
:color="['#50e3c2', '#67a1e5']"
/>
<scale-box :width="1920" :height="1080" bgc="transparent" :delay="100">
<div id="index" ref="appRef" :key="componentKey">
<div class="bg">
<dv-loading v-if="loading">Loading...</dv-loading>
<div v-else class="host-body">
<div class="d-flex jc-center">
<dv-decoration-10 class="dv-dec-10" />
<div class="d-flex jc-center">
<dv-decoration-8 class="dv-dec-8" :color="decorationColor" />
<div class="title" @click="handleWelcome" style="cursor: pointer;">
<span class="title-text" style="display: inline-block;width: 100%;line-height: 2;">
下堡坪乡农村福利院长者管理系统
</span>
<dv-decoration-6 class="dv-dec-6" :reverse="true" :color="['#50e3c2', '#67a1e5']" />
</div>
<dv-decoration-8 class="dv-dec-8" :reverse="true" :color="decorationColor" />
</div>
<dv-decoration-10 class="dv-dec-10-s" />
</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 aside-width">
<!-- <div class="react-left ml-4 react-l-s">
<span class="react-left"></span>
<span class="text">数据分析1</span>
</div> -->
<div class="react-left ml-3 fw-b" style="background-color: #1a5cd7;">
<span class="text">数据统计</span>
<!-- 第二行 -->
<div class="d-flex jc-between px-2">
<div class="d-flex aside-width">
<div class="react-left ml-3 fw-b" style="background-color: #1a5cd7;">
<span class="text">数据统计</span>
</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 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="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="content-box">
<div>
<dv-border-box-12>
<xb />
</dv-border-box-12>
</div>
<div>
<dv-border-box-12>
<nltj />
</dv-border-box-12>
</div>
<!-- 中间 -->
<div>
<center />
</div>
<!-- 中间 -->
<div>
<dv-border-box-12>
<hldj />
</dv-border-box-12>
</div>
<div>
<dv-border-box-12>
<jzfp />
</dv-border-box-12>
</div>
</div>
<div class="body-box">
<!-- 第三行数据 -->
<div class="content-box">
<div>
<dv-border-box-12>
<xb :sexData="mapData.sexList" />
</dv-border-box-12>
</div>
<div>
<dv-border-box-12>
<nltj :ageList="mapData.ageList" />
</dv-border-box-12>
</div>
<!-- 中间 -->
<div>
<center :centerData="mapData.centerData" />
</div>
<!-- 中间 -->
<div>
<dv-border-box-12>
<hldj :nursingLevelList="mapData.nursingLevelList" />
</dv-border-box-12>
</div>
<div>
<dv-border-box-12>
<jzfp :ifHelpPoorList="mapData.ifHelpPoorList" />
</dv-border-box-12>
</div>
</div>
<!-- 第四行数据 -->
<div class="bottom-box">
<dv-border-box-13>
<bottomRight />
</dv-border-box-13>
<dv-border-box-12>
<bottomLeft />
</dv-border-box-12>
<!-- 第四行数据 -->
<div class="bottom-box">
<dv-border-box-13>
<bottomRight :rzData="mapData.rzData" />
</dv-border-box-13>
<dv-border-box-12>
<bottomLeft :villageCountList="mapData.villageCountList"/>
</dv-border-box-12>
</div>
</div>
</div>
</div>
</div>
</div>
</scale-box>
</div>
</scale-box>
</div>
</template>
<script>
import drawMixin from '../../utils/drawMixin'
import useDraw from '@/utils/useDraw'
import { formatTime } from '../../utils/index.js'
import hldj from './hldj'
import xb from './xb'
import jzfp from './jzfp'
import nltj from './nltj'
import center from './center'
import bottomLeft from './bottomLeft'
import bottomRight from './bottomRight'
import ScaleBox from "vue2-scale-box";
import drawMixin from '../../utils/drawMixin'
import useDraw from '@/utils/useDraw'
import {
formatTime
} from '../../utils/index.js'
import hldj from './hldj'
import xb from './xb'
import jzfp from './jzfp'
import nltj from './nltj'
import center from './center'
import bottomLeft from './bottomLeft'
import bottomRight from './bottomRight'
import ScaleBox from 'vue2-scale-box'
export default {
mixins: [ drawMixin ],
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()
import {
dataStatistics
} from '@/api/data/data'
const { calcRate, windowDraw, unWindowDraw } = useDraw(this.$refs.appRef);
// useDraw
windowDraw();
console.log(111)
calcRate();
console.log(222)
this.componentKey += 1
console.log(333)
// this.fullscreenCheck()
},
beforeDestroy () {
clearInterval(this.timing)
const { unWindowDraw } = useDraw();
unWindowDraw();
},
methods: {
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({
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();
export default {
mixins: [drawMixin],
data () {
return {
timing: null,
loading: true,
dateDay: null,
dateYear: null,
dateWeek: null,
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
decorationColor: ['#568aea', '#000000'],
componentKey: 0,
mapData: {
sexList: [],
ageList: [],
nursingLevelList: [],
ifHelpPoorList: [],
centerData: {
countList: [],
jzgyRate: null,
fsgyRate: null,
villageRankList: []
},
rzData: {
roomTypeList: [],
roomCountList: []
},
villageCountList: []
}
}
},
jumpPage(type) {
if (type==1){
components: {
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({
path: '/welcome'
})
} else if (type==2) {
this.$router.push({
path: '/honor/show'
})
} else if (type==3) {
this.$router.push({
path: '/aqld_bjcl'
})
} else if (type==4) {
this.$router.push({
path: '/aqld_jkjc'
})
},
jumpPage (type) {
if (type == 1) {
this.$router.push({
path: '/welcome'
})
} else if (type == 2) {
this.$router.push({
path: '/honor/show'
})
} else if (type == 3) {
this.$router.push({
path: '/aqld_bjcl'
})
} else if (type == 4) {
this.$router.push({
path: '/aqld_jkjc'
})
}
}
}
}
}
}
</script>
<style lang="scss" scoped>
@import '../../assets/scss/index.scss';
body {
@import '../../assets/scss/index.scss';
body {
margin: 0;
padding: 0;
}
.sx :hover{cursor:pointer;}
}
.sx :hover {
cursor: pointer;
}
</style>

View File

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

View File

@ -6,12 +6,12 @@
<icon name="chart-bar" class="text-icon"></icon>
</span>
<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" />
</div>
</div>
<div class="d-flex jc-center">
<CenterRight1Chart />
<CenterRight1Chart :ageList="ageList" />
</div>
</div>
</div>
@ -27,6 +27,12 @@ export default {
components: {
CenterRight1Chart
},
props: {
ageList: {
type: Array,
default: () => ([])
}
},
mounted () {
},
methods: {

View File

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

View File

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

View File

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

View File

@ -31,6 +31,13 @@
</a-form-model-item>
</a-col>
</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-col>
@ -88,6 +95,7 @@
personName: '',
roomId: null,
bedId: null,
checkInTime: null,
remark: ''
},
rules: {
@ -177,7 +185,7 @@
this.form.personName = personData.name
},
initRoom () {
roomListAll().then((res) => {
roomListAll({ roomType: 1 }).then((res) => {
console.log(res)
this.roomList = res.data
})

View File

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