diff --git a/frontend/.env.development b/frontend/.env.development index 757b577..beab96d 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -7,6 +7,8 @@ VITE_APP_TITLE = '水电水利建设项目全过程环境管理信息平台' VITE_APP_PORT = 3000 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_PREVIEW_URL = 'https://211.99.26.225:12125' diff --git a/frontend/.env.production b/frontend/.env.production index 18d37eb..f6db5aa 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -6,5 +6,7 @@ VITE_APP_PORT = 3000 VITE_APP_BASE_API = '/prod-api' ## 生产环境API地址 VITE_APP_BASE_URL = 'http://localhost:8093' +## 生产环境导入预览地址 +VITE_APP_BASE_API_URL = 'https://211.99.26.225:12130/prod-api' ## 生产环境预览 图片视频地址 VITE_APP_PREVIEW_URL = 'https://211.99.26.225:12125' diff --git a/frontend/public/file/过鱼设施数据填报操作手册.docx b/frontend/public/file/过鱼设施数据填报操作手册.docx index d763b0e..f3d2e60 100644 Binary files a/frontend/public/file/过鱼设施数据填报操作手册.docx and b/frontend/public/file/过鱼设施数据填报操作手册.docx differ diff --git a/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts b/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts index 9bf215d..ce9b666 100644 --- a/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts +++ b/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts @@ -103,19 +103,10 @@ export function deleteFile(params:any) { }); } // 批量保存草稿 -export function importBatchSaveDraft(data:any) { +export function batchSaveDraft(data:any) { return request({ - url: '/data/fishDraft/importBatchSaveDraft', + url: '/data/fishDraft/batchSaveDraft', method: 'post', data }); -} - -// 标记导入任务为成功 -export function markImportTaskSuccess(data:any) { - return request({ - url: '/data/importTask/markSuccess', - method: 'post', - data - }); -} +} \ No newline at end of file diff --git a/frontend/src/api/select/index.ts b/frontend/src/api/select/index.ts index a6eeb2b..58c0d50 100644 --- a/frontend/src/api/select/index.ts +++ b/frontend/src/api/select/index.ts @@ -32,6 +32,15 @@ export function revalidateAndUpdateRow(data:any) { data }); } +// 删除 行数据 +export function deleteRowById(data:any) { + return request({ + url: '/data/fishDraft/deleteRowById', + method: 'post', + data + }); +} + //过鱼设施下拉列表 export function getFpssDropdown(params:any) { return request({ diff --git a/frontend/src/components/BasicSearch/index.vue b/frontend/src/components/BasicSearch/index.vue index 67243aa..92080e4 100644 --- a/frontend/src/components/BasicSearch/index.vue +++ b/frontend/src/components/BasicSearch/index.vue @@ -170,7 +170,7 @@ interface Props { initialValues?: any; showSearch?: boolean; showReset?: boolean; - zhujianfujian: any; + zhujianfujian?: string; } const props = withDefaults(defineProps(), { diff --git a/frontend/src/components/BasicTable/index.vue b/frontend/src/components/BasicTable/index.vue index 0ec8d85..fe78a79 100644 --- a/frontend/src/components/BasicTable/index.vue +++ b/frontend/src/components/BasicTable/index.vue @@ -33,6 +33,8 @@ interface Props { rowKey?: string; // 外部传入的搜索/过滤参数,变化时会自动触发刷新 searchParams?: Record; + // 是否只加载一次,默认 false + isOneLoad?: boolean; // 默认每页显示数量 defaultPageSize?: number; getCheckboxProps?: (record: any) => any; @@ -42,6 +44,7 @@ interface Props { const props = withDefaults(defineProps(), { enableRowSelection: false, rowKey: "id", + isOneLoad: true, searchParams: () => ({}), defaultPageSize: 20, getCheckboxProps: undefined, @@ -103,6 +106,8 @@ const paginationConfig = computed(() => ({ */ const getList = async (filter?: Record) => { loading.value = true; + tableData.value = []; + total.value = 0; // 如果传入了新 filter,则更新;否则保留旧的 if (filter !== undefined) { lastFilter.value = filter; @@ -178,11 +183,17 @@ const refresh = () => { getList(); }; +const clearSelection = () => { + selectedRowKeys.value = []; + selectedRows.value = []; +} // --- Expose Methods to Parent --- defineExpose({ getList, reset, refresh, + tableData, + clearSelection, // 也可以暴露选中的数据供父组件获取 getSelected: () => ({ keys: selectedRowKeys.value, diff --git a/frontend/src/store/modules/shuJuTianBao.ts b/frontend/src/store/modules/shuJuTianBao.ts index 7762c72..af1d948 100644 --- a/frontend/src/store/modules/shuJuTianBao.ts +++ b/frontend/src/store/modules/shuJuTianBao.ts @@ -80,7 +80,6 @@ export const useShuJuTianBaoStore = defineStore('shuJuTianBao', () => { fpssLoading.value = true; const param = hbrvcd === 'all' ? {} : { hbrvcd }; const res = await getFpssDropdown({...param, rstcd: rstcd}); - console.log(res.data); fpssOption.value = res.data; } catch (error) { console.log(error); diff --git a/frontend/src/utils/request.ts b/frontend/src/utils/request.ts index 4c238ce..8fdbd6d 100644 --- a/frontend/src/utils/request.ts +++ b/frontend/src/utils/request.ts @@ -6,7 +6,7 @@ import { useUserStoreHook } from '@/store/modules/user'; // 创建 axios 实例 const service = axios.create({ baseURL: import.meta.env.VITE_APP_BASE_API, - timeout: 50000, + timeout: 100000, headers: { 'Content-Type': 'application/json;charset=utf-8' } }); diff --git a/frontend/src/views/login-sjtb/index.vue b/frontend/src/views/login-sjtb/index.vue index 9363310..c6d8a74 100644 --- a/frontend/src/views/login-sjtb/index.vue +++ b/frontend/src/views/login-sjtb/index.vue @@ -84,7 +84,7 @@ + placeholder="请输入用户账号/手机号" size="large"> diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index 731cc81..0891d53 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -110,7 +110,7 @@ v-model:value="loginData.username" clearable type="text" - placeholder="请输入用户账号/身份证号/手机号" + placeholder="请输入用户账号/手机号" size="large" >