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.

2525 lines
88 KiB

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