|
@@ -13,36 +13,25 @@
|
|
|
<!-- 主体 -->
|
|
|
<main class="mt-10">
|
|
|
<div class="bg-fff">
|
|
|
- <!-- <div v-if="userInfo.companyId == '7'"> -->
|
|
|
-
|
|
|
- <van-cell title="当前版本" :title-style="'flex: 0.5;'" :value="version"></van-cell>
|
|
|
-
|
|
|
<div style="height: 20px;background: #f4f4f4"></div>
|
|
|
<!-- </div> -->
|
|
|
<van-cell title="账号" v-if="userInfo.userNameNeedTranslate != '1'" :title-style="'flex: 0.5;'" :value="userInfo.phone"></van-cell>
|
|
|
<van-cell title="工号" v-if="userInfo.jobNumber" :title-style="'flex: 0.5;'" :value="userInfo.jobNumber"></van-cell>
|
|
|
-
|
|
|
+ <van-cell title="角色" v-if="userInfo.roleName" :title-style="'flex: 0.5;'" :value="userInfo.roleName"></van-cell>
|
|
|
<div style="height: 20px;background: #f4f4f4"></div>
|
|
|
|
|
|
<van-cell title="公司" :title-style="'flex: 0.5;'" :value="userInfo.companyName"></van-cell>
|
|
|
<van-cell title="有效日期" :title-style="'flex: 0.5;'" :value="expirationDate"></van-cell>
|
|
|
|
|
|
<div style="height: 20px;background: #f4f4f4"></div>
|
|
|
- <!-- <div v-if="userInfo.companyId == '7'"> -->
|
|
|
- <van-cell title="使用说明" :title-style="'flex: 1;'" is-link @click="instructions()"></van-cell>
|
|
|
- <van-cell title="在线客服" :title-style="'flex: 1;'" is-link @click="tokefu()"></van-cell>
|
|
|
- <van-cell title="添加员工" :title-style="'flex: 1;'" is-link @click="addEmployee()" v-if="wxManager"></van-cell>
|
|
|
- <!-- </div> -->
|
|
|
- <!-- <van-cell title="修改密码" isLink to="/my/set"></van-cell> -->
|
|
|
</div>
|
|
|
- <van-cell :title="'绑定'+(isCorpWX?'企业':'')+'微信'" v-if="userInfo.userNameNeedTranslate != '1' && (isCorpWX || isWX)" @click="bindWeiXin" style="margin-top:10px;" :title-style="'flex: 2.5;'" label="绑定微信后可接收工时填报提醒">
|
|
|
+ <!-- <van-cell :title="'绑定'+(isCorpWX?'企业':'')+'微信'" v-if="userInfo.userNameNeedTranslate != '1' && (isCorpWX || isWX)" @click="bindWeiXin" style="margin-top:10px;" :title-style="'flex: 2.5;'" label="绑定微信后可接收工时填报提醒">
|
|
|
<template>
|
|
|
<span v-if="(isCorpWX && userInfo.corpwxUserid == null) || (isWX && userInfo.wxOpenid == null)" style="color:#ff0000;">未绑定</span>
|
|
|
<span v-if="(isCorpWX && userInfo.corpwxUserid != null) || (isWX && userInfo.wxOpenid != null)" style="color:#7CCD7C;">已绑定</span>
|
|
|
</template>
|
|
|
- </van-cell>
|
|
|
- <van-button class="logout" @click="logout" block round type="danger" v-if="!isCorpWX">退出登录</van-button>
|
|
|
- <!-- <van-button class="logout" @click="logout" block round type="danger" >退出登录</van-button> -->
|
|
|
+ </van-cell> -->
|
|
|
+ <van-button class="logout" @click="logout" block round type="danger" v-if="userInfo.roleName=='超级管理员' || userInfo.roleName=='系统管理员'">退出登录</van-button>
|
|
|
</main>
|
|
|
|
|
|
<Footer page="my" />
|
|
@@ -78,7 +67,7 @@
|
|
|
logout() {
|
|
|
this.$store.commit("updateLogin", false);
|
|
|
localStorage.removeItem("userInfo");
|
|
|
- this.$router.push("/login");
|
|
|
+ this.$router.push({path:"/login", query: {loginAny: true}});
|
|
|
},
|
|
|
bindWeiXin(){
|
|
|
//企业微信
|
|
@@ -99,61 +88,6 @@
|
|
|
var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
|
|
|
window.location.href = weixinUrl;
|
|
|
},
|
|
|
- // 使用说明
|
|
|
- instructions() {
|
|
|
- let url = 'http://celiang.oss-cn-hangzhou.aliyuncs.com/measurement/2022-01/18/75it6phpocqYFV1642488558220118.pdf'
|
|
|
- let name = '使用说明书'
|
|
|
- // 将要传过去的值
|
|
|
- this.previewPDF(url, name)
|
|
|
- },
|
|
|
- // 预览pdf
|
|
|
- previewPDF(url, name) {
|
|
|
- this.$router.push({
|
|
|
- path: '/pdf',
|
|
|
- query: {
|
|
|
- url: '',
|
|
|
- name: name
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 添加员工
|
|
|
- addEmployee() {
|
|
|
- wx.invoke('openAppManage', {}, function(res){
|
|
|
- console.log(res, '你在看看')
|
|
|
- if(res.err_msg == "openAppManage:ok") {
|
|
|
- // 调用成功
|
|
|
- }
|
|
|
- if(res.err_msg == "openAppManage:fail:no permission") {
|
|
|
- // 调用人身份不符合
|
|
|
- this.$message({message: '调用人身份不符合',type: "error"});
|
|
|
- }
|
|
|
- if(res.err_msg == "openAppManage:fail:unknown app") {
|
|
|
- // 应用信息获取失败
|
|
|
- this.$message({message: '应用信息获取失败',type: "error"});
|
|
|
- }
|
|
|
- if(res.err_msg == "openAppManage:fail:unsupported app type") {
|
|
|
- // 应用类型不符合要求
|
|
|
- this.$message({message: '应用类型不符合要求',type: "error"});
|
|
|
- }
|
|
|
- if(res.err_msg == "openAppManage:fail") {
|
|
|
- // 其它错误
|
|
|
- this.$message({message: '其它错误',type: "error"});
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 跳转客服
|
|
|
- tokefu(){
|
|
|
- wx.invoke('openThirdAppServiceChat', {
|
|
|
- }, function(res) {
|
|
|
- console.log('invoke',res);
|
|
|
- if (res.err_msg == "openThirdAppServiceChat:ok" || res.err_msg == "openThirdAppServiceChat:cancel") {
|
|
|
- }else{
|
|
|
- this.$toast.fail('请联系管理员添加客服');
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- );
|
|
|
- },
|
|
|
// 判断是否有添加员工的权限
|
|
|
getWxManager() {
|
|
|
this.$axios.post("/user/isManager", {})
|
|
@@ -185,13 +119,6 @@
|
|
|
userss.company.expirationDate[2] >= 10 ? userss.company.expirationDate[2] : userss.company.expirationDate[1] = '0' + userss.company.expirationDate[2]
|
|
|
userss.company.expirationDate[1] >= 10 ? userss.company.expirationDate[1] : userss.company.expirationDate[1] = '0' + userss.company.expirationDate[1]
|
|
|
this.expirationDate = userss.company.expirationDate[0] + '-' + userss.company.expirationDate[1] + '-' + userss.company.expirationDate[2]
|
|
|
-
|
|
|
- // 版本
|
|
|
- userss.company.packageWorktime == 1 ? this.version = '基础版' : ''
|
|
|
- userss.company.packageProject == 1 ? this.version = '专业版' : ''
|
|
|
- userss.company.packageEngineering == 1 ? this.version = '建筑工程版' : ''
|
|
|
- userss.company.packageOa == 1 ? this.version = '旗舰版' : ''
|
|
|
-
|
|
|
console.log(this.version)
|
|
|
}
|
|
|
|