diff --git a/frontend/src/permission.ts b/frontend/src/permission.ts
index 87df0ea..4f9ddba 100644
--- a/frontend/src/permission.ts
+++ b/frontend/src/permission.ts
@@ -9,7 +9,7 @@ NProgress.configure({ showSpinner: false });
const permissionStore = usePermissionStoreHook();
// 白名单路由
-const whiteList = ['/login', '/login-sjtb']; //login
+const whiteList = ['/login']; //login
// 查找第一个可用路由
function findFirstAvailableRoute(routes: any[]): string | undefined {
@@ -35,7 +35,7 @@ router.beforeEach(async (to, from, next) => {
if (userStore.Token) {
// 登录成功,跳转到首页
- if (to.path === '/login-sjtb' || to.path === '/login') {//login
+ if (to.path === '/login') {//login
next({ path: '/' });
NProgress.done();
} else {
@@ -80,7 +80,7 @@ router.beforeEach(async (to, from, next) => {
} catch (error) {
console.log(error);
await userStore.resetToken();
- to.path === '/login-sjtb' ? next(`/login-sjtb?redirect=${to.path}`) : next(`/login?redirect=${to.path}`);
+ next(`/login?redirect=${to.path}`);
NProgress.done();
}
}
@@ -91,7 +91,7 @@ router.beforeEach(async (to, from, next) => {
if (whiteList.indexOf(to.path) !== -1) {
next();
} else {
- to.path === '/login-sjtb' ? next(`/login-sjtb?redirect=${to.path}`) : next(`/login?redirect=${to.path}`);
+ next(`/login?redirect=${to.path}`);
NProgress.done();
}
}
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index 0ff5dbb..eda82d7 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -16,13 +16,13 @@ export const constantRoutes: RouteRecordRaw[] = [
}
]
},
+ // {
+ // path: '/login',
+ // component: () => import('@/views/login/index.vue'),
+ // meta: { hidden: true }
+ // },
{
path: '/login',
- component: () => import('@/views/login/index.vue'),
- meta: { hidden: true }
- },
- {
- path: '/login-sjtb',
component: () => import('@/views/login-sjtb/index.vue'),
meta: { hidden: true }
},
@@ -31,11 +31,11 @@ export const constantRoutes: RouteRecordRaw[] = [
component: () => import('@/views/error-page/404.vue'),
meta: { hidden: true }
},
- {
- path: '/401',
- component: () => import('@/views/error-page/401.vue'),
- meta: { hidden: true }
- },
+ {
+ path: '/401',
+ component: () => import('@/views/error-page/401.vue'),
+ meta: { hidden: true }
+ }
];
// 创建路由
diff --git a/frontend/src/store/modules/shuJuTianBao.ts b/frontend/src/store/modules/shuJuTianBao.ts
new file mode 100644
index 0000000..49f2bd4
--- /dev/null
+++ b/frontend/src/store/modules/shuJuTianBao.ts
@@ -0,0 +1,85 @@
+import { defineStore } from 'pinia';
+import { ref } from 'vue'; // 使用 ref 更简单直观
+import { getBaseDropdown, getEngInfoDropdown, getFpssDropdown } from '@/api/select';
+import { set } from 'lodash';
+
+export const useShuJuTianBaoStore = defineStore('shuJuTianBao', () => {
+ // 1. 直接使用 ref 定义状态,确保响应式
+ const fpssOption = ref
([]);
+ const fpssLoading = ref(false);
+ const baseOption = ref([]);
+ const baseLoading = ref(false);
+ const engOption = ref([]);
+ const engLoading = ref(false);
+ const fishOption = ref([]);
+ // 获取水电基地列表
+ const getBaseOption = async () => {
+ try {
+ baseLoading.value = true;
+ const res = await getBaseDropdown({});
+ if (res.data && Array.isArray(res.data)) {
+ const list = [...res.data];
+ list.unshift({
+ baseid: 'all',
+ basename: '当前全部'
+ });
+ // 直接赋值给 ref,触发响应式更新
+ baseOption.value = list;
+ }
+ } catch (error) {
+ console.error('获取水电基地列表失败:', error);
+ } finally {
+ baseLoading.value = false;
+ }
+ };
+ // 获取电站列表
+ const getEngOption = async (baseId: string) => {
+ try {
+ engLoading.value = true;
+ const param = baseId === 'all' ? {} : { baseId };
+ const res = await getEngInfoDropdown(param);
+ if (res.data && Array.isArray(res.data)) {
+ // 直接赋值给 ref
+ engOption.value = res.data;
+ }
+ } catch (error) {
+ console.error('获取电站列表失败:', error);
+ } finally {
+ engLoading.value = false;
+ }
+ };
+ // 获取过鱼设施列表
+ const getFpssOption = async (baseId: string, rstcd: string) => {
+ try {
+ fpssLoading.value = true;
+ const res = await getFpssDropdown({ baseId, rstcd });
+ fpssOption.value = res.data;
+ } catch (error) {
+ console.log(error);
+ } finally {
+ fpssLoading.value = false;
+ }
+ };
+ const getFishOption = () => {
+ return fishOption.value;
+ };
+ const setFishOption = (data: any[]) => {
+ fishOption.value = data;
+ };
+ // 3. 直接返回 ref 和方法
+ // 在组件中使用时:store.baseOption 会自动解包为数组
+ return {
+ fpssOption,
+ baseOption,
+ engOption,
+ fishOption,
+ fpssLoading,
+ baseLoading,
+ engLoading,
+ getBaseOption,
+ getEngOption,
+ getFpssOption,
+ getFishOption,
+ setFishOption
+ };
+});
\ No newline at end of file
diff --git a/frontend/src/views/login-sjtb/index.vue b/frontend/src/views/login-sjtb/index.vue
index 00fe032..47c86b9 100644
--- a/frontend/src/views/login-sjtb/index.vue
+++ b/frontend/src/views/login-sjtb/index.vue
@@ -10,7 +10,7 @@
-
采集网站及数据管理子系统
+
{{ $t("login.titleSjtb") }}
@@ -168,6 +168,14 @@
>
忘记密码
-->
+
+ 注册
+
@@ -245,11 +253,10 @@ import loginImg from "@/assets/images/logo.png";
import { UserOutlined, LockOutlined, MobileOutlined } from "@ant-design/icons-vue";
import { getCaptcha } from "@/api/auth";
import { message } from "ant-design-vue";
-import { setPath } from '@/utils/auth';
+import { setPath } from "@/utils/auth";
// 组件依赖
import router from "@/router";
-import Cookies from "js-cookie";
// API依赖
import { useRoute } from "vue-router";
import { LoginData } from "@/api/auth/types";
@@ -288,8 +295,8 @@ const state = reactive({
redirect: "",
loginData: {
uuid: "",
- username: "admin",
- password: "123456",
+ username: "",
+ password: "",
code: "",
} as LoginData,
loginRules: {
@@ -322,11 +329,12 @@ const forgotPasswordRules = ref({
],
});
-const { loginData, loginRules, loading,
- // passwordType, capslockTooltipDisabled
-} = toRefs(
- state
-);
+const {
+ loginData,
+ loginRules,
+ loading,
+ // passwordType, capslockTooltipDisabled
+} = toRefs(state);
// function checkCapslock(e: any) {
// const { key } = e;
@@ -363,10 +371,10 @@ function onFinish() {
userStore
.login(user)
.then(() => {
- Cookies.set("username", user.username);
- setPath('/login-sjtb')
+ setPath("/login-sjtb");
router.push({ path: "/" });
state.loading = false;
+ message.success("登录成功");
})
.catch(() => {
getCode();
@@ -396,22 +404,6 @@ function getOtherQuery(query: any) {
return acc;
}, {});
}
-function getCookie() {
- const username = Cookies.get("username");
- let password = Cookies.get("password");
- const rememberMe = Cookies.get("rememberMe");
- rememberMe == "true" ? (remember.value = Boolean(rememberMe)) : false;
- // 保存cookie里面的加密后的密码
- state.cookiePass = password === undefined ? "" : password;
- password = password === undefined ? state.loginData.password : password;
- state.loginData = {
- username: username === undefined ? state.loginData.username : username,
- password: decrypt(password),
- code: "",
- uuid: "",
- };
- remember.value = rememberMe === undefined ? false : Boolean(rememberMe);
-}
function getCode() {
getCaptcha().then((result: any) => {
codeUrl.value = result.data.img;
@@ -437,7 +429,10 @@ const startCountdown = () => {
// const showForgotPasswordPage = () => {
// showForgotPassword.value = true;
// };
-
+//注册用户页面
+const goRegister = () => {
+ router.push({ path: "/register" });
+};
// 返回登录页面
const backToLogin = () => {
showForgotPassword.value = false;
@@ -554,7 +549,6 @@ const handleResetPassword = async () => {
};
onMounted(() => {
- getCookie();
getCode();
});
@@ -624,8 +618,8 @@ onMounted(() => {
.slogan {
position: absolute;
top: 20%;
- left: 18%;
- width: 490px;
+ left: 16%;
+ width: 780px;
height: 112px;
color: #040504;
font-size: 40px;
diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue
index a0b32db..a74742b 100644
--- a/frontend/src/views/login/index.vue
+++ b/frontend/src/views/login/index.vue
@@ -288,8 +288,8 @@ const state = reactive({
redirect: "",
loginData: {
uuid: "",
- username: "admin",
- password: "123456",
+ username: "",
+ password: "",
code: "",
} as LoginData,
loginRules: {
@@ -359,11 +359,9 @@ function onFinish() {
if (user.password !== state.cookiePass) {
user.password = encrypt(user.password);
}
- console.log(user);
userStore
.login(user)
.then(() => {
- Cookies.set("username", user.username);
router.push({ path: "/" });
setPath('/login')
state.loading = false;
@@ -396,22 +394,6 @@ function getOtherQuery(query: any) {
return acc;
}, {});
}
-function getCookie() {
- const username = Cookies.get("username");
- let password = Cookies.get("password");
- const rememberMe = Cookies.get("rememberMe");
- rememberMe == "true" ? (remember.value = Boolean(rememberMe)) : false;
- // 保存cookie里面的加密后的密码
- state.cookiePass = password === undefined ? "" : password;
- password = password === undefined ? state.loginData.password : password;
- state.loginData = {
- username: username === undefined ? state.loginData.username : username,
- password: decrypt(password),
- code: "",
- uuid: "",
- };
- remember.value = rememberMe === undefined ? false : Boolean(rememberMe);
-}
function getCode() {
getCaptcha().then((result: any) => {
codeUrl.value = result.data.img;
@@ -554,7 +536,6 @@ const handleResetPassword = async () => {
};
onMounted(() => {
- getCookie();
getCode();
});
diff --git a/frontend/src/views/qiXiDi/shengTaiDiBaoHu.vue b/frontend/src/views/qiXiDi/shengTaiDiBaoHu.vue
index 246ea9e..1ceae18 100644
--- a/frontend/src/views/qiXiDi/shengTaiDiBaoHu.vue
+++ b/frontend/src/views/qiXiDi/shengTaiDiBaoHu.vue
@@ -1,5 +1,25 @@
+
+
-
-
栖息地
+
-
\ No newline at end of file
+
+
diff --git a/frontend/src/views/register/index.vue b/frontend/src/views/register/index.vue
new file mode 100644
index 0000000..612f417
--- /dev/null
+++ b/frontend/src/views/register/index.vue
@@ -0,0 +1,326 @@
+
+
+
+
+
+
+
{{ $t("login.titleSjtb") }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 立即注册
+
+
+
+
+ 已有账号?返回登录
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/shuJuTianBao/approvalLogSearch.vue b/frontend/src/views/shuJuTianBao/approvalLogSearch.vue
new file mode 100644
index 0000000..b42fc0d
--- /dev/null
+++ b/frontend/src/views/shuJuTianBao/approvalLogSearch.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/shuJuTianBao/changeLogSearch.vue b/frontend/src/views/shuJuTianBao/changeLogSearch.vue
new file mode 100644
index 0000000..0567d65
--- /dev/null
+++ b/frontend/src/views/shuJuTianBao/changeLogSearch.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao.vue b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao.vue
deleted file mode 100644
index 06b9db9..0000000
--- a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao.vue
+++ /dev/null
@@ -1,546 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBaoForm.vue b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoForm.vue
similarity index 52%
rename from frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBaoForm.vue
rename to frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoForm.vue
index 27ab4a0..df28a5e 100644
--- a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBaoForm.vue
+++ b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoForm.vue
@@ -1,10 +1,11 @@
@@ -17,31 +18,86 @@
>
-
-
+
+
+
+ {{ opt.basename }}
+
+
-
-
+
+
+
+ {{ opt.ennm }}
+
+
-
-
+
+
+
+ {{ opt.stnm }}
+
+
@@ -50,12 +106,12 @@
-
+
-
+
是
否
@@ -70,11 +126,14 @@
v-model:value="formData.direction"
placeholder="请选择游向"
allow-clear
+ :disabled="isView"
>
- 上行
- 下行
- 上行折返
- 下行折返
+ {{ item.dictName }}
@@ -85,6 +144,7 @@
style="width: 100%"
placeholder="数量"
:min="0"
+ :disabled="isView"
/>
@@ -104,6 +164,7 @@
placeholder="请输入"
:min="0"
@change="validateBodyLength"
+ :disabled="isView"
/>
~
@@ -129,6 +191,7 @@
placeholder="请输入"
:min="0"
@change="validateWeight"
+ :disabled="isView"
/>
~
@@ -150,6 +214,7 @@
style="width: 100%"
placeholder="水温"
:min="0"
+ :disabled="isView"
/>
@@ -172,22 +237,75 @@
diff --git a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoSearch.vue b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoSearch.vue
new file mode 100644
index 0000000..b1a572d
--- /dev/null
+++ b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoSearch.vue
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+ 导入zip
+
+
+
+ 批量删除
+
+
+
+
+ 提交数据
+
+
+
+
+
+
+ 批量审批
+
+
+
+
+ 下载模板
+
+
+
+
+ 1.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoTable.vue b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoTable.vue
new file mode 100644
index 0000000..edb64fc
--- /dev/null
+++ b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/guoYuSheShiShuJuTianBaoTable.vue
@@ -0,0 +1,552 @@
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+ {{ record[column.dataIndex] }}
+
+
+
+
+
+
+
+ handleBaseChange(val, index)"
+ >
+
+ {{ opt.basename }}
+
+
+
+
+
+
+ handleEngChange(val, index)"
+ >
+
+ {{ opt.ennm }}
+
+
+
+
+
+
+ handleFpssChange(val, index)"
+ >
+
+ {{ opt.stnm }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.dictName }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无图片
+
+
+
+ 暂无视频
+
+
+
+
+
+
+
diff --git a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/index.vue b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/index.vue
new file mode 100644
index 0000000..6ea2f5e
--- /dev/null
+++ b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao/index.vue
@@ -0,0 +1,1060 @@
+
+
+
+
+
+
+
+
+
+
提交
+
编辑
+
删除
+
查看
+
审批
+
驳回
+
+
+
+
+
+
+
+
+ (fileTableData = val)"
+ />
+
+ 取消导入
+
+ 提交导入
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无图片预览
+
+
+
+
+
+ 暂无视频预览
+
+
+
+
+
+
+ {{ currentMediaIndex + 1 }} / {{ previewList.length }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBaoSearch.vue b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBaoSearch.vue
deleted file mode 100644
index 70e2c9d..0000000
--- a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBaoSearch.vue
+++ /dev/null
@@ -1,472 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 新增
-
-
-
-
- 导入zip
-
-
-
- 批量删除
-
-
-
-
- 提交数据
-
-
-
-
-
-
- 批量审批
-
-
-
-
- 1.
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/views/shuJuTianBao/shengPiJiLu.vue b/frontend/src/views/shuJuTianBao/shengPiJiLu.vue
new file mode 100644
index 0000000..9d1bb16
--- /dev/null
+++ b/frontend/src/views/shuJuTianBao/shengPiJiLu.vue
@@ -0,0 +1,446 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ handName(record.bizType, yeWuType) }}
+
+
+ {{ handName(record.status, shenStatus) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ handName(record.action, actionTypeDict) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ handName(record.operationType, operationTypeDict) }}
+
+
+ {{ handName(record.bizType, yeWuType) }}
+
+
+ {{ record.changeJson }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/shuJuTianBao/shengPiJiLuSearch.vue b/frontend/src/views/shuJuTianBao/shengPiJiLuSearch.vue
new file mode 100644
index 0000000..977c781
--- /dev/null
+++ b/frontend/src/views/shuJuTianBao/shengPiJiLuSearch.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/shuiZhiJianCe/shuiHuanJingZhiLiangZhuangKuang.vue b/frontend/src/views/shuiZhiJianCe/shuiHuanJingZhiLiangZhuangKuang.vue
index e9e2375..461c381 100644
--- a/frontend/src/views/shuiZhiJianCe/shuiHuanJingZhiLiangZhuangKuang.vue
+++ b/frontend/src/views/shuiZhiJianCe/shuiHuanJingZhiLiangZhuangKuang.vue
@@ -2,7 +2,7 @@
import JidiSelectorMod from "@/modules/jidiSelectorMod.vue";
import RightDrawer from "@/components/RightDrawer/index.vue";
import ShuiZhiJianCeGongZuoQingKuang from "@/modules/shuizhijiancegongzuoQK/index.vue"
-// import EnvironmentalQuality from "@/modules/environmentalQuality/index.vue" // 环境质量满足度
+import EnvironmentalQuality from "@/modules/EnvironmentalQuality/index.vue" // 环境质量满足度
@@ -13,7 +13,7 @@ import ShuiZhiJianCeGongZuoQingKuang from "@/modules/shuizhijiancegongzuoQK/inde
-
+
diff --git a/frontend/src/views/system/role/index.vue b/frontend/src/views/system/role/index.vue
index 9072002..15e4b3a 100644
--- a/frontend/src/views/system/role/index.vue
+++ b/frontend/src/views/system/role/index.vue
@@ -68,7 +68,7 @@ const input = ref("");
const title = ref("");
const info: any = ref({
rolename: "",
- level: "系统管理员",
+ level: "2",
description: "",
});
const faultList: any = [
@@ -90,7 +90,7 @@ function addClick() {
title.value = "新增角色";
info.value = {
rolename: "",
- level: "系统管理员",
+ level: "2",
description: "",
};
dialogVisible.value = true;
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index 497194a..e4c8159 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
- "noUnusedLocals": true,
- "noUnusedParameters": true,
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
"target": "esnext",
"useDefineForClassFields": true,
"module": "esnext",
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index dba6199..7586116 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -27,7 +27,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
// 线上API地址
// target: 'http://localhost:8093/',
// 本地API地址
- target: 'http://10.84.121.21:8093',
+ target: 'http://10.84.121.21:8093',
changeOrigin: true,
rewrite: path =>
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')