培养基
This commit is contained in:
parent
04c2ffe8de
commit
8a03e58f04
@ -132,6 +132,46 @@ export function getmediumList(data?: Object) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//获取培养基字典
|
||||||
|
export function getbactmediumList(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/getbactmedium',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//新增培养基
|
||||||
|
export function insertmedium(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/insertmedium',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//修改培养基
|
||||||
|
export function updatemedium(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/updatemedium',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//删除培养基
|
||||||
|
export function deletemedium(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/deletemedium',
|
||||||
|
method: 'delete',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//删除培养基 Array
|
||||||
|
export function deletemediums(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/deletemedium',
|
||||||
|
method: 'delete',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
//微生物报告审核
|
//微生物报告审核
|
||||||
export function cbebCheck(data?: Object) {
|
export function cbebCheck(data?: Object) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@ -426,6 +426,7 @@
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
padding-left: .3125rem !important;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|||||||
0
src/components/Ballpit/index.vue
Normal file
0
src/components/Ballpit/index.vue
Normal file
@ -113,7 +113,7 @@ const visibleChange = (val: any) => {
|
|||||||
currentIndex.value = filterData.value.findIndex(item => item[props.value!] === props.data);
|
currentIndex.value = filterData.value.findIndex(item => item[props.value!] === props.data);
|
||||||
if (currentIndex.value >= 0) {
|
if (currentIndex.value >= 0) {
|
||||||
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
||||||
tableRef.value.setScrollTop(currentIndex.value * 25);
|
tableRef.value.setScrollTop(currentIndex.value * 30);
|
||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ const handleKeydown = (e: any) => {
|
|||||||
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
||||||
|
|
||||||
// 滚动到当前行
|
// 滚动到当前行
|
||||||
tableRef.value.setScrollTop(currentIndex.value * 25);
|
tableRef.value.setScrollTop(currentIndex.value * 30);
|
||||||
|
|
||||||
// 回车确认
|
// 回车确认
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
|
|||||||
@ -14,7 +14,8 @@
|
|||||||
<ArrowUpBold />
|
<ArrowUpBold />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
<el-input v-model="labInfo.ybh" placeholder="样本编号" @keyup.enter="handleQuery" style="width:100%" />
|
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
|
||||||
|
style="width:100%" />
|
||||||
<div class="jtIcon" @click="handleNext">
|
<div class="jtIcon" @click="handleNext">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ArrowDownBold />
|
<ArrowDownBold />
|
||||||
@ -25,8 +26,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="日期:" prop="jyrq">
|
<el-form-item label="日期:" prop="jyrq">
|
||||||
<el-date-picker v-model="labInfo.jyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
<el-date-picker v-model="ybJyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
||||||
value-format="YYYY-MM-DD" :clearable="false" @change="" style="width:100%"></el-date-picker>
|
value-format="YYYY-MM-DD" :clearable="false" @change="jyrqChange"
|
||||||
|
style="width:100%"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -73,7 +75,7 @@
|
|||||||
@previewHandle="previewHandle" />
|
@previewHandle="previewHandle" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="培养基接种" name="third">
|
<el-tab-pane label="培养基接种" name="third">
|
||||||
<Pyj :labPat="labInfo" :labPatKey="queryParams" />
|
<Pyj :labPat="labPat" :labPatKey="queryParams" :userList="userList" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="操作记录" name="fourth">
|
<el-tab-pane label="操作记录" name="fourth">
|
||||||
<Record :labPat="labInfo" :labPatKey="queryParams" />
|
<Record :labPat="labInfo" :labPatKey="queryParams" />
|
||||||
@ -139,6 +141,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<!-- 校验用户 -->
|
||||||
|
<CheckUser ref="checkUserRef" @onConfirm="handleCheckUserConfirm" @onCancel="checkUserCancel" />
|
||||||
<!-- 批量扫码弹窗 -->
|
<!-- 批量扫码弹窗 -->
|
||||||
<BatchCode ref="batchRef" v-model:labPat="labPat" :labPatKey="queryParams" :dictData="dictData"
|
<BatchCode ref="batchRef" v-model:labPat="labPat" :labPatKey="queryParams" :dictData="dictData"
|
||||||
:totalCount="labPatList.length" @goNext="handleNext" @goPrev="handlePrev" @goLast="handleLast"
|
:totalCount="labPatList.length" @goNext="handleNext" @goPrev="handlePrev" @goLast="handleLast"
|
||||||
@ -166,6 +170,7 @@ import Combination from '../components/combination/index.vue'
|
|||||||
import Clinical from '../components/clinical/index.vue'
|
import Clinical from '../components/clinical/index.vue'
|
||||||
import Sample from '../components/sample/index.vue'
|
import Sample from '../components/sample/index.vue'
|
||||||
import ResultGraph from '../components/resultGraph/index.vue'
|
import ResultGraph from '../components/resultGraph/index.vue'
|
||||||
|
import CheckUser from '../work/components/CheckUser.vue';
|
||||||
// 中间部分
|
// 中间部分
|
||||||
import ZbReport from './labresult/zbReport.vue';
|
import ZbReport from './labresult/zbReport.vue';
|
||||||
import CbReport from './labresult/cbReport.vue';
|
import CbReport from './labresult/cbReport.vue';
|
||||||
@ -173,7 +178,7 @@ import Pyj from './labresult/pyj.vue';
|
|||||||
import Record from './labresult/record.vue';
|
import Record from './labresult/record.vue';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { comDict } from '@/utils/dict'
|
import { comDict } from '@/utils/dict'
|
||||||
import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList } from "@/api/liswork/work/LisWork";
|
import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork";
|
||||||
import { wswsamplelistpage, sampleMedInfo } from "@/api/liswork/micro/index";
|
import { wswsamplelistpage, sampleMedInfo } from "@/api/liswork/micro/index";
|
||||||
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
|
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
@ -258,11 +263,55 @@ interface QueryParams {
|
|||||||
finish?: string | number
|
finish?: string | number
|
||||||
autojgbz?: string | number
|
autojgbz?: string | number
|
||||||
}
|
}
|
||||||
|
const ybJyrq = ref('')
|
||||||
|
|
||||||
watch(() => labPat.value, (newValue) => {
|
watch(() => labPat.value, (newValue) => {
|
||||||
queryParams.value.ybh = newValue.ybh;
|
queryParams.value.ybh = newValue.ybh;
|
||||||
|
ybJyrq.value = newValue.jyrq;
|
||||||
}, { deep: true });
|
}, { deep: true });
|
||||||
|
|
||||||
|
const checkUserRef = ref()
|
||||||
|
const jyrqChange = (val: string) => {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
`确定修改当前样本检验日期?`,
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
if (!queryParams.value.yhdh) {
|
||||||
|
checkUserRef.value.open();
|
||||||
|
} else {
|
||||||
|
updateJyrq()
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
fetchLabPat();
|
||||||
|
})
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCheckUserConfirm = (info: { yhdh: string, mm: string }) => {
|
||||||
|
checkuser({ yhdh: info.yhdh, mm: info.mm }).then((response: any) => {
|
||||||
|
if (response.code == 0) {
|
||||||
|
queryParams.value.yhdh = info.yhdh;
|
||||||
|
updateJyrq()
|
||||||
|
} else {
|
||||||
|
fetchLabPat();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
const checkUserCancel = () => {
|
||||||
|
fetchLabPat();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 更新检验日期
|
||||||
|
const updateJyrq = () => {
|
||||||
|
// updateLabPat({ ...queryParams.value, ...labPat.value })
|
||||||
|
};
|
||||||
|
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
const searchQuery = () => {
|
const searchQuery = () => {
|
||||||
let filterMhList = [...originalLabPatList.value];
|
let filterMhList = [...originalLabPatList.value];
|
||||||
@ -287,7 +336,6 @@ const searchQuery = () => {
|
|||||||
selectJob(firstRow);
|
selectJob(firstRow);
|
||||||
} else {
|
} else {
|
||||||
labPat.value = {};
|
labPat.value = {};
|
||||||
labInfo.value = {};
|
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
}
|
}
|
||||||
@ -325,7 +373,6 @@ const handleQueryResult = (params: QueryParams) => {
|
|||||||
selectJob(firstRow);
|
selectJob(firstRow);
|
||||||
} else {
|
} else {
|
||||||
labPat.value = {};
|
labPat.value = {};
|
||||||
labInfo.value = {};
|
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
}
|
}
|
||||||
@ -348,7 +395,6 @@ const mbStore = useCommonStore();
|
|||||||
const yqHandleChange = (val: any) => {
|
const yqHandleChange = (val: any) => {
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
labPat.value = {}
|
labPat.value = {}
|
||||||
labInfo.value = {}
|
|
||||||
mbStore.setLxsrList([]);
|
mbStore.setLxsrList([]);
|
||||||
getSysList()
|
getSysList()
|
||||||
fetchlabPatList()
|
fetchlabPatList()
|
||||||
@ -406,7 +452,7 @@ const selectJob = (job: any) => {
|
|||||||
}
|
}
|
||||||
const zbLabResuts = ref([])
|
const zbLabResuts = ref([])
|
||||||
//载入样本结果表单(中间labresult.vue组件)
|
//载入样本结果表单(中间labresult.vue组件)
|
||||||
const fetchLabResults = async () => {
|
const fetchLabResults = () => {
|
||||||
sampleMedInfo({ jyrq: labInfo.value.jyrq ? labInfo.value.jyrq : queryParams.value.jyrq, yq: labInfo.value.yq, ybh: labInfo.value.ybh }).then((response: any) => {
|
sampleMedInfo({ jyrq: labInfo.value.jyrq ? labInfo.value.jyrq : queryParams.value.jyrq, yq: labInfo.value.yq, ybh: labInfo.value.ybh }).then((response: any) => {
|
||||||
zbLabResuts.value = response.data;
|
zbLabResuts.value = response.data;
|
||||||
})
|
})
|
||||||
@ -463,11 +509,10 @@ const handleQuery = () => {
|
|||||||
|
|
||||||
// 创建新样本
|
// 创建新样本
|
||||||
const handleCreate = () => {
|
const handleCreate = () => {
|
||||||
labInfo.value.jyrq = ''
|
ybJyrq.value = ''
|
||||||
loadDefault({ ...queryParams.value }).then((response: any) => {
|
loadDefault({ ...queryParams.value }).then((response: any) => {
|
||||||
if (response.code == 0) {
|
if (response.code == 0) {
|
||||||
labPat.value = response.data;
|
labPat.value = response.data;
|
||||||
labInfo.value = response.data;
|
|
||||||
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
labPatListRef.value?.clearCurrentRow();
|
labPatListRef.value?.clearCurrentRow();
|
||||||
@ -599,7 +644,6 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
|
|||||||
queryLabPat(data).then((response: any) => {
|
queryLabPat(data).then((response: any) => {
|
||||||
if (response.code == 0) {
|
if (response.code == 0) {
|
||||||
labPat.value = response.data;
|
labPat.value = response.data;
|
||||||
labInfo.value = response.data;
|
|
||||||
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);
|
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
labPatList.value = labPatList.value.map((item, i) =>
|
labPatList.value = labPatList.value.map((item, i) =>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watch, onMounted } from 'vue';
|
import { ref, computed, watch, onMounted } from 'vue';
|
||||||
import { getmeddictList } from '@/api/liswork/micro/index';
|
import { getbactmediumList } from '@/api/liswork/micro/index';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
|
import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
|
||||||
// 组件参数
|
// 组件参数
|
||||||
@ -50,12 +50,12 @@ const loadDictData = async () => {
|
|||||||
try {
|
try {
|
||||||
isDictLoading.value = true;
|
isDictLoading.value = true;
|
||||||
|
|
||||||
const response = await getmeddictList();
|
const response = await getbactmediumList();
|
||||||
|
|
||||||
const rawData = response.data.map((item: any, index: number) => {
|
const rawData = response.data.map((item: any, index: number) => {
|
||||||
return {
|
return {
|
||||||
value: item.ywdh || `未知编码_${index}`, // 确保value存在
|
value: item.mediumno || `未知编码_${index}`, // 确保value存在
|
||||||
label: item.ywmc || `未知名称_${index}`, // 确保label存在
|
label: item.mediumname || `未知名称_${index}`, // 确保label存在
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
// 为每个字典项添加简拼字段
|
// 为每个字典项添加简拼字段
|
||||||
@ -103,7 +103,7 @@ const openDictSelector = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开弹窗前先加载数据(确保每次打开都是最新的)
|
// 打开弹窗前先加载数据(确保每次打开都是最新的)
|
||||||
// await loadDictData();
|
await loadDictData();
|
||||||
|
|
||||||
// 数据加载完成后再显示弹窗
|
// 数据加载完成后再显示弹窗
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
@ -134,7 +134,8 @@ const handleDialogClose = () => {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
openDictSelector, // 暴露打开弹窗的方法
|
openDictSelector, // 暴露打开弹窗的方法
|
||||||
// 可选:暴露其他可能需要的方法(如刷新字典数据)
|
// 可选:暴露其他可能需要的方法(如刷新字典数据)
|
||||||
loadDictData
|
loadDictData,
|
||||||
|
handleDialogClose
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,30 @@
|
|||||||
培养基 {{ tableData?.length }}个
|
培养基 {{ tableData?.length }}个
|
||||||
</template>
|
</template>
|
||||||
<template #mediumname="{ row }">
|
<template #mediumname="{ row }">
|
||||||
<el-input v-model="row.mediumname" size="small" class="full-width-input" @dblclick="handleInputFocus(row)" />
|
<el-input v-model="row.mediumname" size="small" class="full-width-input" @change="handleCsjgEnter(row)"
|
||||||
|
@dblclick="handleInputFocus(row)" />
|
||||||
|
</template>
|
||||||
|
<template #sheetdate="{ row }">
|
||||||
|
<el-date-picker v-model="row.sheetdate" type="datetime" format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
class="full-width-input no-prefix-icon" value-format="YYYY-MM-DD HH:mm:ss" @change="handleCsjgEnter(row)" />
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template #sheetuser="{ row }">
|
||||||
|
<SelectTable v-model:data="row.sheetuser" :fields="ysFields" :tableData="userList" label="nickName"
|
||||||
|
class="full-width-input" value="userName" objKey="userName" :border="true" size="small"
|
||||||
|
@getDataValue="handleCsjgEnter(row)" placeholder="" :clearable="false" />
|
||||||
|
</template>
|
||||||
|
<template #mediu="{ row }">
|
||||||
|
<el-input v-model="row.mediu" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||||
|
</template>
|
||||||
|
<template #comments="{ row }">
|
||||||
|
<el-input v-model="row.comments" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||||
|
</template>
|
||||||
|
<template #conidtions="{ row }">
|
||||||
|
<el-input v-model="row.conidtions" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||||
|
</template>
|
||||||
|
<template #watchinterval="{ row }">
|
||||||
|
<el-input v-model="row.watchinterval" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
<PyjDict ref="pyjRef" :dialogTitle="'培养基选择'" @select="selectItem" />
|
<PyjDict ref="pyjRef" :dialogTitle="'培养基选择'" @select="selectItem" />
|
||||||
@ -21,11 +44,15 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue';
|
import CustomTable from '@/components/elTable/index.vue';
|
||||||
import { getmediumList } from '@/api/liswork/micro/index';
|
import { getmediumList, insertmedium, updatemedium, deletemedium, deletemediums } from '@/api/liswork/micro/index';
|
||||||
import { classCom } from '@/utils/classCom';
|
import { classCom } from '@/utils/classCom';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import PyjDict from './components/pyjDict.vue';
|
import PyjDict from './components/pyjDict.vue';
|
||||||
|
import SelectTable from '@/components/SelectTable/index.vue';
|
||||||
|
// @ts-ignore
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
const autoSize = classCom.useAutoSize()
|
const autoSize = classCom.useAutoSize()
|
||||||
|
const userStore = useUserStore()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
labPat: {
|
labPat: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -36,40 +63,84 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => { }
|
default: () => { }
|
||||||
},
|
},
|
||||||
|
userList: {
|
||||||
|
type: Array as PropType<object[]>,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { labPat, labPatKey } = toRefs(props);
|
const { labPat, labPatKey } = toRefs(props);
|
||||||
|
|
||||||
const checked = ref(false);
|
const checked = ref(false);
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const tableData = ref([]);
|
const tableData: any = ref([]);
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ type: "selection", width: 40, align: 'center', visible: true },
|
{ type: "selection", width: 40, align: 'center', visible: true },
|
||||||
{ label: "培养基", prop: "mediumname", align: 'center', visible: true, width: 80, headerSlot: 'mediumnameHeadTitle', slot: 'mediumname' },
|
{ label: "培养基", prop: "mediumname", align: 'center', visible: true, width: 80, headerSlot: 'mediumnameHeadTitle', slot: 'mediumname' },
|
||||||
{ label: "接种时间", prop: "sheetdate", align: 'center', visible: true, width: 120 },
|
{ label: "接种时间", prop: "sheetdate", align: 'center', visible: true, width: 150, slot: 'sheetdate', showOverflowTooltip: false },
|
||||||
{ label: "接种人", prop: "sheetuser", align: 'center', visible: true, width: 60 },
|
{ label: "接种人", prop: "sheetuser", align: 'center', visible: true, width: 80, slot: 'sheetuser' },
|
||||||
{ label: "培养基结果", prop: "mediu", align: 'center', visible: true, },
|
{ label: "培养基结果", prop: "mediu", align: 'center', visible: true, slot: 'mediu' },
|
||||||
{ label: "转种类型", prop: "comments", align: 'center', visible: true, },
|
{ label: "转种类型", prop: "comments", align: 'center', visible: true, slot: 'comments' },
|
||||||
{ label: "培养周期(小时)", prop: "conidtions", align: 'center', visible: true, width: 100 },
|
{ label: "培养周期(小时)", prop: "conidtions", align: 'center', visible: true, width: 100, slot: 'conidtions' },
|
||||||
{ label: "观察间隔(小时)", prop: "watchinterval", align: 'center', visible: true, width: 100 },
|
{ label: "观察间隔(小时)", prop: "watchinterval", align: 'center', visible: true, width: 100, slot: 'watchinterval' },
|
||||||
]);
|
]);
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true,
|
border: true,
|
||||||
height: '74vh',
|
height: '74vh',
|
||||||
|
// highlightCurrentRow: true,
|
||||||
})
|
})
|
||||||
const pyjRef = ref();
|
const pyjRef = ref();
|
||||||
const handleColumnDragEnd = (data: any) => {
|
const handleColumnDragEnd = (data: any) => {
|
||||||
columns.value = data.columns;
|
columns.value = data.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const updateItem: any = ref(null);
|
||||||
|
|
||||||
|
const handleCsjgEnter = (row: any) => {
|
||||||
|
updatemedium(row)
|
||||||
|
}
|
||||||
const handleInputFocus = (row: any) => {
|
const handleInputFocus = (row: any) => {
|
||||||
|
updateItem.value = row;
|
||||||
pyjRef.value.openDictSelector();
|
pyjRef.value.openDictSelector();
|
||||||
console.log('row', row);
|
console.log('row', row);
|
||||||
}
|
}
|
||||||
const selectItem = (item: any) => {
|
const selectItem = (item: any) => {
|
||||||
|
if (updateItem.value) {
|
||||||
|
tableData.value.forEach((v: any) => {
|
||||||
|
if (updateItem.value.gsid == v.gsid) {
|
||||||
|
v.mediumno = item.value;
|
||||||
|
v.mediumname = item.label;
|
||||||
|
updatemedium(v).then((res: any) => {
|
||||||
|
updateItem.value = null
|
||||||
|
pyjRef.value.handleDialogClose();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log('labPat==>', labPat.value);
|
||||||
|
const data = {
|
||||||
|
mediumno: item.value,
|
||||||
|
mediumname: item.label,
|
||||||
|
jyrq: labPat.value.jyrq,
|
||||||
|
yq: labPat.value.yq,
|
||||||
|
ybh: labPat.value.ybh,
|
||||||
|
sheetdate: labPat.value.sqsj,
|
||||||
|
sheetuser: userStore.name,
|
||||||
|
}
|
||||||
|
insertmedium(data).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableData.value.push(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectedRows = ref([]);
|
const ysFields = ref([
|
||||||
|
{ prop: 'userName', label: '用户代号', width: 80, enablePinyinSearch: true },
|
||||||
|
{ prop: 'nickName', label: '用户姓名', width: 150, enablePinyinSearch: true },
|
||||||
|
])
|
||||||
|
|
||||||
|
const selectedRows: any = ref([]);
|
||||||
const handleSelectionChange = (selection: any) => {
|
const handleSelectionChange = (selection: any) => {
|
||||||
selectedRows.value = selection;
|
selectedRows.value = selection;
|
||||||
}
|
}
|
||||||
@ -89,7 +160,14 @@ const deleteItem = () => {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
}
|
}
|
||||||
).then(() => {
|
).then(() => {
|
||||||
|
const arr = selectedRows.value.map((item: any) => item.gsid);
|
||||||
|
deletemediums(arr).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('删除成功');
|
||||||
|
getbyjList();
|
||||||
|
selectedRows.value = []
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,4 +203,8 @@ watch(() => props.labPat, (newValue) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin: .3125rem;
|
margin: .3125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__prefix) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -48,6 +48,7 @@ const props = defineProps({
|
|||||||
// 组件事件
|
// 组件事件
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
'onConfirm', // 验证成功回调
|
'onConfirm', // 验证成功回调
|
||||||
|
'onCancel'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@ -95,6 +96,7 @@ const handleCancel = () => {
|
|||||||
ruleForm.value.yhdh = '';
|
ruleForm.value.yhdh = '';
|
||||||
ruleForm.value.mm = '';
|
ruleForm.value.mm = '';
|
||||||
ruleFormRef.value.resetFields();
|
ruleFormRef.value.resetFields();
|
||||||
|
emit('onCancel');
|
||||||
};
|
};
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user