血透系统PC前端

proeducation.vue 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patientID" defaultActive="2-5" v-on:tran-patient="onTranPatient"></patient-sidebar>
  4. <div class="patient-app-container advice-container app-container">
  5. <div class="cell">
  6. <label class="title"><span class="name">日期查询</span> : </label>
  7. <el-date-picker v-model="listQuery.start_time" prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
  8. <span class="">-</span>
  9. <el-date-picker v-model="listQuery.end_time" prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
  10. </div>
  11. <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" ref="multipleTable" :data="edusTableData" border fit highlight-current-row style="width: 100%;margin-top: 10px;" >
  12. <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
  13. <el-table-column label="日期" width="200px" property="assessment_date" align="center">
  14. <template slot-scope="scope">
  15. {{scope.row.assessment_date | parseTime("{y}-{m}-{d}")}}
  16. </template>
  17. </el-table-column>
  18. <el-table-column label="宣教" min-width="80" property="mission" align="center"> </el-table-column>
  19. </el-table>
  20. <el-pagination
  21. align="right"
  22. @size-change="handleSizeChange"
  23. @current-change="handleCurrentChange"
  24. :current-page="listQuery.page"
  25. :page-sizes="[10, 20, 50, 100]"
  26. :page-size="10"
  27. background
  28. style="margin-top:20px;"
  29. layout="total, sizes, prev, pager, next, jumper"
  30. :total="total">
  31. </el-pagination>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. import PatientSidebar from './components/PatientSidebar';
  37. import { fetchAllDoctorAndNurse,fetchAllAdminUsers } from "@/api/doctor";
  38. import { getPatientProEducation } from "@/api/patient";
  39. import {uParseTime} from "@/utils/tools";
  40. import print from "print-js";
  41. let rowIndex = 1;
  42. export default {
  43. name:'proeducation',
  44. data(){
  45. return {
  46. total:0,
  47. orgname:'',
  48. edusTableData:[],
  49. currentPatient:{},
  50. patientID:0,
  51. listQuery:{
  52. start_time:"",
  53. end_time:"",
  54. page:1,
  55. limit:10,
  56. patient_id:0
  57. },
  58. }
  59. },
  60. methods:{
  61. onTranPatient:function (tranPatient) {
  62. this.currentPatient = tranPatient;
  63. },
  64. changeTime(){
  65. this.getList();
  66. },
  67. handleSizeChange(val) {
  68. this.listQuery.limit = val;
  69. this.getList();
  70. },
  71. handleCurrentChange(val) {
  72. this.listQuery.page = val;
  73. this.getList();
  74. },
  75. getList(){
  76. getPatientProEducation(this.listQuery).then(response=>{
  77. if (response.data.state == 1) {
  78. this.edusTableData = response.data.data.edus;
  79. this.total = response.data.data.total;
  80. }else {
  81. this.edusTableData = [];
  82. }
  83. });
  84. },
  85. },
  86. components:{
  87. PatientSidebar
  88. },
  89. created(){
  90. const id = this.$route.params && this.$route.params.id;
  91. this.patientID = parseInt(id);
  92. if (isNaN(this.patientID) || this.patientID <= 0) {
  93. this.$notify.error({
  94. title: "错误",
  95. message: "无效的id"
  96. });
  97. this.$router.push('/patients/patients');
  98. }
  99. this.listQuery.patient_id = this.patientID;
  100. this.getList();
  101. var xtuser = this.$store.getters.xt_user;
  102. this.orgname = xtuser.org.org_name;
  103. }
  104. }
  105. </script>
  106. <style rel="stylesheet/scss" lang="scss" scoped>
  107. .advice-container{
  108. font-size: 15px;
  109. .filter-container {
  110. padding-bottom: 5px;
  111. }
  112. .search-component {
  113. width: 500px;
  114. .searchBox {
  115. width: 300px;
  116. height: 36px;
  117. line-height: 36px;
  118. padding-left: 15px;
  119. border: 1px #dcdfe6 solid;
  120. border-right: none;
  121. outline: none;
  122. float: left;
  123. border-radius: 6px 0 0 6px;
  124. font-size: 14px;
  125. color: #333;
  126. background: #fff;
  127. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  128. }
  129. .searchBtn {
  130. background-color: #409eff;
  131. color: #fff;
  132. font-size: 15px;
  133. text-align: center;
  134. height: 36px;
  135. line-height: 36px;
  136. float: left;
  137. outline: none;
  138. width: 70px;
  139. border: none;
  140. border-radius: 0 6px 6px 0;
  141. font-family: "Microsoft Yahei";
  142. cursor: pointer;
  143. }
  144. }
  145. .cell {
  146. margin: 0px 0 15px 0;
  147. -moz-box-sizing: border-box;
  148. -webkit-box-sizing: border-box;
  149. -o-box-sizing: border-box;
  150. -ms-box-sizing: border-box;
  151. box-sizing: border-box;
  152. display: -webkit-box;
  153. display: -ms-flexbox;
  154. // display: flex;
  155. -webkit-box-align: flex-start;
  156. -ms-flex-align: flex-start;
  157. align-items: flex-start;
  158. text-align: left;
  159. justify-content: flex-start;
  160. color: #333;
  161. .title {
  162. width: 80px;
  163. display: inline-block;
  164. font-weight: normal;
  165. color: #909399;
  166. padding: 6px 0;
  167. font-weight: 700;
  168. .name {
  169. width: 60px;
  170. text-align: justify;
  171. text-justify: distribute-all-lines;
  172. text-align-last: justify;
  173. -moz-text-align-last: justify;
  174. -webkit-text-align-last: justify;
  175. display: inline-block;
  176. }
  177. }
  178. .time {
  179. -webkit-box-flex: 1;
  180. -ms-flex: 1;
  181. flex: 1;
  182. ul {
  183. padding: 0;
  184. margin: 0;
  185. li {
  186. float: left;
  187. list-style: none;
  188. cursor: pointer;
  189. padding: 6px 10px;
  190. color: #606266;
  191. border-radius: 4px;
  192. margin: 0 4px 0 0;
  193. &:hover {
  194. background: #409eff;
  195. color: #fff;
  196. }
  197. }
  198. .active {
  199. background: #409eff;
  200. color: #fff;
  201. }
  202. }
  203. }
  204. }
  205. .amount {
  206. font-weight: normal;
  207. padding: 10px 0 0 0;
  208. color: #606266;
  209. font-size: 14px;
  210. span {
  211. color: #ef2525;
  212. font-family: "Arial";
  213. padding: 0 2px;
  214. }
  215. }
  216. .el-dropdown-link {
  217. cursor: pointer;
  218. }
  219. }
  220. .advice-order .ls-title{
  221. text-align: center;
  222. font-weight: 600;
  223. font-size: 30px;
  224. line-height: 80px;
  225. margin-bottom: 20px;
  226. }
  227. .advice-order .ls-type{
  228. text-align: center;
  229. margin-bottom: 20px;
  230. }
  231. .advice-order .ls-name {
  232. display: flex;
  233. align-items: center;
  234. justify-content: space-between;
  235. padding: 30px 2em;
  236. }
  237. </style>
  238. <style>
  239. .advice-order .el-table__body{
  240. border: 1px solid #333;
  241. }
  242. .advice-order .el-table__body td{
  243. border: 1px solid #333;
  244. }
  245. .advice-order .item-value { flex: 1; border-bottom: 1px solid #333; }
  246. .advice-order th, .advice-order td {
  247. padding: 5px 10px;
  248. }
  249. </style>