my_archives.vue 940 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <view class="main">
  3. <u-empty text="暂无档案" :show="istrue" mode="list" margin-top="300"></u-empty>
  4. <view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
  5. <view class="submit" style="background-color: #0B73B9;color: white;" @click="addarchives">
  6. 添加健康档案
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. onLoad(options) {
  14. },
  15. onShow() {
  16. this.getarchives()
  17. },
  18. data() {
  19. return {
  20. patientList: [],
  21. istrue: false
  22. }
  23. },
  24. methods: {
  25. getarchives: async function() {
  26. let res = await this.$request.post("/api/v1/patient/patientList")
  27. if (res.status == 0) {
  28. this.patientList = res.data.data
  29. if (this.patientList.length == 0) {
  30. this.istrue = true
  31. }
  32. }
  33. },
  34. addarchives() {
  35. uni.navigateTo({
  36. url: "add_archives"
  37. })
  38. }
  39. }
  40. };
  41. </script>
  42. <style scoped lang="scss">
  43. .main {}
  44. </style>