Browse Source

feat:[模板管理][批量修改step的配置]

ouqian
luojie 1 month ago
parent
commit
8ca6bea4f6
3 changed files with 23 additions and 7 deletions
  1. +2
    -2
      src/components/Template/HandleFormItem.vue
  2. +4
    -1
      src/views/business/comps/template/comps/pcr/PCR008.vue
  3. +17
    -4
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue

+ 2
- 2
src/components/Template/HandleFormItem.vue View File

@ -591,8 +591,8 @@ export default {
this.inputValue = data.selectedId; this.inputValue = data.selectedId;
const { filledCodes = [] } = this.item; const { filledCodes = [] } = this.item;
console.log(filledCodes, "filledCodes") console.log(filledCodes, "filledCodes")
const { selectInfo, row } = data;
if (filledCodes.length > 0) {
const { selectInfo, row,checkType } = data;
if (filledCodes.length > 0 && checkType !=="checkbox") {
this.inputValue = row[filledCodes[0]] + "(" + row[filledCodes[1]] + ")"; this.inputValue = row[filledCodes[0]] + "(" + row[filledCodes[1]] + ")";
} }
this.selectRegentInfo = data; this.selectRegentInfo = data;

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

@ -15,7 +15,7 @@
<LineLabel label="template.common.operationSteps" /> <LineLabel label="template.common.operationSteps" />
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" <BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" @onRegentSubmit="onRegentSubmit" />
<div v-if="fillType == 'preFill'"> <div v-if="fillType == 'preFill'">
<el-button type="danger" @click="onClickDelete">{{ <el-button type="danger" @click="onClickDelete">{{
$t('form.delete') }}</el-button> $t('form.delete') }}</el-button>
@ -230,6 +230,9 @@ export default {
this.onHandleTableBlur() this.onHandleTableBlur()
}, },
methods: { methods: {
onRegentSubmit(data){
console.log(data,"回调")
},
onClickDelete() { onClickDelete() {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => { this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {

+ 17
- 4
src/views/business/comps/template/dialog/SelectMixReagentDialog.vue View File

@ -188,16 +188,29 @@ export default {
ndz: (row.nd||"")+(row.nddw||""), ndz: (row.nd||"")+(row.nddw||""),
type: Number(this.selectType), type: Number(this.selectType),
} }
if(this.qxbdType && row.templateSn !== this.qxbdType){
this.$message.error(`请选择正确前序表单`);
return
const {qxbdType,checkType} = this;
if(qxbdType){
if(checkType === "radio"&& row.templateSn !== qxbdType){
this.$message.error(`请选择正确前序表单`);
return
}
if(checkType === "checkbox" ){
const isAllType = row.every((item)=>item.templateSn === qxbdType)
if(!isAllType){
this.$message.error(`请选择正确前序表单`);
return
}
}
} }
this.$emit('submit', selectedValue, row); this.$emit('submit', selectedValue, row);
let callbackData = { selectInfo, uuid: this.uuid, selectedId: selectedValue, row,selectType:this.selectType };
let callbackData = { selectInfo, uuid: this.uuid, selectedId: selectedValue, row,selectType:this.selectType,checkType };
if(this.checkType === "checkbox"){ if(this.checkType === "checkbox"){
callbackData = { callbackData = {
uuid: this.uuid, uuid: this.uuid,
selectedRows: row, selectedRows: row,
selectedId:row.map((item)=>item.bdbh).join(","),
checkType
} }
} }
// eventBus // eventBus

Loading…
Cancel
Save