消毒
This commit is contained in:
@@ -50,4 +50,4 @@ export function searchEarNumbers(query) {
|
||||
method: 'get',
|
||||
params: { sheepNo: query }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,3 +42,11 @@ export function delDisinfect(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function searchSheepfold(query) {
|
||||
return request({
|
||||
url: '/biosafety/disinfect/searchSheepfold',
|
||||
method: 'get',
|
||||
params: {sheepfold: query}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,11 +11,17 @@
|
||||
<el-form-item label="药品名称" prop="mediName">
|
||||
<el-input v-model="queryParams.mediName" placeholder="请输入药品" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="羊舍" prop="sheepfoldId">
|
||||
<el-select v-model="queryParams.sheepfoldId" clearable placeholder="请选择羊舍" filterable style="width: 200px">
|
||||
<el-option v-for="b in barns" :key="b.id" :label="b.sheepfoldName" :value="b.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="羊舍" prop="sheepfoldIds">
|
||||
<el-select v-model="queryParams.sheepfoldIds" multiple collapse-tags collapse-tags-tooltip clearable
|
||||
placeholder="全部羊舍" filterable style="width: 240px" @change="handleSheepfoldChange">
|
||||
<el-option v-for="b in barns" :key="b.sheepfoldId"
|
||||
:label="b.sheepfold_name"
|
||||
:value="b.sheepfoldId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="技术员" prop="technician">
|
||||
<el-select v-model="queryParams.technician" filterable clearable placeholder="请输入技术员姓名" style="width: 100%"
|
||||
@@ -296,7 +302,7 @@
|
||||
|
||||
<script setup name="Disinfect">
|
||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
||||
import { listDisinfect, getDisinfect, delDisinfect, addDisinfect, updateDisinfect } from '@/api/biosafety/disinfect'
|
||||
import { listDisinfect, getDisinfect, delDisinfect, addDisinfect, updateDisinfect,searchSheepfold} from '@/api/biosafety/disinfect'
|
||||
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
||||
import { listUnit } from '@/api/biosafety/unit'
|
||||
import { listUsage } from '@/api/biosafety/usage'
|
||||
@@ -345,6 +351,7 @@ const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
sheepfoldId: null,
|
||||
sheepfoldIds: [], // 新增一个数组属性用于多选羊舍
|
||||
technician: null
|
||||
})
|
||||
|
||||
@@ -567,13 +574,28 @@ function handleAddDetailEdit() {
|
||||
editDetails.value.push({ mediId: null, dosage: 0, unit: null, usageId: null, manufacturer: null, batchNumber: null })
|
||||
}
|
||||
|
||||
// 获取羊舍列表
|
||||
const fetchBarns = async () => {
|
||||
try {
|
||||
const res = await searchSheepfold()
|
||||
barns.value = res.data || []
|
||||
} catch (error) {
|
||||
console.error('获取羊舍失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 羊舍选择变化时自动刷新数据
|
||||
const handleSheepfoldChange = (val) => {
|
||||
getList(queryParams)
|
||||
}
|
||||
|
||||
|
||||
/* ---------- 初始加载 ---------- */
|
||||
onMounted(() => {
|
||||
getList()
|
||||
/* 本地羊舍下拉 */
|
||||
request({ url: '/sheepfold_management/sheepfold_management/list', method: 'get' }).then(res => {
|
||||
barns.value = res.rows
|
||||
})
|
||||
fetchBarns()
|
||||
|
||||
listPrescription({ status: 1, persType: 3 }).then(res => {
|
||||
presOptions.value = res.rows.map(item => ({ id: item.id, label: item.name }))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user