修改数据填报,添加鱼种类下载按钮增加延迟时间5分钟,登录添加记住密码

This commit is contained in:
扈兆增 2026-05-08 14:15:44 +08:00
parent fb582add0f
commit 24d56e2944
17 changed files with 1583 additions and 14 deletions

View File

@ -9,6 +9,6 @@ VITE_APP_BASE_API = '/dev-api'
## 开发环境API地址
# VITE_APP_BASE_URL = 'http://localhost:8093'
VITE_APP_BASE_URL = 'http://10.84.121.21:8093'
VITE_APP_BASE_API_URL = 'https://211.99.26.225:12130/prod-api'
VITE_APP_BASE_API_URL = 'http://10.84.121.21:8093'
## 开发环境预览 图片视频地址
VITE_APP_PREVIEW_URL = 'https://211.99.26.225:12125'

Binary file not shown.

View File

@ -0,0 +1,12 @@
<template>
<div>
基本信息
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,12 @@
<template>
<div>
生态流量
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,12 @@
<template>
<div>
生态流量泄放设施
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,12 @@
<template>
<div>
全景影像
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,12 @@
<template>
<div>
电站监测数据
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,12 @@
<template>
<div>
视频
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,12 @@
<template>
<div>
阶段属性
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,12 @@
<template>
<div>
预警提示
</div>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,119 @@
<template>
<a-modal
v-model:open="visible"
:title="title"
width="800px"
:footer="null"
:closable="true"
@cancel="handleClose"
class="map-modal"
>
<div class="map-modal-content">
<a-tabs v-model:activeKey="currentActiveKey">
<a-tab-pane
v-for="tab in tabsConfig"
:key="tab.key"
:tab="tab.title"
>
<!-- 根据 key 动态渲染子组件 -->
<div v-if="currentActiveKey === 'basicInfo'" class="tab-pane-container">
<!-- 假设 BasicInfo 是预定义的组件 -->
<BasicInfo :data="modalData" />
</div>
<div v-else-if="currentActiveKey === 'mapView'" class="tab-pane-container">
<!-- 假设 MapView 是预定义的组件 -->
<MapView :data="modalData" />
</div>
<div v-else-if="currentActiveKey === 'surrounding'" class="tab-pane-container">
<!-- 其他预定义组件 -->
<SurroundingInfo :data="modalData" />
</div>
<div v-else class="empty-placeholder">
未找到对应 Key ({{ currentActiveKey }}) 的组件配置
</div>
</a-tab-pane>
</a-tabs>
</div>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
// Tab
//
import BasicInfo from './components/BasicInfo.vue';
import MapView from './components/MapView.vue';
import SurroundingInfo from './components/SurroundingInfo.vue';
// Tab
interface TabItem {
key: string;
title: string;
}
// Props
const props = defineProps<{
visible: boolean;
title?: string;
activeKey?: string; // tab
tabsConfig?: TabItem[]; // Tab Tab
data?: any; //
}>();
// Emits
const emit = defineEmits<{
(e: 'update:visible', value: boolean): void;
(e: 'change', key: string): void; // tab
}>();
// activeKey
const currentActiveKey = ref<string>(props.activeKey || '');
// activeKey
watch(() => props.activeKey, (newVal) => {
if (newVal) {
currentActiveKey.value = newVal;
}
}, { immediate: true });
// tab
watch(currentActiveKey, (newVal) => {
emit('change', newVal);
});
//
const handleClose = () => {
emit('update:visible', false);
};
// 便使 props.data
const modalData = ref(props.data);
watch(() => props.data, (newVal) => {
modalData.value = newVal;
});
</script>
<style lang="scss" scoped>
.map-modal {
:deep(.ant-modal-body) {
padding: 24px;
}
.map-modal-content {
min-height: 300px; //
.tab-pane-container {
padding: 10px 0;
}
.empty-placeholder {
color: #999;
text-align: center;
padding: 40px 0;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,12 @@ import axios from 'axios';
import { message, Modal } from 'ant-design-vue';
import { getToken } from '@/utils/auth';
import { useUserStoreHook } from '@/store/modules/user';
import router from '@/router';
// 创建 axios 实例
const service = axios.create({
baseURL: import.meta.env.VITE_APP_BASE_API,
timeout: 100000,
timeout: 300000, // 5分钟
headers: { 'Content-Type': 'application/json;charset=utf-8' }
});
@ -63,6 +64,7 @@ service.interceptors.response.use(
cancelButtonProps: { disabled: false },
onOk: () => {
localStorage.clear();
router.push('/login');
window.location.href = '/';
},
});

View File

@ -114,13 +114,14 @@
<span>登录</span>
</a-button>
<div style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
<a-button type="link" size="mini" block @click="showForgotPasswordPage"
<a-checkbox v-model:checked="remember" style="margin-top: 10px;">记住密码</a-checkbox>
<a-button type="link" size="mini" @click="showForgotPasswordPage"
:style="{ marginTop: '10px', border: 'none' }">
忘记密码
</a-button>
<a-button type="link" size="mini" block @click="goRegister"
<a-button type="link" size="mini" @click="goRegister"
:style="{ marginTop: '10px', border: 'none' }">
注册
用户注册
</a-button>
</div>
@ -188,6 +189,7 @@ import { UserOutlined, LockOutlined, MobileOutlined } from "@ant-design/icons-vu
import { getCaptcha, sendSmsCode, smsLoginApi, resetPassword } from "@/api/auth";
import { message } from "ant-design-vue";
import { setToken } from "@/utils/auth";
import Cookies from "js-cookie";
//
import router from "@/router";
@ -367,10 +369,19 @@ function onFinish() {
if (user.password !== state.cookiePass) {
user.password = encrypt(user.password);
}
console.log(user);
userStore
.login(user)
.then(() => {
if (remember.value == true) {
Cookies.set('username', user.username, { expires: 30 });
Cookies.set('password', user.password, { expires: 30 });
Cookies.set('rememberMe', String(remember.value), { expires: 30 });
} else {
// cookie
Cookies.remove('username');
Cookies.remove('password');
Cookies.remove('rememberMe');
}
router.push({ path: "/" });
state.loading = false;
message.success("登录成功");
@ -492,6 +503,22 @@ 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;
@ -736,6 +763,7 @@ const handleResetPassword = async () => {
onMounted(() => {
getCode();
getCookie();
});
</script>

View File

@ -268,7 +268,7 @@
v-if="!isView"
v-model:file-list="videoFileList"
list-type="text"
:multiple="false"
:multiple="true"
accept=".mp4"
:before-upload="beforeVideoUpload"
@preview="handleVideoPreview"
@ -566,7 +566,14 @@ const handleImageRemove = (file: any) => {
//
const handleVideoRemove = (file: any) => {
videoFileList.value = [];
//
const index = videoFileList.value.indexOf(file);
if (index > -1) {
//
const newFileList = videoFileList.value.slice();
newFileList.splice(index, 1);
videoFileList.value = newFileList;
}
};
// 1.
const initForm = () => {

View File

@ -62,7 +62,9 @@
</a-tooltip> -->
<a-tooltip title="鱼种类字典数据下载">
<a-button>
<a href="/file/鱼种类字典数据.xlsx" download="鱼种类字典数据.xlsx">
鱼种类字典数据下载
</a>
</a-button>
</a-tooltip>
<a-tooltip title="操作手册下载">

View File

@ -159,7 +159,7 @@
<a-form-item label="选中记录数">
<span>{{ selectedRows.length }} </span>
</a-form-item>
<a-form-item label="审批意见" required>
<a-form-item label="审批意见">
<a-textarea v-model:value="batchApproveForm.approveComment" :rows="4" placeholder="请输入审批意见(必填)"
:maxlength="500" show-count />
</a-form-item>
@ -668,6 +668,9 @@ const handleShowApprovalLog = (record: any) => {
dataType: "string",
value: record.id,
}
],
sort:[
{ field: "operateTime", order: "desc" }
]
};
approvalLogTableRef.value?.getList(filter);
@ -835,10 +838,10 @@ const handleBatchApprove = () => {
//
const handleBatchApproveConfirm = async () => {
//
if (!batchApproveForm.value.approveComment || batchApproveForm.value.approveComment.trim() === '') {
message.warning('请填写审批意见');
return;
}
// if (!batchApproveForm.value.approveComment || batchApproveForm.value.approveComment.trim() === '') {
// message.warning('');
// return;
// }
//
const hasApprovedRecord = selectedRows.value.some(row => row.status != 'PENDING');