Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -42,3 +42,11 @@ export function delDeworm(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询耳号
|
||||||
|
export function searchEarNumbers(query) {
|
||||||
|
return request({
|
||||||
|
url: '/biosafety/deworm/searchEarNumbers',
|
||||||
|
method: 'get',
|
||||||
|
params: { sheepNo: query }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,3 +42,12 @@ export function delDiagnosis(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询耳号
|
||||||
|
export function searchEarNumbers(query) {
|
||||||
|
return request({
|
||||||
|
url: '/diagnosis/diagnosis/searchEarNumbers',
|
||||||
|
method: 'get',
|
||||||
|
params: { sheepNo: query }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,3 +42,11 @@ export function delDisinfect(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function searchSheepfold(query) {
|
||||||
|
return request({
|
||||||
|
url: '/biosafety/disinfect/searchSheepfold',
|
||||||
|
method: 'get',
|
||||||
|
params: {sheepfold: query}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,3 +42,12 @@ export function delHealth(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询耳号
|
||||||
|
export function searchEarNumbers(query) {
|
||||||
|
return request({
|
||||||
|
url: '/biosafety/health/searchEarNumbers',
|
||||||
|
method: 'get',
|
||||||
|
params: { sheepNo: query }
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -42,3 +42,12 @@ export function delImmunity(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询耳号
|
||||||
|
export function searchEarNumbers(query) {
|
||||||
|
return request({
|
||||||
|
url: '/biosafety/immunity/searchEarNumbers',
|
||||||
|
method: 'get',
|
||||||
|
params: { sheepNo: query }
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -42,3 +42,12 @@ export function delQuarantine(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询耳号
|
||||||
|
export function searchEarNumbers(query) {
|
||||||
|
return request({
|
||||||
|
url: '/biosafety/quarantine/searchEarNumbers',
|
||||||
|
method: 'get',
|
||||||
|
params: { sheepNo: query }
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -42,3 +42,12 @@ export function delTreatment(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询耳号
|
||||||
|
export function searchEarNumbers(query) {
|
||||||
|
return request({
|
||||||
|
url: '/treatment/treatment/searchEarNumbers',
|
||||||
|
method: 'get',
|
||||||
|
params: { sheepNo: query }
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -42,3 +42,12 @@ export function delUsageInfo(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询耳号
|
||||||
|
export function searchEarNumbers(query) {
|
||||||
|
return request({
|
||||||
|
url: '/biosafety/usageInfo/searchEarNumbers',
|
||||||
|
method: 'get',
|
||||||
|
params: { sheepNo: query }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -366,12 +366,11 @@
|
|||||||
|
|
||||||
<script setup name="Deworm">
|
<script setup name="Deworm">
|
||||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
||||||
import { listDeworm, getDeworm, delDeworm, addDeworm, updateDeworm } from '@/api/biosafety/deworm'
|
import { listDeworm, getDeworm, delDeworm, addDeworm, updateDeworm, searchEarNumbers} from '@/api/biosafety/deworm'
|
||||||
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
||||||
import { listUnit } from '@/api/biosafety/unit'
|
import { listUnit } from '@/api/biosafety/unit'
|
||||||
import { listUsage } from '@/api/biosafety/usage'
|
import { listUsage } from '@/api/biosafety/usage'
|
||||||
import { listMedicine } from '@/api/biosafety/medicine'
|
import { listMedicine } from '@/api/biosafety/medicine'
|
||||||
import { searchEarNumbers } from '@/api/common/sheep'
|
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import { getUserByPost } from '@/api/common/user'
|
import { getUserByPost } from '@/api/common/user'
|
||||||
@@ -476,29 +475,44 @@
|
|||||||
pasteInput.value = ''
|
pasteInput.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 远程搜索耳号 */
|
|
||||||
function searchEarNumber(query) {
|
function searchEarNumber(query) {
|
||||||
if (query !== '') {
|
if (!query || query.trim() === '') {
|
||||||
earNumberLoading.value = true
|
|
||||||
|
|
||||||
const queries = query.trim().split(/[\s,,]+/).filter(q => q)
|
|
||||||
|
|
||||||
if (queries.length === 1) {
|
|
||||||
// 单个耳号模糊搜索
|
|
||||||
searchEarNumbers(query).then(response => {
|
|
||||||
earNumberOptions.value = response.data || []
|
|
||||||
earNumberLoading.value = false
|
|
||||||
}).catch(() => {
|
|
||||||
earNumberOptions.value = []
|
|
||||||
earNumberLoading.value = false
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 多个耳号直接作为选项
|
|
||||||
earNumberOptions.value = queries
|
|
||||||
earNumberLoading.value = false
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
earNumberOptions.value = []
|
earNumberOptions.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
earNumberLoading.value = true
|
||||||
|
|
||||||
|
// 统一转大写,去重
|
||||||
|
const queries = [...new Set(
|
||||||
|
query.trim().toUpperCase().split(/[\s,,]+/).filter(q => q.length >= 1)
|
||||||
|
)]
|
||||||
|
|
||||||
|
if (queries.length === 0) {
|
||||||
|
earNumberOptions.value = []
|
||||||
|
earNumberLoading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (queries.length === 1) {
|
||||||
|
// 单个耳号模糊搜索
|
||||||
|
searchEarNumbers(queries[0]).then(response => {
|
||||||
|
earNumberOptions.value = response.data || []
|
||||||
|
}).catch(() => {
|
||||||
|
earNumberOptions.value = []
|
||||||
|
}).finally(() => {
|
||||||
|
earNumberLoading.value = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 多个耳号:先显示,再后台校验
|
||||||
|
earNumberOptions.value = queries.map(q => ({ label: q, value: q, validating: true }))
|
||||||
|
earNumberLoading.value = false
|
||||||
|
|
||||||
|
// 可选:调用后端批量校验
|
||||||
|
validateEarNumbers(queries).then(validList => {
|
||||||
|
earNumberOptions.value = validList
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -269,16 +269,10 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template><script setup name="Diagnosis">
|
</template><script setup name="Diagnosis">
|
||||||
import {
|
import {listDiagnosis,getDiagnosis,delDiagnosis,updateDiagnosis,searchEarNumbers} from '@/api/biosafety/diagnosis'
|
||||||
listDiagnosis,
|
|
||||||
getDiagnosis,
|
|
||||||
delDiagnosis,
|
|
||||||
updateDiagnosis,
|
|
||||||
} from '@/api/biosafety/diagnosis'
|
|
||||||
import { listSheepfold_management } from '@/api/fileManagement/sheepfold_management'
|
import { listSheepfold_management } from '@/api/fileManagement/sheepfold_management'
|
||||||
import { listDisease } from '@/api/biosafety/disease'
|
import { listDisease } from '@/api/biosafety/disease'
|
||||||
import { getCurrentInstance, onMounted, ref, watch } from 'vue'
|
import { getCurrentInstance, onMounted, ref, watch } from 'vue'
|
||||||
import { searchEarNumbers } from '@/api/common/sheep'
|
|
||||||
import { getUserByPost } from '@/api/common/user'
|
import { getUserByPost } from '@/api/common/user'
|
||||||
|
|
||||||
const technicalOptions = ref([]) //自定义技术员数组变量
|
const technicalOptions = ref([]) //自定义技术员数组变量
|
||||||
|
|||||||
@@ -11,11 +11,17 @@
|
|||||||
<el-form-item label="药品名称" prop="mediName">
|
<el-form-item label="药品名称" prop="mediName">
|
||||||
<el-input v-model="queryParams.mediName" placeholder="请输入药品" clearable />
|
<el-input v-model="queryParams.mediName" placeholder="请输入药品" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="羊舍" prop="sheepfoldId">
|
|
||||||
<el-select v-model="queryParams.sheepfoldId" clearable placeholder="请选择羊舍" filterable style="width: 200px">
|
<el-form-item label="羊舍" prop="sheepfoldIds">
|
||||||
<el-option v-for="b in barns" :key="b.id" :label="b.sheepfoldName" :value="b.id" />
|
<el-select v-model="queryParams.sheepfoldIds" multiple collapse-tags collapse-tags-tooltip clearable
|
||||||
</el-select>
|
placeholder="全部羊舍" filterable style="width: 240px" @change="handleSheepfoldChange">
|
||||||
</el-form-item>
|
<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-form-item label="技术员" prop="technician">
|
||||||
<el-select v-model="queryParams.technician" filterable clearable placeholder="请输入技术员姓名" style="width: 100%"
|
<el-select v-model="queryParams.technician" filterable clearable placeholder="请输入技术员姓名" style="width: 100%"
|
||||||
@@ -296,7 +302,7 @@
|
|||||||
|
|
||||||
<script setup name="Disinfect">
|
<script setup name="Disinfect">
|
||||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
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 { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
||||||
import { listUnit } from '@/api/biosafety/unit'
|
import { listUnit } from '@/api/biosafety/unit'
|
||||||
import { listUsage } from '@/api/biosafety/usage'
|
import { listUsage } from '@/api/biosafety/usage'
|
||||||
@@ -345,6 +351,7 @@ const queryParams = reactive({
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
sheepfoldId: null,
|
sheepfoldId: null,
|
||||||
|
sheepfoldIds: [], // 新增一个数组属性用于多选羊舍
|
||||||
technician: null
|
technician: null
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -567,13 +574,28 @@ function handleAddDetailEdit() {
|
|||||||
editDetails.value.push({ mediId: null, dosage: 0, unit: null, usageId: null, manufacturer: null, batchNumber: null })
|
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(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
/* 本地羊舍下拉 */
|
/* 本地羊舍下拉 */
|
||||||
request({ url: '/sheepfold_management/sheepfold_management/list', method: 'get' }).then(res => {
|
fetchBarns()
|
||||||
barns.value = res.rows
|
|
||||||
})
|
|
||||||
listPrescription({ status: 1, persType: 3 }).then(res => {
|
listPrescription({ status: 1, persType: 3 }).then(res => {
|
||||||
presOptions.value = res.rows.map(item => ({ id: item.id, label: item.name }))
|
presOptions.value = res.rows.map(item => ({ id: item.id, label: item.name }))
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -374,14 +374,13 @@
|
|||||||
|
|
||||||
<script setup name="Health">
|
<script setup name="Health">
|
||||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
||||||
import { listHealth, getHealth, delHealth, addHealth, updateHealth } from '@/api/biosafety/health'
|
import { listHealth, getHealth, delHealth, addHealth, updateHealth,searchEarNumbers } from '@/api/biosafety/health'
|
||||||
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
||||||
import { listUnit } from '@/api/biosafety/unit'
|
import { listUnit } from '@/api/biosafety/unit'
|
||||||
import { listUsage } from '@/api/biosafety/usage'
|
import { listUsage } from '@/api/biosafety/usage'
|
||||||
import { listMedicine } from '@/api/biosafety/medicine'
|
import { listMedicine } from '@/api/biosafety/medicine'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import { searchEarNumbers } from '@/api/common/sheep'
|
|
||||||
import { getUserByPost } from '@/api/common/user'
|
import { getUserByPost } from '@/api/common/user'
|
||||||
|
|
||||||
const technicalOptions = ref([]) //自定义技术员数组变量
|
const technicalOptions = ref([]) //自定义技术员数组变量
|
||||||
|
|||||||
@@ -371,14 +371,13 @@
|
|||||||
|
|
||||||
<script setup name="Immunity">
|
<script setup name="Immunity">
|
||||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
||||||
import { listImmunity, getImmunity, delImmunity, addImmunity, updateImmunity } from '@/api/biosafety/immunity'
|
import { listImmunity, getImmunity, delImmunity, addImmunity, updateImmunity,searchEarNumbers } from '@/api/biosafety/immunity'
|
||||||
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
||||||
import { listUnit } from '@/api/biosafety/unit'
|
import { listUnit } from '@/api/biosafety/unit'
|
||||||
import { listUsage } from '@/api/biosafety/usage'
|
import { listUsage } from '@/api/biosafety/usage'
|
||||||
import { listMedicine } from '@/api/biosafety/medicine'
|
import { listMedicine } from '@/api/biosafety/medicine'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import { searchEarNumbers } from '@/api/common/sheep'
|
|
||||||
import { getUserByPost } from '@/api/common/user'
|
import { getUserByPost } from '@/api/common/user'
|
||||||
|
|
||||||
const technicalOptions = ref([]) //自定义技术员数组变量
|
const technicalOptions = ref([]) //自定义技术员数组变量
|
||||||
|
|||||||
@@ -399,19 +399,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Quarantine">
|
<script setup name="Quarantine">
|
||||||
import {
|
import {listQuarantine,getQuarantine,delQuarantine,addQuarantine,updateQuarantine,searchEarNumbers} from '@/api/biosafety/quarantine'
|
||||||
listQuarantine,
|
|
||||||
getQuarantine,
|
|
||||||
delQuarantine,
|
|
||||||
addQuarantine,
|
|
||||||
updateQuarantine
|
|
||||||
} from '@/api/biosafety/quarantine'
|
|
||||||
import { listItems } from '@/api/biosafety/items'
|
import { listItems } from '@/api/biosafety/items'
|
||||||
import { listSample } from '@/api/biosafety/sample'
|
import { listSample } from '@/api/biosafety/sample'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { searchEarNumbers } from '@/api/common/sheep'
|
|
||||||
import { getUserByPost } from '@/api/common/user'
|
import { getUserByPost } from '@/api/common/user'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|||||||
@@ -528,7 +528,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
||||||
import { listTreatment, getTreatment, delTreatment, addTreatment, updateTreatment } from '@/api/biosafety/treatment'
|
import { listTreatment, getTreatment, delTreatment, addTreatment, updateTreatment,searchEarNumbers } from '@/api/biosafety/treatment'
|
||||||
import { listDisease } from '@/api/biosafety/disease'
|
import { listDisease } from '@/api/biosafety/disease'
|
||||||
import { listSheepfold_management } from "@/api/fileManagement/sheepfold_management"
|
import { listSheepfold_management } from "@/api/fileManagement/sheepfold_management"
|
||||||
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
import { listPrescription, getPrescription } from '@/api/biosafety/prescription'
|
||||||
@@ -537,7 +537,6 @@ import { listUsage } from '@/api/biosafety/usage'
|
|||||||
import { listMedicine } from '@/api/biosafety/medicine'
|
import { listMedicine } from '@/api/biosafety/medicine'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { searchEarNumbers } from '@/api/common/sheep'
|
|
||||||
import { getUserByPost } from '@/api/common/user'
|
import { getUserByPost } from '@/api/common/user'
|
||||||
|
|
||||||
const technicalOptions = ref([]) //自定义技术员数组变量
|
const technicalOptions = ref([]) //自定义技术员数组变量
|
||||||
|
|||||||
@@ -202,11 +202,10 @@
|
|||||||
|
|
||||||
<script setup name="Usage">
|
<script setup name="Usage">
|
||||||
import { listMedicine} from "@/api/biosafety/medicine"
|
import { listMedicine} from "@/api/biosafety/medicine"
|
||||||
import { listUsageInfo, getUsageInfo } from '@/api/biosafety/usageInfo'
|
import { listUsageInfo, getUsageInfo,searchEarNumbers } from '@/api/biosafety/usageInfo'
|
||||||
import { listUnit } from '@/api/biosafety/unit'
|
import { listUnit } from '@/api/biosafety/unit'
|
||||||
import { listUsage } from '@/api/biosafety/usage'
|
import { listUsage } from '@/api/biosafety/usage'
|
||||||
import { getCurrentInstance, reactive, ref, toRefs } from 'vue'
|
import { getCurrentInstance, reactive, ref, toRefs } from 'vue'
|
||||||
import { searchEarNumbers } from '@/api/common/sheep'
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const { pres_type } = proxy.useDict('pres_type')
|
const { pres_type } = proxy.useDict('pres_type')
|
||||||
|
|||||||
Reference in New Issue
Block a user