AllCaseFrontSheet.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <el-container>
  3. <el-header height="36px" style="margin-top: 8px">
  4. <el-date-picker
  5. v-model="dateRange"
  6. type="daterange"
  7. range-separator="至"
  8. start-placeholder="开始日期"
  9. end-placeholder="结束日期"
  10. :shortcuts="shortcuts"
  11. style="width: 260px"
  12. ></el-date-picker>
  13. <el-select v-model="overviewParam.ward" style="width: 130px" placeholder="请选择科室" filterable clearable>
  14. <el-option v-for="item in userWards" :key="item.code" :value="item.code" :label="item.name"></el-option>
  15. </el-select>
  16. <el-select v-model="overviewParam.fileStatus" style="width: 90px">
  17. <el-option label="未签收" value="0"></el-option>
  18. <el-option label="已签收" value="1"></el-option>
  19. </el-select>
  20. <el-select v-model="overviewParam.lateFlag" style="width: 90px">
  21. <el-option label="全部" value="3"></el-option>
  22. <el-option label="迟交" value="1"></el-option>
  23. <el-option label="未迟交" value="0"></el-option>
  24. </el-select>
  25. <el-input v-model="overviewParam.bah" style="width: 110px" placeholder="住院号" clearable></el-input>
  26. <el-button type="primary" icon="el-icon-search" @click="searchPatient">检索</el-button>
  27. <el-button type="primary" icon="el-icon-check" @click="archiveBa">签收</el-button>
  28. <el-button type="primary" icon="el-icon-s-operation" @click="showAdvanceSearch = true">高级条件检索</el-button>
  29. <el-divider direction="vertical"></el-divider>
  30. <el-dropdown trigger="click" type="primary" @command="handleCommand">
  31. <el-button type="primary">功能菜单<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
  32. <template #dropdown>
  33. <el-dropdown-menu>
  34. <el-dropdown-item icon="el-icon-printer" command="unSign">解除签收</el-dropdown-item>
  35. <el-dropdown-item icon="el-icon-printer" command="dismissCount" divided>出院患者统计</el-dropdown-item>
  36. <el-dropdown-item icon="el-icon-printer" command="exportLateData">导出迟交病案</el-dropdown-item>
  37. <el-dropdown-item icon="el-icon-printer" command="print1" divided>打印正面</el-dropdown-item>
  38. <el-dropdown-item icon="el-icon-printer" command="print2">打印反面</el-dropdown-item>
  39. <el-dropdown-item icon="el-icon-printer" command="confirmPrint">确认已打印</el-dropdown-item>
  40. </el-dropdown-menu>
  41. </template>
  42. </el-dropdown>
  43. </el-header>
  44. <el-container>
  45. <el-aside width="290px">
  46. <el-table :data="overview.slice((currentPage - 1) * 15, currentPage * 15)" :height="tableHeight" stripe highlight-current-row @row-click="fetchSheetInfo">
  47. <el-table-column label="姓名" width="70">
  48. <template #default="scope">
  49. <img class="sex-icon" :src="scope.row.sex === 1 ? maleIcon : femaleIcon" />
  50. {{ scope.row.name }}
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="住院号-次数" width="80">
  54. <template #default="scope">
  55. <span style="font-weight: bold; color: black">{{ scope.row.bah }}</span
  56. >-{{ scope.row.times }}
  57. </template>
  58. </el-table-column>
  59. <el-table-column prop="doctorName" label="医生" width="60"></el-table-column>
  60. <el-table-column prop="signDate" label="签收日期"></el-table-column>
  61. </el-table>
  62. <el-pagination small :hide-on-single-page="false" :page-size="15" layout="prev, pager, next" @current-change="handleCurrentPageChange" :total="overview.length">
  63. </el-pagination>
  64. </el-aside>
  65. <el-main>
  66. <div :style="mainInfo">
  67. <div id="headpage">
  68. <HeadPage :patient="sheet" :dics="dics" />
  69. </div>
  70. <div id="tailpage" style="margin-left: 70px">
  71. <TailPage :patient="sheet" :dics="dics" />
  72. </div>
  73. </div>
  74. </el-main>
  75. </el-container>
  76. <el-drawer v-model="showMessageDrawer" title="首页签收校验结果">
  77. <div class="page-inner">
  78. <div v-if="forceVerifies.length === 0 && adviceVerifies.length === 0" class="no-verify-message">暂无校验内容</div>
  79. <div v-show="forceVerifies.length > 0" style="padding: 8px 0 4px 0; font-weight: bold">以下条目为强制要求,请完善。</div>
  80. <div v-for="(item, index) in forceVerifies" :key="index" class="message-item" :style="messageColor(index)" @click="currentMessageIndex = index">
  81. {{ index + 1 }}、{{ item.name }}
  82. </div>
  83. <div v-show="adviceVerifies.length > 0" style="padding: 8px 0 4px 0; font-weight: bold">以下条目为建议执行,不做强制要求。</div>
  84. <div v-for="(item, index) in adviceVerifies" :key="index" style="padding: 6px; margin-bottom: 6px; border-radius: 4px; background: #eea7a752; color: #ff2b2b">
  85. {{ index + 1 }}、{{ item.name }}
  86. </div>
  87. </div>
  88. </el-drawer>
  89. <div class="rightside-btn" @click="showMessageDrawer = !showMessageDrawer">首页签收校验结果</div>
  90. <el-dialog v-model="showAdvanceSearch" title="高级条件检索" width="380px">
  91. <div style="margin-top: 5px">
  92. <el-tag type="info">医生条件</el-tag>
  93. <div style="margin-top: 5px">
  94. &nbsp;&nbsp;医生姓名:<el-input v-model="advanceSearch.doctorName" style="width: 160px" clearable @click="showSearchData('advanceSearchDoctor')"></el-input>
  95. </div>
  96. </div>
  97. <div style="margin-top: 10px">
  98. <el-tag type="info">患者条件</el-tag>
  99. <div style="margin-top: 5px">
  100. &nbsp;&nbsp;诊断编码:<el-input v-model="advanceSearch.icdCode" style="width: 160px" clearable @click="showSearchData('advanceSearchDiag')"></el-input>
  101. </div>
  102. <div style="margin-top: 5px">
  103. &nbsp;&nbsp;手术编码:<el-input v-model="advanceSearch.surgeryCode" style="width: 160px" clearable @click="showSearchData('advanceSearchSurgery')"></el-input>
  104. </div>
  105. <div style="margin-top: 5px">
  106. &nbsp;&nbsp;患者性别:
  107. <el-select v-model="advanceSearch.sex" style="width: 100px" clearable>
  108. <el-option v-for="item in dics.getSexCode" :key="item.code" :value="item.code" :label="item.name"></el-option>
  109. </el-select>
  110. </div>
  111. </div>
  112. <div style="width: 100%; text-align: right; margin-top: 15px">
  113. <el-button icon="el-icon-search" type="primary" @click="doAdvanceSearch">开始检索</el-button>
  114. </div>
  115. </el-dialog>
  116. <el-dialog v-model="showSearch" title="数据搜索" width="700px">
  117. 检索依据:
  118. <el-select v-model="searchMethod" style="width: 100px">
  119. <el-option v-for="item in searchMethods" :key="item.code" :label="item.name" :value="item.code"></el-option>
  120. </el-select>
  121. &nbsp;&nbsp;&nbsp;&nbsp; 搜索内容:
  122. <el-input
  123. ref="searchInput"
  124. v-model="searchContent"
  125. prefix-icon="el-icon-search"
  126. placeholder="请输入搜索内容"
  127. style="width: 160px"
  128. clearable
  129. @input="executeSearch"
  130. ></el-input>
  131. <el-table :data="searchResults" height="400" stripe highlight-current-row @row-click="handleSelectSearch">
  132. <el-table-column prop="code" label="编码" width="200"></el-table-column>
  133. <el-table-column prop="name" label="名称" width="450"></el-table-column>
  134. </el-table>
  135. <div style="margin-top: 15px; width: 100%; text-align: right">
  136. <el-button type="primary" icon="el-icon-arrow-left" @click="lastPage" :disabled="currentSRPage === 1">上一页</el-button>
  137. <el-button type="primary" icon="el-icon-arrow-right" @click="nextPage" :disabled="currentSRPage > 1 && searchResults.length < 10">下一页</el-button>
  138. </div>
  139. </el-dialog>
  140. <el-dialog v-model="showDismissCount" title="出院患者统计" width="70%">
  141. <el-date-picker v-model="disCountParams.month" type="month" style="width: 110px" placeholder="请选择" :clearable="false"></el-date-picker>
  142. <el-select v-model="disCountParams.type" style="width: 120px" @change="dismissCountdata = []">
  143. <el-option :value="1" label="按科室计数"></el-option>
  144. <el-option :value="2" label="按明细计数"></el-option>
  145. <el-option :value="3" label="死亡患者计数"></el-option>
  146. </el-select>
  147. <el-select :disabled="disCountParams.type === 1" v-model="disCountParams.dept" style="width: 130px" placeholder="请选择科室" filterable clearable>
  148. <el-option v-for="item in userWards" :key="item.code" :value="item.code" :label="item.name"></el-option>
  149. </el-select>
  150. <el-divider direction="vertical"></el-divider>
  151. <el-button icon="el-icon-search" type="primary" @click="fetchDismissCount">获取统计数据</el-button>
  152. <el-button icon="el-icon-download" type="primary" @click="exportDismissCount">导出Excel</el-button>
  153. <div v-if="disCountParams.type === 1">
  154. <el-table :data="dismissCountdata" stripe height="360">
  155. <el-table-column prop="deptName" label="科室"></el-table-column>
  156. <el-table-column prop="dismissCount" label="出院人数"></el-table-column>
  157. <el-table-column prop="signedCount" label="已签收"></el-table-column>
  158. <el-table-column prop="unsignCount" label="未签收"></el-table-column>
  159. </el-table>
  160. </div>
  161. <div v-else>
  162. <el-table :data="dismissCountdata.slice((currentDismissCountPage - 1) * 10, currentDismissCountPage * 10)" stripe height="360">
  163. <el-table-column prop="patNo" label="住院号"></el-table-column>
  164. <el-table-column prop="times" label="住院次数"></el-table-column>
  165. <el-table-column prop="name" label="姓名"></el-table-column>
  166. <el-table-column prop="gender" label="性别"></el-table-column>
  167. <el-table-column prop="age" label="年龄"></el-table-column>
  168. <el-table-column prop="admissDate" label="入院时间"></el-table-column>
  169. <el-table-column v-if="disCountParams.type === 2" prop="disDate" label="出院时间"></el-table-column>
  170. <el-table-column v-if="disCountParams.type === 3" prop="disDate" label="死亡时间"></el-table-column>
  171. <el-table-column prop="inHospDays" label="住院天数"></el-table-column>
  172. <el-table-column prop="totalCharge" label="住院费用"></el-table-column>
  173. <el-table-column prop="admissDept" label="入院科室"></el-table-column>
  174. <el-table-column prop="disDept" label="出院科室"></el-table-column>
  175. <el-table-column prop="zkWard" label="转科科室"></el-table-column>
  176. <el-table-column prop="disDiag" label="出院主诊断"></el-table-column>
  177. <el-table-column prop="blfx" label="病例分型"></el-table-column>
  178. <el-table-column prop="kzr" label="科主任"></el-table-column>
  179. <el-table-column prop="zzys" label="主治医师"></el-table-column>
  180. <el-table-column prop="zyys" label="住院医师"></el-table-column>
  181. <el-table-column prop="fdcrb" label="法定传染病"></el-table-column>
  182. </el-table>
  183. <el-pagination
  184. :hide-on-single-page="false"
  185. :page-size="10"
  186. layout="prev, pager, next, total"
  187. @current-change="handleCurrentDismissCountPageChange"
  188. :total="dismissCountdata.length"
  189. >
  190. </el-pagination>
  191. </div>
  192. </el-dialog>
  193. </el-container>
  194. </template>
  195. <script setup name="AllCaseFrontSheet">
  196. import { yesOrNo, haveOrNot, searchMethods, autopsies } from './common'
  197. import { computed, onActivated, onMounted, reactive, ref, watchEffect } from 'vue'
  198. import store from '@/store'
  199. import { operations } from '@/data/index'
  200. import {
  201. basOutPatients,
  202. executeAdvanceSearch,
  203. executeConfirmPrint,
  204. executePrintVerify,
  205. executeSaveVerify,
  206. executeUnArchiveBa,
  207. getAllDictionary,
  208. getAllWards,
  209. getSheetInfo,
  210. sheetSearch,
  211. analyzeDismissCount,
  212. } from '@/api/case-front-sheet'
  213. import maleIcon from '@/assets/male-icon.png'
  214. import femaleIcon from '@/assets/female-icon.png'
  215. import { ElMessage, ElMessageBox } from 'element-plus'
  216. import { shortcuts } from '@/data/shortcuts'
  217. import { formatDate, getOneMonthOffset } from '@/utils/date'
  218. import { initLodop, getLodop } from '@/utils/c-lodop'
  219. import { formatMonth } from '@/utils/date'
  220. import HeadPage from '../../../components/inpatient/frontsheet-printpage/HeadPage.vue'
  221. import TailPage from '../../../components/inpatient/frontsheet-printpage/TailPage.vue'
  222. import { Export } from '../../../utils/ExportExcel'
  223. const cdStyle = computed(() => {
  224. return {
  225. position: 'absolute',
  226. top: '77px',
  227. left: '590px',
  228. }
  229. })
  230. const currentPage = $ref(1)
  231. const handleCurrentPageChange = (val) => {
  232. currentPage = val
  233. }
  234. const userWards = $ref([])
  235. const windowSize = store.state.app.windowSize
  236. const tableHeight = windowSize.h - 75
  237. const overview = $ref([])
  238. const sheet = $ref({
  239. disdiagList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
  240. surgeryList: [{}, {}, {}, {}, {}],
  241. })
  242. const mainInfo = {
  243. height: windowSize.h - 45 + 'px',
  244. padding: '0 20px',
  245. overflowY: 'scroll',
  246. }
  247. const dics = $ref({})
  248. const overviewParam = reactive({
  249. ward: '',
  250. start: '',
  251. end: '',
  252. fileStatus: '0',
  253. lateFlag: '3',
  254. bah: '',
  255. })
  256. const cdPercentage = $ref('')
  257. const isLateDataMode = $ref(false)
  258. const searchPatient = () => {
  259. overviewParam.start = formatDate(dateRange[0])
  260. overviewParam.end = formatDate(dateRange[1])
  261. basOutPatients(overviewParam).then((res) => {
  262. isLateDataMode = overviewParam.lateFlag === '1'
  263. cdPercentage = res.cdPercentage
  264. overview = res.list
  265. if (res.list.length === 1) {
  266. fetchSheetInfo(res.list[0])
  267. }
  268. })
  269. }
  270. const dateRange = $ref([])
  271. const fetchSheetInfo = (row) => {
  272. if (row.bah !== sheet.bah || row.times !== sheet.admissTimes) {
  273. forceVerifies = []
  274. adviceVerifies = []
  275. }
  276. getSheetInfo(row.bah, row.times, 2).then((res) => {
  277. sheet = res
  278. })
  279. }
  280. const showSearch = $ref(false)
  281. const insertDiag = $ref(false)
  282. watchEffect(() => {
  283. if (showSearch) {
  284. searchResults = []
  285. setTimeout(() => {
  286. searchInput.focus()
  287. }, 300)
  288. } else {
  289. insertDiag = false
  290. }
  291. })
  292. const searchInput = $ref(null)
  293. const searchUrl = $ref('')
  294. const searchTargetCode = $ref('')
  295. const searchTargetName = $ref('')
  296. const searchContent = $ref('')
  297. const currentSRPage = $ref(1)
  298. const lastPage = () => {
  299. currentSRPage -= 1
  300. fetchSearchData()
  301. }
  302. const nextPage = () => {
  303. currentSRPage += 1
  304. fetchSearchData()
  305. }
  306. const fetchSearchData = () => {
  307. const param = {
  308. method: searchMethod,
  309. target: searchUrl,
  310. content: searchContent,
  311. responceType: sheet.responceType,
  312. page: currentSRPage,
  313. ybType: sheet.ybType,
  314. treatType: sheet.treatType,
  315. }
  316. sheetSearch(param).then((res) => {
  317. searchResults = res
  318. })
  319. }
  320. const executeSearch = () => {
  321. if (searchContent.length < 2 && searchContent !== '-') return
  322. currentSRPage = 1
  323. if (searchContent === '-') {
  324. searchResults = [{ code: '-', name: '-' }]
  325. } else {
  326. fetchSearchData()
  327. }
  328. }
  329. const showDismissCount = $ref(false)
  330. const dismissCountdata = $ref([])
  331. const disCountParams = reactive({
  332. month: formatMonth(new Date()),
  333. type: 1,
  334. dept: null,
  335. })
  336. const fetchDismissCount = () => {
  337. disCountParams.month = formatMonth(disCountParams.month)
  338. analyzeDismissCount(disCountParams).then((res) => {
  339. dismissCountdata = res
  340. })
  341. }
  342. const exportDismissCount = () => {
  343. if (dismissCountdata.length === 0) {
  344. ElMessage({
  345. message: '没有可以导出的数据!',
  346. type: 'warning',
  347. duration: 2000,
  348. showClose: true,
  349. })
  350. return
  351. }
  352. let name = ''
  353. let title = {}
  354. if (disCountParams.type === 1) {
  355. title = {
  356. deptName: '科室',
  357. dismissCount: '出院人数',
  358. signedCount: '已签收',
  359. unsignCount: '未签收',
  360. }
  361. name = '科室出院人数统计'
  362. } else {
  363. title = {
  364. patNo: '住院号',
  365. times: '住院次数',
  366. name: '姓名',
  367. gender: '性别',
  368. age: '年龄',
  369. admissDate: '入院时间',
  370. admissDept: '入院科室',
  371. zkWard: '转科科室',
  372. disDate: disCountParams.type === 2 ? '出院时间' : '死亡时间',
  373. inHospDays: '住院天数',
  374. totalCharge: '住院费用',
  375. disDept: '出院科室',
  376. disDiag: '出院主诊断',
  377. blfx: '病例分型',
  378. kzr: '科主任',
  379. zzys: '主治医师',
  380. zyys: '住院医师',
  381. fdcrb: '法定传染病',
  382. }
  383. name = disCountParams.type === 2 ? '出院明细统计' : '死亡患者统计'
  384. }
  385. const fileName = `【${disCountParams.month}】${name}`
  386. Export(dismissCountdata, title, fileName)
  387. }
  388. const handleCommand = (val) => {
  389. switch (val) {
  390. case 'dismissCount':
  391. showDismissCount = true
  392. break
  393. case 'exportLateData':
  394. exportLateDataExel()
  395. break
  396. case 'print1':
  397. beforePrint(1)
  398. break
  399. case 'print2':
  400. beforePrint(2)
  401. break
  402. case 'confirmPrint':
  403. confirmCopyPrint()
  404. break
  405. case 'unSign':
  406. unArchiveBa()
  407. break
  408. }
  409. }
  410. const exportLateDataExel = () => {
  411. if (!isLateDataMode) {
  412. ElMessage({
  413. message: '请先查询迟交病案。',
  414. type: 'warning',
  415. duration: 2500,
  416. showClose: true,
  417. })
  418. return
  419. }
  420. if (overview.length === 0) {
  421. ElMessage({
  422. message: '没有可以导出的数据!',
  423. type: 'warning',
  424. duration: 2000,
  425. showClose: true,
  426. })
  427. return
  428. }
  429. const title = {
  430. name: '姓名',
  431. genderName: '性别',
  432. bah: '住院号',
  433. times: '住院次数',
  434. bedNo: '床位',
  435. admissDate: '入院时间',
  436. disDate: '出院时间',
  437. deptName: '出院科室',
  438. doctorName: '管床医生',
  439. lateDays: '迟交天数',
  440. signDate: '签收日期',
  441. }
  442. Export(overview, title, '迟交病案')
  443. }
  444. const searchMethod = $ref('alpha')
  445. const searchResults = $ref([])
  446. const showSearchData = (flag) => {
  447. if (flag === 'advanceSearchDoctor') {
  448. searchUrl = 'employee'
  449. searchTargetCode = 'advanceSearch'
  450. searchTargetName = 'doctor'
  451. } else if (flag === 'advanceSearchDiag') {
  452. searchUrl = 'normalDiag'
  453. searchTargetCode = 'advanceSearch'
  454. searchTargetName = 'icd'
  455. } else {
  456. searchUrl = 'surgery'
  457. searchTargetCode = 'advanceSearch'
  458. searchTargetName = 'surgery'
  459. }
  460. showSearch = true
  461. }
  462. const showAdvanceSearch = $ref(false)
  463. const advanceSearch = reactive({
  464. doctorCode: '',
  465. doctorName: '',
  466. icdCode: '',
  467. icdName: '',
  468. surgeryCode: '',
  469. surgeryName: '',
  470. sex: null,
  471. })
  472. const doAdvanceSearch = () => {
  473. advanceSearch.start = formatDate(dateRange[0])
  474. advanceSearch.end = formatDate(dateRange[1])
  475. if (!advanceSearch.doctorName) {
  476. advanceSearch.doctorCode = ''
  477. }
  478. executeAdvanceSearch(advanceSearch).then((res) => {
  479. overview = res
  480. showAdvanceSearch = false
  481. })
  482. }
  483. const handleSelectSearch = (item) => {
  484. switch (searchTargetName) {
  485. case 'doctor':
  486. advanceSearch.doctorCode = item.code
  487. advanceSearch.doctorName = item.name
  488. break
  489. case 'icd':
  490. advanceSearch.icdCode = item.code
  491. advanceSearch.icdName = item.name
  492. break
  493. case 'surgery':
  494. advanceSearch.surgeryCode = item.code
  495. advanceSearch.surgeryName = item.name
  496. break
  497. }
  498. searchContent = ''
  499. showSearch = false
  500. }
  501. const nullPatient = () => {
  502. if (!sheet.bah) {
  503. ElMessage({
  504. message: '请先选择患者!',
  505. type: 'warning',
  506. duration: 2500,
  507. showClose: true,
  508. })
  509. return true
  510. }
  511. return false
  512. }
  513. const showMessageDrawer = $ref(false)
  514. const beforePrint = (flag) => {
  515. if (nullPatient()) return
  516. const param = {
  517. sheet: sheet,
  518. }
  519. executePrintVerify(param)
  520. .then(() => {
  521. execPrint(flag)
  522. })
  523. .catch((e) => {
  524. forceVerifies = e.data.force
  525. adviceVerifies = e.data.advice
  526. showMessageDrawer = true
  527. if (e.data.force.length === 0) {
  528. execPrint(flag)
  529. }
  530. })
  531. }
  532. const execPrint = (flag) => {
  533. LODOP = getLodop()
  534. const prntStyle = `<style>*{font-size:10pt} table,th,td {border: 1px solid black;border-collapse: collapse;} td,th {height: 24px;padding-left: 4px;}</style>`
  535. const prntContent = flag === 1 ? document.getElementById('headpage').innerHTML : document.getElementById('tailpage').innerHTML
  536. let pagePrint = prntStyle + '<body>' + prntContent + '</body>'
  537. LODOP.PRINT_INIT('casefrontsheet')
  538. LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
  539. LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
  540. LODOP.ADD_PRINT_HTM('2mm', '0.5mm', '209.5mm', '295mm', pagePrint)
  541. LODOP.SET_PRINT_STYLE('ItemType', 3)
  542. LODOP.PREVIEW()
  543. }
  544. const archiveBa = () => {
  545. if (nullPatient()) {
  546. return
  547. }
  548. const param = {
  549. opType: 2,
  550. sheet: sheet,
  551. }
  552. executeSaveVerify(param)
  553. .then((res) => {
  554. ElMessage({
  555. message: '操作成功。',
  556. type: 'success',
  557. duration: 2500,
  558. showClose: true,
  559. })
  560. })
  561. .catch((e) => {
  562. forceVerifies = e.data
  563. showMessageDrawer = true
  564. })
  565. }
  566. const unArchiveBa = () => {
  567. if (nullPatient()) {
  568. return
  569. }
  570. ElMessageBox.confirm('是否确认解除签收患者【' + sheet.name + '】的病案首页?', '提示', {
  571. type: 'warning',
  572. confirmButtonText: '解除签收',
  573. cancelButtonText: '取消',
  574. })
  575. .then(() => {
  576. const param = {
  577. opType: 3,
  578. sheet: sheet,
  579. }
  580. executeUnArchiveBa(param).then((res) => {
  581. ElMessage({
  582. message: res,
  583. type: 'success',
  584. duration: 2500,
  585. showClose: true,
  586. })
  587. })
  588. })
  589. .catch(() => {})
  590. }
  591. const confirmCopyPrint = () => {
  592. if (nullPatient()) {
  593. return
  594. }
  595. if (sheet.fileStatus === 2) {
  596. ElMessageBox.alert('此病案首页已确认过打印!', '提示', {
  597. showCancelButton: false,
  598. type: 'warning',
  599. }).then(() => {})
  600. return
  601. }
  602. ElMessageBox.confirm('是否确认患者【' + sheet.name + '】的病案首页已打印,此操作将不可逆转!', '提示', {
  603. confirmButtonText: '确定',
  604. cancelButtonText: '取消',
  605. type: 'warning',
  606. })
  607. .then(() => {
  608. executeConfirmPrint({ sheet: sheet }).then(() => {
  609. ElMessage({
  610. message: '操作成功',
  611. type: 'success',
  612. duration: 2500,
  613. showClose: true,
  614. })
  615. })
  616. })
  617. .catch(() => {})
  618. }
  619. const forceVerifies = $ref([])
  620. const adviceVerifies = $ref([])
  621. const currentMessageIndex = $ref(null)
  622. const messageColor = (id) => {
  623. return currentMessageIndex === id
  624. ? {
  625. background: '#ff2b2b',
  626. color: 'white',
  627. }
  628. : {
  629. background: '#eea7a752',
  630. color: '#ff2b2b',
  631. }
  632. }
  633. const currentDismissCountPage = $ref(1)
  634. const handleCurrentDismissCountPageChange = (val) => {
  635. currentDismissCountPage = val
  636. }
  637. onActivated(() => {
  638. initLodop()
  639. })
  640. onMounted(() => {
  641. getAllDictionary().then((res) => {
  642. res.getOperations = operations
  643. res.getYesOrNo = yesOrNo
  644. res.getHaveOrNot = haveOrNot
  645. res.getAutopsies = autopsies
  646. dics = res
  647. getAllWards().then((res1) => {
  648. userWards = res1
  649. const t = getOneMonthOffset()
  650. dateRange[0] = t.start
  651. dateRange[1] = t.end
  652. })
  653. })
  654. })
  655. </script>
  656. <style scoped>
  657. :deep(.el-dialog__body) {
  658. padding-top: 0;
  659. }
  660. :deep(.el-drawer__header) {
  661. margin-bottom: 8px;
  662. }
  663. .page-inner {
  664. padding: 0 20px 10px 26px;
  665. border-radius: 12px;
  666. text-align: justify;
  667. }
  668. .message-item {
  669. padding: 6px;
  670. margin-bottom: 6px;
  671. border-radius: 4px;
  672. }
  673. .message-item:hover {
  674. cursor: pointer;
  675. }
  676. .rightside-btn {
  677. display: flex;
  678. align-items: center;
  679. text-align: center;
  680. color: white;
  681. border-radius: 4px;
  682. width: 20px;
  683. height: 135px;
  684. position: fixed;
  685. background: rgb(238, 98, 5);
  686. top: 260px;
  687. right: 10px;
  688. cursor: pointer;
  689. }
  690. .no-verify-message {
  691. width: 100%;
  692. text-align: center;
  693. margin-top: 50px;
  694. font-size: 18px;
  695. color: gray;
  696. }
  697. </style>