From 6ade88175021176268a1cb9199615282021fd00b Mon Sep 17 00:00:00 2001 From: zyh <2066096076@qq.com> Date: Sun, 1 Mar 2026 14:14:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BE=8A=E5=8F=AA=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E7=BE=8A=E5=8F=AA=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=90=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD=E9=9C=80?= =?UTF-8?q?=E6=B1=82=EF=BC=8C=E6=94=B9=E5=93=81=E7=A7=8D=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=9A=84=E5=8E=9F=E5=93=81=E7=A7=8D=E5=9B=9E=E6=98=BE=E9=9C=80?= =?UTF-8?q?=E6=B1=82=EF=BC=8C=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/frozen/embryo/index.vue | 12 +++- src/views/frozen/sperm/index.vue | 13 ++-- .../produce/bodyManage/body_measure/index.vue | 10 +-- .../produce/bodyManage/body_score/index.vue | 10 +-- .../bodyManage/breast_rating/index.vue | 10 +-- .../produce/manage_sheep/add_sheep/index.vue | 70 +++++++++++-------- .../manage_sheep/changeComment/index.vue | 10 +-- .../produce/manage_sheep/changeEar/index.vue | 9 ++- .../manage_sheep/changeVariety/index.vue | 52 ++++++++++++-- .../manage_sheep/trans_group/index.vue | 11 +-- .../manage_sheep/transition_info/index.vue | 11 +-- src/views/produce/other/castrate/index.vue | 7 +- src/views/produce/other/fixHoof/index.vue | 8 ++- vite.config.js | 2 +- 14 files changed, 162 insertions(+), 73 deletions(-) diff --git a/src/views/frozen/embryo/index.vue b/src/views/frozen/embryo/index.vue index 8048394..515be98 100644 --- a/src/views/frozen/embryo/index.vue +++ b/src/views/frozen/embryo/index.vue @@ -471,9 +471,15 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('frozen/embryo/export', { - ...queryParams.value - }, `embryo_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + + try { + proxy.download('frozen/embryo/export', + {...queryParams.value}, + `冻胚记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } /** 失焦或点击“查询” */ diff --git a/src/views/frozen/sperm/index.vue b/src/views/frozen/sperm/index.vue index b40ffcc..6efa8bf 100644 --- a/src/views/frozen/sperm/index.vue +++ b/src/views/frozen/sperm/index.vue @@ -500,11 +500,16 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('sperm/sperm/export', { - ...queryParams.value - }, `sperm_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + + try { + proxy.download('sperm/sperm/export', { + ...queryParams.value + }, `冻精记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } - // 废弃 function handleDiscard() { if (!ids.value.length) return proxy.$modal.msgWarning('请选择记录') diff --git a/src/views/produce/bodyManage/body_measure/index.vue b/src/views/produce/bodyManage/body_measure/index.vue index 140538e..1480691 100644 --- a/src/views/produce/bodyManage/body_measure/index.vue +++ b/src/views/produce/bodyManage/body_measure/index.vue @@ -569,11 +569,13 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('body_measure/body_measure/export', { - ...queryParams.value - }, `body_measure_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + try { + proxy.download('body_measure/body_measure/export', { ...queryParams.value }, `体尺测量记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } - //加载羊舍数据 const sheepfoldOptions = ref([]) function getSheepfoldOptions() { diff --git a/src/views/produce/bodyManage/body_score/index.vue b/src/views/produce/bodyManage/body_score/index.vue index c06f932..a7dd0f7 100644 --- a/src/views/produce/bodyManage/body_score/index.vue +++ b/src/views/produce/bodyManage/body_score/index.vue @@ -501,11 +501,13 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('body_score/body_score/export', { - ...queryParams.value - }, `body_score_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + try { + proxy.download('body_score/body_score/export', { ...queryParams.value }, `体况评分记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } - //加载品种数据 const varietyOptions = ref([]) function loadVarietyOptions() { diff --git a/src/views/produce/bodyManage/breast_rating/index.vue b/src/views/produce/bodyManage/breast_rating/index.vue index 00f7238..1255989 100644 --- a/src/views/produce/bodyManage/breast_rating/index.vue +++ b/src/views/produce/bodyManage/breast_rating/index.vue @@ -510,11 +510,13 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('breast_rating/breast_rating/export', { - ...queryParams.value - }, `breast_rating_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + try { + proxy.download('breast_rating/breast_rating/export', { ...queryParams.value }, `乳况评分记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } - //加载羊舍数据 const sheepfoldOptions = ref([]) function getSheepfoldOptions() { diff --git a/src/views/produce/manage_sheep/add_sheep/index.vue b/src/views/produce/manage_sheep/add_sheep/index.vue index e701102..6640144 100644 --- a/src/views/produce/manage_sheep/add_sheep/index.vue +++ b/src/views/produce/manage_sheep/add_sheep/index.vue @@ -5,7 +5,6 @@ v-hasPermi="['produce:add_sheep:import']">导入 下载模板 - @@ -15,14 +14,6 @@ - - - - - - - - @@ -30,6 +21,9 @@ + + + @@ -37,45 +31,50 @@ - - - + + + + + + + + + + + + + + + + - - - - - - - - @@ -88,6 +87,14 @@ + + + + + + + + @@ -95,9 +102,6 @@ - - - @@ -105,13 +109,21 @@ + + + + + + + + @@ -174,7 +186,9 @@ const form = ref({ joinDate: '', comment: '', technician: '', - weaningWeight: '' + weaningWeight: '', + grandpa: '', + grandma: '', }) const formRef = ref(null) const sheepfoldOptions = ref([]) @@ -209,12 +223,10 @@ const rules = { ranchId: [{ required: true, message: '请选择牧场', trigger: 'change' }], sheepfold: [{ required: true, message: '请选择羊舍', trigger: 'change' }], bornWeight: [{ required: true, message: '请输入出生体重', trigger: 'change' }], - weaningWeight: [{ required: true, message: '请输入断奶体重', trigger: 'blur' }], birthday: [{ required: true, message: '请选择出生日期', trigger: 'change' }], gender: [{ required: true, message: '请选择性别', trigger: 'change' }], varietyId: [{ required: true, message: '请选择品种', trigger: 'change' }], joinDate: [{ required: true, message: '请选择入群日期', trigger: 'change' }], - technician: [{ required: true, message: '请输入技术员', trigger: 'change' }], } // 校验耳号是否存在 @@ -354,7 +366,9 @@ function resetForm() { typeId: null, joinDate: '', comment: '', - technician: '' + technician: '', + grandpa: '', + grandma: '', } } //下载模板 diff --git a/src/views/produce/manage_sheep/changeComment/index.vue b/src/views/produce/manage_sheep/changeComment/index.vue index 037fba8..c0ec08f 100644 --- a/src/views/produce/manage_sheep/changeComment/index.vue +++ b/src/views/produce/manage_sheep/changeComment/index.vue @@ -436,11 +436,13 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('changeComment/changeComment/export', { - ...queryParams.value - }, `changeComment_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + try { + proxy.download('changeComment/changeComment/export', { ...queryParams.value }, `改备注记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } - //加载羊舍数据 const sheepfoldOptions = ref([]) function getSheepfoldOptions() { diff --git a/src/views/produce/manage_sheep/changeEar/index.vue b/src/views/produce/manage_sheep/changeEar/index.vue index 869f539..52d5a3b 100644 --- a/src/views/produce/manage_sheep/changeEar/index.vue +++ b/src/views/produce/manage_sheep/changeEar/index.vue @@ -476,9 +476,12 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('changeEar/changeEar/export', { - ...queryParams.value - }, `changeEar_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + try { + proxy.download('changeEar/changeEar/export', { ...queryParams.value }, `改耳号记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } //加载羊舍数据 diff --git a/src/views/produce/manage_sheep/changeVariety/index.vue b/src/views/produce/manage_sheep/changeVariety/index.vue index 28aeedc..ef4cd05 100644 --- a/src/views/produce/manage_sheep/changeVariety/index.vue +++ b/src/views/produce/manage_sheep/changeVariety/index.vue @@ -157,7 +157,13 @@ - + 请输入耳号后自动获取 + + + {{ sheep.varietyName || '未知品种' }} + + @@ -437,12 +443,18 @@ function handleDelete(row) { /** 导出按钮操作 */ function handleExport() { - proxy.download('changeVariety/changeVariety/export', { - ...queryParams.value - }, `changeVariety_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + + try { + proxy.download('changeVariety/changeVariety/export', + { ...queryParams.value }, + `改品种记录_${Date.now()}.xlsx` + ); + } finally { + queryParams.value.ids = null; + } } - //加载羊舍数据 const sheepfoldOptions = ref([]) function getSheepfoldOptions() { @@ -589,4 +601,34 @@ onMounted(() => { flex-wrap: wrap; align-items: center; } + +.variety-old-list { + min-height: 32px; + /* 与el-input高度一致 */ + max-height: 150px; + overflow-y: auto; + padding: 4px 8px; + background-color: #f5f7fa; + border: 1px solid #dcdfe6; + border-radius: 4px; + display: flex; + flex-wrap: wrap; + align-items: center; + box-sizing: border-box; + width: 100%; +} + +.placeholder-text { + display: block; + min-height: 32px; + line-height: 32px; + padding: 0 8px; + background-color: #f5f7fa; + border: 1px solid #dcdfe6; + border-radius: 4px; + color: #c0c4cc; + font-size: 14px; + box-sizing: border-box; + width: 100%; +} \ No newline at end of file diff --git a/src/views/produce/manage_sheep/trans_group/index.vue b/src/views/produce/manage_sheep/trans_group/index.vue index 0d26029..df76735 100644 --- a/src/views/produce/manage_sheep/trans_group/index.vue +++ b/src/views/produce/manage_sheep/trans_group/index.vue @@ -759,11 +759,12 @@ function handleDelete(row) { } //导出 function handleExport() { - proxy.download( - '/produce/manage_sheep/trans_group/export', - { ...queryParams.value }, - `trans_group_${Date.now()}.xlsx` - ); + queryParams.value.ids = ids.value; + try { + proxy.download('/produce/manage_sheep/trans_group/export', { ...queryParams.value }, `转群记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } //加载羊舍数据 diff --git a/src/views/produce/manage_sheep/transition_info/index.vue b/src/views/produce/manage_sheep/transition_info/index.vue index 57e60d1..7f7739a 100644 --- a/src/views/produce/manage_sheep/transition_info/index.vue +++ b/src/views/produce/manage_sheep/transition_info/index.vue @@ -574,11 +574,12 @@ async function loadSheepInfo() { // 导出 function handleExport() { - proxy.download( - '/produce/manage_sheep/transition_info/export', - { ...queryParams.value }, - `transition_info_${Date.now()}.xlsx` - ); + queryParams.value.ids = ids.value; + try { + proxy.download('/produce/manage_sheep/transition_info/export', { ...queryParams.value }, `转场记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } // 审批 diff --git a/src/views/produce/other/castrate/index.vue b/src/views/produce/other/castrate/index.vue index 4b5ed21..6b5a38d 100644 --- a/src/views/produce/other/castrate/index.vue +++ b/src/views/produce/other/castrate/index.vue @@ -510,7 +510,12 @@ function handleDelete(row) { //导出 function handleExport() { - proxy.download('/produce/other/castrate/export', { ...queryParams.value }, `castrate_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + try { + proxy.download('/produce/other/castrate/export', { ...queryParams.value }, `去势记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } // 获取技术员列表(岗位编码:techs) const fetchTechnicalList = () => { diff --git a/src/views/produce/other/fixHoof/index.vue b/src/views/produce/other/fixHoof/index.vue index 4eac954..d4d2ab3 100644 --- a/src/views/produce/other/fixHoof/index.vue +++ b/src/views/produce/other/fixHoof/index.vue @@ -470,9 +470,13 @@ function handleDelete(row) { //导出 function handleExport() { - proxy.download('/produce/other/fixHoof/export', { ...queryParams.value }, `fixHoof_${new Date().getTime()}.xlsx`) + queryParams.value.ids = ids.value; + try { + proxy.download('/produce/other/fixHoof/export', { ...queryParams.value }, `修蹄记录${Date.now()}.xlsx`); + } finally { + queryParams.value.ids = null; + } } - //加载羊舍数据 const sheepfoldOptions = ref([]) function getSheepfoldOptions() { diff --git a/vite.config.js b/vite.config.js index 81769ba..daaf5df 100644 --- a/vite.config.js +++ b/vite.config.js @@ -57,7 +57,7 @@ export default defineConfig(({ mode, command }) => { }, // vite 相关配置 server: { - port: 80, + port: 8082, host: true, open: true, proxy: {