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

index.vue 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <el-scrollbar wrapClass="scrollbar-wrapper">
  3. <div class="sideColumn">
  4. <!-- <hamburger class="hamburger-container" :toggleClick="toggleSideBar" :isActive="sidebar.opened"></hamburger> -->
  5. {{ navTitle }}
  6. </div>
  7. <el-menu
  8. mode="vertical"
  9. :unique-opened="uniqueOpened"
  10. :show-timeout="200"
  11. :default-active="$route.path"
  12. background-color="#f3f5f6"
  13. text-color="#000"
  14. active-text-color="#409EFF"
  15. >
  16. <sidebar-item v-for="route in arr" :key="route.name" :item="route" :base-path="route.path"></sidebar-item>
  17. </el-menu>
  18. </el-scrollbar>
  19. </template>
  20. <script>
  21. import { mapGetters } from "vuex";
  22. import SidebarItem from "./SidebarItem";
  23. import Hamburger from "@/components/Hamburger";
  24. export default {
  25. props:{
  26. navTitle:String
  27. },
  28. components: { SidebarItem,Hamburger },
  29. computed: {
  30. ...mapGetters(["permission_routers", "sidebar"]),
  31. isCollapse() {
  32. return !this.sidebar.opened;
  33. }
  34. },
  35. data(){
  36. return{
  37. uniqueOpened:true,
  38. arr:[]
  39. }
  40. },
  41. methods:{
  42. toggleSideBar() {
  43. this.$store.dispatch("toggleSideBar");
  44. },
  45. },
  46. created(){
  47. if(this.navTitle == '透析管理'){
  48. let nameArr = ['workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
  49. // console.log('permission_routers',this.permission_routers)
  50. let routerArr = []
  51. this.permission_routers.map(item => {
  52. if(nameArr.indexOf(item.name) > -1){
  53. routerArr.push(item)
  54. }
  55. })
  56. this.arr = routerArr
  57. }else if(this.navTitle == '电子病历'){
  58. this.arr = []
  59. }
  60. // let a = this.permission_routers
  61. // this.arr = a.slice(0,10)
  62. // console.log('this.arr',this.arr)
  63. },
  64. watch:{
  65. navTitle:{
  66. handler(newVal,oldVal){
  67. if(newVal == '门诊管理'){
  68. let nameArr = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy']
  69. // console.log('permission_routers',this.permission_routers)
  70. let routerArr = []
  71. this.permission_routers.map(item => {
  72. if(nameArr.indexOf(item.name) > -1){
  73. routerArr.push(item)
  74. }
  75. })
  76. this.arr = routerArr
  77. if(this.arr.length > 0){
  78. let a = true
  79. this.$emit('func',a)
  80. }else{
  81. let a = false
  82. this.$emit('func',a)
  83. }
  84. }else if(newVal == '电子病历'){
  85. let nameArr = ['User','createPatient']
  86. // console.log('permission_routers',this.permission_routers)
  87. let routerArr = []
  88. this.permission_routers.map(item => {
  89. if(nameArr.indexOf(item.name) > -1){
  90. routerArr.push(item)
  91. }
  92. })
  93. this.arr = routerArr
  94. if(this.arr.length > 0){
  95. let a = true
  96. this.$emit('func',a)
  97. }else{
  98. let a = false
  99. this.$emit('func',a)
  100. }
  101. }else if(newVal == '透析管理'){
  102. let nameArr = ['workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
  103. // console.log('permission_routers',this.permission_routers)
  104. let routerArr = []
  105. this.permission_routers.map(item => {
  106. if(nameArr.indexOf(item.name) > -1){
  107. routerArr.push(item)
  108. }
  109. })
  110. console.log('routerArr',routerArr)
  111. this.arr = routerArr
  112. if(this.arr.length > 0){
  113. let a = true
  114. this.$emit('func',a)
  115. }else{
  116. let a = false
  117. this.$emit('func',a)
  118. }
  119. }else if(newVal == '库存管理'){
  120. let nameArr = ['stockManage','selfPreparedMedicine','stockDrugs','otherManagement']
  121. // console.log('permission_routers',this.permission_routers)
  122. let routerArr = []
  123. this.permission_routers.map(item => {
  124. if(nameArr.indexOf(item.name) > -1){
  125. routerArr.push(item)
  126. }
  127. })
  128. this.arr = routerArr
  129. if(this.arr.length > 0){
  130. let a = true
  131. this.$emit('func',a)
  132. }else{
  133. let a = false
  134. this.$emit('func',a)
  135. }
  136. }else if(newVal == '配置管理'){
  137. let nameArr = ['system','roleManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate']
  138. // console.log('permission_routers',this.permission_routers)
  139. let routerArr = []
  140. this.permission_routers.map(item => {
  141. if(nameArr.indexOf(item.name) > -1){
  142. routerArr.push(item)
  143. }
  144. })
  145. this.arr = routerArr
  146. if(this.arr.length > 0){
  147. let a = true
  148. this.$emit('func',a)
  149. }else{
  150. let a = false
  151. this.$emit('func',a)
  152. }
  153. }else {
  154. this.arr = []
  155. if(this.arr.length > 0){
  156. let a = true
  157. this.$emit('func',a)
  158. }else{
  159. let a = false
  160. this.$emit('func',a)
  161. }
  162. }
  163. },
  164. deep:true,
  165. immediate: true
  166. }
  167. }
  168. };
  169. </script>
  170. <style rel="stylesheet/scss" lang="scss" scoped>
  171. .sideColumn{
  172. // background-color: rgb(48, 65, 86);
  173. background-color:#fff;
  174. text-align: center;
  175. height:50px;
  176. line-height: 50px;
  177. border-top:1px solid #e5e5e5;
  178. border-bottom:1px solid #e5e5e5;
  179. // color: rgb(191, 203, 217);
  180. color:#000;
  181. .head {
  182. text-align: center;
  183. padding: 20px 0 0 0;
  184. .tx {
  185. .img {
  186. width: 45px;
  187. height: 45px;
  188. border-radius: 50%;
  189. -o-object-fit: cover;
  190. object-fit: cover;
  191. -o-object-position: center;
  192. object-position: center;
  193. }
  194. }
  195. .title {
  196. font-size: 14px;
  197. color: #bfcbd9;
  198. padding: 10px 10px 15px 10px;
  199. line-height: 22px;
  200. }
  201. }
  202. .headShrink{
  203. .tx{
  204. .img{
  205. width: 30px;
  206. height: 30px;
  207. }
  208. }
  209. .title{
  210. display: none;
  211. }
  212. }
  213. }
  214. </style>
  215. <style lang="scss">
  216. .el-scrollbar__thumb{
  217. height:0 !important;
  218. }
  219. .scrollbar-wrapper::-webkit-scrollbar{
  220. width:0 !important;
  221. }
  222. </style>