You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.4 KiB

2 years ago
  1. <template>
  2. <div style="display: flex;">
  3. <div style="display: flex;flex-wrap: wrap;width:90%">
  4. <div class="block query">
  5. <span class="demonstration">登记日期</span>
  6. <el-date-picker
  7. v-model="patientRegister.query.dateRange"
  8. type="daterange"
  9. align="right"
  10. unlink-panels
  11. range-separator="至"
  12. start-placeholder="开始日期"
  13. end-placeholder="结束日期"
  14. :picker-options="pickerOptions" size="small" style="width:240px;">
  15. </el-date-picker>
  16. </div>
  17. <div class="query">
  18. <span>条码号</span>
  19. <el-input placeholder="条码号" v-model="patientRegister.query.patientRegisterNo" size="small" clearable style="width:150px;"/>
  20. </div>
  21. <div class="query">
  22. <span>档案号</span>
  23. <el-input placeholder="档案号" v-model="patientRegister.query.patientNo" size="small" clearable style="width:135px;"/>
  24. </div>
  25. <div class="query">
  26. <span>姓名</span>
  27. <el-input placeholder="姓名" v-model="patientRegister.query.patientName" size="small" clearable style="width:135px;"/>
  28. </div>
  29. <div class="query">
  30. <span>性别</span>
  31. <el-input placeholder="性别" v-model="patientRegister.query.sex" size="small" clearable style="width:80px;"/>
  32. </div>
  33. <div class="query">
  34. <span>身份证号</span>
  35. <el-input placeholder="身份证号" v-model="patientRegister.query.idCardNo" size="small" clearable style="width:200px;"/>
  36. </div>
  37. </div>
  38. <!-- 按钮区域 -->
  39. <div style="margin-left: 10px; margin-top: 5px;">
  40. <div style="margin-top: 5px">
  41. <el-button type="primary" @click="btnQuery">查询</el-button>
  42. </div>
  43. <div style="margin-top: 5px">
  44. <el-button type="danger" @click="readIdCard">读身份证</el-button>
  45. </div>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. import { mapState } from "vuex";
  51. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  52. export default {
  53. components: {},
  54. data() {
  55. return {
  56. dialogVisible:false,
  57. pickerOptions: {
  58. shortcuts: [{
  59. text: '最近一周',
  60. onClick(picker) {
  61. const end = new Date();
  62. const start = new Date();
  63. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  64. picker.$emit('pick', [start, end]);
  65. }
  66. }, {
  67. text: '最近一个月',
  68. onClick(picker) {
  69. const end = new Date();
  70. const start = new Date();
  71. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  72. picker.$emit('pick', [start, end]);
  73. }
  74. }, {
  75. text: '最近三个月',
  76. onClick(picker) {
  77. const end = new Date();
  78. const start = new Date();
  79. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  80. picker.$emit('pick', [start, end]);
  81. }
  82. }]
  83. },
  84. };
  85. },
  86. created() {},
  87. //挂载完成
  88. mounted() {
  89. },
  90. computed: {
  91. ...mapState(["patientRegister"]),
  92. },
  93. methods: {
  94. //查询
  95. btnQuery() {
  96. alert("查询")
  97. console.log('this.patientRegister.query.dateRange',this.patientRegister.query.dateRange)
  98. },
  99. //读身份证
  100. readIdCard() {
  101. alert("读身份证")
  102. },
  103. },
  104. };
  105. </script>
  106. <style scoped>
  107. .query{
  108. margin-left:10px;
  109. }
  110. </style>