Browse Source

Merge branch 'master' into ouqian

ouqian
ouqian 1 month ago
parent
commit
41382fcb5c
17 changed files with 1842 additions and 214 deletions
  1. +116
    -40
      src/components/Template/CustomTable.vue
  2. +171
    -130
      src/components/Template/HandleFormItem.vue
  3. +0
    -1
      src/components/Template/mixins/formPackageMixins.js
  4. +9
    -1
      src/components/Template/operation/TableOpertaion.vue
  5. +11
    -1
      src/components/Template/operation/TableOpertaionDelete.vue
  6. +22
    -1
      src/views/business/comps/template/TemplateTable.vue
  7. +39
    -23
      src/views/business/comps/template/comps/dl/DL016.vue
  8. +205
    -0
      src/views/business/comps/template/comps/dl/DL017.vue
  9. +205
    -0
      src/views/business/comps/template/comps/dl/DL018.vue
  10. +205
    -0
      src/views/business/comps/template/comps/dl/DL019.vue
  11. +12
    -12
      src/views/business/comps/template/comps/dl/DL020.vue
  12. +205
    -0
      src/views/business/comps/template/comps/dl/DL021.vue
  13. +205
    -0
      src/views/business/comps/template/comps/dl/DL022.vue
  14. +205
    -0
      src/views/business/comps/template/comps/dl/DL023.vue
  15. +205
    -0
      src/views/business/comps/template/comps/dl/DL024.vue
  16. +16
    -5
      src/views/business/comps/template/comps/yp/YP003.vue
  17. +11
    -0
      src/views/business/comps/template/mixins/templateMixin.js

+ 116
- 40
src/components/Template/CustomTable.vue View File

@ -27,7 +27,7 @@
</div>
<!-- 默认操作栏 -->
<div class="custom-table-cell header-cell" :style="{ width: '245px' }" v-if="showOperation">
<div class="custom-table-cell header-cell" :style="{ width: operationWidth }" v-if="showOperation">
<div class="header-cell-content">
<div>操作</div>
</div>
@ -110,20 +110,18 @@
</div>
</template>
<template v-else-if="col.bodyType === 'checkboxTag'">
<div class="flex flex-wrap">
<HandleFormItem v-for="(tag, tagIndex) in row[col.prop]" :key="tagIndex"
:fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex + '_' + tagIndex"
:fieldItemLabel="fieldItemLabel" type="checkboxTag"
@blur="onBlur(rowIndex, col.prop, $event)"
:value="tag"
:item="getBodyItem(col, rowIndex)"
@change="onCheckboxTagChange(rowIndex, colIndex,tagIndex, $event)"
:error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
</div>
</template>
<div class="flex flex-wrap" :class="{ 'row-error-border': hasError(rowIndex, colIndex, col.prop) }">
<HandleFormItem
:fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel" type="checkboxTag"
:value="row[col.prop]"
:item="getBodyItem(col, rowIndex)"
@change="onCheckboxTagChange(rowIndex, colIndex, col, $event)"
@deleteTag="onDeleteCheckboxTag(rowIndex, col, $event)"
:error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" />
</div>
</template>
</div>
<div v-show="isShowOther(row[col.prop], col)" class="flex flex1">
@ -190,7 +188,7 @@
</div>
<!-- 默认操作栏 -->
<div class="custom-table-cell body-cell" :style="{ width: isBorder ? '245px' : 'auto' }"
<div class="custom-table-cell body-cell" :style="{ width: isBorder ? operationWidth : 'auto' }"
v-if="showOperation">
<div class="inner-table-cell">
<slot name="operation" :row="row" :rowIndex="rowIndex" :columns="getOperationColumns()">
@ -227,6 +225,10 @@ export default {
HandleFormItem
},
props: {
operationWidth: {
type: String,
default: '245px',
},
//
showHeaderSelect: {
type: Boolean,
@ -317,8 +319,27 @@ export default {
this.oldLocalDataSource = [];
},
methods: {
onCheckboxTagChange(rowIndex, colIndex,tagIndex, e) {
console.log(e,"eee")
// checkboxTag
onDeleteCheckboxTag(rowIndex, col, tagIndex) {
this.localDataSource[rowIndex][col.prop].splice(tagIndex, 1);
this.$emit("onDeleteTag", rowIndex, col, tagIndex);
this.justUpdateFilledFormData();
},
onCheckboxTagChange(rowIndex, colIndex, col, value) {
console.log(value,"vvv")
// value
this.localDataSource[rowIndex][col.prop] = value;
//
let isValid = false;
if (this.templateFillType === "actFill") {
// actFillcheckedtrue
isValid = value && value.some(tag => tag.checked === true);
} else if (this.templateFillType === "preFill") {
// preFilltagValue
isValid = value && value.every(tag => tag.tagValue && tag.tagValue.trim() !== '');
}
this.onErrorUpdate(rowIndex, colIndex, col.prop, !isValid);
this.$emit("onCheckboxTagChange", rowIndex, col, value)
},
handleClickButton(e, data, key, rowIndex, colIndex) {
this.$emit("clickButton", key, rowIndex, colIndex, e, data,)
@ -471,34 +492,68 @@ export default {
if (col.bodyFillType === this.templateFillType || col.bodySubFillType === this.templateFillType) {
//
const mainValue = row[col.prop];
if (this.isValueEmpty(mainValue) && !col.bodyDisabled && col.bodyType !== 'span') {
const errorItem = {
rowIndex,
colIndex,
field: col.prop,
label: this.$t(col.label),
error: `请填写${this.$t(col.label)}`
};
errors.push(errorItem);
this.formErrors.push(errorItem);
}
//
if (col.bodySubKey && !col.bodySubDisabled && col.bodySubType !== 'span') {
const subValue = row[col.bodySubKey];
console.log(col, subValue, "subValue")
if (this.isValueEmpty(subValue)) {
if (col.bodyType === "checkboxTag") {
// checkboxTag
if (this.templateFillType === "actFill") {
// actFillcheckedtrue
const hasChecked = mainValue && mainValue.some(tag => tag.checked === true);
if (!hasChecked && !col.bodyDisabled) {
const errorItem = {
rowIndex,
colIndex,
field: col.prop,
label: this.$t(col.label),
error: `请勾选${this.$t(col.label)}`
};
errors.push(errorItem);
this.formErrors.push(errorItem);
}
} else if (this.templateFillType === "preFill") {
// preFilltagValue
const allTagValuesFilled = mainValue && mainValue.every(tag => tag.tagValue && tag.tagValue.trim() !== '');
if (!allTagValuesFilled && !col.bodyDisabled) {
const errorItem = {
rowIndex,
colIndex,
field: col.prop,
label: this.$t(col.label),
error: `请填写${this.$t(col.label)}`
};
errors.push(errorItem);
this.formErrors.push(errorItem);
}
}
} else {
if (this.isValueEmpty(mainValue) && !col.bodyDisabled && col.bodyType !== 'span' && col.bodyType !== 'button') {
const errorItem = {
rowIndex,
colIndex,
field: col.bodySubKey,
label: `${this.$t(col.label)}单位`,
error: `请填写${this.$t(col.label)}单位`
field: col.prop,
label: this.$t(col.label),
error: `请填写${this.$t(col.label)}`
};
errors.push(errorItem);
this.formErrors.push(errorItem);
}
//
if (col.bodySubKey && !col.bodySubDisabled && col.bodySubType !== 'span' && col.bodySubType !== "button") {
const subValue = row[col.bodySubKey];
console.log(col, subValue, "subValue")
if (this.isValueEmpty(subValue)) {
const errorItem = {
rowIndex,
colIndex,
field: col.bodySubKey,
label: `${this.$t(col.label)}单位`,
error: `请填写${this.$t(col.label)}单位`
};
errors.push(errorItem);
this.formErrors.push(errorItem);
}
}
}
console.log(col.otherCode, "col.otherCode")
//
@ -722,6 +777,7 @@ export default {
this.localDataSource[rowIndex] = { ...this.localDataSource[rowIndex], ...data };
this.localDataSource = [...this.localDataSource];
this.checkCompareToOnDataLoad();
this.justUpdateFilledFormData();
},
// newDataoldDatafalse
compareOldAndCurrentFormFields(newData, oldData) {
@ -737,6 +793,15 @@ export default {
return true;
},
//
justUpdateFilledFormData(){
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params,)
},
onAddRow() {
if (this.$listeners && this.$listeners['onAddRow']) {
this.$emit('onAddRow');
@ -748,6 +813,7 @@ export default {
targetDiluentVolumePrecision: 3,//3
targetStartSolutionVolumePrecision: 3,//3
});
this.justUpdateFilledFormData()
},
//
@ -884,7 +950,8 @@ export default {
}
.custom-table-body {
max-height: 300px;
max-height: 500px;
overflow-y: auto;
/* 可根据需要调整或由父组件控制 */
}
@ -1027,7 +1094,16 @@ export default {
text-align: center;
width: 100px;
}
.flex-wrap{
.flex-wrap {
flex-wrap: wrap;
gap:10px;
}
.row-error-border {
box-shadow: 0 0 6px #ffc3c3;
padding: 8px;
border-radius: 4px;
border: 1px solid #ff5d5d;
}
</style>

+ 171
- 130
src/components/Template/HandleFormItem.vue View File

@ -24,12 +24,11 @@
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue"
:disabled="getDisabled()" :placeholder="getPlaceholder()" @change="onItemCheckboxChange">
</el-checkbox>
<el-radio-group v-else-if="type === 'radio'" v-model="inputValue"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')"
:disabled="getDisabled()"
@change="onItemCheckboxChange"
>
<el-radio v-for="option in item.options" :key="option.value" :label="option.value" :disabled="getDisabled()">
<el-radio-group v-else-if="type === 'radio'" v-model="inputValue"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" :disabled="getDisabled()"
@change="onItemCheckboxChange">
<el-radio v-for="option in item.options" :key="option.value" :label="option.value"
:disabled="getDisabled()">
{{ option.label }}
</el-radio>
</el-radio-group>
@ -41,11 +40,10 @@
{{ option.label }}
</el-checkbox>
<div v-if="option.otherCode && inputValue.includes(option.value)">
<el-input v-model="otherValues[option.otherCode]"
:placeholder="option.otherPlaceholder || '请输入'"
:class="{ 'error-border': isOtherInputError(option.otherCode) }"
@blur="onBlur"
@input="onOtherInputChange(option.otherCode, $event)" />
<el-input v-model="otherValues[option.otherCode]"
:placeholder="option.otherPlaceholder || '请输入'"
:class="{ 'error-border': isOtherInputError(option.otherCode) }" @blur="onBlur"
@input="onOtherInputChange(option.otherCode, $event)" />
</div>
</div>
</el-checkbox-group>
@ -63,7 +61,7 @@
<el-button v-else-if="type === 'button'" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')"
:disabled="getDisabled()" type="primary" @click="handleClickButton(item)">
{{ $t(item.buttonName) }}
<input type="hidden" v-model="inputValue" >
<input type="hidden" v-model="inputValue">
</el-button>
<div class="clickable"
@ -89,28 +87,26 @@
<div slot="tip" class="el-upload__tip">支持扩展名.rar .zip .doc .docx .pdf .jpg文件大小不超过2MB</div>
</el-upload>
</template>
<div v-else-if="type === 'checkboxTag'" class="flex1 checkbox-tag-container"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')">
<div class="checkbox-tag-item">
<el-checkbox v-model="checkboxTagChecked" :disabled="getDisabled()" @change="onCheckboxTagChange"></el-checkbox>
<div class="tag-content blue-border" @click="onTagClick">
<el-input v-if="isEditingTag"
v-model="tagValue"
ref="tagInput"
:maxlength="item.maxlength || 20"
@blur="onTagBlur"
@keyup.enter.native="onTagBlur"
placeholder="请输入"
size="mini"
class="tag-input" />
<el-tag v-else
:type="'info'"
class="tag-display"
:closable="false">
{{ tagValue || '点击输入' }}
</el-tag>
<div v-else-if="type === 'checkboxTag'" class="flex1 checkbox-tag-wrapper" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')">
<div v-for="(tag, tagIndex) in checkboxTagList" :key="tagIndex" class="checkbox-tag-container">
<div class="checkbox-tag-item">
<el-checkbox v-model="tag.checked" :disabled="getDisabled()"
@change="onCheckboxTagChange(tagIndex, $event)"></el-checkbox>
<div class="tag-content blue-border">
<el-input v-if="templateFillType === 'preFill'" v-model="tag.tagValue"
:ref="'tagInput_' + tagIndex" :maxlength="item.maxlength || 20"
@blur="onTagBlur(tagIndex)" @keyup.enter.native="onTagBlur(tagIndex)"
placeholder="请输入" size="mini" class="tag-input" />
<el-tag v-else :type="'info'" class="tag-display" :closable="false">
{{ tag.tagValue }}
</el-tag>
<el-popconfirm confirm-button-text='确认' cancel-button-text='取消' icon="el-icon-info"
icon-color="red" title="确认删除当前编号?" @confirm="onDeleteTag(tagIndex)">
<i slot="reference" v-if="templateFillType === 'preFill'"
class="el-icon-close delete-icon"></i>
</el-popconfirm>
</div>
</div>
<i class="el-icon-close delete-icon" @click="onDeleteTag" v-if="tagValue"></i>
</div>
</div>
@ -242,23 +238,26 @@ export default {
},
data() {
let initialValue = this.value;
let initialOtherValues = {},checkboxTagChecked = false,tagValue = '';
let initialOtherValues = {}, checkboxTagList = [];
// checkboxListvalue
if (this.type === 'checkboxList' && this.value && typeof this.value === 'object') {
initialValue = this.value.checkboxValues || [];
initialOtherValues = this.value.otherValues || {};
} else if (this.type === 'checkboxList' && !Array.isArray(this.value)) {
initialValue = [];
}else if (this.type === 'checkboxTag' && this.value && typeof this.value === 'object') {
checkboxTagChecked = this.value.checked || false;
tagValue = this.value.tagValue || '';
}
} else if (this.type === 'checkboxTag' && Array.isArray(this.value)) {
// checkboxTagvalue
checkboxTagList = this.value.map(tag => ({
checked: tag.checked,
tagValue: tag.tagValue || ''
}));
}
return {
inputValue: initialValue,
oldValue: initialValue, //
otherValues: initialOtherValues, // checkboxListotherCode
oldOtherValues: {...initialOtherValues}, // otherValues
oldOtherValues: { ...initialOtherValues }, // otherValues
showModal: false, //
modificationRecords: [], //
modalTimer: null, //
@ -268,9 +267,8 @@ export default {
replyContent: '', //
visible: false,//
checkboxValue: this.getChecked(),//
checkboxTagChecked: checkboxTagChecked, // checkboxTagcheckbox
tagValue: tagValue, // checkboxTagtag
isEditingTag: false, // tag
checkboxTagList: checkboxTagList, // checkboxTag
oldCheckboxTagList: JSON.parse(JSON.stringify(checkboxTagList)), // checkboxTagList
uuid: getuuid(), // EventBus
regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq', 'jcb', 'qxbd'], ////
selectRegentInfo: {},////
@ -281,18 +279,22 @@ export default {
},
pendingUploadFile: null, //
pendingRemoveFile: null, //
currentTagIndex:-1,//checkboxTag
}
},
watch: {
value(newVal) {
console.log(newVal,"newVal")
console.log(newVal, "newVal")
if (this.type === 'checkboxList' && newVal && typeof newVal === 'object') {
this.inputValue = newVal.checkboxValues || [];
this.otherValues = newVal.otherValues || {};
} else if (this.type === 'checkboxTag' && newVal && typeof newVal === 'object') {
this.checkboxTagChecked = newVal.checked || false;
this.tagValue = newVal.tagValue || '';
} else {
} else if (this.type === 'checkboxTag' && Array.isArray(newVal)) {
// checkboxTagvalue
this.checkboxTagList = newVal.map(tag => ({
checked: tag.checked,
tagValue: tag.tagValue || ''
}));
} else {
this.inputValue = this.type === 'checkboxList' && !Array.isArray(newVal) ? [] : newVal;
}
}
@ -328,13 +330,13 @@ export default {
EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit)
},
methods: {
getFlexClass(){
const noFlexArr = ["radio","checkboxTag"]
getFlexClass() {
const noFlexArr = ["radio", "checkboxTag"]
return noFlexArr.includes(this.type) ? '' : 'flex1'
},
getDecimalDigits(){
const {precision} = this.item;
if(!isNaN(precision)){
getDecimalDigits() {
const { precision } = this.item;
if (!isNaN(precision)) {
return precision
}
return 6
@ -526,11 +528,11 @@ export default {
//
executeReagentSubmit(data) {
this.inputValue = data.selectedId;
const {filledCodes=[]} = this.item;
console.log(filledCodes,"filledCodes")
const {selectInfo,row} = data;
if(filledCodes.length>0){
this.inputValue = row[filledCodes[0]]+"("+row[filledCodes[1]]+")";
const { filledCodes = [] } = this.item;
console.log(filledCodes, "filledCodes")
const { selectInfo, row } = data;
if (filledCodes.length > 0) {
this.inputValue = row[filledCodes[0]] + "(" + row[filledCodes[1]] + ")";
}
this.selectRegentInfo = data;
EventBus.$emit("hideSelectMixReagentDialog");
@ -654,7 +656,7 @@ export default {
preFill: "blue-border",//
}
//
if (this.error && this.type !== "attachment") {
if (this.error && this.type !== "attachment" && this.type !== "checkboxTag") {
return "error-border";
}
return typeObj[fillType] || ""
@ -774,7 +776,7 @@ export default {
// checkbox
if (this.oldValue && Array.isArray(this.oldValue)) {
const uncheckedValues = this.oldValue.filter(oldVal => !this.inputValue.includes(oldVal));
// checkboxotherValues
if (uncheckedValues.length > 0) {
this.item.options.forEach(option => {
@ -785,19 +787,19 @@ export default {
}
}
value = {
checkboxValues: this.inputValue,
otherValues: this.otherValues
};
if(val){
checkboxValues: this.inputValue,
otherValues: this.otherValues
};
if (val) {
this.onCommonHandleSaveRecord();
}
}
this.$emit('input', value);
this.$emit('change', value);
//
const isEmpty = this.isValueEmpty(value);
@ -813,38 +815,32 @@ export default {
this.onInputChange();
},
// checkboxTagcheckbox
onCheckboxTagChange() {
onCheckboxTagChange(tagIndex, e) {
this.currentTagIndex = tagIndex;
this.checkboxTagList[tagIndex].checked = e;
this.emitCheckboxTagValue();
this.onCommonHandleSaveRecord();
},
// tag
onTagClick() {
this.isEditingTag = true;
this.$nextTick(() => {
this.$refs.tagInput && this.$refs.tagInput.focus();
});
},
// tag
onTagBlur() {
this.isEditingTag = false;
onTagBlur(tagIndex) {
this.currentTagIndex = tagIndex;
const value = this.checkboxTagList[tagIndex].tagValue;
this.emitCheckboxTagValue();
//
if (this.tagValue) {
this.onCommonHandleSaveRecord(this.tagValue);
}
this.onCommonHandleSaveRecord(value);
},
// tag
onDeleteTag() {
this.tagValue = '';
onDeleteTag(tagIndex) {
this.currentTagIndex = tagIndex;
// tag
this.emitCheckboxTagValue();
this.onCommonHandleSaveRecord('');
this.$emit("deleteTag", tagIndex);
},
// checkboxTag
emitCheckboxTagValue() {
const value = {
checked: this.checkboxTagChecked,
tagValue: this.tagValue
};
this.$emit('change', value);
//
this.$emit('input', [...this.checkboxTagList]);
this.$emit('change', [...this.checkboxTagList]);
},
//
onBlur(e) {
@ -921,19 +917,28 @@ export default {
this.$emit("change", this.inputValue);
return;
}
//
const isSame = this.isEqual(this.oldValue, this.inputValue);
let isOtherValuesSame = true;
let isSame = true, isOldValueEmpty = true;
// checkboxListotherValues
if (this.type === 'checkboxList' && this.otherValues) {
isOtherValuesSame = this.isEqual(this.oldOtherValues, this.otherValues);
}
console.log(this.oldValue, this.inputValue, isSame, isOtherValuesSame,this.otherValues,this.oldOtherValues,"是否需要记录修改记录")
if (isSame && isOtherValuesSame) {
isSame = this.isEqual(this.oldOtherValues, this.otherValues);
isOldValueEmpty = this.isValueEmpty(this.oldOtherValues);
} else if (this.type === "checkboxTag") {
// checkboxTagtagIndex
const currentTag = this.checkboxTagList[this.currentTagIndex];
const oldTag = this.oldCheckboxTagList[this.currentTagIndex] || {};
isSame = this.isEqual(oldTag.checked, currentTag.checked);
isOldValueEmpty = this.isValueEmpty(oldTag.checked);
}else{
isSame = this.isEqual(this.oldValue, this.inputValue)
isOldValueEmpty = this.isValueEmpty(this.oldValue);
}
if (isSame) {
return;
}
if (!this.isValueEmpty(this.oldValue) && !(isSame && isOtherValuesSame) && this.templateFillType === "actFill") {
if (!isOldValueEmpty && !(isSame) && this.templateFillType === "actFill") {
// EventBus
EventBus.$emit('showEditSignDialog', { uuid: this.uuid });
} else {//
@ -946,11 +951,22 @@ export default {
//
let oldValue = this.oldValue;
if (this.type === 'checkboxList') {
oldValue = {
oldValue = {
checkboxValues: oldValue.checkboxValues || oldValue,
otherValues: this.oldOtherValues
};
}
} else if (this.type === "checkboxTag") {
// checkboxTag退tagIndex
if (this.currentTagIndex >= 0 && this.currentTagIndex < this.oldCheckboxTagList.length) {
const oldTag = this.oldCheckboxTagList[this.currentTagIndex];
this.checkboxTagList[this.currentTagIndex] = { ...oldTag };
oldValue = [...this.checkboxTagList];
} else {
// tagIndex退
this.checkboxTagList = JSON.parse(JSON.stringify(this.oldCheckboxTagList));
oldValue = [...this.checkboxTagList];
}
}
this.inputValue = this.oldValue;
this.$emit('input', oldValue); // v-model
// this.$emit("blur", this.oldValue);
@ -961,18 +977,30 @@ export default {
},
//
handleUpdateRecord(data,recordData) {
handleUpdateRecord(data, recordData) {
const baseInfo = this.getCommonRecordInfo();
if (!this.oldValue && !this.inputValue) return;
if(recordData){
if (!this.oldValue && !this.inputValue) {
return
}
if (recordData) {
this.oldValue = recordData.oldValue;
this.inputValue = recordData.inputValue;
}
let recordOldVlaue = this.oldValue, recordValue = this.inputValue, isModify = !!this.oldValue;
if (this.type === "checkboxTag") {
// checkboxTagtagIndex
const oldTag = this.oldCheckboxTagList[this.currentTagIndex] || {};
const currentTag = this.checkboxTagList[this.currentTagIndex] || {};
recordOldVlaue = `${oldTag.tagValue || ''}:${oldTag.checked ? '勾选' : '未勾选'}`;
recordValue = `${currentTag.tagValue || ''}:${currentTag.checked ? '勾选' : '未勾选'}`;
isModify = oldTag.checked !== undefined
}
const record = {
...baseInfo,
oldValue: this.oldValue,
value: this.inputValue,
title: this.oldValue ? "修改" : "提交",
oldValue: recordOldVlaue,
value: recordValue,
title: isModify ? "修改" : "提交",
time: moment().format("YYYY-MM-DD HH:mm:ss"),
}
if (data) {
@ -984,11 +1012,19 @@ export default {
newRecord: [record],
resourceList: this.getZdxgjl(),
}
// oldValueoldOtherValues
// oldValueoldOtherValues
if (this.type === 'checkboxList') {
this.oldValue = [...this.inputValue];
this.oldOtherValues = { ...this.otherValues };
} else if (this.type === "checkboxTag") {
// checkboxTagtagIndex
if (this.currentTagIndex >= 0 && this.currentTagIndex < this.checkboxTagList.length) {
this.oldCheckboxTagList[this.currentTagIndex] = { ...this.checkboxTagList[this.currentTagIndex] };
} else {
// tagIndex
this.oldCheckboxTagList = JSON.parse(JSON.stringify(this.checkboxTagList));
}
}
let value = this.inputValue;
if (this.type === 'checkboxList') {
@ -996,10 +1032,12 @@ export default {
checkboxValues: this.inputValue,
otherValues: this.otherValues
};
} else if (this.type === "checkboxTag") {
value = [...this.checkboxTagList];
}
if(this.type === "button"){
this.$emit('clickButton', this.item,this.inputValue,data);
if(this.templateFillType === "preFill"){
if (this.type === "button") {
this.$emit('clickButton', this.item, this.inputValue, data);
if (this.templateFillType === "preFill") {
return;
}
}
@ -1017,7 +1055,7 @@ export default {
}
this.$nextTick(() => {
EventBus.$emit('onModifyRecord', params,)
console.log(params,"onModifyRecord")
console.log(params, "onModifyRecord")
if (this.regentType.includes(this.item.type)) {
this.$emit("onRegentSubmit", this.selectRegentInfo, this.inputValue);
}
@ -1106,7 +1144,7 @@ export default {
isShowHandle() {
const { fillType } = this.item;
//
return this.templateFillType !== "preFill" && fillType === "actFill"&&this.type!=="button"
return this.templateFillType !== "preFill" && fillType === "actFill" && this.type !== "button"
},
//
getDisabled() {
@ -1582,15 +1620,17 @@ export default {
margin-right: 16px;
display: flex;
align-items: center;
&:not(:last-child) {
margin-bottom: 10px;
}
// display: inline-block;
.el-input {
width: 200px;
margin-left: 10px;
&.error-border {
.el-input__inner {
border-color: #ff5d5d !important;
@ -1600,7 +1640,7 @@ export default {
}
}
}
.orange-border {
@ -1612,6 +1652,7 @@ export default {
}
}
.el-checkbox {
&.is-checked {
.el-checkbox__label {
@ -1624,6 +1665,7 @@ export default {
}
}
}
.el-radio {
&.is-checked {
.el-radio__label {
@ -1646,16 +1688,15 @@ export default {
}
// checkboxTag
.checkbox-tag-wrapper {
display: flex;
flex-wrap: wrap;
gap: 10px;
padding: 8px;
}
.checkbox-tag-container {
border-radius: 4px;
// transition: all 0.3s;
margin-bottom: 5px;
margin-right: 5px;
&.error-border {
border-color: #ff5d5d !important;
box-shadow: 0 0 6px #ffc3c3 !important;
}
.checkbox-tag-item {
display: flex;
@ -1664,6 +1705,7 @@ export default {
.tag-content {
cursor: pointer;
position: relative;
.tag-input {
width: 100px;
@ -1678,15 +1720,14 @@ export default {
.delete-icon {
cursor: pointer;
color: #909399;
font-size: 14px;
font-size: 12px;
padding: 2px;
border-radius: 50%;
// transition: all 0.3s;
&:hover {
color: #ff5d5d;
background-color: #f5f5f5;
}
position: absolute;
top: 6px;
right: 5px;
color: red;
background-color: #f5f5f5;
}
}
}

+ 0
- 1
src/components/Template/mixins/formPackageMixins.js View File

@ -261,7 +261,6 @@ export default {
selectInfoKeys.forEach(key => {
result[key] = formData[key];
})
console.log(config,"allConfig")
// 更新表单字段
this.formFields = result;
this.allFieldsConfig = config;

+ 9
- 1
src/components/Template/operation/TableOpertaion.vue View File

@ -162,7 +162,15 @@ export default {
},
//
deleteRow(index) {
this.$emit("deleteRow", index)
this.$emit("deleteRow", index);
setTimeout(() => {
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params,)
}, 30);
}
}
}

+ 11
- 1
src/components/Template/operation/TableOpertaionDelete.vue View File

@ -10,6 +10,8 @@
</template>
<script>
import { EventBus } from "@/utils/eventBus";
export default {
name: "TableOpertaionDelete",
props: {
@ -25,7 +27,15 @@ export default {
methods: {
//
deleteRow(index) {
this.$emit("deleteRow", index)
this.$emit("deleteRow", index);
setTimeout(() => {
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params,)
}, 30);
}
}
}

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

@ -88,7 +88,14 @@ import DL013 from './comps/dl/DL013.vue'
import DL014 from './comps/dl/DL014.vue'
import DL015 from './comps/dl/DL015.vue'
import DL016 from "./comps/dl/DL016.vue";
import DL017 from "./comps/dl/DL017.vue";
import DL018 from "./comps/dl/DL018.vue";
import DL019 from "./comps/dl/DL019.vue";
import DL020 from "./comps/dl/DL020.vue";
import DL021 from "./comps/dl/DL021.vue";
import DL022 from "./comps/dl/DL022.vue";
import DL023 from "./comps/dl/DL023.vue";
import DL024 from "./comps/dl/DL024.vue";
export default {
@ -127,7 +134,14 @@ export default {
DL014,
DL015,
DL016,
DL020
DL017,
DL018,
DL019,
DL020,
DL021,
DL022,
DL023,
DL024
},
data() {
return {
@ -244,7 +258,14 @@ export default {
'DL014': 'DL014',
'DL015': 'DL015',
'DL016': 'DL016',
'DL017': 'DL017',
'DL018': 'DL018',
'DL019': 'DL019',
'DL020': 'DL020',
'DL021': 'DL021',
'DL022': 'DL022',
'DL023': 'DL023',
'DL024': 'DL024',
}
}
return this.componentMap || "Demo"

+ 39
- 23
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -11,7 +11,7 @@
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.yp.yp004.zbxx" />
<LineLabel label="template.dl.dl016.qcxjjyqk" />
<CustomTable
:ref="`tableRef`"
@ -26,7 +26,11 @@
</template>
</CustomTable>
<LineLabel label="template.yp.yp004.zbbz" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl016.xbxx" label="template.dl.dl016.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl016.zbbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
@ -99,31 +103,19 @@ export default {
}
},
{
type: "conditionItem",
label: 'template.yp.yp004.pztj',
type: "cellItem",
label: 'template.dl.dl016.sydd',
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",
label: 'template.dl.dl016.sydd',
type: "input",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
},
}
},
{
type: "cellItem",
label: 'template.lba.lba002.czsj',
label: 'template.dl.dl016.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@ -137,24 +129,48 @@ export default {
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl016.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
pre: {
label: 'template.dl.dl016.preFill',
type: "select",
fillType: "preFill",
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: "preOther",
},
}
},
]
},
//
tableColumns() {
return [{
label: 'template.yp.yp004.zbdx',
label: 'template.dl.dl016.zbdx',
prop: 'zbdx',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 50,
},{
label: 'template.yp.yp004.yjzbs',
label: 'template.dl.dl016.yjzbs',
prop: 'yjzbs',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 10,
},{
label: 'template.yp.yp004.sjzbs',
label: 'template.dl.dl016.sjzbs',
prop: 'sjzbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',

+ 205
- 0
src/views/business/comps/template/comps/dl/DL017.vue View File

@ -0,0 +1,205 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
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 moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
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: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 205
- 0
src/views/business/comps/template/comps/dl/DL018.vue View File

@ -0,0 +1,205 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
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 moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
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: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 205
- 0
src/views/business/comps/template/comps/dl/DL019.vue View File

@ -0,0 +1,205 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
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 moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
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: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 12
- 12
src/views/business/comps/template/comps/dl/DL020.vue View File

@ -140,18 +140,18 @@ export default {
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
const remarkData = this.$refs.remarkRef.getFilledFormData();
const stepData = this.$refs.stepRef.getFilledFormData();
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
...swypyjData,
...remarkData,
...stepData,
}
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
@ -170,7 +170,7 @@ export default {
return await this.validFormFields(refsToValidate);
},
getResource() {
let content = this.getFilledFormData();
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []

+ 205
- 0
src/views/business/comps/template/comps/dl/DL021.vue View File

@ -0,0 +1,205 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
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 moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
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: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 205
- 0
src/views/business/comps/template/comps/dl/DL022.vue View File

@ -0,0 +1,205 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
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 moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
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: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 205
- 0
src/views/business/comps/template/comps/dl/DL023.vue View File

@ -0,0 +1,205 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
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 moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
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: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 205
- 0
src/views/business/comps/template/comps/dl/DL024.vue View File

@ -0,0 +1,205 @@
<!-- 生物样品接收记录表 -->
<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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
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 moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
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: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 16
- 5
src/views/business/comps/template/comps/yp/YP003.vue View File

@ -17,9 +17,11 @@
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
operationWidth = "80px"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
fieldItemLabel = "template.yp.yp003.ybxx"
@clickButton="handleClickButton"
@onCheckboxTagChange="onCheckboxTagChange"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
@ -159,7 +161,7 @@ export default {
prop: 'cyd',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
width: 100,
bodyMaxlength: 50,
},{
label: 'template.yp.yp003.dwbh',
@ -170,14 +172,15 @@ export default {
bodySubFillType:"preFill",
bodySubButtonName:"template.common.importTemplate",
bodySubKey:"exportBtn",
showBodySub:true,
showBodySub:this.fillType === "preFill",
width: 280,
},{
label: 'template.yp.yp003.ypsl',
prop: 'ypsl',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
width: 280,
width: 80,
}]
},
},
@ -234,15 +237,23 @@ export default {
const data = excelData.splice(1);
const tagData = data.map((item)=>{
return {
checked:false,
checked:undefined,
tagValue:item[0],
}
})
this.$refs.tableRef.updateDataSourceByRowIndex(this.currentRowIndex,{dwbh:tagData});
this.$refs.tableRef.onErrorUpdate(this.currentRowIndex, 1, 'dwbh', false)
this.$refs.ImportExcelDialog.cancel()
setTimeout(() => {
this.justUpdateFilledFormData();
}, 100);
},
downloadExcelTemplate(arr){
this.exportExcel(arr)
},
onCheckboxTagChange(rowIndex,colIndex,data){
const num = data.filter((item)=>item.checked).length;
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, {'ypsl':num})
}
}
};

+ 11
- 0
src/views/business/comps/template/mixins/templateMixin.js View File

@ -6,6 +6,8 @@ import { sj_subpackage, sj_startConfiguration, sj_configurationCompleted } from
import {convertConcentration} from "@/utils/conConverter";//浓度单位转换
import {volumeConverter} from "@/utils/volConverter";//体积单位转换
import * as XLSX from 'xlsx'
import { EventBus } from "@/utils/eventBus";
export default {
dicts: [
'business_pztj',
@ -227,6 +229,15 @@ export default {
this.setTemplateData({})
},
methods: {
// 只是更新已填写的表单数据,不触发校验
justUpdateFilledFormData(){
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params,)
},
//试剂弹窗确认前
onBeforeReagentSubmit(data){
const {selectData, callback, key, formFields} = data;

Loading…
Cancel
Save