dialysisSummary.vue 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div class="page_summary">
  3. <div class="cell clearfix" style="margin-top:40px;margin-left:70px;">
  4. <!-- <label class="title">
  5. <span class="name">治疗日期</span> :
  6. </label>
  7. <div class="time">
  8. <ul class>
  9. <li
  10. :class="item.state == dayType ? 'active' : ''"
  11. @click="chooseDay(item.state)"
  12. v-for="item in day"
  13. :key="item.value"
  14. >{{ item.label }}</li>
  15. </ul>
  16. </div>
  17. <el-date-picker
  18. v-model="time"
  19. prefix-icon="el-icon-date"
  20. @change="changeTime"
  21. :editable="false"
  22. style="width: 150px;"
  23. type="date"
  24. placeholder="选择日期时间"
  25. align="right"
  26. format="yyyy-MM-dd"
  27. value-format="yyyy-MM-dd"
  28. ></el-date-picker> -->
  29. <label class="title" style="margin-left:10px;">
  30. <span class="name">患者信息</span> :
  31. </label>
  32. <div class="infoBox">
  33. <span>姓名:{{ patient.name }}</span>&nbsp;|&nbsp;<span>透析编号:{{ patient.dialysis_no }}</span>
  34. </div>
  35. </div>
  36. <div style="margin-left:70px;">
  37. <el-input type="textarea" :disabled="true" :rows="4" placeholder="请输入内容" v-model="dialysis_summary"></el-input>
  38. <el-button type="primary" v-clipboard:copy="dialysis_summary" v-clipboard:success="onCopy" v-clipboard:error="onError" style="margin-top:10px;float:right;">复制</el-button>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. export default {
  44. props:{
  45. treatment_summary:Object,
  46. patient:Object
  47. },
  48. data(){
  49. return{
  50. day: [
  51. { value: 0, label: "今天", state: 0 },
  52. { value: 1, label: "昨天", state: 1 },
  53. { value: 2, label: "前天", state: 2 },
  54. ],
  55. dayType: 0,
  56. time:'',
  57. dialysis_summary:''
  58. }
  59. },
  60. created(){
  61. this.dialysis_summary = this.treatment_summary.dialysis_summary
  62. },
  63. methods:{
  64. chooseDay(day) {
  65. this.dayType = day;
  66. },
  67. onCopy() {
  68. this.$message.success("复制成功");
  69. },
  70. onError() {
  71. this.$message.success("复制失败,请重试");
  72. }
  73. },
  74. watch:{
  75. treatment_summary:{
  76. handler:function(val) {
  77. this.dialysis_summary = this.treatment_summary.dialysis_summary
  78. }
  79. },
  80. patient:{
  81. handler:function(val) {
  82. }
  83. },
  84. deep:true,
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .tableTitle {
  90. font-size: 16px;
  91. color: #000;
  92. font-weight: bold;
  93. line-height: 40px;
  94. }
  95. .page_summary{
  96. width: 100%;
  97. padding-right: 10px;
  98. .infoBox{
  99. padding: 10px 20px;
  100. border-radius: 20px;
  101. border:1px solid #DCDFE6;
  102. font-size: 14px;
  103. color: #606266;
  104. display: flex;
  105. align-items: center;
  106. }
  107. }
  108. </style>