Browse Source

2023.7.17

nanMing 1 year ago
parent
commit
65313f82e0

+ 1 - 1
ruoyi-ui/.env.development

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 养老服务信息系统
+VUE_APP_TITLE = 吉林养老服务信息系统
 
 # 开发环境配置
 ENV = 'development'

+ 1 - 1
ruoyi-ui/.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 养老服务信息系统
+VUE_APP_TITLE = 吉林养老服务信息系统
 
 # 生产环境配置
 ENV = 'production'

BIN
ruoyi-ui/src/assets/images/ylz1.png


+ 95 - 50
ruoyi-ui/src/views/bigScreen/resources/components/Oldman.vue

@@ -3,19 +3,25 @@
 		<div class="card">
 			<h5 class="c-tit">老人数量</h5>
 			<div class="total">
-				总数:<count-to :start-val="0" :end-val="34092" :duration="duration" />人
+				总数:
+				<count-to :start-val="0" :end-val="+oldmanInfo.data1" :duration="duration" />
+				人
 			</div>
 			<div class="flex">
 				<div class="f-item">
 					<img src="@/assets/images/sjhome/img_09.png" alt="">
 					<p class="gender">
-						男:<count-to :start-val="0" :end-val="5086" :duration="duration" />人
+						男:
+						<count-to :start-val="0" :end-val="+oldmanInfo.data2" :duration="duration" />
+						人
 					</p>
 				</div>
 				<div class="f-item">
 					<img src="@/assets/images/sjhome/img_08.png" alt="">
 					<p class="gender">
-						女:<count-to :start-val="0" :end-val="26316" :duration="duration" />人
+						女:
+						<count-to :start-val="0" :end-val="+oldmanInfo.data3" :duration="duration" />
+						人
 					</p>
 				</div>
 			</div>
@@ -24,14 +30,22 @@
 			<h5 class="c-tit">老人分类</h5>
 			<div class="flex">
 				<div class="f-item1">
-					<div class="percent">7%</div>
+					<div class="percent">
+						<count-to :start-val="0" :end-val="percent(oldmanInfo.data4,oldmanInfo.data1)" :duration="duration" suffix="%" />
+					</div>
 					<p>入住机构老人</p>
-					<p><count-to :start-val="0" :end-val="2550" :duration="duration" /></p>
+					<p>
+						<count-to :start-val="0" :end-val="+oldmanInfo.data4" :duration="duration" />
+					</p>
 				</div>
 				<div class="f-item1">
-					<div class="percent">92%</div>
+					<div class="percent">
+						<count-to :start-val="0" :end-val="percent(oldmanInfo.data5,oldmanInfo.data1)" :duration="duration" suffix="%" />
+					</div>
 					<p>居家老人</p>
-					<p><count-to :start-val="0" :end-val="31532" :duration="duration" /></p>
+					<p>
+						<count-to :start-val="0" :end-val="+oldmanInfo.data5" :duration="duration" />
+					</p>
 				</div>
 			</div>
 		</div>
@@ -43,28 +57,68 @@
 </template>
 
 <script>
+import { mapState } from 'vuex'
+import { getstatisticaldata } from '@/api/system/dict/type'
+
 export default {
 	name: 'Oldman',
 	data() {
 		return {
-			duration:2000,    // 数字滚动时间
+			duration: 2000,    // 数字滚动时间
 			ageChart: null,
 			queryParams: {
-				dictType: 'DP004',
+				dictType: 'DP005',
 				para2: null    // 区划ID locationCode
 			},
+			oldmanInfo: {
+				data1: 0,
+				data2: 0,
+				data3: 0,
+				data4: 0,
+				data5: 0
+			},
+			oldmanAgeList: {}
 		}
 	},
-	mounted() {
-		this.$nextTick(() => {
-			this.echartsInit()
-		})
+	computed: {
+		...mapState(['user'])
+	},
+	created() {
+		this.queryParams.para2 = this.user.userData.dept.locationCode
+		this.getInfoList()
+		this.getAgeList()
 	},
 	methods: {
-		echartsInit() {
+		echartsInit(source) {
+			let vales = source.vales[0], xAisData = [], seriesData = [['男'], ['女']]
+			source.keys.forEach((item, idx) => {
+				item.label = item.label.replace('男', '')
+				item.label = item.label.replace('女', '')
+				if (idx % 2 === 0) {
+					seriesData[0].push(vales[item.prop])
+				} else {
+					seriesData[1].push(vales[item.prop])
+					xAisData.push(item.label)
+				}
+			})
+			console.log(seriesData)
 			this.ageChart = this.$echarts.init(document.getElementById('echarts'), 'dark')
+
+			const seriresTemp = {
+				type: 'bar',
+				barMaxWidth: '30%',
+				// name: '男',
+				// data: [10086, 9000, 6000, 2569, 1006],
+				colorBy: 'series',
+				label: {
+					show: true,
+					position: 'top',
+					color: '#fff'
+				}
+			}
 			this.ageChart.setOption({
 				title: {},
+				color: ['#1f48cb', '#d52abe', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'],
 				grid: {
 					left: 10,
 					right: 10,
@@ -89,48 +143,39 @@ export default {
 					nameTextStyle: {
 						color: '#36a3f7'
 					},
-					data: ['60+老人', '70+老人', '80+老人', '90+老人', '100+老人']
+					data: xAisData
 				},
 				yAxis: {
 					axisLine: {
 						show: true
 					}
 				},
-				series: [
-					{
-						type: 'bar',
-						name: '男',
-						data: [10086, 9000, 6000, 2569, 1006],
-						barMaxWidth: '30%',
-						label: {
-							show: true,
-							position: 'top',
-							color: '#fff'
-						},
-						itemStyle: {
-							color: '#36a3f7'
-						}
-					},
-					{
-						type: 'bar',
-						name: '女',
-						data: [11201, 6504, 5412, 1250, 1005],
-						barMaxWidth: '30%',
-						label: {
-							show: true,
-							position: 'top',
-							color: '#fff'
-						},
-						itemStyle: {
-							color: '#ff00d2'
-						}
-					}
-				]
-				// dataset: {
-				// 	dimensions: this.dimensions,
-				// 	source: data
-				// }
+				series: seriesData.map((item, i) => {
+					let name = item.splice(0,1)
+					return { ...seriresTemp, name: name[0], data: item }
+				})
 			})
+		},
+		async getInfoList() {
+			this.queryParams.dictType = 'DP005'
+			const retdata = await getstatisticaldata(this.queryParams)
+			if (retdata.code === 200) {
+				const data = this.$DBRetToObjA(retdata.data)
+				this.oldmanInfo = data[0].vales[0]
+			}
+		},
+		async getAgeList() {
+			this.queryParams.dictType = 'DP006'
+			const retdata = await getstatisticaldata(this.queryParams)
+			if (retdata.code === 200) {
+				const data = this.$DBRetToObjA(retdata.data)
+				this.oldmanAgeList = data[0]
+				this.echartsInit(this.oldmanAgeList)
+			}
+		},
+		percent(a, b) {
+			if (a === 0 && b === 0) return 0
+			return parseInt((a / b * 100).toFixed())
 		}
 	}
 }
@@ -140,7 +185,7 @@ export default {
 @import "@/assets/styles/bigScreen";
 
 #echarts {
-	height: 300px;
+	height: 200px;
 	width: 100%;
 }
 </style>

+ 3 - 5
ruoyi-ui/src/views/bigScreen/resources/components/Organization.vue

@@ -166,7 +166,6 @@
 <script>
 import { getstatisticaldata } from '@/api/system/dict/type'
 import { mapState } from 'vuex'
-import loading from 'element-ui/packages/loading'
 
 export default {
 	name: 'Organization',
@@ -220,7 +219,7 @@ export default {
 		this.getProductList()
 	},
 	methods: {
-		echartsInit(sourceData) {
+		echartsInit(source) {
 			this.orgChart = this.$echarts.init(document.getElementById('echarts'), 'dark')
 			this.orgChart.setOption({
 				title: {},
@@ -259,7 +258,7 @@ export default {
 					{
 						type: 'bar',
 						// name: '男',
-						data: [sourceData.data8, sourceData.data9, sourceData.data10, sourceData.data11, sourceData.data12, sourceData.data13],
+						data: [source.data8, source.data9, source.data10, source.data11, source.data12, source.data13],
 						barMaxWidth: '30%',
 						label: {
 							show: true,
@@ -286,7 +285,6 @@ export default {
 			const retdata = await getstatisticaldata(this.queryParams)
 			if (retdata.code === 200) {
 				const data = this.$DBRetToObjA(retdata.data)
-				console.log(data)
 				this.sqyljgObj = data[0].vales[0]
 			}
 		},
@@ -339,7 +337,7 @@ export default {
 }
 
 #echarts {
-	height: 300px;
+	height: 200px;
 	width: 100%;
 }
 </style>

+ 102 - 36
ruoyi-ui/src/views/bigScreen/resources/components/Service.vue

@@ -2,21 +2,33 @@
 	<div class="service-info">
 		<div class="card">
 			<h5 class="c-tit">为老服务商</h5>
-			<div class="total">总数:<span>34092</span>家</div>
-			<div id="echarts"></div>
+			<div class="total">总数:
+				<count-to :start-val="0" :end-val="+serviceObj.data1" :duration="duration" />
+				家
+			</div>
+			<div id="echarts1"></div>
 		</div>
 		<div class="card">
 			<h5 class="c-tit">为老服务产品</h5>
-			<div class="total">总计: <span>15</span>类<span>3452</span>个</div>
-			<div id="echarts1"></div>
+			<div class="total">总计:
+				<count-to :start-val="0" :end-val="+productObj.data1" :duration="duration" />
+				类
+				<count-to :start-val="0" :end-val="+productObj.data2" :duration="duration" />
+				个
+			</div>
+			<div id="echarts2"></div>
 			<div class="flex product">
 				<div class="f-item1">
 					<div class="percent">成交笔数</div>
-					<p>2550笔</p>
+					<p>
+						<count-to :start-val="0" :end-val="+productObj.data3" :duration="duration" suffix="笔" />
+					</p>
 				</div>
 				<div class="f-item1">
 					<div class="percent">交易金额</div>
-					<p>2514650元</p>
+					<p>
+						<count-to :start-val="0" :end-val="+productObj.data4" :duration="duration" suffix="元" />
+					</p>
 				</div>
 			</div>
 		</div>
@@ -24,29 +36,74 @@
 </template>
 
 <script>
+import { getstatisticaldata } from '@/api/system/dict/type'
+import { mapState } from 'vuex'
+
 export default {
 	name: 'Service',
 	data() {
 		return {
-			serviceChart: null
+			duration: 2000,    // 数字滚动时间
+			serviceChart: null,
+			queryParams: {
+				dictType: 'DP001',
+				para2: null    // 区划ID locationCode
+			},
+			serviceList: [],
+			productList: [],
+			productObj: {
+				data1: 0,
+				data2: 0,
+				data3: 0,
+				data4: 0
+			},
+			serviceObj: { data1: 0 }
 		}
 	},
-	mounted() {
-		this.$nextTick(() => {
-			this.echartsInit()
-		})
+	computed: {
+		...mapState(['user'])
+	},
+	created() {
+		this.queryParams.para2 = this.user.userData.dept.locationCode
+		this.getProductList()
+		this.getServiceList()
 	},
 	methods: {
-		echartsInit() {
-			let serviceChart = this.$echarts.init(document.getElementById('echarts'), 'dark')
-			let productChart = this.$echarts.init(document.getElementById('echarts1'), 'dark')
-			const options = {
+		echartsInit(divId, source) {
+			let vales = source.vales[0], xAisData = [], seriesData = [['男'], ['女']]
+			source.keys.forEach((item, idx) => {
+				item.label = item.label.replace('男', '')
+				item.label = item.label.replace('女', '')
+				if (idx % 2 === 0) {
+					seriesData[0].push(vales[item.prop])
+				} else {
+					seriesData[1].push(vales[item.prop])
+					xAisData.push(item.label)
+				}
+			})
+			console.log(seriesData)
+			this.ageChart = this.$echarts.init(document.getElementById(divId), 'dark')
+
+			const seriresTemp = {
+				type: 'bar',
+				barMaxWidth: '30%',
+				// name: '男',
+				// data: [10086, 9000, 6000, 2569, 1006],
+				colorBy: 'series',
+				label: {
+					show: true,
+					position: 'top',
+					color: '#fff'
+				}
+			}
+			this.ageChart.setOption({
 				title: {},
+				color: ['#1f48cb', '#d52abe', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'],
 				grid: {
 					left: 10,
 					right: 10,
 					bottom: 10,
-					top: 20,
+					top: 40,
 					containLabel: true
 				},
 				legend: {},
@@ -66,31 +123,40 @@ export default {
 					nameTextStyle: {
 						color: '#36a3f7'
 					},
-					data: ['60+老人', '70+老人', '80+老人', '90+老人', '100+老人']
+					data: xAisData
 				},
 				yAxis: {
 					axisLine: {
 						show: true
 					}
 				},
-				series: [
-					{
-						type: 'bar',
-						data: [10086, 9000, 6000, 2569, 1006],
-						barMaxWidth: '30%',
-						label: {
-							show: true,
-							position: 'top',
-							color: '#fff'
-						},
-						itemStyle: {
-							color: '#36a3f7'
-						}
-					},
-				]
+				series: seriesData.map((item, i) => {
+					let name = item.splice(0, 1)
+					return { ...seriresTemp, name: name[0], data: item }
+				})
+			})
+		},
+		async getServiceList() {
+			this.queryParams.dictType = 'DP007'
+			const retdata = await getstatisticaldata(this.queryParams)
+			if (retdata.code === 200) {
+				const data = this.$DBRetToObjA(retdata.data)
+				console.log(data)
+				this.serviceList = data[0]
+				this.serviceObj = data[0].vales[0]
+				this.echartsInit('echarts1', this.serviceList)
+			}
+		},
+		async getProductList() {
+			this.queryParams.dictType = 'DP003'
+			const retdata = await getstatisticaldata(this.queryParams)
+			if (retdata.code === 200) {
+				const data = this.$DBRetToObjA(retdata.data)
+				console.log('getProductList', data)
+				this.productList = data[0]
+				this.productObj = data[0].vales[0]
+				this.echartsInit('echarts2', this.productList)
 			}
-			serviceChart.setOption(options)
-			productChart.setOption(options)
 		}
 	}
 }
@@ -128,8 +194,8 @@ export default {
 	}
 }
 
-#echarts,#echarts1 {
-	height: 300px;
+#echarts, #echarts1 {
+	height: 200px;
 	width: 100%;
 }
 </style>

+ 0 - 1
ruoyi-ui/src/views/bigScreen/resources/index.vue

@@ -176,7 +176,6 @@ export default {
 			const retdata = await getstatisticaldata(this.queryParams)
 			if (retdata.code === 200) {
 				const data = this.$DBRetToObjA(retdata.data)
-				console.log(data)
 				this.totalObj = data[0].vales[0]
 			}
 		},

+ 2 - 2
ruoyi-ui/src/views/login.vue

@@ -4,8 +4,8 @@
     <div class="login">
       <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
         <div class="logo-box">
-          <img class="logo" src="../assets/images/login-logo1.png"> <img class="title-font"
-            src="../assets/images/ylz.png">
+          <img class="logo" style="width: 60px" src="../assets/images/login-logo1.png"> <img style="width: 440px" class="title-font"
+            src="../assets/images/ylz1.png">
         </div>
         <!-- <h3 class="title">养老服务信息系统</h3> -->
         <el-form-item prop="username" class="item">

+ 1 - 1
ruoyi-web/index.html

@@ -5,7 +5,7 @@
   <link rel="icon" href="/logo.png" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <!--<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">-->
-  <title>养老服务平台</title>
+  <title>吉林养老服务</title>
   <!--<script type="text/javascript" src="/flexible.js"></script>-->
   <script>
     window._AMapSecurityConfig = {

BIN
ruoyi-web/src/assets/images/logoT.png