|
@@ -65,7 +65,7 @@
|
|
|
height="18"
|
|
|
width="18"
|
|
|
class="icon"
|
|
|
- @click="copyDiag(scope.row.depart_id,scope.$index)"
|
|
|
+ @click="copyDiag(scope.row.depart_id)"
|
|
|
/>
|
|
|
<img
|
|
|
src="../../images/icon-add.png"
|
|
@@ -97,7 +97,7 @@
|
|
|
:rules="rules.conditionType"
|
|
|
>
|
|
|
<el-select
|
|
|
- ref="aa"
|
|
|
+ ref="aa"
|
|
|
v-model="form.klDiagnoseTypeVO[scope.$index].conditionType"
|
|
|
@change="(val)=>basTypeChange(val,scope.$index)"
|
|
|
>
|
|
@@ -918,44 +918,59 @@ export default {
|
|
|
});
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.tableList.bodyWrapper.scrollLeft = 0;
|
|
|
- // this.$refs.form.clearValidate();
|
|
|
});
|
|
|
this.form.klDiagnoseTypeVO.splice(i + 1, 0, temp);
|
|
|
},
|
|
|
//复制依据
|
|
|
- copyDiag(id, inx) {
|
|
|
- this.i++;
|
|
|
+ copyDiag(id) {
|
|
|
+ this.i++
|
|
|
const formData = JSON.parse(JSON.stringify(this.form));
|
|
|
- let map = {},
|
|
|
- dest = [];
|
|
|
- for (let i = 0; i < formData.klDiagnoseTypeVO.length; i++) {
|
|
|
- let ai = formData.klDiagnoseTypeVO[i];
|
|
|
- if (!map[ai.depart_id]) {
|
|
|
- dest.push({
|
|
|
- depart_id: ai.depart_id,
|
|
|
- conditionType: ai.conditionType,
|
|
|
- groupVO: ai.groupVO
|
|
|
- });
|
|
|
- map[ai.depart_id] = ai;
|
|
|
- } else {
|
|
|
- for (let j = 0; j < dest.length; j++) {
|
|
|
- var dj = dest[j];
|
|
|
- if (dj.depart_id == ai.depart_id) {
|
|
|
- dj.groupVO = dj.groupVO.concat(ai.groupVO);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ let i = -1;
|
|
|
+ let arr = [];
|
|
|
+ formData.klDiagnoseTypeVO.forEach((item, inx) => {
|
|
|
+ if (item.depart_id == id) {
|
|
|
+ arr.push(item);
|
|
|
+ i = inx;
|
|
|
}
|
|
|
- }
|
|
|
- var index = dest.findIndex(item => {
|
|
|
- return item.depart_id == id;
|
|
|
});
|
|
|
-
|
|
|
- dest.splice(index + 1, 0, JSON.parse(JSON.stringify(dest[index])));
|
|
|
- dest.forEach((item, i) => {
|
|
|
- item.depart_id = i;
|
|
|
+ console.log(this.form.klDiagnoseTypeVO);
|
|
|
+ arr.forEach((item, index) => {
|
|
|
+ item.depart_id = this.i;
|
|
|
+ this.form.klDiagnoseTypeVO.splice(i + index + 1, 0, item);
|
|
|
});
|
|
|
- this.form.klDiagnoseTypeVO = dest;
|
|
|
+ // console.log(this.form.klDiagnoseTypeVO);
|
|
|
+
|
|
|
+
|
|
|
+ // let map = {},
|
|
|
+ // dest = [];
|
|
|
+ // for (let i = 0; i < formData.klDiagnoseTypeVO.length; i++) {
|
|
|
+ // let ai = formData.klDiagnoseTypeVO[i];
|
|
|
+ // if (!map[ai.depart_id]) {
|
|
|
+ // dest.push({
|
|
|
+ // depart_id: ai.depart_id,
|
|
|
+ // conditionType: ai.conditionType,
|
|
|
+ // groupVO: ai.groupVO
|
|
|
+ // });
|
|
|
+ // map[ai.depart_id] = ai;
|
|
|
+ // } else {
|
|
|
+ // for (let j = 0; j < dest.length; j++) {
|
|
|
+ // var dj = dest[j];
|
|
|
+ // if (dj.depart_id == ai.depart_id) {
|
|
|
+ // dj.groupVO = dj.groupVO.concat(ai.groupVO);
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // var index = dest.findIndex(item => {
|
|
|
+ // return item.depart_id == id;
|
|
|
+ // });
|
|
|
+ // JSON.parse(JSON.stringify(dest[index])).depart_id=this.i
|
|
|
+ // dest.splice(index + 1, 0, JSON.parse(JSON.stringify(dest[index])));
|
|
|
+ // dest.forEach((item, i) => {
|
|
|
+ // item.depart_id = i;
|
|
|
+ // });
|
|
|
+ // this.form.klDiagnoseTypeVO = JSON.parse(JSON.stringify(dest));
|
|
|
},
|
|
|
//删除依据
|
|
|
delDiag(id, inx) {
|
|
@@ -1114,9 +1129,7 @@ export default {
|
|
|
// this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
// i
|
|
|
// ].dataType = '';
|
|
|
- this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
- i
|
|
|
- ].conceptList = [];
|
|
|
+
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
|
].basConceptId = '';
|
|
@@ -1143,8 +1156,8 @@ export default {
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
|
].onlyTxtType = type && code.indexOf(a + ',') > -1;
|
|
|
- // this.clearConcept(val, inx, index, i);
|
|
|
- // this.clearNumText(val, inx, index, i);
|
|
|
+ this.clearConcept(val, inx, index, i);
|
|
|
+ this.clearNumText2(val, inx, index, i);
|
|
|
},
|
|
|
//医学标准术语
|
|
|
conceptChange(val, inx, index, i) {
|
|
@@ -1212,7 +1225,35 @@ export default {
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
|
].basLibName = '';
|
|
|
- this.conceptList = [];
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].conceptList = [];
|
|
|
+ },
|
|
|
+ clearNumText2(val, inx, index, i) {
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].maxOperator = '';
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].maxVal = '';
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].maxUnit = '';
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].minOperator = '';
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].minVal = '';
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].minUnit = '';
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].eqValue = '';
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].eqOperator = '';
|
|
|
},
|
|
|
clearNumText(val, inx, index, i) {
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|