Browse Source

feat:[模板管理][update]

lkf
luojie 3 months ago
parent
commit
a339a81080
22 changed files with 249 additions and 119 deletions
  1. +8
    -0
      src/api/business/study/studyFormApply.js
  2. +8
    -0
      src/api/business/study/studyFormFill.js
  3. +8
    -0
      src/api/business/study/studyFormPlan.js
  4. +8
    -0
      src/api/business/study/studyFormPre.js
  5. +28
    -19
      src/components/Template/CustomTable.vue
  6. +1
    -1
      src/components/Template/SelectTable.vue
  7. +3
    -1
      src/lang/en/business/study/studyFormFill.js
  8. +2
    -1
      src/lang/en/template/sp.js
  9. +2
    -0
      src/lang/zh/business/study/studyFormFill.js
  10. +2
    -1
      src/lang/zh/template/sp.js
  11. +4
    -1
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
  12. +32
    -33
      src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
  13. +1
    -0
      src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js
  14. +2
    -2
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
  15. +2
    -2
      src/views/business/form/drug/comp/tbbdList.vue
  16. +2
    -2
      src/views/business/form/nonTrial/comp/tbbdList.vue
  17. +2
    -2
      src/views/business/study/comp/jhbd/Bj.vue
  18. +2
    -2
      src/views/business/study/comp/sqbd/Bj.vue
  19. +86
    -22
      src/views/business/study/comp/tbbd/Bj.vue
  20. +4
    -4
      src/views/business/study/comp/tbbdList.vue
  21. +14
    -17
      src/views/business/study/comp/ytbd/Bj.vue
  22. +28
    -9
      src/views/business/template/list.vue

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

@ -86,6 +86,14 @@ export function studyFormApply_bc(data) {
})
}
//仅保存
export function studyFormApply_bcOnly(data) {
return request({
url: '/system/business/studyFormApply/bcOnly',
method: 'post',
data: data
})
}
//提交
export function studyFormApply_tj(data) {
return request({

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

@ -88,6 +88,14 @@ export function studyFormFill_bc(data) {
})
}
//仅保存
export function studyFormFill_bcOnly(data) {
return request({
url: '/system/business/studyFormFill/bcOnly',
method: 'post',
data: data
})
}
//提交
export function studyFormFill_tj(data) {
return request({

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

@ -61,6 +61,14 @@ export function studyFormPlan_bc(data) {
})
}
//仅保存
export function studyFormPlan_bcOnly(data) {
return request({
url: '/system/business/studyFormPlan/bcOnly',
method: 'post',
data: data
})
}
//提交
export function studyFormPlan_tj(data) {
return request({

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

@ -43,6 +43,14 @@ export function studyFormPre_bc(data) {
})
}
//仅保存
export function studyFormPre_bcOnly(data) {
return request({
url: '/system/business/studyFormPre/bcOnly',
method: 'post',
data: data
})
}
//提交
export function studyFormPre_tj(data) {
return request({

+ 28
- 19
src/components/Template/CustomTable.vue View File

@ -63,17 +63,7 @@
:error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
<div v-show="isShowOther(row[col.prop])" class="flex flex1">
<div class="other-title">{{ col.otherLabel ? $t(col.otherLabel) : $t("template.common.other") }}
</div>
<div class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + col.otherCode"
@blur="onBlur(rowIndex, col.prop, $event)" :item="getOtherItem(col)" v-model="row[col.otherCode]"
:error="hasError(rowIndex, colIndex, col.otherCode)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.otherCode, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.otherCode)" />
</div>
</div>
</div>
</template>
@ -89,8 +79,20 @@
<template v-else>
{{ row[col.prop] }}
</template>
</div>
<div v-show="isShowOther(row[col.prop])" class="flex flex1">
<div class="other-title">{{ col.otherLabel ? $t(col.otherLabel) : $t("template.common.other") }}
</div>
<div class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + col.otherCode"
@blur="onBlur(rowIndex, col.prop, $event)" :item="getOtherItem(col)" v-model="row[col.otherCode]"
:error="hasError(rowIndex, colIndex, col.otherCode)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.otherCode, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.otherCode)" />
</div>
</div>
<div class="m-l-5 flex1" v-if="isShowBodySub(col,row)">
<div class="m-l-5 flex1" v-if="isShowBodySub(col, row)">
<template v-if="col.bodySubType === 'inputNumber'">
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel" type="inputNumber"
@ -111,7 +113,7 @@
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" />
</template>
<template v-else-if = "col.bodySubType === 'span'">
<template v-else-if="col.bodySubType === 'span'">
{{ row[col.bodySubKey] }}
</template>
</div>
@ -228,7 +230,7 @@ export default {
fillType: sItem.bodyFillType,
maxlength: sItem.otherMaxlength || 50,
parentLabel: sItem.label,
type:"input"
type: "input"
}
},
//
@ -238,10 +240,10 @@ export default {
//value
return arr.some(item => item < 0);
},
isShowBodySub(col,row) {
isShowBodySub(col, row) {
if (col.hasOwnProperty("disabled")) {
return col.showBodySub
}else if(col.bodySubType === 'span'&&!row[col.bodySubKey]){//span
} else if (col.bodySubType === 'span' && !row[col.bodySubKey]) {//span
return false;
}
return col.bodySubType && col.bodySubKey;
@ -369,15 +371,20 @@ export default {
this.formErrors.push(errorItem);
}
}
console.log(col.otherCode, "col.otherCode")
//
if (col.otherCode && col.bodySubType !== 'span') {
if (col.otherCode) {
const isSelectedOther = this.isShowOther(mainValue);
if (!isSelectedOther) {
return;
}
const otherValue = row[col.otherCode];
if (this.isValueEmpty(otherValue)) {
const errorItem = {
rowIndex,
colIndex,
field: col.bodySubKey,
field: col.otherCode,
label: `${this.$t(col.label)}单位`,
error: `请填写${this.$t(col.otherLabel) ? this.$t(col.otherLabel) : '其他'}信息`
};
@ -508,6 +515,7 @@ export default {
},
//
updateDataSourceByRowIndex(rowIndex, data) {
console.log(rowIndex, data, "updateDataSourceByRowIndex")
this.localDataSource[rowIndex] = { ...this.localDataSource[rowIndex], ...data };
this.localDataSource = [...this.localDataSource];
},
@ -736,5 +744,6 @@ export default {
font-size: 14px;
font-weight: normal;
color: #606266;
width: auto;
}
</style>

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

@ -68,7 +68,7 @@ export default {
default: () => {},
},
studyFormId: {
type: String,
type: [String,Number],
default: "",
},
},

+ 3
- 1
src/lang/en/business/study/studyFormFill.js View File

@ -71,5 +71,7 @@ export default {
smxz: 'Declaration of Collaboration',
bcsm: 'Additional Remark',
fztgjj: 'Approve/Reject Record Abolition',
ysy: 'Reviewed'
ysy: 'Reviewed',
bcjl:'保存记录',
txbbc:'填写并保存'
}

+ 2
- 1
src/lang/en/template/sp.js View File

@ -73,7 +73,8 @@ export default {
//生物样品分析方法学样品制备表(Dilution Integrity)- 生物样品分析方法学样品制备表(稀释可靠性)
sp016: {
title:
'Bioanalytical Methods Sample Preparation Record (Dilution Integrity)'
'Bioanalytical Methods Sample Preparation Record (Dilution Integrity)',
bs: 'Multiple'
},
//生物样品分析方法学样品制备表(Stock solution comparison)- 生物样品分析方法学样品制备表(储备液对比)
sp017: {

+ 2
- 0
src/lang/zh/business/study/studyFormFill.js View File

@ -73,4 +73,6 @@ export default {
bcsm: '补充说明',
fztgjj: '废止通过/拒绝',
ysy: '已审阅',
bcjl:'保存记录',
txbbc:'填写并保存'
}

+ 2
- 1
src/lang/zh/template/sp.js View File

@ -68,7 +68,8 @@ export default {
},
//生物样品分析方法学样品制备表(Dilution Integrity)- 生物样品分析方法学样品制备表(稀释可靠性)
sp016: {
title: '生物样品分析方法学样品制备表(稀释可靠性)'
title: '生物样品分析方法学样品制备表(稀释可靠性)',
bs: '倍数'
},
//生物样品分析方法学样品制备表(Stock solution comparison)- 生物样品分析方法学样品制备表(储备液对比)
sp017: {

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

@ -418,8 +418,11 @@ export default {
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef",
"rongyeTableRef", "rongyeStepFormPackageRef", "remarkRef"]);
console.log(content)
if(!content){
return false;
}
//resource
let tmpResource = []
let tableList = content.stepTableFormData

+ 32
- 33
src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue View File

@ -169,46 +169,45 @@ export default {
},
methods: {
//
async assignNumbersToTableData(tableDataArray) {
if (!tableDataArray || tableDataArray.length === 0) {
return;
}
async assignNumbersToTableData(config) {
const configs = this.formData[config]
// subTargetSolutionCode
const hasAnyWithValue = tableDataArray.some(row =>
row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
//
if (!hasAnyWithValue) {
const length = tableDataArray.length;
const snList = await this.getLatestSn(length);
tableDataArray.forEach((row, idx) => {
row.subTargetSolutionCode = snList[idx] || '';
});
}
},
async handleUpdateCode() {
// paralleConfigsparalleTableFormData
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
for (let i = 0; i < this.formData.paralleConfigs.length; i++) {
const config = this.formData.paralleConfigs[i];
if (config.stepTableFormData && config.stepTableFormData.length > 0) {
await this.assignNumbersToTableData(config.stepTableFormData);
if (configs && configs.length > 0) {
for (let i = 0; i < configs.length; i++) {
const ref = config === "paralleConfigs" ? `paralleStepTableRef_${i}` : `ladderStepTableRef_${i}`;
const {stepTableFormData = []} = configs[i];
if (stepTableFormData && stepTableFormData.length > 0) {
const tableDataArray = stepTableFormData;
// subTargetSolutionCode
const hasAnyWithValue = tableDataArray.some(row =>
row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
//
if (!hasAnyWithValue) {
const length = tableDataArray.length;
const snList = await this.getLatestSn(length);
tableDataArray.forEach((row, idx) => {
this.$refs[ref][0]?.updateDataSourceByRowIndex(idx,{subTargetSolutionCode: length==1?snList:snList[idx]});
});
}
}
}
}
},
// ladderConfigsladderTableFormData
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) {
for (let i = 0; i < this.formData.ladderConfigs.length; i++) {
const config = this.formData.ladderConfigs[i];
if (config.stepTableFormData && config.stepTableFormData.length > 0) {
await this.assignNumbersToTableData(config.stepTableFormData);
async handleUpdateCode() {
this.assignNumbersToTableData("paralleConfigs");
this.assignNumbersToTableData("ladderConfigs");
this.$nextTick(() => {
//
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
}
}
EventBus.$emit('onModifyRecord', params,)
})
},
//
handleAddParalle() {

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

@ -15,6 +15,7 @@ export const getSWYPFXFFXYPZBBTableConfig = (
bodyType: 'select',
bodyOptions: $this.getDictOptions(selectKey),
otherCode: 'bhOther',
otherLabel: 'template.sp.sp016.bs',
bodySubType: 'span',
bodySubKey: 'bhCode',
bodyFillType: 'preFill',

+ 2
- 2
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -151,8 +151,8 @@ export const getParallelColumnsConfig = ($this) => {
prop: 'targetSolutionCode',
bodyType: 'select',
bodyOptions: $this.getDictOptions('business_sp_nbgzy'),
subType: 'span',
subKey: 'subTargetSolutionCode',
bodySubType: 'span',
bodySubKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
width: 280
},

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

@ -84,8 +84,8 @@
<template slot-scope="scope">
<span v-if="scope.row.bdzt === 1"><span class="status-circle tbz"></span>{{ $t('page.business.study.studyFormFill.tbz') }}</span>
<span v-if="scope.row.bdzt === 3"><span class="status-circle ytj"></span>{{ $t('page.business.study.studyFormFill.ytj') }}</span>
<span v-if="scope.row.bdzt === 5"><span class="status-circle ywc"></span>{{ $t('page.business.study.studyFormFill.ywc') }}</span>
<span v-if="scope.row.bdzt === 7"><span class="status-circle ywcfh"></span>{{ $t('page.business.study.studyFormFill.ywcfh') }}</span>
<span v-if="scope.row.bdzt === 5"><span class="status-circle ywcfh"></span>{{ $t('page.business.study.studyFormFill.ywcfh') }}</span>
<span v-if="scope.row.bdzt === 7"><span class="status-circle ywc"></span>{{ $t('page.business.study.studyFormFill.ywc') }}</span>
<span v-if="scope.row.bdzt === 9"><span class="status-circle dfz"></span>{{ $t('page.business.study.studyFormFill.dfz') }}</span>
<span v-if="scope.row.bdzt === 11"><span class="status-circle yfz"></span>{{ $t('page.business.study.studyFormFill.yfz') }}</span>
</template>

+ 2
- 2
src/views/business/form/nonTrial/comp/tbbdList.vue View File

@ -85,8 +85,8 @@
<template slot-scope="scope">
<span v-if="scope.row.bdzt === 1"><span class="status-circle tbz"></span>{{ $t('page.business.study.studyFormFill.tbz') }}</span>
<span v-if="scope.row.bdzt === 3"><span class="status-circle ytj"></span>{{ $t('page.business.study.studyFormFill.ytj') }}</span>
<span v-if="scope.row.bdzt === 5"><span class="status-circle ywc"></span>{{ $t('page.business.study.studyFormFill.ywc') }}</span>
<span v-if="scope.row.bdzt === 7"><span class="status-circle ywcfh"></span>{{ $t('page.business.study.studyFormFill.ywcfh') }}</span>
<span v-if="scope.row.bdzt === 5"><span class="status-circle ywcfh"></span>{{ $t('page.business.study.studyFormFill.ywcfh') }}</span>
<span v-if="scope.row.bdzt === 7"><span class="status-circle ywc"></span>{{ $t('page.business.study.studyFormFill.ywc') }}</span>
<span v-if="scope.row.bdzt === 9"><span class="status-circle dfz"></span>{{ $t('page.business.study.studyFormFill.dfz') }}</span>
<span v-if="scope.row.bdzt === 11"><span class="status-circle yfz"></span>{{ $t('page.business.study.studyFormFill.yfz') }}</span>
</template>

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

@ -126,7 +126,7 @@
</template>
<script>
import { studyFormPlan_bc, studyFormPlan_tj, studyFormPlan_info,studyFormPlan_updateBdnr,studyFormFill_updateFhyjjl } from "@/api/business/study/studyFormPlan"
import { studyFormPlan_bc,studyFormPlan_bcOnly, studyFormPlan_tj, studyFormPlan_info,studyFormPlan_updateBdnr,studyFormFill_updateFhyjjl } from "@/api/business/study/studyFormPlan"
import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectStudyUser from '@/views/business/comps/select/SelectStudyUser';
@ -219,7 +219,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormPlan_bc(this.form).then(response => {
studyFormPlan_bcOnly(this.form).then(response => {
this.form = response.data
this.templateData = deepClone(this.form)
this.showIndex = 2

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

@ -127,7 +127,7 @@
</template>
<script>
import { studyFormApply_bc, studyFormApply_tj, studyFormApply_info, studyFormApply_updateBdnr ,studyFormApply_updateFhyjjl } from "@/api/business/study/studyFormApply"
import { studyFormApply_bc,studyFormApply_bcOnly, studyFormApply_tj, studyFormApply_info, studyFormApply_updateBdnr ,studyFormApply_updateFhyjjl } from "@/api/business/study/studyFormApply"
import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
@ -221,7 +221,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormApply_bc(this.form).then(response => {
studyFormApply_bcOnly(this.form).then(response => {
this.form = response.data
this.templateData = deepClone(this.form)
this.showIndex = 2

+ 86
- 22
src/views/business/study/comp/tbbd/Bj.vue View File

@ -1,6 +1,6 @@
<template>
<div>
<div class="edit-container" >
<div class="edit-container">
<div class="edit-top">
<div class="left-top">
<img src="@/assets/images/back.png" @click="cancel()" />
@ -28,7 +28,7 @@
<el-button type="primary" @click="next">{{ $t('page.business.study.studyFormFill.next') }}</el-button>
</template>
<template v-else>
<el-button @click="saveNext">{{ $t('page.business.study.studyFormFill.save') }}</el-button>
<el-button @click="showSave">{{ $t('page.business.study.studyFormFill.save') }}</el-button>
<el-button type="primary" @click="showApprove">{{ $t('page.business.study.studyFormFill.submit')
}}</el-button>
<el-button type="primary" @click="pre">{{ $t('page.business.study.studyFormFill.pre') }}</el-button>
@ -56,8 +56,7 @@
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormFill.sfbl')" prop="sfbl">
<el-select v-model="form.sfbl" :placeholder="$t('form.placeholderSelect')"
:disabled="form.id && form.id !== ''">
<el-select v-model="form.sfbl" :placeholder="$t('form.placeholderSelect')">
<el-option :label="$t('page.business.study.studyFormFill.yes')" value="是" />
<el-option :label="$t('page.business.study.studyFormFill.no')" value="否" />
</el-select>
@ -220,11 +219,55 @@
<el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
<el-dialog :title="$t('page.business.study.studyFormFill.bcjl')" :visible.sync="openSave" width="600px"
append-to-body :close-on-click-modal="false">
<el-form ref="formSave" :model="formSave" :rules="rulesSave" label-width="120px" v-if="openSave">
<div class="sbzdtcma"> <input type="text"> <input type="password"> </div>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" :value="formSave.qmyy" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark">
<el-input type="textarea" v-model="formSave.remark" :rows="5" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="nickName" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="formSave.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveNext">{{ $t('form.confirm') }}</el-button>
<el-button @click="openSave = false">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { studyFormFill_bc, studyFormFill_updateBdnr, studyFormFill_tj, studyFormFill_info,studyFormFill_updateFhyjjl } from "@/api/business/study/studyFormFill"
import { studyFormFill_bc, studyFormFill_bcOnly, 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";
@ -260,7 +303,13 @@ export default {
},
czlist: [],
cclist: [],
openSave: false,
openApprove: false,
formSave: {
qmyy: this.$t('page.business.study.studyFormFill.txbbc'),
remark: '',
qmrmm: '',
},
formApprove: {
id: null,
qmyy: this.$t('page.business.study.studyFormFill.txbtjjl'),
@ -286,6 +335,13 @@ export default {
trigger: 'blur'
}]
},
rulesSave: {
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}]
},
templateData: {}
}
},
@ -306,12 +362,12 @@ export default {
{
id: this.form.id,
bdnr: JSON.stringify(this.$refs.templateTable.getFilledFormData()),
zdxgjl:data.resourceList? JSON.stringify(data.resourceList):'',
filedValue:data.newRecord? JSON.stringify(data.newRecord):''
zdxgjl: data.resourceList ? JSON.stringify(data.resourceList) : '',
filedValue: data.newRecord ? JSON.stringify(data.newRecord) : ''
}
).then(response => {
})
} else if (data.type == 'reply') {
} else if (data.type == 'reply') {
studyFormFill_updateFhyjjl(
{
id: this.form.id,
@ -452,7 +508,7 @@ export default {
if (valid) {
this.showIndex = 2
this.$modal.loading()
studyFormFill_bc(this.form).then(response => {
studyFormFill_bcOnly(this.form).then(response => {
this.form = response.data
this.showIndex = 2
}).finally(() => {
@ -476,7 +532,7 @@ export default {
this.$tab.closeOpenPage(obj)
}
} catch (e) {
this.$tab.closeOpenPage('/404')
this.$tab.closeOpenPage('/404')
}
},
reset() {
@ -506,7 +562,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormFill_bc(this.form).then(response => {
studyFormFill_bcOnly(this.form).then(response => {
this.$modal.closeLoading()
this.cancel()
}).finally(() => {
@ -515,18 +571,26 @@ export default {
}
})
},
showSave() {
this.formSave.remark = ''
this.formSave.qmrmm = ''
this.openSave = true
},
async saveNext() {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.form.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormFill_bc(this.form).then(response => {
this.$modal.closeLoading()
this.cancel()
}).finally(() => {
this.$modal.closeLoading()
})
}
this.$refs["formSave"].validate(valid => {
if (valid) {
this.form.bdnr = JSON.stringify(this.$refs.templateTable.getFilledFormData())
this.form.qmrmm = this.formSave.qmrmm
this.form.remark = this.formSave.remark
this.$modal.loading()
studyFormFill_bc(this.form).then(response => {
this.$modal.closeLoading()
this.cancel()
}).finally(() => {
this.$modal.closeLoading()
})
}
})
},
tj() {
let that = this

+ 4
- 4
src/views/business/study/comp/tbbdList.vue View File

@ -81,12 +81,12 @@
<el-table-column :label="$t('page.business.form.xtmbmc')" prop="templateMc" :show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.form.cjsj')" align="center" prop="createTime" width="140" />
<el-table-column :label="$t('page.business.form.gsr')" align="center" prop="userMc" width="100" />
<el-table-column :label="$t('page.business.form.status')" prop="status" align="center" width="100">
<el-table-column :label="$t('page.business.form.status')" prop="status" align="center" width="150">
<template slot-scope="scope">
<span v-if="scope.row.bdzt === 1"><span class="status-circle tbz"></span>{{ $t('page.business.study.studyFormFill.tbz') }}</span>
<span v-if="scope.row.bdzt === 3"><span class="status-circle ytj"></span>{{ $t('page.business.study.studyFormFill.ytj') }}</span>
<span v-if="scope.row.bdzt === 5"><span class="status-circle ywc"></span>{{ $t('page.business.study.studyFormFill.ywc') }}</span>
<span v-if="scope.row.bdzt === 7"><span class="status-circle ywcfh"></span>{{ $t('page.business.study.studyFormFill.ywcfh') }}</span>
<span v-if="scope.row.bdzt === 5"><span class="status-circle ywcfh"></span>{{ $t('page.business.study.studyFormFill.ywcfh') }}</span>
<span v-if="scope.row.bdzt === 7"><span class="status-circle ywc"></span>{{ $t('page.business.study.studyFormFill.ywc') }}</span>
<span v-if="scope.row.bdzt === 9"><span class="status-circle dfz"></span>{{ $t('page.business.study.studyFormFill.dfz') }}</span>
<span v-if="scope.row.bdzt === 11"><span class="status-circle yfz"></span>{{ $t('page.business.study.studyFormFill.yfz') }}</span>
</template>
@ -136,7 +136,7 @@
v-hasPermi="['business:studyFormFill:qrfz']">{{
$t('page.business.study.studyFormFill.qrfz') }}</el-button>
<!-- 观察 todo 观察按钮只在系统模板为细胞复苏记录表才展示) -->
<el-button type="text" v-if="scope.row.bdzt === 1" @click="gc(scope.row)"
<el-button type="text" v-if="scope.row.bdzt === 1&&scope.row.showGc==10" @click="gc(scope.row)"
v-hasPermi="['business:studyFormFill:gc']">{{
$t('page.business.study.studyFormFill.gc') }}</el-button>
</template>

+ 14
- 17
src/views/business/study/comp/ytbd/Bj.vue View File

@ -77,7 +77,7 @@
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormPre.shryId')" prop="shryId">
<SelectStudyUser v-model="form.shryId" :query="{
<SelectStudyUser v-model="form.shryId" :query="{
studyId: form.studyId,
studySubjectId: form.studySubjectId,
permit: permitForSecectUser
@ -138,7 +138,7 @@
</template>
<script>
import { studyFormPre_bc, studyFormPre_tj, studyFormPre_info, studyFormPre_updateBdnr } from "@/api/business/study/studyFormPre"
import { studyFormPre_bc, studyFormPre_bcOnly, studyFormPre_tj, studyFormPre_info, studyFormPre_updateBdnr } from "@/api/business/study/studyFormPre"
import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectStudyUser from '@/views/business/comps/select/SelectStudyUser';
@ -154,7 +154,7 @@ export default {
form: {},
open: false,
openSubmit: false,
permitForSecectUser:'',
permitForSecectUser: '',
rulesApprove: {
qmrmm: [{
required: true,
@ -218,7 +218,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
this.$modal.loading()
studyFormPre_bc(this.form).then(response => {
studyFormPre_bcOnly(this.form).then(response => {
this.form = response.data
this.templateData = deepClone(this.form)
this.showIndex = 2
@ -262,7 +262,7 @@ export default {
},
edit(row) {
this.reset()
this.permitForSecectUser=row.permitForSecectUser
this.permitForSecectUser = row.permitForSecectUser
if (row && row.id) {
this.showIndex = 2
this.$modal.loading()
@ -297,18 +297,15 @@ export default {
})
},
async saveNext() {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.form.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormPre_bc(this.form).then(response => {
this.$emit('close')
this.open = false
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
}
this.form.bdnr = JSON.stringify(this.$refs.templateTable.getFilledFormData())
this.$modal.loading()
studyFormPre_bc(this.form).then(response => {
this.$emit('close')
this.open = false
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
},
async showtj() {
let content = await this.$refs.templateTable.getFormData()

+ 28
- 9
src/views/business/template/list.vue View File

@ -30,9 +30,9 @@
</el-form>
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.system.template.sn')" align="center" prop="sn" />
<el-table-column :label="$t('page.system.template.sn')" align="center" prop="showSn" />
<el-table-column :label="$t('page.system.template.name')" align="center" prop="name" />
<el-table-column :label="$t('page.system.template.sn')" align="center" prop="sn" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('page.system.template.sn')" align="center" prop="showSn" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('page.system.template.name')" align="center" prop="name" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('page.system.template.department')" align="center" prop="deptName" />
<el-table-column :label="$t('page.system.template.status')" prop="status" align="center" width="100">
<template slot-scope="scope">
@ -46,6 +46,14 @@
<span v-if="scope.row.needPre === 1"></span>
</template>
</el-table-column>
<el-table-column label="产物" prop="product" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.product == 1">试剂</span>
<span v-if="scope.row.product == 3">给药制剂</span>
<span v-if="scope.row.product == 5">麻精药</span>
<span v-if="scope.row.product == 7"></span>
</template>
</el-table-column>
<!-- <el-table-column label="模板类型" prop="type" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.type === 10">高风险表单</span>
@ -63,9 +71,9 @@
<pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize"
@pagination="getList" />
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="infoDialog.title" :visible.sync="infoDialog.visible" width="600px"
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="infoDialog.title" :visible.sync="infoDialog.visible" width="800px"
append-to-body>
<el-form ref="infoDialogForm" :model="infoDialog.formData" :rules="infoDialog.rules" label-width="120px">
<el-form ref="infoDialogForm" :model="infoDialog.formData" :rules="infoDialog.rules" label-width="180px">
<el-row>
<el-col :span="24">
<el-form-item label="编号:" prop="sn">
@ -102,9 +110,17 @@
<el-form-item label="产物:" prop="product">
<el-select v-model="infoDialog.formData.product" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-option label="试剂" :value="1" />
<el-option label="给药制剂" :value="5" />
<el-option label="麻精药" :value="7" />
<el-option label="无" :value="9" />
<el-option label="给药制剂" :value="3" />
<el-option label="麻精药" :value="5" />
<el-option label="无" :value="7" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="填报是否显示观察按钮:" prop="showGc">
<el-select v-model="infoDialog.formData.showGc" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-option label="否" :value="1" />
<el-option label="是" :value="10" />
</el-select>
</el-form-item>
</el-col>
@ -126,7 +142,7 @@
</el-dialog>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="$t('page.system.template.bdpz')" :visible.sync="tableDialog.visible"
width="90%" append-to-body>
<TemplateTable ref = "templateTable" :sn="tableDialog.sn" fillType="preFill" />
<TemplateTable ref = "templateTable" :sn="tableDialog.sn" v-if="tableDialog.visible" fillType="preFill" />
</el-dialog>
</div>
</template>
@ -177,6 +193,9 @@ export default {
formData: {},
rules: {
showGc: [
{ required: true, message:'请选择', trigger: "blur" }
],
sn: [
{ required: true, message:'请输入', trigger: "blur" }
],

Loading…
Cancel
Save