luojie 3 months ago
parent
commit
e3851470b1
13 changed files with 182 additions and 115 deletions
  1. +8
    -0
      src/api/business/public/public.js
  2. +19
    -38
      src/components/Template/SelectTable.vue
  3. +5
    -0
      src/lang/en/business/resource/sj.js
  4. +1
    -1
      src/lang/zh.js
  5. +5
    -0
      src/lang/zh/business/resource/sj.js
  6. +2
    -2
      src/layout/components/AppMain.vue
  7. +38
    -13
      src/views/business/comps/template/comps/gy/MJYLQSQD.vue
  8. +3
    -5
      src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue
  9. +39
    -8
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue
  10. +4
    -5
      src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
  11. +47
    -31
      src/views/business/comps/template/dialog/SelectReagentDialog.vue
  12. +11
    -1
      src/views/business/study/comp/tbbd/Bj.vue
  13. +0
    -11
      src/views/business/study/comp/tbbd/Fh.vue

+ 8
- 0
src/api/business/public/public.js View File

@ -51,3 +51,11 @@ export function public_animalSpeciesList(query) {
params: query
})
}
// 试剂列表
export function public_sjList(query) {
return request({
url: '/system/business/public/sjList',
method: 'get',
params: query
})
}

+ 19
- 38
src/components/Template/SelectTable.vue View File

@ -1,16 +1,17 @@
<template>
<div>
<div >
<el-form :inline="true" class="demo-form-inline">
<el-form-item v-for="(item,key) in searchForm" :key="key" :label="item.label">
<el-select v-if="item.type === 'select'" v-model="listParams[key]" placeholder="请选择">
<el-form :inline="true" class="demo-form-inline" ref="SearchSjRef">
<el-form-item v-for="(item,key) in searchForm" :key="key" :label="$t(item.label)">
<el-select v-if="item.type === 'select'" v-model="listParams[key]" :placeholder="$t('form.placeholderSelect')">
<el-option v-for="(opt) in item.options" :key="opt.value" :label="opt.label" :value="opt.value"></el-option>
</el-select>
<el-input v-else v-model="listParams[key]" placeholder="请输入"></el-input>
<el-input v-else v-model="listParams[key]" :placeholder="$t('form.placeholderInput')"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button>
<el-button type="primary" @click="onSearch">{{$t('form.search')}}</el-button>
<el-button @click="reset">{{ $t('form.reset') }}</el-button>
</el-form-item>
</el-form>
<el-table :data="dataSource" :row-key="(row) => row.id">
@ -19,7 +20,7 @@
<el-radio v-model="localSelectedId" :label="scope.row[selectedCode]" class="hide-label" @input.native.stop="handleRadioClick(scope.row)"></el-radio>
</template>
</el-table-column>
<el-table-column v-for="(item) in columns" :prop="item.prop" :key="item.prop" :label="item.label">
<el-table-column v-for="(item) in columns" :prop="item.prop" :key="item.prop" :label="$t(item.label)">
</el-table-column>
</el-table>
<div class="mt-10">
@ -60,7 +61,7 @@ export default {
},
selectedCode: {
type: String,
default: "code",//radio
default: "bh",//radio
},
listApi:{
type: Function,
@ -79,35 +80,7 @@ export default {
pageSize: 10,
total: 0,
},
dataSource: [
{
id: 1,
name: '试剂1',
code: 'R001',
sjnd: '100',
unit: 'mg/mL',
expireDate: '2023-12-31',
ss: '试验1',
},
{
id: 2,
name: '试剂2',
code: 'R002',
sjnd: '200',
unit: 'mg/mL',
expireDate: '2024-06-30',
ss: '试验2',
},
{
id: 3,
name: '试剂2',
code: 'R002',
sjnd: '200',
unit: 'mg/mL',
expireDate: '2024-06-30',
ss: '试验2',
},
]
dataSource: []
}
},
watch: {
@ -119,10 +92,14 @@ export default {
},
},
mounted() {
this.getList();
this.initSearchForm();
},
methods: {
show(){
this.localSelectedId = ''
this.getList();
this.initSearchForm();
},
//
initSearchForm() {
for(let key in this.searchForm) {
@ -144,6 +121,10 @@ export default {
this.pagination.pageNum = 1;
this.getList();
},
reset(){
this.$refs.SearchSjRef.resetFields()
this.onSearch()
},
//
handleSizeChange(e) {
this.$emit("pagination", {pageSize: e});

+ 5
- 0
src/lang/en/business/resource/sj.js View File

@ -61,4 +61,9 @@ export default {
jssj: 'Unlock',
sqjy: 'Apply for Check-out',
sdsj: 'Lock',
//选择试剂弹窗
xzsj: 'Select Solution',
sjmc: 'Solution Name',
sjbh: 'Solution ID',
sjnd: 'Solution Concentration'
}

+ 1
- 1
src/lang/zh.js View File

@ -14,7 +14,7 @@ import template from './zh/system/template'
// 公共模板语言配置
import commonTemplate from './zh/template/commonTemplate'
//色谱模板
import sp from './en/template/sp'
import sp from './zh/template/sp'
// 试验管理
import study from './zh/business/study/study'

+ 5
- 0
src/lang/zh/business/resource/sj.js View File

@ -62,4 +62,9 @@ export default {
jssj: '解锁试剂',
sqjy: '申请借阅',
sdsj: '锁定试剂',
//选择试剂弹窗
xzsj: '请选择试剂',
sjmc: '试剂名称',
sjbh: '试剂编号',
sjnd: '试剂浓度'
}

+ 2
- 2
src/layout/components/AppMain.vue View File

@ -1,9 +1,9 @@
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<!-- <keep-alive :include="cachedViews"> -->
<router-view v-if="!$route.meta.link" :key="key" />
</keep-alive>
<!-- </keep-alive> -->
</transition>
<iframe-toggle />
<copyright />

+ 38
- 13
src/views/business/comps/template/comps/gy/MJYLQSQD.vue View File

@ -19,11 +19,13 @@
</div>
<SelectReagentDialog
type = "MJYLQSQD"
selectedCode="sn"
title = "请选择试验/部门"
:searchForm="searchForm"
:columns="columns"
@submit="onDialogSubmit"
@cancel="visible=false"
ref="selectReagentDialogRef" :visible.sync="visible" >
:listApi="public_studyList"
ref="selectReagentDialogRef" >
</SelectReagentDialog>
</div>
</template>
@ -35,6 +37,7 @@ import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import SelectReagentDialog from "../../dialog/SelectReagentDialog.vue";
import { public_studyList } from '@/api/business/public/public';
export default {
name: "MJYLQSQD",
@ -173,18 +176,40 @@ export default {
},
data() {
return {
visible:false,
public_studyList:public_studyList,
searchForm: {
symc: {
label:"试验名称",
name: {
label:this.$t('page.business.study.study.name'),
},
sybh: {
label:"试验编号",
sn: {
label:this.$t('page.business.study.study.sn'),
},
createUser: {
label:"创建人",
leaderName: {
label:this.$t('page.business.study.study.leader'),
},
},
columns:[
{
prop: 'name',
label: 'page.business.study.study.name',
},
{
prop: 'sn',
label: 'page.business.study.study.sn',
},
{
prop: 'status',
label: 'page.business.study.study.status',
},
{
prop: 'leaderName',
label: 'page.business.study.study.leader',
},
{
prop: 'createTime',
label: 'page.business.study.study.createDate',
}
]
};
},
mounted() {
@ -192,15 +217,15 @@ export default {
methods: {
onDialogSubmit(selectedId,currentRow){
this.$refs.baseInfoRef.batchUpdateFormData({
syNo: currentRow.syNo,
SD: currentRow.SD,
syNo: currentRow.sn,
SD: currentRow.leaderName,
});
console.log(currentRow,"currentRow")
this.visible = false;
this.$refs.selectReagentDialogRef.onCancel()
},
//
onClickSybh() {
this.visible = true;
this.$refs.selectReagentDialogRef.show()
// this.$refs.baseInfoRef.setClickable("syNo", true);
},
//

+ 3
- 5
src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue View File

@ -32,8 +32,7 @@
</div>
<SelectReagentDialog
@submit="onSelectReagentSubmit"
@cancel="selectReagentVisible=false"
ref="selectReagentDialogRef" :visible.sync="selectReagentVisible" >
ref="selectReagentDialogRef" >
</SelectReagentDialog>
</div>
</template>
@ -401,7 +400,6 @@ export default {
},
data() {
return {
selectReagentVisible: false,
subSolutionVisible: false,
currentSubKey: "",//key
stepTableDataSource: [],
@ -432,7 +430,7 @@ export default {
}
const {subKey = ""} = item;
if(subKey === "subStartSolution" || subKey === "subSolution"){//
this.selectReagentVisible = true;
this.$refs.selectReagentDialogRef.show()
this.currentSubKey = subKey;
}
},
@ -443,7 +441,7 @@ export default {
this.updateStepTableData(row);
}
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code);
this.selectReagentVisible = false;
this.$refs.selectReagentDialogRef.onCancel()
},
//table
updateStepTableData(row){

+ 39
- 8
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue View File

@ -17,7 +17,7 @@
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
:formData="formData" @clickable="handleJzClickable" />
<CustomTable
@blur="onHandleTableBlur"
@ -46,6 +46,11 @@
</div>
</div>
<!-- <button @click = "onSave">保存</button> -->
<SelectReagentDialog
@submit="onSelectReagentSubmit"
ref="selectReagentDialogRef" >
</SelectReagentDialog>
</div>
</template>
@ -59,10 +64,11 @@ import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import SelectReagentDialog from '../../../dialog/SelectReagentDialog.vue';
export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion },
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion,SelectReagentDialog },
mixins: [templateMixin],
props: {
fillType: {
@ -203,7 +209,7 @@ export default {
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subSolution",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
},
@ -217,8 +223,12 @@ export default {
},
data() {
return {
reagentType: "",//12
currentSubKey: "",//key
rowIndex:0,//
resource: [],
resourceData1: [],
sysjColumns: [
{ label: 'template.common.reagentName', prop: "mc" },//
{ label: 'template.common.reagentCode', prop: "bh" },//
@ -250,15 +260,35 @@ export default {
}
},
methods: {
//
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
},
//
onSelectReagentSubmit(code,row){
if(this.reagentType===1){
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code);
}else{
this.$refs.tableRef.updateDataSourceByRowIndex(this.rowIndex,{
[this.currentSubKey]: code,
})
}
this.$refs.selectReagentDialogRef.onCancel()
},
//
handleClickable(col, rowIndex) {
//
this.reagentType = 2
this.rowIndex = rowIndex
this.currentSubKey = col.prop;
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//
//-
this.$refs.selectReagentDialogRef.show()
}
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex,{
sjry: "我是填充进来的数据",
})
},
//
async getCode(){
@ -312,6 +342,7 @@ export default {
tableRef.deleteRow(rowIndex);
}
},
}
};

+ 4
- 5
src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue View File

@ -82,8 +82,8 @@
</div>
<button @click="onSave">保存</button>
</div>
<SelectReagentDialog @submit="onSelectReagentSubmit" @cancel="selectReagentVisible = false"
ref="selectReagentDialogRef" :visible.sync="selectReagentVisible">
<SelectReagentDialog @submit="onSelectReagentSubmit"
ref="selectReagentDialogRef">
</SelectReagentDialog>
</div>
</template>
@ -146,7 +146,6 @@ export default {
},
data() {
return {
selectReagentVisible: false,
subSolutionVisible: false,
currentSubKey: "",//key
currentType: "",//
@ -255,7 +254,7 @@ export default {
console.log(type, rowIndex, item, "handle")
const { subKey = "" } = item;
if (subKey === "subStartSolution" || subKey === "subSolution") {//
this.selectReagentVisible = true;
this.$refs.selectReagentDialogRef.show()
this.currentSubKey = subKey;
this.currentType = type;
this.currentRowIndex = rowIndex;
@ -277,7 +276,7 @@ export default {
});
}
// this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code);
this.selectReagentVisible = false;
this.$refs.selectReagentDialogRef.onCancel()
},
//
async validFields() {

+ 47
- 31
src/views/business/comps/template/dialog/SelectReagentDialog.vue View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="title" @close="onCancel" :visible.sync="visible" append-to-body>
<el-dialog :title="$t(title)" @close="onCancel" :visible.sync="visible" append-to-body width="80%">
<!-- 麻醉/精神药品配制/领取申请单 -->
<div v-if="type === 'MJYLQSQD'" class="header-row">
<el-radio-group v-model="radio">
@ -8,7 +8,7 @@
部门
</el-radio>
</el-radio-group>
<el-select v-model="depart" filterable placeholder="请选择">
<el-select v-model="depart" filterable :placeholder="$t('form.placeholderSelect')">
<el-option
v-for="item in options"
:key="item.value"
@ -18,21 +18,22 @@
</el-select>
</div>
<SelectTable v-if = "isShowTable" :columns="columns"
<SelectTable v-if = "isShowTable" ref="selectSjRef" :columns="columns"
:selectedId="selectedId"
:searchForm="searchForm"
:listApi="listApi"
:selectedCode="selectedCode"
@radioSelect="handleSelect"/>
<template slot="footer" class="dialog-footer">
<el-button @click="onCancel">取消</el-button>
<el-button :disabled="isDisabled" type="primary" @click="onSubmit">确定</el-button>
<el-button @click="onCancel">{{$t('form.cancel')}}</el-button>
<el-button :disabled="isDisabled" type="primary" @click="onSubmit">{{$t('form.saveConfirm')}}</el-button>
</template>
</el-dialog>
</template>
<script>
import SelectTable from '@/components/Template/SelectTable.vue';
import { getReagentList } from '@/api/template';
import { public_sjList } from '@/api/business/public/public';
export default {
components: {
@ -43,30 +44,30 @@ export default {
type: String,
default: "",
},
visible: {
type: Boolean,
default: false,
},
title: {
type: String,
default: "选择试剂",
default: "page.business.resource.sj.xzsj",
},
selectedCode: {
type: String,
default: "bh",
},
listApi: {
type: Function,
default: getReagentList,
default: public_sjList,
},
searchForm: {
type: Object,
default: () => {
return {
name: {
label:"试剂名称",
mc: {
label:'page.business.resource.sj.sjmc',
},
code: {
label:"试剂编号",
bh: {
label:'page.business.resource.sj.sjbh',
},
sssy: {
label:"所属试验",
studyName: {
label:'page.business.resource.sj.sssy',
},
}
},
@ -75,34 +76,35 @@ export default {
type: Array,
default: () => [
{
prop: 'name',
label: '试剂名称',
prop: 'mc',
label: 'page.business.resource.sj.sjmc',
},
{
prop: 'code',
label: '试剂编号',
prop: 'bh',
label: 'page.business.resource.sj.sjbh',
},
{
prop: 'sjnd',
label: '试剂浓度',
prop: 'nd',
label: 'page.business.resource.sj.sjnd',
},
{
prop: 'unit',
label: '浓度单位',
prop: 'nddw',
label: 'page.business.resource.gsp.nddw',
},
{
prop: 'expireDate',
label: '失效日',
prop: 'sxr',
label: 'page.business.resource.sj.sxr',
},
{
prop: 'ss',
label: '所属试验',
prop: 'studyName',
label: 'page.business.resource.sj.sssy',
},
],
},
},
data() {
return {
visible:false,
selectedId: "",
currentRow: {},
radio:1,
@ -138,14 +140,28 @@ export default {
}
},
methods: {
show(){
this.visible = true
this.showTableData()
},
showTableData(){
if(this.$refs.selectSjRef){
this.$refs.selectSjRef.show()
}else{
setTimeout(() => {
this.showTableData()
}, 100);
}
},
onCancel() {
this.visible = false
this.$emit('cancel');
},
onSubmit() {
let row = this.currentRow;
if(this.type === 'MJYLQSQD') {
if(this.radio === 1) {
row = {syNo:row.ss,SD:row.code};
row = row;
}else{
const o = this.options.find(item => item.value === this.depart);
row = {syNo:o.label,SD:o.value};

+ 11
- 1
src/views/business/study/comp/tbbd/Bj.vue View File

@ -224,7 +224,7 @@
</template>
<script>
import { studyFormFill_bc, studyFormFill_updateBdnr, studyFormFill_tj, studyFormFill_info } from "@/api/business/study/studyFormFill"
import { studyFormFill_bc, studyFormFill_updateBdnr, studyFormFill_tj, studyFormFill_info,studyFormFill_updateFhyjjl } from "@/api/business/study/studyFormFill"
import { study_info } from "@/api/business/study/study"
import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
@ -312,6 +312,16 @@ export default {
}
).then(response => {
})
} else if (data.type == 'reply') {
// {"type":"reply","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormFill_updateFhyjjl(
{
id: this.form.id,
reply: JSON.stringify(data.newRecord),
fhyjjl: JSON.stringify(data.resourceList)
}
).then(response => {
})
}
},
delcc(index) {

+ 0
- 11
src/views/business/study/comp/tbbd/Fh.vue View File

@ -186,17 +186,6 @@ export default {
).then(response => {
})
}
else if (data.type == 'reply') {
// {"type":"reply","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormFill_updateFhyjjl(
{
id: this.form.id,
reply: JSON.stringify(data.newRecord),
fhyjjl: JSON.stringify(data.resourceList)
}
).then(response => {
})
}
},
getJjcgjList(val) {
this.$modal.loading()

Loading…
Cancel
Save