select-disease.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>选择疾病</title>
  6. <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
  7. <link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
  8. <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
  9. <link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
  10. <link rel="stylesheet" type="text/css" href="../css/select-patient.css" />
  11. </head>
  12. <body class="m0">
  13. <div id="app" class="c-t-center" style="height: 100%;" v-cloak>
  14. <div style="overflow: hidden; height: calc(100% - 60px);">
  15. <ul class="disease-list c-h100 p0 m0 pl20 pr10 clearfix" style="overflow: auto;">
  16. <li class="fl mr10 plr20 ptb5 c-border b-r-3 mt20 cur-pit" :class="{'active':index == selectIndex}" v-for="(disease, index) in diseaseArr" :key="index" @click="selectFn(index)">{{disease.diseaseName}}</li>
  17. </ul>
  18. </div>
  19. <div class="ptb20">
  20. <span class="c-fff btn cur-pit plr30 ptb5 bgc-12b7f5 b-r-3" @click="sure()">确 认</span>
  21. </div>
  22. </div>
  23. <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
  24. <script src="../../../js/jquery-2.2.4.js"></script>
  25. <script src="../../../plugins/layer/layer.min.js"></script>
  26. <script src="../../../plugins/toastr/toastr.min.js"></script>
  27. <script src="../../../js/bootstrap.min.js"></script>
  28. <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
  29. <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
  30. <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
  31. <script src="../../../api/http-request.js" type="text/javascript"></script>
  32. <script src="../../../api/recover_api.js" type="text/javascript"></script>
  33. <script type="text/javascript">
  34. var doctorType = (JSON.parse(window.localStorage.getItem('wlyyAgent'))||{}).doctorType
  35. var httpData=GetRequest()
  36. function showSuccessMessage(msg) {
  37. layer.msg(msg, {
  38. icon: 1
  39. })
  40. }
  41. function showErrorMessage(msg) {
  42. layer.msg(msg, {
  43. icon: 5
  44. })
  45. }
  46. function showWarningMessage(msg) {
  47. layer.msg(msg, {
  48. icon: 2
  49. })
  50. }
  51. function showInfoMessage(msg) {
  52. layer.msg(msg, {
  53. icon: 6
  54. })
  55. }
  56. selectVue = new Vue({
  57. el: "#app",
  58. data: {
  59. selectIndex: null,
  60. diseaseArr: null
  61. },
  62. mounted: function() {
  63. this.findTeamDiseaseRelation()
  64. },
  65. methods: {
  66. selectFn: function(index) {
  67. this.selectIndex = index + ''
  68. },
  69. sure: function() {
  70. if(!this.selectIndex) {
  71. showWarningMessage("请选择疾病!")
  72. return false;
  73. }
  74. top.recoverVue.newPlan(this.diseaseArr[this.selectIndex], httpData.templateId)
  75. top.layer.close(top.recoverVue.selectDiseaseIndex)
  76. },
  77. findTeamDiseaseRelation: function() {
  78. var vm = this,
  79. loadding = layer.load(0, {shade: false}),
  80. params = {
  81. teamCode: httpData.teamCode
  82. }
  83. recoverAPI.findTeamDiseaseRelation(params).then(function(res) {
  84. layer.close(loadding)
  85. if(res.status == 200) {
  86. vm.diseaseArr = res.data
  87. } else {
  88. showErrorMessage(res.msg);
  89. }
  90. })
  91. }
  92. }
  93. })
  94. </script>
  95. </body>
  96. </html>