mo 4 年之前
父節點
當前提交
ccf558ccc9

+ 0 - 1
src/components/Auth/index.vue

@@ -54,7 +54,6 @@
             return true
             return true
           }
           }
         } else {
         } else {
-          console.log(auths,menus.includes(auths))
           return menus.includes(auths)
           return menus.includes(auths)
         }
         }
       },
       },

+ 3 - 1
src/store/modules/permission.js

@@ -21,7 +21,7 @@ function generateAsyncRouter (asyncRoutes, data) {
       generateAsyncRouter(asyncRoutes, item.children)
       generateAsyncRouter(asyncRoutes, item.children)
     }
     }
   })
   })
-
+  console.log(data)
   return data
   return data
 }
 }
 
 
@@ -111,8 +111,10 @@ const actions = {
       getSilder().then(res => {
       getSilder().then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
           let newData = recursionRouter(res.data);
           let newData = recursionRouter(res.data);
+          console.log(newData)
           recursionPermission(res.data)
           recursionPermission(res.data)
           let accessedRoutes
           let accessedRoutes
+
           // 生成异步路由表
           // 生成异步路由表
           accessedRoutes = generateAsyncRouter(asyncRoutes, newData)
           accessedRoutes = generateAsyncRouter(asyncRoutes, newData)
           // var result = accessedRoutes.concat({ path: '*', redirect: '/404', hidden: true })
           // var result = accessedRoutes.concat({ path: '*', redirect: '/404', hidden: true })

+ 13 - 6
src/views/main/index.vue

@@ -11,13 +11,16 @@
       />
       />
     </h2>
     </h2>
     <div class="m-core">
     <div class="m-core">
-      <tab-router @change="changeKey">
-        <auth auths="/main/main/allData/826" :router="['/main/main']">
-          <el-tab-pane lazy label="基本信息" name="baseinfo">
-            <baseinfo v-if="activeKey === 'baseinfo'" />
-          </el-tab-pane>
-        </auth>
 
 
+      <tab-router @change="changeKey">
+        <el-tab-pane
+          v-if="permission('/main/main/allData/826')"
+          lazy
+          label="基本信息"
+          name="baseinfo"
+        >
+          <baseinfo v-if="activeKey === 'baseinfo'" />
+        </el-tab-pane>
         <el-tab-pane v-if="permission('/getIndexErrData')" lazy name="abnormal">
         <el-tab-pane v-if="permission('/getIndexErrData')" lazy name="abnormal">
           <el-badge
           <el-badge
             slot="label"
             slot="label"
@@ -82,6 +85,10 @@ export default {
       activeKey: "",
       activeKey: "",
     };
     };
   },
   },
+  mounted(){
+    console.log(permission('/main/main/allData/826'))
+
+  },
   computed: {
   computed: {
     status() {
     status() {
       return this.$store.state.app.status || {};
       return this.$store.state.app.status || {};

+ 26 - 19
src/views/main/teamSchedule/index.vue

@@ -6,7 +6,7 @@
       ref="searchForm"
       ref="searchForm"
       @submit="search"
       @submit="search"
       @reset="onReSet"
       @reset="onReSet"
-       saveKey="/main/main/teamSchedule"
+      saveKey="/main/main/teamSchedule"
     >
     >
       <el-form-item prop="organId">
       <el-form-item prop="organId">
         <el-select
         <el-select
@@ -107,12 +107,12 @@
       <el-table-column align="center" prop="studentId" label="操作">
       <el-table-column align="center" prop="studentId" label="操作">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <div>
           <div>
-            <el-button
-              type="text"
-              v-if="scope.row.item == 'INSPECT'"
-              @click="gotoHander(scope.row)"
-              >安排日程</el-button
-            >
+            <auth v-if="scope.row.item == 'INSPECT'" auths="/main/scheduleDetail">
+              <el-button type="text" @click="gotoHander(scope.row)"
+                >安排日程</el-button
+              >
+            </auth>
+
             <el-button type="text" v-else @click="gotoHander(scope.row)"
             <el-button type="text" v-else @click="gotoHander(scope.row)"
               >回访记录</el-button
               >回访记录</el-button
             >
             >
@@ -165,7 +165,7 @@ export default {
         userId: "",
         userId: "",
         organId: "",
         organId: "",
         month: [],
         month: [],
-        searchType:''
+        searchType: "",
       },
       },
       handleForm: {
       handleForm: {
         memo: "",
         memo: "",
@@ -183,12 +183,12 @@ export default {
     };
     };
   },
   },
   mounted() {
   mounted() {
-    const { query } = this.$route
+    const { query } = this.$route;
     if (query.organId) {
     if (query.organId) {
-      this.searchForm.organId = query.organId
+      this.searchForm.organId = query.organId;
     }
     }
-    if( query.start&&query.end){
-      this.searchForm.month = [query.start,query.end]
+    if (query.start && query.end) {
+      this.searchForm.month = [query.start, query.end];
     }
     }
     this.$store.dispatch("setBranchs");
     this.$store.dispatch("setBranchs");
     this.getList();
     this.getList();
@@ -206,17 +206,16 @@ export default {
       this.getList();
       this.getList();
     },
     },
     async getList() {
     async getList() {
-             let { month, ...rest } = this.searchForm;
+      let { month, ...rest } = this.searchForm;
       let params = {
       let params = {
         ...rest,
         ...rest,
         page: this.rules.page,
         page: this.rules.page,
         rows: this.rules.limit,
         rows: this.rules.limit,
-        ...getTimes(month, ["startTime", "endTime"],"YYYY-MM"),
+        ...getTimes(month, ["startTime", "endTime"], "YYYY-MM"),
         searchType: this.$route.query.searchType,
         searchType: this.$route.query.searchType,
       };
       };
       try {
       try {
-        const res = await getInspectionItem(params
-      );
+        const res = await getInspectionItem(params);
         this.tableList = res.data.rows;
         this.tableList = res.data.rows;
         this.rules.total = res.data.total;
         this.rules.total = res.data.total;
       } catch (e) {
       } catch (e) {
@@ -233,7 +232,7 @@ export default {
         const res = await resetInspectionItem(this.handleForm);
         const res = await resetInspectionItem(this.handleForm);
         this.$message.success("提交成功");
         this.$message.success("提交成功");
         this.getList();
         this.getList();
-       this.handleVisible = false
+        this.handleVisible = false;
       } catch (e) {
       } catch (e) {
         console.log(e);
         console.log(e);
       }
       }
@@ -251,8 +250,16 @@ export default {
       } else {
       } else {
         // 下校巡查
         // 下校巡查
         this.$router.push({
         this.$router.push({
-          path: "/main/scheduleDetail",
-          query: { teacher: row.userId, startTime, endTime,name:row.userName,organId:row.organId,itemId:row.id,times:row.times},
+          path: "scheduleDetail",
+          query: {
+            teacher: row.userId,
+            startTime,
+            endTime,
+            name: row.userName,
+            organId: row.organId,
+            itemId: row.id,
+            times: row.times,
+          },
         });
         });
       }
       }
     },
     },

+ 2 - 1
src/views/main/teamSchedule/scheduleDetail.vue

@@ -123,6 +123,7 @@ export default {
     };
     };
   },
   },
   async mounted() {
   async mounted() {
+    console.log('加载页面')
     this.init();
     this.init();
     // 获取乐团
     // 获取乐团
     try {
     try {
@@ -220,7 +221,7 @@ export default {
       this.$refs.taskList.getList();
       this.$refs.taskList.getList();
     },
     },
     onCancel() {
     onCancel() {
-        this.$store.dispatch('delVisitedViews', this.$route) 
+        this.$store.dispatch('delVisitedViews', this.$route)
       this.$router.push({
       this.$router.push({
         path: "/main/main",
         path: "/main/main",
         query: { tabrouter: "teamSchedule" },
         query: { tabrouter: "teamSchedule" },

+ 2 - 2
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 测试服
-// let target = 'http://47.114.176.40:8000' //开发环境
+// let target = 'http://dev.dayaedu.com' // 测试服
+let target = 'http://47.114.176.40:8000' //开发环境
 // let target = 'http://192.168.3.134' // 乔
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
 module.exports = {