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.

2598 lines
90 KiB

3 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 month ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 month ago
2 years ago
1 year ago
1 month ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 month 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
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 month ago
4 months ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years 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
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 months ago
1 year ago
1 year ago
2 months ago
1 month ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 months ago
1 month ago
3 years ago
3 years ago
2 months ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 months ago
1 month ago
2 years ago
2 years ago
1 year ago
1 year ago
3 years ago
2 years ago
2 years ago
1 year ago
2 months ago
1 month ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 month ago
1 year ago
2 years ago
1 year ago
2 years ago
12 months ago
1 year ago
2 years ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years 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
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 months ago
1 month ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years 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 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 month ago
2 months ago
1 year ago
1 year ago
4 months 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
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
1 month ago
1 month ago
1 year ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 month ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 month ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years 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
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years 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
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years 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 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
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years 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 month ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years 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
2 years ago
2 years ago
2 years ago
1 year ago
1 month ago
1 month ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 months ago
1 month ago
1 year ago
1 month ago
1 month ago
1 month ago
1 month ago
1 year ago
1 month ago
1 year ago
1 year ago
1 month ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years 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
2 years ago
2 years 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
2 years ago
1 year ago
2 years ago
2 months ago
2 years ago
1 year ago
2 years ago
2 months ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 months ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 months ago
2 years ago
2 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <!--组件主体-->
  4. <div style="display: flex">
  5. <div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu">
  6. <div>
  7. <u-table :data="tableData" border :height="window.pageHeight < 600
  8. ? 248
  9. : Math.floor(((window.pageHeight - 250) * 2) / 3)
  10. " highlight-current-row @row-click="rowClick" @row-dblclick="dblClick" size="small" row-key="id"
  11. @selection-change="handleSelectionChange" @row-contextmenu="onCellRightClick" ref="info" id="info"
  12. :row-class-name="handleRowClassName" use-virtual :row-height="30" @table-body-scroll="scrollFull"
  13. big-data-checkbox :data-changes-scroll-top="false">
  14. <u-table-column type="selection" width="40" align="center"></u-table-column>
  15. <u-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type"
  16. :min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label"
  17. :prop="dragCol[index].prop" :sortable="dragCol[index].type || dragCol[index].prop == 'sn'
  18. ? false
  19. : true
  20. ">
  21. <template slot-scope="scope" v-if="!dragCol[index].type">
  22. <div v-if="!dragCol[index].type">
  23. <div v-if="dragCol[index].prop == 'sn'">
  24. {{ scope.$index + 1 }}
  25. </div>
  26. <div v-else-if="dragCol[index].prop == 'completeFlag'" :style="`color: ${setPrStatusColor(
  27. scope.row.isAudit,
  28. scope.row.completeFlag
  29. )}`">
  30. {{
  31. scope.row.isAudit == "Y"
  32. ? "已审核"
  33. : dddw(
  34. dict.completeFlag,
  35. "id",
  36. scope.row.completeFlag,
  37. "displayName"
  38. )
  39. }}
  40. </div>
  41. <div v-else-if="dragCol[index].prop == 'qztlType'">
  42. {{
  43. dddw(
  44. dict.qztlType,
  45. "id",
  46. scope.row.qztlType,
  47. "displayName"
  48. )
  49. }}
  50. </div>
  51. <div v-else-if="dragCol[index].prop == 'guidePrintTimes'">
  52. <i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0"
  53. style="font-size: 20px; color: green" />
  54. </div>
  55. <div v-else-if="dragCol[index].prop == 'isLock'">
  56. <i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" />
  57. </div>
  58. <div v-else-if="
  59. dragCol[index].prop == 'isVip' ||
  60. dragCol[index].prop == 'isUpload' ||
  61. dragCol[index].prop == 'qztlIsMain' ||
  62. dragCol[index].prop == 'qztlIsCy' ||
  63. dragCol[index].prop == 'qztlIsCw' ||
  64. dragCol[index].prop == 'qztlIsGt' ||
  65. dragCol[index].prop == 'qztlIsWh' ||
  66. dragCol[index].prop == 'qztlIsFj'
  67. ">
  68. {{ scope.row[dragCol[index].prop] == "Y" ? "是" : "否" }}
  69. </div>
  70. <div v-else-if="dragCol[index].prop == 'customerOrgParentName'">
  71. {{
  72. scope.row.customerOrgParentName
  73. ? scope.row.customerOrgParentName
  74. : scope.row.customerOrgName
  75. }}
  76. </div>
  77. <div v-else-if="dragCol[index].prop == 'sexId'">
  78. {{
  79. dddw(
  80. dict.sex,
  81. "id",
  82. scope.row[dragCol[index].prop],
  83. "displayName"
  84. )
  85. }}
  86. </div>
  87. <div v-else-if="dragCol[index].prop == 'groupPack'">
  88. <div v-if="
  89. scope.row.medicalPackageId !== dict.personOrgId &&
  90. scope.row.customerOrgId === dict.personOrgId
  91. ">
  92. {{ scope.row.medicalPackageName }}
  93. </div>
  94. <div v-if="
  95. scope.row.medicalPackageId !== dict.personOrgId &&
  96. scope.row.customerOrgId !== dict.personOrgId
  97. ">
  98. {{ scope.row.customerOrgGroupName }}
  99. </div>
  100. </div>
  101. <!--
  102. <div v-else-if="dragCol[index].prop == 'nationId'">
  103. {{
  104. dddw(
  105. dict.nation,
  106. "id",
  107. scope.row[dragCol[index].prop],
  108. "displayName"
  109. )
  110. }}
  111. </div>
  112. -->
  113. <div v-else-if="dragCol[index].prop == 'birthDate'">
  114. {{
  115. scope.row[dragCol[index].prop]
  116. ? moment(scope.row[dragCol[index].prop]).format(
  117. "yyyy-MM-DD"
  118. )
  119. : ""
  120. }}
  121. </div>
  122. <!--
  123. <div v-else-if="dragCol[index].prop == 'maritalStatusId'">
  124. {{
  125. dddw(
  126. dict.maritalStatus,
  127. "id",
  128. scope.row[dragCol[index].prop],
  129. "displayName"
  130. )
  131. }}
  132. </div>
  133. -->
  134. <div v-else-if="dragCol[index].prop == 'medicalTypeId'">
  135. {{
  136. dddw(
  137. dict.medicalType,
  138. "id",
  139. scope.row[dragCol[index].prop],
  140. "displayName"
  141. )
  142. }}
  143. </div>
  144. <!--
  145. <div v-else-if="dragCol[index].prop == 'personnelTypeId'">
  146. {{
  147. dddw(
  148. dict.personnelType,
  149. "id",
  150. scope.row[dragCol[index].prop],
  151. "displayName"
  152. )
  153. }}
  154. </div>
  155. -->
  156. <div v-else-if="dragCol[index].prop == 'idNo'">
  157. {{ scope.row[dragCol[index].prop] }}&#031;
  158. </div>
  159. <div v-else-if="dragCol[index].prop == 'customerOrgName'">
  160. {{
  161. scope.row[dragCol[index].prop] ==
  162. scope.row["customerOrgParentName"]
  163. ? ""
  164. : scope.row[dragCol[index].prop]
  165. }}
  166. </div>
  167. <div v-else>
  168. {{ scope.row[dragCol[index].prop] }}
  169. </div>
  170. </div>
  171. </template>
  172. </u-table-column>
  173. <!--
  174. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  175. "interposeMeasure": null,
  176. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  177. "reportPrintTimes": 0,
  178. "isMedicalStart": "N",
  179. "medicalStartDate": "6/28/2023",
  180. "isRecoverGuide": "N",
  181. "summaryDate": "",
  182. "summaryDoctor": null,
  183. "isAudit": "N",
  184. "auditDoctor": null,
  185. "auditDate": "",
  186. "isNameHide": "N",
  187. "isPhoneFollow": "N",
  188. "thirdInfo": null,
  189. "guidePrintTimes": null,
  190. "remark": null,
  191. "medicalCenterId": "00000000-0000-0000-0000-000000000000",
  192. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  193. "lastModifierName": "",
  194. "lastModificationTime": null,
  195. "lastModifierId": null,
  196. "creatorId": null,
  197. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  198. -->
  199. </u-table>
  200. <div style="display: flex; justify-content: space-between">
  201. <div></div>
  202. <div>
  203. <span style="font-size: 12px">{{ loadOpts.totalCount }} 条记录当前显示{{
  204. tableData.length
  205. }}
  206. </span>
  207. </div>
  208. </div>
  209. </div>
  210. <!-- 组合项目 基本信息 -->
  211. <el-tabs v-model="tabChoosed" style="margin-top: -22px">
  212. <!-- 组合项目 -->
  213. <el-tab-pane label="已选组合项目" name="1">
  214. <PatientRegisterAsbItem />
  215. </el-tab-pane>
  216. </el-tabs>
  217. </div>
  218. <div style="margin-left: 10px">
  219. <div v-show="checkPagePriv(pagePriv.privs, '导入青藏数据')" class="listBtn">
  220. <el-button type="success" class="commonbutton" @click="btnImportOrgData">导入青藏数据</el-button>
  221. </div>
  222. <div v-show="checkPagePriv(pagePriv.privs, '人员登记')" class="listBtn">
  223. <el-button type="success" class="commonbutton" @click="btnAdd">人员登记</el-button>
  224. </div>
  225. <div v-show="checkPagePriv(pagePriv.privs, '批量正式登记')" class="listBtn">
  226. <el-button type="success" class="commonbutton" @click="btnAddBatch('1')">批量正式登记</el-button>
  227. </div>
  228. <div v-show="checkPagePriv(pagePriv.privs, '批量转预登记')" class="listBtn">
  229. <el-button type="success" class="commonbutton" @click="btnAddBatch('0')">批量转预登记</el-button>
  230. </div>
  231. <div v-show="checkPagePriv(pagePriv.privs, '编辑')" class="listBtn">
  232. <el-button type="primary" class="commonbutton" @click="btnEdit">编辑</el-button>
  233. </div>
  234. <div v-show="checkPagePriv(pagePriv.privs, '删除')" class="listBtn">
  235. <el-button type="danger" class="deleteButton" @click="btnDel">删除</el-button>
  236. </div>
  237. <!--
  238. <div class="listBtn">
  239. <el-button
  240. type=""
  241. class="btnClass"
  242. @click="openCamera"
  243. icon="el-icon-camera"
  244. >拍照</el-button
  245. >
  246. </div>
  247. <div class="listBtn">
  248. <el-button type="" class="btnClass commonbutton">健康档案</el-button>
  249. </div>
  250. -->
  251. <div v-show="checkPagePriv(pagePriv.privs, '批量调整分组')" class="listBtn">
  252. <el-button type="" class="commonbutton" @click="btnGroupBatch">批量调整分组</el-button>
  253. </div>
  254. <div v-show="checkPagePriv(pagePriv.privs, '批量调整项目')" class="listBtn">
  255. <el-button type="" class="commonbutton" @click="btnAsbBatch">批量调整项目</el-button>
  256. </div>
  257. <div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="listBtn">
  258. <el-button type="" class="commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
  259. </div>
  260. <div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="listBtn">
  261. <el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
  262. </div>
  263. <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn">
  264. <el-button type="" class="commonbutton" @click="printPromise()" style="font-size: 12px">人员检验检查条码</el-button>
  265. </div>
  266. <div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn">
  267. <download-excel :fields="jsonFields" :fetch="btnExport" type="xls" :name="tableName">
  268. <el-button type="" style="width:100%">人员信息导出</el-button>
  269. </download-excel>
  270. <!-- <el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button> -->
  271. </div>
  272. <!-- 弃用
  273. <div class="listBtn">
  274. <el-button type="" class="commonbutton" @click="btnDragColDesign">设计列排序</el-button>
  275. </div>
  276. -->
  277. <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn">
  278. <el-button type="" class="commonbutton" @click="printPromise2()" style="font-size: 12px">人员+检查条码</el-button>
  279. </div>
  280. <div v-show="checkPagePriv(pagePriv.privs, '体检表回收')" class="listBtn">
  281. <el-button type="" class="commonbutton" @click="btnScanRecover">体检表回收</el-button>
  282. </div>
  283. <!-- elProgress.display dialogWin.LocalConfig
  284. <div class="listBtn">
  285. <el-button type="" class="commonbutton" @click="dialogWin.LocalConfig = true">本地设置</el-button>
  286. </div>
  287. -->
  288. <!--
  289. <div class="listBtn">
  290. <el-button type="" class="btnClass commonbutton" @click="rowSelected(tableData)">选中</el-button>
  291. </div>
  292. -->
  293. </div>
  294. </div>
  295. <!--组件弹窗-->
  296. <div>
  297. <!-- 体检人员登记 :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'" -->
  298. <el-dialog :title="dataTransOpts.tableS.patient_register.id
  299. ? '体检人员--编辑'
  300. : '体检人员--新增'
  301. " :visible.sync="dialogWin.PatientRegisterEdit" :close-on-click-modal="false" fullscreen
  302. @close="close_dialogWin_PatientRegisterEdit">
  303. <!-- :formInitData="patientRegister.patientRegisterRd" -->
  304. <PatientRegisterEdit :isDoctor="'1'" :patientRegisterId="patientRegister.patientRegisterRd.id"
  305. :editTimes="editTimes" :refFuncSetData="refFuncSetData" />
  306. </el-dialog>
  307. <!-- 修改信息 -->
  308. <el-dialog :title="`修改信息--${upBaseInfo.label}`" :visible.sync="upBaseInfo.visble" width="400" :show-close="false"
  309. :append-to-body="true" :close-on-click-modal="false">
  310. <div>
  311. <div style="display: flex; margin-bottom: 20px">
  312. <span style="padding: 5px 0 0 10px; width: 100px">{{
  313. upBaseInfo.label
  314. }}</span>
  315. <el-input v-model="upBaseInfo.value" size="small"></el-input>
  316. </div>
  317. <div style="display: flex; justify-content: space-between">
  318. <div></div>
  319. <div>
  320. <el-button class="commonbutton" @click="btnUpBaseInfo">提交</el-button>
  321. <el-button class="commonbutton" @click="close_dialogWin_upBaseInfo">关闭</el-button>
  322. </div>
  323. </div>
  324. </div>
  325. </el-dialog>
  326. <el-dialog title="修改信息--体检日期" :visible.sync="dialogEditMedicalStartDate" width="400" :show-close="false"
  327. :append-to-body="true" :close-on-click-modal="false">
  328. <div>
  329. <div style="display: flex; margin-bottom: 20px">
  330. <span style="padding: 5px 0 0 10px; width: 100px">体检日期</span>
  331. <el-date-picker v-model="upBaseInfo.medicalStartDate" type="date" placeholder="体检日期" size="small"
  332. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  333. </div>
  334. <div style="display: flex; justify-content: space-between">
  335. <div></div>
  336. <div>
  337. <el-button class="commonbutton" @click="btnEditMedicalStartDate">提交</el-button>
  338. <el-button class="commonbutton" @click="dialogEditMedicalStartDate = false">关闭</el-button>
  339. </div>
  340. </div>
  341. </div>
  342. </el-dialog>
  343. <!-- 分诊排队 -->
  344. <el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
  345. :close-on-click-modal="false">
  346. <Queue :refParams="queueParams" />
  347. </el-dialog>
  348. <!-- 拍照 -->
  349. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
  350. :append-to-body="true" :close-on-click-modal="false">
  351. <Camera :id="patientRegister.patientRegisterId" />
  352. </el-dialog>
  353. <!-- 导入企业数据 -->
  354. <el-dialog title="导入企业数据" :visible.sync="dialogWin.ImportOrgData" width="800px" :append-to-body="true"
  355. :close-on-click-modal="false">
  356. <ImportOrgData />
  357. </el-dialog>
  358. <!-- 列排序 -->
  359. <el-dialog title="列排序" :visible.sync="dialogColSort" width="300px" :append-to-body="true"
  360. :close-on-click-modal="false">
  361. <el-table id="elTable_dragCol" :data="dragColDesign" row-key="prop" border height="600">
  362. <el-table-column type="index" label="序号" width="40" align="center">
  363. </el-table-column>
  364. <el-table-column label="列名" prop="label" min-width="120" align="center"></el-table-column>
  365. </el-table>
  366. <span slot="footer" class="dialog-footer">
  367. <el-button class="commonbutton" @click="dialogColSort = false">取消</el-button>
  368. <el-button class="commonbutton" @click="btnDragColDesignOk">确定</el-button>
  369. </span>
  370. </el-dialog>
  371. <!-- 批量调整分组 -->
  372. <el-dialog title="批量调整分组" :visible.sync="dialogWin.PatientRegisterEditGroupBatch" width="600px" height="800px"
  373. :append-to-body="true" :close-on-click-modal="false">
  374. <PatientRegisterEditGroupBatch :multipleSelection="multipleSelection" />
  375. </el-dialog>
  376. <!-- 批量调整项目 -->
  377. <el-dialog title="批量调整项目" :visible.sync="dialogWin.PatientRegisterEditItemBatch" width="610px" height="800px"
  378. :append-to-body="true" :close-on-click-modal="false">
  379. <PatientRegisterEditItemBatch :multipleSelection="multipleSelection" />
  380. </el-dialog>
  381. <!-- 批量调整检查项目医生 -->
  382. <el-dialog title="批量调整检查项目医生" :visible.sync="dialogWin.PatientRegisterEditDoctorBatch" width="610px"
  383. :append-to-body="true" :close-on-click-modal="false">
  384. <PatientRegisterEditDoctorBatch :multipleSelection="multipleSelection" :doctorType="doctorType" />
  385. </el-dialog>
  386. <!-- 批量调整体检类别 -->
  387. <el-dialog title="批量调整体检类别" :visible.sync="dialogWin.PatientRegisterEditMedicalTypeBatch" width="610px"
  388. :append-to-body="true" :close-on-click-modal="false">
  389. <PatientRegisterEditMedicalTypeBatch :multipleSelection="multipleSelection" />
  390. </el-dialog>
  391. <!-- 批量调整人员类别 -->
  392. <el-dialog title="批量调整人员类别" :visible.sync="dialogWin.PatientRegisterEditPersonnelTypeBatch" width="610px"
  393. :append-to-body="true" :close-on-click-modal="false">
  394. <PatientRegisterEditPersonnelTypeBatch :multipleSelection="multipleSelection" />
  395. </el-dialog>
  396. <!-- 批量调整备注 -->
  397. <el-dialog title="批量调整备注" :visible.sync="dialogWin.PatientRegisterEditRemarkBatch" width="610px"
  398. :append-to-body="true" :close-on-click-modal="false">
  399. <PatientRegisterEditRemarkBatch :multipleSelection="multipleSelection" />
  400. </el-dialog>
  401. <!-- 通用进度条 -->
  402. <el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false"
  403. :close-on-click-modal="false" :append-to-body="true">
  404. <ElProgressOCX />
  405. </el-dialog>
  406. <!--通用本地参数设置-->
  407. <el-dialog title="本地参数设置" :visible.sync="dialogWin.LocalConfig" :close-on-click-modal="false"
  408. :append-to-body="true" width="800px" height="600px">
  409. <LocalConfig />
  410. </el-dialog>
  411. <!--云胶片二维码-->
  412. <el-dialog :visible.sync="qrCode.winDisplay" title="云胶片二维码" width="400px" style="text-align:center">
  413. <!--<canvas ref="canvas"></canvas>-->
  414. <img width="100%" :src="qrCode.url">
  415. <div style="font-size: 16px;">{{ qrCode.barcodeNo + ' ' + qrCode.patientName }}</div>
  416. </el-dialog>
  417. <el-dialog title="扫/输入条码回收体检表(指引单)" :visible.sync="dialogRecover" width="400" :append-to-body="true"
  418. :close-on-click-modal="false">
  419. <div class="query">
  420. <span class="spanClass">条码号</span>
  421. <el-input ref="tmh" v-model="patientRegisterNo" @change="signByPatientRegisterNo"></el-input>
  422. </div>
  423. <div slot="footer" class="dialog-footer">
  424. <el-button type="primary" @click="signByPatientRegisterNo" class="commonbutton">确定</el-button>
  425. <el-button @click="dialogRecover = false" class="commonbutton">关闭</el-button>
  426. </div>
  427. </el-dialog>
  428. </div>
  429. </div>
  430. </template>
  431. <script>
  432. import moment from "moment";
  433. import QRCode from 'qrcode'
  434. import { mapState, mapActions } from "vuex";
  435. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  436. import Sortable from "sortablejs";
  437. import FileSaver from "file-saver";
  438. import html2canvas from "html2canvas";
  439. import JsonExcel from "vue-json-excel";
  440. import {
  441. getPagePriv,
  442. checkPagePriv,
  443. dddw,
  444. objCopy,
  445. arrayReduce,
  446. arrayExistObj,
  447. deepCopy,
  448. setPrStatusColor,
  449. } from "../../utlis/proFunc";
  450. import { savePeoplePhoto } from "../../utlis/proApi";
  451. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  452. import Camera from "../../components/patientRegister/Camera.vue";
  453. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  454. import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
  455. import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue";
  456. import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue";
  457. import PatientRegisterEditDoctorBatch from "./PatientRegisterEditDoctorBatch.vue";
  458. import PatientRegisterEditMedicalTypeBatch from "./PatientRegisterEditMedicalTypeBatch.vue";
  459. import PatientRegisterEditPersonnelTypeBatch from "./PatientRegisterEditPersonnelTypeBatch.vue";
  460. import PatientRegisterEditRemarkBatch from "./PatientRegisterEditRemarkBatch.vue";
  461. import ImportOrgData from "./ImportOrgData.vue";
  462. import LocalConfig from "../../components/common/LocalConfig.vue";
  463. import Queue from "../../components/queue/Queue.vue";
  464. import { UTable, UTableColumn } from 'umy-ui';
  465. export default {
  466. components: {
  467. PatientRegisterEdit,
  468. Camera,
  469. PatientRegisterAsbItem,
  470. PatientRegisterEditGroupBatch, // 批量调整分组
  471. PatientRegisterEditItemBatch, // 批量调整项目
  472. PatientRegisterEditDoctorBatch, // 批量调整检查项目医生
  473. PatientRegisterEditMedicalTypeBatch, // 批量调整体检类别
  474. PatientRegisterEditPersonnelTypeBatch, // 批量调整体检类别
  475. PatientRegisterEditRemarkBatch, // 批量调整体检类别
  476. ElProgressOCX,
  477. LocalConfig,
  478. ImportOrgData,
  479. Queue,
  480. DownloadExcel: JsonExcel,
  481. UTable,
  482. UTableColumn
  483. },
  484. data() {
  485. return {
  486. pagePriv: {
  487. routeUrlorPageName: "patientRegister", //当前页面归属路由或归属页面权限名称
  488. privs: [], // 页面权限
  489. },
  490. peisid: null,
  491. startPoint: -1, // 多选起点 -1 表示选择
  492. endPoint: -1, // 多选终点 -1 表示未选择
  493. tableData: [], //表格数据
  494. tableDataCurrentRow: {}, // 当前被选中的行
  495. multipleSelection: [], //选中的数据列表
  496. dialogCamera: false,
  497. tabChoosed: "1",
  498. formInitData: {}, //体检登记初始表单数据
  499. editTimes: 0,
  500. rClickRow: null, //右击的行
  501. rClickColumn: null, //右击的列(预留)
  502. dragColDesign: [], // 待调整的排序的序
  503. //拖动列
  504. dragCol: [
  505. { label: "序号", prop: "sn", minWidth: 40, align: "center" },
  506. {
  507. label: "体检进度",
  508. prop: "completeFlag",
  509. minWidth: 80,
  510. align: "center",
  511. },
  512. {
  513. label: "打印",
  514. prop: "guidePrintTimes",
  515. minWidth: 55,
  516. align: "center",
  517. },
  518. { label: "锁住", prop: "isLock", minWidth: 55, align: "center" },
  519. {
  520. label: "单位",
  521. prop: "customerOrgParentName",
  522. minWidth: 180,
  523. align: "center",
  524. },
  525. {
  526. label: "部门",
  527. prop: "customerOrgName",
  528. minWidth: 120,
  529. align: "center",
  530. },
  531. { label: "姓名", prop: "patientName", minWidth: 80, align: "center" },
  532. { label: "性别", prop: "sexId", minWidth: 55, align: "center" },
  533. { label: "年龄", prop: "age", minWidth: 55, align: "center" },
  534. {
  535. label: "条码号",
  536. prop: "patientRegisterNo",
  537. minWidth: 150,
  538. align: "center",
  539. },
  540. { label: "档案号", prop: "patientNo", minWidth: 100, align: "center" },
  541. {
  542. label: "体检次数",
  543. prop: "medicalTimes",
  544. minWidth: 80,
  545. align: "center",
  546. },
  547. {
  548. label: "分组/套餐",
  549. prop: "groupPack",
  550. minWidth: 150,
  551. align: "center",
  552. },
  553. { label: "民族", prop: "nationName", minWidth: 55, align: "center" }, //nationId
  554. { label: "身份证", prop: "idNo", minWidth: 160, align: "center" },
  555. { label: "出生日期", prop: "birthDate", minWidth: 80, align: "center" },
  556. { label: "邮箱", prop: "email", minWidth: 150, align: "center" },
  557. {
  558. label: "手机",
  559. prop: "mobileTelephone",
  560. minWidth: 130,
  561. align: "center",
  562. },
  563. { label: "电话", prop: "telephone", minWidth: 130, align: "center" },
  564. { label: "地址", prop: "address", minWidth: 400, align: "" },
  565. { label: "备注", prop: "remark", minWidth: 400, align: "" },
  566. {
  567. label: "体检卡号",
  568. prop: "medicalCardNo",
  569. minWidth: 80,
  570. align: "center",
  571. },
  572. { label: "工卡号", prop: "jobCardNo", minWidth: 80, align: "center" },
  573. {
  574. label: "婚姻状况",
  575. prop: "maritalStatusName", //maritalStatusId
  576. minWidth: 80,
  577. align: "center",
  578. },
  579. {
  580. label: "体检类别",
  581. prop: "medicalTypeId",
  582. minWidth: 80,
  583. align: "center",
  584. },
  585. {
  586. label: "人员类别",
  587. prop: "personnelTypeName", //personnelTypeId
  588. minWidth: 80,
  589. align: "center",
  590. },
  591. { label: "职务", prop: "jobPost", minWidth: 200, align: "center" },
  592. { label: "职称", prop: "jobTitle", minWidth: 80, align: "center" },
  593. { label: "介绍人", prop: "salesman", minWidth: 80, align: "center" },
  594. { label: "是否VIP", prop: "isVip", minWidth: 80, align: "center" },
  595. { label: "登记人", prop: "creatorName", minWidth: 80, align: "center" },
  596. {
  597. label: "登记日期",
  598. prop: "creationTime",
  599. minWidth: 140,
  600. align: "center",
  601. },
  602. {
  603. label: "体检日期",
  604. prop: "medicalStartDate",
  605. minWidth: 140,
  606. align: "center",
  607. },
  608. { label: "是否上传", prop: "isUpload", minWidth: 80, align: "center" },
  609. { label: "高原/健康", prop: "qztlType", minWidth: 90, align: "center" },
  610. { label: "行车", prop: "qztlIsMain", minWidth: 50, align: "center" },
  611. { label: "从业", prop: "qztlIsCy", minWidth: 50, align: "center" },
  612. { label: "普速", prop: "qztlIsCw", minWidth: 50, align: "center" },
  613. { label: "高铁", prop: "qztlIsGt", minWidth: 50, align: "center" },
  614. { label: "职害", prop: "qztlIsWh", minWidth: 50, align: "center" },
  615. { label: "复检", prop: "qztlIsFj", minWidth: 50, align: "center" },
  616. ],
  617. dialogColSort: false,
  618. jsonFields: {},
  619. dom: null, //用于滚动加载数据
  620. // lazyLoading: false, //是否懒加载中
  621. loadOpts: {
  622. totalCount: 0,
  623. skipCount: 0,
  624. maxResultCount: 100,
  625. },
  626. loadOptsInit: {},
  627. upBaseInfo: {
  628. visble: false,
  629. label: "姓名",
  630. value: "",
  631. colName: "patientName",
  632. patientRegisterId: "",
  633. medicalStartDate: "", // 体检日期
  634. },
  635. dialogEditMedicalStartDate: false, // 修改体检日期
  636. queueParams: {}, // 分诊排队参数
  637. LocalConfig: {
  638. normal: {
  639. maxResultCount: 100, //分页时单页记录数
  640. },
  641. },
  642. LocalConfigInit: {},
  643. tableName: "", //导出人员列表表名
  644. doctorType: "check", //check:检查 audit:审核
  645. merge_lis_pacs_label: "0", //默认0 检验检查条码合并 0:不合并,1:合并
  646. qrCode: {
  647. winDisplay: false, // 页面显示
  648. url: 'https://ccjktj.cn:5081/', //二维码 地址
  649. barcodeNo: '条码号',
  650. patientName: '姓 名'
  651. },
  652. // 体检表回收
  653. dialogRecover: false,
  654. patientRegisterNo: '',
  655. clickTime1: 0,
  656. clickTime2: 0,
  657. };
  658. },
  659. created() {
  660. //获取用户当前页面的权限
  661. let userPriv = window.sessionStorage.getItem("userPriv");
  662. if (userPriv)
  663. this.pagePriv.privs = deepCopy(
  664. getPagePriv(this.pagePriv.routeUrlorPageName)
  665. );
  666. this.LocalConfigInit = deepCopy(this.LocalConfig);
  667. let LocalConfig = window.localStorage.getItem("LocalConfig") || null;
  668. // console.log('LocalConfig',LocalConfig)
  669. try {
  670. this.LocalConfig = Object.assign(
  671. {},
  672. deepCopy(this.LocalConfigInit),
  673. JSON.parse(LocalConfig) || {}
  674. );
  675. } catch (error) {
  676. console.log('window.localStorage.getItem("LocalConfig")', error);
  677. }
  678. // console.log('this.LocalConfig',this.LocalConfig)
  679. this.loadOpts.maxResultCount = Number(
  680. this.LocalConfig.normal.maxResultCount || 100
  681. );
  682. this.loadOptsInit = Object.assign({}, this.loadOpts);
  683. // 获取系统参数 -- 合并检验检查条码
  684. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'merge_lis_pacs_label' })
  685. .then(res => {
  686. if (res.code > -1) {
  687. this.merge_lis_pacs_label = res.data || "0"
  688. }
  689. })
  690. // 获取系统参数 -- 云胶片二维码网址
  691. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'pacs_cloud_url' })
  692. .then(res => {
  693. if (res.code > -1) {
  694. this.qrCode.url = res.data || "https://ccjktj.cn:5081/"
  695. }
  696. })
  697. },
  698. //挂载完成
  699. mounted() {
  700. this.quickAsb = this.dict.asbItemAll;
  701. this.peisid = window.sessionStorage.getItem("peisid");
  702. // if(this.$refs.info){
  703. // this.$nextTick(() => {
  704. // this.scrollFull()
  705. // })
  706. // }
  707. },
  708. computed: {
  709. ...mapState([
  710. "pickerOptions",
  711. "window",
  712. "dataTransOpts",
  713. "dialogWin",
  714. "dict",
  715. "elProgress",
  716. "patientRegister",
  717. "customerOrg",
  718. ]),
  719. },
  720. methods: {
  721. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  722. moment,
  723. dddw,
  724. deepCopy,
  725. checkPagePriv,
  726. setPrStatusColor,
  727. // 扩展定义表格行样式
  728. handleRowClassName({ row, rowIndex }) {
  729. // highLightBg 为 'selected'的高亮
  730. //// console.log(rowIndex, row)
  731. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  732. if (row.choosed) {
  733. return "current-row";
  734. } else {
  735. return "";
  736. }
  737. },
  738. // 行选择
  739. rowSelected(rows) {
  740. rows.forEach((e) => {
  741. this.$refs["info"].toggleRowSelection(e, true);
  742. });
  743. },
  744. refFuncSetData(item, v) {
  745. setData(this, item, v);
  746. },
  747. // 打印指引单(isPreview)
  748. async guidePrint(ReportCode, isPreview) {
  749. if (!this.$peisAPI) {
  750. this.$message.info({
  751. showClose: true,
  752. message: "此功能,需要在壳客户端才可运行!",
  753. });
  754. return;
  755. }
  756. let token = window.sessionStorage.getItem("token");
  757. let user = window.sessionStorage.getItem("user");
  758. let toOutShell = {
  759. ReportCode,
  760. token,
  761. isBuildImage: "N",
  762. IsUploadPdf: "N",
  763. preViewCanPrint: "N",
  764. Parameters: [
  765. { Name: "printer", Value: user },
  766. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  767. { Name: "pageFooter", Value: "pic/peisQrCode.jpg" },
  768. ],
  769. };
  770. let lfind = -1;
  771. //选中(取消勾选)start -------------------------
  772. // this.multipleSelection = []
  773. // this.tableData.forEach(e => {
  774. // if (e.choosed) {
  775. // this.multipleSelection.push(deepCopy(e))
  776. // }
  777. // })
  778. //选中(取消勾选) end  -------------------------
  779. if (this.multipleSelection.length < 1) {
  780. this.$message.info({
  781. showClose: true,
  782. message: "请勾选要打印指引单的人员记录!",
  783. });
  784. return;
  785. }
  786. if (isPreview) {
  787. /*
  788. //this.multipleSelection.forEach((item,index) =>{
  789. postapi(
  790. `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`
  791. )
  792. .then((res) => {
  793. if (res.code != -1) {
  794. toOutShell.ReportTable = res.data;
  795. // console.log(
  796. "JSON.stringify(toOutShell)",
  797. JSON.stringify(toOutShell)
  798. );
  799. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  800. }
  801. })
  802. .then(res => {
  803. // console.log('this.$peisAPI.printPre', res)
  804. if (JSON.parse(res).code < 0) {
  805. this.$message.warning(JSON.parse(res).message);
  806. }
  807. })
  808. .catch((err) => {
  809. // console.log('打印指引单', err)
  810. this.$message.warning({ showClose: true, message: err });
  811. });
  812. */
  813. toOutShell.BusinessCode = this.multipleSelection[0].id;
  814. if (this.multipleSelection[0].completeFlag == "0") {
  815. this.$message.warning({
  816. showClose: true,
  817. message: "预登记人员,不可执行此操作!",
  818. });
  819. return;
  820. }
  821. this.$peisAPI
  822. .printPre(JSON.stringify(toOutShell))
  823. .then((res) => {
  824. if (JSON.parse(res).code < 0) {
  825. this.$message.warning({
  826. showClose: true,
  827. message: JSON.parse(res).message,
  828. });
  829. }
  830. })
  831. .catch((err) => {
  832. // console.log('打印指引单', err)
  833. this.$message.warning({ showClose: true, message: `${err}` });
  834. });
  835. } else {
  836. this.elProgress.display = true;
  837. this.elProgress.percentage = 0;
  838. for (let i = 0; i < this.multipleSelection.length; i++) {
  839. try {
  840. let patientregisterId = this.multipleSelection[i].id;
  841. if (this.multipleSelection[i].completeFlag == "0") {
  842. this.$message.warning({
  843. showClose: true,
  844. message: `${this.multipleSelection[i].patientName} 为预登记人员,不可打印指引单`,
  845. });
  846. continue;
  847. }
  848. toOutShell.BusinessCode = patientregisterId;
  849. let resPeisAPI = await this.$peisAPI.print(
  850. JSON.stringify(toOutShell)
  851. );
  852. if (JSON.parse(resPeisAPI).code < 0) continue;
  853. let resPrintTimes = await postapi(
  854. "/api/app/patientregister/updatepatientregisterguideprinttimesmany",
  855. [patientregisterId]
  856. );
  857. if (resPrintTimes.code == -1) continue;
  858. lfind = arrayExistObj(this.tableData, "id", patientregisterId);
  859. if (lfind > -1) {
  860. if (this.tableData[lfind].guidePrintTimes) {
  861. this.tableData[lfind].guidePrintTimes =
  862. Number(this.tableData[lfind].guidePrintTimes) + 1;
  863. } else {
  864. this.tableData[lfind].guidePrintTimes = 1;
  865. }
  866. }
  867. } catch (error) {
  868. // console.log('打印指引单', error)
  869. this.$message.warning({ showClose: true, message: `${error}` });
  870. }
  871. this.elProgress.percentage = Math.floor(
  872. ((i + 1) * 100) / this.multipleSelection.length
  873. );
  874. }
  875. this.elProgress.display = false;
  876. }
  877. },
  878. // 指引单新打印方式,promise
  879. guidePrintPromise(ReportCode, isPreview, row) {
  880. return new Promise((resolve, reject) => {
  881. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  882. let token = window.sessionStorage.getItem("token");
  883. let user = window.sessionStorage.getItem("user");
  884. let toOutShell = {
  885. ReportCode,
  886. token,
  887. isBuildImage: "N",
  888. IsUploadPdf: "N",
  889. preViewCanPrint: "N",
  890. Parameters: [
  891. { Name: "printer", Value: user },
  892. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  893. { Name: "pageFooter", Value: "pic/peisQrCode.jpg" },
  894. ],
  895. };
  896. if (!row.completeFlag || row.completeFlag == "0")
  897. reject("预登记人员,不可执行此操作!");
  898. toOutShell.BusinessCode = row.id;
  899. console.log(JSON.stringify(toOutShell));
  900. if (isPreview) {
  901. this.$peisAPI
  902. .printPre(JSON.stringify(toOutShell))
  903. .then((res) => {
  904. let lres = JSON.parse(res);
  905. if (lres.code > -1) {
  906. resolve(lres);
  907. } else {
  908. reject(lres.message);
  909. }
  910. })
  911. .catch((err) => {
  912. reject(err);
  913. });
  914. } else {
  915. this.$peisAPI
  916. .print(JSON.stringify(toOutShell))
  917. .then((res) => {
  918. let lres = JSON.parse(res);
  919. if (lres.code > -1) {
  920. return postapi(
  921. "/api/app/patientregister/updatepatientregisterguideprinttimesmany",
  922. [row.id]
  923. );
  924. } else {
  925. reject(lres.message);
  926. }
  927. })
  928. .then((res) => {
  929. if (res && res.code > -1) {
  930. let lfind = arrayExistObj(this.tableData, "id", row.id);
  931. if (lfind > -1) {
  932. if (this.tableData[lfind].guidePrintTimes) {
  933. this.tableData[lfind].guidePrintTimes =
  934. Number(this.tableData[lfind].guidePrintTimes) + 1;
  935. } else {
  936. this.tableData[lfind].guidePrintTimes = 1;
  937. }
  938. }
  939. }
  940. resolve(res);
  941. })
  942. .catch((err) => {
  943. reject(err);
  944. });
  945. }
  946. });
  947. },
  948. printGuideLisPacs(row) {
  949. return new Promise((resolve, reject) => {
  950. // this.merge_lis_pacs_label == '1' 合并检验检查条码
  951. if (this.merge_lis_pacs_label == '1') {
  952. this.guidePrintPromise("0008", false, row)
  953. .then((res) => {
  954. return this.lisPrint(row, "0002", false);
  955. })
  956. // .then((res) => {
  957. // return this.pacsPrint(row, "0004", false);
  958. // })
  959. .then((res) => {
  960. resolve(res);
  961. })
  962. .catch((err) => {
  963. reject(err);
  964. });
  965. } else {
  966. this.guidePrintPromise("0008", false, row)
  967. .then((res) => {
  968. return this.lisPrint(row, "0002", false);
  969. })
  970. .then((res) => {
  971. return this.pacsPrint(row, "0004", false);
  972. })
  973. .then((res) => {
  974. resolve(res);
  975. })
  976. .catch((err) => {
  977. reject(err);
  978. });
  979. }
  980. });
  981. },
  982. // 临时加
  983. printGuidePacs(row) {
  984. return new Promise((resolve, reject) => {
  985. this.guidePrintPromise("0008", false, row)
  986. .then((res) => {
  987. return this.pacsPrint(row, "0004", false);
  988. })
  989. .then((res) => {
  990. resolve(res);
  991. })
  992. .catch((err) => {
  993. reject(err);
  994. });
  995. });
  996. },
  997. async printPromise() {
  998. if (this.multipleSelection.length < 1) {
  999. this.$message.info({
  1000. showClose: true,
  1001. message: "请勾选要打印人员检验检查条码的记录!",
  1002. });
  1003. return;
  1004. }
  1005. this.elProgress.display = true;
  1006. this.elProgress.percentage = 0;
  1007. for (let i = 0; i < this.multipleSelection.length; i++) {
  1008. let row = this.multipleSelection[i];
  1009. try {
  1010. await this.printGuideLisPacs(row);
  1011. } catch (error) {
  1012. console.log("printPromise", error);
  1013. }
  1014. this.elProgress.percentage = Math.floor(
  1015. ((i + 1) * 100) / this.multipleSelection.length
  1016. );
  1017. }
  1018. this.elProgress.display = false;
  1019. },
  1020. // 临时加
  1021. async printPromise2() {
  1022. if (this.multipleSelection.length < 1) {
  1023. this.$message.info({
  1024. showClose: true,
  1025. message: "请勾选要打印人员检验检查条码的记录!",
  1026. });
  1027. return;
  1028. }
  1029. this.elProgress.display = true;
  1030. this.elProgress.percentage = 0;
  1031. for (let i = 0; i < this.multipleSelection.length; i++) {
  1032. let row = this.multipleSelection[i];
  1033. try {
  1034. await this.printGuidePacs(row);
  1035. } catch (error) {
  1036. console.log("printPromise", error);
  1037. }
  1038. this.elProgress.percentage = Math.floor(
  1039. ((i + 1) * 100) / this.multipleSelection.length
  1040. );
  1041. }
  1042. this.elProgress.display = false;
  1043. },
  1044. handleSelectionChange(rows) {
  1045. //this.multipleSelection = rows;
  1046. //// console.log('this.multipleSelection',this.multipleSelection)
  1047. // rows.forEach((item) => {
  1048. // item.highLightBg = "selected";
  1049. // });
  1050. // // 取消全选
  1051. // if (!rows.length) {
  1052. // this.tableData.forEach((item) => {
  1053. // item.highLightBg = "";
  1054. // });
  1055. // }
  1056. this.multipleSelection = rows;
  1057. },
  1058. //设置新增/编辑的form数据
  1059. setForm(formData) {
  1060. this.patientRegister.patientRegisterRd = deepCopy(formData);
  1061. if (!this.patientRegister.patientRegisterRd.id) {
  1062. this.patientRegister.patientRegisterRd.customerOrgId =
  1063. this.patientRegister.query.customerOrgId;
  1064. }
  1065. },
  1066. //点击体检次数行
  1067. rowClick(row) {
  1068. // 按住了shift键
  1069. // if (this.window.shift) {
  1070. // //清除所有选择
  1071. // this.tableData.forEach((e, index) => {
  1072. // e.choosed = false;
  1073. // e.index = index;
  1074. // });
  1075. // if (this.startPoint == -1) {
  1076. // this.tableData[row.index].choosed = true;
  1077. // this.startPoint = row.index;
  1078. // } else {
  1079. // if (this.startPoint > row.index) {
  1080. // for (let i = row.index; i <= this.startPoint; i++) {
  1081. // this.tableData[i].choosed = true;
  1082. // }
  1083. // } else if (this.startPoint <= row.index) {
  1084. // for (let i = this.startPoint; i <= row.index; i++) {
  1085. // this.tableData[i].choosed = true;
  1086. // }
  1087. // }
  1088. // }
  1089. // } else if (this.window.ctrl) { // 按住了ctrl 键
  1090. // this.tableData[row.index].choosed = true;
  1091. // if (this.startPoint == -1) {
  1092. // this.startPoint = row.index;
  1093. // }
  1094. // } else {
  1095. // // 未按住了ctrl 、shift 键
  1096. // //清除所有选择
  1097. // // console.log("清除所有选择");
  1098. // this.tableData.forEach((e, index) => {
  1099. // e.choosed = false;
  1100. // e.index = index;
  1101. // });
  1102. // // console.log(this.tableData, row.index);
  1103. // // console.log(this.tableData[row.index].choosed);
  1104. // this.tableData[row.index].choosed = true;
  1105. // this.startPoint = row.index;
  1106. // }
  1107. //选中了多个点编辑时,排序最前的作为当前选中的
  1108. // console.log('row.index <= this.startPoint', row.index, this.startPoint)
  1109. // let lfind = -1
  1110. // for (let i = 0; i < this.tableData.length; i++) {
  1111. // if (this.tableData[i].choosed) {
  1112. // lfind = i
  1113. // break
  1114. // }
  1115. // }
  1116. // if (lfind > -1) {
  1117. // 弹出编辑框,只有在编辑框显示时,才去触发获取数据
  1118. this.clickTime1 = new Date().getTime()
  1119. setTimeout(() => {
  1120. if (this.clickTime1 > this.clickTime2) {
  1121. this.dataTransOpts.tableS.patient_register = deepCopy(row);
  1122. this.tableDataCurrentRow = deepCopy(row);
  1123. this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
  1124. }
  1125. }, 400);
  1126. // }
  1127. },
  1128. // 双击 调出编辑
  1129. dblClick(row) {
  1130. this.clickTime2 = new Date().getTime()
  1131. this.dataTransOpts.tableS.patient_register.id = row.id
  1132. this.btnEdit()
  1133. //触发单击事件
  1134. this.dataTransOpts.tableS.patient_register = deepCopy(row);
  1135. this.tableDataCurrentRow = deepCopy(row);
  1136. this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
  1137. },
  1138. // 导入企业(青藏公司)数据
  1139. btnImportOrgData() {
  1140. //
  1141. this.dataTransOpts.plus.ImportOrgData++;
  1142. this.dialogWin.ImportOrgData = true;
  1143. },
  1144. //体检次数 相关操作
  1145. btnAdd() {
  1146. if (!this.peisid || this.peisid == "null") {
  1147. this.$message.warning({
  1148. showClose: true,
  1149. message: "该用户未选归属体检中心,不能执行此操作!",
  1150. });
  1151. return;
  1152. }
  1153. let customerOrgId = this.patientRegister.query.customerOrgId;
  1154. if (!customerOrgId) {
  1155. this.$message.warning({ showClose: true, message: "请选择单位或个人" });
  1156. return;
  1157. }
  1158. // this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
  1159. // this.setForm(this.patientRegister.patientRegisterRdInit)
  1160. // this.patientRegister.patientRegisterAbs = [];
  1161. // this.patientRegister.patientRegisterRd.id = ''
  1162. // this.dialogWin.PatientRegisterEdit = true;
  1163. // this.editTimes++; //触发表单窗口,数据更新
  1164. // this.getPatientRegisterAbs();
  1165. this.dataTransOpts.tableS.patient_register.id = "";
  1166. this.dataTransOpts.copyGroup.itemTypeIds = [] //
  1167. this.dialogWin.PatientRegisterEdit = true;
  1168. this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
  1169. setTimeout(() => {
  1170. this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新
  1171. }, 10);
  1172. },
  1173. //批量正式登记
  1174. btnAddBatch(completeFlag) {
  1175. let patientRegisterIds = [];
  1176. //取消勾选,换成选择的方式 start
  1177. // this.multipleSelection = [];
  1178. // this.tableData.forEach((e) => {
  1179. // if (e.choosed && e.completeFlag == '0') {
  1180. // this.multipleSelection.push(e);
  1181. // patientRegisterIds.push(e.id)
  1182. // }
  1183. // });
  1184. //取消勾选,换成选择的方式 end
  1185. if (this.multipleSelection.length < 1) {
  1186. this.$message.info({
  1187. showClose: true,
  1188. message: "请勾选要操作的记录!",
  1189. });
  1190. return;
  1191. }
  1192. this.multipleSelection.forEach((e) => {
  1193. switch (completeFlag) {
  1194. case "0":
  1195. if (e.completeFlag == "1") patientRegisterIds.push(e.id);
  1196. break;
  1197. case "1":
  1198. if (e.completeFlag == "0") patientRegisterIds.push(e.id);
  1199. break;
  1200. }
  1201. });
  1202. if (patientRegisterIds.length == 0) {
  1203. this.$message.info({ showClose: true, message: "没有可操作的数据!" });
  1204. return;
  1205. }
  1206. let body = { completeFlag, patientRegisterIds };
  1207. postapi(
  1208. "/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate",
  1209. body
  1210. )
  1211. .then((res) => {
  1212. if (res.code != -1) {
  1213. // console.log('操作成功!')
  1214. patientRegisterIds.forEach((e) => {
  1215. let lfind = arrayExistObj(this.tableData, "id", e);
  1216. if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag;
  1217. });
  1218. }
  1219. })
  1220. .catch((err) => {
  1221. this.$message.error({ showClose: true, message: `操作失败 ${err}` });
  1222. });
  1223. },
  1224. // 单个编辑
  1225. btnEdit() {
  1226. // if (!this.patientRegister.patientRegisterRd.id) {
  1227. if (!this.dataTransOpts.tableS.patient_register.id) {
  1228. this.$message.warning({
  1229. showClose: true,
  1230. message: "请选择要操作的记录",
  1231. });
  1232. return;
  1233. }
  1234. //// console.log(this.patientRegister.patientRegisterRd,this.tableData)
  1235. // 触发数据刷新
  1236. this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新(会同时刷新组合项目)
  1237. this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
  1238. this.dataTransOpts.copyGroup.itemTypeIds = [] //
  1239. this.dialogWin.PatientRegisterEdit = true;
  1240. },
  1241. //新增或编辑后选中记录
  1242. async close_dialogWin_PatientRegisterEdit() {
  1243. // 如果 dataTransOpts.tableS.patient_register.id 为空(未增加),则不做处理
  1244. let id = this.dataTransOpts.tableS.patient_register.id;
  1245. if (!id) {
  1246. id = this.tableDataCurrentRow.id;
  1247. }
  1248. if (!id) return;
  1249. this.dataTransOpts.tableS.patient_register.id = id;
  1250. let res = await postapi("/api/app/patientregister/getlistinfilter", {
  1251. patientRegisterNo:
  1252. this.dataTransOpts.tableS.patient_register.patientRegisterNo,
  1253. });
  1254. if (res.code != 1) return;
  1255. let currentRow = res.data.items[0];
  1256. // this.tableData.forEach(e => {
  1257. // e.choosed = false
  1258. // });
  1259. let lfind = arrayExistObj(
  1260. this.tableData,
  1261. "id",
  1262. this.dataTransOpts.tableS.patient_register.id
  1263. );
  1264. if (lfind > -1) {
  1265. objCopy(currentRow, this.tableData[lfind]);
  1266. } else {
  1267. lfind = this.tableData.length;
  1268. currentRow.index = lfind;
  1269. currentRow.choosed = true;
  1270. this.tableData.push(currentRow);
  1271. }
  1272. // 刷新 register_check_asbitem 表记录
  1273. if (lfind > -1) {
  1274. this.dataTransOpts.refresh.register_check_asbitem.M++;
  1275. }
  1276. },
  1277. //拍照
  1278. openCamera() {
  1279. if (!this.patientRegister.patientRegisterId) {
  1280. this.$message.warning({
  1281. showClose: true,
  1282. message: "请选择要操作的记录",
  1283. });
  1284. return;
  1285. }
  1286. this.patientRegister.cameraVisble = true;
  1287. },
  1288. //删除(可批量删除)
  1289. // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
  1290. btnDel() {
  1291. //选中(取消勾选)start -------------------------
  1292. // this.multipleSelection = []
  1293. // this.tableData.forEach(e => {
  1294. // if (e.choosed) {
  1295. // this.multipleSelection.push(deepCopy(e))
  1296. // }
  1297. // })
  1298. //选中(取消勾选) end -------------------------
  1299. if (this.multipleSelection.length < 1) {
  1300. this.$message.warning({
  1301. showClose: true,
  1302. message: "请先勾选要操作的记录",
  1303. });
  1304. return;
  1305. }
  1306. let patientRegisterIds = [];
  1307. for (let i = 0; i < this.multipleSelection.length; i++) {
  1308. patientRegisterIds.push(this.multipleSelection[i]["id"]);
  1309. }
  1310. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  1311. confirmButtonText: "是",
  1312. cancelButtonText: "否",
  1313. type: "warning",
  1314. })
  1315. .then(() => {
  1316. //// console.log('{patientRegisterIds}',{patientRegisterIds})
  1317. return postapi("/api/app/patient-register/delete-many", {
  1318. patientRegisterIds,
  1319. });
  1320. })
  1321. .then((res) => {
  1322. if (res.code != -1) {
  1323. // console.log("操作成功");
  1324. this.dataTransOpts.tableS.patient_register.id = "";
  1325. setTimeout(() => {
  1326. this.dataTransOpts.refresh.register_check_asbitem.M++;
  1327. }, 10);
  1328. arrayReduce(this.tableData, this.multipleSelection, "id=id"); //清除列表记录
  1329. // this.setForm(this.patientRegister.patientRegisterRdInit)
  1330. // this.getPatientRegisterAbs();
  1331. }
  1332. })
  1333. .catch((err) => {
  1334. if (err == "cancel") {
  1335. this.$message.info({ showClose: true, message: "已取消操作" });
  1336. }
  1337. });
  1338. },
  1339. //查询
  1340. async Query() {
  1341. // 查询时,清掉明细数据 (滚动时不清)
  1342. this.dataTransOpts.tableS.patient_register.id = "";
  1343. this.tableDataCurrentRow = {}; // 清除选择
  1344. if (
  1345. !(
  1346. this.patientRegister.query.isSeries == "Y" &&
  1347. this.patientRegister.query.patientRegisterNo
  1348. )
  1349. ) {
  1350. this.tableData = [];
  1351. }
  1352. setTimeout(() => {
  1353. this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
  1354. }, 10);
  1355. this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit);
  1356. await this.getPrList();
  1357. },
  1358. //数据量多时,滚动加载
  1359. async load() {
  1360. this.loadOpts.skipCount++;
  1361. await this.getPrList();
  1362. },
  1363. // 获取列表数据
  1364. async getPrList() {
  1365. if (
  1366. this.loadOpts.skipCount != 0 &&
  1367. this.loadOpts.skipCount * this.loadOpts.maxResultCount >=
  1368. this.loadOpts.totalCount
  1369. )
  1370. return;
  1371. // console.log('getPrList', this.loadOpts)
  1372. let body = {
  1373. skipCount: this.loadOpts.skipCount,
  1374. maxResultCount: this.loadOpts.maxResultCount,
  1375. };
  1376. // console.log(`this.patientRegister.query`, this.patientRegister.query);
  1377. if (this.patientRegister.query.customerOrgFlag) {
  1378. // if (this.patientRegister.query.CustomerOrgParentId) {
  1379. // body.customerOrgId = this.patientRegister.query.CustomerOrgParentId;
  1380. // } else {
  1381. // if (this.patientRegister.query.customerOrgId)
  1382. // body.customerOrgId = this.patientRegister.query.customerOrgId;
  1383. // }
  1384. if (this.patientRegister.query.customerOrgId)
  1385. body.customerOrgId = this.patientRegister.query.customerOrgId;
  1386. if (
  1387. this.patientRegister.query.customerOrgId &&
  1388. this.patientRegister.query.customerOrgId != this.dict.personOrgId &&
  1389. this.patientRegister.query.customerOrgRegister.id
  1390. ) {
  1391. body.customerOrgRegisterId =
  1392. this.patientRegister.query.customerOrgRegister.id;
  1393. body.customerOrgGroupIds =
  1394. this.patientRegister.query.customerOrgGroupIds;
  1395. }
  1396. }
  1397. if (this.patientRegister.query.sex)
  1398. body.sexId = this.patientRegister.query.sex;
  1399. if (this.patientRegister.query.patientName)
  1400. body.patientName = this.patientRegister.query.patientName;
  1401. if (
  1402. this.patientRegister.query.medicalTypeIds &&
  1403. this.patientRegister.query.medicalTypeIds.length > 0
  1404. )
  1405. body.medicalTypeIds = this.patientRegister.query.medicalTypeIds;
  1406. if (
  1407. this.patientRegister.query.completeFlags &&
  1408. this.patientRegister.query.completeFlags.length > 0
  1409. )
  1410. body.completeFlags = this.patientRegister.query.completeFlags;
  1411. //StartDate EndDate
  1412. if (
  1413. this.patientRegister.query.startDate &&
  1414. this.patientRegister.query.endDate
  1415. ) {
  1416. body.dateType = this.patientRegister.query.dateType;
  1417. body.startDate = moment(this.patientRegister.query.startDate).format(
  1418. "yyyy-MM-DD"
  1419. );
  1420. body.endDate = moment(this.patientRegister.query.endDate).format(
  1421. "yyyy-MM-DD"
  1422. );
  1423. if (body.startDate > body.endDate) {
  1424. this.$message.warning({
  1425. showClose: true,
  1426. message: "起始日期不能大于截止日期,数据校验不通过!",
  1427. });
  1428. return;
  1429. }
  1430. }
  1431. if (this.patientRegister.query.phone)
  1432. body.phone = this.patientRegister.query.phone;
  1433. if (this.patientRegister.query.idCardNo) {
  1434. body.idNo = this.patientRegister.query.idCardNo;
  1435. try {
  1436. let sysParmId = "patient_register_query_idno";
  1437. let sysParam = await postapi(
  1438. "/api/app/SysParmValue/GetSysParmValueBySysParmId",
  1439. { sysParmId }
  1440. );
  1441. // console.log('sysParam', sysParam)
  1442. if (sysParam.data != "N") {
  1443. body = {
  1444. idNo: this.patientRegister.query.idCardNo,
  1445. skipCount: this.loadOpts.skipCount,
  1446. maxResultCount: this.loadOpts.maxResultCount,
  1447. };
  1448. }
  1449. } catch (error) {
  1450. console.log(error);
  1451. }
  1452. }
  1453. if (this.patientRegister.query.patientNo)
  1454. body = {
  1455. patientNo: this.patientRegister.query.patientNo,
  1456. skipCount: this.loadOpts.skipCount,
  1457. maxResultCount: this.loadOpts.maxResultCount,
  1458. };
  1459. if (this.patientRegister.query.patientRegisterNo)
  1460. body = {
  1461. patientRegisterNo: this.patientRegister.query.patientRegisterNo,
  1462. skipCount: this.loadOpts.skipCount,
  1463. maxResultCount: this.loadOpts.maxResultCount,
  1464. };
  1465. // console.log("/api/app/patientregister/getlistinfilter", body);
  1466. let upPhoto = "patient_register_read_idno_upPhoto"; // 是否读身份证查询更新照片
  1467. let upPhotoParam = await postapi(
  1468. "/api/app/SysParmValue/GetSysParmValueBySysParmId",
  1469. { sysParmId: upPhoto }
  1470. );
  1471. let photo = this.patientRegister.photo;
  1472. this.patientRegister.photo = "";
  1473. postapi("/api/app/patientregister/getlistinfilter", body).then(
  1474. async (res) => {
  1475. if (res.code > -1) {
  1476. // 刷新最大记录数
  1477. this.loadOpts.totalCount = res.data.totalCount;
  1478. let curLoad = res.data.items;
  1479. // let oldCount = 0
  1480. // 处理:
  1481. // 1、分组/套餐 排序混乱的问题
  1482. // 2、扫身份证查询时,无照片自动更新照片(参数控制)
  1483. curLoad.forEach((e) => {
  1484. // 1、分组/套餐 排序混乱的问题
  1485. if (e.customerOrgId == this.dict.personOrgId) {
  1486. e.groupPack = e.medicalPackageId;
  1487. } else {
  1488. e.groupPack = e.customerOrgGroupId;
  1489. }
  1490. // 2、扫身份证查询时,无照片自动更新照片(参数控制)
  1491. if (upPhotoParam != "N" && photo) {
  1492. if (!e.photo) {
  1493. savePeoplePhoto(e.id, photo);
  1494. }
  1495. }
  1496. });
  1497. // 不是连续扫码时,需要判断是否分页查询(连续扫码不清原来的数据)
  1498. console.log(
  1499. "this.patientRegister.query",
  1500. this.patientRegister.query.isSeries,
  1501. this.patientRegister.query.patientRegisterNo
  1502. );
  1503. if (
  1504. !(
  1505. this.patientRegister.query.isSeries == "Y" &&
  1506. this.patientRegister.query.patientRegisterNo
  1507. )
  1508. ) {
  1509. if (body.skipCount == 0) {
  1510. //查询
  1511. this.tableData = [];
  1512. }
  1513. }
  1514. this.tableData = this.tableData.concat(curLoad);
  1515. // else {
  1516. // // 懒加载 ,原数据集不用清空
  1517. // oldCount = this.tableData.length
  1518. // }
  1519. // curLoad.forEach((e, index) => {
  1520. // this.tableData.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e))
  1521. // })
  1522. //如果 有选中 记录,则刷新其对应的组合项目
  1523. if (this.dataTransOpts.tableS.patient_register.id) {
  1524. this.dataTransOpts.refresh.register_check_asbitem.M++;
  1525. }
  1526. }
  1527. }
  1528. );
  1529. },
  1530. //滚动加载数据
  1531. async scrollFull(scroll, event) {
  1532. if (scroll.judgeFlse) {
  1533. if (
  1534. (Number(this.loadOpts.skipCount) + 1) *
  1535. Number(this.loadOpts.maxResultCount) >=
  1536. Number(this.loadOpts.totalCount)
  1537. ) {
  1538. return;
  1539. } else {
  1540. await this.load();
  1541. }
  1542. }
  1543. // this.dom = this.$refs.info.bodyWrapper
  1544. // console.log('this.dom', this.dom)
  1545. // this.dom.addEventListener('scroll', async () => {
  1546. // // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
  1547. // if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
  1548. // // 获取到的不是全部数据 当滚动到底部
  1549. // // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
  1550. // if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
  1551. // this.lazyLoading = false
  1552. // } else {
  1553. // this.lazyLoading = true
  1554. // await this.load()
  1555. // this.lazyLoading = false
  1556. // // this.dom.scrollTop = this.dom.scrollTop - 100
  1557. // }
  1558. // }
  1559. // })
  1560. },
  1561. close_dialogWin_upBaseInfo() {
  1562. this.upBaseInfo.visble = false;
  1563. this.close_dialogWin_PatientRegisterEdit();
  1564. },
  1565. btnUpBaseInfo() {
  1566. let body = {
  1567. patientRegisterId: this.upBaseInfo.patientRegisterId,
  1568. // "patientName": "string",
  1569. // "mobileTelephone": "string",
  1570. // "idNo": "string"
  1571. };
  1572. body[this.upBaseInfo.colName] = this.upBaseInfo.value;
  1573. postapi(
  1574. "/api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId",
  1575. body
  1576. ).then((res) => {
  1577. if (res.code > -1) {
  1578. this.close_dialogWin_upBaseInfo();
  1579. }
  1580. });
  1581. },
  1582. // 修改基本信息
  1583. fnUpBaseInfo(row, baseInfoType) {
  1584. this.dataTransOpts.tableS.patient_register.id = row.id;
  1585. this.upBaseInfo.visble = true;
  1586. this.upBaseInfo.patientRegisterId = row.id;
  1587. this.upBaseInfo.colName = baseInfoType;
  1588. switch (baseInfoType) {
  1589. case "idNo":
  1590. this.upBaseInfo.label = "新身份证号";
  1591. break;
  1592. case "mobileTelephone":
  1593. this.upBaseInfo.label = "新手机号";
  1594. break;
  1595. default:
  1596. this.upBaseInfo.label = "新姓名";
  1597. break;
  1598. }
  1599. this.upBaseInfo.value = row[baseInfoType];
  1600. },
  1601. editMedicalStartDate() {
  1602. if (this.multipleSelection.length < 1) {
  1603. this.$message.warning({
  1604. showClose: true,
  1605. message: "请勾选要操作的人员记录!",
  1606. });
  1607. return;
  1608. }
  1609. this.upBaseInfo.medicalStartDate = moment(
  1610. this.multipleSelection[0].medicalStartDate
  1611. ).format("yyyy-MM-DD");
  1612. this.dialogEditMedicalStartDate = true;
  1613. },
  1614. // 批量修改体检日期
  1615. btnEditMedicalStartDate() {
  1616. let body = {
  1617. //"completeFlag": "string",
  1618. medicalStartDate: this.upBaseInfo.medicalStartDate,
  1619. patientRegisterIds: [],
  1620. };
  1621. this.multipleSelection.forEach((e) => {
  1622. body.patientRegisterIds.push(e.id);
  1623. });
  1624. postapi(
  1625. "/api/app/PatientRegister/UpdatePatientRegisterMedicalStartDate",
  1626. body
  1627. ).then((res) => {
  1628. if (res.code > -1) {
  1629. let lfind = 0;
  1630. this.multipleSelection.forEach((e) => {
  1631. e.medicalStartDate = body.medicalStartDate;
  1632. lfind = arrayExistObj(this.tableData, "id", e.id);
  1633. if (lfind > -1)
  1634. this.tableData.medicalStartDate = body.medicalStartDate;
  1635. });
  1636. this.dialogEditMedicalStartDate = false;
  1637. }
  1638. });
  1639. },
  1640. // 分诊排队
  1641. fnQueue(row) {
  1642. this.queueParams = {
  1643. patientRegisterId: row.id,
  1644. };
  1645. this.dialogWin.queue = true;
  1646. this.dataTransOpts.plus.queue++;
  1647. },
  1648. //右击菜单
  1649. onCellRightClick(row, column) {
  1650. // console.log(row)
  1651. this.rClickRow = { ...row }; //右击的行记录
  1652. this.rClickColumn = { ...column }; //右击的列(预留)
  1653. // console.log(row, column.property);
  1654. // this.onContextmenu()
  1655. },
  1656. onContextmenu(event) {
  1657. // console.log('onContextmenu',event);
  1658. if (!this.rClickRow) return false;
  1659. let row = { ...this.rClickRow };
  1660. let items = []; //菜单项
  1661. // items.push({
  1662. // label: "一级菜单",
  1663. // children: [
  1664. // { label: "修改姓名", onClick: () => { this.fnUpBaseInfo(row, 'patientName'); } }
  1665. // ]
  1666. // })
  1667. let subMenumedical = [];
  1668. if (checkPagePriv(this.pagePriv.privs, "修改体检日期"))
  1669. subMenumedical.push({
  1670. label: "修改体检日期",
  1671. onClick: () => {
  1672. this.editMedicalStartDate();
  1673. },
  1674. });
  1675. if (
  1676. checkPagePriv(this.pagePriv.privs, "修改姓名") &&
  1677. row.completeFlag != "0"
  1678. )
  1679. subMenumedical.push({
  1680. label: "修改姓名",
  1681. onClick: () => {
  1682. this.fnUpBaseInfo(row, "patientName");
  1683. },
  1684. });
  1685. if (
  1686. checkPagePriv(this.pagePriv.privs, "修改手机号") &&
  1687. row.completeFlag != "0"
  1688. )
  1689. subMenumedical.push({
  1690. label: "修改手机号",
  1691. onClick: () => {
  1692. this.fnUpBaseInfo(row, "mobileTelephone");
  1693. },
  1694. });
  1695. if (
  1696. checkPagePriv(this.pagePriv.privs, "修改身份证号") &&
  1697. row.completeFlag != "0"
  1698. )
  1699. subMenumedical.push({
  1700. label: "修改身份证号",
  1701. onClick: () => {
  1702. this.fnUpBaseInfo(row, "idNo");
  1703. },
  1704. });
  1705. if (subMenumedical.length > 0)
  1706. items.push({ label: "修改体检信息", children: subMenumedical });
  1707. if (
  1708. checkPagePriv(this.pagePriv.privs, "分诊排队") &&
  1709. row.completeFlag != "0"
  1710. )
  1711. items.push({
  1712. label: "分诊排队",
  1713. onClick: () => {
  1714. this.fnQueue(row);
  1715. },
  1716. });
  1717. if (
  1718. checkPagePriv(this.pagePriv.privs, "发送检验申请") &&
  1719. row.completeFlag != "0"
  1720. )
  1721. items.push({
  1722. label: "发送检验申请",
  1723. onClick: () => {
  1724. this.lisRequest(row);
  1725. },
  1726. });
  1727. // 预览条码
  1728. let subMenuPre = [];
  1729. if (
  1730. checkPagePriv(this.pagePriv.privs, "预览人员条码") &&
  1731. row.completeFlag != "0"
  1732. )
  1733. subMenuPre.push({
  1734. label: "预览人员条码",
  1735. onClick: () => {
  1736. this.guidePrintPromise("0008", true, row);
  1737. },
  1738. });
  1739. if (
  1740. checkPagePriv(this.pagePriv.privs, "预览检验条码") &&
  1741. row.completeFlag != "0"
  1742. )
  1743. subMenuPre.push({
  1744. label: "预览检验条码",
  1745. onClick: () => {
  1746. this.lisPrint(row, "0002", true);
  1747. },
  1748. });
  1749. if (
  1750. checkPagePriv(this.pagePriv.privs, "预览Pacs条码") &&
  1751. row.completeFlag != "0"
  1752. )
  1753. subMenuPre.push({
  1754. label: "预览Pacs条码",
  1755. onClick: () => {
  1756. // console.log('预览Pacs条码 row',row)
  1757. this.pacsPrint(row, "0004", true);
  1758. },
  1759. });
  1760. if (subMenuPre.length > 0)
  1761. items.push({ label: "预览条码", children: subMenuPre });
  1762. let subMenuPrint = [];
  1763. if (
  1764. checkPagePriv(this.pagePriv.privs, "打印人员条码") &&
  1765. row.completeFlag != "0"
  1766. )
  1767. subMenuPrint.push({
  1768. label: "打印人员条码",
  1769. onClick: () => {
  1770. this.guidePrintPromise("0008", false, row);
  1771. },
  1772. });
  1773. if (
  1774. checkPagePriv(this.pagePriv.privs, "打印检验条码") &&
  1775. row.completeFlag != "0"
  1776. )
  1777. subMenuPrint.push({
  1778. label: "打印检验条码",
  1779. onClick: () => {
  1780. this.lisPrint(row, "0002", false);
  1781. },
  1782. });
  1783. if (
  1784. checkPagePriv(this.pagePriv.privs, "打印Pacs条码") &&
  1785. row.completeFlag != "0"
  1786. )
  1787. subMenuPrint.push({
  1788. label: "打印Pacs条码",
  1789. onClick: () => {
  1790. this.pacsPrint(row, "0004", false);
  1791. },
  1792. });
  1793. if (subMenuPrint.length > 0)
  1794. items.push({ label: "打印条码", children: subMenuPrint });
  1795. // 导入结果合集 ============ start
  1796. let subMenuImp = [];
  1797. if (
  1798. checkPagePriv(this.pagePriv.privs, "导入检查结果") &&
  1799. row.completeFlag != "0"
  1800. )
  1801. subMenuImp.push({
  1802. label: "导入检查结果",
  1803. onClick: () => {
  1804. this.importResult("pacs", row);
  1805. },
  1806. });
  1807. if (
  1808. checkPagePriv(this.pagePriv.privs, "导入检验结果") &&
  1809. row.completeFlag != "0"
  1810. )
  1811. subMenuImp.push({
  1812. label: "导入检验结果",
  1813. onClick: () => {
  1814. this.importResult("lis", row);
  1815. },
  1816. });
  1817. if (
  1818. checkPagePriv(this.pagePriv.privs, "导入迪安结果") &&
  1819. row.completeFlag != "0"
  1820. )
  1821. subMenuImp.push({
  1822. label: "导入迪安结果",
  1823. onClick: () => {
  1824. this.importResult("diAn", row);
  1825. },
  1826. });
  1827. if (subMenuImp.length > 0) {
  1828. items.push({ label: "导入结果", children: subMenuImp });
  1829. }
  1830. // 导入结果合集 ============ end
  1831. // 批量操作合集 ============ start
  1832. let batchMenus = []
  1833. if (
  1834. checkPagePriv(this.pagePriv.privs, "批量更新组合项目明细") &&
  1835. this.multipleSelection.length > 0
  1836. )
  1837. batchMenus.push({
  1838. label: "批量更新组合项目明细",
  1839. onClick: () => {
  1840. this.btnItemBatch();
  1841. },
  1842. });
  1843. if (
  1844. checkPagePriv(this.pagePriv.privs, "调整检查项目医生") &&
  1845. this.multipleSelection.length > 0
  1846. )
  1847. batchMenus.push({
  1848. label: "调整检查项目医生",
  1849. onClick: () => {
  1850. // this.doctorType = 'check'
  1851. this.dataTransOpts.plus.PatientRegisterEditDoctorBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  1852. this.dialogWin.PatientRegisterEditDoctorBatch = true;
  1853. },
  1854. });
  1855. if (
  1856. checkPagePriv(this.pagePriv.privs, "批量调整体检类别") &&
  1857. this.multipleSelection.length > 0
  1858. ) {
  1859. batchMenus.push({
  1860. label: "批量调整体检类别",
  1861. onClick: () => {
  1862. // this.doctorType = 'check'
  1863. this.dataTransOpts.plus.PatientRegisterEditMedicalTypeBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  1864. this.dialogWin.PatientRegisterEditMedicalTypeBatch = true;
  1865. },
  1866. });
  1867. }
  1868. if (
  1869. checkPagePriv(this.pagePriv.privs, "批量调整人员类别") &&
  1870. this.multipleSelection.length > 0
  1871. ) {
  1872. batchMenus.push({
  1873. label: "批量调整人员类别",
  1874. onClick: () => {
  1875. // this.doctorType = 'check'
  1876. this.dataTransOpts.plus.PatientRegisterEditPersonnelTypeBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  1877. this.dialogWin.PatientRegisterEditPersonnelTypeBatch = true;
  1878. },
  1879. });
  1880. }
  1881. if (
  1882. checkPagePriv(this.pagePriv.privs, "批量调整备注") &&
  1883. this.multipleSelection.length > 0
  1884. ) {
  1885. batchMenus.push({
  1886. label: "批量调整备注",
  1887. onClick: () => {
  1888. // this.doctorType = 'check'
  1889. this.dataTransOpts.plus.PatientRegisterEditRemarkBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  1890. this.dialogWin.PatientRegisterEditRemarkBatch = true;
  1891. },
  1892. });
  1893. }
  1894. if (batchMenus.length > 0) {
  1895. items.push({ label: "批量操作", children: batchMenus });
  1896. }
  1897. // 批量操作合集 ============ end
  1898. if (
  1899. checkPagePriv(this.pagePriv.privs, "查看云胶片二维码")
  1900. )
  1901. items.push({
  1902. label: "查看云胶片二维码",
  1903. onClick: () => {
  1904. this.makeQrCode(row)
  1905. },
  1906. });
  1907. items.push({ label: "----------------" });
  1908. this.$contextmenu({
  1909. items,
  1910. event,
  1911. x: event.clientX,
  1912. y: event.clientY,
  1913. customClass: "custom-class",
  1914. zIndex: 3,
  1915. minWidth: 80,
  1916. });
  1917. this.rClickRow = null;
  1918. return false;
  1919. },
  1920. //批量更新分组按钮
  1921. btnGroupBatch() {
  1922. let customerOrgId = this.patientRegister.query.customerOrgId;
  1923. if (!customerOrgId) {
  1924. this.$message.warning({ showClose: true, message: "请选择单位" });
  1925. return;
  1926. }
  1927. //取消勾选,换成选择的方式 start
  1928. // this.multipleSelection = [];
  1929. // this.tableData.forEach((e) => {
  1930. // if (e.choosed) this.multipleSelection.push(e);
  1931. // });
  1932. //取消勾选,换成选择的方式 end
  1933. if (this.multipleSelection.length < 1) {
  1934. this.$message.info({
  1935. showClose: true,
  1936. message: "请选择要操作的记录!",
  1937. });
  1938. return;
  1939. }
  1940. this.dataTransOpts.plus.PatientRegisterEditGroupBatch++;
  1941. this.dialogWin.PatientRegisterEditGroupBatch = true;
  1942. },
  1943. //批量更新组合项目
  1944. btnAsbBatch() {
  1945. let customerOrgId = this.patientRegister.query.customerOrgId;
  1946. if (!customerOrgId) {
  1947. this.$message.warning({ showClose: true, message: "请选择单位" });
  1948. return;
  1949. }
  1950. //取消勾选,换成选择的方式 start
  1951. // this.multipleSelection = [];
  1952. // this.tableData.forEach((e) => {
  1953. // if (e.choosed) this.multipleSelection.push(e);
  1954. // });
  1955. //取消勾选,换成选择的方式 end
  1956. if (this.multipleSelection.length < 1) {
  1957. this.$message.warning({
  1958. showClose: true,
  1959. message: "请选择要操作的记录",
  1960. });
  1961. return;
  1962. }
  1963. this.dataTransOpts.plus.PatientRegisterEditItemBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  1964. this.dialogWin.PatientRegisterEditItemBatch = true;
  1965. },
  1966. //批量更新组合项目
  1967. async btnItemBatch() {
  1968. if (this.multipleSelection.length < 1) {
  1969. this.$message.warning({
  1970. showClose: true,
  1971. message: "请选择要操作的记录",
  1972. });
  1973. return;
  1974. }
  1975. this.elProgress.display = true;
  1976. this.elProgress.percentage = 0;
  1977. for (let i = 0; i < this.multipleSelection.length; i++) {
  1978. let patientRegisterId = this.multipleSelection[i].id;
  1979. try {
  1980. await postapi("/api/app/RegisterCheckItem/SyncRegisterCheckItem", {
  1981. patientRegisterId,
  1982. });
  1983. } catch (error) {
  1984. console.log("printPromise", error);
  1985. }
  1986. this.elProgress.percentage = Math.floor(
  1987. ((i + 1) * 100) / this.multipleSelection.length
  1988. );
  1989. }
  1990. this.elProgress.display = false;
  1991. },
  1992. //检验申请
  1993. async lisRequest(row) {
  1994. let isPrintLisRequest = false;
  1995. let res = null;
  1996. if (row.completeFlag == "0") {
  1997. this.$message.info({
  1998. showClose: true,
  1999. message: "预登记人员,不可执行此操作!",
  2000. });
  2001. return;
  2002. }
  2003. try {
  2004. res = await postapi(
  2005. `/api/app/lisrequest/setlisrequest?PatientRegisterId=${row.id}`
  2006. );
  2007. // console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res);
  2008. } catch (error) {
  2009. return;
  2010. }
  2011. if (res.code > -1) {
  2012. isPrintLisRequest = true;
  2013. }
  2014. //重复申请,重打
  2015. if (res.code == -1 && res.message.indexOf("已申请") > -1) {
  2016. isPrintLisRequest = true;
  2017. }
  2018. if (!isPrintLisRequest) return;
  2019. try {
  2020. await this.$confirm("是否打印检验申请单?", "提示", {
  2021. confirmButtonText: "是",
  2022. cancelButtonText: "否",
  2023. type: "info",
  2024. showClose: false,
  2025. closeOnClickModal: false,
  2026. closeOnPressEscape: false,
  2027. });
  2028. } catch (error) {
  2029. return;
  2030. }
  2031. //打印检验申请单
  2032. this.lisPrint(row, "0003", false);
  2033. },
  2034. //检验条码打印 改造成 promise
  2035. lisPrint(row, ReportCode, isPreview) {
  2036. return new Promise((resolve, reject) => {
  2037. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  2038. if (!row.completeFlag || row.completeFlag == "0")
  2039. reject("预登记人员,不可执行此操作!");
  2040. let token = window.sessionStorage.getItem("token");
  2041. let user = window.sessionStorage.getItem("user");
  2042. let toOutShell = {
  2043. ReportCode,
  2044. token,
  2045. IsMoreLabel: "Y",
  2046. isBuildImage: "N",
  2047. IsUploadPdf: "N",
  2048. preViewCanPrint: "N",
  2049. Parameters: [
  2050. { Name: "printer", Value: user },
  2051. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  2052. ],
  2053. BusinessCode: row.id,
  2054. };
  2055. console.log("this.$peisAPI.toOutShell", toOutShell);
  2056. if (isPreview) {
  2057. this.$peisAPI
  2058. .printPre(JSON.stringify(toOutShell))
  2059. .then((res) => {
  2060. console.log("this.$peisAPI.printPre", res);
  2061. let lres = JSON.parse(res);
  2062. if (lres.code > -1) {
  2063. resolve(lres);
  2064. } else {
  2065. reject(lres.message);
  2066. }
  2067. })
  2068. .catch((err) => {
  2069. reject(err);
  2070. });
  2071. } else {
  2072. this.$peisAPI
  2073. .print(JSON.stringify(toOutShell))
  2074. .then((res) => {
  2075. console.log("this.$peisAPI.print", res);
  2076. let lres = JSON.parse(res);
  2077. if (lres.code < 0) {
  2078. reject(lres.message);
  2079. } else {
  2080. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  2081. operateType: 1,
  2082. patientRegisterId: row.id,
  2083. });
  2084. }
  2085. })
  2086. .then((res) => {
  2087. if (res && res.code < 0) {
  2088. reject(res.message);
  2089. } else {
  2090. resolve(res);
  2091. }
  2092. })
  2093. .catch((err) => {
  2094. reject(err);
  2095. });
  2096. }
  2097. });
  2098. },
  2099. //pacs条码打印
  2100. pacsPrint(row, ReportCode, isPreview) {
  2101. return new Promise((resolve, reject) => {
  2102. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  2103. if (!row.completeFlag || row.completeFlag == "0")
  2104. reject("预登记人员,不可执行此操作!");
  2105. let token = window.sessionStorage.getItem("token");
  2106. let user = window.sessionStorage.getItem("user");
  2107. let toOutShell = {
  2108. ReportCode,
  2109. token,
  2110. IsMoreLabel: "Y",
  2111. isBuildImage: "N",
  2112. IsUploadPdf: "N",
  2113. preViewCanPrint: "N",
  2114. Parameters: [
  2115. { Name: "printer", Value: user },
  2116. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  2117. ],
  2118. BusinessCode: row.id,
  2119. };
  2120. console.log("this.$peisAPI.print", toOutShell);
  2121. if (isPreview) {
  2122. this.$peisAPI
  2123. .printPre(JSON.stringify(toOutShell))
  2124. .then((res) => {
  2125. console.log("this.$peisAPI.printPre", res);
  2126. let lres = JSON.parse(res);
  2127. if (lres.code > -1) {
  2128. resolve(lres);
  2129. } else {
  2130. reject(lres.message);
  2131. }
  2132. })
  2133. .catch((err) => {
  2134. reject(err);
  2135. });
  2136. } else {
  2137. this.$peisAPI
  2138. .print(JSON.stringify(toOutShell))
  2139. .then((res) => {
  2140. console.log("this.$peisAPI.print", res);
  2141. let lres = JSON.parse(res);
  2142. if (lres.code > -1) {
  2143. resolve(lres);
  2144. } else {
  2145. reject(lres.message);
  2146. }
  2147. })
  2148. .catch((err) => {
  2149. reject(err);
  2150. });
  2151. }
  2152. });
  2153. },
  2154. // 导入检查检验结果
  2155. // checkType:pacs检查/lis检验/diAn迪安
  2156. importResult(checkType, row) {
  2157. let url = "/api/app/ImportLisResult/ImportResultByPatientRegisterId";
  2158. switch (checkType) {
  2159. case "pacs": //常规 pacs 数据导入
  2160. url = "/api/app/ImportPacsResult/ImportResultByPatientRegisterId";
  2161. postapi(url, { patientRegisterId: row.id })
  2162. .then((res) => {
  2163. if (res.code > -1) {
  2164. return postapi(
  2165. "/api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId",
  2166. { patientRegisterId: row.id }
  2167. );
  2168. }
  2169. })
  2170. .then((res) => {
  2171. if (res && res.code > -1) {
  2172. this.$message.success({
  2173. showClose: true,
  2174. message: "导入成功!",
  2175. });
  2176. this.rowClick(row);
  2177. }
  2178. });
  2179. break;
  2180. case "diAn": //迪安数据导入
  2181. url = "/api/app/ImportLisResult/ImportDianResultByPatientRegisterId";
  2182. postapi(url, { patientRegisterId: row.id }).then((res) => {
  2183. if (res.code > -1) {
  2184. this.$message.success({ showClose: true, message: "导入成功!" });
  2185. this.rowClick(row);
  2186. }
  2187. });
  2188. break;
  2189. default: //常规lis数据导入
  2190. postapi(url, { patientRegisterId: row.id }).then((res) => {
  2191. if (res.code > -1) {
  2192. this.$message.success({ showClose: true, message: "导入成功!" });
  2193. this.rowClick(row);
  2194. }
  2195. });
  2196. break;
  2197. }
  2198. },
  2199. //生成云胶片二维码
  2200. makeQrCode(row) {
  2201. //let canvas = this.$refs.canvas;
  2202. let url = `${this.qrCode.url}?reportparam=条码号&mrn=条码号` //`https://ccjktj.cn:5081/?reportparam=条码号&mrn=条码号`
  2203. if (row?.patientRegisterNo) {
  2204. url = `${this.qrCode.url}?reportparam=${row.checkRequestNo}&mrn=${row.checkRequestNo}`
  2205. this.qrCode.barcodeNo = row.patientRegisterNo
  2206. }
  2207. if (row?.patientName) {
  2208. this.qrCode.patientName = row.patientName
  2209. }
  2210. this.qrCode.patientName = this.qrCode.patientName.substring(0, 1) + '*' + this.qrCode.patientName.substring(2)
  2211. // canvas 方式不可取,有延时
  2212. // this.$nextTick(() => {
  2213. // QRCode.toCanvas(canvas, url, { errorCorrectionLevel: 'H' })
  2214. // .then(() => {
  2215. // console.log('success!')
  2216. // })
  2217. // .catch(err => {
  2218. // this.dialogQrCode = false
  2219. // this.$message.error({ showClose: true, message: err.message })
  2220. // console.log('fail!', err.message)
  2221. // })
  2222. // .finally(() => {
  2223. // console.log('url:', url)
  2224. // })
  2225. // })
  2226. QRCode.toDataURL(url, { errorCorrectionLevel: 'H' })
  2227. .then(res => {
  2228. console.log(res)
  2229. this.qrCode.url = res
  2230. this.qrCode.winDisplay = true
  2231. })
  2232. .catch(err => {
  2233. this.$message.error({ showClose: true, message: err.message })
  2234. console.error(err)
  2235. })
  2236. .finally(() => {
  2237. console.log('url', url)
  2238. })
  2239. },
  2240. //通用导出
  2241. btnExport(elId) {
  2242. this.dragCol.forEach((e) => {
  2243. this.jsonFields[e.label] = e.prop;
  2244. });
  2245. let tableDatas = deepCopy(this.tableData)
  2246. tableDatas.forEach((e, index) => {
  2247. if (index) e.sn = index + 1
  2248. if (e.completeFlag) e.completeFlag = e.isAudit == "Y" ? "已审核" : dddw(this.dict.completeFlag, "id", e.completeFlag, "displayName")
  2249. if (e.guidePrintTimes.toString()) e.guidePrintTimes = e.guidePrintTimes > 0 ? '打印' : ''
  2250. if (e.isLock) e.isLock = e.isLock == 'Y' ? '锁住' : ''
  2251. if (e.sexId) e.sexId = dddw(this.dict.sex, "id", e.sexId, "displayName")
  2252. if (e.patientRegisterNo) e.patientRegisterNo = '&' + e.patientRegisterNo
  2253. if (e.patientNo) e.patientNo = '&' + e.patientNo
  2254. if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId === this.dict.personOrgId) {
  2255. e.groupPack = e.medicalPackageName // dddw(this.dict.medicalPackage, "id", e.medicalPackageId, "displayName")
  2256. } else if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId !== this.dict.personOrgId) {
  2257. e.groupPack = e.customerOrgGroupName // dddw(this.dict.customerOrgGroupAll, "id", e.customerOrgGroupId, "displayName")
  2258. }
  2259. //if (e.nationId) e.nationId = dddw(this.dict.nation, "id", e.nationId, "displayName")
  2260. if (e.idNo) e.idNo = e.idNo + '&'
  2261. if (e.birthDate) e.birthDate = moment(e.birthDate).format("yyyy-MM-DD")
  2262. //if (e.maritalStatusId) e.maritalStatusId = dddw(this.dict.maritalStatus, "id", e.maritalStatusId, "displayName")
  2263. if (e.medicalTypeId) e.medicalTypeId = dddw(this.dict.medicalType, "id", e.medicalTypeId, "displayName")
  2264. //if (e.personnelTypeId) e.personnelTypeId = dddw(this.dict.personnelType, "id", e.personnelTypeId, "displayName")
  2265. if (e.isVip) e.isVip = e.isVip == "Y" ? "是" : "否"
  2266. if (e.isUpload) e.isUpload = e.isUpload == "Y" ? "是" : "否"
  2267. if (e.qztlType) e.qztlType = dddw(this.dict.qztlType, "id", e.qztlType, "displayName")
  2268. if (e.qztlIsMain) e.qztlIsMain = e.qztlIsMain == "Y" ? "是" : "否"
  2269. if (e.qztlIsCy) e.qztlIsCy = e.qztlIsCy == "Y" ? "是" : "否"
  2270. if (e.qztlIsCw) e.qztlIsCw = e.qztlIsCw == "Y" ? "是" : "否"
  2271. if (e.qztlIsGt) e.qztlIsGt = e.qztlIsGt == "Y" ? "是" : "否"
  2272. if (e.qztlIsWh) e.qztlIsWh = e.qztlIsWh == "Y" ? "是" : "否"
  2273. if (e.qztlIsFj) e.qztlIsFj = e.qztlIsFj == "Y" ? "是" : "否"
  2274. })
  2275. this.tableName = '人员登记列表' + moment(new Date()).format('yyyyMMDDHHmmss') + '.xls'
  2276. return tableDatas;
  2277. // const columns = this.$refs.info.getColumns(); // 获取列信息
  2278. // const data = this.$refs.info.getData(); // 获取数据
  2279. // console.log(columns)
  2280. // console.log(columns)
  2281. // const exportConf = { columns, data }; // 构建导出配置对象
  2282. // const filename = 'my_data.xlsx'; // 设置文件名
  2283. // const blob = exportTable(exportConf); // 导出数据为 Blob 对象
  2284. // saveAs(blob, filename); // 使用 file-saver 保存文件
  2285. // // 获取HTML元素(表格)
  2286. // // let table = document.getElementById(elId); //.cloneNode(true)
  2287. // this.$nextTick(() => {
  2288. // // let refsTable = this.$refs[elId] //.cloneNode(true) true
  2289. // let table = document.getElementById(elId)
  2290. // // console.log('table,refsTable', table, refsTable)
  2291. // let tableData = table.innerHTML
  2292. // let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
  2293. // let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
  2294. // FileSaver.saveAs(blob, fileName + '.xls');
  2295. // // 导出图片
  2296. // // 使用html2canvas将HTML元素转换为画布
  2297. // // let cloneTable = table.cloneNode(true) //[elId]
  2298. // /*
  2299. // html2canvas(table).then(canvas => {
  2300. // // 创建一个a元素用于下载
  2301. // const link = document.createElement('a');
  2302. // link.href = canvas.toDataURL('image/jpeg');
  2303. // link.download = fileName + '.jpg';
  2304. // document.body.appendChild(link);
  2305. // link.click();
  2306. // //document.body.removeChild(link);
  2307. // // // 创建一个PDF对象
  2308. // // var pdf = new jsPDF();
  2309. // // // 设置PDF的尺寸
  2310. // // pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, canvas.width, canvas.height);
  2311. // // // 导出PDF
  2312. // // pdf.save('员工信息表.pdf');
  2313. // });
  2314. // */
  2315. // })
  2316. },
  2317. // 点击扫码回收体检表按钮
  2318. btnScanRecover() {
  2319. this.patientRegisterNo = ''
  2320. this.dialogRecover = true
  2321. this.$nextTick(() => {
  2322. this.$refs['tmh'].focus(); //打开光标定位到条码栏里
  2323. });
  2324. },
  2325. //按条码号查个人数据
  2326. signByPatientRegisterNo() {
  2327. let patientRegisterNos = [this.patientRegisterNo]
  2328. let body = {
  2329. patientRegisterNos
  2330. }
  2331. //console.log(`/api/app/patientregister/getpatientregisterorpatient`, body)
  2332. postapi('/api/app/PatientRegister/BatchRecoverGuideByPatientRegisterNo', body)
  2333. .then((res) => {
  2334. if (res.code > -1) {
  2335. this.patientRegisterNo = ''
  2336. this.$message.success({ showClose: true, message: '操作成功!' })
  2337. }
  2338. });
  2339. },
  2340. btnDragColDesign() {
  2341. this.dragColDesign = deepCopy(this.dragCol);
  2342. this.dialogColSort = true;
  2343. this.rowDrag();
  2344. },
  2345. btnDragColDesignOk() {
  2346. this.dragCol = deepCopy(this.dragColDesign);
  2347. this.dialogColSort = false;
  2348. },
  2349. //拖拽
  2350. rowDrag() {
  2351. this.$nextTick(() => {
  2352. const el = document.querySelector("#elTable_dragCol tbody");
  2353. // console.log('el0', el)
  2354. const that = this;
  2355. Sortable.create(el, {
  2356. animation: 150, // ms, number 单位:ms,定义排序动画的时间
  2357. //拖拽结束
  2358. onEnd({ newIndex, oldIndex }) {
  2359. that.isshow = false;
  2360. const currRow = that.dragColDesign.splice(oldIndex, 1)[0];
  2361. that.dragColDesign.splice(newIndex, 0, currRow);
  2362. // console.log('el', el)
  2363. },
  2364. });
  2365. });
  2366. },
  2367. },
  2368. //监听事件
  2369. watch: {
  2370. "patientRegister.query.customerOrgId": {
  2371. // immediate: true, // 立即执行
  2372. // deep: true, // 深度监听复杂类型内变化
  2373. handler(newVal, oldVal) {
  2374. //// console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal)
  2375. // 单位变化时,清除当前列表信息
  2376. if (newVal && newVal != oldVal) {
  2377. this.tableData = [];
  2378. this.dataTransOpts.tableM.register_check_asbitem = [];
  2379. }
  2380. },
  2381. },
  2382. //触发查询事件
  2383. "patientRegister.query.times"(newVal, oldVal) {
  2384. if (newVal != oldVal) {
  2385. //alert('触发查询事件')
  2386. this.Query();
  2387. }
  2388. },
  2389. //新增后,触发赋值
  2390. // "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  2391. // if (newVal != oldVal) {
  2392. // //// console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  2393. // objCopy(this.patientRegister.patientRegisterRd, this.form);
  2394. // }
  2395. // },
  2396. },
  2397. };
  2398. </script>
  2399. <style scoped>
  2400. @import "../../assets/css/global_input.css";
  2401. @import "../../assets/css/global_table.css";
  2402. @import "../../assets/css/global.css";
  2403. .box {
  2404. display: flex;
  2405. }
  2406. .listBtn {
  2407. margin-top: 5px;
  2408. text-align: center;
  2409. }
  2410. .btnClass {
  2411. width: 100px;
  2412. }
  2413. </style>