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

Layout.vue 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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 = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
  124. let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement']
  125. let peizhi = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config']
  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({ path: "/kuyiShopping",name:"kuyiShopping" })
  192. this.$router.push('/kuyiShopping/index')
  193. }else if(index == 6){
  194. this.CDMWebsit()
  195. }
  196. this.index = index
  197. this.navTitle = title
  198. this.sign = false
  199. },
  200. open(){
  201. this.sign = true
  202. },
  203. close(){
  204. this.sign = false
  205. },
  206. show(data){
  207. this.navShow = data
  208. },
  209. SCRMWebsit() {
  210. return process.env.SRCM_HOST;
  211. },
  212. MircoMallWebsit() {
  213. return process.env.MIRCO_MALL_HOST;
  214. },
  215. CDMWebsit() {
  216. return process.env.CDM_HOST;
  217. },
  218. }
  219. }
  220. </script>
  221. <style rel="stylesheet/scss" lang="scss" scoped>
  222. @import "src/styles/mixin.scss";
  223. .app-wrapper {
  224. @include clearfix;
  225. position: relative;
  226. height: 100%;
  227. width: 100%;
  228. &.mobile.openSidebar{
  229. position: fixed;
  230. top: 0;
  231. }
  232. }
  233. .drawer-bg {
  234. background: #000;
  235. opacity: 0.3;
  236. width: 100%;
  237. top: 0;
  238. height: 100%;
  239. position: absolute;
  240. z-index: 999;
  241. }
  242. // .sidebar-container{
  243. // position: fixed;
  244. // top:50px;
  245. // left:0;
  246. // }
  247. .navLeft{
  248. width:80px;
  249. height:100%;
  250. background: #1F2D3D;
  251. margin-top:50px;
  252. .navOne{
  253. font-size:14px;
  254. width:80px;
  255. height:80px;
  256. color:#BFCBD9;
  257. display: flex;
  258. align-items: center;
  259. flex-direction: column;
  260. cursor: pointer;
  261. .navIcon{
  262. margin: 16px 0 10px 0;
  263. font-size: 24px;
  264. }
  265. }
  266. .navActive{
  267. background: #409EFF;
  268. color:#fff;
  269. }
  270. }
  271. .mainBox{
  272. display:flex;
  273. width:100%;
  274. height:calc(100% - 50px)
  275. }
  276. #app .sidebar-container {
  277. width: 140px !important;
  278. height: 100%;
  279. margin-top:50px;
  280. overflow: visible;
  281. background-color: #fff;
  282. }
  283. .dialogBox{
  284. width: 392px;
  285. height: 400px;
  286. background: #304155;
  287. position: fixed;
  288. bottom:0;
  289. left:80px;
  290. z-index:4000;
  291. .dialogBoxTitle{
  292. display: flex;
  293. justify-content: space-between;
  294. padding:0 16px;
  295. border-bottom:1px solid #BFCBD9;
  296. height:44px;
  297. align-items: center;
  298. color:#BFCBD9;
  299. >:last-child{
  300. cursor: pointer;
  301. }
  302. }
  303. .dialogMain{
  304. display: flex;
  305. flex-wrap: wrap;
  306. }
  307. .dialogMainOne{
  308. color:#BFCBD9;
  309. display: flex;
  310. align-items: center;
  311. flex-direction: column;
  312. margin: 16px;
  313. .dialogIcon{
  314. width: 66px;
  315. height: 66px;
  316. background: rgba(64, 158, 255, 0.2);
  317. display: flex;
  318. align-items: center;
  319. margin-bottom: 10px;
  320. }
  321. .newIcon{
  322. margin: 0 auto;
  323. font-size: 24px;
  324. }
  325. >p{
  326. font-size: 14px;
  327. }
  328. }
  329. }
  330. .dialogMadol{
  331. position: fixed;
  332. left: 0;
  333. top: 0;
  334. width: 100%;
  335. height: 100%;
  336. opacity: .5;
  337. background: #000;
  338. z-index: 3000;
  339. }
  340. .new-main-container{
  341. width: calc(100% - 220px);
  342. }
  343. </style>