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.

2990 lines
107 KiB

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