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

Layout.vue 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <template>
  2. <div class="app-wrapper" :class="classObj">
  3. <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"></div>
  4. <div class="mainBox">
  5. <div class="navLeft">
  6. <div v-if="menzhenShow" :class="index == 0 ? 'navOne navActive' : 'navOne'" @click="clickActive(0,'门诊管理')">
  7. <i class="iconfont icon--yishengmenzhen navIcon"></i>
  8. <p>门诊管理</p>
  9. </div>
  10. <div v-if="bingliShow" :class="index == 1 ? 'navOne navActive' : 'navOne'" @click="clickActive(1,'电子病历')">
  11. <i class="iconfont icon-s_bingli navIcon"></i>
  12. <p>电子病历</p>
  13. </div>
  14. <div v-if="touxiShow" :class="index == 2 ? 'navOne navActive' : 'navOne'" @click="clickActive(2,'透析管理')">
  15. <i class="iconfont icon-computer_fill navIcon"></i>
  16. <p>透析管理</p>
  17. </div>
  18. <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库存管理')">
  19. <i class="iconfont icon-kccx navIcon"></i>
  20. <p>库存管理</p>
  21. </div>
  22. <div v-if="kuyishoppingShow" :class="index == 4 ? 'navOne navActive' : 'navOne'" @click="clickActive(4,'酷医商城')">
  23. <i class="iconfont icon-shangcheng-1 navIcon"></i>
  24. <p>酷医商城</p>
  25. </div>
  26. <div class="navOne" @click="open">
  27. <i class="iconfont icon-manage_fill navIcon"></i>
  28. <p>更多</p>
  29. </div>
  30. </div>
  31. <sidebar :navTitle="navTitle" v-show="navShow" class="sidebar-container" @func="show"></sidebar>
  32. <div class="main-container new-main-container" style="flex:1;margin-top:50px;">
  33. <navbar></navbar>
  34. <!-- <tags-view></tags-view> -->
  35. <app-main></app-main>
  36. </div>
  37. </div>
  38. <div class="dialogMadol" v-if="sign" @click="close"></div>
  39. <div class="dialogBox" v-if="sign">
  40. <div class="dialogBoxTitle">
  41. <span>更多菜单</span>
  42. <span @click="close">关闭</span>
  43. </div>
  44. <div class="dialogMain">
  45. <!-- <div class="dialogMainOne" @click="clickActive(5,'库存管理')">
  46. <div class="dialogIcon">
  47. <i class="el-icon-menu newIcon"></i>
  48. </div>
  49. <p>库存管理</p>
  50. </div> -->
  51. <a :href="CDMWebsit()" target="_blank" v-if="this.$store.getters.xt_user.cdm_role_exist">
  52. <div class="dialogMainOne">
  53. <div class="dialogIcon">
  54. <i class="iconfont icon-yiliao newIcon"></i>
  55. </div>
  56. <p>慢病管理</p>
  57. </div>
  58. </a>
  59. <a :href="SCRMWebsit()" target="_blank" v-if="this.$store.getters.xt_user.scrm_role_exist">
  60. <div class="dialogMainOne">
  61. <div class="dialogIcon">
  62. <i class="iconfont icon-yingxiao newIcon"></i>
  63. </div>
  64. <p>营销管理</p>
  65. </div>
  66. </a>
  67. <!-- <div class="dialogMainOne">
  68. <div class="dialogIcon">
  69. <i class="iconfont icon-shujufenxi-jingyinggaikuang newIcon"></i>
  70. </div>
  71. <p>经营中心</p>
  72. </div> -->
  73. <a :href="MircoMallWebsit()" target="_blank" v-if="this.$store.getters.xt_user.mall_role_exist">
  74. <div class="dialogMainOne">
  75. <div class="dialogIcon">
  76. <i class="iconfont icon-fenxiao newIcon"></i>
  77. </div>
  78. <p>分销商城</p>
  79. </div>
  80. </a>
  81. <div v-if="peizhiShow" class="dialogMainOne" @click="clickActive(11,'配置管理')">
  82. <div class="dialogIcon">
  83. <i class="iconfont icon-setup_fill newIcon"></i>
  84. </div>
  85. <p>配置管理</p>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </template>
  91. <script>
  92. import { mapGetters } from "vuex";
  93. import { Navbar, Sidebar, AppMain, TagsView } from './components'
  94. import ResizeMixin from './mixin/ResizeHandler'
  95. export default {
  96. name: 'layout',
  97. components: {
  98. Navbar,
  99. Sidebar,
  100. AppMain,
  101. TagsView
  102. },
  103. mixins: [ResizeMixin],
  104. data(){
  105. return{
  106. index:2,
  107. navTitle:'透析管理',
  108. sign:false,
  109. navShow:true,
  110. //
  111. menzhenShow:true,
  112. bingliShow:true,
  113. touxiShow:true,
  114. kucunShow:true,
  115. peizhiShow:true,
  116. kuyishoppingShow:true,
  117. }
  118. },
  119. created(){
  120. console.log('permission_routers',this.permission_routers)
  121. let menzhen = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy']
  122. let bingli = ['User','createPatient']
  123. let touxi = ['workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'quality_control']
  124. let kucun = ['stockManage','selfPreparedMedicine','stockDrugs','otherManagement']
  125. let peizhi = ['system','roleManage','dictionary','specialDictionary','template','prescription','druguse','showconfig','printTemplate']
  126. let kuyishopping = ['kuyiShopping']
  127. let menzhenArr = []
  128. let bingliArr = []
  129. let touxiArr = []
  130. let kucunArr = []
  131. let peizhiArr = []
  132. let kuyishoppingArr = []
  133. this.permission_routers.map(item => {
  134. if(menzhen.indexOf(item.name) > -1){
  135. menzhenArr.push(item)
  136. }else if(bingli.indexOf(item.name) > -1){
  137. bingliArr.push(item)
  138. }else if(touxi.indexOf(item.name) > -1){
  139. touxiArr.push(item)
  140. }else if(kucun.indexOf(item.name) > -1){
  141. kucunArr.push(item)
  142. }else if(peizhi.indexOf(item.name) > -1){
  143. peizhiArr.push(item)
  144. }else if(kuyishopping.indexOf(item.name) > -1){
  145. kuyishoppingArr.push(item)
  146. }
  147. })
  148. // console.log('menzhenArr.length',menzhenArr.length)
  149. // console.log('bingliArr.length',bingliArr.length)
  150. // console.log('touxiArr.length',touxiArr.length)
  151. // console.log('kucunArr.length',kucunArr.length)
  152. // console.log('peizhiArr.length',peizhiArr.length)
  153. // console.log('kuyishoppingArr.length',kuyishoppingArr.length)
  154. if(menzhenArr.length == 0){
  155. this.menzhenShow = false
  156. }else if(bingliArr.length == 0){
  157. this.bingliShow = false
  158. }else if(touxiArr.length == 0){
  159. this.touxiShow = false
  160. }else if(kucunArr.length == 0){
  161. this.kucunShow = false
  162. }else if(peizhiArr.length == 0){
  163. this.peizhiShow = false
  164. }else if(kuyishoppingArr.length == 0){
  165. this.kuyishoppingShow = false
  166. }
  167. },
  168. computed: {
  169. ...mapGetters(["permission_routers"]),
  170. sidebar() {
  171. return this.$store.state.app.sidebar
  172. },
  173. device() {
  174. return this.$store.state.app.device
  175. },
  176. classObj() {
  177. return {
  178. hideSidebar: !this.sidebar.opened,
  179. openSidebar: this.sidebar.opened,
  180. withoutAnimation: this.sidebar.withoutAnimation,
  181. mobile: this.device === 'mobile'
  182. }
  183. }
  184. },
  185. methods: {
  186. handleClickOutside() {
  187. this.$store.dispatch('closeSideBar', { withoutAnimation: false })
  188. },
  189. clickActive(index,title){
  190. if(index == 4){
  191. this.$router.push('/kuyiShopping')
  192. }else if(index == 6){
  193. this.CDMWebsit()
  194. }
  195. this.index = index
  196. this.navTitle = title
  197. this.sign = false
  198. },
  199. open(){
  200. this.sign = true
  201. },
  202. close(){
  203. this.sign = false
  204. },
  205. show(data){
  206. this.navShow = data
  207. },
  208. SCRMWebsit() {
  209. return process.env.SRCM_HOST;
  210. },
  211. MircoMallWebsit() {
  212. return process.env.MIRCO_MALL_HOST;
  213. },
  214. CDMWebsit() {
  215. return process.env.CDM_HOST;
  216. },
  217. }
  218. }
  219. </script>
  220. <style rel="stylesheet/scss" lang="scss" scoped>
  221. @import "src/styles/mixin.scss";
  222. .app-wrapper {
  223. @include clearfix;
  224. position: relative;
  225. height: 100%;
  226. width: 100%;
  227. &.mobile.openSidebar{
  228. position: fixed;
  229. top: 0;
  230. }
  231. }
  232. .drawer-bg {
  233. background: #000;
  234. opacity: 0.3;
  235. width: 100%;
  236. top: 0;
  237. height: 100%;
  238. position: absolute;
  239. z-index: 999;
  240. }
  241. // .sidebar-container{
  242. // position: fixed;
  243. // top:50px;
  244. // left:0;
  245. // }
  246. .navLeft{
  247. width:80px;
  248. height:100%;
  249. background: #1F2D3D;
  250. margin-top:50px;
  251. .navOne{
  252. width:80px;
  253. height:80px;
  254. color:#BFCBD9;
  255. display: flex;
  256. align-items: center;
  257. flex-direction: column;
  258. cursor: pointer;
  259. .navIcon{
  260. margin: 16px 0 10px 0;
  261. font-size: 24px;
  262. }
  263. }
  264. .navActive{
  265. background: #409EFF;
  266. color:#fff;
  267. }
  268. }
  269. .mainBox{
  270. display:flex;
  271. width:100%;
  272. height:calc(100% - 50px)
  273. }
  274. #app .sidebar-container {
  275. width: 150px !important;
  276. height: 100%;
  277. margin-top:50px;
  278. overflow: visible;
  279. background-color: #fff;
  280. }
  281. .dialogBox{
  282. width: 392px;
  283. height: 400px;
  284. background: #304155;
  285. position: fixed;
  286. bottom:0;
  287. left:80px;
  288. z-index:4000;
  289. .dialogBoxTitle{
  290. display: flex;
  291. justify-content: space-between;
  292. padding:0 16px;
  293. border-bottom:1px solid #BFCBD9;
  294. height:44px;
  295. align-items: center;
  296. color:#BFCBD9;
  297. >:last-child{
  298. cursor: pointer;
  299. }
  300. }
  301. .dialogMain{
  302. display: flex;
  303. flex-wrap: wrap;
  304. }
  305. .dialogMainOne{
  306. color:#BFCBD9;
  307. display: flex;
  308. align-items: center;
  309. flex-direction: column;
  310. margin: 16px;
  311. .dialogIcon{
  312. width: 66px;
  313. height: 66px;
  314. background: rgba(64, 158, 255, 0.2);
  315. display: flex;
  316. align-items: center;
  317. margin-bottom: 10px;
  318. }
  319. .newIcon{
  320. margin: 0 auto;
  321. font-size: 24px;
  322. }
  323. >p{
  324. font-size: 14px;
  325. }
  326. }
  327. }
  328. .dialogMadol{
  329. position: fixed;
  330. left: 0;
  331. top: 0;
  332. width: 100%;
  333. height: 100%;
  334. opacity: .5;
  335. background: #000;
  336. z-index: 3000;
  337. }
  338. .new-main-container{
  339. width: calc(100% - 220px);
  340. }
  341. </style>