|
@@ -114,6 +114,7 @@
|
|
|
<span class="name">组</span>
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
|
+ {{scope.row.depart_id}}
|
|
|
<el-form-item>
|
|
|
<img
|
|
|
src="../../images/icon-add.png"
|
|
@@ -128,7 +129,7 @@
|
|
|
width="18"
|
|
|
class="icon"
|
|
|
@click="delGroup(scope.row.depart_id,scope.$index)"
|
|
|
- v-show="groupL[scope.row.depart_id].id>1"
|
|
|
+ v-show="groupL[scope.row.depart_id]&&groupL[scope.row.depart_id].id>1"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
@@ -226,6 +227,7 @@
|
|
|
index +
|
|
|
'.klDiagnoseDetail.'+i+'.basLibType'"
|
|
|
v-if="!items.basNameType && v.title == '基础依据术语类型'"
|
|
|
+ :rules="[{required: true,message: '请选择基础依据术语类型',trigger: ['change']}]"
|
|
|
>
|
|
|
<el-select
|
|
|
v-model="items.basLibType"
|
|
@@ -474,7 +476,7 @@ export default {
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
|
- basLibType: '',
|
|
|
+ basLibType: null,
|
|
|
basType: '',
|
|
|
eqOperator: '',
|
|
|
eqUnit: '',
|
|
@@ -540,7 +542,6 @@ export default {
|
|
|
{ name: '>=', key: '>=' }
|
|
|
],
|
|
|
basType: '',
|
|
|
- basLibType: '',
|
|
|
dataType: '',
|
|
|
spanArr: [],
|
|
|
list: [], //提交数据数组,
|
|
@@ -711,7 +712,6 @@ export default {
|
|
|
return dest;
|
|
|
},
|
|
|
groupL() {
|
|
|
- console.log(this.form);
|
|
|
let map = {},
|
|
|
dest = [];
|
|
|
let arr = [];
|
|
@@ -736,6 +736,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
dest.forEach((item, index) => {
|
|
|
+ item.depart_id = index;
|
|
|
let arr1 = { id: item.groupVO.length };
|
|
|
arr.push(arr1);
|
|
|
});
|
|
@@ -817,7 +818,7 @@ export default {
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
|
- basLibType: '',
|
|
|
+ basLibType: null,
|
|
|
basType: '',
|
|
|
eqOperator: '',
|
|
|
eqUnit: '',
|
|
@@ -883,34 +884,15 @@ export default {
|
|
|
this.setRules();
|
|
|
},
|
|
|
//删除依据
|
|
|
- delDiag(id, 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;
|
|
|
- }
|
|
|
- }
|
|
|
+ delDiag(id, inx) {
|
|
|
+ this.form.klDiagnoseTypeVO = this.form.klDiagnoseTypeVO.filter(
|
|
|
+ item => item.depart_id !== id
|
|
|
+ );
|
|
|
+ this.form.klDiagnoseTypeVO.forEach((item, index) => {
|
|
|
+ if (item.depart_id > id) {
|
|
|
+ item.depart_id = item.depart_id - 1;
|
|
|
}
|
|
|
- }
|
|
|
- var index = dest.findIndex(item => {
|
|
|
- return item.depart_id == id;
|
|
|
});
|
|
|
- dest.splice(index, 1);
|
|
|
- this.form.klDiagnoseTypeVO = dest;
|
|
|
this.setRules();
|
|
|
},
|
|
|
//新增组
|
|
@@ -930,7 +912,7 @@ export default {
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
|
- basLibType: '',
|
|
|
+ basLibType: null,
|
|
|
basType: '',
|
|
|
eqOperator: '',
|
|
|
eqUnit: '',
|
|
@@ -983,7 +965,7 @@ export default {
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
|
- basLibType: '',
|
|
|
+ basLibType: null,
|
|
|
basType: '',
|
|
|
eqOperator: '',
|
|
|
eqUnit: '',
|
|
@@ -1024,7 +1006,6 @@ export default {
|
|
|
},
|
|
|
//基础依据类型修改
|
|
|
baseTermTypeChange(val, inx, index, i) {
|
|
|
- console.log(val);
|
|
|
if (!val) {
|
|
|
return;
|
|
|
}
|
|
@@ -1057,6 +1038,15 @@ export default {
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
|
].basNameType = true;
|
|
|
+ this.$refs['form'].clearValidate([
|
|
|
+ 'klDiagnoseTypeVO.' +
|
|
|
+ inx +
|
|
|
+ '.groupVO.' +
|
|
|
+ index +
|
|
|
+ '.klDiagnoseDetail.' +
|
|
|
+ i +
|
|
|
+ '.basLibType'
|
|
|
+ ]);
|
|
|
} else {
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
@@ -1254,13 +1244,6 @@ export default {
|
|
|
trigger: ['change']
|
|
|
}
|
|
|
];
|
|
|
- that.rules[keyTxt + '.basLibType'] = [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '请选择基础依据术语类型',
|
|
|
- trigger: ['change']
|
|
|
- }
|
|
|
- ];
|
|
|
that.rules[keyTxt + '.dataType'] = [
|
|
|
{
|
|
|
required: true,
|