DiagCheckRule.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <div>
  3. <div style="margin-top: 10px;">
  4. <span class="span1">规则类型:</span>{{row.ruleTypeName||'-'}}
  5. <span class="span1" style="margin-left:100px;">规则术语类型:</span>{{row.libTypeName||'-'}}
  6. <span class="span1" style="margin-left:100px;">医学标准术语:</span>{{row.libName||'-'}}
  7. <el-form :inline="true" style="margin-top: 10px;height: 45px;">
  8. <el-form-item label="基础规则术语类型:">
  9. <el-select v-model="filter.baseLibType" clearable placeholder="请选择" size="mini">
  10. <el-option v-for="item in baseTermTypeList2" :key="item.val" :label="item.name"
  11. :value="item.val">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item label="基础医学标准术语:">
  16. <el-input size="mini" v-model="filter.baseLibName" placeholder="请输入" clearable></el-input>
  17. </el-form-item>
  18. <el-form-item>
  19. <el-button size="mini" @click="getRuleDetail">确认</el-button>
  20. </el-form-item>
  21. </el-form>
  22. </div>
  23. <el-main>
  24. <ux-grid ref="plxTable" :merge-cells="tdSpanArr" show-overflow style="width: 100%;" height="600px">
  25. <ux-table-column field="id" :title="'组(共'+total+'组)'" width="120"></ux-table-column>
  26. <ux-table-column field="description" title="规则名称"></ux-table-column>
  27. <ux-table-column field="msg" title="附加信息" show-overflow-tooltip></ux-table-column>
  28. <ux-table-column field="baseType" title="基础规则类型">
  29. <template slot-scope="scope">
  30. {{transDataMap(baseTypeList)[scope.row.baseType]}}
  31. </template>
  32. </ux-table-column>
  33. <ux-table-column prop="baseLibType" title="基础规则术语类型">
  34. <template slot-scope="scope">
  35. {{transDataMap(baseTermTypeList)[scope.row.baseLibType]}}
  36. </template>
  37. </ux-table-column>
  38. <ux-table-column field="baseLibName" title="基础医学标准术语"></ux-table-column>
  39. <ux-table-column field="baseMinOperator" title="最小域比较符" width="80"></ux-table-column>
  40. <ux-table-column field="baseMinValue" title="最小域值" width="80"></ux-table-column>
  41. <ux-table-column field="baseMinUnit" title="最小域单位" width="80"></ux-table-column>
  42. <ux-table-column field="baseMaxOperator" title="最大域比较符" width="80"></ux-table-column>
  43. <ux-table-column field="baseMaxValue" title="最大域值" width="80"></ux-table-column>
  44. <ux-table-column field="baseMaxUnit" title="最大域单位" width="80"></ux-table-column>
  45. <ux-table-column field="baseEqOperator" title="等于阈值" width="80"></ux-table-column>
  46. <ux-table-column field="baseEqUnit" title="等于域单位" width="80"></ux-table-column>
  47. </ux-grid>
  48. </el-main>
  49. </div>
  50. </template>
  51. <script>
  52. import api from '@api/knowledgeLib.js';
  53. export default {
  54. name: 'CheckRule',
  55. data: function() {
  56. return {
  57. tdSpanArr: this.mergeCells,
  58. pos: 0,
  59. filter: {
  60. baseLibType: "",
  61. baseLibName: ""
  62. },
  63. baseTermTypeList2: [],
  64. total: this.ruleTeamNum,
  65. };
  66. },
  67. created() {
  68. this.baseTermTypeList2 = this.baseTermTypeList;
  69. this.filter.baseLibName=this.baseLibName;
  70. this.filter.baseLibType=this.baseLibType;
  71. },
  72. mounted(){
  73. this.$refs.plxTable.reloadData(this.rulelist)
  74. //this.loading.close();
  75. },
  76. props: ['loading','mergeCells','rulelist','ruleTeamNum', 'baseTypeList', 'baseTermTypeList', 'row', 'description','baseLibType','baseLibName'],
  77. methods: {
  78. transDataMap(data){
  79. const obj = {};
  80. data.map((it)=>{
  81. obj[it.val] = it.name;
  82. });
  83. return obj;
  84. },
  85. getRuleDetail() {
  86. const param = {
  87. baseLibName: this.filter.baseLibName,
  88. baseLibType: this.filter.baseLibType,
  89. description: this.description,
  90. libName: this.row.libName,
  91. libType: this.row.libType,
  92. ruleType: this.row.ruleType,
  93. }
  94. api.zskgetRuleDetail(param).then((res) => {
  95. if (res.data.code == "0") {
  96. let datalist =[]
  97. const data=res.data.data.ruleConditionDTOList;
  98. this.total = data.length;
  99. let mergeArr = [];
  100. for(let i in data){
  101. let datai = data[i];
  102. const dtoList = datai.ruleBaseDTOList;
  103. for(let j=0;j<dtoList.length;j++){
  104. const isFirst = j===0;
  105. if(isFirst){
  106. const len = datalist.length;
  107. mergeArr.push({ row: len, col: 0, rowspan: dtoList.length, colspan: 1 },
  108. { row: len, col: 1, rowspan: dtoList.length, colspan: 1 },
  109. { row: len, col: 2, rowspan: dtoList.length, colspan: 1 });
  110. }
  111. datalist.push({
  112. id: +i+1,
  113. rowspan:isFirst?dtoList.length:0,
  114. colspan:isFirst?1:0,
  115. ruleGroup:datai.ruleGroup,
  116. msg:datai.msg,
  117. description:datai.description,
  118. ...dtoList[j]
  119. })
  120. }
  121. }
  122. this.tdSpanArr=mergeArr;
  123. this.$refs.plxTable.reloadData(datalist);
  124. }else{
  125. this.$message(res.data.msg||'获取详情失败,请稍后重试');
  126. }
  127. })
  128. .catch((error) => {
  129. this.$message(error.msg||'接口出错');
  130. });
  131. },
  132. }
  133. };
  134. </script>
  135. <style scoped lang="less">
  136. /deep/.el-table .cell {
  137. line-height: 25px;
  138. }
  139. .span1 {
  140. font-weight: bolder;
  141. }
  142. /deep/.el-form--inline .el-form-item__label {
  143. font-weight: bolder;
  144. font-size: 14px;
  145. }
  146. </style>