血透系统PC前端

proeducation.vue 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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 clearfix">
  6. <label class="title"><span class="name">日期查询</span> : </label>
  7. <el-date-picker size="small" 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="cellLine"> - </span>
  9. <el-date-picker size="small" 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. .amount {
  146. font-weight: normal;
  147. padding: 10px 0 0 0;
  148. color: #606266;
  149. font-size: 14px;
  150. span {
  151. color: #ef2525;
  152. font-family: "Arial";
  153. padding: 0 2px;
  154. }
  155. }
  156. .el-dropdown-link {
  157. cursor: pointer;
  158. }
  159. }
  160. .advice-order .ls-title{
  161. text-align: center;
  162. font-weight: 600;
  163. font-size: 30px;
  164. line-height: 80px;
  165. margin-bottom: 20px;
  166. }
  167. .advice-order .ls-type{
  168. text-align: center;
  169. margin-bottom: 20px;
  170. }
  171. .advice-order .ls-name {
  172. display: flex;
  173. align-items: center;
  174. justify-content: space-between;
  175. padding: 30px 2em;
  176. }
  177. </style>
  178. <style>
  179. .advice-order .el-table__body{
  180. border: 1px solid #333;
  181. }
  182. .advice-order .el-table__body td{
  183. border: 1px solid #333;
  184. }
  185. .advice-order .item-value { flex: 1; border-bottom: 1px solid #333; }
  186. .advice-order th, .advice-order td {
  187. padding: 5px 10px;
  188. }
  189. </style>