diff --git a/src/api/fileManagement/sheep_file.js b/src/api/fileManagement/sheep_file.js
index c0bb7f1..eb456a5 100644
--- a/src/api/fileManagement/sheep_file.js
+++ b/src/api/fileManagement/sheep_file.js
@@ -1,11 +1,11 @@
import request from '@/utils/request'
-// 查询羊只档案列表
+// 羊只档案列表查询
export function listSheep_file(query) {
return request({
url: '/sheep_file/sheep_file/list',
- method: 'get',
- params: query
+ method: 'post', // 改为 POST
+ data: query // 使用 data 而不是 params
})
}
@@ -26,6 +26,15 @@ export function delSheep_file(id) {
})
}
+// 羊只档案导出
+export function exportSheep_file(query) {
+ return request({
+ url: '/sheep_file/sheep_file/export',
+ method: 'post', // 改为 POST
+ data: query, // 使用 data 而不是 params
+ responseType: 'blob'
+ })
+}
// 在群总数
@@ -47,3 +56,22 @@ export function getVarietyStat() {
export function getLactationParityStat() {
return request({ url: '/sheep_file/sheep_file/stat/lactationParity', method: 'get' })
}
+
+/**
+ * 新增API:获取字段的唯一值列表
+ * 用于前端筛选条件中的下拉选项数据
+ *
+ * @param {string} fieldName 字段名(数据库列名)
+ * @returns 包含字段唯一值列表的Promise
+ *
+ * 使用示例:
+ * getFieldValues('bs_manage_tags').then(values => {
+ * console.log(values); // ["AF00001", "AF00002", "AF00003"]
+ * });
+ */
+export function getFieldValues(fieldName) {
+ return request({
+ url: '/sheep_file/sheep_file/field/' + fieldName,
+ method: 'get'
+ })
+}
diff --git a/src/components/CustomFilter/index.vue b/src/components/CustomFilter/index.vue
new file mode 100644
index 0000000..c7a0dca
--- /dev/null
+++ b/src/components/CustomFilter/index.vue
@@ -0,0 +1,818 @@
+
+
+ 添加筛选条件
+ 已添加的条件
+