|
@@ -376,7 +376,9 @@ export default {
|
|
|
const resultList = [];
|
|
const resultList = [];
|
|
|
for (let i = 0; i < childrenList.length; i++) {
|
|
for (let i = 0; i < childrenList.length; i++) {
|
|
|
const item = childrenList[i];
|
|
const item = childrenList[i];
|
|
|
|
|
+
|
|
|
resultList.push(item);
|
|
resultList.push(item);
|
|
|
|
|
+
|
|
|
if (item.children) {
|
|
if (item.children) {
|
|
|
resultList.push(...joinChildren(item.children));
|
|
resultList.push(...joinChildren(item.children));
|
|
|
}
|
|
}
|
|
@@ -405,7 +407,9 @@ export default {
|
|
|
backUploadData() {
|
|
backUploadData() {
|
|
|
let sourceData = JSON.parse(JSON.stringify(this.$refs.edit.editList));
|
|
let sourceData = JSON.parse(JSON.stringify(this.$refs.edit.editList));
|
|
|
let list = this.flat(sourceData);
|
|
let list = this.flat(sourceData);
|
|
|
|
|
+
|
|
|
let joinArr = this.joinList(list);
|
|
let joinArr = this.joinList(list);
|
|
|
|
|
+
|
|
|
const paramsData = {
|
|
const paramsData = {
|
|
|
chiefcomplaint: "", // 主诉
|
|
chiefcomplaint: "", // 主诉
|
|
|
fourmedicine: "", // 中医四诊
|
|
fourmedicine: "", // 中医四诊
|
|
@@ -484,20 +488,26 @@ export default {
|
|
|
|
|
|
|
|
return paramsData;
|
|
return paramsData;
|
|
|
},
|
|
},
|
|
|
- // 获取与目标数组中不同的部门
|
|
|
|
|
|
|
+ // 获取与目标数组中不同的部分
|
|
|
findDifferences(arr1, arr2) {
|
|
findDifferences(arr1, arr2) {
|
|
|
return arr2.filter(value => !arr1.includes(value));
|
|
return arr2.filter(value => !arr1.includes(value));
|
|
|
},
|
|
},
|
|
|
- // 获取与目标数组中相同的部门
|
|
|
|
|
|
|
+ // 获取与目标数组中相同的部分
|
|
|
findSame(arr1, arr2) {
|
|
findSame(arr1, arr2) {
|
|
|
return arr2.filter(value => arr1.includes(value));
|
|
return arr2.filter(value => arr1.includes(value));
|
|
|
},
|
|
},
|
|
|
|
|
+ // 去重
|
|
|
|
|
+ removeRepate(arr) {
|
|
|
|
|
+ let arr1 = new Set(arr);
|
|
|
|
|
+ return Array.from(arr1);
|
|
|
|
|
+ },
|
|
|
// 回显的值 赋值给模板
|
|
// 回显的值 赋值给模板
|
|
|
showMsgToTem(data) {
|
|
showMsgToTem(data) {
|
|
|
let _this = this;
|
|
let _this = this;
|
|
|
const paramsData = {
|
|
const paramsData = {
|
|
|
chiefcomplaint: data.chiefcomplaint, // 主诉
|
|
chiefcomplaint: data.chiefcomplaint, // 主诉
|
|
|
- fourmedicine: data.fourmedicine, // 中医四诊
|
|
|
|
|
|
|
+ // fourmedicine: data.fourmedicine, // 中医四诊
|
|
|
|
|
+ fourmedicine: "",
|
|
|
historypresent: data.historypresent, // 现病史
|
|
historypresent: data.historypresent, // 现病史
|
|
|
pasthistory: data.pasthistory, // 既往史
|
|
pasthistory: data.pasthistory, // 既往史
|
|
|
physicalexamination: data.physicalexamination, // 体格检查
|
|
physicalexamination: data.physicalexamination, // 体格检查
|
|
@@ -505,6 +515,7 @@ export default {
|
|
|
echoData: JSON.parse(data.echoData)
|
|
echoData: JSON.parse(data.echoData)
|
|
|
};
|
|
};
|
|
|
let tem = this.$refs.edit.editList;
|
|
let tem = this.$refs.edit.editList;
|
|
|
|
|
+
|
|
|
tem.forEach(item => {
|
|
tem.forEach(item => {
|
|
|
if (
|
|
if (
|
|
|
item.id == 1 &&
|
|
item.id == 1 &&
|
|
@@ -576,7 +587,12 @@ export default {
|
|
|
let diffValues = _this.findDifferences(radioLabels, echoItem);
|
|
let diffValues = _this.findDifferences(radioLabels, echoItem);
|
|
|
|
|
|
|
|
otherStr = diffValues.join(";");
|
|
otherStr = diffValues.join(";");
|
|
|
- item.fillValues = _this.findSame(radioLabels, echoItem);
|
|
|
|
|
|
|
+ item.fillValues = [
|
|
|
|
|
+ ...item.fillValues,
|
|
|
|
|
+ ..._this.findSame(radioLabels, echoItem)
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ item.fillValues = _this.removeRepate(item.fillValues);
|
|
|
|
|
|
|
|
item.radioList.forEach(item1 => {
|
|
item.radioList.forEach(item1 => {
|
|
|
if (echoItem.includes(item1.label)) {
|
|
if (echoItem.includes(item1.label)) {
|
|
@@ -783,7 +799,13 @@ export default {
|
|
|
this.temItem.templateContent = JSON.parse(
|
|
this.temItem.templateContent = JSON.parse(
|
|
|
res.Data[0].templateContent
|
|
res.Data[0].templateContent
|
|
|
);
|
|
);
|
|
|
- this.showMsgToTem(res.Data[0]);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //
|
|
|
|
|
+ let tem = this.$refs.edit.editList;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.showMsgToTem(res.Data[0]);
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+
|
|
|
throw Error();
|
|
throw Error();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|