This commit is contained in:
duanxiaohai 2024-10-21 09:11:43 +08:00
commit 70674ccfc8
9 changed files with 2833 additions and 290 deletions

1829
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,8 @@
"echarts-liquidfill": "^3.1.0", "echarts-liquidfill": "^3.1.0",
"element-plus": "^2.7.0", "element-plus": "^2.7.0",
"gdt-jsapi": "^1.9.51", "gdt-jsapi": "^1.9.51",
"pinia": "^2.2.4",
"pinia-plugin-persistedstate": "^4.1.1",
"sass": "^1.60.0", "sass": "^1.60.0",
"video.js": "^8.17.3", "video.js": "^8.17.3",
"videojs-contrib-hls": "^5.15.0", "videojs-contrib-hls": "^5.15.0",

View File

@ -7,6 +7,14 @@ import ElementPlus from "element-plus";
import "element-plus/dist/index.css"; import "element-plus/dist/index.css";
import "./assets/css/common.css"; import "./assets/css/common.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs"; import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// import {
// createPinia
// } from "pinia";
// //下面两行为持久化
// import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// const pinia = createPinia();
// pinia.use(piniaPluginPersistedstate);
// 引入 vConsole // 引入 vConsole
// import VConsole from "vconsole"; // import VConsole from "vconsole";

16
src/stores/index.js Normal file
View File

@ -0,0 +1,16 @@
/* eslint-disable no-case-declarations */
import { defineStore } from "pinia";
export const useStore = defineStore("useStore", {
// 需要pinia持久化处
state: () => {
return {
url:""
};
},
//设置持久化
persist: true ,//持久化开启 或者下面配置
actions: {
},
});

View File

@ -2,7 +2,6 @@ import axios from "axios";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import router from "../router"; import router from "../router";
axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
axios.defaults.timeout = 120000; axios.defaults.timeout = 120000;
@ -38,6 +37,8 @@ axios.interceptors.response.use(
const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;"; document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
} }
let backurl=window.location.href;
tools.data.set("backUrl",backurl);
router.replace({ router.replace({
path: "/guide", path: "/guide",
}); });

View File

@ -137,6 +137,7 @@ const getCookie = (cname) => {
}; };
// //
const login = () => { const login = () => {
let backurl=tools.data.get("backUrl");
dd.getAuthCode() dd.getAuthCode()
.then((res) => { .then((res) => {
// let auth__code = env == "pc" ? res.auth_code : res.code; // let auth__code = env == "pc" ? res.auth_code : res.code;
@ -150,6 +151,10 @@ const login = () => {
// var token = getCookie("lytoken"); // var token = getCookie("lytoken");
tools.data.set("token", response.data); tools.data.set("token", response.data);
tools.data.set("type", 1); tools.data.set("type", 1);
if (backurl) {
window.location.href= backurl;
tools.data.remove("backUrl");
}
} else { } else {
// //
router.push({ router.push({
@ -197,12 +202,17 @@ const login = () => {
// console.log("Decrypted Text:", decodedText); // console.log("Decrypted Text:", decodedText);
var tokenU = decodedText; var tokenU = decodedText;
if (getCookie("lytoken")) { if (getCookie("lytoken")) {
} else { } else {
document.cookie = `lytoken=${tokenU}`; document.cookie = `lytoken=${tokenU}`;
} }
var token = getCookie("lytoken"); var token = getCookie("lytoken");
tools.data.set("token", token); tools.data.set("token", token);
tools.data.set("type", 2); tools.data.set("type", 2);
if (backurl) {
window.location.href= backurl;
tools.data.remove("backUrl");
}
} else { } else {
var tokenPd = getCookie("lytoken"); var tokenPd = getCookie("lytoken");
if (!tokenPd) { if (!tokenPd) {

View File

@ -505,7 +505,7 @@ const tableType = reactive({
property: "zrks", property: "zrks",
}, },
{ {
label: "负责人", label: "负责人/联系人",
property: "ywfzr", property: "ywfzr",
}, },
{ {

View File

@ -2951,7 +2951,7 @@ const createZyys = (polygon, indexx, name, tooltip) => {
} else { } else {
zyysCenter.length = 0; zyysCenter.length = 0;
zyysDk.length = 0; zyysDk.length = 0;
await get_dk_zyys(polygon.fgfwrs,polygon.lb); await get_dk_zyys(polygon.fgfwrs,polygon.lb,polygon.ssly);
xr_dk_center_zyys(); xr_dk_center_zyys();
} }
@ -3003,7 +3003,7 @@ const loadCs_zyys = async (name) => {
} }
} }
}; };
const get_dk_zyys = async (sj,xd) => { const get_dk_zyys = async (sj,xd,ssly) => {
zyys_dk.value.length = 0; zyys_dk.value.length = 0;
zyys_center.value.length = 0; zyys_center.value.length = 0;
zyys_data.value.point.length = 0; zyys_data.value.point.length = 0;
@ -3034,6 +3034,7 @@ const get_dk_zyys = async (sj,xd) => {
num: item.num, num: item.num,
town: item.town, town: item.town,
committee: item.committee, committee: item.committee,
ssly: ssly,
xd: xd, xd: xd,
}; };
zyys_data.value.center.push(b); zyys_data.value.center.push(b);
@ -3143,7 +3144,14 @@ const Xr_zyysNum = (polygon, indexx) => {
tableType.columns = table_column_list.zxs; tableType.columns = table_column_list.zxs;
zyys_table.town = polygon.town; zyys_table.town = polygon.town;
zyys_table.committee = polygon.committee; zyys_table.committee = polygon.committee;
console.log(222222222,polygon);
if(polygon.ssly=="教育"){
zyys_table.xd = polygon.xd; zyys_table.xd = polygon.xd;
}else{
zyys_table.xd = "";
}
open_detail_zyys(); open_detail_zyys();
}); });
}; };

1239
yarn.lock

File diff suppressed because it is too large Load Diff