psychologicalClinic.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <div class="main_right_height">
  3. <div class="">
  4. <div class="">
  5. <el-row>
  6. <el-col :span="1">&nbsp;</el-col>
  7. <el-col :span="22" class="navigation_card">
  8. <div style="display: flex">
  9. <i
  10. class="el-icon-arrow-left"
  11. style="cursor: pointer; line-height: 1.5"
  12. @click="goBack()"
  13. ></i>
  14. <span class="musicTitle">心理门诊</span>
  15. </div>
  16. <!-- <el-divider></el-divider> -->
  17. </el-col>
  18. <el-col :span="1"> &nbsp; </el-col>
  19. </el-row>
  20. <el-row class="mainTable-top-two">
  21. <el-col :span="1">
  22. <div>&nbsp;</div>
  23. </el-col>
  24. <el-col :span="10" class="search_card">
  25. <div>
  26. <el-input
  27. class="xl_input"
  28. placeholder="请输入搜索内容"
  29. v-model="queryKeyword"
  30. prefix-icon="el-icon-search"
  31. @input="queryLikeWord"
  32. clearable
  33. >
  34. </el-input>
  35. </div>
  36. </el-col>
  37. <el-col :span="11">
  38. <div class="provinceClass">
  39. &nbsp;&nbsp;&nbsp;&nbsp;
  40. <el-select
  41. v-model="provinceCodeNew"
  42. filterable
  43. placeholder="选择省"
  44. clearable
  45. @change="changeFun"
  46. >
  47. <el-option
  48. v-for="item in options"
  49. :key="item.value"
  50. :label="item.label"
  51. :value="item.value"
  52. >
  53. </el-option>
  54. </el-select>
  55. </div>
  56. </el-col>
  57. </el-row>
  58. <el-row>
  59. <el-col :span="1">&nbsp;</el-col>
  60. <el-col :span="22">
  61. <el-col>
  62. <!-- <div class="card">
  63. <img src="../assets/newImage/xl1.png" alt="" class="img_card" />
  64. <div style="display: block">
  65. <h3 class="h3_card">{{ item.name }}</h3>
  66. <div class="time_card">
  67. {{ item.testDate }}
  68. </div>
  69. <div class="goDetail">
  70. <a href="javascript:;" @click="queryDetail(item.id)">
  71. 查看详情></a
  72. >
  73. </div>
  74. <div>&nbsp;</div>
  75. </div>
  76. </div> -->
  77. <el-table
  78. :data="dataList"
  79. :header-cell-style="{
  80. background: '#66B497',
  81. color: '#FFFFFF',
  82. 'letter-spacing': '4px',
  83. }"
  84. :row-class-name="tableRowClassName"
  85. style="width: 100%"
  86. >
  87. <el-table-column
  88. prop="hospitalName"
  89. align="center"
  90. label="医院名称"
  91. >
  92. </el-table-column>
  93. <el-table-column prop="section" align="center" label="科室">
  94. </el-table-column>
  95. <el-table-column prop="address" align="center" label="地址">
  96. </el-table-column>
  97. <el-table-column
  98. prop="contactNumber"
  99. align="center"
  100. label="联系方式"
  101. >
  102. </el-table-column>
  103. </el-table>
  104. </el-col>
  105. </el-col>
  106. <el-col :span="1">&nbsp;</el-col>
  107. </el-row>
  108. <el-row> </el-row>
  109. <!-- <ul>
  110. <li
  111. v-for="(item, index) in dataList"
  112. :key="index"
  113. @click="detailP(item.id)"
  114. >
  115. <img src="../assets/newImage/xl1.png" alt="" />
  116. <div style="display: block">
  117. <h2>{{ item.name }}</h2>
  118. <div class="content">
  119. {{ item.testDate }}
  120. </div>
  121. <div class="goDetail">
  122. <a href="javascript:;"> 查看详情></a>
  123. </div>
  124. </div>
  125. </li>
  126. </ul> -->
  127. </div>
  128. <div class="pageNationBox">
  129. <el-pagination
  130. layout="total, prev, pager, next"
  131. :total="total"
  132. :page-size="pageSize"
  133. :current-page="pageNum"
  134. @current-change="handleCurrentChange"
  135. >
  136. </el-pagination>
  137. </div>
  138. </div>
  139. </div>
  140. </template>
  141. <script>
  142. export default {
  143. data() {
  144. return {
  145. head_style: "#f5f7fa",
  146. provinceCodeNew: "",
  147. options: [],
  148. queryKeyword: "",
  149. pageSize: 8,
  150. pageNum: 1,
  151. dataList: [],
  152. total: 0,
  153. userBid: "",
  154. institutionNo: "",
  155. persionDetailData: null,
  156. identifier: "",
  157. };
  158. },
  159. //页面初始化函数
  160. created() {},
  161. mounted() {
  162. this.identifier = sessionStorage.getItem("num");
  163. this.init();
  164. this.optionsSet();
  165. },
  166. methods: {
  167. changeFun() {
  168. this.pageNum = 1;
  169. this.init();
  170. },
  171. optionsSet() {
  172. let that = this;
  173. that.$http.get(
  174. `v1/province/find`,
  175. {
  176. // pageNum: that.pageNum,
  177. // pageSize: that.pageSize,
  178. // scaleName: that.queryKeyword,
  179. // startDate: that.startDate,
  180. // endDate: that.endDate,
  181. // identifier: that.identifier,
  182. },
  183. (res) => {
  184. if (res.code == 200) {
  185. this.options = [];
  186. for (let i = 0; i < res.data.length; i++) {
  187. let a = {
  188. value: res.data[i].provinceCode,
  189. label: res.data[i].provinceName,
  190. };
  191. this.options.push(a);
  192. }
  193. // that.dataList = res.data.data.data;
  194. // that.total = res.data.data.allNum;
  195. } else {
  196. this.$message.error("访问服务器失败!");
  197. }
  198. }
  199. );
  200. },
  201. goBack() {
  202. this.$router.go(-1);
  203. },
  204. queryDetail(id) {
  205. sessionStorage.setItem("back_page", "2");
  206. this.getAnswerQuestionPaymentSuccess(id);
  207. },
  208. getAnswerQuestionPaymentSuccess(id) {
  209. sessionStorage.setItem("back_page", "2");
  210. let _this = this;
  211. _this.$http.post(`v1/record/find/${id}`, {}, (res) => {
  212. if (res.data.code == 200 && res.data.data) {
  213. _this.resultJsonParams = res.data.data;
  214. // let sleep = JSON.parse(
  215. // _this.resultJsonParams.userRecordEntity.testResult
  216. // );
  217. // sleep = sleep[0].newTableContext.result[0].improvementSuggestions;
  218. // if (_this.scale_flag === "20210910163158") {
  219. // _this.askEnd(sleep);
  220. // this.inputFlag = 0;
  221. // }
  222. // if (_this.scale_flag === "20220805135201") {
  223. // _this.askEnd(sleep);
  224. // this.inputFlag = 0;
  225. // }
  226. // let testResult = JSON.parse(res.data.userRecordEntity.testResult)[0]
  227. // .version;
  228. let testResult = JSON.parse(
  229. res.data.data.userRecordEntity.testResult
  230. )[0].version;
  231. if (testResult == 2) {
  232. _this.$router.push({
  233. name: "scaleResultSCl",
  234. params: { tableData: _this.resultJsonParams },
  235. });
  236. } else {
  237. _this.$router.push({
  238. name: "scaleResult",
  239. params: { tableData: _this.resultJsonParams },
  240. });
  241. }
  242. }
  243. });
  244. },
  245. queryLikeWord() {
  246. this.pageNum = 1;
  247. this.init();
  248. },
  249. handleCurrentChange(val) {
  250. this.pageNum = val;
  251. this.init();
  252. },
  253. init() {
  254. let that = this;
  255. that.$http.post(
  256. `v1/hospital/find`,
  257. {
  258. pageNum: that.pageNum,
  259. pageSize: that.pageSize,
  260. hospitalName: that.queryKeyword,
  261. provinceCode: that.provinceCodeNew,
  262. },
  263. (res) => {
  264. if (res.status == 200) {
  265. that.dataList = res.data.data.content;
  266. that.total = res.data.data.totalElements;
  267. } else {
  268. this.$message.error("访问服务器失败!");
  269. }
  270. }
  271. );
  272. },
  273. tableRowClassName({ rowIndex }) {
  274. if (rowIndex % 2 === 0) {
  275. return "warning-row";
  276. } else if (rowIndex % 2 === 1) {
  277. return "success-row";
  278. }
  279. return "success-row";
  280. },
  281. },
  282. };
  283. </script>
  284. <style scoped>
  285. .provinceClass >>> .el-input__inner {
  286. border-radius: 20px;
  287. border: 0px;
  288. background-color: #f4f4f4;
  289. }
  290. .wrap {
  291. width: 1280px;
  292. margin: 0 auto;
  293. }
  294. .cardList ul {
  295. display: flex;
  296. min-height: 562px;
  297. justify-content: flex-start;
  298. flex-wrap: wrap;
  299. }
  300. .cardList ul li {
  301. width: 180px;
  302. height: 221px;
  303. background: rgb(255, 255, 255);
  304. box-shadow: 0px 3px 6px rgb(87, 172, 187);
  305. border-radius: 4px;
  306. margin: 30px 35px;
  307. cursor: pointer;
  308. }
  309. @media screen and (max-width: 1024px) {
  310. .cardList ul li {
  311. margin: 30px 10px;
  312. }
  313. .wrap {
  314. width: 100%;
  315. margin: 0;
  316. }
  317. }
  318. .cardList ul li img {
  319. width: 180px;
  320. height: 112px;
  321. }
  322. .cardList ul li h2 {
  323. width: 142px;
  324. font-size: 18px;
  325. font-family: PingFang SC;
  326. font-weight: 500;
  327. line-height: 25px;
  328. color: #333333;
  329. margin-left: 9px;
  330. overflow: hidden;
  331. text-overflow: ellipsis;
  332. white-space: nowrap;
  333. }
  334. .cardList ul li p {
  335. font-size: 16px;
  336. color: #666666;
  337. }
  338. .cardList ul li .content {
  339. font-size: 12px;
  340. font-family: PingFang SC;
  341. font-weight: 400;
  342. line-height: 20px;
  343. color: #999999;
  344. margin-left: 9px;
  345. }
  346. .goDetail {
  347. margin: 5px 0 10px 9px;
  348. }
  349. .goDetail a {
  350. font-size: 14px;
  351. font-family: PingFang SC;
  352. font-weight: 400;
  353. line-height: 20px;
  354. color: #57acbb;
  355. }
  356. .pageNationBox {
  357. margin-bottom: 30px;
  358. padding: 20px 10px;
  359. text-align: center;
  360. }
  361. .view-text {
  362. /**
  363. 思路:
  364. 1.设置inline-block属相
  365. 2.强制不换行
  366. 3.固定高度
  367. 4.隐藏超出部分
  368. 5.显示“……”
  369. */
  370. display: inline-block;
  371. word-break: keep-all;
  372. white-space: nowrap;
  373. width: 960px;
  374. overflow: hidden;
  375. text-overflow: ellipsis;
  376. }
  377. .imgSiz {
  378. width: 120px;
  379. height: 75px;
  380. margin-right: 15px;
  381. }
  382. .main_right_height {
  383. height: 95vh !important;
  384. display: block !important;
  385. overflow-y: auto !important;
  386. }
  387. .card {
  388. background: #fff;
  389. box-shadow: 0 3px 6px #57acbb;
  390. border-radius: 4px;
  391. display: block;
  392. margin-left: 20px;
  393. margin-right: 20px;
  394. margin-bottom: 80px;
  395. }
  396. .img_card {
  397. width: 100%;
  398. height: 100%;
  399. }
  400. .h3_card {
  401. font-size: 18px;
  402. font-family: PingFang SC;
  403. font-weight: 500;
  404. line-height: 20px;
  405. color: #333;
  406. margin-left: 9px;
  407. overflow: hidden;
  408. text-overflow: ellipsis;
  409. white-space: nowrap;
  410. }
  411. .time_card {
  412. font-size: 12px;
  413. font-family: PingFang SC;
  414. font-weight: 500;
  415. line-height: 15px;
  416. color: rgb(171, 168, 168);
  417. margin-left: 9px;
  418. overflow: hidden;
  419. text-overflow: ellipsis;
  420. white-space: nowrap;
  421. }
  422. .xl_input >>> .el-input__inner {
  423. border: 0;
  424. border-radius: 20px;
  425. background-color: #f4f4f4;
  426. }
  427. .search_card {
  428. margin-left: 20px;
  429. margin-bottom: 20px;
  430. }
  431. .navigation_card {
  432. margin-left: 20px;
  433. }
  434. .el-table {
  435. border-radius: 16px 16px 0px 0px;
  436. border: none;
  437. }
  438. .el-table .el-table__cell {
  439. padding: 6px;
  440. }
  441. .tag {
  442. display: inline-block;
  443. background: #ffffff;
  444. border-radius: 40px 40px 40px 40px;
  445. opacity: 1;
  446. border: 1px solid #0fb577;
  447. font-size: 14px;
  448. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  449. font-weight: 400;
  450. color: #0fb577;
  451. padding: 2px 8px;
  452. margin: 0 5px;
  453. }
  454. .el-table .warning-row {
  455. background: #f5f5f5;
  456. }
  457. .el-table .success-row {
  458. background: #ffffff;
  459. }
  460. .el-table--enable-row-hover
  461. /deep/
  462. .el-table__body
  463. tr:hover
  464. > td.el-table__cell {
  465. background: rgba(223, 246, 237, 1) !important;
  466. }
  467. ::v-deep .el-pager li.active,
  468. ::v-deep .el-pager li:hover {
  469. background: #f0f0f0;
  470. color: #262626;
  471. }
  472. ::v-deep .el-pager li {
  473. background: none;
  474. color: #8c8c8c;
  475. }
  476. ::v-deep .el-pagination .btn-next, ::v-deep .el-pagination .btn-prev {
  477. background: none;
  478. }
  479. </style>