See999 4 years ago
parent
commit
fef6bfeb60

+ 1 - 1
config/dev.env.js View File

@@ -7,7 +7,7 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   BASE_API: '"http://api.xt.test.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  //BASE_API:'"http://localhost:9531"',
10
+  // BASE_API:'"http://localhost:9531"',
11 11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 13
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 1 - 1
config/index.js View File

@@ -20,7 +20,7 @@ module.exports = {
20 20
     // host: 'xt.test.sgjyun.com',
21 21
     // host: 'xt.kuyicloud.com',
22 22
     host: 'xt.test.sgjyun.com',
23
-    //host:'localhost',
23
+    // host:'localhost',
24 24
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
25 25
     autoOpenBrowser: true,
26 26
     errorOverlay: true,

+ 5 - 1
src/lang/zh.js View File

@@ -170,7 +170,11 @@ export default {
170 170
     remind_print: '排版提醒打印',
171 171
     system_prescription: '透析方案',
172 172
     integration_config: '集成配置',
173
-    his_config: 'HIS集成配置'
173
+    his_config: 'HIS集成配置',
174
+
175
+    slow:"慢病管理",
176
+    scrm:'SCRM',
177
+    shop:"分销商城",
174 178
   },
175 179
   navbar: {
176 180
     logOut: '退出登录',

+ 6 - 0
src/router/index.js View File

@@ -17,6 +17,9 @@ import org from './modules/org'
17 17
 import systems from './modules/systems'
18 18
 import data_upload from './modules/data_upload'
19 19
 import integration from './modules/integration'
20
+import slow from './modules/slow'
21
+import scrm from './modules/scrm'
22
+import shop from './modules/shop'
20 23
 
21 24
 
22 25
 
@@ -104,6 +107,9 @@ var _asy_router_map = [
104 107
   device,
105 108
   org,
106 109
   data_upload,
110
+  slow,
111
+  scrm,
112
+  shop,
107 113
   integration,
108 114
   systems,
109 115
 ]

+ 17 - 0
src/router/modules/scrm.js View File

@@ -0,0 +1,17 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/scrm',
5
+  component: Layout,
6
+  redirct: 'noredirect',
7
+  hidden:true,
8
+  children: [{
9
+    path: process.env.SRCM_HOST,
10
+    name: 'scrm',
11
+    meta: {
12
+      title: 'scrm',
13
+      other:true,
14
+      noCache: true
15
+    }
16
+  }]
17
+}

+ 17 - 0
src/router/modules/shop.js View File

@@ -0,0 +1,17 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/shop',
5
+  component: Layout,
6
+  redirct: 'noredirect',
7
+  hidden:true,
8
+  children: [{
9
+    path: process.env.MIRCO_MALL_HOST,
10
+    name: 'shop',
11
+    meta: {
12
+      title: 'shop',
13
+      other:true,
14
+      noCache: true
15
+    }
16
+  }]
17
+}

+ 17 - 0
src/router/modules/slow.js View File

@@ -0,0 +1,17 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/slow',
5
+  component: Layout,
6
+  redirct: 'noredirect',
7
+  hidden:true,
8
+  children: [{
9
+    path: 'process.env.CDM_HOST',
10
+    name: 'slow',
11
+    meta: {
12
+      title: 'slow',
13
+      other:true,
14
+      noCache: true
15
+    }
16
+  }]
17
+}

+ 2 - 2
src/store/modules/xt_permission.js View File

@@ -43,7 +43,7 @@ function xt_filterAsyncRouter(routers) {
43 43
 function setupRouters(urls) {
44 44
   // console.log(urls)
45 45
   xt_asyncRouterMap.forEach(router => {
46
-    // console.log(router.path)
46
+    console.log(router)
47 47
     if (Object.prototype.toString.call(router.children) === '[object Array]') {
48 48
       router.hidden = true
49 49
       router.children.forEach(c_router => {
@@ -61,7 +61,7 @@ function setupRouters(urls) {
61 61
     } else {
62 62
       router.hidden = true
63 63
       if (IndexOf(urls, router.path) !== -1) {
64
-        // console.log('router show : ' + router.path)
64
+        console.log('router show : ' + router.path)
65 65
       // if (urls.indexOf(router.path) !== -1) {
66 66
         router.hidden = false
67 67
       }

+ 87 - 6
src/store/modules/xt_user.js View File

@@ -214,9 +214,50 @@ const xt_user = {
214 214
             mall_role_exist: infoJSON.mall_role_exist
215 215
           })
216 216
 
217
-          commit('SET_URLFORS', {
218
-            urlfors: infoJSON.urlfors
219
-          })
217
+          
218
+          let urlfors = infoJSON.urlfors
219
+          if(infoJSON.cdm_role_exist == undefined){
220
+            console.log("有")
221
+            urlfors.push("/slow")
222
+            this.commit('SET_URLFORS', {
223
+              urlfors: urlfors
224
+            })
225
+            // console.log(222222222222,infoJSON)
226
+          }else{
227
+            this.commit('SET_URLFORS', {
228
+              urlfors: infoJSON.urlfors
229
+            })
230
+          }
231
+
232
+          if(infoJSON.scrm_role_exist == undefined){
233
+            urlfors.push("/scrm")
234
+            this.commit('SET_URLFORS', {
235
+              urlfors: urlfors
236
+            })
237
+            // console.log(222222222222,infoJSON)
238
+          }else{
239
+            this.commit('SET_URLFORS', {
240
+              urlfors: infoJSON.urlfors
241
+            })
242
+          }
243
+
244
+          if(infoJSON.mall_role_exist != undefined){
245
+            console.log("有")
246
+            urlfors.push("/shop")
247
+            this.commit('SET_URLFORS', {
248
+              urlfors: urlfors
249
+            })
250
+            // console.log(222222222222,infoJSON)
251
+          }else{
252
+            this.commit('SET_URLFORS', {
253
+              urlfors: infoJSON.urlfors
254
+            })
255
+          }
256
+          console.log(222222222222,infoJSON)
257
+          
258
+          // commit('SET_URLFORS', {
259
+          //   urlfors: infoJSON.urlfors
260
+          // })
220 261
 
221 262
           resolve(infoJSON.user.user_id)
222 263
         } else {
@@ -237,9 +278,49 @@ const xt_user = {
237 278
                 mall_role_exist: data.mall_role_exist
238 279
               })
239 280
 
240
-              this.commit('SET_URLFORS', {
241
-                urlfors: data.urlfors
242
-              })
281
+              let urlfors = infoJSON.urlfors
282
+              if(infoJSON.cdm_role_exist == undefined){
283
+                console.log("有")
284
+                urlfors.push("/slow")
285
+                this.commit('SET_URLFORS', {
286
+                  urlfors: urlfors
287
+                })
288
+                // console.log(222222222222,infoJSON)
289
+              }else{
290
+                this.commit('SET_URLFORS', {
291
+                  urlfors: infoJSON.urlfors
292
+                })
293
+              }
294
+
295
+              if(infoJSON.scrm_role_exist == undefined){
296
+                urlfors.push("/scrm")
297
+                this.commit('SET_URLFORS', {
298
+                  urlfors: urlfors
299
+                })
300
+                // console.log(222222222222,infoJSON)
301
+              }else{
302
+                this.commit('SET_URLFORS', {
303
+                  urlfors: infoJSON.urlfors
304
+                })
305
+              }
306
+
307
+              if(infoJSON.mall_role_exist == undefined){
308
+                console.log("有")
309
+                urlfors.push("/shop")
310
+                this.commit('SET_URLFORS', {
311
+                  urlfors: urlfors
312
+                })
313
+                // console.log(222222222222,infoJSON)
314
+              }else{
315
+                this.commit('SET_URLFORS', {
316
+                  urlfors: infoJSON.urlfors
317
+                })
318
+              }
319
+              
320
+
321
+              // this.commit('SET_URLFORS', {
322
+              //   urlfors: data.urlfors
323
+              // })
243 324
 
244 325
               commit('SET_FILEDS', {
245 326
                 fileds: data.fileds

+ 18 - 2
src/views/layout/components/Sidebar/SidebarItem.vue View File

@@ -8,7 +8,7 @@
8 8
       "
9 9
       @click="onClick(item)"
10 10
     >
11
-      <router-link :to="resolvePath(onlyOneChild.path)">
11
+      <router-link v-if="!onlyOneChild.meta.other" :to="resolvePath(onlyOneChild.path)">
12 12
         <el-menu-item
13 13
           :index="resolvePath(onlyOneChild.path)"
14 14
           :class="{ 'submenu-title-noDropdown': !isNest }"
@@ -23,6 +23,20 @@
23 23
           >{{ generateTitle(onlyOneChild.meta.title) }}</span>
24 24
         </el-menu-item>
25 25
       </router-link>
26
+      <a v-else :href="onlyOneChild.path" target="_blank">
27
+        <el-menu-item
28
+          :index="resolvePath(onlyOneChild.path)"
29
+          :class="{ 'submenu-title-noDropdown': !isNest }"
30
+        >
31
+          <i v-if="onlyOneChild.name == 'slow'" class="icon iconfont icon-manbing-xuanzhong" style="margin-right:4px"></i>
32
+          <i v-if="onlyOneChild.name == 'scrm'" class="icon iconfont icon-pengyou" style="margin-right:4px"></i>
33
+          <i v-if="onlyOneChild.name == 'shop'" class="icon iconfont icon-service_fill" style="margin-right:4px"></i>
34
+          <span
35
+            v-if="onlyOneChild.meta && onlyOneChild.meta.title"
36
+            slot="title"
37
+          >{{ generateTitle(onlyOneChild.meta.title) }}</span>
38
+        </el-menu-item>
39
+      </a>
26 40
     </div>
27 41
 
28 42
     <div v-else>
@@ -187,7 +201,9 @@ export default {
187 201
       return true;
188 202
     }
189 203
   },
190
-  created() {}
204
+  created() {
205
+    console.log(1111111111,this.permission_routers)
206
+  }
191 207
 };
192 208
 </script>
193 209
 

+ 2 - 2
src/views/layout/components/Sidebar/index.vue View File

@@ -37,7 +37,7 @@
37 37
         :index="index"
38 38
         @a="b"
39 39
       ></sidebar-item>
40
-     <el-menu-item v-if="this.$store.getters.xt_user.cdm_role_exist" index="100">
40
+     <!-- <el-menu-item v-if="this.$store.getters.xt_user.cdm_role_exist" index="100">
41 41
       <a :href="CDMWebsit()">
42 42
         <i class="icon iconfont icon-manbing-xuanzhong" style="margin-right:4px"></i>
43 43
         <span
@@ -60,7 +60,7 @@
60 60
             slot="title"
61 61
           >分销商城</span>
62 62
         </a>
63
-      </el-menu-item>
63
+      </el-menu-item> -->
64 64
     </el-menu>
65 65
 
66 66
   </el-scrollbar>