index.vue 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167
  1. <template>
  2. <div class="dashboard-container" :class="{'nocopy': $route.meta.nocopy}">
  3. <div class="block">
  4. <div class="barBtn">
  5. <el-radio-group v-model="choice" class="bnts" size="medium" @change="handleRadioChange">
  6. <el-radio-button :label="0">普通检索</el-radio-button>
  7. <el-radio-button :label="1">高级检索</el-radio-button>
  8. <el-radio-button :label="2">专业检索</el-radio-button>
  9. </el-radio-group>
  10. </div>
  11. <div class="bnh" />
  12. <!-- 普通检索 -->
  13. <div v-if="choice == 0" class="bnh">
  14. <el-form :inline="true" class="demo-form-inline">
  15. <el-form-item label="">
  16. <el-input v-model="formData0.input" placeholder="输入关键字搜索" class="input-with-select width500"></el-input>
  17. </el-form-item>
  18. <el-form-item>
  19. <el-date-picker
  20. v-model="formData1.startTime"
  21. type="date"
  22. format="yyyy 年 MM 月 dd 日"
  23. value-format="yyyyMMdd"
  24. placeholder="出院时间开始"
  25. :picker-options="pickerOptions"
  26. :disabled="lock"
  27. />
  28. <span class="pind10" />
  29. <el-date-picker
  30. v-model="formData1.endTime"
  31. type="date"
  32. format="yyyy 年 MM 月 dd 日"
  33. value-format="yyyyMMdd"
  34. placeholder="出院时间结束"
  35. :picker-options="pickerOptions"
  36. :disabled="lock"
  37. />
  38. </el-form-item>
  39. </el-form>
  40. <div style="margin: 15px">
  41. <el-button type="primary" class="long-btn" @click="searchBtn(0)">检索</el-button>
  42. </div>
  43. </div>
  44. <!-- 高级检索 -->
  45. <div v-if="choice == 1" class="barBtn">
  46. <el-form ref="form" :model="formData1" label-width="100px">
  47. <el-form-item v-for="(item, index) in formData1.seniorList" :key="index">
  48. <!-- 下拉框开始 -->
  49. <el-select v-if="index != 0" v-model="item.select_type" :class="index != 0 ? 'marginLeft' : ''" class="width100" filterable placeholder="" :disabled="item.lock">
  50. <!-- fieldList -->
  51. <el-option label="且" :value="0" />
  52. <el-option label="或者" :value="1" />
  53. <el-option label="不包含" :value="2" />
  54. </el-select>
  55. <span v-if="index != 0" class="pind10" />
  56. <el-select v-model="item.key" class="width150" filterable placeholder="请选择" @change="funSelect(index)" :disabled="item.lock">
  57. <!-- fieldList -->
  58. <el-option v-for="(item, index) in fieldList" :key="index" :label="item.name" :value="item.id" :disabled="item.lock" />
  59. </el-select>
  60. <!-- 下拉框结束 -->
  61. <span class="pind10" />
  62. <!-- 中间选择输入框开始 -->
  63. <span v-if="item.key == 'AAC11N'">
  64. <el-select v-model="item.value" class="width150" filterable placeholder="请选择" :disabled="item.lock">
  65. <el-option v-for="(itemo, indexo) in departmentList" :key="indexo" :label="itemo.name" :value="itemo.name" />
  66. </el-select>
  67. </span>
  68. <span v-else>
  69. <el-input v-model="item.value" class="width150" :disabled="item.lock" placeholder="请输入" />
  70. </span>
  71. <!-- 中间选择输入框结束 -->
  72. <span class="pind10" />
  73. <!-- 条件下拉开始 -->
  74. <el-select v-model="item.type" class="width90" :disabled="item.lock" placeholder="">
  75. <el-option label="精确" value="1" />
  76. <el-option label="模糊" value="0" />
  77. </el-select>
  78. <!-- 条件下拉结束 -->
  79. <span class="pind10" />
  80. <!-- 增减重置选项按钮开始 -->
  81. <span>
  82. <el-button v-if="index != 0 && !item.lock" :disabled="formData1.seniorList.length == 1" type="primary" icon="el-icon-minus" @click="funDel(index)" />
  83. <el-button v-if="index == formData1.seniorList.length - 1" type="primary" icon="el-icon-plus" @click="funAdd" />
  84. <el-button v-if="index === formData1.seniorList.length - 1 && searchNum" @click="onLockResult">结果中检索</el-button>
  85. </span>
  86. <!-- 增减重置选项按钮结束 -->
  87. </el-form-item>
  88. <el-form-item label="出院时间">
  89. <el-date-picker
  90. v-model="formData1.startTime"
  91. type="date"
  92. format="yyyy 年 MM 月 dd 日"
  93. value-format="yyyyMMdd"
  94. placeholder="开始日期"
  95. :picker-options="pickerOptions"
  96. :disabled="lock"
  97. />
  98. <span class="pind10" />
  99. <el-date-picker
  100. v-model="formData1.endTime"
  101. type="date"
  102. format="yyyy 年 MM 月 dd 日"
  103. value-format="yyyyMMdd"
  104. placeholder="结束日期"
  105. :picker-options="pickerOptions"
  106. :disabled="lock"
  107. />
  108. </el-form-item>
  109. <el-form-item label="住院天数">
  110. <el-input-number v-model="formData1.AAC04_start" :min="1" :step="1" :controls="false" placeholder="起始天数" style="width: 220px" :disabled="lock"></el-input-number>
  111. <span class="pind10" />
  112. <el-input-number v-model="formData1.AAC04_end" :min="1" :step="1" :controls="false" placeholder="终止天数" style="width: 220px" :disabled="lock"></el-input-number>
  113. </el-form-item>
  114. <el-form-item label="患者年龄">
  115. <el-input-number
  116. v-model="formData1.AAA04_start"
  117. :min="1"
  118. :step="1"
  119. :controls="false"
  120. :placeholder="formData1.ageType1 ? '起始年龄' : '起始天数'"
  121. style="width: 220px"
  122. :disabled="lock"
  123. ></el-input-number>
  124. <el-select v-model="formData1.ageType1" :disabled="lock" placeholder="请选择" style="width: 80px">
  125. <el-option label="年龄" :value="1"></el-option>
  126. <el-option label="天数" :value="0"></el-option>
  127. </el-select>
  128. <span class="pind10" />
  129. ——
  130. <span class="pind10" />
  131. <el-input-number
  132. v-model="formData1.AAA04_end"
  133. :min="1"
  134. :step="1"
  135. :controls="false"
  136. :placeholder="formData1.ageType2 ? '终止年龄' : '终止天数'"
  137. style="width: 220px"
  138. :disabled="lock"
  139. ></el-input-number>
  140. <el-select v-model="formData1.ageType2" :disabled="lock" placeholder="请选择" style="width: 80px">
  141. <el-option label="年龄" :value="1"></el-option>
  142. <el-option label="天数" :value="0"></el-option>
  143. </el-select>
  144. </el-form-item>
  145. <el-form-item label="住院号码">
  146. <el-input v-model="formData1.AAA28" placeholder="请输入" style="width: 220px"></el-input>
  147. </el-form-item>
  148. </el-form>
  149. </div>
  150. <div v-if="choice == 1" class="fBtn" style="position: relative">
  151. <el-button class="btn11" @click="reset">重置条件</el-button>
  152. <el-button type="primary" class="long-btn" @click="searchBtn(1)">检索</el-button>
  153. </div>
  154. <!-- 专业检索 -->
  155. <ProfessionSearchVue ref="professionSearch" v-if="choice == 2" @search="handleProfessionSearchFn" @export="handelExport" @reset="handleReset" />
  156. </div>
  157. <div class="tableBox">
  158. <div class="flextab" style="margin: 0; margin-bottom: 30px; display: block">
  159. <div class="flextabtitle-box">
  160. <div class="h-title">
  161. <span class="blue" />
  162. <span class="text">检索结果</span>
  163. <span v-if="paginationData.total != 0" class="titleName">
  164. 找到
  165. <span class="title-left-span">{{ paginationData.total }}</span>
  166. 个例条相关结果
  167. </span>
  168. </div>
  169. </div>
  170. </div>
  171. <el-radio-group v-model="onClass">
  172. <el-radio-button label="0">列表</el-radio-button>
  173. <el-radio-button label="1">详情</el-radio-button>
  174. </el-radio-group>
  175. <div class="title-right" v-if="!isWhitelist">
  176. <el-button v-if="choice == 0" type="primary" icon="el-icon-download" @click="normalDownload('住院病历-普通检索')" style="margin-left: 20px;" class="export-btn">导出数据</el-button>
  177. <el-button v-if="choice == 1" type="primary" icon="el-icon-download" @click="highDownload('住院病历-高级检索')" style="margin-left: 20px;" class="export-btn">导出数据</el-button>
  178. <el-button v-if="choice == 2" type="primary" icon="el-icon-download" @click="onExport" style="margin-left: 20px;" class="export-btn">导出数据</el-button>
  179. </div>
  180. <div v-if="onClass == '0'" class="conter" style="border: none">
  181. <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange" @sort-change="handleSortChange">
  182. <el-table-column type="index" :index="indexAdd" label="序号" width="70px" />
  183. <el-table-column prop="AAA28" label="住院号码">
  184. <template slot-scope="scope">
  185. <span class="blue" @click="funGoto(scope.row.MED_REC_ID ? scope.row.MED_REC_ID : scope.row.ZYH)">
  186. <template>
  187. <div>
  188. {{ scope.row.AAA28 }}
  189. </div>
  190. </template>
  191. </span>
  192. </template>
  193. </el-table-column>
  194. <el-table-column prop="AAA04" label="年龄" />
  195. <el-table-column prop="AAC11N" label="出院科室" />
  196. <el-table-column prop="AAB01" label="入院时间" sortable />
  197. <el-table-column prop="AAC01" label="出院时间" sortable />
  198. </el-table>
  199. <!-- 分页控制 -->
  200. </div>
  201. <div v-for="(item, index) in tableDataDetails" :key="index">
  202. <div v-if="onClass == '1'" class="conter" style="padding: 20px;">
  203. <!-- 普通检索、高级检索 -->
  204. <div v-if="choice !=2">
  205. <div v-for="(i, j) in item.EMR_BL_BL01" :key="j">
  206. <div class="conter-title">
  207. <span>{{ paginationData.pageSize * (paginationData.currentPage - 1) + (index + 1) }}.{{ j + 1 }}</span>
  208. 病历名称:
  209. <span v-for="(k, q) in fieldList" :key="q" class="blue">{{ i.BLLB == k.id ? k.name : '' }}</span>
  210. </div>
  211. <div class="conter-case">
  212. <div v-html="i.HJNR" />
  213. </div>
  214. </div>
  215. <!-- 结账单 -->
  216. <div v-if="item.FeeDetailed && item.FeeDetailed.length" style="margin-bottom: 20px">
  217. <span class="conter-title">{{ paginationData.pageSize * (paginationData.currentPage - 1) + (index + 1) }}.{{ item.EMR_BL_BL01.length + 1 }}</span>
  218. <el-table :data="item.FeeDetailed" stripe style="width: 100%">
  219. <el-table-column prop="FYMC" label="费用名称">
  220. <template slot-scope="scope">
  221. <span v-html="scope.row.FYMC[0]"></span>
  222. </template>
  223. </el-table-column>
  224. <el-table-column prop="JFRQ" label="计费日期"></el-table-column>
  225. <el-table-column prop="FYSL" label="费用数量"></el-table-column>
  226. </el-table>
  227. </div>
  228. <!-- 医嘱本 -->
  229. <div v-if="item.YZB && item.YZB.length" style="margin-bottom: 20px">
  230. <span class="conter-title" v-if="!item.FeeDetailed.length">
  231. {{ paginationData.pageSize * (paginationData.currentPage - 1) + (index + 1) }}.{{ item.EMR_BL_BL01.length + 1 }}
  232. </span>
  233. <span class="conter-title" v-else>{{ paginationData.pageSize * (paginationData.currentPage - 1) + (index + 1) }}.{{ item.EMR_BL_BL01.length + 2 }}</span>
  234. <el-table :data="item.YZB" stripe style="width: 100%">
  235. <el-table-column prop="YZMC" label="医嘱名称">
  236. <template slot-scope="scope">
  237. <!-- 高级搜索 -->
  238. <span v-if="choice" v-html="scope.row.YZMC"></span>
  239. <!-- 普通搜索 -->
  240. <span v-else v-html="scope.row.YZMC[0]"></span>
  241. </template>
  242. </el-table-column>
  243. <el-table-column prop="BRKS" label="开嘱科室"></el-table-column>
  244. <el-table-column prop="KZSJ" label="开嘱时间"></el-table-column>
  245. <el-table-column prop="ZJE" label="医嘱期限"></el-table-column>
  246. </el-table>
  247. </div>
  248. <div class="conter-num" style="margin-top: 10px">
  249. 病案号:
  250. <span class="yeleou" @click="funGoto(item.MED_REC_ID)">{{ item.AAA28 }}</span>
  251. </div>
  252. <div class="conter-time">出院时间:{{ item.AAC01 }}</div>
  253. </div>
  254. <!-- 专业检索 -->
  255. <div v-if="choice == 2">
  256. <!-- 患者信息 -->
  257. <div v-if="item.patient_info">
  258. <el-descriptions title="患者信息">
  259. <el-descriptions-item label="住院号码" v-if="item.patient_info.AAA28">
  260. <span v-html="item.patient_info.AAA28" @click="funGoto(item.patient_info.MED_REC_ID ? item.patient_info.MED_REC_ID : item.patient_info.ZYH)" class="yeleou"></span>
  261. </el-descriptions-item>
  262. <el-descriptions-item label="出院科室" v-if="item.patient_info.AAC11N">
  263. <span v-html="item.patient_info.AAC11N"></span>
  264. </el-descriptions-item>
  265. <el-descriptions-item label="出院时间" v-if="item.patient_info.AAC01">
  266. <span v-html="item.patient_info.AAC01"></span>
  267. </el-descriptions-item>
  268. <el-descriptions-item label="姓名" v-if="item.patient_info.AAA01">
  269. <span v-html="item.patient_info.AAA01"></span>
  270. </el-descriptions-item>
  271. <el-descriptions-item label="性别" v-if="item.patient_info.AAA02C">
  272. <span v-html="item.patient_info.AAA02C"></span>
  273. </el-descriptions-item>
  274. <el-descriptions-item label="入院时间" v-if="item.patient_info.AAB01">
  275. <span v-html="item.patient_info.AAB01"></span>
  276. </el-descriptions-item>
  277. <el-descriptions-item label="住院天数" v-if="item.patient_info.AAC04">
  278. <span v-html="item.patient_info.AAC04"></span>
  279. </el-descriptions-item>
  280. <el-descriptions-item label="年龄" v-if="item.patient_info.AAA04 || item.patient_info.AAA40">
  281. <span v-html="item.patient_info.AAA04 ? item.patient_info.AAA04 : item.patient_info.AAA40 "></span>
  282. </el-descriptions-item>
  283. </el-descriptions>
  284. </div>
  285. <!-- 入院记录 -->
  286. <div v-if="item.ryjl">
  287. <el-descriptions title="入院记录" :column="1">
  288. <el-descriptions-item label="整体" v-if="item.ryjl.RYJL_HJNR">
  289. <span v-html="item.ryjl.RYJL_HJNR"></span>
  290. </el-descriptions-item>
  291. <el-descriptions-item label="主诉" v-if="item.ryjl.RYJL_ZHS">
  292. <span v-html="item.ryjl.RYJL_ZHS"></span>
  293. </el-descriptions-item>
  294. <el-descriptions-item label="现病史" v-if="item.ryjl.RYJL_XBS">
  295. <span v-html="item.ryjl.RYJL_XBS"></span>
  296. </el-descriptions-item>
  297. <el-descriptions-item label="既往史" v-if="item.ryjl.RYJL_JWS">
  298. <span v-html="item.ryjl.RYJL_JWS"></span>
  299. </el-descriptions-item>
  300. <el-descriptions-item label="个人史" v-if="item.ryjl.RYJL_GRS">
  301. <span v-html="item.ryjl.RYJL_GRS"></span>
  302. </el-descriptions-item>
  303. <el-descriptions-item label="月经及婚育史+婚育史" v-if="item.ryjl.RYJL_YJJHYS">
  304. <span v-html="item.ryjl.RYJL_YJJHYS"></span>
  305. </el-descriptions-item>
  306. <el-descriptions-item label="家族史" v-if="item.ryjl.RYJL_JZS">
  307. <span v-html="item.ryjl.RYJL_JZS"></span>
  308. </el-descriptions-item>
  309. <el-descriptions-item label="体格检查" v-if="item.ryjl.RYJL_TGJC">
  310. <span v-html="item.ryjl.RYJL_TGJC"></span>
  311. </el-descriptions-item>
  312. <el-descriptions-item label="专科检查" v-if="item.ryjl.RYJL_ZHUANKE">
  313. <span v-html="item.ryjl.RYJL_ZHUANKE"></span>
  314. </el-descriptions-item>
  315. <el-descriptions-item label="辅助检查" v-if="item.ryjl.RYJL_FZJC">
  316. <span v-for="(aItem, aIndex) of JSON.parse(item.ryjl.RYJL_FZJC)" :key="aIndex">
  317. <span v-if="aIndex">;</span>
  318. <span v-html="aItem"></span>
  319. </span>
  320. </el-descriptions-item>
  321. <el-descriptions-item label="初步诊断" v-if="item.ryjl.RYJL_CBZD">
  322. <span v-for="(aItem, aIndex) of JSON.parse(item.ryjl.RYJL_CBZD)" :key="aIndex">
  323. <span v-if="aIndex">;</span>
  324. <span v-html="aItem"></span>
  325. </span>
  326. </el-descriptions-item>
  327. <el-descriptions-item label="第一初步诊断" v-if="item.ryjl.RYJL_CBZB">
  328. <span v-html="item.ryjl.RYJL_CBZB"></span>
  329. </el-descriptions-item>
  330. </el-descriptions>
  331. </div>
  332. <!-- 病程记录 -->
  333. <div v-if="item.bcjl_scbc">
  334. <el-descriptions title="病程记录" :column="1">
  335. <el-descriptions-item label="整体" v-if="item.bcjl_scbc.BCJL_SCBC_HJNR">
  336. <span v-html="item.bcjl_scbc.BCJL_SCBC_HJNR"></span>
  337. </el-descriptions-item>
  338. <el-descriptions-item label="病历特点" v-if="item.bcjl_scbc.BCJL_SCBC_BLTD">
  339. <span v-html="item.bcjl_scbc.BCJL_SCBC_BLTD"></span>
  340. </el-descriptions-item>
  341. <el-descriptions-item label="第一初步诊断" v-if="item.bcjl_scbc.BCJL_SCBC_CBZD_ONE">
  342. <span v-html="item.bcjl_scbc.BCJL_SCBC_CBZD_ONE"></span>
  343. </el-descriptions-item>
  344. <el-descriptions-item label="其他初步诊断" v-if="item.bcjl_scbc.BCJL_SCBC_CBZD_OTHER">
  345. <span v-for="(aItem, aIndex) of JSON.parse(item.bcjl_scbc.BCJL_SCBC_CBZD_OTHER)" :key="aIndex">
  346. <span v-if="aIndex">;</span>
  347. <span v-html="aItem"></span>
  348. </span>
  349. </el-descriptions-item>
  350. <el-descriptions-item label="诊断依据" v-if="item.bcjl_scbc.BCJL_SCBC_ZDYJ">
  351. <span v-for="(aItem, aIndex) of JSON.parse(item.bcjl_scbc.BCJL_SCBC_ZDYJ)" :key="aIndex">
  352. <span v-if="aIndex">;</span>
  353. <span v-html="aItem"></span>
  354. </span>
  355. </el-descriptions-item>
  356. <el-descriptions-item label="鉴别诊断" v-if="item.bcjl_scbc.BCJL_SCBC_JBZD">
  357. <span v-for="(aItem, aIndex) of JSON.parse(item.bcjl_scbc.BCJL_SCBC_JBZD)" :key="aIndex">
  358. <span v-if="aIndex">;</span>
  359. <span v-html="aItem"></span>
  360. </span>
  361. </el-descriptions-item>
  362. <el-descriptions-item label="鉴别诊断名称" v-if="item.bcjl_scbc.BCJL_SCBC_JBZDMC">
  363. <span v-for="(aItem, aIndex) of JSON.parse(item.bcjl_scbc.BCJL_SCBC_JBZDMC)" :key="aIndex">
  364. <span v-if="aIndex">;</span>
  365. <span v-html="aItem"></span>
  366. </span>
  367. </el-descriptions-item>
  368. <el-descriptions-item label="诊疗记录" v-if="item.bcjl_scbc.BCJL_SCBC_ZLJH">
  369. <span v-for="(aItem, aIndex) of JSON.parse(item.bcjl_scbc.BCJL_SCBC_ZLJH)" :key="aIndex">
  370. <span v-if="aIndex">;</span>
  371. <span v-html="aItem"></span>
  372. </span>
  373. </el-descriptions-item>
  374. </el-descriptions>
  375. </div>
  376. </div>
  377. </div>
  378. </div>
  379. <el-pagination
  380. v-if="tableData && tableData.length !== 0"
  381. :total="paginationData.total"
  382. background
  383. class="table-pagination"
  384. style="margin: 15px 0px"
  385. :page-size="paginationData.pageSize"
  386. :current-page.sync="paginationData.currentPage"
  387. layout="total, sizes, prev, pager, next, jumper"
  388. @size-change="SizeChangeEvent"
  389. @current-change="pageHasChanged"
  390. />
  391. </div>
  392. </div>
  393. </template>
  394. <script>
  395. import Title from '@/components/Title';
  396. import { mapGetters } from 'vuex';
  397. import mPagination from '@/components/m-pagination';
  398. import { bassNormalSearchDownload, bassHighSearchDownload, professionSearchExport } from '@/api/excel';
  399. import ProfessionSearchVue from './components/ProfessionSearch.vue';
  400. export default {
  401. props: {
  402. isWhitelist: {
  403. type: Boolean,
  404. default() {
  405. return false
  406. }
  407. }
  408. },
  409. components: {
  410. Title,
  411. mPagination,
  412. ProfessionSearchVue,
  413. },
  414. computed: {
  415. ...mapGetters(['name']),
  416. },
  417. data() {
  418. return {
  419. pickerOptions: {
  420. disabledDate(time) {
  421. return time.getTime() > Date.now();
  422. },
  423. },
  424. checked: false,
  425. choice: 0,
  426. formData0: {
  427. input: '',
  428. input1: '',
  429. },
  430. formData1: {
  431. ageday: '',
  432. age_start_type: 2,
  433. age_end_type: 2,
  434. ageyear: '',
  435. endTime: undefined,
  436. startTime: undefined,
  437. seniorList: [
  438. {
  439. select_type: 0,
  440. key: '',
  441. value: '',
  442. type: '0',
  443. lock: false,
  444. },
  445. ],
  446. seniorList1: [],
  447. hospitalizationon: '',
  448. hospitalizationin: '',
  449. AAC04_start: undefined,
  450. AAC04_end: undefined,
  451. AAA04_start: undefined,
  452. AAA04_end: undefined,
  453. ageType1: 1,
  454. ageType2: 1,
  455. AAA28: '',
  456. },
  457. tableData: [],
  458. tableDataDetails: [],
  459. paginationData: {
  460. total: 0,
  461. currentPage: 1,
  462. pageSize: 10,
  463. },
  464. fieldList: [
  465. { name: '出院记录', id: '1' },
  466. { name: '入院记录', id: '292' },
  467. { name: '病程记录', id: '294' },
  468. { name: '手术记录', id: '303' },
  469. { name: '病历讨论记录', id: '43' },
  470. { name: '授权同意类', id: '329' },
  471. { name: '评估评分表类', id: '79' },
  472. { name: '死亡记录类', id: '288' },
  473. { name: '24小时内记录类', id: '18' },
  474. { name: '医患沟通类', id: '34' },
  475. { name: '医疗常用表格', id: '87' },
  476. { name: '医嘱单', id: '49' },
  477. { name: '出院科室', id: 'AAC11N' },
  478. { name: '费用明细', id: 'FYMC' },
  479. { name: '报告单', id: '2000002' },
  480. { name: '主要诊断名称', id: 'ICD10_NAME' },
  481. { name: '主要诊断编码', id: 'ICD10_ID1' },
  482. ],
  483. keyList: [],
  484. Dayoptions: [],
  485. multipleSelection: [],
  486. onClass: 0,
  487. setListTwe: [],
  488. setList: [],
  489. departmentList: [],
  490. lock: false,
  491. searchNum: 0,
  492. professionSearchData: {},
  493. // 排序
  494. sort: [],
  495. is_tm_path: ['/hospital-caseViews', '/embedIndex-caseViews', '/reviewIndex-caseViews', '/whitelist-caseViews', '/whitelist-search']
  496. };
  497. },
  498. mounted() {
  499. if (this.storageGet('inputOn')) {
  500. this.formData0.input = JSON.parse(this.storageGet('inputOn'));
  501. this.storageRemove('inputOn');
  502. }
  503. if (this.storageGet('formData1')) {
  504. this.formData1 = JSON.parse(this.storageGet('formData1'));
  505. this.storageRemove('formData1');
  506. }
  507. if (this.storageGet('choice')) {
  508. this.choice = Number(this.storageGet('choice'));
  509. this.storageRemove('choice');
  510. }
  511. if (this.storageGet('setList')) {
  512. this.setList = JSON.parse(this.storageGet('setList'));
  513. }
  514. this.selectInfo();
  515. this.funQuery(0);
  516. },
  517. created() {},
  518. methods: {
  519. // table 字段排序
  520. handleSortChange(column) {
  521. const { prop, order } = column;
  522. let str = '';
  523. if (order === 'descending') {
  524. str = 'desc';
  525. } else if (order === 'ascending') {
  526. str = 'asc';
  527. } else {
  528. str = null;
  529. }
  530. if (str) {
  531. this.$set(this.sort, 0, prop)
  532. this.$set(this.sort, 1, str)
  533. } else {
  534. this.sort = []
  535. }
  536. this.tableData = [];
  537. if (this.choice == 2) {
  538. this.handleProfessionSearch(this.professionSearchData)
  539. } else {
  540. this.funQuery(this.searchNum);
  541. }
  542. },
  543. // 普通下载
  544. normalDownload(name) {
  545. const params = {
  546. keyword: this.formData0.input,
  547. AAC01_start: this.formData1.startTime,
  548. AAC01_end: this.formData1.endTime,
  549. };
  550. bassNormalSearchDownload(params).then(res => {
  551. const content = res.data; // 后台返回二进制数据
  552. const blob = new Blob([content]);
  553. const fileName = `${name}.csv`;
  554. if ('download' in document.createElement('a')) {
  555. // 非IE下载
  556. const elink = document.createElement('a');
  557. elink.download = fileName;
  558. elink.style.display = 'none';
  559. elink.href = URL.createObjectURL(blob);
  560. document.body.appendChild(elink);
  561. elink.click();
  562. URL.revokeObjectURL(elink.href); // 释放URL 对象
  563. document.body.removeChild(elink);
  564. } else {
  565. // IE10+下载
  566. navigator.msSaveBlob(blob, fileName);
  567. }
  568. });
  569. },
  570. // 高级搜索下载
  571. highDownload(name) {
  572. const pramse = {};
  573. pramse.field = this.formData1.seniorList;
  574. pramse.AAC01_start = this.formData1.startTime;
  575. pramse.AAC01_end = this.formData1.endTime;
  576. pramse.AAA28 = this.formData1.AAA28;
  577. pramse.AAC04_start = this.formData1.AAC04_start;
  578. pramse.AAC04_end = this.formData1.AAC04_end;
  579. const { ageType1, ageType2 } = this.formData1;
  580. // ageType1 = 1 年龄
  581. // ageType1 = 0 天数
  582. if (ageType1) {
  583. pramse.AAA04_start = this.formData1.AAA04_start;
  584. } else {
  585. pramse.AAA40_start = this.formData1.AAA04_start;
  586. }
  587. if (ageType2) {
  588. pramse.AAA04_end = this.formData1.AAA04_end;
  589. } else {
  590. pramse.AAA40_end = this.formData1.AAA04_end;
  591. }
  592. bassHighSearchDownload(pramse).then(res => {
  593. const content = res.data; // 后台返回二进制数据
  594. const blob = new Blob([content]);
  595. const fileName = `${name}.csv`;
  596. if ('download' in document.createElement('a')) {
  597. // 非IE下载
  598. const elink = document.createElement('a');
  599. elink.download = fileName;
  600. elink.style.display = 'none';
  601. elink.href = URL.createObjectURL(blob);
  602. document.body.appendChild(elink);
  603. elink.click();
  604. URL.revokeObjectURL(elink.href); // 释放URL 对象
  605. document.body.removeChild(elink);
  606. } else {
  607. // IE10+下载
  608. navigator.msSaveBlob(blob, fileName);
  609. }
  610. });
  611. },
  612. // 结果中查询
  613. onLockResult() {
  614. this.lock = true;
  615. this.formData1.seniorList.map(item => {
  616. if (!!item.value) {
  617. item.lock = true;
  618. } else {
  619. item.lock = false;
  620. }
  621. });
  622. this.funAdd();
  623. },
  624. indexAdd(index) {
  625. return index + 1 + (this.paginationData.currentPage - 1) * this.paginationData.pageSize;
  626. },
  627. funSelect(index) {
  628. // 建坤:切换时,取消input 重置
  629. // this.formData1.seniorList[index].value = "";
  630. },
  631. selectInfo() {
  632. this.$axios.post('/selectInfo').then(res => {
  633. // 支付方式 pay
  634. this.departmentList = res.data.department;
  635. });
  636. },
  637. funGoto(val) {
  638. this.storageSet('inputOn', JSON.stringify(this.formData0.input));
  639. this.storageSet('formData1', JSON.stringify(this.formData1));
  640. this.storageSet('choice', JSON.stringify(this.choice));
  641. this.storageSet('getData', val);
  642. const { path } = this.$route;
  643. let toPath;
  644. if (path === '/hospital-search') {
  645. toPath = '/hospital-caseViews';
  646. } else {
  647. toPath = '/caseViews';
  648. }
  649. // status = 1 代表不能复制文本
  650. this.$router.push({ path: toPath });
  651. },
  652. funCeal() {
  653. this.$refs.multipleTable.clearSelection();
  654. },
  655. funSetformData2() {
  656. this.formData1.seniorList = this.formData1.seniorList1;
  657. },
  658. funSetList() {
  659. this.formData0.input = String(this.formData0.input1);
  660. },
  661. funOnclass(val) {
  662. this.onClass = val;
  663. },
  664. handleSelectionChange(val) {
  665. this.multipleSelection = val;
  666. },
  667. SizeChangeEvent(val) {
  668. this.paginationData.pageSize = val;
  669. const num = this.lock ? 1 : 0;
  670. if (this.choice == 2) {
  671. this.handleProfessionSearch(this.professionSearchData)
  672. } else {
  673. this.funQuery(num);
  674. }
  675. },
  676. pageHasChanged(val) {
  677. this.paginationData.currentPage = val
  678. const num = this.lock ? 1 : 0;
  679. if (this.choice == 2) {
  680. this.handleProfessionSearch(this.professionSearchData)
  681. } else {
  682. this.funQuery(num);
  683. }
  684. },
  685. funBlur() {
  686. if (this.formData1.ageday > 356) {
  687. this.formData1.ageday = 356;
  688. }
  689. if (this.formData1.ageyear > 150) {
  690. this.formData1.ageyear = 150;
  691. }
  692. },
  693. funBluron() {
  694. if (this.formData1.hospitalizationon && this.formData1.hospitalizationin) {
  695. if (this.formData1.hospitalizationon > this.formData1.hospitalizationin) {
  696. this.$message('起止住院天数输入不正确');
  697. }
  698. }
  699. },
  700. funDel(i) {
  701. const index = i;
  702. if (index == 0) {
  703. return;
  704. }
  705. const list = this.formData1.seniorList;
  706. list.splice(index, 1);
  707. this.formData1.seniorList = list;
  708. },
  709. funAdd() {
  710. this.formData1.seniorList.push({
  711. key: '',
  712. select_type: 0,
  713. value: '',
  714. type: '0',
  715. lock: false,
  716. });
  717. },
  718. funQuery(num) {
  719. const pramse = {
  720. limit: this.paginationData.pageSize,
  721. page: this.paginationData.currentPage // 是当前页数 默认是0 。普通检索的参数是
  722. };
  723. if (this.$route.query.code) {
  724. pramse.code = this.$route.query.code
  725. }
  726. if (this.sort.length) {
  727. pramse.sort = this.sort
  728. }
  729. let queryUrl = 'normalSearch';
  730. if (this.choice == '0') {
  731. queryUrl = 'normalSearch';
  732. // 普通检索
  733. pramse.keyword = this.formData0.input; // 关键字
  734. pramse.AAC01_start = this.formData1.startTime;
  735. pramse.AAC01_end = this.formData1.endTime;
  736. if (this.is_tm_path.includes(this.$route.path)) {
  737. pramse.is_tm = 1;
  738. }
  739. this.$axios3.post(queryUrl, pramse).then(res => {
  740. this.tableData = res.data.data.list || [];
  741. this.tableDataDetails = res.data.data.detail || [];
  742. this.paginationData.total = res.data.data.total;
  743. if (this.choice == '0' && this.formData0.input) {
  744. this.setList.push(String(this.formData0.input));
  745. const listSetto = Array.from(new Set(this.setList));
  746. this.setList = listSetto;
  747. this.storageSet('setList', JSON.stringify(this.setList));
  748. }
  749. });
  750. } else {
  751. queryUrl = 'search';
  752. // 高级检索
  753. pramse.field = this.formData1.seniorList;
  754. pramse.AAC01_start = this.formData1.startTime;
  755. pramse.AAC01_end = this.formData1.endTime;
  756. pramse.AAA28 = this.formData1.AAA28;
  757. pramse.AAC04_start = this.formData1.AAC04_start;
  758. pramse.AAC04_end = this.formData1.AAC04_end;
  759. this.searchNum = num;
  760. const { ageType1, ageType2 } = this.formData1;
  761. // ageType1 = 1 年龄
  762. // ageType1 = 0 天数
  763. if (ageType1) {
  764. pramse.AAA04_start = this.formData1.AAA04_start;
  765. } else {
  766. pramse.AAA40_start = this.formData1.AAA04_start;
  767. }
  768. if (ageType2) {
  769. pramse.AAA04_end = this.formData1.AAA04_end;
  770. } else {
  771. pramse.AAA40_end = this.formData1.AAA04_end;
  772. }
  773. if (this.is_tm_path.includes(this.$route.path)) {
  774. pramse.is_tm = 1;
  775. }
  776. this.$axios3.post(queryUrl, pramse).then(res => {
  777. this.tableData = res.data.data.list || [];
  778. this.tableDataDetails = res.data.data.detail || [];
  779. this.paginationData.total = res.data.data.total;
  780. if (this.choice == '0' && this.formData0.input) {
  781. this.setList.push(String(this.formData0.input));
  782. const listSetto = Array.from(new Set(this.setList));
  783. this.setList = listSetto;
  784. this.storageSet('setList', JSON.stringify(this.setList));
  785. }
  786. });
  787. }
  788. },
  789. searchBtn(num) {
  790. this.paginationData.currentPage = 1;
  791. this.funQuery(num);
  792. },
  793. funBluron() {
  794. if (this.formData1.hospitalizationon && this.formData1.hospitalizationin) {
  795. if (this.formData1.hospitalizationon > this.formData1.hospitalizationin) {
  796. this.$message('起止住院天数输入不正确');
  797. }
  798. }
  799. },
  800. reset() {
  801. // 重置数据
  802. if (this.choice == 0) {
  803. Object.assign(this.$data.formData0, this.$options.data().formData0);
  804. } else {
  805. this.lock = false;
  806. this.searchNum = 0;
  807. Object.assign(this.$data.formData1, this.$options.data().formData1);
  808. }
  809. },
  810. // 专业检索
  811. handleProfessionSearchFn(params) {
  812. this.paginationData.currentPage = 1
  813. this.handleProfessionSearch(params)
  814. },
  815. handleProfessionSearch(params) {
  816. this.professionSearchData = params
  817. const { pageSize, currentPage } = this.paginationData
  818. const queryData = {
  819. ...params,
  820. page_size: pageSize,
  821. page: currentPage
  822. }
  823. if (this.$route.query.code) {
  824. queryData.code = this.$route.query.code
  825. }
  826. if (this.sort.length) {
  827. queryData.sort = this.sort
  828. }
  829. if (this.is_tm_path.includes(this.$route.path)) {
  830. queryData.is_tm = 1;
  831. }
  832. this.$axios3.post('/bl/serach', queryData).then(res => {
  833. this.tableData = res.data.list || [];
  834. this.tableDataDetails = res.data.detail || [];
  835. this.paginationData.total = res.data.total;
  836. });
  837. },
  838. // 判断对象是否为空
  839. isObject(form){
  840. let a = 0
  841. for(let key in form){
  842. if(!!form[key]){
  843. a++
  844. }
  845. }
  846. if (a) {
  847. return false
  848. } else {
  849. return true
  850. }
  851. },
  852. // 导出
  853. onExport() {
  854. this.$refs.professionSearch.onExport()
  855. },
  856. handelExport(params) {
  857. professionSearchExport(params).then(res => {
  858. const content = res.data; // 后台返回二进制数据
  859. const blob = new Blob([content]);
  860. const fileName = `住院病历-专业检索.csv`;
  861. if ('download' in document.createElement('a')) {
  862. // 非IE下载
  863. const elink = document.createElement('a');
  864. elink.download = fileName;
  865. elink.style.display = 'none';
  866. elink.href = URL.createObjectURL(blob);
  867. document.body.appendChild(elink);
  868. elink.click();
  869. URL.revokeObjectURL(elink.href); // 释放URL 对象
  870. document.body.removeChild(elink);
  871. } else {
  872. // IE10+下载
  873. navigator.msSaveBlob(blob, fileName);
  874. }
  875. });
  876. },
  877. // 重置
  878. handleReset() {
  879. this.paginationData.currentPage = 1
  880. this.handleProfessionSearch({})
  881. },
  882. // 检索类型变化
  883. handleRadioChange(val) {
  884. if (val == 2) {
  885. this.paginationData.currentPage = 1
  886. this.handleProfessionSearch({})
  887. }
  888. }
  889. },
  890. };
  891. </script>
  892. <style scoped>
  893. ::v-deep.el-pagination.is-background .btn-next,
  894. ::v-deep.el-pagination.is-background .btn-prev,
  895. ::v-deep.el-pagination.is-background .el-pager li {
  896. margin: 0 5px;
  897. background-color: #fff;
  898. color: #606266;
  899. min-width: 30px;
  900. border-radius: 2px;
  901. border: 1px solid #dfe3f3;
  902. line-height: 27px;
  903. }
  904. ::v-deep.el-pagination.is-background .el-pager li:not(.disabled).active {
  905. background: #7e8bab;
  906. }
  907. ::v-deep.el-table .el-table__row td {
  908. color: #7e8bab;
  909. border-bottom: 1px solid #f4f4f4;
  910. }
  911. ::v-deep.el-table .el-table__header tr th:first-child {
  912. border-radius: 10px 0px 0px 10px;
  913. }
  914. ::v-deep.el-table .el-table__header tr th:last-child {
  915. border-radius: 0px 10px 10px 0px;
  916. }
  917. ::v-deep.el-table .el-table__header tr th {
  918. background: #f1f6ff;
  919. color: #13171e;
  920. border-bottom: 0px;
  921. }
  922. </style>
  923. <style lang="scss" scoped>
  924. .tableBox {
  925. background: #fff;
  926. padding: 19px;
  927. border-radius: 5px;
  928. font-size: 12px;
  929. }
  930. .block {
  931. background: #fff;
  932. border-radius: 5px;
  933. margin-bottom: 16px;
  934. padding: 20px;
  935. margin-bottom: 20px;
  936. .fBtn {
  937. margin-bottom: 20px;
  938. display: flex;
  939. align-items: center;
  940. justify-content: center;
  941. .btn11 {
  942. position: absolute;
  943. right: 0;
  944. }
  945. }
  946. .bnh {
  947. margin: 0 auto;
  948. margin-bottom: 20px;
  949. display: flex;
  950. flex-direction: column;
  951. align-items: center;
  952. justify-content: center;
  953. }
  954. .barBtn {
  955. display: flex;
  956. align-items: center;
  957. justify-content: center;
  958. }
  959. .selects {
  960. width: 100%;
  961. }
  962. .rowsa {
  963. margin-bottom: 20px;
  964. }
  965. }
  966. .tableBox {
  967. background: #fff;
  968. padding: 19px;
  969. border-radius: 5px;
  970. }
  971. .dashboard {
  972. &-container {
  973. margin: 30px;
  974. }
  975. &-text {
  976. font-size: 30px;
  977. line-height: 46px;
  978. }
  979. }
  980. .pind {
  981. padding: 0 20px;
  982. }
  983. .pind10 {
  984. padding: 0 5px;
  985. }
  986. .width100 {
  987. width: 100px;
  988. }
  989. .width150 {
  990. width: 200px;
  991. }
  992. .width300 {
  993. width: 295px;
  994. }
  995. .width500 {
  996. width: 280px;
  997. }
  998. .width90 {
  999. width: 90px;
  1000. }
  1001. .blue {
  1002. color: #185da6;
  1003. }
  1004. .h-title {
  1005. display: flex;
  1006. .blue {
  1007. display: block;
  1008. width: 6px;
  1009. height: 17px;
  1010. background: linear-gradient(180deg, #185da6 0%, #3195ff 100%);
  1011. border-radius: 3px;
  1012. }
  1013. .text {
  1014. font-size: 16px;
  1015. font-weight: 600;
  1016. color: #13171e;
  1017. margin: 0 0 0 14px;
  1018. }
  1019. }
  1020. .flextab-item {
  1021. display: flex;
  1022. align-items: center;
  1023. margin-left: 20px;
  1024. }
  1025. .flextab-item > div {
  1026. font-size: 15px;
  1027. margin-right: 15px;
  1028. }
  1029. .flextab-item > div span.s-1 {
  1030. color: #185da6;
  1031. }
  1032. .flextab-item > div span.s-2 {
  1033. font-weight: bold;
  1034. }
  1035. .inputOn {
  1036. width: 200px;
  1037. margin: 10px 10px;
  1038. }
  1039. .search-title {
  1040. padding: 20px 10px;
  1041. // width: 900px;
  1042. display: flex;
  1043. justify-content: space-between;
  1044. }
  1045. .search-title-span {
  1046. font-size: 20px;
  1047. font-weight: 600;
  1048. color: #13171e;
  1049. }
  1050. .conter {
  1051. position: relative;
  1052. margin: 20px 0;
  1053. border: 1px solid skyblue;
  1054. border-radius: 5px;
  1055. }
  1056. .conter-title {
  1057. font-size: 16px;
  1058. font-weight: 600;
  1059. color: #13171e;
  1060. }
  1061. .blue {
  1062. color: #185da6;
  1063. font-size: 16px;
  1064. font-weight: 600;
  1065. }
  1066. .conter-case {
  1067. margin: 20px 0;
  1068. font-size: 15px;
  1069. text-indent: 30px;
  1070. line-height: 30px;
  1071. }
  1072. .conter-case1 {
  1073. margin: 0 auto;
  1074. margin: 50px 0;
  1075. }
  1076. .yeleou {
  1077. font-size: 16px;
  1078. color: rgb(233, 157, 66);
  1079. cursor: pointer;
  1080. font-weight: 600;
  1081. }
  1082. .conter-num {
  1083. font-size: 15px;
  1084. font-weight: 600;
  1085. }
  1086. .conter-time {
  1087. font-size: 15px;
  1088. padding-top: 10px;
  1089. font-weight: 600;
  1090. }
  1091. .onQuery {
  1092. padding: 0 20px;
  1093. color: rgb(233, 157, 66);
  1094. }
  1095. .cont-title {
  1096. width: 100%;
  1097. padding: 20px;
  1098. display: flex;
  1099. justify-content: space-between;
  1100. }
  1101. .title-left {
  1102. display: flex;
  1103. }
  1104. .title-right {
  1105. display: flex;
  1106. float: right;
  1107. & > div {
  1108. width: 150px;
  1109. border: 1px solid #d5e4ff;
  1110. text-align: center;
  1111. padding: 10px 0;
  1112. }
  1113. }
  1114. .title-right-data {
  1115. background: #3195ff;
  1116. color: #fff;
  1117. }
  1118. .title-left-p {
  1119. line-height: 38px;
  1120. padding: 0 20px;
  1121. font-size: 16px;
  1122. color: #13171e;
  1123. }
  1124. .title-left-span {
  1125. color: #3195ff;
  1126. font-size: 18px;
  1127. padding: 0 5px;
  1128. // font-weight: 600;
  1129. }
  1130. .title-left-btn {
  1131. margin: 0 0 0 40px;
  1132. }
  1133. .title-left-checked {
  1134. margin-top: 10px;
  1135. }
  1136. .conter-checked {
  1137. position: absolute;
  1138. top: 21px;
  1139. left: 30px;
  1140. }
  1141. .bule {
  1142. background: #3195ff !important;
  1143. color: #fff !important;
  1144. }
  1145. .titleName {
  1146. margin-left: 30px;
  1147. vertical-align: top;
  1148. }
  1149. .marginLeft {
  1150. margin-left: -110px;
  1151. }
  1152. ::v-deep .el-input-number .el-input__inner {
  1153. text-align: left;
  1154. }
  1155. </style>