|
@@ -5,12 +5,19 @@
|
|
|
min-width: 1000px;
|
|
|
padding: 20px;
|
|
|
padding-top: 50px;
|
|
|
+ padding-bottom: 0;
|
|
|
box-sizing: border-box;
|
|
|
.table_form {
|
|
|
width: 100%;
|
|
|
box-sizing: border-box;
|
|
|
background: #fff;
|
|
|
padding: 20px;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .table_cell {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 25%;
|
|
|
+ }
|
|
|
}
|
|
|
/deep/ .el-input--mini .el-input__inner,
|
|
|
.el-select {
|
|
@@ -26,7 +33,7 @@
|
|
|
.form_btn {
|
|
|
width: 100%;
|
|
|
background: #fff;
|
|
|
- padding: 20px 0;
|
|
|
+ padding-bottom: 20px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
}
|
|
@@ -39,10 +46,9 @@
|
|
|
linkTo="ZskRuleManager"
|
|
|
></crumbs>
|
|
|
<div class="AddRuleContent">
|
|
|
- <el-form size="mini" :model="form" ref="ruleForm">
|
|
|
- <!-- <div class="table_form"> -->
|
|
|
- <el-row class="table_form">
|
|
|
- <el-col :span="6">
|
|
|
+ <el-form size="mini" :model="form" ref="ruleForm">
|
|
|
+ <div class="table_form">
|
|
|
+ <div class="table_cell">
|
|
|
<!-- 规则名称 -->
|
|
|
<el-form-item
|
|
|
label-width="130px"
|
|
@@ -55,9 +61,9 @@
|
|
|
v-model.trim="form.parDescription"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </div>
|
|
|
|
|
|
- <el-col :span="6">
|
|
|
+ <div class="table_cell">
|
|
|
<!-- 规则类型 -->
|
|
|
<el-form-item
|
|
|
label-width="130px"
|
|
@@ -82,8 +88,8 @@
|
|
|
注:更改规则类型,将会清空已填写的规则内容~
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ </div>
|
|
|
+ <div class="table_cell">
|
|
|
<!-- 规则术语类型: -->
|
|
|
<el-form-item
|
|
|
label-width="130px"
|
|
@@ -108,12 +114,12 @@
|
|
|
注:更改规则术语类型,将会清空已填写的规则内容~
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ </div>
|
|
|
+ <div class="table_cell">
|
|
|
<el-form-item
|
|
|
label-width="130px"
|
|
|
label="医学标准术语:"
|
|
|
- style="margin-bottom:50px"
|
|
|
+ :style="{ height: '100%' }"
|
|
|
:rules="rules.parConceptId"
|
|
|
prop="parConceptId"
|
|
|
>
|
|
@@ -134,11 +140,10 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ </div>
|
|
|
+ <div class="table_cell" v-if="showHasSub" style="max-width: 25%">
|
|
|
<el-form-item
|
|
|
label-width="130px"
|
|
|
- v-if="showHasSub"
|
|
|
label="有无子条件:"
|
|
|
:rules="rules.parHasSub"
|
|
|
prop="parHasSub"
|
|
@@ -152,12 +157,14 @@
|
|
|
<el-option label="无" :value="0"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="table_cell"
|
|
|
+ style="flex: 3; max-width: 50%"
|
|
|
+ v-if="showMsg"
|
|
|
+ >
|
|
|
<el-form-item
|
|
|
- style="flex: 1; minwidth: 500px"
|
|
|
label-width="130px"
|
|
|
- v-if="showMsg"
|
|
|
label="附加信息:"
|
|
|
:rules="rules.parMsg"
|
|
|
prop="parMsg"
|
|
@@ -169,14 +176,11 @@
|
|
|
v-model.trim="form.parMsg"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <!-- 医学标准术语 -->
|
|
|
- </el-row>
|
|
|
- <!-- </div> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 表格 -->
|
|
|
<AddNewRuleTable
|
|
|
- v-if="form.parHasSub"
|
|
|
+ v-if="form.parHasSub && tableShow"
|
|
|
:klRuleByIdSub="form.klRuleByIdSub"
|
|
|
:maxNum="subRuleMaxNum"
|
|
|
@subTypeChange="subTypeChange"
|
|
@@ -219,6 +223,7 @@ export default {
|
|
|
parId: null,
|
|
|
msgDict: "", //显示附加信息的类型
|
|
|
firstPlace: null,
|
|
|
+ tableShow: true,
|
|
|
form: {
|
|
|
parDescription: "",
|
|
|
parRuleType: "",
|
|
@@ -414,33 +419,37 @@ export default {
|
|
|
},
|
|
|
// 初始化表格
|
|
|
setInitGroupData(init) {
|
|
|
+ this.tableShow = false;
|
|
|
const date = new Date().valueOf();
|
|
|
- this.$set(this.form, "klRuleByIdSub", [
|
|
|
- {
|
|
|
- groupId: date,
|
|
|
- groupChildId: "child" + new Date().valueOf(),
|
|
|
- baseTypes: this.baseTypeList,
|
|
|
- baseTermTypeList: [],
|
|
|
- conceptList: [],
|
|
|
- subDescription: "",
|
|
|
- parRuleType: "",
|
|
|
- subConceptId: "",
|
|
|
- subType: "",
|
|
|
- subMaxOperator: "",
|
|
|
- subMaxUnit: "",
|
|
|
- subMaxValue: "",
|
|
|
- subMinOperator: "",
|
|
|
- subMinUnit: "",
|
|
|
- subMinValue: "",
|
|
|
- subEqValue: "",
|
|
|
- subLenCode: "",
|
|
|
- dataType: ""
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$set(this.form, "klRuleByIdSub", [
|
|
|
+ {
|
|
|
+ groupId: date,
|
|
|
+ groupChildId: "child" + new Date().valueOf(),
|
|
|
+ baseTypes: this.baseTypeList,
|
|
|
+ baseTermTypeList: [],
|
|
|
+ conceptList: [],
|
|
|
+ subDescription: "",
|
|
|
+ parRuleType: "",
|
|
|
+ subConceptId: "",
|
|
|
+ subType: "",
|
|
|
+ subMaxOperator: "",
|
|
|
+ subMaxUnit: "",
|
|
|
+ subMaxValue: "",
|
|
|
+ subMinOperator: "",
|
|
|
+ subMinUnit: "",
|
|
|
+ subMinValue: "",
|
|
|
+ subEqValue: "",
|
|
|
+ subLenCode: "",
|
|
|
+ dataType: ""
|
|
|
+ }
|
|
|
+ ]);
|
|
|
+ if (!init) {
|
|
|
+ this.form.parConceptId = ""; //医学标准术语清空
|
|
|
+ this.conceptList = []; //下拉列表清空
|
|
|
}
|
|
|
- ]);
|
|
|
- if (!init) {
|
|
|
- this.form.parConceptId = ""; //医学标准术语清空
|
|
|
- this.conceptList = []; //下拉列表清空
|
|
|
- }
|
|
|
+ this.tableShow = true;
|
|
|
+ });
|
|
|
},
|
|
|
// 有无子条件切换
|
|
|
hasSubChange(val) {
|
|
@@ -632,16 +641,24 @@ export default {
|
|
|
return Object.keys(this.firstPlace || {}).length > 0;
|
|
|
},
|
|
|
ruleTermCodeStr: function () {
|
|
|
- return this.form.parRuleType + "-" + this.form.parLenCode;
|
|
|
+ const str = this.form.parRuleType + "-" + this.form.parLenCode;
|
|
|
+ if (str.length <= 1) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ return str;
|
|
|
},
|
|
|
showMsg: function () {
|
|
|
+ console.log(this.ruleTermCodeStr, "???", this.msgDict);
|
|
|
return (
|
|
|
- this.ruleTermCodeStr.length > 1 &&
|
|
|
+ this.ruleTermCodeStr.length > 2 &&
|
|
|
this.msgDict.indexOf(this.ruleTermCodeStr) > -1
|
|
|
);
|
|
|
},
|
|
|
showHasSub() {
|
|
|
- return this.subDict.indexOf(this.ruleTermCodeStr) > -1;
|
|
|
+ if (this.ruleTermCodeStr.length > 2) {
|
|
|
+ return this.subDict.indexOf(this.ruleTermCodeStr) != -1;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
},
|
|
|
checkFirstPlace: function () {
|
|
|
return this.dict.indexOf(this.ruleTermCodeStr) > -1;
|