Merge branch 'main' of git.zdool.com:xs/ggfwjsc
This commit is contained in:
commit
c7f55e8444
|
@ -1,4 +1,6 @@
|
|||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import http from "@/utils/request.js";
|
||||
import tools from '@/utils/tools'
|
||||
|
||||
const routerHistory = createWebHashHistory();
|
||||
|
||||
|
@ -49,23 +51,45 @@ const router = createRouter({
|
|||
})
|
||||
|
||||
function getCookie(cname) {
|
||||
var name = cname + '='
|
||||
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)
|
||||
var cn = cname
|
||||
console.log('cname',cname)
|
||||
const cookies = document.cookie.split('; ');
|
||||
console.log('cookies',cookies)
|
||||
for (let i = 0; i < cookies.length; i++) {
|
||||
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) => {
|
||||
// var token = getCookie('lytoken')
|
||||
// console.log('token',token)
|
||||
// if (token == '') {
|
||||
// window.location.href =
|
||||
// 'http://220.191.238.50:996/api/login?returnURL=' +
|
||||
// window.location.href
|
||||
// } else {
|
||||
// // 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();
|
||||
// }
|
||||
// })
|
||||
|
|
|
@ -109,7 +109,7 @@ const getOption = () => {
|
|||
],
|
||||
series: [
|
||||
{
|
||||
name: "职工医疗保险发放人次",
|
||||
name: "精神病健康居家在册管理人数",
|
||||
type: "bar",
|
||||
data: data.rs,
|
||||
barWidth: 20,
|
||||
|
|
|
@ -164,11 +164,11 @@ const data = reactive({
|
|||
jktj:{},//65岁健康体检
|
||||
jkhd:[],//健康活动
|
||||
})
|
||||
onBeforeMount(() => {
|
||||
onBeforeMount( async () => {
|
||||
getData();
|
||||
});
|
||||
const getData = () => {
|
||||
http.get("/api/ggfwyth/health").then((res) => {
|
||||
const getData = async () => {
|
||||
await http.get("/api/ggfwyth/health").then((res) => {
|
||||
if (res.code == 200) {
|
||||
data.medicalInsurance = res.data.medicalInsurance;
|
||||
data.lmb = res.data.lmb;
|
||||
|
|
|
@ -255,12 +255,12 @@ const data = reactive({
|
|||
zccs1: [],
|
||||
zccs2: [],
|
||||
});
|
||||
onBeforeMount(() => {
|
||||
onBeforeMount(async () => {
|
||||
getData();
|
||||
});
|
||||
|
||||
const getData = () => {
|
||||
http.get("/api/ggfwyth/yl").then((res) => {
|
||||
const getData = async () => {
|
||||
await http.get("/api/ggfwyth/yl").then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 养老保险
|
||||
// 人次
|
||||
|
|
Loading…
Reference in New Issue