StaticKnowledgeMapTest.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <div>
  3. <crumbs title="静态知识映射测试" class="topBack">
  4. <el-form :inline="true" class="demo-form-inline">
  5. <el-form-item
  6. label=""
  7. class="selectMedicine"
  8. style="marginbottom: -1px"
  9. >
  10. <el-select
  11. size="mini"
  12. v-model="hospitalId"
  13. placeholder="选择医院"
  14. @change="handleChange"
  15. >
  16. <el-option
  17. v-for="item in hospitalData"
  18. :label="item.name"
  19. :value="item.id"
  20. :key="item.id"
  21. ></el-option>
  22. </el-select>
  23. </el-form-item>
  24. <el-form-item style="marginbottom: 0px">
  25. <el-button size="mini" @click="handleAllTest"
  26. >所有术语类型映射测试</el-button
  27. >
  28. </el-form-item>
  29. </el-form>
  30. </crumbs>
  31. <div style="margin: 60px 20px 0">
  32. <el-table :data="list" border>
  33. <el-table-column
  34. :resizable="false"
  35. type="index"
  36. :index="indexMethod"
  37. label="编号"
  38. width="80"
  39. ></el-table-column>
  40. <el-table-column
  41. :resizable="false"
  42. prop="caseName"
  43. label="术语类型"
  44. show-overflow-tooltip
  45. ></el-table-column>
  46. <el-table-column
  47. :resizable="false"
  48. prop="gmtModified"
  49. label="测试时间"
  50. ></el-table-column>
  51. <el-table-column
  52. :resizable="false"
  53. prop="totleNum"
  54. label="医院术语总条数"
  55. show-overflow-tooltip
  56. ></el-table-column>
  57. <el-table-column label="未映射到标准术语条数">
  58. <template slot-scope="scope">
  59. <el-button
  60. type="text"
  61. size="small"
  62. @click="goToInnerPage(scope.row,'noMap')"
  63. >{{ scope.row.unMappingNum }}</el-button
  64. >
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="缺少静态知识术语条数">
  68. <template slot-scope="scope">
  69. <el-button
  70. type="text"
  71. size="small"
  72. @click="goToInnerPage(scope.row,'lessStatic')"
  73. >{{ scope.row.withoutKnowledgeNum }}</el-button
  74. >
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="操作">
  78. <template slot-scope="scope">
  79. <el-button type="text" size="small" @click="handleTest(scope.row)"
  80. >执行测试</el-button
  81. >
  82. </template>
  83. </el-table-column>
  84. </el-table>
  85. </div>
  86. </div>
  87. </template>
  88. <script>
  89. import api from '@api/cdss.js';
  90. import config from '@api/config.js';
  91. import utils from '@api/utils.js';
  92. export default {
  93. name: 'KnowledgeMapRuleTest',
  94. data() {
  95. return {
  96. list: [],
  97. hospitalData: [],
  98. hospitalId: '', //选中医院
  99. };
  100. },
  101. created() {
  102. this._getHospitalInfoCDSS();
  103. },
  104. beforeRouteEnter(to, from, next) {
  105. next((vm) => {
  106. Object.assign(vm, to.params);
  107. if (Object.keys(to.params).length === 0) return;
  108. vm.getDataList(to.params.hospitalId);
  109. });
  110. },
  111. methods: {
  112. indexMethod(index) {
  113. return index + 1;
  114. },
  115. // 获取医院信息
  116. _getHospitalInfoCDSS() {
  117. api.getHospitalInfo().then((res) => {
  118. if (res.data.code === '0') {
  119. this.hospitalData = res.data && res.data.data;
  120. }
  121. });
  122. },
  123. // 执行测试
  124. handleTest() {},
  125. // 所有规则测试
  126. handleAllTest() {},
  127. // 跳转至未映射到标准术语条数页面 / 缺少静态知识术语条数
  128. goToInnerPage(row,type) {
  129. let hospital = this.hospitalData.find(
  130. (item) => item.id === this.hospitalId
  131. );
  132. let hospitalName = hospital.name;
  133. this.$router.push({
  134. name: 'LessStaticDisease',
  135. params: {
  136. data: { ...row },
  137. hospitalId: this.hospitalId,
  138. hospitalName,
  139. type
  140. },
  141. });
  142. },
  143. // 选中医院
  144. handleChange(val) {
  145. if (val === '') return;
  146. this.getDataList(val);
  147. },
  148. // 获取列表数据
  149. getDataList(id) {
  150. const params = {
  151. hospitalId: id,
  152. };
  153. this.searched = true;
  154. const loading = this.$loading({
  155. lock: true,
  156. text: 'Loading',
  157. spinner: 'el-icon-loading',
  158. background: 'rgba(0, 0, 0, 0.7)',
  159. });
  160. api.getStaticCaseResultList(params).then((res) => {
  161. loading.close();
  162. if (res.data.code === '0') {
  163. this.list = res.data && res.data.data;
  164. }
  165. });
  166. },
  167. },
  168. };
  169. </script>
  170. <style lang="less" scored>
  171. @import '../../../less/admin.less';
  172. </style>