You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.7 KiB
68 lines
1.7 KiB
<template>
|
|
<div class="d-flex flex-column">
|
|
<search @searchPatientMes="searchPatientMes" />
|
|
<sample-table :lists="lists" @handleSelPatientMes="handleSelPatientMes" class="mt-3" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Search from 'components/BiologicalSampleSearch/Search.vue';
|
|
import SampleTable from 'components/BiologicalSampleSearch/SampleTable.vue';
|
|
import { selPatientMes } from 'config/api';
|
|
import { mapState, mapActions } from 'vuex';
|
|
|
|
export default {
|
|
name: 'BiologicalSampleSearch',
|
|
components: { Search, SampleTable },
|
|
data() {
|
|
return {
|
|
lists: { pageNum: 1, pageSize: 10, total: 1, list: [] },
|
|
hospitalization: '',
|
|
inpatientId: '',
|
|
};
|
|
},
|
|
|
|
created() {
|
|
this.handleSelPatientMes();
|
|
this.getControlGroups();
|
|
},
|
|
|
|
methods: {
|
|
...mapActions('home', ['getControlGroups']),
|
|
|
|
searchPatientMes(value) {
|
|
if (value) {
|
|
this.hospitalization = value.inpatientNumber;
|
|
this.inpatientId = value.groupValue;
|
|
}
|
|
this.handleSelPatientMes();
|
|
},
|
|
|
|
async handleSelPatientMes(pageNum = 1) {
|
|
try {
|
|
const { hospitalization, inpatientId } = this;
|
|
const params = {
|
|
param: {
|
|
hospitalization,
|
|
inpatientId,
|
|
pageNum,
|
|
pageSize: 10,
|
|
},
|
|
};
|
|
const res = await selPatientMes(params);
|
|
const { code, msg, data } = res.data;
|
|
if (code === 200) {
|
|
this.lists = data;
|
|
} else {
|
|
this.$message.error(msg || '查询失败');
|
|
throw msg;
|
|
}
|
|
} catch (error) {
|
|
throw new Error(`CaseSearch.vue method selSearchCriteriaList: ${error}`);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="stylus" scoped></style>
|
|
|