diff --git a/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts b/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts
index 69561a5..ef96df2 100644
--- a/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts
+++ b/frontend/src/api/guoYuSheShiShuJuTianBao/index.ts
@@ -8,27 +8,90 @@ export function getFishDraftPage(data:any) {
data
});
}
-//新增目录
+//新增过鱼数据
export function addFishDraft(queryParams:any) {
return request({
- url: '/data/fishDraft/add',
+ url: '/data/fishDraft/saveDraft',
method: 'post',
data: queryParams
});
}
-//修改目录
+//修改过鱼数据
export function editFishDraft(queryParams:any) {
return request({
- url: '/data/fishDraft/update',
+ url: '/data/fishDraft/updateDraft',
method: 'post',
data: queryParams
});
}
-//删除
+//删除 过鱼数据
export function delFishDraft(data:any) {
return request({
- url: '/data/fishDraft/batchDelete',
+ url: '/data/fishDraft/batchRemoveDraft',
method: 'post',
data
});
-}
\ No newline at end of file
+}
+//提交过鱼数据
+export function submitFishDraft(data:any) {
+ return request({
+ url: '/data/fishDraft/submitDrafts',
+ method: 'post',
+ data
+ });
+}
+//审批过鱼数据
+export function successFishDraft(data:any) {
+ return request({
+ url: '/data/fishDraft/batchApprove',
+ method: 'post',
+ data
+ });
+}
+//驳回过鱼数据
+export function rejectFishDraft(data:any) {
+ return request({
+ url: '/data/fishDraft/reject',
+ method: 'post',
+ data
+ });
+}
+// 导入zip
+export function importFishZip(data:FormData) {
+ return request({
+ url: '/data/fishDraft/importZip',
+ method: 'post',
+ data,
+ headers: { 'Content-Type': 'multipart/form-data' }
+ });
+}
+// 提交导入任务
+export function submitImportTask(data:any) {
+ return request({
+ url: '/data/fishDraft/submitDrafts',
+ method: 'post',
+ data
+ });
+}
+// 取消导入任务
+export function cancelImportTask(data:any) {
+ return request({
+ url: '/data/fishDraft/cancelImport',
+ method: 'post',
+ data
+ });
+}
+// 查询导入任务
+export function getImportTask() {
+ return request({
+ url: '/data/importTask/list',
+ method: 'get'
+ });
+}
+//检测用户导入状态
+export function checkImportStatus() {
+ return request({
+ url: '/data/fishDraft/checkImportStatus',
+ method: 'get'
+ });
+}
diff --git a/frontend/src/api/select/index.ts b/frontend/src/api/select/index.ts
new file mode 100644
index 0000000..71b574b
--- /dev/null
+++ b/frontend/src/api/select/index.ts
@@ -0,0 +1,33 @@
+import request from '@/utils/request';
+
+// 基地下拉列表
+export function getBaseDropdown(data:any) {
+ return request({
+ url: '/env/hydrobase/dropdown',
+ method: 'get',
+ data
+ });
+}
+//电站下拉列表
+export function getEngInfoDropdown(params:any) {
+ return request({
+ url: '/env/engInfo/dropdown',
+ method: 'get',
+ params
+ });
+}
+//过鱼设施下拉列表
+export function getFpssDropdown(params:any) {
+ return request({
+ url: '/env/fpss/dropdown',
+ method: 'get',
+ params
+ });
+}
+//鱼类名称下拉列表
+export function getFishDictoryDropdown() {
+ return request({
+ url: '/env/fishDictory/listByName',
+ method: 'get'
+ });
+}
\ No newline at end of file
diff --git a/frontend/src/components/BasicSearch/index.vue b/frontend/src/components/BasicSearch/index.vue
index 6e78549..a0bd480 100644
--- a/frontend/src/components/BasicSearch/index.vue
+++ b/frontend/src/components/BasicSearch/index.vue
@@ -6,6 +6,7 @@
:rules="rules"
layout="inline"
class="basic-search-form"
+ @reset="handleReset"
@finish="handleFinish"
@values-change="handleValuesChange"
>
@@ -18,14 +19,18 @@
:name="item.name"
style="width: 100%; margin-bottom: 0"
>
-
-
+
+
+
triggerManualValuesChange(item.name, val)"
/>
+
triggerManualValuesChange(item.name, val)"
/>
@@ -60,38 +68,40 @@
:placeholder="item.placeholder || '请输入'"
:allow-clear="item.fieldProps?.allowClear"
:style="{ width: item.width ? item.width + 'px' : '200px' }"
+ @change="(e) => triggerManualValuesChange(item.name, e.target.value)"
/>
+
-
-
- {{ opt.label }}
-
-
-
-
+ {{ opt.basename }}
+
+
+
- {{ opt.label }}
-
-
+
+ {{ opt.ennm }}
+
+
@@ -102,27 +112,25 @@
:placeholder="item.placeholder || '请选择'"
:allow-clear="item.fieldProps?.allowClear"
:style="{ width: item.width ? item.width + 'px' : '200px' }"
+ @change="(val) => triggerManualValuesChange(item.name, val)"
>
- {{ opt.label }}
+ {{ opt[item.values?.name] || opt.label || opt.dictName }}
-
+
triggerManualValuesChange(item.name, e.target.value)"
>
-
+
{{ opt.label }}
@@ -149,7 +157,10 @@
\ No newline at end of file
+
diff --git a/frontend/src/components/fishSearch/index.vue b/frontend/src/components/fishSearch/index.vue
index 0c702b8..9fa697d 100644
--- a/frontend/src/components/fishSearch/index.vue
+++ b/frontend/src/components/fishSearch/index.vue
@@ -1,24 +1,28 @@
-
-
-
+
+
+
{{ getFishNameById(tagId) }}
@@ -32,7 +36,7 @@
:key="opt.id"
class="dropdown-item"
:class="{
- 'is-active': Array.isArray(modelValue) && modelValue.includes(opt.id),
+ 'is-active': isSelected(opt.id),
'is-hovered': opt.id === hoveredId,
}"
@click.stop="handleSelectOption(opt)"
@@ -40,11 +44,9 @@
>
{{ opt.name }}
- ✓
-
-
- 无匹配数据
+ ✓
+ 无匹配数据
@@ -66,30 +68,42 @@
\ No newline at end of file
+
diff --git a/frontend/src/store/modules/shuJuTianBao.ts b/frontend/src/store/modules/shuJuTianBao.ts
new file mode 100644
index 0000000..fb3b513
--- /dev/null
+++ b/frontend/src/store/modules/shuJuTianBao.ts
@@ -0,0 +1,61 @@
+import { defineStore } from 'pinia';
+import { ref } from 'vue'; // 使用 ref 更简单直观
+import { getBaseDropdown, getEngInfoDropdown, getFpssDropdown } from '@/api/select';
+
+export const useShuJuTianBaoStore = defineStore('shuJuTianBao', () => {
+ // 1. 直接使用 ref 定义状态,确保响应式
+ const fpssOption = ref([]);
+ const baseOption = ref([]);
+ const engOption = ref([]);
+
+ // 2. 业务逻辑方法
+ const getBaseOption = async () => {
+ try {
+ 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);
+ }
+ };
+
+ const getEngOption = async (baseId: string) => {
+ try {
+ 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);
+ }
+ };
+
+
+ const getFpssOption = async (baseId: string, rstcd: string) => {
+ try {
+ const res = await getFpssDropdown({ baseId, rstcd });
+ fpssOption.value = res.data;
+ } catch (error) {
+ console.log(error);
+ }
+ };
+ // 3. 直接返回 ref 和方法
+ // 在组件中使用时:store.baseOption 会自动解包为数组
+ return {
+ fpssOption,
+ baseOption,
+ engOption,
+ getBaseOption,
+ getEngOption,
+ getFpssOption,
+ };
+});
\ No newline at end of file
diff --git a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao.vue b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao.vue
index 06b9db9..547cc64 100644
--- a/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao.vue
+++ b/frontend/src/views/shuJuTianBao/guoYuSheShiShuJuTianBao.vue
@@ -2,11 +2,16 @@
@@ -23,21 +28,68 @@
-
编辑
-
提交
+
编辑
+
删除
+
查看
+
审批
+
驳回
-
+
+