Ver código fonte

溧水app对接OA登录

sunyadv 5 anos atrás
pai
commit
c0554c87e8

+ 1 - 1
lss_vue/config/index.js

@@ -22,7 +22,7 @@ module.exports = {
   },
   dev: {
     env: require('./dev.env'),
-    port: 8090,
+    port: 8070,
     autoOpenBrowser: true,
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',

+ 14 - 1
lss_vue/src/views/Login.vue

@@ -116,7 +116,6 @@
                                 for(var i in res.data.functions) {
                                     str += res.data.functions[i].code + ",";
                                 }
-                                this.$store.dispatch('getRole',res.data);
                                 sessionStorage.setItem('power',str)
                                 sessionStorage.setItem('assetsTab',-1)
                                 this.$router.push({ path: '/assets' });
@@ -251,6 +250,20 @@
                 }
             },
         },
+        mounted() {
+            var url = location.hash;
+            var theRequest = new Object();
+            if (url.indexOf("?") != -1) {
+                var str = url.split("?")[1].substr(1);
+                var strs = str.split("&");
+                for(var i = 0; i < strs.length; i ++) {
+                    theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
+                }
+                this.ruleForm.loginName = theRequest.sername;
+                this.ruleForm.password = theRequest.password;
+                this.handleLogin();
+            }
+        },
     }
 </script>
 

+ 1 - 1
lss_vue/src/views/assets/assets.vue

@@ -237,7 +237,7 @@
                     let link = document.createElement('a')
                     link.style.display = 'none'
                     link.href = url
-                    link.setAttribute('download', '资产报表.xlsx')
+                    link.setAttribute('download', '资产报表.xls')
                     document.body.appendChild(link)
                     link.click()
                 }, error => {

+ 2 - 2
lss_vue/src/views/assets/assetsOperation.vue

@@ -227,7 +227,7 @@
                         let link = document.createElement('a')
                         link.style.display = 'none'
                         link.href = url
-                        link.setAttribute('download', '操作记录.xlsx')
+                        link.setAttribute('download', '处置记录.xls')
                         document.body.appendChild(link)
                         link.click()
                     }, error => {
@@ -248,7 +248,7 @@
                         let link = document.createElement('a')
                         link.style.display = 'none'
                         link.href = url
-                        link.setAttribute('download', '操作记录.xlsx')
+                        link.setAttribute('download', '维护记录.xls')
                         document.body.appendChild(link)
                         link.click()
                     }, error => {

+ 2 - 2
lss_vue/src/views/my/my.vue

@@ -17,8 +17,8 @@
         <div class="mybox">
             <mt-cell title="我的消息" is-link v-on:click.native="jumpTo(1)"><mt-badge v-if="newNum!=0" size="small" type="error">{{newNum}}</mt-badge><img slot="icon" src="../../assets/image/my_message.png" width="24" height="24"></mt-cell>
             <mt-cell title="我的资产" is-link v-on:click.native="jumpTo(2)"><img slot="icon" src="../../assets/image/my_assets.png" width="24" height="24"></mt-cell>
-            <mt-cell v-if="user.roles[0].rolename != '部门领导'" title="我的评分" is-link v-on:click.native="jumpTo(3)"><img slot="icon" src="../../assets/image/my_score.png" width="24" height="24"></mt-cell>
-            <mt-cell v-if="user.roles[0].rolename != '部门领导'" title="我的建议" is-link v-on:click.native="jumpTo(4)"><img slot="icon" src="../../assets/image/my_sug.png" width="24" height="24"></mt-cell>
+            <mt-cell v-if="user.roles!= null && user.roles[0].rolename != '部门领导'" title="我的评分" is-link v-on:click.native="jumpTo(3)"><img slot="icon" src="../../assets/image/my_score.png" width="24" height="24"></mt-cell>
+            <mt-cell v-if="user.roles!= null && user.roles[0].rolename != '部门领导'" title="我的建议" is-link v-on:click.native="jumpTo(4)"><img slot="icon" src="../../assets/image/my_sug.png" width="24" height="24"></mt-cell>
         </div>
         <div class="mybox">
             <mt-cell title="通讯录" is-link v-on:click.native="jumpTo(5)"><img slot="icon" src="../../assets/image/my_com.png" width="24" height="24"></mt-cell>

+ 0 - 1
lss_vue/src/vuex/store.js

@@ -47,7 +47,6 @@ const store = new Vuex.Store({
     },
     actions: {
         getRole(context, res) {
-            console.log(res)
         }
     }
 });

+ 1 - 1
lss_vue_wx/src/views/assets/assets.vue

@@ -447,7 +447,7 @@
                     let link = document.createElement('a')
                     link.style.display = 'none'
                     link.href = url
-                    link.setAttribute('download', '资产报表.xlsx')
+                    link.setAttribute('download', '资产报表.xls')
                     document.body.appendChild(link)
                     link.click()
                 }, error => {

+ 2 - 2
lss_vue_wx/src/views/assets/assetsOperation.vue

@@ -227,7 +227,7 @@
                         let link = document.createElement('a')
                         link.style.display = 'none'
                         link.href = url
-                        link.setAttribute('download', '操作记录.xlsx')
+                        link.setAttribute('download', '处置记录.xls')
                         document.body.appendChild(link)
                         link.click()
                     }, error => {
@@ -248,7 +248,7 @@
                         let link = document.createElement('a')
                         link.style.display = 'none'
                         link.href = url
-                        link.setAttribute('download', '操作记录.xlsx')
+                        link.setAttribute('download', '维护记录.xls')
                         document.body.appendChild(link)
                         link.click()
                     }, error => {