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.

1805 lines
66 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years 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
1 year ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years ago
2 years ago
2 years 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
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
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
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
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
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
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <!--组件主体-->
  4. <div style="display: flex">
  5. <div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu">
  6. <div>
  7. <el-table :data="tableData" border
  8. :height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)"
  9. highlight-current-row @row-click="rowClick" size="small" row-key="id"
  10. @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick" ref="info" id="info"
  11. :row-class-name="handleRowClassName">
  12. <el-table-column type="selection" width="40" align="center"></el-table-column>
  13. <el-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type"
  14. :min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label"
  15. :prop="dragCol[index].prop" :sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true">
  16. <template slot-scope="scope" v-if="!(dragCol[index].type)">
  17. <div v-if="!dragCol[index].type">
  18. <div v-if="dragCol[index].prop == 'sn'">
  19. {{ scope.$index + 1 }}
  20. </div>
  21. <div v-else-if="dragCol[index].prop == 'completeFlag'"
  22. :style="`color: ${setPrStatusColor(scope.row.isAudit, scope.row.completeFlag)}`">
  23. {{ scope.row.isAudit == 'Y' ? "已审核" : dddw(dict.completeFlag, "id", scope.row.completeFlag,
  24. "displayName") }}
  25. </div>
  26. <div v-else-if="dragCol[index].prop == 'qztlType'">
  27. {{ dddw(dict.qztlType, "id", scope.row.qztlType, "displayName") }}
  28. </div>
  29. <div v-else-if="dragCol[index].prop == 'guidePrintTimes'">
  30. <i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0"
  31. style="font-size: 20px; color: green" />
  32. </div>
  33. <div v-else-if="dragCol[index].prop == 'isLock'">
  34. <i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" />
  35. </div>
  36. <div v-else-if="dragCol[index].prop == 'isVip'
  37. || dragCol[index].prop == 'isUpload'
  38. || dragCol[index].prop == 'qztlIsMain'
  39. || dragCol[index].prop == 'qztlIsCy'
  40. || dragCol[index].prop == 'qztlIsCw'
  41. || dragCol[index].prop == 'qztlIsGt'
  42. || dragCol[index].prop == 'qztlIsWh'
  43. || dragCol[index].prop == 'qztlIsFj'
  44. ">
  45. {{ scope.row[dragCol[index].prop] == "Y" ? "是" : "否" }}
  46. </div>
  47. <div v-else-if="dragCol[index].prop == 'customerOrgParentName'">
  48. {{ scope.row.customerOrgParentName
  49. ? scope.row.customerOrgParentName
  50. : scope.row.customerOrgName }}
  51. </div>
  52. <div v-else-if="dragCol[index].prop == 'sexId'">
  53. {{ dddw(dict.sex, "id", scope.row[dragCol[index].prop], "displayName") }}
  54. </div>
  55. <div v-else-if="dragCol[index].prop == 'groupPack'">
  56. <div
  57. v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  58. {{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  59. </div>
  60. <div
  61. v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  62. {{ dddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
  63. </div>
  64. </div>
  65. <div v-else-if="dragCol[index].prop == 'nationId'">
  66. {{ dddw(dict.nation, "id", scope.row[dragCol[index].prop], "displayName") }}
  67. </div>
  68. <div v-else-if="dragCol[index].prop == 'birthDate'">
  69. {{ scope.row[dragCol[index].prop] ? moment(scope.row[dragCol[index].prop]).format('yyyy-MM-DD') : ''
  70. }}
  71. </div>
  72. <div v-else-if="dragCol[index].prop == 'maritalStatusId'">
  73. {{ dddw(dict.maritalStatus, "id", scope.row[dragCol[index].prop], "displayName") }}
  74. </div>
  75. <div v-else-if="dragCol[index].prop == 'medicalTypeId'">
  76. {{ dddw(dict.medicalType, "id", scope.row[dragCol[index].prop], "displayName") }}
  77. </div>
  78. <div v-else-if="dragCol[index].prop == 'personnelTypeId'">
  79. {{ dddw(dict.personnelType, "id", scope.row[dragCol[index].prop], "displayName") }}
  80. </div>
  81. <div v-else-if="dragCol[index].prop == 'idNo'">
  82. {{ scope.row[dragCol[index].prop] }}&#031;
  83. </div>
  84. <div v-else-if="dragCol[index].prop == 'customerOrgName'">
  85. {{ scope.row[dragCol[index].prop] == scope.row['customerOrgParentName'] ?
  86. '' : scope.row[dragCol[index].prop] }}
  87. </div>
  88. <div v-else>
  89. {{ scope.row[dragCol[index].prop] }}
  90. </div>
  91. </div>
  92. </template>
  93. </el-table-column>
  94. <!--
  95. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  96. "interposeMeasure": null,
  97. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  98. "reportPrintTimes": 0,
  99. "isMedicalStart": "N",
  100. "medicalStartDate": "6/28/2023",
  101. "isRecoverGuide": "N",
  102. "summaryDate": "",
  103. "summaryDoctor": null,
  104. "isAudit": "N",
  105. "auditDoctor": null,
  106. "auditDate": "",
  107. "isNameHide": "N",
  108. "isPhoneFollow": "N",
  109. "thirdInfo": null,
  110. "guidePrintTimes": null,
  111. "remark": null,
  112. "medicalCenterId": "00000000-0000-0000-0000-000000000000",
  113. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  114. "lastModifierName": "",
  115. "lastModificationTime": null,
  116. "lastModifierId": null,
  117. "creatorId": null,
  118. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  119. -->
  120. </el-table>
  121. <div style="display: flex;justify-content:space-between;">
  122. <div></div>
  123. <div>
  124. <span style="font-size:12px;">{{ loadOpts.totalCount }} 条记录当前显示{{ tableData.length }}
  125. </span>
  126. </div>
  127. </div>
  128. </div>
  129. <!-- 组合项目 基本信息 -->
  130. <el-tabs v-model="tabChoosed" style="margin-top: -22px;">
  131. <!-- 组合项目 -->
  132. <el-tab-pane label="已选组合项目" name="1">
  133. <PatientRegisterAsbItem />
  134. </el-tab-pane>
  135. </el-tabs>
  136. </div>
  137. <div style="margin-left: 10px;">
  138. <div v-show="checkPagePriv(pagePriv.privs, '导入青藏数据')" class="listBtn">
  139. <el-button type="success" class="commonbutton" @click="btnImportOrgData">导入青藏数据</el-button>
  140. </div>
  141. <div v-show="checkPagePriv(pagePriv.privs, '人员登记')" class="listBtn">
  142. <el-button type="success" class="commonbutton" @click="btnAdd">人员登记</el-button>
  143. </div>
  144. <div v-show="checkPagePriv(pagePriv.privs, '批量正式登记')" class="listBtn">
  145. <el-button type="success" class="commonbutton" @click="btnAddBatch('1')">批量正式登记</el-button>
  146. </div>
  147. <div v-show="checkPagePriv(pagePriv.privs, '批量转预登记')" class="listBtn">
  148. <el-button type="success" class="commonbutton" @click="btnAddBatch('0')">批量转预登记</el-button>
  149. </div>
  150. <div v-show="checkPagePriv(pagePriv.privs, '编辑')" class="listBtn">
  151. <el-button type="primary" class="commonbutton" @click="btnEdit">编辑</el-button>
  152. </div>
  153. <div v-show="checkPagePriv(pagePriv.privs, '删除')" class="listBtn">
  154. <el-button type="danger" class="deleteButton" @click="btnDel">删除</el-button>
  155. </div>
  156. <!--
  157. <div class="listBtn">
  158. <el-button
  159. type=""
  160. class="btnClass"
  161. @click="openCamera"
  162. icon="el-icon-camera"
  163. >拍照</el-button
  164. >
  165. </div>
  166. <div class="listBtn">
  167. <el-button type="" class="btnClass commonbutton">健康档案</el-button>
  168. </div>
  169. -->
  170. <div v-show="checkPagePriv(pagePriv.privs, '批量调整分组')" class="listBtn">
  171. <el-button type="" class="commonbutton" @click="btnGroupBatch">批量调整分组</el-button>
  172. </div>
  173. <div v-show="checkPagePriv(pagePriv.privs, '批量调整项目')" class="listBtn">
  174. <el-button type="" class="commonbutton" @click="btnAsbBatch">批量调整项目</el-button>
  175. </div>
  176. <div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="listBtn">
  177. <el-button type="" class="commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
  178. </div>
  179. <div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="listBtn">
  180. <el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
  181. </div>
  182. <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn">
  183. <el-button type="" class="commonbutton" @click="printPromise()" style="font-size: 12px;">人员检验检查条码</el-button>
  184. </div>
  185. <div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn">
  186. <el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button>
  187. </div>
  188. <div class="listBtn">
  189. <el-button type="" class="commonbutton" @click="btnDragColDesign">设计列排序</el-button>
  190. </div>
  191. <!-- elProgress.display dialogWin.LocalConfig
  192. <div class="listBtn">
  193. <el-button type="" class="commonbutton" @click="dialogWin.LocalConfig = true">本地设置</el-button>
  194. </div>
  195. -->
  196. <!--
  197. <div class="listBtn">
  198. <el-button type="" class="btnClass commonbutton" @click="rowSelected(tableData)">选中</el-button>
  199. </div>
  200. -->
  201. </div>
  202. </div>
  203. <!--组件弹窗-->
  204. <div>
  205. <!-- 体检人员登记 :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'" -->
  206. <el-dialog :title="dataTransOpts.tableS.patient_register.id ? '体检人员--编辑' : '体检人员--新增'"
  207. :visible.sync="dialogWin.PatientRegisterEdit" :close-on-click-modal="false" fullscreen
  208. @close="close_dialogWin_PatientRegisterEdit">
  209. <!-- :formInitData="patientRegister.patientRegisterRd" -->
  210. <PatientRegisterEdit :isDoctor="'1'" :patientRegisterId="patientRegister.patientRegisterRd.id"
  211. :editTimes="editTimes" :refFuncSetData="refFuncSetData" />
  212. </el-dialog>
  213. <!-- 修改信息 -->
  214. <el-dialog :title="`修改信息--${upBaseInfo.label}`" :visible.sync="upBaseInfo.visble" width="400" :show-close="false"
  215. :append-to-body="true" :close-on-click-modal="false">
  216. <div>
  217. <div style="display: flex;margin-bottom: 20px;">
  218. <span style="padding: 5px 0 0 10px; width:100px;">{{ upBaseInfo.label }}</span>
  219. <el-input v-model="upBaseInfo.value" size="small"></el-input>
  220. </div>
  221. <div style="display: flex;justify-content: space-between;">
  222. <div></div>
  223. <div>
  224. <el-button class="commonbutton" @click="btnUpBaseInfo">提交</el-button>
  225. <el-button class="commonbutton" @click="close_dialogWin_upBaseInfo">关闭</el-button>
  226. </div>
  227. </div>
  228. </div>
  229. </el-dialog>
  230. <!-- 分诊排队 -->
  231. <el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
  232. :close-on-click-modal="false">
  233. <Queue :refParams="queueParams" />
  234. </el-dialog>
  235. <!-- 拍照 -->
  236. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
  237. :append-to-body="true" :close-on-click-modal="false">
  238. <Camera :id="patientRegister.patientRegisterId" />
  239. </el-dialog>
  240. <!-- 导入企业数据 -->
  241. <el-dialog title="导入企业数据" :visible.sync="dialogWin.ImportOrgData" width="800px" :append-to-body="true"
  242. :close-on-click-modal="false">
  243. <ImportOrgData />
  244. </el-dialog>
  245. <!-- 列排序 -->
  246. <el-dialog title="列排序" :visible.sync="dialogColSort" width="300px" :append-to-body="true"
  247. :close-on-click-modal="false">
  248. <el-table id="elTable_dragCol" :data="dragColDesign" row-key="prop" border height="600">
  249. <el-table-column type="index" label="序号" width="40" align="center">
  250. </el-table-column>
  251. <el-table-column label="列名" prop="label" min-width="120" align="center"></el-table-column>
  252. </el-table>
  253. <span slot="footer" class="dialog-footer">
  254. <el-button class="commonbutton" @click="dialogColSort = false">取消</el-button>
  255. <el-button class="commonbutton" @click="btnDragColDesignOk">确定</el-button>
  256. </span>
  257. </el-dialog>
  258. <!-- 批量调整分组 -->
  259. <el-dialog title="批量调整分组" :visible.sync="dialogWin.PatientRegisterEditGroupBatch" width="600px" height="800px"
  260. :append-to-body="true" :close-on-click-modal="false">
  261. <PatientRegisterEditGroupBatch :multipleSelection="multipleSelection" />
  262. </el-dialog>
  263. <!-- 批量调整项目 -->
  264. <el-dialog title="批量调整项目" :visible.sync="dialogWin.PatientRegisterEditItemBatch" width="610px" height="800px"
  265. :append-to-body="true" :close-on-click-modal="false">
  266. <PatientRegisterEditItemBatch :multipleSelection="multipleSelection" />
  267. </el-dialog>
  268. <!-- 批量调整检查项目医生 -->
  269. <el-dialog title="批量调整检查项目医生" :visible.sync="dialogWin.PatientRegisterEditDoctorBatch" width="610px"
  270. :append-to-body="true" :close-on-click-modal="false">
  271. <PatientRegisterEditDoctorBatch :multipleSelection="multipleSelection" />
  272. </el-dialog>
  273. <!-- 通用进度条 -->
  274. <el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false"
  275. :close-on-click-modal="false" :append-to-body="true">
  276. <ElProgressOCX />
  277. </el-dialog>
  278. <!--通用本地参数设置-->
  279. <el-dialog title="本地参数设置" :visible.sync="dialogWin.LocalConfig" :close-on-click-modal="false"
  280. :append-to-body="true" width="800px" height="600px">
  281. <LocalConfig />
  282. </el-dialog>
  283. </div>
  284. </div>
  285. </template>
  286. <script>
  287. import moment from "moment";
  288. import { mapState, mapActions } from "vuex";
  289. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  290. import Sortable from "sortablejs";
  291. import FileSaver from 'file-saver';
  292. import html2canvas from 'html2canvas';
  293. import {
  294. getPagePriv, checkPagePriv,
  295. dddw,
  296. objCopy,
  297. arrayReduce,
  298. arrayExistObj,
  299. deepCopy, setPrStatusColor
  300. } from "../../utlis/proFunc";
  301. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  302. import Camera from "../../components/patientRegister/Camera.vue";
  303. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  304. import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
  305. import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue";
  306. import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue";
  307. import PatientRegisterEditDoctorBatch from "./PatientRegisterEditDoctorBatch.vue";
  308. import ImportOrgData from "./ImportOrgData.vue";
  309. import LocalConfig from "../../components/common/LocalConfig.vue";
  310. import Queue from "../../components/queue/Queue.vue";
  311. export default {
  312. components: {
  313. PatientRegisterEdit,
  314. Camera,
  315. PatientRegisterAsbItem,
  316. PatientRegisterEditGroupBatch, // 批量调整分组
  317. PatientRegisterEditItemBatch, // 批量调整项目
  318. PatientRegisterEditDoctorBatch, // 批量调整检查项目医生
  319. ElProgressOCX,
  320. LocalConfig,
  321. ImportOrgData,
  322. Queue,
  323. },
  324. data() {
  325. return {
  326. pagePriv: {
  327. routeUrlorPageName: 'patientRegister', //当前页面归属路由或归属页面权限名称
  328. privs: [] // 页面权限
  329. },
  330. peisid: null,
  331. startPoint: -1, // 多选起点 -1 表示选择
  332. endPoint: -1, // 多选终点 -1 表示未选择
  333. tableData: [], //表格数据
  334. tableDataCurrentRow: {}, // 当前被选中的行
  335. multipleSelection: [], //选中的数据列表
  336. dialogCamera: false,
  337. tabChoosed: "1",
  338. formInitData: {}, //体检登记初始表单数据
  339. editTimes: 0,
  340. rClickRow: null, //右击的行
  341. rClickColumn: null, //右击的列(预留)
  342. dragColDesign: [], // 待调整的排序的序
  343. //拖动列
  344. dragCol: [
  345. { label: "序号", prop: "sn", minWidth: 40, align: "center" },
  346. { label: "体检进度", prop: "completeFlag", minWidth: 80, align: "center" },
  347. { label: "打印", prop: "guidePrintTimes", minWidth: 55, align: "center" },
  348. { label: "锁住", prop: "isLock", minWidth: 55, align: "center" },
  349. { label: "单位", prop: "customerOrgParentName", minWidth: 180, align: "center" },
  350. { label: "部门", prop: "customerOrgName", minWidth: 120, align: "center" },
  351. { label: "姓名", prop: "patientName", minWidth: 80, align: "center" },
  352. { label: "性别", prop: "sexId", minWidth: 55, align: "center" },
  353. { label: "年龄", prop: "age", minWidth: 55, align: "center" },
  354. { label: "条码号", prop: "patientRegisterNo", minWidth: 150, align: "center" },
  355. { label: "档案号", prop: "patientNo", minWidth: 100, align: "center" },
  356. { label: "体检次数", prop: "medicalTimes", minWidth: 80, align: "center" },
  357. { label: "分组/套餐", prop: "groupPack", minWidth: 150, align: "center" },
  358. { label: "民族", prop: "nationId", minWidth: 55, align: "center" },
  359. { label: "身份证", prop: "idNo", minWidth: 160, align: "center" },
  360. { label: "出生日期", prop: "birthDate", minWidth: 80, align: "center" },
  361. { label: "邮箱", prop: "email", minWidth: 150, align: "center" },
  362. { label: "手机", prop: "mobileTelephone", minWidth: 130, align: "center" },
  363. { label: "电话", prop: "telephone", minWidth: 130, align: "center" },
  364. { label: "地址", prop: "address", minWidth: 400, align: "" },
  365. { label: "体检卡号", prop: "medicalCardNo", minWidth: 80, align: "center" },
  366. { label: "工卡号", prop: "jobCardNo", minWidth: 80, align: "center" },
  367. { label: "婚姻状况", prop: "maritalStatusId", minWidth: 80, align: "center" },
  368. { label: "体检类别", prop: "medicalTypeId", minWidth: 80, align: "center" },
  369. { label: "人员类别", prop: "personnelTypeId", minWidth: 80, align: "center" },
  370. { label: "职务", prop: "jobPost", minWidth: 200, align: "center" },
  371. { label: "职称", prop: "jobTitle", minWidth: 80, align: "center" },
  372. { label: "介绍人", prop: "salesman", minWidth: 80, align: "center" },
  373. { label: "是否VIP", prop: "isVip", minWidth: 80, align: "center" },
  374. { label: "登记人", prop: "creatorName", minWidth: 80, align: "center" },
  375. { label: "登记日期", prop: "creationTime", minWidth: 140, align: "center" },
  376. { label: "体检日期", prop: "medicalStartDate", minWidth: 140, align: "center" },
  377. { label: "是否上传", prop: "isUpload", minWidth: 80, align: "center" },
  378. { label: "高原/健康", prop: "qztlType", minWidth: 90, align: "center" },
  379. { label: "行车", prop: "qztlIsMain", minWidth: 50, align: "center" },
  380. { label: "从业", prop: "qztlIsCy", minWidth: 50, align: "center" },
  381. { label: "普速", prop: "qztlIsCw", minWidth: 50, align: "center" },
  382. { label: "高铁", prop: "qztlIsGt", minWidth: 50, align: "center" },
  383. { label: "职害", prop: "qztlIsWh", minWidth: 50, align: "center" },
  384. { label: "复检", prop: "qztlIsFj", minWidth: 50, align: "center" },
  385. ],
  386. dialogColSort: false,
  387. dom: null, //用于滚动加载数据
  388. lazyLoading: false, //是否懒加载中
  389. loadOpts: {
  390. totalCount: 0,
  391. skipCount: 0,
  392. maxResultCount: 100,
  393. },
  394. loadOptsInit: {},
  395. upBaseInfo: {
  396. visble: false,
  397. label: "姓名",
  398. value: "",
  399. colName: "patientName",
  400. patientRegisterId: ""
  401. },
  402. queueParams: {}, // 分诊排队参数
  403. LocalConfig: {
  404. normal: {
  405. maxResultCount: 100, //分页时单页记录数
  406. },
  407. },
  408. LocalConfigInit: {},
  409. };
  410. },
  411. created() {
  412. //获取用户当前页面的权限
  413. let userPriv = window.sessionStorage.getItem('userPriv')
  414. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  415. this.LocalConfigInit = deepCopy(this.LocalConfig)
  416. let LocalConfig = window.localStorage.getItem("LocalConfig") || null
  417. // console.log('LocalConfig',LocalConfig)
  418. try {
  419. this.LocalConfig = Object.assign({}, deepCopy(this.LocalConfigInit), JSON.parse(LocalConfig) || {})
  420. } catch (error) {
  421. console.log('window.localStorage.getItem("LocalConfig")', error)
  422. }
  423. // console.log('this.LocalConfig',this.LocalConfig)
  424. this.loadOpts.maxResultCount = Number(this.LocalConfig.normal.maxResultCount || 100)
  425. this.loadOptsInit = Object.assign({}, this.loadOpts)
  426. },
  427. //挂载完成
  428. mounted() {
  429. this.quickAsb = this.dict.asbItemAll;
  430. this.peisid = window.sessionStorage.getItem('peisid');
  431. this.$nextTick(() => {
  432. this.scrollFull()
  433. })
  434. },
  435. computed: {
  436. ...mapState([
  437. "window",
  438. "dataTransOpts",
  439. "dialogWin",
  440. "dict",
  441. "elProgress",
  442. "patientRegister",
  443. "customerOrg",
  444. ]),
  445. },
  446. methods: {
  447. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  448. moment, dddw, deepCopy, checkPagePriv, setPrStatusColor,
  449. // 扩展定义表格行样式
  450. handleRowClassName({ row, rowIndex }) {
  451. // highLightBg 为 'selected'的高亮
  452. //// console.log(rowIndex, row)
  453. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  454. if (row.choosed) {
  455. return "current-row";
  456. } else {
  457. return "";
  458. }
  459. },
  460. // 行选择
  461. rowSelected(rows) {
  462. rows.forEach((e) => {
  463. this.$refs["info"].toggleRowSelection(e, true);
  464. });
  465. },
  466. refFuncSetData(item, v) {
  467. setData(this, item, v)
  468. },
  469. // 打印指引单(isPreview)
  470. async guidePrint(ReportCode, isPreview) {
  471. if (!this.$peisAPI) {
  472. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" });
  473. return;
  474. }
  475. let token = window.sessionStorage.getItem("token");
  476. let user = window.sessionStorage.getItem("user");
  477. let toOutShell = {
  478. ReportCode,
  479. token,
  480. isBuildImage: 'N',
  481. IsUploadPdf: 'N',
  482. preViewCanPrint: "N",
  483. Parameters: [
  484. { Name: "printer", Value: user },
  485. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  486. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
  487. ],
  488. };
  489. let lfind = -1;
  490. //选中(取消勾选)start -------------------------
  491. // this.multipleSelection = []
  492. // this.tableData.forEach(e => {
  493. // if (e.choosed) {
  494. // this.multipleSelection.push(deepCopy(e))
  495. // }
  496. // })
  497. //选中(取消勾选) end  -------------------------
  498. if (this.multipleSelection.length < 1) {
  499. this.$message.info({ showClose: true, message: "请勾选要打印指引单的人员记录!" });
  500. return;
  501. }
  502. if (isPreview) {
  503. /*
  504. //this.multipleSelection.forEach((item,index) =>{
  505. postapi(
  506. `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`
  507. )
  508. .then((res) => {
  509. if (res.code != -1) {
  510. toOutShell.ReportTable = res.data;
  511. // console.log(
  512. "JSON.stringify(toOutShell)",
  513. JSON.stringify(toOutShell)
  514. );
  515. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  516. }
  517. })
  518. .then(res => {
  519. // console.log('this.$peisAPI.printPre', res)
  520. if (JSON.parse(res).code < 0) {
  521. this.$message.warning(JSON.parse(res).message);
  522. }
  523. })
  524. .catch((err) => {
  525. // console.log('打印指引单', err)
  526. this.$message.warning({ showClose: true, message: err });
  527. });
  528. */
  529. toOutShell.BusinessCode = this.multipleSelection[0].id
  530. if (this.multipleSelection[0].completeFlag == '0') {
  531. this.$message.warning({ showClose: true, message: '预登记人员,不可执行此操作!' })
  532. return
  533. }
  534. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  535. .then(res => {
  536. if (JSON.parse(res).code < 0) {
  537. this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  538. }
  539. })
  540. .catch((err) => {
  541. // console.log('打印指引单', err)
  542. this.$message.warning({ showClose: true, message: `${err}` });
  543. });
  544. } else {
  545. this.elProgress.display = true;
  546. this.elProgress.percentage = 0;
  547. for (let i = 0; i < this.multipleSelection.length; i++) {
  548. try {
  549. let patientregisterId = this.multipleSelection[i].id
  550. if (this.multipleSelection[i].completeFlag == '0') {
  551. this.$message.warning({ showClose: true, message: `${this.multipleSelection[i].patientName} 为预登记人员,不可打印指引单` });
  552. continue
  553. }
  554. toOutShell.BusinessCode = patientregisterId
  555. let resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell));
  556. if (JSON.parse(resPeisAPI).code < 0) continue
  557. let resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [patientregisterId]);
  558. if (resPrintTimes.code == -1) continue
  559. lfind = arrayExistObj(this.tableData, "id", patientregisterId);
  560. if (lfind > -1) {
  561. if (this.tableData[lfind].guidePrintTimes) {
  562. this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1;
  563. } else {
  564. this.tableData[lfind].guidePrintTimes = 1;
  565. }
  566. }
  567. } catch (error) {
  568. // console.log('打印指引单', error)
  569. this.$message.warning({ showClose: true, message: `${error}` });
  570. }
  571. this.elProgress.percentage = Math.floor(
  572. ((i + 1) * 100) / this.multipleSelection.length
  573. );
  574. }
  575. this.elProgress.display = false;
  576. }
  577. },
  578. // 指引单新打印方式,promise
  579. guidePrintPromise(ReportCode, isPreview, row) {
  580. return new Promise((resolve, reject) => {
  581. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!")
  582. let token = window.sessionStorage.getItem("token");
  583. let user = window.sessionStorage.getItem("user");
  584. let toOutShell = {
  585. ReportCode,
  586. token,
  587. isBuildImage: 'N',
  588. IsUploadPdf: 'N',
  589. preViewCanPrint: "N",
  590. Parameters: [
  591. { Name: "printer", Value: user },
  592. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  593. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
  594. ],
  595. };
  596. if (!row.completeFlag || row.completeFlag == '0') reject('预登记人员,不可执行此操作!')
  597. toOutShell.BusinessCode = row.id
  598. console.log(JSON.stringify(toOutShell))
  599. if (isPreview) {
  600. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  601. .then(res => {
  602. let lres = JSON.parse(res)
  603. if (lres.code > -1) {
  604. resolve(lres)
  605. } else {
  606. reject(lres.message)
  607. }
  608. })
  609. .catch((err) => {
  610. reject(err)
  611. });
  612. } else {
  613. this.$peisAPI.print(JSON.stringify(toOutShell))
  614. .then(res => {
  615. let lres = JSON.parse(res)
  616. if (lres.code > -1) {
  617. return postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [row.id]);
  618. } else {
  619. reject(lres.message)
  620. }
  621. })
  622. .then(res => {
  623. if (res && res.code > -1) {
  624. let lfind = arrayExistObj(this.tableData, "id", row.id);
  625. if (lfind > -1) {
  626. if (this.tableData[lfind].guidePrintTimes) {
  627. this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1;
  628. } else {
  629. this.tableData[lfind].guidePrintTimes = 1;
  630. }
  631. }
  632. }
  633. resolve(res)
  634. })
  635. .catch((err) => {
  636. reject(err)
  637. });
  638. }
  639. })
  640. },
  641. printGuideLisPacs(row) {
  642. return new Promise((resolve, reject) => {
  643. this.guidePrintPromise("0008", false, row)
  644. .then(res => {
  645. return this.lisPrint(row, "0002", false)
  646. })
  647. .then(res => {
  648. return this.pacsPrint(row, "0004", false)
  649. })
  650. .then(res => {
  651. resolve(res)
  652. })
  653. .catch(err => {
  654. reject(err)
  655. })
  656. })
  657. },
  658. async printPromise() {
  659. if (this.multipleSelection.length < 1) {
  660. this.$message.info({ showClose: true, message: "请勾选要打印人员检验检查条码的记录!" });
  661. return;
  662. }
  663. this.elProgress.display = true;
  664. this.elProgress.percentage = 0;
  665. for (let i = 0; i < this.multipleSelection.length; i++) {
  666. let row = this.multipleSelection[i]
  667. try {
  668. await this.printGuideLisPacs(row)
  669. } catch (error) {
  670. console.log('printPromise', error)
  671. }
  672. this.elProgress.percentage = Math.floor(
  673. ((i + 1) * 100) / this.multipleSelection.length
  674. );
  675. }
  676. this.elProgress.display = false;
  677. },
  678. handleSelectionChange(rows) {
  679. //this.multipleSelection = rows;
  680. //// console.log('this.multipleSelection',this.multipleSelection)
  681. // rows.forEach((item) => {
  682. // item.highLightBg = "selected";
  683. // });
  684. // // 取消全选
  685. // if (!rows.length) {
  686. // this.tableData.forEach((item) => {
  687. // item.highLightBg = "";
  688. // });
  689. // }
  690. this.multipleSelection = rows;
  691. },
  692. //设置新增/编辑的form数据
  693. setForm(formData) {
  694. this.patientRegister.patientRegisterRd = deepCopy(formData)
  695. if (!this.patientRegister.patientRegisterRd.id) {
  696. this.patientRegister.patientRegisterRd.customerOrgId = this.patientRegister.query.customerOrgId
  697. }
  698. },
  699. //点击体检次数行
  700. rowClick(row) {
  701. // 按住了shift键
  702. // if (this.window.shift) {
  703. // //清除所有选择
  704. // this.tableData.forEach((e, index) => {
  705. // e.choosed = false;
  706. // e.index = index;
  707. // });
  708. // if (this.startPoint == -1) {
  709. // this.tableData[row.index].choosed = true;
  710. // this.startPoint = row.index;
  711. // } else {
  712. // if (this.startPoint > row.index) {
  713. // for (let i = row.index; i <= this.startPoint; i++) {
  714. // this.tableData[i].choosed = true;
  715. // }
  716. // } else if (this.startPoint <= row.index) {
  717. // for (let i = this.startPoint; i <= row.index; i++) {
  718. // this.tableData[i].choosed = true;
  719. // }
  720. // }
  721. // }
  722. // } else if (this.window.ctrl) { // 按住了ctrl 键
  723. // this.tableData[row.index].choosed = true;
  724. // if (this.startPoint == -1) {
  725. // this.startPoint = row.index;
  726. // }
  727. // } else {
  728. // // 未按住了ctrl 、shift 键
  729. // //清除所有选择
  730. // // console.log("清除所有选择");
  731. // this.tableData.forEach((e, index) => {
  732. // e.choosed = false;
  733. // e.index = index;
  734. // });
  735. // // console.log(this.tableData, row.index);
  736. // // console.log(this.tableData[row.index].choosed);
  737. // this.tableData[row.index].choosed = true;
  738. // this.startPoint = row.index;
  739. // }
  740. //选中了多个点编辑时,排序最前的作为当前选中的
  741. // console.log('row.index <= this.startPoint', row.index, this.startPoint)
  742. // let lfind = -1
  743. // for (let i = 0; i < this.tableData.length; i++) {
  744. // if (this.tableData[i].choosed) {
  745. // lfind = i
  746. // break
  747. // }
  748. // }
  749. // if (lfind > -1) {
  750. // 弹出编辑框,只有在编辑框显示时,才去触发获取数据
  751. this.dataTransOpts.tableS.patient_register = deepCopy(row)
  752. this.tableDataCurrentRow = deepCopy(row)
  753. this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新
  754. // }
  755. },
  756. // 导入企业(青藏公司)数据
  757. btnImportOrgData() {
  758. //
  759. this.dataTransOpts.plus.ImportOrgData++
  760. this.dialogWin.ImportOrgData = true
  761. },
  762. //体检次数 相关操作
  763. btnAdd() {
  764. if (!this.peisid || this.peisid == 'null') {
  765. this.$message.warning({ showClose: true, message: "该用户未选归属体检中心,不能执行此操作!" });
  766. return
  767. }
  768. let customerOrgId = this.patientRegister.query.customerOrgId;
  769. if (!customerOrgId) {
  770. this.$message.warning({ showClose: true, message: "请选择单位或个人" });
  771. return;
  772. }
  773. // this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
  774. // this.setForm(this.patientRegister.patientRegisterRdInit)
  775. // this.patientRegister.patientRegisterAbs = [];
  776. // this.patientRegister.patientRegisterRd.id = ''
  777. // this.dialogWin.PatientRegisterEdit = true;
  778. // this.editTimes++; //触发表单窗口,数据更新
  779. // this.getPatientRegisterAbs();
  780. this.dataTransOpts.tableS.patient_register.id = ''
  781. this.dialogWin.PatientRegisterEdit = true;
  782. this.dataTransOpts.plus.clearPatientRegisterQuery++ //触发清空人员登记界面的查询条件
  783. setTimeout(() => {
  784. this.dataTransOpts.refresh.patient_register.S++ //触发人员信息刷新
  785. }, 10);
  786. },
  787. //批量正式登记
  788. btnAddBatch(completeFlag) {
  789. let patientRegisterIds = []
  790. //取消勾选,换成选择的方式 start
  791. // this.multipleSelection = [];
  792. // this.tableData.forEach((e) => {
  793. // if (e.choosed && e.completeFlag == '0') {
  794. // this.multipleSelection.push(e);
  795. // patientRegisterIds.push(e.id)
  796. // }
  797. // });
  798. //取消勾选,换成选择的方式 end
  799. if (this.multipleSelection.length < 1) {
  800. this.$message.info({ showClose: true, message: "请勾选要操作的记录!" });
  801. return;
  802. }
  803. this.multipleSelection.forEach(e => {
  804. switch (completeFlag) {
  805. case '0':
  806. if (e.completeFlag == '1') patientRegisterIds.push(e.id)
  807. break;
  808. case '1':
  809. if (e.completeFlag == '0') patientRegisterIds.push(e.id)
  810. break;
  811. }
  812. });
  813. if (patientRegisterIds.length == 0) {
  814. this.$message.info({ showClose: true, message: "没有可操作的数据!" });
  815. return;
  816. }
  817. let body = { completeFlag, patientRegisterIds }
  818. postapi('/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate', body)
  819. .then(res => {
  820. if (res.code != -1) {
  821. // console.log('操作成功!')
  822. patientRegisterIds.forEach(e => {
  823. let lfind = arrayExistObj(this.tableData, 'id', e)
  824. if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag
  825. });
  826. }
  827. })
  828. .catch(err => {
  829. this.$message.error({ showClose: true, message: `操作失败 ${err}` });
  830. });
  831. },
  832. // 单个编辑
  833. btnEdit() {
  834. // if (!this.patientRegister.patientRegisterRd.id) {
  835. if (!this.dataTransOpts.tableS.patient_register.id) {
  836. this.$message.warning({ showClose: true, message: "请选择要操作的记录" });
  837. return;
  838. }
  839. //// console.log(this.patientRegister.patientRegisterRd,this.tableData)
  840. // 触发数据刷新
  841. this.dataTransOpts.refresh.patient_register.S++ //触发人员信息刷新(会同时刷新组合项目)
  842. this.dataTransOpts.plus.clearPatientRegisterQuery++ //触发清空人员登记界面的查询条件
  843. this.dialogWin.PatientRegisterEdit = true;
  844. },
  845. //新增或编辑后选中记录
  846. async close_dialogWin_PatientRegisterEdit() {
  847. // 如果 dataTransOpts.tableS.patient_register.id 为空(未增加),则不做处理
  848. let id = this.dataTransOpts.tableS.patient_register.id
  849. if (!id) {
  850. id = this.tableDataCurrentRow.id
  851. }
  852. if (!id) return
  853. this.dataTransOpts.tableS.patient_register.id = id
  854. let res = await postapi('/api/app/patientregister/getlistinfilter', { patientRegisterNo: this.dataTransOpts.tableS.patient_register.patientRegisterNo })
  855. if (res.code != 1) return
  856. let currentRow = res.data.items[0]
  857. // this.tableData.forEach(e => {
  858. // e.choosed = false
  859. // });
  860. let lfind = arrayExistObj(this.tableData, 'id', this.dataTransOpts.tableS.patient_register.id)
  861. if (lfind > -1) {
  862. objCopy(currentRow, this.tableData[lfind])
  863. } else {
  864. lfind = this.tableData.length
  865. currentRow.index = lfind
  866. currentRow.choosed = true
  867. this.tableData.push(currentRow)
  868. }
  869. // 刷新 register_check_asbitem 表记录
  870. if (lfind > -1) {
  871. this.dataTransOpts.refresh.register_check_asbitem.M++
  872. }
  873. },
  874. //拍照
  875. openCamera() {
  876. if (!this.patientRegister.patientRegisterId) {
  877. this.$message.warning({ showClose: true, message: "请选择要操作的记录" });
  878. return;
  879. }
  880. this.patientRegister.cameraVisble = true;
  881. },
  882. //删除(可批量删除)
  883. // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
  884. btnDel() {
  885. //选中(取消勾选)start -------------------------
  886. // this.multipleSelection = []
  887. // this.tableData.forEach(e => {
  888. // if (e.choosed) {
  889. // this.multipleSelection.push(deepCopy(e))
  890. // }
  891. // })
  892. //选中(取消勾选) end -------------------------
  893. if (this.multipleSelection.length < 1) {
  894. this.$message.warning({ showClose: true, message: "请先勾选要操作的记录" });
  895. return;
  896. }
  897. let patientRegisterIds = [];
  898. for (let i = 0; i < this.multipleSelection.length; i++) {
  899. patientRegisterIds.push(this.multipleSelection[i]["id"]);
  900. }
  901. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  902. confirmButtonText: "是",
  903. cancelButtonText: "否",
  904. type: "warning",
  905. })
  906. .then(() => {
  907. //// console.log('{patientRegisterIds}',{patientRegisterIds})
  908. return postapi('/api/app/patient-register/delete-many', {
  909. patientRegisterIds,
  910. });
  911. })
  912. .then((res) => {
  913. if (res.code != -1) {
  914. // console.log("操作成功");
  915. this.dataTransOpts.tableS.patient_register.id = ''
  916. setTimeout(() => {
  917. this.dataTransOpts.refresh.register_check_asbitem.M++
  918. }, 10);
  919. arrayReduce(this.tableData, this.multipleSelection, 'id=id') //清除列表记录
  920. // this.setForm(this.patientRegister.patientRegisterRdInit)
  921. // this.getPatientRegisterAbs();
  922. }
  923. })
  924. .catch((err) => {
  925. if (err == "cancel") {
  926. this.$message.info({ showClose: true, message: "已取消操作" });
  927. }
  928. });
  929. },
  930. //查询
  931. async Query() {
  932. // 查询时,清掉明细数据 (滚动时不清)
  933. this.dataTransOpts.tableS.patient_register.id = ''
  934. this.tableDataCurrentRow = {} // 清除选择
  935. this.tableData = []
  936. setTimeout(() => {
  937. this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新
  938. }, 10);
  939. this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit)
  940. await this.getPrList()
  941. },
  942. //数据量多时,滚动加载
  943. async load() {
  944. this.loadOpts.skipCount++
  945. await this.getPrList()
  946. },
  947. // 获取列表数据
  948. async getPrList() {
  949. if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return
  950. // console.log('getPrList', this.loadOpts)
  951. let body = {
  952. skipCount: this.loadOpts.skipCount,
  953. maxResultCount: this.loadOpts.maxResultCount
  954. };
  955. // console.log(`this.patientRegister.query`, this.patientRegister.query);
  956. if (this.patientRegister.query.customerOrgFlag) {
  957. // if (this.patientRegister.query.CustomerOrgParentId) {
  958. // body.customerOrgId = this.patientRegister.query.CustomerOrgParentId;
  959. // } else {
  960. // if (this.patientRegister.query.customerOrgId)
  961. // body.customerOrgId = this.patientRegister.query.customerOrgId;
  962. // }
  963. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId;
  964. if (this.patientRegister.query.customerOrgId
  965. && this.patientRegister.query.customerOrgId != this.dict.personOrgId
  966. && this.patientRegister.query.customerOrgRegister.id) {
  967. body.customerOrgRegisterId = this.patientRegister.query.customerOrgRegister.id
  968. body.customerOrgGroupIds = this.patientRegister.query.customerOrgGroupIds
  969. }
  970. }
  971. if (this.patientRegister.query.sex)
  972. body.sexId = this.patientRegister.query.sex;
  973. if (this.patientRegister.query.patientName)
  974. body.patientName = this.patientRegister.query.patientName;
  975. if (this.patientRegister.query.medicalTypeIds && this.patientRegister.query.medicalTypeIds.length > 0)
  976. body.medicalTypeIds = this.patientRegister.query.medicalTypeIds;
  977. if (this.patientRegister.query.completeFlags && this.patientRegister.query.completeFlags.length > 0)
  978. body.completeFlags = this.patientRegister.query.completeFlags;
  979. //StartDate EndDate
  980. if (
  981. this.patientRegister.query.startDate &&
  982. this.patientRegister.query.endDate
  983. ) {
  984. body.dateType = this.patientRegister.query.dateType
  985. body.startDate = moment(this.patientRegister.query.startDate).format(
  986. "yyyy-MM-DD"
  987. );
  988. body.endDate = moment(this.patientRegister.query.endDate).format(
  989. "yyyy-MM-DD"
  990. );
  991. if (body.startDate > body.endDate) {
  992. this.$message.warning({ showClose: true, message: "起始日期不能大于截止日期,数据校验不通过!" });
  993. return;
  994. }
  995. }
  996. if (this.patientRegister.query.phone)
  997. body.phone = this.patientRegister.query.phone;
  998. if (this.patientRegister.query.idCardNo) {
  999. body.idNo = this.patientRegister.query.idCardNo;
  1000. try {
  1001. let sysParmId = "patient_register_query_idno"
  1002. let sysParam = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId })
  1003. // console.log('sysParam', sysParam)
  1004. if (sysParam.data != 'N') {
  1005. body = {
  1006. idNo: this.patientRegister.query.idCardNo,
  1007. skipCount: this.loadOpts.skipCount,
  1008. maxResultCount: this.loadOpts.maxResultCount
  1009. };
  1010. }
  1011. } catch (error) {
  1012. console.log(error)
  1013. }
  1014. }
  1015. if (this.patientRegister.query.patientNo)
  1016. body = {
  1017. patientNo: this.patientRegister.query.patientNo,
  1018. skipCount: this.loadOpts.skipCount,
  1019. maxResultCount: this.loadOpts.maxResultCount
  1020. };
  1021. if (this.patientRegister.query.patientRegisterNo)
  1022. body = {
  1023. patientRegisterNo: this.patientRegister.query.patientRegisterNo,
  1024. skipCount: this.loadOpts.skipCount,
  1025. maxResultCount: this.loadOpts.maxResultCount
  1026. };
  1027. // console.log("/api/app/patientregister/getlistinfilter", body);
  1028. postapi("/api/app/patientregister/getlistinfilter", body)
  1029. .then(res => {
  1030. if (res.code > -1) {
  1031. // 刷新最大记录数
  1032. this.loadOpts.totalCount = res.data.totalCount
  1033. let curLoad = res.data.items
  1034. // let oldCount = 0
  1035. // 处理分组/套餐 排序混乱的问题
  1036. curLoad.forEach(e => {
  1037. if (e.customerOrgId == this.dict.personOrgId) {
  1038. e.groupPack = e.medicalPackageId
  1039. } else {
  1040. e.groupPack = e.customerOrgGroupId
  1041. }
  1042. });
  1043. if (body.skipCount == 0) { //查询
  1044. this.tableData = [];
  1045. }
  1046. this.tableData = this.tableData.concat(curLoad)
  1047. // else {
  1048. // // 懒加载 ,原数据集不用清空
  1049. // oldCount = this.tableData.length
  1050. // }
  1051. // curLoad.forEach((e, index) => {
  1052. // this.tableData.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e))
  1053. // })
  1054. //如果 有选中 记录,则刷新其对应的组合项目
  1055. if (this.dataTransOpts.tableS.patient_register.id) {
  1056. this.dataTransOpts.refresh.register_check_asbitem.M++
  1057. }
  1058. }
  1059. })
  1060. },
  1061. //滚动加载数据
  1062. scrollFull() {
  1063. this.dom = this.$refs['info'].bodyWrapper
  1064. // console.log('this.dom', this.dom)
  1065. this.dom.addEventListener('scroll', async () => {
  1066. // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
  1067. if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
  1068. // 获取到的不是全部数据 当滚动到底部
  1069. // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
  1070. if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
  1071. this.lazyLoading = false
  1072. } else {
  1073. this.lazyLoading = true
  1074. await this.load()
  1075. this.lazyLoading = false
  1076. // this.dom.scrollTop = this.dom.scrollTop - 100
  1077. }
  1078. }
  1079. })
  1080. },
  1081. close_dialogWin_upBaseInfo() {
  1082. this.upBaseInfo.visble = false
  1083. this.close_dialogWin_PatientRegisterEdit()
  1084. },
  1085. btnUpBaseInfo() {
  1086. let body = {
  1087. patientRegisterId: this.upBaseInfo.patientRegisterId,
  1088. // "patientName": "string",
  1089. // "mobileTelephone": "string",
  1090. // "idNo": "string"
  1091. }
  1092. body[this.upBaseInfo.colName] = this.upBaseInfo.value
  1093. postapi('/api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId', body).then(res => {
  1094. if (res.code > -1) {
  1095. this.close_dialogWin_upBaseInfo()
  1096. }
  1097. })
  1098. },
  1099. // 修改基本信息
  1100. fnUpBaseInfo(row, baseInfoType) {
  1101. this.dataTransOpts.tableS.patient_register.id = row.id
  1102. this.upBaseInfo.visble = true
  1103. this.upBaseInfo.patientRegisterId = row.id
  1104. this.upBaseInfo.colName = baseInfoType
  1105. switch (baseInfoType) {
  1106. case "idNo":
  1107. this.upBaseInfo.label = "新身份证号"
  1108. break;
  1109. case "mobileTelephone":
  1110. this.upBaseInfo.label = "新手机号"
  1111. break;
  1112. default:
  1113. this.upBaseInfo.label = "新姓名"
  1114. break;
  1115. }
  1116. this.upBaseInfo.value = row[baseInfoType]
  1117. },
  1118. // 分诊排队
  1119. fnQueue(row) {
  1120. this.queueParams = {
  1121. patientRegisterId: row.id
  1122. }
  1123. this.dialogWin.queue = true
  1124. this.dataTransOpts.plus.queue++
  1125. },
  1126. //右击菜单
  1127. onCellRightClick(row, column) {
  1128. this.rClickRow = { ...row }; //右击的行记录
  1129. this.rClickColumn = { ...column }; //右击的列(预留)
  1130. // console.log(row, column.property);
  1131. },
  1132. onContextmenu(event) {
  1133. //// console.log('onContextmenu',event);
  1134. if (!this.rClickRow) return false;
  1135. let row = { ...this.rClickRow };
  1136. let items = [] //菜单项
  1137. // items.push({
  1138. // label: "一级菜单",
  1139. // children: [
  1140. // { label: "修改姓名", onClick: () => { this.fnUpBaseInfo(row, 'patientName'); } }
  1141. // ]
  1142. // })
  1143. if (checkPagePriv(this.pagePriv.privs, '修改姓名') && row.completeFlag != '0')
  1144. items.push({
  1145. label: "修改姓名",
  1146. onClick: () => {
  1147. this.fnUpBaseInfo(row, 'patientName');
  1148. },
  1149. })
  1150. if (checkPagePriv(this.pagePriv.privs, '修改手机号') && row.completeFlag != '0')
  1151. items.push({
  1152. label: "修改手机号",
  1153. onClick: () => {
  1154. this.fnUpBaseInfo(row, 'mobileTelephone');
  1155. },
  1156. })
  1157. if (checkPagePriv(this.pagePriv.privs, '修改身份证号') && row.completeFlag != '0')
  1158. items.push({
  1159. label: "修改身份证号",
  1160. onClick: () => {
  1161. this.fnUpBaseInfo(row, 'idNo');
  1162. },
  1163. })
  1164. if (checkPagePriv(this.pagePriv.privs, '分诊排队') && row.completeFlag != '0')
  1165. items.push({
  1166. label: "分诊排队",
  1167. onClick: () => {
  1168. this.fnQueue(row);
  1169. },
  1170. })
  1171. if (checkPagePriv(this.pagePriv.privs, '发送检验申请') && row.completeFlag != '0')
  1172. items.push({
  1173. label: "发送检验申请",
  1174. onClick: () => {
  1175. this.lisRequest(row);
  1176. },
  1177. })
  1178. // 预览条码
  1179. let subMenuPre = []
  1180. if (checkPagePriv(this.pagePriv.privs, '预览人员条码') && row.completeFlag != '0')
  1181. subMenuPre.push({
  1182. label: "预览人员条码",
  1183. onClick: () => {
  1184. this.guidePrintPromise("0008", true, row);
  1185. },
  1186. })
  1187. if (checkPagePriv(this.pagePriv.privs, '预览检验条码') && row.completeFlag != '0')
  1188. subMenuPre.push({
  1189. label: "预览检验条码",
  1190. onClick: () => {
  1191. this.lisPrint(row, "0002", true);
  1192. },
  1193. })
  1194. if (checkPagePriv(this.pagePriv.privs, '预览Pacs条码') && row.completeFlag != '0')
  1195. subMenuPre.push({
  1196. label: "预览Pacs条码",
  1197. onClick: () => {
  1198. // console.log('预览Pacs条码 row',row)
  1199. this.pacsPrint(row, "0004", true);
  1200. },
  1201. })
  1202. if (subMenuPre.length > 0) items.push({ label: "预览条码", children: subMenuPre })
  1203. let subMenuPrint = []
  1204. if (checkPagePriv(this.pagePriv.privs, '打印人员条码') && row.completeFlag != '0')
  1205. subMenuPrint.push({
  1206. label: "打印人员条码",
  1207. onClick: () => {
  1208. this.guidePrintPromise("0008", false, row);
  1209. },
  1210. })
  1211. if (checkPagePriv(this.pagePriv.privs, '打印检验条码') && row.completeFlag != '0')
  1212. subMenuPrint.push({
  1213. label: "打印检验条码",
  1214. onClick: () => {
  1215. this.lisPrint(row, "0002", false);
  1216. },
  1217. })
  1218. if (checkPagePriv(this.pagePriv.privs, '打印Pacs条码') && row.completeFlag != '0')
  1219. subMenuPrint.push({
  1220. label: "打印Pacs条码",
  1221. onClick: () => {
  1222. this.pacsPrint(row, "0004", false);
  1223. },
  1224. })
  1225. if (subMenuPrint.length > 0) items.push({ label: "打印条码", children: subMenuPrint })
  1226. let subMenuImp = []
  1227. if (checkPagePriv(this.pagePriv.privs, '导入检查结果') && row.completeFlag != '0')
  1228. subMenuImp.push({
  1229. label: "导入检查结果",
  1230. onClick: () => {
  1231. this.importResult('pacs', row);
  1232. },
  1233. })
  1234. if (checkPagePriv(this.pagePriv.privs, '导入检验结果') && row.completeFlag != '0')
  1235. subMenuImp.push({
  1236. label: "导入检验结果",
  1237. onClick: () => {
  1238. this.importResult('lis', row);
  1239. },
  1240. })
  1241. if (subMenuImp.length > 0) items.push({ label: "导入结果", children: subMenuImp })
  1242. if (checkPagePriv(this.pagePriv.privs, '批量更新组合项目明细') && this.multipleSelection.length > 0)
  1243. items.push({
  1244. label: "批量更新组合项目明细",
  1245. onClick: () => {
  1246. this.btnItemBatch();
  1247. },
  1248. })
  1249. if (checkPagePriv(this.pagePriv.privs, '调整检查项目医生') && this.multipleSelection.length > 0)
  1250. items.push({
  1251. label: "调整检查项目医生",
  1252. onClick: () => {
  1253. this.dataTransOpts.plus.PatientRegisterEditDoctorBatch++ //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  1254. this.dialogWin.PatientRegisterEditDoctorBatch = true;
  1255. },
  1256. })
  1257. items.push({ label: "----------------", })
  1258. this.$contextmenu({
  1259. items,
  1260. event,
  1261. //x: event.clientX,
  1262. //y: event.clientY,
  1263. customClass: "custom-class",
  1264. zIndex: 3,
  1265. minWidth: 80,
  1266. });
  1267. this.rClickRow = null;
  1268. return false;
  1269. },
  1270. //批量更新分组按钮
  1271. btnGroupBatch() {
  1272. let customerOrgId = this.patientRegister.query.customerOrgId;
  1273. if (!customerOrgId) {
  1274. this.$message.warning({ showClose: true, message: "请选择单位" });
  1275. return;
  1276. }
  1277. //取消勾选,换成选择的方式 start
  1278. // this.multipleSelection = [];
  1279. // this.tableData.forEach((e) => {
  1280. // if (e.choosed) this.multipleSelection.push(e);
  1281. // });
  1282. //取消勾选,换成选择的方式 end
  1283. if (this.multipleSelection.length < 1) {
  1284. this.$message.info({ showClose: true, message: "请选择要操作的记录!" });
  1285. return;
  1286. }
  1287. this.dataTransOpts.plus.PatientRegisterEditGroupBatch++
  1288. this.dialogWin.PatientRegisterEditGroupBatch = true;
  1289. },
  1290. //批量更新组合项目
  1291. btnAsbBatch() {
  1292. let customerOrgId = this.patientRegister.query.customerOrgId;
  1293. if (!customerOrgId) {
  1294. this.$message.warning({ showClose: true, message: "请选择单位" });
  1295. return;
  1296. }
  1297. //取消勾选,换成选择的方式 start
  1298. // this.multipleSelection = [];
  1299. // this.tableData.forEach((e) => {
  1300. // if (e.choosed) this.multipleSelection.push(e);
  1301. // });
  1302. //取消勾选,换成选择的方式 end
  1303. if (this.multipleSelection.length < 1) {
  1304. this.$message.warning({ showClose: true, message: "请选择要操作的记录" })
  1305. return
  1306. }
  1307. this.dataTransOpts.plus.PatientRegisterEditItemBatch++ //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  1308. this.dialogWin.PatientRegisterEditItemBatch = true;
  1309. },
  1310. //批量更新组合项目
  1311. async btnItemBatch() {
  1312. if (this.multipleSelection.length < 1) {
  1313. this.$message.warning({ showClose: true, message: "请选择要操作的记录" })
  1314. return
  1315. }
  1316. this.elProgress.display = true;
  1317. this.elProgress.percentage = 0;
  1318. for (let i = 0; i < this.multipleSelection.length; i++) {
  1319. let patientRegisterId = this.multipleSelection[i].id
  1320. try {
  1321. await postapi('/api/app/RegisterCheckItem/SyncRegisterCheckItem', { patientRegisterId })
  1322. } catch (error) {
  1323. console.log('printPromise', error)
  1324. }
  1325. this.elProgress.percentage = Math.floor(
  1326. ((i + 1) * 100) / this.multipleSelection.length
  1327. );
  1328. }
  1329. this.elProgress.display = false;
  1330. },
  1331. //检验申请
  1332. async lisRequest(row) {
  1333. let isPrintLisRequest = false;
  1334. let res = null;
  1335. if (row.completeFlag == '0') {
  1336. this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
  1337. return;
  1338. }
  1339. try {
  1340. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${row.id}`);
  1341. // console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res);
  1342. } catch (error) {
  1343. return;
  1344. }
  1345. if (res.code > -1) {
  1346. isPrintLisRequest = true;
  1347. }
  1348. //重复申请,重打
  1349. if (res.code == -1 && res.message.indexOf("已申请") > -1) {
  1350. isPrintLisRequest = true;
  1351. }
  1352. if (!isPrintLisRequest) return;
  1353. try {
  1354. await this.$confirm("是否打印检验申请单?", "提示", {
  1355. confirmButtonText: "是",
  1356. cancelButtonText: "否",
  1357. type: "info",
  1358. showClose: false,
  1359. closeOnClickModal: false,
  1360. closeOnPressEscape: false,
  1361. });
  1362. } catch (error) {
  1363. return;
  1364. }
  1365. //打印检验申请单
  1366. this.lisPrint(row, "0003", false);
  1367. },
  1368. //检验条码打印 改造成 promise
  1369. lisPrint(row, ReportCode, isPreview) {
  1370. return new Promise((resolve, reject) => {
  1371. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  1372. if (!row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!")
  1373. let token = window.sessionStorage.getItem("token");
  1374. let user = window.sessionStorage.getItem("user");
  1375. let toOutShell = {
  1376. ReportCode,
  1377. token,
  1378. IsMoreLabel: 'Y',
  1379. isBuildImage: 'N',
  1380. IsUploadPdf: 'N',
  1381. preViewCanPrint: "N",
  1382. Parameters: [
  1383. { Name: "printer", Value: user },
  1384. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  1385. ],
  1386. BusinessCode: row.id
  1387. };
  1388. console.log('this.$peisAPI.toOutShell', toOutShell)
  1389. if (isPreview) {
  1390. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  1391. .then(res => {
  1392. console.log('this.$peisAPI.printPre', res)
  1393. let lres = JSON.parse(res)
  1394. if (lres.code > -1) {
  1395. resolve(lres)
  1396. } else {
  1397. reject(lres.message);
  1398. }
  1399. })
  1400. .catch((err) => {
  1401. reject(err);
  1402. });
  1403. } else {
  1404. this.$peisAPI.print(JSON.stringify(toOutShell))
  1405. .then(res => {
  1406. console.log('this.$peisAPI.print', res)
  1407. let lres = JSON.parse(res)
  1408. if (lres.code < 0) {
  1409. reject(lres.message);
  1410. } else {
  1411. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  1412. operateType: 1,
  1413. patientRegisterId: row.id,
  1414. });
  1415. }
  1416. })
  1417. .then(res => {
  1418. if (res && res.code < 0) {
  1419. reject(res.message);
  1420. } else {
  1421. resolve(res)
  1422. }
  1423. })
  1424. .catch((err) => {
  1425. reject(err);
  1426. });
  1427. }
  1428. })
  1429. },
  1430. //pacs条码打印
  1431. pacsPrint(row, ReportCode, isPreview) {
  1432. return new Promise((resolve, reject) => {
  1433. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  1434. if (!row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!")
  1435. let token = window.sessionStorage.getItem("token");
  1436. let user = window.sessionStorage.getItem("user");
  1437. let toOutShell = {
  1438. ReportCode,
  1439. token,
  1440. IsMoreLabel: 'Y',
  1441. isBuildImage: 'N',
  1442. IsUploadPdf: 'N',
  1443. preViewCanPrint: "N",
  1444. Parameters: [
  1445. { Name: "printer", Value: user },
  1446. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  1447. ],
  1448. BusinessCode: row.id
  1449. };
  1450. console.log('this.$peisAPI.print', toOutShell)
  1451. if (isPreview) {
  1452. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  1453. .then(res => {
  1454. console.log('this.$peisAPI.printPre', res)
  1455. let lres = JSON.parse(res)
  1456. if (lres.code > -1) {
  1457. resolve(lres)
  1458. } else {
  1459. reject(lres.message);
  1460. }
  1461. })
  1462. .catch((err) => {
  1463. reject(err);
  1464. });
  1465. } else {
  1466. this.$peisAPI.print(JSON.stringify(toOutShell))
  1467. .then(res => {
  1468. console.log('this.$peisAPI.print', res)
  1469. let lres = JSON.parse(res)
  1470. if (lres.code > -1) {
  1471. resolve(lres)
  1472. } else {
  1473. reject(lres.message);
  1474. }
  1475. })
  1476. .catch((err) => {
  1477. reject(err);
  1478. });
  1479. }
  1480. })
  1481. },
  1482. // 导入检查检验结果
  1483. importResult(checkType, row) {
  1484. let url = '/api/app/ImportLisResult/ImportResultByPatientRegisterId'
  1485. switch (checkType) {
  1486. case 'pacs':
  1487. url = '/api/app/ImportPacsResult/ImportResultByPatientRegisterId'
  1488. postapi(url, { patientRegisterId: row.id })
  1489. .then(res => {
  1490. if (res.code > -1) {
  1491. return postapi('/api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId', { patientRegisterId: row.id })
  1492. }
  1493. })
  1494. .then(res => {
  1495. if (res && res.code > -1) {
  1496. this.$message.success({ showClose: true, message: '导入成功!' })
  1497. this.rowClick(row)
  1498. }
  1499. })
  1500. break;
  1501. default:
  1502. postapi(url, { patientRegisterId: row.id }).then(res => {
  1503. if (res.code > -1) {
  1504. this.$message.success({ showClose: true, message: '导入成功!' })
  1505. this.rowClick(row)
  1506. }
  1507. })
  1508. break;
  1509. }
  1510. },
  1511. //通用导出
  1512. btnExport(elId) {
  1513. // 获取HTML元素(表格)
  1514. // let table = document.getElementById(elId); //.cloneNode(true)
  1515. this.$nextTick(() => {
  1516. // let refsTable = this.$refs[elId] //.cloneNode(true) true
  1517. let table = document.getElementById(elId)
  1518. // console.log('table,refsTable', table, refsTable)
  1519. let tableData = table.innerHTML
  1520. let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
  1521. let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
  1522. FileSaver.saveAs(blob, fileName + '.xls');
  1523. // 导出图片
  1524. // 使用html2canvas将HTML元素转换为画布
  1525. // let cloneTable = table.cloneNode(true) //[elId]
  1526. /*
  1527. html2canvas(table).then(canvas => {
  1528. // 创建一个a元素用于下载
  1529. const link = document.createElement('a');
  1530. link.href = canvas.toDataURL('image/jpeg');
  1531. link.download = fileName + '.jpg';
  1532. document.body.appendChild(link);
  1533. link.click();
  1534. //document.body.removeChild(link);
  1535. // // 创建一个PDF对象
  1536. // var pdf = new jsPDF();
  1537. // // 设置PDF的尺寸
  1538. // pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, canvas.width, canvas.height);
  1539. // // 导出PDF
  1540. // pdf.save('员工信息表.pdf');
  1541. });
  1542. */
  1543. })
  1544. },
  1545. btnDragColDesign() {
  1546. this.dragColDesign = deepCopy(this.dragCol)
  1547. this.dialogColSort = true
  1548. this.rowDrag()
  1549. },
  1550. btnDragColDesignOk() {
  1551. this.dragCol = deepCopy(this.dragColDesign)
  1552. this.dialogColSort = false
  1553. },
  1554. //拖拽
  1555. rowDrag() {
  1556. this.$nextTick(() => {
  1557. const el = document.querySelector("#elTable_dragCol tbody");
  1558. // console.log('el0', el)
  1559. const that = this;
  1560. Sortable.create(el, {
  1561. animation: 150, // ms, number 单位:ms,定义排序动画的时间
  1562. //拖拽结束
  1563. onEnd({ newIndex, oldIndex }) {
  1564. that.isshow = false;
  1565. const currRow = that.dragColDesign.splice(oldIndex, 1)[0];
  1566. that.dragColDesign.splice(newIndex, 0, currRow);
  1567. // console.log('el', el)
  1568. },
  1569. });
  1570. });
  1571. },
  1572. },
  1573. //监听事件
  1574. watch: {
  1575. "patientRegister.query.customerOrgId": {
  1576. // immediate: true, // 立即执行
  1577. // deep: true, // 深度监听复杂类型内变化
  1578. handler(newVal, oldVal) {
  1579. //// console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal)
  1580. // 单位变化时,清除当前列表信息
  1581. if (newVal && newVal != oldVal) {
  1582. this.tableData = []
  1583. this.dataTransOpts.tableM.register_check_asbitem = []
  1584. }
  1585. }
  1586. },
  1587. //触发查询事件
  1588. "patientRegister.query.times"(newVal, oldVal) {
  1589. if (newVal != oldVal) {
  1590. //alert('触发查询事件')
  1591. this.Query();
  1592. }
  1593. },
  1594. //新增后,触发赋值
  1595. // "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  1596. // if (newVal != oldVal) {
  1597. // //// console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  1598. // objCopy(this.patientRegister.patientRegisterRd, this.form);
  1599. // }
  1600. // },
  1601. },
  1602. };
  1603. </script>
  1604. <style scoped>
  1605. @import "../../assets/css/global_input.css";
  1606. @import "../../assets/css/global_table.css";
  1607. @import "../../assets/css/global.css";
  1608. .box {
  1609. display: flex;
  1610. }
  1611. .listBtn {
  1612. margin-top: 5px;
  1613. text-align: center;
  1614. }
  1615. .btnClass {
  1616. width: 100px;
  1617. }
  1618. </style>