You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
7.0 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <div style="display: flex">
  3. <div :style="`width: ${window.pageWidth}px;`">
  4. <el-table
  5. :data="asbitemCriticalValue"
  6. border
  7. :height="
  8. window.pageHeight < 600
  9. ? 150
  10. : Math.floor((window.pageHeight + 20) / 3)
  11. "
  12. size="small"
  13. highlight-current-row
  14. ref="asbitemCriticalValue"
  15. :span-method="objectSpanMethod"
  16. >
  17. <el-table-column prop="asbitemName" label="组合项目" />
  18. <el-table-column prop="summaryDetail" label="小结" min-width="400">
  19. <template slot-scope="scope">
  20. <span v-html="scope.row.summaryDetail"></span>
  21. </template>
  22. </el-table-column>
  23. <el-table-column prop="criticalRangeValue" label="危急值范围" />
  24. <el-table-column prop="isCriticalValue" label="危急值标志">
  25. <template slot-scope="scope">
  26. <el-checkbox
  27. v-model="scope.row.isCriticalValue"
  28. disabled
  29. true-label="Y"
  30. false-label="N"
  31. ></el-checkbox>
  32. </template>
  33. </el-table-column>
  34. <el-table-column
  35. prop="criticalValueContent"
  36. label="危急值处理内容"
  37. width="150"
  38. />
  39. <el-table-column prop="isCriticalValueAudit" label="危急值审核">
  40. <template slot-scope="scope">
  41. <el-checkbox
  42. v-model="scope.row.isCriticalValueAudit"
  43. disabled
  44. true-label="Y"
  45. false-label="N"
  46. ></el-checkbox>
  47. </template>
  48. </el-table-column>
  49. <el-table-column prop="isReview" label="复查">
  50. <template slot-scope="scope">
  51. <el-checkbox
  52. v-model="scope.row.isReview"
  53. disabled
  54. true-label="Y"
  55. false-label="N"
  56. ></el-checkbox>
  57. </template>
  58. </el-table-column>
  59. <el-table-column prop="isFollowUp" label="随访标志">
  60. <template slot-scope="scope">
  61. <el-checkbox
  62. v-model="scope.row.isFollowUp"
  63. disabled
  64. true-label="Y"
  65. false-label="N"
  66. ></el-checkbox>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="itemName" label="项目"> </el-table-column>
  70. <el-table-column prop="itemResult" label="项目结果"> </el-table-column>
  71. <el-table-column prop="unit" label="单位"> </el-table-column>
  72. <el-table-column prop="referenceRangeValue" label="参考范围">
  73. </el-table-column>
  74. <el-table-column prop="itemCriticalRangeValue" label="危急值范围">
  75. </el-table-column>
  76. <el-table-column prop="itemIsCriticalValue" label="危急值标志">
  77. <template slot-scope="scope">
  78. <el-checkbox
  79. v-model="scope.row.itemIsCriticalValue"
  80. disabled
  81. true-label="Y"
  82. false-label="N"
  83. ></el-checkbox>
  84. </template>
  85. </el-table-column>
  86. <el-table-column
  87. prop="itemCriticalValueContent"
  88. label="危急值处理内容"
  89. width="150"
  90. >
  91. </el-table-column>
  92. <el-table-column prop="itemIsCriticalValueAudit" label="危急值审核">
  93. <template slot-scope="scope">
  94. <el-checkbox
  95. v-model="scope.row.itemIsCriticalValueAudit"
  96. disabled
  97. true-label="Y"
  98. false-label="N"
  99. ></el-checkbox>
  100. </template>
  101. </el-table-column>
  102. <el-table-column prop="itemIsReview" label="复查">
  103. <template slot-scope="scope">
  104. <el-checkbox
  105. v-model="scope.row.itemIsReview"
  106. disabled
  107. true-label="Y"
  108. false-label="N"
  109. ></el-checkbox>
  110. </template>
  111. </el-table-column>
  112. <el-table-column prop="itemIsFollowUp" label="随访标志">
  113. <template slot-scope="scope">
  114. <el-checkbox
  115. v-model="scope.row.itemIsFollowUp"
  116. disabled
  117. true-label="Y"
  118. false-label="N"
  119. ></el-checkbox>
  120. </template>
  121. </el-table-column>
  122. </el-table>
  123. </div>
  124. </div>
  125. </template>
  126. <script>
  127. import moment from "moment";
  128. import { mapState } from "vuex";
  129. import { dddw } from "../../utlis/proFunc";
  130. import { getapi, postapi, putapi, deletapi } from "../../api/api";
  131. export default {
  132. data() {
  133. return {
  134. asbitemCriticalValue: [],
  135. };
  136. },
  137. computed: {
  138. ...mapState(["window", "dataTransOpts", "dict", "patientRegister"]),
  139. },
  140. methods: {
  141. dddw,
  142. moment,
  143. getLists() {
  144. if (this.dataTransOpts.tableS.patient_register.patientRegisterId) {
  145. postapi(
  146. "/api/app/PhoneFollowUp/GetAsbitemOrItemCriticalByPatientRegisterId",
  147. {
  148. patientRegisterId:
  149. this.dataTransOpts.tableS.patient_register.patientRegisterId,
  150. }
  151. ).then((res) => {
  152. if (res.code > -1) this.asbitemCriticalValue = res.data;
  153. });
  154. }else{
  155. this.asbitemCriticalValue=[]
  156. }
  157. },
  158. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  159. if (
  160. //if条件判断的是合并那一竖列
  161. columnIndex == 0 ||
  162. columnIndex == 1 ||
  163. columnIndex == 2 ||
  164. columnIndex == 3 ||
  165. columnIndex == 4 ||
  166. columnIndex == 5 ||
  167. columnIndex == 6 ||
  168. columnIndex == 7
  169. ) {
  170. const _row = this.flitterData2(this.asbitemCriticalValue).one[rowIndex];
  171. const _col = _row > 0 ? 1 : 0;
  172. return {
  173. rowspan: _row,
  174. colspan: _col,
  175. };
  176. }
  177. },
  178. flitterData2(arr) {
  179. let spanOneArr = [];
  180. let concatOne = 0;
  181. arr.forEach((item, index) => {
  182. if (index === 0) {
  183. spanOneArr.push(1);
  184. } else {
  185. //name 修改
  186. if (item.registerCheckId === arr[index - 1].registerCheckId) {
  187. //pid就是判断相同的字段
  188. //第一列需合并相同内容的判断条件
  189. spanOneArr[concatOne] += 1;
  190. spanOneArr.push(0);
  191. } else {
  192. spanOneArr.push(1);
  193. concatOne = index;
  194. }
  195. }
  196. });
  197. return {
  198. one: spanOneArr,
  199. };
  200. },
  201. },
  202. updated() {
  203. this.$nextTick(() => {
  204. this.$refs["asbitemCriticalValue"].doLayout();
  205. });
  206. },
  207. watch: {
  208. //人员ID未切换换时 也可以强制刷新数据
  209. "dataTransOpts.refresh.register_check_asbitem.M": {
  210. // immediate:true,
  211. handler(newVal, oldVal) {
  212. console.log(
  213. `watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`
  214. );
  215. // if (newVal != oldVal)
  216. this.getLists();
  217. },
  218. },
  219. },
  220. };
  221. </script>
  222. <style scoped>
  223. @import "../../assets/css/global.css";
  224. ::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
  225. background-color: #409eff;
  226. border-color: #409eff;
  227. }
  228. </style>