Browse Source

feat: [模板管理] YP003-待完善

lkf
memorylkf 1 month ago
parent
commit
333ee71936
10 changed files with 265 additions and 7 deletions
  1. +14
    -0
      src/lang/en/template/yp.js
  2. +14
    -0
      src/lang/zh/template/yp.js
  3. +4
    -1
      src/views/business/comps/template/TemplateTable.vue
  4. +216
    -0
      src/views/business/comps/template/comps/yp/YP003.vue
  5. +2
    -1
      src/views/business/comps/template/mixins/templateMixin.js
  6. +2
    -1
      src/views/business/form/drug/comp/ytbdList.vue
  7. +1
    -1
      src/views/business/form/nonTrial/comp/ytbdList.vue
  8. +2
    -2
      src/views/business/study/comp/suject.vue
  9. +2
    -1
      src/views/business/study/comp/syxx.vue
  10. +8
    -0
      src/views/business/template/list.vue

+ 14
- 0
src/lang/en/template/yp.js View File

@ -29,5 +29,19 @@ export default {
gyzyzh: 'Dosing Group Box',
qt: 'other',
jsbz: 'Comment on Receiving'
},
yp003: {
yplx: 'Sample Type',
ybxx: 'Sample Information',
cyd: 'Sampling Location',
dwbh: '动物编号',
dr: 'Import',
ypsl: 'Sample Quantity',
fqxx: 'Extraction Information',
fqyq: 'Extraction Requirement',
sfyfzyq: 'Portion Requirement',
s: 'Yes',
f: 'No',
sfzgdsjwc: 'Complete on Time'
}
}

+ 14
- 0
src/lang/zh/template/yp.js View File

@ -29,5 +29,19 @@ export default {
gyzyzh: '给药组转运盒',
qt: '其他',
jsbz: '接收备注'
},
yp003: {
yplx: '样品类型',
ybxx: '样本信息',
cyd: '采样点',
dwbh: '动物编号',
dr: '导入',
ypsl: '样品数量',
fqxx: '分取信息',
fqyq: '分取要求',
sfyfzyq: '是否有分装要求',
s: '是',
f: '否',
sfzgdsjwc: '是否在规定时间完成'
}
}

+ 4
- 1
src/views/business/comps/template/TemplateTable.vue View File

@ -70,6 +70,7 @@ import LBA007 from "./comps/lba/LBA007.vue";
//
// YP001-使SP001
import YP002 from "./comps/yp/YP002.vue";
import YP003 from "./comps/yp/YP003.vue";
export default {
name: "TemplateTable",
@ -92,7 +93,8 @@ export default {
LBA006,
LBA007,
//
YP002
YP002,
YP003
},
props: {
sn: {
@ -178,6 +180,7 @@ export default {
//
'YP001': 'SP001',
'YP002': 'YP002',
'YP003': 'YP003',
}
}
return this.componentMap || "Demo"

+ 216
- 0
src/views/business/comps/template/comps/yp/YP003.vue View File

@ -0,0 +1,216 @@
<!-- 配体结合分析溶液配制记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.yp.yp003.ybxx" />
<CustomTable
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.yp.yp003.fqxx" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
name: "YP003",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: 'template.common.testName',
type: "input",
disabled: true,
},
studySn: {
label: 'template.common.testNumber',
type: "input",
disabled: true,
},
}
},
{
type: "conditionItem",
label: 'template.common.processCondition',
config: {
pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "conditionItem",
label: 'template.yp.yp003.yplx',
config: {
yplx: {
label: 'template.yp.yp003.yplx',
type: "select",
fillType: "preFill",
options: this.getDictOptions('business_yplx'),
otherCode: "preOther",
},
}
},
{
type: "cellItem",
label: 'template.lba.lba002.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
tableColumns() {
return [{
label: 'template.yp.yp003.cyd',
prop: 'cyd',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
},{
label: 'template.yp.yp003.dwbh',
prop: 'dwbh',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
},{
label: 'template.yp.yp003.ypsl',
prop: 'ypsl',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
}]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "tableRef", "stepRef", "remarkRef"]);
return content;
},
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content = await this.$refs.stepRef.getFormData();
console.log(content);
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
</style>

+ 2
- 1
src/views/business/comps/template/mixins/templateMixin.js View File

@ -31,7 +31,8 @@ export default {
'business_pcr_gzy', // PCR-编号-工作液
'business_lba_jg', // LBA006-结果
'business_cftj' // 存放条件
'business_cftj', // 存放条件
'business_yplx', // 样品类型
],
props: {
templateData: {

+ 2
- 1
src/views/business/form/drug/comp/ytbdList.vue View File

@ -463,7 +463,8 @@ export default {
sign: sign
}).then(() => {
this.$refs.fsySignRef.cancel()
this.studyStatus = 5
// this.studyStatus = 5
this.$tab.refreshPage();
}).finally(() => {
this.$modal.closeLoading()
})

+ 1
- 1
src/views/business/form/nonTrial/comp/ytbdList.vue View File

@ -527,7 +527,7 @@ export default {
sign: sign
}).then(() => {
this.$refs.fsySignRef.cancel()
this.studyStatus = 5
this.$tab.refreshPage();
}).finally(() => {
this.$modal.closeLoading()
})

+ 2
- 2
src/views/business/study/comp/suject.vue View File

@ -10,13 +10,13 @@
<div class="operate-img"></div>
<div class="operate-left">{{$t('page.business.study.studyEnter.syxkxx')}}</div>
<div class="operate-right">
<i class="el-icon-edit operate-icon" @click="editSubject" v-if="operate && (study.leader==userId || checkRole(['TFM']))"></i>
<i class="el-icon-edit operate-icon" @click="editSubject" v-if="operate && study.status<5 && (study.leader==userId || checkRole(['TFM']))"></i>
</div>
</div>
<div class="subject-content">
<div class="subject-item" :class="selectedSubjectId===item.id?'active':''" v-for="(item,index) in subjectList" :key="index" @click="changeSelectedSubject(item)">
<div class="subject-item-name">{{item.deptName}}({{$i18n.locale === 'zh_CN'?item.leaderName:item.leaderNameEn}})</div>
<div class="subject-item-add" v-if="operate && item.leader==userId">
<div class="subject-item-add" v-if="operate && study.status<5 && item.leader==userId">
<el-button type="primary" plain @click.stop="yq(item)">{{$t('page.business.study.studyEnter.yq')}}</el-button>
</div>
</div>

+ 2
- 1
src/views/business/study/comp/syxx.vue View File

@ -139,7 +139,8 @@ export default {
sign:sign
}).then(() => {
this.$refs.syxxSignRef.cancel()
this.getStudyInfo()
// this.getStudyInfo()
this.$tab.refreshPage();
}).finally(() => {
this.$modal.closeLoading()
})

+ 8
- 0
src/views/business/template/list.vue View File

@ -85,6 +85,11 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="英文名称:" prop="nameEn">
<el-input v-model="infoDialog.formData.nameEn" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="部门/学科:" prop="deptId">
<select-dept v-model="infoDialog.formData.deptId" />
</el-form-item>
@ -256,6 +261,9 @@ export default {
name: [
{ required: true, message: '请输入', trigger: "blur" }
],
nameEn: [
{ required: true, message: '请输入', trigger: "blur" }
],
deptId: [
{ required: true, message: '请选择', trigger: "change" }
],

Loading…
Cancel
Save