|
@@ -13,23 +13,26 @@
|
|
|
<!-- 主体 -->
|
|
|
<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>
|
|
|
|
|
|
<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>
|
|
|
+ <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()" v-if="isCorpWX"></van-cell>
|
|
|
- <van-cell title="添加员工" :title-style="'flex: 1;'" is-link @click="addEmployee()" v-if="isCorpWX"></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="绑定微信后可接收工时填报提醒">
|
|
@@ -65,7 +68,9 @@
|
|
|
isWX:false,
|
|
|
expirationDate: '', // 有效日期
|
|
|
version: '', // 版本
|
|
|
- show: false
|
|
|
+ show: false,
|
|
|
+
|
|
|
+ wxManager: false,
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -95,9 +100,9 @@
|
|
|
},
|
|
|
// 使用说明
|
|
|
instructions() {
|
|
|
- console.log('当前版本')
|
|
|
- let url = 'https://www.ttkuaiban.com/download/%E5%B7%A5%E6%97%B6%E7%AE%A1%E5%AE%B6%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E%E4%B9%A6.pdf'
|
|
|
+ let url = 'http://celiang.oss-cn-hangzhou.aliyuncs.com/measurement/2022-01/18/75it6phpocqYFV1642488558220118.pdf'
|
|
|
let name = '使用说明书'
|
|
|
+ // 将要传过去的值
|
|
|
this.previewPDF(url, name)
|
|
|
},
|
|
|
// 预览pdf
|
|
@@ -105,15 +110,15 @@
|
|
|
this.$router.push({
|
|
|
path: '/pdf',
|
|
|
query: {
|
|
|
- url: url,
|
|
|
+ url: '',
|
|
|
name: name
|
|
|
}
|
|
|
})
|
|
|
- // this.$refs.previewPdfh5.openPdf('http://celiang.oss-cn-hangzhou.aliyuncs.com/measurement/2022-01/18/75it6phpocqYFV1642488558220118.pdf')
|
|
|
},
|
|
|
// 添加员工
|
|
|
addEmployee() {
|
|
|
wx.invoke('openAppManage', {}, function(res){
|
|
|
+ console.log(res, '你在看看')
|
|
|
if(res.err_msg == "openAppManage:ok") {
|
|
|
// 调用成功
|
|
|
}
|
|
@@ -148,6 +153,19 @@
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ // 判断是否有添加员工的权限
|
|
|
+ getWxManager() {
|
|
|
+ this.$axios.post("/user/isManager", {})
|
|
|
+ .then(res => {
|
|
|
+ if(res.code == "ok") {
|
|
|
+ let bur = res.data + ''
|
|
|
+ this.wxManager = bur == 'true'
|
|
|
+ } else {
|
|
|
+ this.$toast.clear();
|
|
|
+ this.$toast.fail(res.msg);
|
|
|
+ }
|
|
|
+ }).catch(err=> {this.$toast.clear();});
|
|
|
+ }
|
|
|
},
|
|
|
create() {
|
|
|
},
|
|
@@ -170,11 +188,15 @@
|
|
|
this.expirationDate = userss.createTime[0] + '-' + userss.createTime[1] + '-' + userss.createTime[2] + ' 至 ' + userss.company.expirationDate[0] + '-' + userss.company.expirationDate[1] + '-' + userss.company.expirationDate[2]
|
|
|
|
|
|
// 版本
|
|
|
- userss.company.packageOa = 1 ? this.version = '旗舰版' : ''
|
|
|
- userss.company.packageEngineering = 1 ? this.version = '建筑工程版' : ''
|
|
|
- userss.company.packageProject = 1 ? this.version = '专业版' : ''
|
|
|
- userss.company.packageWorktime = 1 ? this.version = '基础版' : ''
|
|
|
+ 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)
|
|
|
}
|
|
|
+
|
|
|
+ this.getWxManager()
|
|
|
}
|
|
|
};
|
|
|
</script>
|