Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

FastCountry.vue 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <div class="patient-container">
  3. <!-- <fast-patients-sidebar
  4. :id="patientID"
  5. v-on:patient="patientInfoClick()"
  6. v-on:inspection="inspectionClick()"
  7. ></fast-patients-sidebar> -->
  8. <!-- <fast-upload-detail v-if="isShow == 1" :id="patientID" :is-edit='true' :class='panelClass'></fast-upload-detail> -->
  9. <el-container>
  10. <div style="width:170px">
  11. <el-form :inline="true" :model="listQuery">
  12. <el-form-item label style="margin-bottom:0;">
  13. <el-input v-model.trim="searchVal" placeholder="姓名/透析号" style="width:70%"></el-input>
  14. <el-button type="primary" style="padding: 10px 6px;" @click="onSearch">搜索</el-button>
  15. </el-form-item>
  16. </el-form>
  17. <div style="width:170px">
  18. <div class="tableTitle">患者列表</div>
  19. <el-table :data="tableData" border style="width: 100%;" height="500">
  20. <el-table-column prop="date" label="日期" width="80"></el-table-column>
  21. <el-table-column prop="name" label="姓名" width="90"></el-table-column>
  22. </el-table>
  23. </div>
  24. </div>
  25. <div style="margin-left:20px;flex:1;" >
  26. <div class="cell clearfix">
  27. <div class="time">
  28. <ul class="newUl">
  29. <li
  30. :class="item.state == wayType ? 'active' : ''"
  31. @click="chooseWay(item.state)"
  32. v-for="item in way"
  33. :key="item.value"
  34. >{{ item.label }}</li>
  35. </ul>
  36. </div>
  37. </div>
  38. <one ref="one" v-if="wayType == 0" :patientID="patientID" :is-edit='true' style="margin-top:28px;" @></one>
  39. <two ref="two" v-if="wayType == 1" :id="patientID" :is-edit="true" style="margin-top:28px;"></two>
  40. </div>
  41. </el-container>
  42. </div>
  43. </template>
  44. <script>
  45. import FastUploadDetail from './FastUploadDetail'
  46. import { fetchAllList } from '@/api/patient'
  47. import FastPatientsSidebar from './FastPatientsSidebar'
  48. import FastUploadInspectitonDetail from './FastUploadInspectitonDetail'
  49. import One from './One'
  50. import Two from './Two'
  51. export default {
  52. name: 'FastPatientsDetail',
  53. components: {
  54. FastUploadInspectitonDetail,
  55. FastPatientsSidebar,
  56. FastUploadDetail,
  57. One,
  58. Two
  59. },
  60. data() {
  61. return {
  62. patientID: 0,
  63. panelClass: 'patient-app-container',
  64. patientInfo: {
  65. id: 0
  66. },
  67. isShow: 1,
  68. tableData: [
  69. {
  70. date: "2016",
  71. name: "王小虎"
  72. },
  73. {
  74. date: "2016",
  75. name: "王小虎"
  76. },
  77. {
  78. date: "2016",
  79. name: "王小虎"
  80. },
  81. {
  82. date: "2016",
  83. name: "王小虎"
  84. },
  85. {
  86. date: "2016",
  87. name: "王小虎"
  88. },
  89. {
  90. date: "2016",
  91. name: "王小虎"
  92. },
  93. {
  94. date: "2016",
  95. name: "王小虎"
  96. },
  97. {
  98. date: "2016",
  99. name: "王小虎"
  100. },
  101. {
  102. date: "2016",
  103. name: "王小虎"
  104. },
  105. {
  106. date: "2016",
  107. name: "王小虎"
  108. },
  109. {
  110. date: "2016",
  111. name: "王小虎"
  112. },
  113. {
  114. date: "2016",
  115. name: "王小虎"
  116. }
  117. ],
  118. searchVal:'',
  119. way: [
  120. { value: 0, label: "基本信息", state: 0 },
  121. { value: 1, label: "检验检查", state: 1 },
  122. ],
  123. wayType: 0,
  124. }
  125. },
  126. created() {
  127. const id = this.$route.query && this.$route.query.id
  128. this.patientID = parseInt(id)
  129. if (isNaN(this.patientID) || this.patientID <= 0) {
  130. this.getList(1)
  131. } else {
  132. this.getList(2)
  133. }
  134. },
  135. methods: {
  136. chooseWay(way) {
  137. this.wayType = way;
  138. },
  139. getList(type) {
  140. fetchAllList().then(response => {
  141. if (response.data.state == 1) {
  142. this.patientsList = response.data.data.patients
  143. if (type == 1) {
  144. this.patientID = this.patientsList[0].id
  145. } else {
  146. this.patientID = this.$route.query.id
  147. }
  148. this.$nextTick(() => {
  149. this.$refs.one.fetchPatient(this.patientID)
  150. })
  151. }
  152. })
  153. },
  154. patientInfoClick: function() {
  155. this.isShow = 1
  156. this.$nextTick(() => {
  157. this.$refs.one.fetchPatient(this.patientID)
  158. })
  159. },
  160. inspectionClick: function() {
  161. this.isShow = 2
  162. this.$nextTick(() => {
  163. var start_time = new Date(this.getQuarterStartDate().replace(/-/g, '/')).getTime() / 1000
  164. var end_time = new Date(this.getQuarterEndDate().replace(/-/g, '/')).getTime() / 1000
  165. this.$refs.two.GetInitInspections()
  166. this.$refs.two.GetUploadInspections(this.patientID,start_time,end_time,1,"1")
  167. this.$refs.two.GetUploadInspections(this.patientID,start_time,end_time,2,"2-4-20")
  168. this.$refs.two.GetUploadInspections(this.patientID,start_time,end_time,3,"21")
  169. this.$refs.two.GetUploadInspections(this.patientID,start_time,end_time,4,"2-4-15-24-25")
  170. this.$refs.two.GetUploadInspections(this.patientID,start_time,end_time,5,"15-23")
  171. this.$refs.two.GetUploadInspections(this.patientID,start_time,end_time,6,"14")
  172. this.$refs.two.GetUploadInspections(this.patientID,start_time,end_time,7,"22")
  173. })
  174. }, getQuarterStartDate: function() {
  175. var now = new Date() //当前日期
  176. var nowYear = now.getFullYear() //当前年
  177. nowYear += (nowYear < 2000) ? 1900 : 0
  178. var quarterStartDate = new Date(nowYear, this.getQuarterStartMonth(), 1)
  179. return this.formatDate(quarterStartDate)
  180. }, getQuarterEndDate: function() {
  181. var now = new Date() //当前日期
  182. var nowYear = now.getFullYear() //当前年
  183. nowYear += (nowYear < 2000) ? 1900 : 0
  184. var quarterEndMonth = this.getQuarterStartMonth() + 2
  185. var quarterStartDate = new Date(nowYear, quarterEndMonth, this.getMonthDays(quarterEndMonth))
  186. return this.formatDate(quarterStartDate)
  187. }, formatDate: function(date) {
  188. var myyear = date.getFullYear()
  189. var mymonth = date.getMonth() + 1
  190. var myweekday = date.getDate()
  191. if (mymonth < 10) {
  192. mymonth = '0' + mymonth
  193. }
  194. if (myweekday < 10) {
  195. myweekday = '0' + myweekday
  196. }
  197. return (myyear + '-' + mymonth + '-' + myweekday)
  198. }, getQuarterStartMonth: function() {
  199. var now = new Date() //当前日期
  200. var nowMonth = now.getMonth() //当前月
  201. var quarterStartMonth = 0
  202. if (nowMonth < 3) {
  203. quarterStartMonth = 0
  204. }
  205. if (2 < nowMonth && nowMonth < 6) {
  206. quarterStartMonth = 3
  207. }
  208. if (5 < nowMonth && nowMonth < 9) {
  209. quarterStartMonth = 6
  210. }
  211. if (nowMonth > 8) {
  212. quarterStartMonth = 9
  213. }
  214. return quarterStartMonth
  215. }, //获得某月的天数
  216. getMonthDays(myMonth) {
  217. var now = new Date() //当前日期
  218. var nowYear = now.getYear() //当前年
  219. nowYear += (nowYear < 2000) ? 1900 : 0
  220. var monthStartDate = new Date(nowYear, myMonth, 1)
  221. var monthEndDate = new Date(nowYear, myMonth + 1, 1)
  222. var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24)
  223. return days
  224. }
  225. }
  226. }
  227. </script>
  228. <style lang="scss" scoped>
  229. .tableTitle {
  230. font-size: 16px;
  231. color: #000;
  232. font-weight: bold;
  233. line-height: 40px;
  234. }
  235. .newUl{
  236. li{
  237. padding:10px 20px !important;
  238. }
  239. }
  240. </style>