@@ -410,6 +414,9 @@ export default {
};
},
methods: {
+ remoteMethod(query, sItem, key){
+ this.$emit('remoteMethod', { query, sItem, key, formFields: this.formFields })
+ },
//是否显示radio后的select
isShowRadioSelect(value){
const arr = ["动物种属","细胞系"];
@@ -430,7 +437,8 @@ export default {
return {
...sItem,
key: sItem.subKey,
- fillType: sItem.fourthFillType || sItem.fillType
+ disabled: sItem.subDisabled || sItem.disabled,
+ fillType: sItem.subFillType || sItem.fillType
}
},
getFourthButtonItem(sItem) {
@@ -438,6 +446,7 @@ export default {
...sItem,
key: sItem.fourthKey,
buttonName:sItem.fourthButtonName,
+ disabled: sItem.fourthDisabled || sItem.disabled,
fillType: sItem.fourthFillType || sItem.fillType
}
},
diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue
index 7ddf799..9b75591 100644
--- a/src/components/Template/CustomTable.vue
+++ b/src/components/Template/CustomTable.vue
@@ -93,7 +93,7 @@
-
-
-
-
-
- handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" />
-
@@ -401,6 +403,10 @@ export default {
EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit)
},
methods: {
+ remoteMethod(query) {
+ console.log(query,"qqq")
+ this.$emit('remoteMethod', query);
+ },
handleFalse() {
return false;
},
diff --git a/src/views/business/comps/template/comps/dl/DL022.vue b/src/views/business/comps/template/comps/dl/DL022.vue
index 6af3933..a5b6c0c 100644
--- a/src/views/business/comps/template/comps/dl/DL022.vue
+++ b/src/views/business/comps/template/comps/dl/DL022.vue
@@ -244,6 +244,7 @@ export default {
onAddRow() {
this.$refs.tableRef.addRow({
jblx: [{value: undefined}],
+ id: getuuid(),
})
},
onFormSelect(fields) {
diff --git a/src/views/business/comps/template/comps/sp/SP0019.vue b/src/views/business/comps/template/comps/sp/SP0019.vue
index 60fdaf9..f126607 100644
--- a/src/views/business/comps/template/comps/sp/SP0019.vue
+++ b/src/views/business/comps/template/comps/sp/SP0019.vue
@@ -23,6 +23,7 @@
({
+ label: item.bh,
+ value: item.bh,
+ }));
+ }
+ }
+ },
onRegentSubmit(e){
const {selectInfo, key, col, rowIndex, colIndex, rowData} = e;
const {row} = selectInfo;
@@ -130,8 +149,17 @@ export default {
this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params);
}
},
- onYqSubmit(data, col, rowIndex, colIndex, row){
- console.log(data, col, rowIndex, colIndex, row,"onRegentSubmit")
+ onYqSubmit(data){
+ const {selectInfo,rowIndex,key} = data;
+ const {row} = selectInfo;
+ if(key === "bh"){//一起编号
+ const params = {
+ mc: row.mc,
+ xh: row.xh,
+ jzrq: row.jzrq,
+ }
+ this.$refs.yqInfoTableRef.updateDataSourceByRowIndex(rowIndex, params);
+ }
},
//获取已填写的表单数据
getFilledFormData() {
diff --git a/src/views/business/comps/template/comps/sp/SP0021.vue b/src/views/business/comps/template/comps/sp/SP0021.vue
index e1f475b..03b33ef 100644
--- a/src/views/business/comps/template/comps/sp/SP0021.vue
+++ b/src/views/business/comps/template/comps/sp/SP0021.vue
@@ -19,30 +19,26 @@
-
- 导入动物
-
+
+ 导入动物
+
- deleteTableRow(rowIndex, `ybsmTableRef${index}`)"
- >
+ deleteTableRow(rowIndex, `ybsmTableRef${index}`)">
+
-
+
@@ -50,7 +46,8 @@
-
+
@@ -65,8 +62,8 @@ import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { uniqeResource } from "@/utils/calUnitTools";
-import {getuuid,justUpdateFilledFormData} from "@/utils/index";
-import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig,getTableColumns } from "../../formConfig/sp/SP0021";
+import { getuuid, justUpdateFilledFormData } from "@/utils/index";
+import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig, getTableColumns } from "../../formConfig/sp/SP0021";
const refConfig = {
baseInfoRef: "baseInfoRef",
remarkRef: "remarkRef",
@@ -78,7 +75,7 @@ const refConfig = {
const compRefs = Object.values(refConfig);
export default {
name: "SP0021",
- components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete,ImportExcelDialog },
+ components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete, ImportExcelDialog },
mixins: [templateMixin],
props: {
fillType: {
@@ -113,23 +110,24 @@ export default {
},
},
data() {
- return {
- refConfig,
- };
- },
+ return {
+ refConfig,
+ currentIndex: -1,
+ };
+ },
mounted() {
- if(this.fillType === 'preFill' &&!this.formData.ybsmDataList){//预填的时候默认新增一个。
+ if (this.fillType === 'preFill' && !this.formData.ybsmDataList) {//预填的时候默认新增一个。
this.onAdd()
}
},
methods: {
//删除样本说明
- deleteConfig(item){
+ deleteConfig(item) {
// 确保 ybsmDataList 存在
if (this.formData.ybsmDataList.length > 1) {
const configIndex = this.formData.ybsmDataList.findIndex(config => config.id === item.id);
- console.log(configIndex,"configIndex")
- if(configIndex>-1){
+ console.log(configIndex, "configIndex")
+ if (configIndex > -1) {
const newList = [...this.formData.ybsmDataList]
newList.splice(configIndex, 1);
this.$set(this.formData, 'ybsmDataList', newList);
@@ -141,19 +139,19 @@ export default {
} else {
this.$message.warning('至少保留一个样本说明项');
}
-
+
},
//新增样本说明
- onAdd(){
+ onAdd() {
if (!this.formData.ybsmDataList) {
this.$set(this.formData, 'ybsmDataList', []);
}
- let defaultInfo = {
+ let defaultInfo = {
id: getuuid(),
stepData: [],
}
- if(this.fillType === "actFill"){
- const {ybsmDataList} = this.formData
+ if (this.fillType === "actFill") {
+ const { ybsmDataList } = this.formData
defaultInfo.stepData = ybsmDataList[0]?.stepData || []
}
// 添加新的平行配制配置
@@ -161,21 +159,29 @@ export default {
},
onLoadExcelData(excelData) {
const data = excelData.splice(1);
+ const transData = data.map((item)=>{
+ return{
+ dwbh: item[0],
+ id: getuuid(),
+ }
+ })
+ this.$refs[`ybsmTableRef${this.currentIndex}`][0].pushDataSource(transData)
this.$refs.ImportExcelDialog.cancel()
setTimeout(() => {
justUpdateFilledFormData();
}, 100);
},
- downloadExcelTemplate(arr){
+ downloadExcelTemplate(arr) {
this.exportExcel(arr)
},
// 导入动物
- onImportAnimal(){
+ onImportAnimal(item, index) {
+ this.currentIndex = index;
this.$refs.ImportExcelDialog.show()
},
// 删除表格行
deleteTableRow(rowIndex, refName) {
- this.$refs[refName].deleteRow(rowIndex)
+ this.$refs[refName][0].deleteRow(rowIndex)
},
//获取已填写的表单数据
getFilledFormData() {
@@ -202,18 +208,18 @@ export default {
// 基础表单验证
let content = await this.validFormFields(compRefs);
if (!content) return null;
-
+
// 验证多个样本说明项
for (let index = 0; index < this.formData.ybsmDataList.length; index++) {
// 验证样本说明表单
const ybsmFormValid = await this.$refs[`ybsmFormPackageRef${index}`][0]?.getFormData() || true;
if (!ybsmFormValid) return null;
-
+
// 验证步骤数据
const stepValid = await this.$refs[`stepRef${index}`][0]?.getFormData() || true;
if (!stepValid) return null;
}
-
+
// 获取所有数据
return this.getFilledFormData();
},
@@ -272,6 +278,7 @@ export default {
.print-btn {
margin-bottom: 20px;
}
+
.config-header {
display: flex;
justify-content: space-between;
diff --git a/src/views/business/comps/template/formConfig/sp/SP0019.js b/src/views/business/comps/template/formConfig/sp/SP0019.js
index a3d20f2..cf42240 100644
--- a/src/views/business/comps/template/formConfig/sp/SP0019.js
+++ b/src/views/business/comps/template/formConfig/sp/SP0019.js
@@ -43,19 +43,22 @@ export const getBaseInfoFormConfig = (formType) => {
]
}
-export const storageFormConfig = [
- {
- type: 'step',
- config: {
- yqmxh: {
- label: '色谱柱型号',
- type: 'yq',
- fillType: 'actFill',
- filledCodes:['mc','bh'],
- },
- }
- },
-]
+export const getStorageFormConfig = ($this)=>{
+ return[
+ {
+ type: 'step',
+ config: {
+ spzxh: {
+ label: '色谱柱型号',
+ type: 'select',
+ fillType: 'actFill',
+ options: $this.spzxhOptions,
+ filledCodes:['mc','bh'],
+ },
+ }
+ },
+ ]
+}
//仪器信息
export const getYqColumns = ($this) => {