Browse Source

配置修改

dev-V1.0.1
wangmingyong 5 months ago
parent
commit
6f2300bfd4
  1. 2
      zdxt-web-client/zdxt-efcode-enforcement-app/package.json
  2. 4
      zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/index.js
  3. 37
      zdxt-web-client/zdxt-efcode-enforcement-app/src/components/FooterBar.vue
  4. 1
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enterpriseScanPreview.vue
  5. 104
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/login.vue
  6. 4
      zdxt-web-client/zdxt-efcode-enforcement-app/vite-config/index.js
  7. 5
      zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-test

2
zdxt-web-client/zdxt-efcode-enforcement-app/package.json

@ -6,7 +6,9 @@
"scripts": {
"vite": "vite --mode enforcement-dev",
"vite-server-app:enforcement-dev": "vite --mode enforcement-dev",
"vite-server-app:enforcement-test": "vite --mode enforcement-test",
"build-app:enforcement-dev": "vite build --mode enforcement-dev --outDir dist/enforcement-dev",
"build-app:enforcement-test": "vite build --mode enforcement-test --outDir dist/enforcement-test",
"build-app:enforcement-prod": "vite build --mode enforcement-prod --outDir dist/enforcement-prod"
},
"dependencies": {

4
zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/index.js

@ -4,8 +4,8 @@ const baseUrl = "/app-enf";
// region 认证模块
// export const enforcementLogin = (params, success, error) => _post(baseUrl + "/login/szyptLogin", params, success, error);
export const enforcementLogin = (params, success, error) => _post(baseUrl + "/login/do", params, success, error);
export const enforcementLogin = (params, success, error) => _post(baseUrl + "/login/szyptLogin", params, success, error);
// export const enforcementLogin = (params, success, error) => _post(baseUrl + "/login/do", params, success, error);
// endregion
// region 企业模块

37
zdxt-web-client/zdxt-efcode-enforcement-app/src/components/FooterBar.vue

@ -1,12 +1,7 @@
<template>
<div class="footer-bar">
<div
v-for="item in tabs"
:key="item.key"
class="footer-item"
:class="{ 'footer-item--active': item.key === active }"
@click="onTabClick(item)"
>
<div v-for="item in tabs" :key="item.key" class="footer-item"
:class="{ 'footer-item--active': item.key === active }" @click="onTabClick(item)">
<div v-if="item.key === 'message'" class="footer-icon-wrap">
<svg viewBox="0 0 24 24" fill="currentColor" v-html="item.path"></svg>
<span v-if="messageUnread" class="footer-badge">{{ messageUnread }}</span>
@ -31,16 +26,24 @@ const props = defineProps({
const router = useRouter();
const tabs = [
{ key: 'home', label: '首页', route: '/enforcement/enforcementHome',
path: '<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>' },
{ key: 'query', label: '查询', route: '/enforcement/query',
path: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>' },
{ key: 'message', label: '消息', route: '/enforcement/message',
path: '<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>' },
{ key: 'program', label: '计划', route: '/enforcement/program',
path: '<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>' },
{ key: 'my', label: '我的', route: '/enforcement/my',
path: '<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>' },
{
key: 'home', label: '首页', route: '/enforcement/enforcementHome',
path: '<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>'
}, {
key: 'program', label: '计划', route: '/enforcement/program',
path: '<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>'
},
// { key: 'query', label: '查询', route: '/enforcement/query',
// path: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>' },
{
key: 'message', label: '消息', route: '/enforcement/message',
path: '<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>'
},
{
key: 'my', label: '我的', route: '/enforcement/my',
path: '<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>'
},
];
const onTabClick = (item) => {

1
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enterpriseScanPreview.vue

@ -246,7 +246,6 @@ const fetchEnterpriseInformation = (enterpriseNumber) => {
if (res.code === 200) {
// 直接使用接口返回的数据
enterpriseData.value = res.data || res;
console.log('企业画像数据加载成功:', enterpriseData.value);
// 获取企业画像成功后,调用历史执法案件接口
fetchXzjcList(enterpriseNumber);
} else {

104
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/login.vue

@ -71,61 +71,23 @@ const selectTestUser = (item) => {
// 直接触发登录
doLogin(item.account, item.password);
}
// const doLogin = (secretName, secretKey) => {
// const encryptedKey = Encrypt(secretKey);
// enforcementLogin({code: '12346678985288799'}, response => {
// if (response.code === 200) {
// // // 验证关键组织信息
// // if (!response.data.deptId) {
// // showFailToast("该用户未关联部门,无法登录");
// // return;
// // }
// // if (!response.data.organId) {
// // showFailToast("该用户未关联认证机构,无法登录");
// // return;
// // }
// // if (!response.data.bureauUnitId) {
// // showFailToast("该用户未关联执法单位,无法登录");
// // return;
// // }
// // 执法端登录成功 → 赋值用户基本信息
// useCommon.SET_USER_PHONENUMBER(response.data.phonenumber || "");
// useCommon.SET_USER_ID(response.data.userId);
// useCommon.SET_USER_NAME(response.data.userName || "");
// useCommon.SET_NICK_NAME(response.data.nickName || "");
// useCommon.SET_TOKEN(response.data.token);
// useCommon.SET_DEPT_ID(response.data.deptId);
// useCommon.SET_DEPT_NAME(response.data.deptName || "");
// useCommon.SET_ORGAN_ID(response.data.organId);
// useCommon.SET_ORGAN_NAME(response.data.organName || "");
// useCommon.SET_BUREAU_UNIT_ID(response.data.bureauUnitId);
// useCommon.SET_BUREAU_UNIT_NAME(response.data.bureauUnitName || "");
// console.log("enforcement login success", useCommon.userId);
// router.push({name: "enforcementHome"});
// } else {
// showFailToast(response.msg || "登录失败");
// }
// }, error => {
// showFailToast(error?.msg || "登录失败,请检查网络");
// })
// };
const doLogin = (secretName, secretKey) => {
const encryptedKey = Encrypt(secretKey);
enforcementLogin({"secretName": secretName, "secretKey": encryptedKey}, response => {
enforcementLogin({code: '12346678985288799'}, response => {
if (response.code === 200) {
// 验证关键组织信息
if (!response.data.deptId) {
showFailToast("该用户未关联部门,无法登录");
return;
}
if (!response.data.organId) {
showFailToast("该用户未关联认证机构,无法登录");
return;
}
if (!response.data.bureauUnitId) {
showFailToast("该用户未关联执法单位,无法登录");
return;
}
// // 验证关键组织信息
// if (!response.data.deptId) {
// showFailToast("该用户未关联部门,无法登录");
// return;
// }
// if (!response.data.organId) {
// showFailToast("该用户未关联认证机构,无法登录");
// return;
// }
// if (!response.data.bureauUnitId) {
// showFailToast("该用户未关联执法单位,无法登录");
// return;
// }
// 执法端登录成功 → 赋值用户基本信息
useCommon.SET_USER_PHONENUMBER(response.data.phonenumber || "");
useCommon.SET_USER_ID(response.data.userId);
@ -147,6 +109,44 @@ const doLogin = (secretName, secretKey) => {
showFailToast(error?.msg || "登录失败,请检查网络");
})
};
// const doLogin = (secretName, secretKey) => {
// const encryptedKey = Encrypt(secretKey);
// enforcementLogin({"secretName": secretName, "secretKey": encryptedKey}, response => {
// if (response.code === 200) {
// // 验证关键组织信息
// if (!response.data.deptId) {
// showFailToast("该用户未关联部门,无法登录");
// return;
// }
// if (!response.data.organId) {
// showFailToast("该用户未关联认证机构,无法登录");
// return;
// }
// if (!response.data.bureauUnitId) {
// showFailToast("该用户未关联执法单位,无法登录");
// return;
// }
// // 执法端登录成功 → 赋值用户基本信息
// useCommon.SET_USER_PHONENUMBER(response.data.phonenumber || "");
// useCommon.SET_USER_ID(response.data.userId);
// useCommon.SET_USER_NAME(response.data.userName || "");
// useCommon.SET_NICK_NAME(response.data.nickName || "");
// useCommon.SET_TOKEN(response.data.token);
// useCommon.SET_DEPT_ID(response.data.deptId);
// useCommon.SET_DEPT_NAME(response.data.deptName || "");
// useCommon.SET_ORGAN_ID(response.data.organId);
// useCommon.SET_ORGAN_NAME(response.data.organName || "");
// useCommon.SET_BUREAU_UNIT_ID(response.data.bureauUnitId);
// useCommon.SET_BUREAU_UNIT_NAME(response.data.bureauUnitName || "");
// console.log("enforcement login success", useCommon.userId);
// router.push({name: "enforcementHome"});
// } else {
// showFailToast(response.msg || "登录失败");
// }
// }, error => {
// showFailToast(error?.msg || "登录失败,请检查网络");
// })
// };
const onSubmit = async () => {
doLogin(loginParam.secretName, loginParam.secretKey);

4
zdxt-web-client/zdxt-efcode-enforcement-app/vite-config/index.js

@ -43,10 +43,12 @@ const baseCfg = (viteEnv = {}) => {
cors: true,
proxy: {
'/api': {
target: 'http://localhost:17000',
// target: 'http://localhost:17000',
target: 'http://139.186.148.21:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},
}
},
build: {

5
zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-test

@ -0,0 +1,5 @@
# 执法端测试环境
VITE_PORT = 12002
VITE_BASE_URL = '/api'
VITE_DEFAULT_LOGIN = '/enforcement/login'
VITE_APP_ENV = 'test'
Loading…
Cancel
Save