Browse Source

feat: [模板管理] 选择试剂增加表单id

lkf
memorylkf 3 months ago
parent
commit
7ec9796719
13 changed files with 44 additions and 30 deletions
  1. +6
    -1
      src/components/Template/SelectTable.vue
  2. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue
  3. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue
  4. +1
    -1
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue
  5. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue
  6. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue
  7. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
  8. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue
  9. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue
  10. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue
  11. +2
    -2
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue
  12. +5
    -2
      src/views/business/comps/template/dialog/SelectReagentDialog.vue
  13. +14
    -8
      src/views/business/comps/template/mixins/templateMixin.js

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

@ -66,7 +66,11 @@ export default {
listApi:{
type: Function,
default: () => {},
}
},
studyFormId: {
type: String,
default: "",
},
},
data() {
return {
@ -106,6 +110,7 @@ export default {
this.listParams[key] = "";
}
this.listParams = {...this.listParams}
this.listParams.studyFormId = this.studyFormId || ''
},
async getList() {
const res = await this.listApi(this.listParams);

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 1
- 1
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue View File

@ -279,7 +279,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry" || col.prop === "kbjzbh"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue View File

@ -301,12 +301,12 @@ export default {
handleJzClickable(obj) {
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
handleRongyeClickable(obj) {
this.reagentType = 2//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code, row) {

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 2
- 2
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue View File

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

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

@ -268,7 +268,7 @@ export default {
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
},
//
onSelectReagentSubmit(code,row){
@ -291,7 +291,7 @@ export default {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
this.$refs.selectReagentDialogRef.show(this.formData.id)
}
},
//

+ 5
- 2
src/views/business/comps/template/dialog/SelectReagentDialog.vue View File

@ -14,6 +14,7 @@
<SelectTable v-if = "isShowTable" ref="selectSjRef" :columns="columns"
:selectedId="selectedId"
:searchForm="searchForm"
:studyFormId = "studyFormId"
:listApi="listApi"
:selectedCode="selectedCode"
@radioSelect="handleSelect"/>
@ -106,6 +107,7 @@ export default {
bzList:[],
depart:"",
studyFormId:''//studyFormId
}
},
computed: {
@ -127,15 +129,16 @@ export default {
}
},
methods: {
show(){
show(studyFormId){
this.visible = true
this.studyFormId = studyFormId
this.showTableData()
if(this.type === 'MJYLQSQD'){
this.getBzList()
}
},
getBzList(){
public_bzList(this.searchForm).then(response => {
public_bzList().then(response => {
this.bzList = response.data
});
},

+ 14
- 8
src/views/business/comps/template/mixins/templateMixin.js View File

@ -43,7 +43,8 @@ export default {
templateSn,
startDate,
bdmc,
endDate
endDate,
id
} = v
if (v.resource) {
//试验试剂信息
@ -59,7 +60,8 @@ export default {
templateSn,
startDate,
bdmc,
endDate
endDate,
id
}
} else {
this.formData = {
@ -70,7 +72,8 @@ export default {
templateSn,
startDate,
bdmc,
endDate
endDate,
id
}
}
const { effectivePeriod, effectivePeriodUnit, expireDate } =
@ -156,15 +159,18 @@ export default {
if (validFormData) {
validFormData.forEach((item) => {
for (const [key, value] of Object.entries(item)) {
let index = 0;
let index = 0
// 如果当前键是可能重复的字段,且结果对象中已经存在该键,则添加索引后缀
if ((key === 'headerSelectFields' || key === 'stepTableFormData') && result.hasOwnProperty(key)) {
if (
(key === 'headerSelectFields' || key === 'stepTableFormData') &&
result.hasOwnProperty(key)
) {
// 为重复字段生成带索引的键名,从1开始(因为第一个组件不需要后缀)
const newKey = `${key}_${++index}`;
result[newKey] = value;
const newKey = `${key}_${++index}`
result[newKey] = value
} else {
// 正常合并其他字段
result[key] = value;
result[key] = value
}
}
})

Loading…
Cancel
Save