From f5722e4a1b47b832df1d4d9d43c6bd27398ec4ba Mon Sep 17 00:00:00 2001 From: zyk Date: Sat, 7 Mar 2026 11:22:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=83=9A=E8=83=8E=E7=A7=BB=E6=A4=8D?= =?UTF-8?q?=E6=89=80=E6=9C=89=E9=80=BB=E8=BE=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Breeding_records/Breeding_records.js | 10 + src/api/Sperm/Sperm.js | 2 +- src/api/embryodetail/embryodetail.js | 63 + .../Breeding_records/index.vue | 1196 +++++++---------- src/views/embryo/flush/index.vue | 1000 +++++++------- src/views/embryodetail/embryodetail/index.vue | 724 ++++++++++ 6 files changed, 1839 insertions(+), 1156 deletions(-) create mode 100644 src/api/embryodetail/embryodetail.js create mode 100644 src/views/embryodetail/embryodetail/index.vue diff --git a/src/api/Breeding_records/Breeding_records.js b/src/api/Breeding_records/Breeding_records.js index 42a430a..cb651d9 100644 --- a/src/api/Breeding_records/Breeding_records.js +++ b/src/api/Breeding_records/Breeding_records.js @@ -82,4 +82,14 @@ export function getBreedRecordsByTimeRange(sheepId, startDate, endDate) { url: `/Breeding_records/Breeding_records/getByTimeRange/${sheepId}/${startDate}/${endDate}`, method: 'get' }) +} + +// 模糊搜索耳号(用于表单 autocomplete) +// gender: 'ewe'=母羊 'ram'=公羊 不传=不限 +export function searchBreedEarNumbers(query, gender) { + return request({ + url: '/Breeding_records/Breeding_records/searchEarNumbers', + method: 'get', + params: { query, gender } + }) } \ No newline at end of file diff --git a/src/api/Sperm/Sperm.js b/src/api/Sperm/Sperm.js index 26caaa0..2799a3b 100644 --- a/src/api/Sperm/Sperm.js +++ b/src/api/Sperm/Sperm.js @@ -75,4 +75,4 @@ export function exportSperm(query) { data: query, responseType: 'blob' }) -} \ No newline at end of file +} diff --git a/src/api/embryodetail/embryodetail.js b/src/api/embryodetail/embryodetail.js new file mode 100644 index 0000000..ccf1f5d --- /dev/null +++ b/src/api/embryodetail/embryodetail.js @@ -0,0 +1,63 @@ +import request from '@/utils/request' + +// 查询可供移植的胚胎明细 +// flushId 可选:传则只查该批次,不传则返回所有可移植胚胎 +export function listAvailableEmbryos(flushId) { + return request({ + url: '/embryo/detail/available', + method: 'get', + params: flushId ? { flushId } : {} + }) +} + +// 将某枚胚胎标记为已移植,并关联配种记录ID +export function markEmbryoTransferred(id, breedRecordId) { + return request({ + url: '/embryo/detail/markTransferred', + method: 'post', + params: { id, breedRecordId } + }) +} + +// 批量标记胚胎已移植,并同步冲胚表统计字段 +// data: { ids: [1,2,3], breedRecordId: 100 } +export function markBatchEmbryoTransferred(data) { + return request({ + url: '/Breeding_records/Breeding_records/markBatchEmbryoTransferred', + method: 'post', + data: data + }) +} + +// 根据配种记录ID查询已移植的胚胎明细列表(用于"查看胚胎"弹窗) +export function getEmbryosByBreedRecord(breedRecordId) { + return request({ + url: '/Breeding_records/Breeding_records/embryosByBreedRecord/' + breedRecordId, + method: 'get' + }) +} + +// 根据冲胚记录ID查询胚胎明细列表(含父记录字段,供冲胚编辑/查看回显用) +export function listEmbryosByFlushId(flushId) { + return request({ + url: `/embryo/detail/byFlush/${flushId}`, + method: 'get' + }) +} + +// 获取单条胚胎明细 +export function getEmbryoDetail(id) { + return request({ + url: `/embryo/detail/${id}`, + method: 'get' + }) +} + +// 修改单条胚胎明细(如修改去向、存储方式) +export function updateEmbryoDetail(data) { + return request({ + url: '/embryo/detail', + method: 'put', + data: data + }) +} \ No newline at end of file diff --git a/src/views/Breeding_records/Breeding_records/index.vue b/src/views/Breeding_records/Breeding_records/index.vue index 81b510d..a6a12f5 100644 --- a/src/views/Breeding_records/Breeding_records/index.vue +++ b/src/views/Breeding_records/Breeding_records/index.vue @@ -1,417 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -