浏览代码

Merge remote-tracking branch 'origin/master'

yurk 2 年之前
父节点
当前提交
73bfa24b28

+ 3 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -141,9 +141,9 @@ public class AuthRedirectController {
             }
         }
         if (isMobile) {
-            redirecUrl = "http://mobworktime.ttkuaiban.com/#/" + router;
+            redirecUrl = "https://mobworktime.ttkuaiban.com/#/" + router;
         } else {
-            redirecUrl = "http://worktime.ttkuaiban.com/#/" + router;
+            redirecUrl = "https://worktime.ttkuaiban.com/#/" + router;
         }
         ModelAndView modelAndView = new ModelAndView(
                 new RedirectView(redirecUrl), reqParam);
@@ -238,7 +238,7 @@ public class AuthRedirectController {
                         reqParam.put("version", compExpireInfo.get("version"));
                     }
                 }
-                redirecUrl = "http://worktime.ttkuaiban.com/#/" + router;
+                redirecUrl = "https://worktime.ttkuaiban.com/#/" + router;
             }
         }
         ModelAndView modelAndView = new ModelAndView(

+ 8 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -270,6 +270,14 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     } else if (msgType.equals(TEXT_CARD_MSG_BUSTRIP_DENY)) {
                         title = "出差审核驳回";
                     }
+                } else if ("expense".equals(pageRouter)) {
+                    //费用报销
+                    title = "费用报销通知";
+                    if (msgType.equals(TEXT_CARD_MSG_EXPENSE_AGREE)) {
+                        title = "费用报销审核通过";
+                    } else if (msgType.equals(TEXT_CARD_MSG_EXPENSE_DENY)) {
+                        title = "费用报销审核驳回";
+                    }
                 }
             }
             cardJson.put("title", title);

+ 7 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -112,7 +112,7 @@
                         <!-- <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{roleArray[user.role]}}</span></el-dropdown-item> -->
                         <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{user.roleName}}</span></el-dropdown-item>
                         <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-medal" v-if="user.jobNumber"></i>{{user.jobNumber}}</span></el-dropdown-item>
-                        <el-dropdown-item @click.native="reset" v-if="!isCorpWX">{{$t('other.changeThePassword')}}</el-dropdown-item>
+                        <el-dropdown-item @click.native="reset" v-if="user.userNameNeedTranslate != 1">{{$t('other.changeThePassword')}}</el-dropdown-item>
                         <!-- <el-dropdown-item @click.native="editInfoOpen">修改信息</el-dropdown-item> -->
                         <el-dropdown-item divided @click.native="logout" v-if="!isCorpWX" >{{$t('other.launchTheLogin')}}</el-dropdown-item>
                     </el-dropdown-menu>
@@ -547,12 +547,17 @@
 
             // 获取企业微信的参数
             agentConfig() {
+                var isCorpWX = true
+                var ua = navigator.userAgent.toLowerCase();
+                if (ua.indexOf("wxwork") > 0) {
+                    isCorpWX = false;
+                } 
                 var curUrl = location.href.split("#")[0];
                 this.http.post("/wxcorp/getCorpWXConfig", {url: curUrl, token: this.user.id}, (res) => {
                     if (res.code == "ok") {
                         wx.config({ 
                         beta: true,
-                        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+                        debug: isCorpWX, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
                         appId: res.data.appid, // 必填,公众号的唯一标识 
                         timestamp: res.data.timestamp, // 必填,生成签名的时间戳 
                         nonceStr: res.data.noncestr, // 必填,生成签名的随机串 

+ 76 - 54
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -1,60 +1,66 @@
 <template>
-    <div class="login">
-        <div class="login-par">
-            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" label-width="0px" class="demo-ruleForm login-container">
-                <div class="login-logo">
-                    <img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
-                </div>
-                <h3 class="title">{{ $t('workingHoursHousekeeper') }}</h3>
-                <el-form-item class="login-input" prop="username">
-                    <el-input type="text" v-model="ruleForm.username" autocomplete="off" :placeholder="$t('zhang-hao-shou-ji-hao')" clearable prefix-icon="el-icon-user-solid"></el-input>
-                </el-form-item>
-                <el-form-item class="login-input" prop="password">
-                    <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="handleSubmit" autocomplete="off" :placeholder="$t('mi-ma')" show-password prefix-icon="el-icon-lock"></el-input>
-                </el-form-item>
-                <el-form-item class="login-button" style="width:100%;">
-                    <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('login') }}</el-button>
-                </el-form-item>
-                <div class="additional">
-                    <el-divider content-position="center">或</el-divider>
-                </div>
-                <div class="externalLanding">
-                    <div class="externalLanding_img" @click="wxworkCli()">
-                        <img src="../assets/image/qiyeweix.png" alt="">
+    <div>
+        <div class="login" v-if="!isCorpWX">
+            <div class="login-par">
+                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" label-width="0px" class="demo-ruleForm login-container">
+                    <div class="login-logo">
+                        <img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
                     </div>
-                </div>
-                <div class="toRegister">
-                    <el-link type="primary" class="btn" style="float:left;" :underline="false">{{ $t('lian-xi-ke-fu') }}
-                        <div class="service">
-                            <p style="color: #333">{{ $t('sao-ma-jia-ke-fu-wei-xin') }}</p>
-                            <img src="../assets/image/code.jpg">
-                            <p><span style="color: #333">QQ:</span><span id="QQ">3052894409</span></p>
+                    <h3 class="title">{{ $t('workingHoursHousekeeper') }}</h3>
+                    <el-form-item class="login-input" prop="username">
+                        <el-input type="text" v-model="ruleForm.username" autocomplete="off" :placeholder="$t('zhang-hao-shou-ji-hao')" clearable prefix-icon="el-icon-user-solid"></el-input>
+                    </el-form-item>
+                    <el-form-item class="login-input" prop="password">
+                        <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="handleSubmit" autocomplete="off" :placeholder="$t('mi-ma')" show-password prefix-icon="el-icon-lock"></el-input>
+                    </el-form-item>
+                    <el-form-item class="login-button" style="width:100%;">
+                        <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('login') }}</el-button>
+                    </el-form-item>
+                    <div class="additional">
+                        <el-divider content-position="center">或</el-divider>
+                    </div>
+                    <div class="externalLanding">
+                        <div class="externalLanding_img" @click="wxworkCli()">
+                            <img src="../assets/image/qiyeweix.png" alt="">
                         </div>
-                    </el-link>
-                    <el-link type="primary" style="margin-right:5px;" @click="dialogVisible=true" :underline="false">
-                        {{ $t('shi-yong-shuo-ming') }} </el-link>
-                    <el-link type="primary" v-if="!isCorpWX" @click="jumpTo" :underline="false">{{ $t('qi-ye-zhu-ce') }}</el-link>
+                    </div>
+                    <div class="toRegister">
+                        <el-link type="primary" class="btn" style="float:left;" :underline="false">{{ $t('lian-xi-ke-fu') }}
+                            <div class="service">
+                                <p style="color: #333">{{ $t('sao-ma-jia-ke-fu-wei-xin') }}</p>
+                                <img src="../assets/image/code.jpg">
+                                <p><span style="color: #333">QQ:</span><span id="QQ">3052894409</span></p>
+                            </div>
+                        </el-link>
+                        <el-link type="primary" style="margin-right:5px;" @click="dialogVisible=true" :underline="false">
+                            {{ $t('shi-yong-shuo-ming') }} </el-link>
+                        <el-link type="primary" v-if="!isCorpWX" @click="jumpTo" :underline="false">{{ $t('qi-ye-zhu-ce') }}</el-link>
+                    </div>
+                </el-form>
+            </div>
+            <el-dialog :title="$t('shi-yong-shuo-ming')" :visible.sync="dialogVisible" width="500px">
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_基础版.docx" download="工时管家使用说明_基础版.docx" 
+                            target="_blank">工时管家使用说明_基础版.docx</a></p>
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目管理专业版.docx" download="工时管家使用说明_项目管理专业版.docx" 
+                            target="_blank">工时管家使用说明_项目管理专业版.docx</a></p>
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_建筑工程专业版.docx" download="工时管家使用说明_建筑工程专业版.docx" 
+                            target="_blank">工时管家使用说明_建筑工程专业版.docx</a></p>
+                <!-- <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目经理.docx" download="工时管家使用说明_项目经理.docx" 
+                            target="_blank">工时管家使用说明_项目经理.docx</a></p>
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_普通员工.docx" download="工时管家使用说明_普通员工.docx" 
+                            target="_blank">工时管家使用说明_普通员工.docx</a></p> -->
+                
+            </el-dialog>
+            <el-dialog title="企业微信扫码登陆" :visible.sync="wxworkFlg" width="500px">
+                <div>
+                    <div id="wxcode"></div>
                 </div>
-            </el-form>
+            </el-dialog>
+        </div>
+        <!-- 企业微信的话 -->
+        <div class="qiweix" v-if="isCorpWX">
+            正在进入系统...
         </div>
-        <el-dialog :title="$t('shi-yong-shuo-ming')" :visible.sync="dialogVisible" width="500px">
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_基础版.docx" download="工时管家使用说明_基础版.docx" 
-                        target="_blank">工时管家使用说明_基础版.docx</a></p>
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目管理专业版.docx" download="工时管家使用说明_项目管理专业版.docx" 
-                        target="_blank">工时管家使用说明_项目管理专业版.docx</a></p>
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_建筑工程专业版.docx" download="工时管家使用说明_建筑工程专业版.docx" 
-                        target="_blank">工时管家使用说明_建筑工程专业版.docx</a></p>
-            <!-- <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目经理.docx" download="工时管家使用说明_项目经理.docx" 
-                        target="_blank">工时管家使用说明_项目经理.docx</a></p>
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_普通员工.docx" download="工时管家使用说明_普通员工.docx" 
-                        target="_blank">工时管家使用说明_普通员工.docx</a></p> -->
-            
-        </el-dialog>
-        <el-dialog title="企业微信扫码登陆" :visible.sync="wxworkFlg" width="500px">
-            <div>
-                <div id="wxcode"></div>
-            </div>
-        </el-dialog>
     </div>
 </template>
 
@@ -222,7 +228,7 @@
                 //     })
                 // })
                 var appId = "wwf11426cf618e1703";//企业微信第三方的SUIT ID
-                var url = "http://worktime.ttkuaiban.com/api/corpWXScanningAuth";//授权回调页面
+                var url = "https://worktime.ttkuaiban.com/api/corpWXScanningAuth";//授权回调页面
                 var weixinUrl=`https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid=${appId}&redirect_uri=${url}&state=0&usertype=member`;
                 window.location.href = weixinUrl;
             },
@@ -304,7 +310,7 @@
             },
             tryAutoLogin() {
                 var appId = "ww4e237fd6abb635af";//企业微信第三方的SUIT ID
-                var url = "http://worktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
+                var url = "https://worktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
                 window.location.href = weixinUrl;
             },
@@ -321,6 +327,14 @@
                                     } else {
                                         this.$router.push({ path: user.moduleList[0].path })
                                     }
+                                    if (!path) {
+                                        path = user.moduleList[0].path;
+                                    }
+                                    //去掉链接上存在的参数
+                                    if (location.href.indexOf("?")>0) {
+                                        var newHref = location.href.split("?")[0] + '#' + (path.indexOf('/')>-1?path:('/'+path));
+                                        location.href = newHref;
+                                    }
                                 }
                             } else {
                                 this.$message({
@@ -482,6 +496,14 @@
 </script>
 
 <style lang="scss" scoped>
+    .qiweix {
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        padding: 50px 0;
+        font-size: 40px;
+        color: #505458;
+    }
     .additional {
         width: 100%;
         text-align: center;