Merge branch 'main' of git.zdool.com:xs/ggfwjsc

This commit is contained in:
duanxiaohai 2024-05-15 14:48:52 +08:00
commit c7f55e8444
4 changed files with 40 additions and 16 deletions

View File

@ -1,4 +1,6 @@
import { createRouter, createWebHashHistory } from 'vue-router' import { createRouter, createWebHashHistory } from 'vue-router'
import http from "@/utils/request.js";
import tools from '@/utils/tools'
const routerHistory = createWebHashHistory(); const routerHistory = createWebHashHistory();
@ -49,24 +51,46 @@ const router = createRouter({
}) })
function getCookie(cname) { function getCookie(cname) {
var name = cname + '=' var cn = cname
var ca = document.cookie.split(';') console.log('cname',cname)
for (var i = 0; i < ca.length; i++) { const cookies = document.cookie.split('; ');
var c = ca[i].trim() console.log('cookies',cookies)
if (c.indexOf(name) == 0) for (let i = 0; i < cookies.length; i++) {
return c.substring(name.length, c.length) const [name, value] = cookies[i].split('=');
if (name === cn) {
return value;
}
} }
return '' return null;
// var ca = document.cookie.split(';')
// for (var i = 0; i < ca.length; i++) {
// var c = ca[i].trim()
// if (c.indexOf(name) == 0)
// return c.substring(name.length, c.length)
// }
// return ''
} }
// router.beforeEach((to, form, next) => { // router.beforeEach((to, form, next) => {
// var token = getCookie('lytoken') // var token = getCookie('lytoken')
// console.log('token',token)
// if (token == '') { // if (token == '') {
// window.location.href = // window.location.href =
// 'http://220.191.238.50:996/api/login?returnURL=' + // 'http://220.191.238.50:996/api/login?returnURL=' +
// window.location.href // window.location.href
// }else { // } else {
// next(); // // http.get("/api/zzdn_event/auditToken?token=" + token).then((res) => {
// // if (res.code == '500') {
// // window.location.href =
// // 'http://220.191.238.50:996/api/login?returnURL=' +
// // window.location.href
// // } else {
// // tools.data.set('token',token)
// // next();
// // }
// // });
// tools.data.set('token',token)
// next();
// } // }
// }) // })

View File

@ -109,7 +109,7 @@ const getOption = () => {
], ],
series: [ series: [
{ {
name: "职工医疗保险发放人次", name: "精神病健康居家在册管理人数",
type: "bar", type: "bar",
data: data.rs, data: data.rs,
barWidth: 20, barWidth: 20,

View File

@ -164,11 +164,11 @@ const data = reactive({
jktj:{},//65 jktj:{},//65
jkhd:[],// jkhd:[],//
}) })
onBeforeMount(() => { onBeforeMount( async () => {
getData(); getData();
}); });
const getData = () => { const getData = async () => {
http.get("/api/ggfwyth/health").then((res) => { await http.get("/api/ggfwyth/health").then((res) => {
if (res.code == 200) { if (res.code == 200) {
data.medicalInsurance = res.data.medicalInsurance; data.medicalInsurance = res.data.medicalInsurance;
data.lmb = res.data.lmb; data.lmb = res.data.lmb;

View File

@ -255,12 +255,12 @@ const data = reactive({
zccs1: [], zccs1: [],
zccs2: [], zccs2: [],
}); });
onBeforeMount(() => { onBeforeMount(async () => {
getData(); getData();
}); });
const getData = () => { const getData = async () => {
http.get("/api/ggfwyth/yl").then((res) => { await http.get("/api/ggfwyth/yl").then((res) => {
if (res.code == 200) { if (res.code == 200) {
// //
// //