Merge branch 'main' of http://git.excellentkk.cn/mkm/OfficeApp
# Conflicts: # pages/oaHome/oaHome.vue # pages/oaMy/oaMy.vue
This commit is contained in:
commit
c6fdebf1af
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="oa_home" style="oaColor">
|
<view class="oa_home" style="oaColor">
|
||||||
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
||||||
|
|
||||||
<view class="home_header" :class="!ApproveList.length>0?'home_header_no_data':''">
|
<view class="home_header" :class="!ApproveList.length>0?'home_header_no_data':''">
|
||||||
<!-- #ifdef APP-PLUS||H5 -->
|
<!-- #ifdef APP-PLUS||H5 -->
|
||||||
<view style="height: var(--status-bar-height);"></view>
|
<view style="height: var(--status-bar-height);"></view>
|
||||||
@ -9,7 +9,8 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="my_info flex_a_c">
|
<view class="my_info flex_a_c">
|
||||||
<view class="">
|
<view class="">
|
||||||
<u--image :showLoading="true" :src="myOaInfo.avatar||'../../static/img/public/avatar.png'" width="130.28rpx" height="130.28rpx" shape="circle"></u--image>
|
<u--image :showLoading="true" :src="myOaInfo.avatar||'../../static/img/public/avatar.png'" width="130.28rpx"
|
||||||
|
height="130.28rpx" shape="circle"></u--image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!$store.state.app.token" @click="login" class="mesg_box">
|
<view v-if="!$store.state.app.token" @click="login" class="mesg_box">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
@ -22,16 +23,16 @@
|
|||||||
<view v-else class="mesg_box">
|
<view v-else class="mesg_box">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text class="nickname">姓名:{{ myOaInfo.nickname }}</text>
|
<text class="nickname">姓名:{{ myOaInfo.nickname }}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="duty">
|
<view class="duty">
|
||||||
<!-- ({{ myOaInfo.did_name }}){{myOaInfo.label_name}} -->
|
<!-- ({{ myOaInfo.did_name }}){{myOaInfo.label_name}} -->
|
||||||
电话:{{myOaInfo.account}}<br/>
|
电话:{{myOaInfo.account}}<br />
|
||||||
公司:<text v-if="myOaInfo.admin&&myOaInfo.admin.company">{{ myOaInfo.admin.company.company_name }}</text>
|
公司:<text v-if="myOaInfo.admin&&myOaInfo.admin.company">{{ myOaInfo.admin.company.company_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
<view style="height: 130rpx;"></view>
|
<view style="height: 130rpx;"></view>
|
||||||
<!-- 任务状态 -->
|
<!-- 任务状态 -->
|
||||||
@ -43,7 +44,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="backlog" :class="!ApproveList.length>0?'backlog_no_data':''">
|
<view class="backlog" :class="!ApproveList.length>0?'backlog_no_data':''">
|
||||||
<view class="head_title flex_a_c_j_sb">
|
<view class="head_title flex_a_c_j_sb">
|
||||||
<view class="title">公告列表</view>
|
<view class="title">公告列表</view>
|
||||||
@ -53,7 +54,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="ApproveList.length>0">
|
<block v-if="ApproveList.length>0">
|
||||||
<view class="backlog_item flex_a_c_j_sb" v-for="(item,index) in ApproveList.slice(0,2)" :key="index" @click="clickNotice(item.id)">
|
<view class="backlog_item flex_a_c_j_sb" v-for="(item,index) in ApproveList.slice(0,2)" :key="index"
|
||||||
|
@click="clickNotice(item.id)">
|
||||||
<view class="text">{{ item.title }}</view>
|
<view class="text">{{ item.title }}</view>
|
||||||
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
||||||
</view>
|
</view>
|
||||||
@ -82,7 +84,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<block v-if="myTaskList.length>0">
|
<block v-if="myTaskList.length>0">
|
||||||
<taskCard></taskCard>
|
<taskCard></taskCard>
|
||||||
</block>
|
</block>
|
||||||
@ -115,7 +117,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</block> -->
|
</block> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="no_login" @click="login" v-if="!$store.state.app.token">
|
<view class="no_login" @click="login" v-if="!$store.state.app.token">
|
||||||
<view class="view">
|
<view class="view">
|
||||||
<view class="text">登录里海OA,开启线上便捷办公</view>
|
<view class="text">登录里海OA,开启线上便捷办公</view>
|
||||||
@ -202,14 +204,14 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// },
|
// },
|
||||||
initUserInfo(){
|
initUserInfo() {
|
||||||
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar = '';
|
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar = '';
|
||||||
},
|
},
|
||||||
initOaHomeDada(){
|
initOaHomeDada() {
|
||||||
if(this.$store.state.app.userInfo.admin_id==0){// 如果用户不是管理员
|
if (this.$store.state.app.userInfo.admin_id == 0) { // 如果用户不是管理员
|
||||||
let arr = oaHomeData.filter(item=>!item.admin);//过滤掉管理员专属页面
|
let arr = oaHomeData.filter(item => !item.admin); //过滤掉管理员专属页面
|
||||||
this.oaHomeData = arr;
|
this.oaHomeData = arr;
|
||||||
}else {
|
} else {
|
||||||
this.oaHomeData = oaHomeData;
|
this.oaHomeData = oaHomeData;
|
||||||
// let arr = oaHomeData.filter(item=>!item.personnel);//过滤掉普通用户专属页面
|
// let arr = oaHomeData.filter(item=>!item.personnel);//过滤掉普通用户专属页面
|
||||||
// this.oaHomeData = arr;
|
// this.oaHomeData = arr;
|
||||||
@ -259,34 +261,34 @@
|
|||||||
}
|
}
|
||||||
}) : Toast('暂未开放')
|
}) : Toast('暂未开放')
|
||||||
},
|
},
|
||||||
navTwo(url,key) {
|
navTwo(url, key) {
|
||||||
let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
|
let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
|
||||||
var arr = [3,6];
|
var arr = [3, 6];
|
||||||
|
|
||||||
if(role_id && role_id[0]==9){
|
if (role_id && role_id[0] == 9) {
|
||||||
if(arr.indexOf(key)==-1){
|
if (arr.indexOf(key) == -1) {
|
||||||
Toast('请先成立公司后开放')
|
Toast('请先成立公司后开放')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.navTo(url);
|
this.navTo(url);
|
||||||
},
|
},
|
||||||
// 点击公告
|
// 点击公告
|
||||||
clickNotice(e){
|
clickNotice(e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/oaNews/oaNews?id=${e}`
|
url: `/pages/oaNews/oaNews?id=${e}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 判断当前是否登录,显示任务及完成率
|
// 判断当前是否登录,显示任务及完成率
|
||||||
showToask(){
|
showToask() {
|
||||||
if(!this.$store.state.app.token){
|
if (!this.$store.state.app.token) {
|
||||||
this.assessData = this.assessData.map(item=>{
|
this.assessData = this.assessData.map(item => {
|
||||||
item.num = '*';
|
item.num = '*';
|
||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
// 新增接口后要替换为接口
|
// 新增接口后要替换为接口
|
||||||
this.assessData = this.assessData.map(item=>{
|
this.assessData = this.assessData.map(item => {
|
||||||
item.num = '0';
|
item.num = '0';
|
||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
@ -295,7 +297,7 @@
|
|||||||
login() {
|
login() {
|
||||||
console.log('ss');
|
console.log('ss');
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/oaLogin/oaLogin'
|
url: '/pages/oaLogin/oaLogin'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getUserIndex() {
|
async getUserIndex() {
|
||||||
@ -337,7 +339,8 @@
|
|||||||
.mesg_box {
|
.mesg_box {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin-left: 31.58rpx;
|
margin-left: 31.58rpx;
|
||||||
.nickname{
|
|
||||||
|
.nickname {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
@ -395,10 +398,14 @@
|
|||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 28.04rpx;
|
font-size: 28.04rpx;
|
||||||
white-space: nowrap; /* 禁止换行 */
|
white-space: nowrap;
|
||||||
overflow: hidden; /* 溢出隐藏 */
|
/* 禁止换行 */
|
||||||
text-overflow: ellipsis; /* 使用省略号代表被截断的文本 */
|
overflow: hidden;
|
||||||
width: 580rpx; /* 设置元素宽度,根据需要进行调整 */
|
/* 溢出隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 使用省略号代表被截断的文本 */
|
||||||
|
width: 580rpx;
|
||||||
|
/* 设置元素宽度,根据需要进行调整 */
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: '公告';
|
content: '公告';
|
||||||
@ -411,29 +418,35 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_no{
|
&_no {
|
||||||
margin-top: 19.3rpx;
|
margin-top: 19.3rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 28.04rpx;
|
font-size: 28.04rpx;
|
||||||
white-space: nowrap; /* 禁止换行 */
|
white-space: nowrap;
|
||||||
overflow: hidden; /* 溢出隐藏 */
|
/* 禁止换行 */
|
||||||
text-overflow: ellipsis; /* 使用省略号代表被截断的文本 */
|
overflow: hidden;
|
||||||
width: 580rpx; /* 设置元素宽度,根据需要进行调整 */
|
/* 溢出隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 使用省略号代表被截断的文本 */
|
||||||
|
width: 580rpx;
|
||||||
|
/* 设置元素宽度,根据需要进行调整 */
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: none;
|
content: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.backlog_no_data{
|
|
||||||
|
.backlog_no_data {
|
||||||
bottom: -70rpx;
|
bottom: -70rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.home_header_no_data{
|
|
||||||
|
.home_header_no_data {
|
||||||
margin-bottom: 93.33rpx;
|
margin-bottom: 93.33rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,8 +483,8 @@
|
|||||||
// background-color: #fff;
|
// background-color: #fff;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
// padding: 28.07rpx;
|
// padding: 28.07rpx;
|
||||||
|
|
||||||
.no_task{
|
.no_task {
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
@ -480,32 +493,35 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #000000CC;
|
color: #000000CC;
|
||||||
line-height: 35rpx;
|
line-height: 35rpx;
|
||||||
}
|
}
|
||||||
.tips{
|
|
||||||
|
.tips {
|
||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333FF;
|
color: #333333FF;
|
||||||
line-height: 35rpx;
|
line-height: 35rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.task_title{
|
.task_title {
|
||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.task_list {
|
.task_list {
|
||||||
height: 196.49rpx;
|
height: 196.49rpx;
|
||||||
@ -577,8 +593,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no_login{
|
.no_login {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -590,17 +606,20 @@
|
|||||||
background: rgba(#333333, 0.4);
|
background: rgba(#333333, 0.4);
|
||||||
border-radius: 14rpx 14rpx 0rpx 0rpx;
|
border-radius: 14rpx 14rpx 0rpx 0rpx;
|
||||||
padding: 28rpx 28rpx;
|
padding: 28rpx 28rpx;
|
||||||
.view{
|
|
||||||
|
.view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.text{
|
|
||||||
|
.text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
.btn{
|
|
||||||
|
.btn {
|
||||||
width: 158rpx;
|
width: 158rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background: #3274F9;
|
background: #3274F9;
|
||||||
|
@ -32,8 +32,9 @@
|
|||||||
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="work">
|
<view class="work">
|
||||||
电话:{{oaUserInfo.account}}<br/>
|
电话:{{oaUserInfo.account}}<br />
|
||||||
公司:<text v-if="oaUserInfo.admin&&oaUserInfo.admin.company">{{ oaUserInfo.admin.company.company_name }}</text>
|
公司:<text
|
||||||
|
v-if="oaUserInfo.admin&&oaUserInfo.admin.company">{{ oaUserInfo.admin.company.company_name }}</text>
|
||||||
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user