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

index.vue 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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 = ['home','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 == 'HIS管理'){
  68. let nameArr = ['hospitalStation','hospitalRecord','hospitalCharges','hisTool','outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord',];
  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 = ['home','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','stockDrugs','selfPreparedMedicine','inventoryTransfer','wareHouseManage','otherManagement'];
  121. let routerArr = [];
  122. this.permission_routers.map(item => {
  123. if(nameArr.indexOf(item.name) > -1){
  124. routerArr.push(item)
  125. }
  126. });
  127. this.arr = routerArr;
  128. if(this.arr.length > 0){
  129. let a = true;
  130. this.$emit('func',a)
  131. }else{
  132. let a = false;
  133. this.$emit('func',a)
  134. }
  135. }else if(newVal == "采购管理"){
  136. let nameArr = ['supplyManage','supplyList'];
  137. let routerArr = [];
  138. this.permission_routers.map(item => {
  139. if(nameArr.indexOf(item.name) > -1){
  140. routerArr.push(item)
  141. }
  142. });
  143. this.arr = routerArr;
  144. if(this.arr.length > 0){
  145. let a = true;
  146. this.$emit('func',a)
  147. }else{
  148. let a = false;
  149. this.$emit('func',a)
  150. }
  151. }else if(newVal == '配置管理'){
  152. let nameArr = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig'];
  153. // console.log('permission_routers',this.permission_routers)
  154. let routerArr = [];
  155. this.permission_routers.map(item => {
  156. if(nameArr.indexOf(item.name) > -1){
  157. routerArr.push(item)
  158. }
  159. });
  160. this.arr = routerArr;
  161. if(this.arr.length > 0){
  162. let a = true;
  163. this.$emit('func',a)
  164. }else{
  165. let a = false;
  166. this.$emit('func',a)
  167. }
  168. }else {
  169. this.arr = [];
  170. if(this.arr.length > 0){
  171. let a = true;
  172. this.$emit('func',a)
  173. }else{
  174. let a = false;
  175. this.$emit('func',a)
  176. }
  177. }
  178. },
  179. deep:true,
  180. immediate: true
  181. }
  182. }
  183. };
  184. </script>
  185. <style rel="stylesheet/scss" lang="scss" scoped>
  186. .sideColumn{
  187. // background-color: rgb(48, 65, 86);
  188. background-color:#fff;
  189. text-align: center;
  190. height:50px;
  191. line-height: 50px;
  192. border-top:1px solid #e5e5e5;
  193. border-bottom:1px solid #e5e5e5;
  194. // color: rgb(191, 203, 217);
  195. color:#000;
  196. .head {
  197. text-align: center;
  198. padding: 20px 0 0 0;
  199. .tx {
  200. .img {
  201. width: 45px;
  202. height: 45px;
  203. border-radius: 50%;
  204. -o-object-fit: cover;
  205. object-fit: cover;
  206. -o-object-position: center;
  207. object-position: center;
  208. }
  209. }
  210. .title {
  211. font-size: 14px;
  212. color: #bfcbd9;
  213. padding: 10px 10px 15px 10px;
  214. line-height: 22px;
  215. }
  216. }
  217. .headShrink{
  218. .tx{
  219. .img{
  220. width: 30px;
  221. height: 30px;
  222. }
  223. }
  224. .title{
  225. display: none;
  226. }
  227. }
  228. }
  229. </style>
  230. <style lang="scss">
  231. .el-scrollbar__thumb{
  232. height:0 !important;
  233. }
  234. .scrollbar-wrapper::-webkit-scrollbar{
  235. width:0 !important;
  236. }
  237. </style>