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', url: '/home/education',
}, },
{ {
name: "就业救助", name: "救助",
url: '/home/work', url: '/home/work',
}, },
{ {

View File

@ -30,16 +30,24 @@
/> />
</span> </span>
</div> </div>
<ePie v-if="leftchoose.first == '1'" :list='data.medicalInsurance.ffrc' :year='data.medicalInsurance.year'></ePie> <ePie
<ePie2 v-else :list='data.medicalInsurance.ffje' :year='data.medicalInsurance.year'></ePie2> 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>
<div class="flex1" style="margin-top: 10px"> <div class="flex1" style="margin-top: 10px">
<div class="yd_title left_3"></div> <div class="yd_title left_3"></div>
<div class="sm_title_1"></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> <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> </div>
<div class="displayFlex center_bg"> <div class="displayFlex center_bg">
@ -96,7 +104,7 @@
<div class="yd_title familyPlanning"></div> <div class="yd_title familyPlanning"></div>
<!-- 计划生育 --> <!-- 计划生育 -->
<!-- <div style="width: 100%; "> --> <!-- <div style="width: 100%; "> -->
<eP5 :list='data.jsbgl'></eP5> <eP5 :list="data.jsbgl"></eP5>
<!-- </div> --> <!-- </div> -->
</div> </div>
</div> </div>
@ -118,12 +126,12 @@
</div> </div>
<div class="flex1" style="flex: 1.1"> <div class="flex1" style="flex: 1.1">
<div class="yd_title service"></div> <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>
<div class="flex1"> <div class="flex1">
<div class="yd_title last"></div> <div class="yd_title last"></div>
<div class="table"> <div class="table">
<div class="item" v-for="item in data.jkhd"> <div class="scrollTable" v-for="item in data.jkhd">
{{ item.jkhd }} {{ item.jkhd }}
</div> </div>
</div> </div>
@ -162,11 +170,66 @@ const data = reactive({
jsbgl: [], // jsbgl: [], //
fyglrs: {}, // fyglrs: {}, //
jktj: {}, //65 jktj: {}, //65
jkhd:[],// jkhd: [
}) { jkhd: "11111111111111" },
{ jkhd: "11111111111111" },
{ jkhd: "11111111111111" },
{ jkhd: "11111111111111" },
], //
});
onBeforeMount(async () => { onBeforeMount(async () => {
getData(); 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 () => { const getData = async () => {
await http.get("/api/ggfwyth/health").then((res) => { await http.get("/api/ggfwyth/health").then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -825,7 +888,7 @@ const getData = async () => {
overflow-y: auto; overflow-y: auto;
.item { .scrollTable {
width: 98%; width: 98%;
box-sizing: border-box; box-sizing: border-box;
margin-top: 10px; margin-top: 10px;
@ -837,18 +900,18 @@ const getData = async () => {
} }
} }
/* 滚动条整体部分 */ /* 滚动条整体部分 */
.table::-webkit-scrollbar { .scrollTable::-webkit-scrollbar {
width: 5px; width: 5px;
// height: 10px; // height: 10px;
} }
/* 滚动槽 */ /* 滚动槽 */
.table::-webkit-scrollbar-track { .scrollTable::-webkit-scrollbar-track {
border-radius: 1px; border-radius: 1px;
background: rgba(41, 157, 255, 0.56); background: rgba(41, 157, 255, 0.56);
-webkit-box-shadow: inset 0 0 6px rgba(139, 139, 139, 0.3); -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; background-clip: content-box;
border-radius: 6px; border-radius: 6px;
background: rgba(41, 157, 255, 1); background: rgba(41, 157, 255, 1);

View File

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

View File

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