This commit is contained in:
duanxiaohai 2024-05-22 14:47:17 +08:00
parent 72a4c695a1
commit ac880111fc
4 changed files with 127 additions and 58 deletions

View File

@ -77,7 +77,7 @@ const data = reactive({
url: '/home/education',
},
{
name: "就业救助",
name: "救助",
url: '/home/work',
},
{

View File

@ -30,16 +30,24 @@
/>
</span>
</div>
<ePie v-if="leftchoose.first == '1'" :list='data.medicalInsurance.ffrc' :year='data.medicalInsurance.year'></ePie>
<ePie2 v-else :list='data.medicalInsurance.ffje' :year='data.medicalInsurance.year'></ePie2>
<ePie
v-if="leftchoose.first == '1'"
:list="data.medicalInsurance.ffrc"
:year="data.medicalInsurance.year"
></ePie>
<ePie2
v-else
:list="data.medicalInsurance.ffje"
:year="data.medicalInsurance.year"
></ePie2>
</div>
<div class="flex1" style="margin-top: 10px">
<div class="yd_title left_3"></div>
<div class="sm_title_1"></div>
<tnb :list='data.lmb.tnbrs' :year='data.lmb.year'></tnb>
<tnb :list="data.lmb.tnbrs" :year="data.lmb.year"></tnb>
<div class="sm_title_2"></div>
<gxy :list='data.lmb.gxyrs' :year='data.lmb.year'></gxy>
<gxy :list="data.lmb.gxyrs" :year="data.lmb.year"></gxy>
</div>
</div>
<div class="displayFlex center_bg">
@ -51,7 +59,7 @@
<div class="right">
<div class="right_top">门急诊人次</div>
<img src="@/assets/images/hygiene/jt.png" class="right_center" />
<div class="right_bottom">{{data.mz.mjzrc}}</div>
<div class="right_bottom">{{ data.mz.mjzrc }}</div>
</div>
</div>
<div class="item">
@ -59,7 +67,7 @@
<div class="right">
<div class="right_top">住院人数</div>
<img src="@/assets/images/hygiene/jt.png" class="right_center" />
<div class="right_bottom">{{data.mz.zyrs}}</div>
<div class="right_bottom">{{ data.mz.zyrs }}</div>
</div>
</div>
</div>
@ -96,7 +104,7 @@
<div class="yd_title familyPlanning"></div>
<!-- 计划生育 -->
<!-- <div style="width: 100%; "> -->
<eP5 :list='data.jsbgl'></eP5>
<eP5 :list="data.jsbgl"></eP5>
<!-- </div> -->
</div>
</div>
@ -105,12 +113,12 @@
<div class="yd_title mechanism"></div>
<div class="history">
<div class="history1">
<div class="va">{{data.fyglrs.ycfrc}}</div>
<div class="va">{{ data.fyglrs.ycfrc }}</div>
<img src="@/assets/images/hygiene/yf.png" alt="" />
<div class="historyimg">孕产妇系统管理人数</div>
</div>
<div class="history1">
<div class="va">{{data.fyglrs.etrs}}</div>
<div class="va">{{ data.fyglrs.etrs }}</div>
<img src="@/assets/images/hygiene/et.png" alt="" />
<div class="historyimg">0-6岁儿童系统管理人数</div>
</div>
@ -118,13 +126,13 @@
</div>
<div class="flex1" style="flex: 1.1">
<div class="yd_title service"></div>
<eP7 :list='data.jktj.jktjrs' :year='data.jktj.year'></eP7>
<eP7 :list="data.jktj.jktjrs" :year="data.jktj.year"></eP7>
</div>
<div class="flex1">
<div class="yd_title last"></div>
<div class="table">
<div class="item" v-for="item in data.jkhd">
{{item.jkhd }}
<div class="scrollTable" v-for="item in data.jkhd">
{{ item.jkhd }}
</div>
</div>
</div>
@ -144,7 +152,7 @@ import eP4 from "./echarts_hygiene/eP4.vue";
import eP4_1 from "./echarts_hygiene/eP4_1.vue";
import tnb from "./echarts_hygiene/tnb.vue";
import gxy from "./echarts_hygiene/gxy.vue";
import { ref,reactive, onMounted, onBeforeMount } from "vue";
import { ref, reactive, onMounted, onBeforeMount } from "vue";
import http from "@/utils/request.js";
const leftchoose = ref({
first: "1",
@ -155,18 +163,73 @@ const change = (name, index) => {
leftchoose.value[name] = index;
};
const data = reactive({
medicalInsurance:{},//
lmb:{},//
mz:{},//
jkda:[],//
jsbgl:[],//
fyglrs:{},//
jktj:{},//65
jkhd:[],//
})
onBeforeMount( async () => {
getData();
medicalInsurance: {}, //
lmb: {}, //
mz: {}, //
jkda: [], //
jsbgl: [], //
fyglrs: {}, //
jktj: {}, //65
jkhd: [
{ jkhd: "11111111111111" },
{ jkhd: "11111111111111" },
{ jkhd: "11111111111111" },
{ jkhd: "11111111111111" },
], //
});
onBeforeMount(async () => {
getData();
autoScroll(`.scrollTable`);
});
/**
* 滚动条自动滚动
* @param { string } tBodyName 容器选择器
* @param { number } delay 定时器多久触发一次 默认100ms
* @param { object } object 返回值 可以控制是否滚动
*/
const autoScroll = (tBodyName, delay = 50) => {
const tBody = document.querySelector(`${tBodyName}`);
let control = {
isScroll: true, //
isSelect: false, //
};
console.log(tBodyName,tBody,666);
// tBody.addEventListener("mousemove", () => {
// control.isScroll = false;
// });
// tBody.addEventListener("mouseleave", () => {
// control.isScroll = true;
// });
// let timer = null;
// setInterval(() => {
// const scrollHeight = tBody.scrollHeight;
// const clientHeight = tBody.clientHeight;
// if (
// Math.abs(tBody.scrollTop + clientHeight - scrollHeight) <= 5 &&
// !control.isSelect
// ) {
// if (timer != null) {
// return;
// }
// timer = setTimeout(() => {
// tBody.scrollTop = 0;
// timer = null;
// }, 1000);
// } else {
// if (control.isScroll && !control.isSelect) {
// tBody.scrollTop += 1;
// }
// }
// console.log(
// "===============>",
// tBody.scrollTop,
// scrollHeight,
// clientHeight
// );
// }, delay);
// return control;
};
const getData = async () => {
await http.get("/api/ggfwyth/health").then((res) => {
if (res.code == 200) {
@ -825,7 +888,7 @@ const getData = async () => {
overflow-y: auto;
.item {
.scrollTable {
width: 98%;
box-sizing: border-box;
margin-top: 10px;
@ -837,18 +900,18 @@ const getData = async () => {
}
}
/* 滚动条整体部分 */
.table::-webkit-scrollbar {
.scrollTable::-webkit-scrollbar {
width: 5px;
// height: 10px;
}
/* 滚动槽 */
.table::-webkit-scrollbar-track {
.scrollTable::-webkit-scrollbar-track {
border-radius: 1px;
background: rgba(41, 157, 255, 0.56);
-webkit-box-shadow: inset 0 0 6px rgba(139, 139, 139, 0.3);
}
/* 滚动条滑块样式 */
.table::-webkit-scrollbar-thumb {
.scrollTable::-webkit-scrollbar-thumb {
background-clip: content-box;
border-radius: 6px;
background: rgba(41, 157, 255, 1);

View File

@ -11,15 +11,15 @@
<div class="item_content">
<div class="sr">
<span class="left">收入</span
><span class="right">{{
data.LivelihoodWelfare.zgylbxzsr
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.zgylbxzsr }}万元</span
>
</div>
<div class="sr" style="margin-top: 5px">
<span class="left">支出</span
><span class="right">{{
data.LivelihoodWelfare.zgylbxzzc
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.zgylbxzzc }}万元</span
>
</div>
</div>
</div>
@ -34,7 +34,9 @@
</div>
<div class="sr" style="margin-top: 5px">
<span class="left">支出</span
><span class="right">{{ data.LivelihoodWelfare.gsbxzzc }}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.gsbxzzc }}万元</span
>
</div>
</div>
</div>
@ -45,15 +47,15 @@
<div class="item_content">
<div class="sr">
<span class="left">收入</span
><span class="right">{{
data.LivelihoodWelfare.cxylbxzsr
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.cxylbxzsr }}万元</span
>
</div>
<div class="sr" style="margin-top: 5px">
<span class="left">支出</span
><span class="right">{{
data.LivelihoodWelfare.cxylbxzzc
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.cxylbxzzc }}万元</span
>
</div>
</div>
</div>
@ -64,15 +66,15 @@
<div class="item_content">
<div class="sr">
<span class="left">收入</span
><span class="right">{{
data.LivelihoodWelfare.zgyilbxzsr
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.zgyilbxzsr }}万元</span
>
</div>
<div class="sr" style="margin-top: 5px">
<span class="left">支出</span
><span class="right">{{
data.LivelihoodWelfare.zgyilbxzzc
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.zgyilbxzzc }}万元</span
>
</div>
</div>
</div>
@ -83,15 +85,15 @@
<div class="item_content">
<div class="sr">
<span class="left">收入</span
><span class="right">{{
data.LivelihoodWelfare.cxyilbxzsr
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.cxyilbxzsr }}万元</span
>
</div>
<div class="sr" style="margin-top: 5px">
<span class="left">支出</span
><span class="right">{{
data.LivelihoodWelfare.cxyilbxzzc
}}万元</span>
><span class="right"
>{{ data.LivelihoodWelfare.cxyilbxzzc }}万元</span
>
</div>
</div>
</div>
@ -117,11 +119,11 @@
</div>
<div class="item teacher">
<div class="shang">教师</div>
<div class="xia">{{ data.education.xszs }}</div>
<div class="xia">{{ data.education.jzgzs }}</div>
</div>
<div class="item student">
<div class="shang">学生</div>
<div class="xia">{{ data.education.jzgzs }}</div>
<div class="xia">{{ data.education.xszs }}</div>
</div>
</div>
<div class="left_2_bottom">
@ -748,6 +750,10 @@ const getData = async () => {
"nf",
];
if (data.LivelihoodWelfare) {
const value = res.data.msfz[key];
// if (value !== undefined) {
// data.LivelihoodWelfare[key] = (value / 10000).toFixed(2);
// }
msfzKeys.forEach((key) => {
data.LivelihoodWelfare[key] = (res.data.msfz[key] / 10000).toFixed(2) ;
});

View File

@ -15,8 +15,8 @@ export default defineConfig({
// 第一个代理
"/api": {
// 匹配到啥来进行方向代理
// target: "http://192.168.2.42:8095/", //本地
target: "http://220.191.238.50:996/", //线上
target: "http://192.168.2.42:8095/", //本地
// target: "http://220.191.238.50:996/", //线上
changeOrigin: true, //是否支持跨域
//rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个
},