@@ -109,7 +109,7 @@
onBodyValueChange(rowIndex, colIndex, e, row, col.bodyType)"
:error="hasError(rowIndex, colIndex, col.prop)"
@@ -195,7 +195,7 @@
item.label === value) || {};
return !!o.checked;
},
// 获取或创建checkedItem
getOrCreateCheckedItem(value) {
- let checkedItem = this.inputValue.checkedValues.find(item => item.label === value);
+ const {checkedValues = []} = this.inputValue;
+ let checkedItem = checkedValues.find(item => item.label === value);
if (!checkedItem) {
checkedItem = { label: value, checked: false };
- this.inputValue.checkedValues.push(checkedItem);
+ checkedValues.push(checkedItem);
}
return checkedItem;
},
@@ -999,7 +1004,6 @@ export default {
}
});
}
-
this.onCommonHandleSaveRecord();
},
@@ -1126,11 +1130,11 @@ export default {
return o[this.currentHandleType];
},
getCheckboxTreeInfo() {
- const { checkedValues, otherValues } = this.inputValue;
+ const { checkedValues = [], otherValues = {} } = this.inputValue;
const { checkedValues: oldCheckedValues, otherValues: oldOtherValues } = this.oldValue;
const { currentHandleType, currentCheckboxTreeValue } = this;
const newItem = checkedValues.find(item => item.label === currentCheckboxTreeValue);
- const oldItem = oldCheckedValues.find(item => item.label === currentCheckboxTreeValue);
+ const oldItem = (oldCheckedValues || []).find(item => item.label === currentCheckboxTreeValue);
const o = {
"checkboxTreeCheckbox": { oldValue: oldItem, newValue: newItem, des: "" },
"checkboxTreeOther": { oldValue: oldOtherValues[currentCheckboxTreeValue], newValue: otherValues[currentCheckboxTreeValue], des: `${currentCheckboxTreeValue}:`, key: this.fieldKey + "_" + currentCheckboxTreeValue },
@@ -1203,19 +1207,20 @@ export default {
const current = this.getFqyqInfo();
isSame = isEqual(current.oldValue, current.newValue);
if (this.currentHandleType === "inputValue") {
- isOldValueEmpty = this.isUnSubmitted(current.key);
+ isOldValueEmpty = this.isUnSubmitted(this.fieldKey+current.key);
} else {
isOldValueEmpty = isValueEmpty(current.oldValue);
}
} else if (this.type === "checkboxTree") {
const current = this.getCheckboxTreeInfo() || {};
const { oldValue = {}, newValue = {} } = current;
+ console.log(oldValue,newValue,"oldValue,newValue")
if (currentHandleType === "checkboxTreeCheckbox") {
isSame = isEqual(oldValue.checked, newValue.checked);
isOldValueEmpty = oldValue.checked === undefined;
} else {
isSame = isEqual(current.oldValue, current.newValue);
- isOldValueEmpty = this.isUnSubmitted(current.key);
+ isOldValueEmpty = this.isUnSubmitted(this.fieldKey+current.key);
}
} else if(this.type === "radioTree"){
@@ -1223,11 +1228,10 @@ export default {
const { oldValue = {}, newValue = {} } = current;
if (this.currentHandleType === "checkboxTreeCheckbox") {
isSame = isEqual(oldValue, newValue);
- console.log(oldValue,newValue,oldValue !== newValue,"newValue")
isOldValueEmpty = oldValue === newValue;
} else {
isSame = isEqual(current.oldValue, current.newValue);
- isOldValueEmpty = this.isUnSubmitted(current.key);
+ isOldValueEmpty = this.isUnSubmitted(this.fieldKey+current.key);
}
} else if (this.type === "checkbox") {
@@ -1311,7 +1315,7 @@ export default {
recordOldVlaue = `${current.des + current.oldValue}`;
recordValue = `${current.des + current.newValue}`;
if (this.currentHandleType === "inputValue") {
- finallyKey = current.key;
+ finallyKey = this.fieldKey+current.key;
}
isModify = !!this.oldFqyqValue.mainRadio
} else if (this.type === "checkboxTree") {
@@ -1325,7 +1329,7 @@ export default {
} else {
recordOldVlaue = `${current.des + (current.oldValue || '')}`;
recordValue = `${current.des + (current.newValue || '')}`;
- finallyKey = current.key;
+ finallyKey = this.fieldKey+current.key;
isModify = !!current.oldValue;
}
} else if (this.type === "radioTree") {
@@ -1338,7 +1342,7 @@ export default {
} else {
recordOldVlaue = `${current.des + (current.oldValue || '')}`;
recordValue = `${current.des + (current.newValue || '')}`;
- finallyKey = current.key;
+ finallyKey = this.fieldKey+current.key;
isModify = !!current.oldValue;
}
} else if (this.type === "checkbox") {
@@ -1548,6 +1552,7 @@ export default {
//获取字段修改记录
getModifyRecords() {
const { fieldKey, getZdxgjl } = this;
+
const records = getZdxgjl().filter(item => item.key === fieldKey);
return records;
},
diff --git a/src/components/Template/mixins/operationMixins.js b/src/components/Template/mixins/operationMixins.js
index 1073b21..931b05d 100644
--- a/src/components/Template/mixins/operationMixins.js
+++ b/src/components/Template/mixins/operationMixins.js
@@ -24,7 +24,7 @@ export default {
const { fieldItemLabel, columnsData } = this.columns;
const { row } = this;
const desArr = columnsData.map((item) => {
- const label = this.$t(item.label), otherValue = "", subValue = "", mainValue = row[item.prop];
+ let label = this.$t(item.label), otherValue = "", subValue = "", mainValue = row[item.prop];
if (item.bodySubKey && (item.bodySubType !== "button")) {
subValue = row[item.bodySubKey];
}
@@ -44,7 +44,8 @@ export default {
"value": "",
"title": "修改",
"time": moment().format("YYYY-MM-DD HH:mm:ss"),
- "reason": remark
+ "reason": remark,
+ type:"deleteRow"
}
]
this.sureDelete(record);
diff --git a/src/views/business/comps/template/comps/gsp/GSP015.vue b/src/views/business/comps/template/comps/gsp/GSP015.vue
index a82a677..f294836 100644
--- a/src/views/business/comps/template/comps/gsp/GSP015.vue
+++ b/src/views/business/comps/template/comps/gsp/GSP015.vue
@@ -56,9 +56,9 @@
addTableRow(index)"
- @beforeReagentSubmit="(e) => beforeReagentSubmit(e, index)"
- @onRegentSubmit="(e) => onRegentSubmit(e, index)"
- fieldItemLabel="取样进样信息" :formData="item">
+ @beforeReagentSubmit="(e) => beforeReagentSubmit(e, index, 'ybsm')"
+ @onRegentSubmit="(e) => onRegentSubmit(e, index, 'ybsm')" fieldItemLabel="取样进样信息"
+ :formData="item">
onConfigComplete(e, 'qy')"
@@ -122,9 +122,11 @@
-
onHandleTableBlur(e, index, 'ecTableRef')"
:showOperation="fillType === 'preFill' || fillType === 'actFill'"
+ @beforeReagentSubmit="(e) => beforeReagentSubmit(e, index, 'ecxs')"
+ @onRegentSubmit="(e) => onRegentSubmit(e, index, 'ecxs')"
@onAddRow="() => addEcTableRow(index, 'ecTableRef')" :formData="item">
{
- const {stepTableFormData = [],jyStepTableFormData = []} = item;
- stepTableFormData.map((step,sIndex) => {
- if(step.qybhCode){
+ ybsmDataList.map((item, index) => {
+ const { stepTableFormData = [], jyStepTableFormData = [] } = item;
+ stepTableFormData.map((step, sIndex) => {
+ if (step.qybhCode) {
flag = true;
}
- this.$refs[`jyTableRef${index}`][0].updateDataSourceByRowIndex(sIndex,{qybh:step.qybh})
- codes.push({ pre: step.qybh, type: 1 ,id:`stepTableFormData_${step.qybh}_${index}_${sIndex}`,});
-
+ this.$refs[`jyTableRef${index}`][0].updateDataSourceByRowIndex(sIndex, { qybh: step.qybh })
+ codes.push({ pre: step.qybh, type: 1, id: `stepTableFormData_${step.qybh}_${index}_${sIndex}`, });
+
});
- jyStepTableFormData.map((step,sIndex) => {
- if(step.jybhCode){
+ jyStepTableFormData.map((step, sIndex) => {
+ if (step.jybhCode) {
flag = true;
}
- codes.push({ pre: step.jybh, type: 1 ,id:`jyStepTableFormData_${step.jybh}_${index}_${sIndex}`,});
+ codes.push({ pre: step.jybh, type: 1, id: `jyStepTableFormData_${step.jybh}_${index}_${sIndex}`, });
});
-
+
});
- ecDataList.map((item,index) => {
- const {stepTableFormData} = item;
- stepTableFormData.map((step,sIndex) => {
- if(step.jybhCode){
+ ecDataList.map((item, index) => {
+ const { stepTableFormData } = item;
+ stepTableFormData.map((step, sIndex) => {
+ if (step.jybhCode) {
flag = true;
}
- codes.push({ pre: step.jybh, type: 1 ,id:`ecStepTableFormData_${step.jybh}_${index}_${sIndex}`,});
+ codes.push({ pre: step.jybh, type: 1, id: `ecStepTableFormData_${step.jybh}_${index}_${sIndex}`, });
});
});
- if(flag){
+ if (flag) {
return;
}
-
+
const result = await this.getLatestSnArr(codes)
- codes.map((item,index)=>{
+ codes.map((item, index) => {
item.sn = result[index]
})
- ybsmDataList.map((item,index)=>{
- const {stepTableFormData = [],jyStepTableFormData = []} = item;
- stepTableFormData.map((step,sIndex) => {
+ ybsmDataList.map((item, index) => {
+ const { stepTableFormData = [], jyStepTableFormData = [] } = item;
+ stepTableFormData.map((step, sIndex) => {
const id = `stepTableFormData_${step.qybh}_${index}_${sIndex}`;
- const o = codes.find((item) => item.id === id) ||{};
- this.$refs[`ybsmTableRef${index}`][0].updateDataSourceByRowIndex(sIndex,{qybhCode:o.sn})
+ const o = codes.find((item) => item.id === id) || {};
+ this.$refs[`ybsmTableRef${index}`][0].updateDataSourceByRowIndex(sIndex, { qybhCode: o.sn })
});
- jyStepTableFormData.map((step,sIndex) => {
+ jyStepTableFormData.map((step, sIndex) => {
const id = `jyStepTableFormData_${step.jybh}_${index}_${sIndex}`;
- const o = codes.find((item) => item.id === id) ||{};
- this.$refs[`jyTableRef${index}`][0].updateDataSourceByRowIndex(sIndex,{jybhCode:o.sn})
+ const o = codes.find((item) => item.id === id) || {};
+ this.$refs[`jyTableRef${index}`][0].updateDataSourceByRowIndex(sIndex, { jybhCode: o.sn })
});
})
- ecDataList.map((item,index) => {
- const {stepTableFormData} = item;
- stepTableFormData.map((step,sIndex) => {
+ ecDataList.map((item, index) => {
+ const { stepTableFormData } = item;
+ stepTableFormData.map((step, sIndex) => {
const id = `ecStepTableFormData_${step.jybh}_${index}_${sIndex}`;
- const o = codes.find((item) => item.id === id) ||{};
- this.$refs[`ecTableRef${index}`][0].updateDataSourceByRowIndex(sIndex,{jybhCode:o.sn})
+ const o = codes.find((item) => item.id === id) || {};
+ this.$refs[`ecTableRef${index}`][0].updateDataSourceByRowIndex(sIndex, { jybhCode: o.sn })
});
})
this.justUpdateFilledFormData();
-
+
},
//获取文件blog
async handleBeforeDownload({ html2pdf, options, pdfContent }) {
@@ -344,7 +364,7 @@ export default {
},
//上传到服务器
async uploadPdfToServer(blob) {
- let that=this
+ let that = this
const formData = new FormData();
formData.append('file', blob, 'hxhq-export-form.pdf');
try {
@@ -368,7 +388,7 @@ export default {
studyFormFill_exportTbByFileUrl(
{
url: data.data.url,
- studyFormFillId:that.formData.id,
+ studyFormFillId: that.formData.id,
version: that.appTitle,
lang: that.$store.getters.language.split("_")[0]
}
@@ -529,7 +549,7 @@ export default {
deleteConfig(item, type = "ybsmDataList") {
if (this.formData[type].length > 1) {
const configIndex = this.formData[type].findIndex(config => config.id === item.id);
- console.log(configIndex,item,"configIndex")
+ console.log(configIndex, item, "configIndex")
if (configIndex > -1) {
const newList = [...this.formData[type]]
newList.splice(configIndex, 1);
diff --git a/src/views/business/comps/template/formConfig/gsp/gsp015.js b/src/views/business/comps/template/formConfig/gsp/gsp015.js
index 2ea9c4a..65725ab 100644
--- a/src/views/business/comps/template/formConfig/gsp/gsp015.js
+++ b/src/views/business/comps/template/formConfig/gsp/gsp015.js
@@ -212,7 +212,7 @@ export const getQyTableColumns = ($this) => {
}
//进样table
-export const getJyTableColumns = ($this) => {
+export const getJyTableColumns = ($this,type) => {
return [
{
label: '进样编号',
@@ -227,8 +227,8 @@ export const getJyTableColumns = ($this) => {
label: '取样编号',
prop: 'qybh',
width: 200,
- bodyType: 'input',
- bodyDisabled: true,
+ bodyType: type==="ec"?'mix':'input',
+ bodyDisabled: type!="ec",
bodyFillType: 'actFill',
},
{
diff --git a/src/views/business/comps/template/formConfig/sp/SP007.js b/src/views/business/comps/template/formConfig/sp/SP007.js
index 4049623..9a0ee32 100644
--- a/src/views/business/comps/template/formConfig/sp/SP007.js
+++ b/src/views/business/comps/template/formConfig/sp/SP007.js
@@ -110,7 +110,7 @@ export const getYbFormConfig = () => {
{
type: 'cellItem',
config: {
- remark: {
+ ybsm: {
label: '',
type: 'textarea',
fillType: 'actFill',