字典和名称

zhangtao
laozt 1 year ago
parent 503aa881cd
commit 57a5ad55e3

@ -10,16 +10,16 @@ ENV = 'production'
VUE_APP_BASE_API = 'http://180.108.205.123:13002'
n
# 统一登录-内网
VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-内网
VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 统一登录-外网
# VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 退出登录-外网
# VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -36,9 +36,7 @@
<div>
<div class="avatar"></div>
<div class="header-text">
<span
>{{ dept.deptName }}&nbsp;&nbsp;&nbsp;&nbsp;{{ username }}
</span>
<span>{{ userName }}</span>
<i class="el-icon-caret-bottom" v-if="!avatarFlag"></i>
<i class="el-icon-caret-top" v-if="avatarFlag"></i>
</div>
@ -107,6 +105,17 @@ export default {
};
},
methods: {
mounted() {
const isGovernmentAffairsNetwork = localStorage.getItem(
"isGovernmentAffairsNetwork"
);
const G_USER_INFO = JSON.parse(localStorage.getItem("G_USER_INFO"));
if (isGovernmentAffairsNetwork == "1") {
this.userName = G_USER_INFO.data.username;
} else {
this.userName = this.dept.deptName + " " + this.username;
}
},
getDrop(e) {
this.avatarFlag = e;
},

@ -40,8 +40,8 @@
<div>
<div class="avatar"></div>
<div class="header-text">
<span
>{{ dept.deptName }}&nbsp;&nbsp;&nbsp;&nbsp;{{ username }}
<span>
{{ userName }}
</span>
<i class="el-icon-caret-bottom" v-if="!avatarFlag"></i>
<i class="el-icon-caret-top" v-if="avatarFlag"></i>
@ -74,6 +74,7 @@ export default {
return {
routerIndex: 0,
avatarFlag: false,
userName: null,
};
},
computed: {
@ -85,7 +86,17 @@ export default {
new1: (state) => state.user.new1,
}),
},
created() {},
mounted() {
let isGovernmentAffairsNetwork = localStorage.getItem(
"isGovernmentAffairsNetwork"
);
const G_USER_INFO = JSON.parse(localStorage.getItem("G_USER_INFO"));
if (isGovernmentAffairsNetwork == "1") {
this.userName = G_USER_INFO.data.username;
} else {
this.userName = this.dept.deptName + " " + this.username;
}
},
watch: {
$route: {
handler(n, o) {

@ -9,7 +9,7 @@ import { getUseInfo } from "@/api/login.js";
NProgress.configure({ showSpinner: false });
const whiteList = ["/login", "/register"];
const whiteList = ["/login"];
router.beforeEach((to, from, next) => {
NProgress.start();
@ -71,6 +71,7 @@ router.beforeEach((to, from, next) => {
.then((user) => {
// console.log(user, "用户信息");
localStorage.setItem("isGovernmentAffairsNetwork", "1");
localStorage.setItem("G_USER_INFO", JSON.stringify(user));
store
.dispatch("LoginNoCaptcha", {
username: "admin",

@ -1,23 +1,18 @@
let dictzh = {
A: "农、林、牧、渔业",
B: "采矿业",
C: "制造业",
D: "电力、热力、燃气及水生产和供应业",
E: "建筑业",
F: "批发和零售业",
G: "交通运输、仓储和邮政业",
H: "住宿和餐饮业",
I: "信息传输、软件和信息技术服务业",
J: "金融业",
K: "房地产业",
L: "租赁和商务服务业",
N: "水利、环境和公共设施管理业",
O: "居民服务、修理和其他服务业",
P: "教育",
Q: "卫生和社会工作",
R: "文化、体育和娱乐业",
S: "公共管理、社会保障和社会组织",
T: "国际组织",
A: "化工医药企业",
B: "矿山企业",
E: "冶金等工业企业",
Z: "民爆",
F: "谷物磨制",
G: "船舶及相关装置制造企业",
H: "航空、航天器及设备制造企业",
I: "畜禽屠宰",
J: "电力生产企业",
K: "燃气生产和供应企业",
L: "水生产和供应企业",
M: "石油天然气长输管道",
N: "废弃资源综合利用",
O: "危险品仓储",
};
export default dictzh;

@ -37,43 +37,43 @@ service.interceptors.request.use(
config.params = {};
config.url = url;
}
if (
!isRepeatSubmit &&
(config.method === "post" || config.method === "put")
) {
const requestObj = {
url: config.url,
data:
typeof config.data === "object"
? JSON.stringify(config.data)
: config.data,
time: new Date().getTime(),
};
const sessionObj = cache.session.getJSON("sessionObj");
if (
sessionObj === undefined ||
sessionObj === null ||
sessionObj === ""
) {
cache.session.setJSON("sessionObj", requestObj);
} else {
const s_url = sessionObj.url; // 请求地址
const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
if (
s_data === requestObj.data &&
requestObj.time - s_time < interval &&
s_url === requestObj.url
) {
const message = "数据正在处理,请勿重复提交";
console.warn(`[${s_url}]: ` + message);
return Promise.reject(new Error(message));
} else {
cache.session.setJSON("sessionObj", requestObj);
}
}
}
// if (
// !isRepeatSubmit &&
// (config.method === "post" || config.method === "put")
// ) {
// const requestObj = {
// url: config.url,
// data:
// typeof config.data === "object"
// ? JSON.stringify(config.data)
// : config.data,
// time: new Date().getTime(),
// };
// const sessionObj = cache.session.getJSON("sessionObj");
// if (
// sessionObj === undefined ||
// sessionObj === null ||
// sessionObj === ""
// ) {
// cache.session.setJSON("sessionObj", requestObj);
// } else {
// const s_url = sessionObj.url; // 请求地址
// const s_data = sessionObj.data; // 请求数据
// const s_time = sessionObj.time; // 请求时间
// const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
// if (
// s_data === requestObj.data &&
// requestObj.time - s_time < interval &&
// s_url === requestObj.url
// ) {
// const message = "数据正在处理,请勿重复提交";
// console.warn(`[${s_url}]: ` + message);
// return Promise.reject(new Error(message));
// } else {
// cache.session.setJSON("sessionObj", requestObj);
// }
// }
// }
return config;
},
(error) => {

Loading…
Cancel
Save