Explorar o código

登录及去除打印

zhuliu %!s(int64=3) %!d(string=hai) anos
pai
achega
9e1de99523

+ 11 - 0
src/api/admin.js

@@ -45,6 +45,17 @@ export default {
   adminLogin(data) {
     return axios.post('/permission/api/admin/login', data)
   },
+  /**
+   * 判断是否用户登录
+   */
+   IsadminLogin(params) {
+    return axios({
+      url: '/permission/api/system/getLoginStatusByToken',
+      method: 'post',
+      params: params
+    })
+    // return axios.post('/permission/api/system/getLoginStatusByToken', params)
+  },
    /**
    * 退出登录
    */

+ 1 - 1
src/components/Layout/index.vue

@@ -56,7 +56,7 @@ export default {
     this.$store.commit('SET_PREFIX', '')
   },
   async mounted() {
-    console.log(this,'99999999');
+    // console.log(this,'99999999');
     this.show = false
     this.button = this.$route.meta.button || []
     await this.getUserinfo()

+ 1 - 4
src/views/apply/index.vue

@@ -155,7 +155,7 @@ export default {
   methods: {
     expandChange(row,expandedRows) {
 			let that=this
-			console.log(expandedRows);
+			// console.log(expandedRows);
 			if (expandedRows.length) {
               that.expands = []
               if (row) {
@@ -189,8 +189,6 @@ export default {
       this.title = '应用详情'
       this.showvisible = true
       this.$api.getAllTenantByApplicationId({id:row.id}).then(response=>{
-         console.log(response)
-         
          this.ruleForm = response.data
          this.ruleForm.apply={...row}
       })
@@ -231,7 +229,6 @@ export default {
           } else {
             this.ruleForm.tenant=this.userinfo.tenantId
             this.$api.addApply(this.ruleForm).then(response => {
-              console.log(2,response)
               this.$message.success('新增成功')
               this.btnLoading = false
               this.getList()

+ 0 - 1
src/views/client/index.vue

@@ -360,7 +360,6 @@ export default {
       });
     },
      handleReset(row) {
-      console.log(row)
 				this.$confirm("确认将用户密码重置吗?", "提示", {
 					confirmButtonText: "确定",
 					cancelButtonText: "取消",

+ 2 - 6
src/views/dataPermission/index.vue

@@ -390,7 +390,7 @@ export default {
       this.list= a
     },
     getNode(node){
-      console.log(node)
+      // console.log(node)
     },
     normalizer(node) {
       return {
@@ -408,7 +408,7 @@ export default {
     handleEdit(row) {
       this.title = '编辑数据权限'
       this.visible = true
-      console.log(JSON.parse(row.rule))
+
       if(JSON.parse(row.rule).hasOwnProperty('left')){
         this.TreeToList(JSON.parse(row.rule))
       }else{
@@ -428,14 +428,11 @@ export default {
       this.times+=1
       this.loading = true
       this.queryParams.functionId = this.func.fun.id
-      console.log(this.queryParams)
       this.$api.getDataList(this.queryParams).then(response => {
         this.tableData = response.data
     
        this.$nextTick(()=>{
        if(this.func.permission){
-        // console.log(this.func)
-          //  this.toggleSelection([this.func.permission])
           this.$refs.dataTable.toggleRowSelection(this.tableData.find(item=>{
       		return this.func.permission.id == item.id;  
    		}),true)
@@ -458,7 +455,6 @@ export default {
           this.ruleForm.functionId=this.fun.fun.id
           this.btnLoading = true
           this.ListToTree()
-          console.log(this.ruleForm)
           if (this.ruleForm.id) {
             this.$api.editData(this.ruleForm).then(response => {
               this.$message.success('编辑成功')

+ 1 - 3
src/views/department/index.vue

@@ -145,7 +145,7 @@ export default {
   },
   methods: {
     getNode(node){
-      console.log(node)
+
 
     },
     normalizer(node) {
@@ -155,7 +155,6 @@ export default {
       }
     },
     handleAdd(updepartmentId,row) {
-      console.log(row)
       this.title = '新增部门'
       this.visible = true
       if(updepartmentId==0){
@@ -252,7 +251,6 @@ export default {
             })
           } else {
             this.ruleForm.tenant=this.userinfo.tenantId
-            console.log(this.ruleForm)
             this.$api.addDepartment(this.ruleForm).then(response => {
               this.$message.success('新增成功')
               this.btnLoading = false

+ 0 - 6
src/views/function/index.vue

@@ -124,12 +124,10 @@ export default {
   },
   watch:{
     "queryParams.apply"(val){
-      console.log(val)
       this.queryParams.apply=val
     }
   },
   mounted() {
-    console.log(this.applyId)
     this.queryParams.apply=this.applyId
     this.getList()
     
@@ -145,7 +143,6 @@ export default {
           }, 200);
         } else {
           this.$api.getApplyList().then(response => {
-        console.log(response)
         this.applyList=response.data
       }).catch(error => {
         this.loading = false
@@ -160,7 +157,6 @@ export default {
     },
     getApplyList(){
      this.$api.getApplyList().then(response => {
-        console.log(response.data)
         this.applyList=response.data
       }).catch(error => {
         this.loading = false
@@ -217,7 +213,6 @@ export default {
       this.getApplyList()
       this.loading = true
       this.$api.getFunctionList(this.queryParams).then(response => {
-        console.log(response)
         this.tableData = response.data
        var a = response.data.children
       for(var j = 0;j<a.length;j++){
@@ -257,7 +252,6 @@ export default {
               this.btnLoading = false
             })
           } else {
-            console.log(this.ruleForm)
             this.$api.addFunction(this.ruleForm).then(response => {
               this.$message.success('新增成功')
               this.btnLoading = false

+ 0 - 1
src/views/group/index.vue

@@ -177,7 +177,6 @@ export default {
         if (valid) {
           this.btnLoading = true
           if (this.ruleForm.id) {
-            console.log(this.ruleForm)
             this.$api.editGroup(this.ruleForm).then(response => {
               this.$message.success('编辑成功')
               this.btnLoading = false

+ 0 - 1
src/views/layout/index.vue

@@ -128,7 +128,6 @@ export default {
   methods: {
   changePermission(){
       this.webSocket.onmessage = (e) => {
-            console.log(JSON.parse(e.data) )
             if(JSON.parse(e.data).code=='903' ){
               this.getPermissionList()
             }

+ 13 - 2
src/views/login/index.vue

@@ -159,14 +159,25 @@ export default {
     
     var url=location.href;
     var params=url.split("?");
-       console.log(params);
+      //  console.log(params);
        if(params[1]){
          var a = params[1]
           var b= a.split("=")
+          // console.log(b[1])
           if(b){
-              this.$router.push({
+            var token=b[1]
+            this.$api.IsadminLogin({token:token}).then(response=>{
+              // console.log(response)
+              if(response.data==true){
+                 this.$router.push({
                     path: '/admin'
                   })
+              }else{
+                this.$message.error('您未登录,请重新登录!')
+              }
+              
+            })
+             
           }
  
        }

+ 0 - 1
src/views/position/index.vue

@@ -184,7 +184,6 @@ export default {
     getList() {
       this.loading = true
       this.$api.getPositionList(this.queryParams).then(response => {
-        console.log(response)
         this.tableData = response.data
         this.total = response.pageColumn.total
         this.loading = false

+ 3 - 17
src/views/role/index.vue

@@ -204,7 +204,6 @@ export default {
     premissSubmit() {
       if(this.permissionData.filter(item=>item.functionId == this.pdata.functionId)[0]){
         if(this.pdata.data){
-          // console.log(11)
           this.permissionData.filter(item=>item.functionId == this.pdata.functionId)[0].data = this.pdata.data
         }else{
           //  console.log(this.permissionData)
@@ -218,26 +217,19 @@ export default {
         if (this.pdata.data) {
         this.permissionData.push(this.pdata)
       } 
-      // else {
-      //   this.permissionData.pop()
-      // }
+
       }
-     
-      console.log(this.permissionData)
+
       this.permissVisible=false
     },
     getFunInfo(val) {
-      console.log(val)
       if(!this.checkList.includes(val)){
           var index = this.permissionData.findIndex((item) => {
               return item.functionId == val;
           });
-          console.log(index)
         if (index!=-1) {
-          // console.log(1121)
           this.permissionData.splice(index,1)
         }
-        console.log(this.permissionData)
       }else{
         this.permissionData.push({
           functionId:val,
@@ -275,7 +267,7 @@ export default {
         this.checkList.push(row.permissionData[i].functionId)
       }
       this.permissionData = row.permissionData
-      console.log(row)
+
     },
     addpremissVisibale(val) {
       this.permissTitle = '添加数据权限管理'
@@ -295,7 +287,6 @@ export default {
   
     premissClose() {
       this.permissVisible = false
-      console.log(this.functionId)
     },
      handleCurrentChange(val) {
       this.queryParams.current = val;
@@ -323,11 +314,6 @@ export default {
         if (valid) {
           // this.ruleForm.functions=[]
           this.ruleForm.permissionData = this.permissionData
-        // for(var i =0;i<this.ruleForm.function.length;i++){
-        //   var a =this.ruleForm.function[i].join(',')
-        //   this.ruleForm.functions.push(a)
-        // }
-        console.log(this.ruleForm)
           this.btnLoading = true
           if (this.ruleForm.id) {
             this.$api.editRole(this.ruleForm).then(response => {

+ 0 - 7
src/views/user/index.vue

@@ -683,12 +683,10 @@
 			// },
 			handleClose(index) {
 				this.ruleForm.positions.splice(index, 1);
-				console.log(this.ruleForm.positions);
 			},
 			handleChange(val) {
 				// console.log(val)
 				let res = this.getVal(val, this.departmentList, []);
-				console.log(res, res.join("/"));
 				this.labelVal = res.join("/");
 			},
 			getVal(data, options, arr) {
@@ -735,7 +733,6 @@
 				this.ruleForm = { ...row };
 			},
 			handleDetails(row) {
-				console.log(row);
 				this.title = "人员详情";
 				this.showvisible = true;
 				this.ruleForm.apply = row;
@@ -766,7 +763,6 @@
 				});
 			},
 			showInputLabel() {
-				console.log(this.positionAndDepartment);
 				let departmentName = this.getVal(
 					[
 						this.positionAndDepartment.department[
@@ -790,8 +786,6 @@
 						],
 					departmentName: departmentName[departmentName.length - 1],
 				});
-				console.log(this.ruleForm.positions);
-				console.log(this.ruleForm);
 				this.positionAndDepartment = {};
 				this.labelVal = "";
 			},
@@ -815,7 +809,6 @@
 			submit() {
 				this.$refs.ruleForm.validate((valid) => {
 					if (valid) {
-						console.log(this.ruleForm);
 						this.btnLoading = true;
 						if (this.ruleForm.id) {
 							this.$api