DoctorOrderSearch.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. <template>
  2. <!-- 同views/query/adviceSearch 一致 -->
  3. <div class="dashboard-container">
  4. <div class="block">
  5. <div class="barBtn-title">医嘱查询</div>
  6. <div class="bnh"></div>
  7. <div class="barBtn">
  8. <el-form ref="form" :model="formData" label-width="100px">
  9. <el-form-item v-for="(item, index) in formData.seniorList" :key="index">
  10. <!-- 下拉框开始 -->
  11. <el-select class="width150" filterable v-model="item.key" placeholder="请选择" @change="funSelect(index)">
  12. <el-option v-for="(item, index) in fieldList" :label="item.name" :value="item.id" :key="index"></el-option>
  13. </el-select>
  14. <!-- 下拉框结束 -->
  15. <span class="pind10"></span>
  16. <span v-if="item.key == 'YZQX'">
  17. <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
  18. <el-option v-for="(item, index) in YZQXList" :key="index" :label="item.val" :value="item.id"></el-option>
  19. </el-select>
  20. </span>
  21. <span v-else-if="item.key == 'KZKS'">
  22. <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
  23. <el-option v-for="(item, index) in KZKSList" :key="index" :label="item.val" :value="item.id"></el-option>
  24. </el-select>
  25. </span>
  26. <span v-else-if="item.key == 'BRKS'">
  27. <el-select class="width150" filterable v-model="item.value" placeholder="请选择">
  28. <el-option v-for="(item, index) in BRKSList" :key="index" :label="item.val" :value="item.id"></el-option>
  29. </el-select>
  30. </span>
  31. <span v-else>
  32. <el-input class="width150" v-model="item.value" placeholder=""></el-input>
  33. </span>
  34. <!-- 中间选择输入框结束 -->
  35. <span class="pind10"></span>
  36. <span class="pind10"></span>
  37. <!-- 增减重置选项按钮开始 -->
  38. <span>
  39. <el-button :disabled="formData.seniorList.length == 1" v-if="index != 0" type="primary" icon="el-icon-minus" @click="funDel(index)"></el-button>
  40. <el-button type="primary" icon="el-icon-plus" @click="funAdd" v-if="index == formData.seniorList.length - 1"></el-button>
  41. </span>
  42. <!-- 增减重置选项按钮结束 -->
  43. </el-form-item>
  44. <el-form-item label="开嘱时间">
  45. <el-date-picker v-model="formData.startTime" type="date" format="yyyy 年 MM 月 dd 日" value-format="yyyyMMdd" placeholder="开始日期"></el-date-picker>
  46. <span class="pind10"></span>
  47. <el-date-picker v-model="formData.endTime" type="date" format="yyyy 年 MM 月 dd 日" value-format="yyyyMMdd" placeholder="结束日期"></el-date-picker>
  48. </el-form-item>
  49. </el-form>
  50. </div>
  51. <div class="fBtn" style="position: relative">
  52. <el-button class="btn1" style="position: absolute; right: 270px" @click="reset">重置条件</el-button>
  53. <el-button class="btn2" @click="seachFunQuery">检索</el-button>
  54. </div>
  55. </div>
  56. <div class="tableBox">
  57. <div class="flextab" style="margin: 0; margin-bottom: 15px">
  58. <div class="flextabtitle-box">
  59. <div class="h-title">
  60. <span class="blue"></span>
  61. <span class="text">病案医嘱列表</span>
  62. <span class="titleName" v-if="paginationData.total != 0">
  63. 例数:
  64. <span class="title-left-span">{{ paginationData.total }}</span>
  65. </span>
  66. </div>
  67. <el-button class="title-left-btn" @click="funExport()">导出Excel</el-button>
  68. </div>
  69. </div>
  70. <div class="conter" style="border: none">
  71. <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
  72. <el-table-column type="index" :index="indexAdd" label="序号" width="70px"></el-table-column>
  73. <el-table-column prop="AAA28" label="病案号">
  74. <template slot-scope="scope">
  75. <span class="blue" @click="funGoto(scope.row.ZYH)">
  76. <template>
  77. <div>
  78. {{ scope.row.AAA28 }}
  79. </div>
  80. </template>
  81. </span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column prop="AAB01" label="入院时间"></el-table-column>
  85. <el-table-column prop="YZMC" label="医嘱名称"></el-table-column>
  86. <el-table-column prop="YCJL" label="剂量"></el-table-column>
  87. <el-table-column prop="SYPC" label="用法"></el-table-column>
  88. <el-table-column prop="BRKS" label="病人科室"></el-table-column>
  89. <el-table-column prop="KZKS" label="开嘱科室"></el-table-column>
  90. <el-table-column prop="YZQX" label="医嘱期效"></el-table-column>
  91. <el-table-column prop="AAC01" label="出院时间"></el-table-column>
  92. </el-table>
  93. <!-- 分页控制 -->
  94. </div>
  95. <el-pagination
  96. v-if="tableData && tableData.length !== 0"
  97. @size-change="SizeChangeEvent"
  98. @current-change="pageHasChanged"
  99. :total="paginationData.total"
  100. background
  101. class="table-pagination"
  102. style="margin: 15px 0px"
  103. :page-size="paginationData.pageSize"
  104. :current-page.sync="paginationData.currentPage"
  105. layout="total, sizes, prev, pager, next, jumper"
  106. ></el-pagination>
  107. </div>
  108. </div>
  109. </template>
  110. <script>
  111. import { downloadFile } from '@/httpFile';
  112. import Title from '@/components/Title';
  113. import { mapGetters } from 'vuex';
  114. import mPagination from '@/components/m-pagination';
  115. export default {
  116. name: 'adviceSearch',
  117. components: {
  118. Title,
  119. mPagination,
  120. },
  121. computed: {
  122. ...mapGetters(['name']),
  123. },
  124. data() {
  125. return {
  126. choice: 0,
  127. formData: {
  128. endTime: '',
  129. startTime: '',
  130. seniorList: [
  131. {
  132. key: '',
  133. value: '',
  134. type: '0',
  135. },
  136. ],
  137. },
  138. tableData: [],
  139. paginationData: {
  140. total: 0,
  141. currentPage: 1,
  142. pageSize: 10,
  143. },
  144. fieldList: [],
  145. multipleSelection: [],
  146. setList: [],
  147. YZQXList: [], //医嘱起效列表
  148. KZKSList: [], //开嘱科室列表
  149. BRKSList: [], //病人列表
  150. };
  151. },
  152. mounted() {
  153. this.funQuery();
  154. },
  155. created() {
  156. this.searchCondition();
  157. },
  158. methods: {
  159. funGoto(val) {
  160. this.storageSet('getData', val);
  161. this.$router.push({ path: '/caseViews', query: { status: 1} })
  162. },
  163. indexAdd(index) {
  164. return index + 1 + (this.paginationData.currentPage - 1) * this.paginationData.pageSize;
  165. },
  166. funSelect(index) {
  167. this.formData.seniorList[index].value = '';
  168. },
  169. funSetList() {},
  170. handleSelectionChange(val) {
  171. this.multipleSelection = val;
  172. },
  173. SizeChangeEvent(val) {
  174. this.paginationData.pageSize = val;
  175. this.funQuery();
  176. },
  177. pageHasChanged() {
  178. this.funQuery();
  179. },
  180. seachFunQuery() {
  181. this.paginationData.currentPage = 1;
  182. this.funQuery();
  183. },
  184. funDel(i) {
  185. let index = i;
  186. if (index == 0) {
  187. return;
  188. }
  189. let list = this.formData.seniorList;
  190. list.splice(index, 1);
  191. this.formData.seniorList = list;
  192. },
  193. funAdd() {
  194. this.formData.seniorList.push({
  195. key: '',
  196. value: '',
  197. type: '0',
  198. });
  199. },
  200. funQuery() {
  201. let pramse = {
  202. limit: this.paginationData.pageSize,
  203. page: this.paginationData.currentPage, //是当前页数 默认是0 。普通检索的参数是
  204. };
  205. this.formData.seniorList.forEach(item => {
  206. if (item.key == 'AAA28') {
  207. pramse.AAA28 = item.value;
  208. }
  209. if (item.key == 'YZQX') {
  210. pramse.YZQX = item.value;
  211. }
  212. if (item.key == 'BRKS') {
  213. pramse.BRKS = item.value;
  214. }
  215. if (item.key == 'KZKS') {
  216. pramse.KZKS = item.value;
  217. }
  218. if (item.key == 'YZMC') {
  219. pramse.YZMC = item.value;
  220. }
  221. });
  222. pramse.start = this.formData.startTime;
  223. pramse.end = this.formData.endTime;
  224. this.$axios.post('/getDoctorAdvice', pramse).then(res => {
  225. this.tableData = res.data.list || [];
  226. this.paginationData.total = res.data.total;
  227. });
  228. },
  229. reset() {
  230. // 重置数据
  231. this.paginationData.currentPage = 1;
  232. Object.assign(this.$data.formData, this.$options.data().formData);
  233. this.funQuery();
  234. },
  235. searchCondition() {
  236. this.$axios.post('/doctorAdviceSelect').then(res => {
  237. res.data.forEach((item, index) => {
  238. item.id = item.key;
  239. if (item.key == 'YZQX') {
  240. let YZQXArr = Object.keys(item.value);
  241. YZQXArr.forEach((jitem, index) => {
  242. this.YZQXList.push({ id: jitem, val: item.value[jitem] });
  243. });
  244. }
  245. if (item.key == 'KZKS') {
  246. let KZKSArr = Object.keys(item.value);
  247. KZKSArr.forEach((jitem, index) => {
  248. this.KZKSList.push({ id: jitem, val: item.value[jitem] });
  249. });
  250. }
  251. if (item.key == 'BRKS') {
  252. let BRKSArr = Object.keys(item.value);
  253. BRKSArr.forEach((jitem, index) => {
  254. this.BRKSList.push({ id: jitem, val: item.value[jitem] });
  255. });
  256. }
  257. });
  258. this.fieldList = res.data;
  259. });
  260. },
  261. funExport() {
  262. //查询
  263. let pramse = {
  264. limit: this.paginationData.pageSize,
  265. page: this.paginationData.currentPage, //是当前页数 默认是0 。普通检索的参数是
  266. };
  267. this.formData.seniorList.forEach(item => {
  268. if (item.key == 'AAA28') {
  269. pramse.AAA28 = item.value;
  270. }
  271. if (item.key == 'YZQX') {
  272. pramse.YZQX = item.value;
  273. }
  274. if (item.key == 'BRKS') {
  275. pramse.BRKS = item.value;
  276. }
  277. if (item.key == 'KZKS') {
  278. pramse.KZKS = item.value;
  279. }
  280. if (item.key == 'YZMC') {
  281. pramse.YZMC = item.value;
  282. }
  283. });
  284. pramse.start = this.formData.startTime;
  285. pramse.end = this.formData.endTime;
  286. let fileName = '医嘱列表';
  287. let httpUrl = '/doctorAdviceExport';
  288. this.funExeclPost(fileName, pramse, httpUrl, 'xlsx');
  289. },
  290. funExeclPost(fileName, pramse, httpUrl, format) {
  291. //导出
  292. let httpUrls = '/api' + httpUrl;
  293. downloadFile(httpUrls, pramse, format, fileName).then(res => {
  294. console.error('111', res);
  295. });
  296. },
  297. },
  298. };
  299. </script>
  300. <style scoped>
  301. ::v-deep.el-pagination.is-background .btn-next,
  302. ::v-deep.el-pagination.is-background .btn-prev,
  303. ::v-deep.el-pagination.is-background .el-pager li {
  304. margin: 0 5px;
  305. background-color: #fff;
  306. color: #606266;
  307. min-width: 30px;
  308. border-radius: 2px;
  309. border: 1px solid #dfe3f3;
  310. line-height: 27px;
  311. }
  312. ::v-deep.el-pagination.is-background .el-pager li:not(.disabled).active {
  313. background: #7e8bab;
  314. }
  315. ::v-deep.el-table .el-table__row td {
  316. color: #7e8bab;
  317. border-bottom: 1px solid #f4f4f4;
  318. }
  319. ::v-deep.el-table .el-table__header tr th:first-child {
  320. border-radius: 10px 0px 0px 10px;
  321. }
  322. ::v-deep.el-table .el-table__header tr th:last-child {
  323. border-radius: 0px 10px 10px 0px;
  324. }
  325. ::v-deep.el-table .el-table__header tr th {
  326. background: #f1f6ff;
  327. color: #13171e;
  328. border-bottom: 0px;
  329. }
  330. </style>
  331. <style lang="scss" scoped>
  332. .tableBox {
  333. background: #fff;
  334. padding: 19px;
  335. border-radius: 5px;
  336. font-size: 12px;
  337. }
  338. .block {
  339. background: #fff;
  340. border-radius: 5px;
  341. margin-bottom: 16px;
  342. padding: 20px 30px;
  343. margin-bottom: 20px;
  344. .fBtn {
  345. margin-bottom: 20px;
  346. display: flex;
  347. align-items: center;
  348. justify-content: center;
  349. .btn1 {
  350. background: #185da6;
  351. color: #fff;
  352. }
  353. .btn2 {
  354. width: 200px;
  355. color: #185da6;
  356. background: #d5e4ff;
  357. }
  358. }
  359. .bnh {
  360. margin: 0 auto;
  361. margin-bottom: 20px;
  362. display: flex;
  363. flex-direction: column;
  364. align-items: center;
  365. justify-content: center;
  366. }
  367. .barBtn {
  368. display: flex;
  369. align-items: center;
  370. justify-content: center;
  371. }
  372. .barBtn-title {
  373. display: flex;
  374. align-items: center;
  375. justify-content: center;
  376. font-size: 24px;
  377. font-weight: bold;
  378. margin-top: 10px;
  379. }
  380. .selects {
  381. width: 100%;
  382. }
  383. .rowsa {
  384. margin-bottom: 20px;
  385. }
  386. }
  387. .tableBox {
  388. background: #fff;
  389. padding: 19px;
  390. border-radius: 5px;
  391. }
  392. .dashboard {
  393. &-container {
  394. margin: 30px;
  395. }
  396. &-text {
  397. font-size: 30px;
  398. line-height: 46px;
  399. }
  400. }
  401. .pind {
  402. padding: 0 20px;
  403. }
  404. .pind10 {
  405. padding: 0 5px;
  406. }
  407. .width100 {
  408. width: 100px;
  409. }
  410. .width150 {
  411. width: 200px;
  412. }
  413. .width300 {
  414. width: 295px;
  415. }
  416. .width500 {
  417. width: 420px;
  418. }
  419. .width90 {
  420. width: 90px;
  421. }
  422. .blue {
  423. color: #185da6;
  424. }
  425. .h-title {
  426. display: flex;
  427. .blue {
  428. display: block;
  429. width: 6px;
  430. height: 17px;
  431. background: linear-gradient(180deg, #185da6 0%, #3195ff 100%);
  432. border-radius: 3px;
  433. }
  434. .text {
  435. font-size: 16px;
  436. font-weight: 600;
  437. color: #13171e;
  438. margin: 0 0 0 14px;
  439. }
  440. }
  441. .flextabtitle-box {
  442. display: flex;
  443. align-items: center;
  444. justify-content: space-between;
  445. width: 100%;
  446. }
  447. .flextab-item {
  448. display: flex;
  449. align-items: center;
  450. margin-left: 20px;
  451. }
  452. .flextab-item > div {
  453. font-size: 15px;
  454. margin-right: 15px;
  455. }
  456. .flextab-item > div span.s-1 {
  457. color: #185da6;
  458. }
  459. .flextab-item > div span.s-2 {
  460. font-weight: bold;
  461. }
  462. .inputOn {
  463. width: 200px;
  464. margin: 10px 10px;
  465. }
  466. .search-title {
  467. padding: 20px 10px;
  468. // width: 900px;
  469. display: flex;
  470. justify-content: space-between;
  471. }
  472. .search-title-span {
  473. font-size: 20px;
  474. font-weight: 600;
  475. color: #13171e;
  476. }
  477. .conter {
  478. position: relative;
  479. margin: 20px 0;
  480. border: 1px solid skyblue;
  481. }
  482. .conter-title {
  483. font-size: 16px;
  484. font-weight: 600;
  485. color: #13171e;
  486. }
  487. .blue {
  488. color: #185da6;
  489. font-size: 16px;
  490. font-weight: 600;
  491. }
  492. .conter-case {
  493. margin: 20px 0;
  494. font-size: 15px;
  495. text-indent: 30px;
  496. line-height: 30px;
  497. }
  498. .conter-case1 {
  499. margin: 0 auto;
  500. margin: 50px 0;
  501. }
  502. .yeleou {
  503. font-size: 16px;
  504. color: rgb(233, 157, 66);
  505. }
  506. .conter-num {
  507. font-size: 15px;
  508. padding-top: 30px;
  509. font-weight: 600;
  510. }
  511. .conter-time {
  512. font-size: 15px;
  513. padding-top: 10px;
  514. font-weight: 600;
  515. }
  516. .onQuery {
  517. padding: 0 20px;
  518. color: rgb(233, 157, 66);
  519. }
  520. .cont-title {
  521. width: 100%;
  522. padding: 20px;
  523. display: flex;
  524. justify-content: space-between;
  525. }
  526. .title-left {
  527. display: flex;
  528. }
  529. .title-right {
  530. width: 300px;
  531. display: flex;
  532. & > div {
  533. width: 150px;
  534. border: 1px solid #d5e4ff;
  535. text-align: center;
  536. padding: 10px 0;
  537. }
  538. }
  539. .title-right-data {
  540. background: #3195ff;
  541. color: #fff;
  542. }
  543. .title-left-p {
  544. line-height: 38px;
  545. padding: 0 20px;
  546. font-size: 16px;
  547. color: #13171e;
  548. }
  549. .title-left-span {
  550. color: #3195ff;
  551. font-size: 18px;
  552. padding: 0 5px;
  553. // font-weight: 600;
  554. }
  555. .title-left-btn {
  556. margin: 0 0 0 40px;
  557. background: #185da6;
  558. color: #fff;
  559. }
  560. .title-left-checked {
  561. margin-top: 10px;
  562. }
  563. .conter-checked {
  564. position: absolute;
  565. top: 21px;
  566. left: 30px;
  567. }
  568. .bule {
  569. background: #3195ff !important;
  570. color: #fff !important;
  571. }
  572. .titleName {
  573. margin-left: 30px;
  574. // margin-top:3px;
  575. }
  576. .marginLeft {
  577. margin-left: -110px;
  578. }
  579. </style>