Browse Source

feat: [模板管理] 增加选择细菌

ouqian
memorylkf 1 month ago
parent
commit
c8a2eb454b
3 changed files with 67 additions and 3 deletions
  1. +15
    -1
      src/components/Template/SelectTable.vue
  2. +9
    -2
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue
  3. +43
    -0
      src/views/business/comps/template/formConfig/formConfig.js

+ 15
- 1
src/components/Template/SelectTable.vue View File

@ -39,6 +39,11 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</div> </div>
<div v-if="selectType==='9' || selectType==='11'" style="margin-top:10px">
<el-checkbox v-model="checked">其他</el-checkbox>
<el-input v-model="inputVal" :placeholder="$t('form.placeholderInput')" v-if="checked" style="width:300px;margin-left:10px"></el-input>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -52,6 +57,10 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
selectType: {//+
type: String,
default: "1",
},
checkType: {// checkType: {//
type: String, type: String,
default: "radio", default: "radio",
@ -99,7 +108,10 @@ export default {
pageSize: 10, pageSize: 10,
total: 0, total: 0,
}, },
dataSource: []
dataSource: [],
checked:false,
inputVal:''
} }
}, },
watch: { watch: {
@ -118,6 +130,8 @@ export default {
this.localSelectedId = '' this.localSelectedId = ''
this.initSearchForm(); this.initSearchForm();
this.getList(); this.getList();
this.checked = false
this.inputVal = ''
}, },
// //
initSearchForm() { initSearchForm() {

+ 9
- 2
src/views/business/comps/template/dialog/SelectMixReagentDialog.vue View File

@ -9,6 +9,7 @@
</el-radio-group> </el-radio-group>
<SelectTable ref="selectSjRef" :columns="columns" :selectedId="selectedId" :searchForm="searchForm" <SelectTable ref="selectSjRef" :columns="columns" :selectedId="selectedId" :searchForm="searchForm"
:checkType="checkType" :checkType="checkType"
:selectType="selectType"
:studyFormId="studyFormId" :studyId="studyId" :listApi="listApi" :selectedCode="selectedCode" @radioSelect="handleSelect" /> :studyFormId="studyFormId" :studyId="studyId" :listApi="listApi" :selectedCode="selectedCode" @radioSelect="handleSelect" />
<!-- 只有步骤才会又这个选项 --> <!-- 只有步骤才会又这个选项 -->
@ -26,8 +27,8 @@
<script> <script>
import SelectTable from '@/components/Template/SelectTable.vue'; import SelectTable from '@/components/Template/SelectTable.vue';
import SelectDept from "@/views/business/comps/select/SelectDept"; import SelectDept from "@/views/business/comps/select/SelectDept";
import { public_sjList, public_gyzjList, public_gspList, public_xbList,public_jcbList,public_qxFormFillList } from '@/api/business/public/public';
import { getSjSearchForm, getSjColumns, getGyzjSearchForm, getGyzjColumns, getGspSearchForm, getGspColumns, getXbSearchForm, getXbColumns,getJcbSearchForm,getJcbColumns,getQxbdSearchForm,getQxbdColumns } from '@/views/business/comps/template/formConfig/formConfig.js';
import { public_sjList, public_gyzjList, public_gspList, public_xbList,public_jcbList,public_qxFormFillList,public_xjList } from '@/api/business/public/public';
import { getSjSearchForm, getSjColumns, getGyzjSearchForm, getGyzjColumns, getGspSearchForm, getGspColumns, getXbSearchForm, getXbColumns,getJcbSearchForm,getJcbColumns,getQxbdSearchForm,getQxbdColumns, getXjSearchForm, getXjColumns } from '@/views/business/comps/template/formConfig/formConfig.js';
import { EventBus } from "@/utils/eventBus"; import { EventBus } from "@/utils/eventBus";
const typeMap = { const typeMap = {
'1': { '1': {
@ -42,6 +43,12 @@ const typeMap = {
listApi: public_gspList, listApi: public_gspList,
title:"选择供试品" title:"选择供试品"
}, },
"9": {
searchForm: getXjSearchForm(),
columns: getXjColumns(),
listApi: public_xjList,
title:"选择细菌"
},
"11": { "11": {
searchForm: getXbSearchForm(), searchForm: getXbSearchForm(),
columns: getXbColumns(), columns: getXbColumns(),

+ 43
- 0
src/views/business/comps/template/formConfig/formConfig.js View File

@ -236,3 +236,46 @@ export const getQxbdColumns = ($this) => {
} }
] ]
} }
// 细菌列表表格列
export const getXjColumns = () => {
return [
{
prop: 'mc',
label: '名称'
},
{
prop: 'bh',
label: '编号'
},
{
prop: 'tj',
label: '体积'
},
{
prop: 'ly',
label: '来源'
},
{
prop: 'sxr',
label: 'page.business.resource.sj.sxr'
},
{
prop: 'studyName',
label: 'page.business.resource.sj.sssy'
}
]
}
// 细菌列表查询表单
export const getXjSearchForm = () => {
return {
mc: {
label: 'page.business.resource.sj.mc'
},
bh: {
label: 'page.business.resource.sj.bh'
},
studyName: {
label: 'page.business.resource.sj.sssy'
}
}
}

Loading…
Cancel
Save