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.

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