1.部分接口对接 页面调整

This commit is contained in:
2025-07-25 17:30:20 +08:00
parent 658d21399d
commit b82bf6ef8c
10 changed files with 1227 additions and 1231 deletions

View File

@@ -10,10 +10,10 @@ export default {
this.$u.api.lang({lang: this.vuex_locale}); this.$u.api.lang({lang: this.vuex_locale});
} }
// 设置底部导航栏角标 // 设置底部导航栏角标
uni.setTabBarBadge({ // uni.setTabBarBadge({
index: 0, // index: 0,
text: '3' // text: '3'
}); // });
// uni.removeTabBarBadge({ // uni.removeTabBarBadge({
// index: 0 // index: 0
// }); // });

View File

@@ -13,7 +13,10 @@ const install = (Vue, vm) => {
login: (params = {}) => vm.$u.post(config.adminPath+'/auth/login', params), login: (params = {}) => vm.$u.post(config.adminPath+'/auth/login', params),
getUserInfo: (params = {}) => vm.$u.get(config.adminPath+'/system/user/profile', params), getUserInfo: (params = {}) => vm.$u.get(config.adminPath+'/system/user/profile', params),
//工作台列表
getFunList:(params = {})=>vm.$u.get(config.adminPath+'/system/funList/list', params),
//我的访客列表
getMyVisitor:(params = {})=>vm.$u.get(config.adminPath+'/property/visitorManagement/list',params),
// 基础服务:登录登出、身份信息、菜单授权、切换系统、字典数据等 // 基础服务:登录登出、身份信息、菜单授权、切换系统、字典数据等
lang: (params = {}) => vm.$u.get('/lang/'+params.lang), lang: (params = {}) => vm.$u.get('/lang/'+params.lang),
index: (params = {}) => vm.$u.get(config.adminPath+'/mobile/index', params), index: (params = {}) => vm.$u.get(config.adminPath+'/mobile/index', params),

View File

@@ -24,13 +24,12 @@ const install = (Vue, vm) => {
if (!req.header){ if (!req.header){
req.header = []; req.header = [];
} }
req.header["source"] = "app"; req.header["source"] = "uniapp";
req.header["clientId"] = "dab457a1ea14411787c240db05bb0832"
// 默认指定返回 JSON 数据 // 默认指定返回 JSON 数据
if (!req.header[ajaxHeader]){ if (!req.header[ajaxHeader]){
req.header[ajaxHeader] = 'json'; req.header[ajaxHeader] = 'json';
} }
console.log('t1', req.url);
// 设定传递 Token 认证参数 aidex // 设定传递 Token 认证参数 aidex
if (req.url!="/auth/login"&&!req.header[sessionIdHeader] && vm.vuex_token){ if (req.url!="/auth/login"&&!req.header[sessionIdHeader] && vm.vuex_token){
req.header[sessionIdHeader] = "Bearer "+vm.vuex_token; req.header[sessionIdHeader] = "Bearer "+vm.vuex_token;

View File

@@ -242,8 +242,7 @@
// } // }
// ] // ]
// }, // },
"pages":[ "pages": [{
{
"path": "pages/sys/login/login", "path": "pages/sys/login/login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
@@ -313,65 +312,56 @@
}, },
{ {
"path": "pages/sys/user/myPayment/myPayment", "path": "pages/sys/user/myPayment/myPayment",
"style" : "style": {
{
"navigationBarTitleText": "停车缴费" "navigationBarTitleText": "停车缴费"
} }
}, },
{ {
"path": "pages/sys/user/myPayment/paymentRecords", "path": "pages/sys/user/myPayment/paymentRecords",
"style" : "style": {
{
"navigationBarTitleText": "缴费记录" "navigationBarTitleText": "缴费记录"
} }
}, },
{ {
"path": "pages/sys/user/myRepair/myRepair", "path": "pages/sys/user/myRepair/myRepair",
"style" : "style": {
{
"navigationBarTitleText": "报事报修" "navigationBarTitleText": "报事报修"
} }
}, },
{ {
"path": "pages/sys/user/myRepair/addRepair", "path": "pages/sys/user/myRepair/addRepair",
"style" : "style": {
{
"navigationBarTitleText": "新增" "navigationBarTitleText": "新增"
} }
}, },
{ {
"path": "pages/sys/user/myRepair/repaired", "path": "pages/sys/user/myRepair/repaired",
"style" : "style": {
{
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/sys/user/myRepair/repairEvaluate", "path": "pages/sys/user/myRepair/repairEvaluate",
"style" : "style": {
{
"navigationBarTitleText": "服务评价" "navigationBarTitleText": "服务评价"
} }
}, },
{ {
"path": "pages/sys/user/myRecord/myRecord", "path": "pages/sys/user/myRecord/myRecord",
"style" : "style": {
{
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/sys/workbench/oa/oa", "path": "pages/sys/workbench/oa/oa",
"style" : "style": {
{ "navigationBarTitleText": "审批中心"
"navigationStyle" : "custom"
} }
}, },
{ {
"path": "pages/sys/workbench/oa/oaDetail", "path": "pages/sys/workbench/oa/oaDetail",
"style" : "style": {
{
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }

View File

@@ -58,6 +58,9 @@
checked: false checked: false
} }
}, },
onLoad() {
this.getUserInfo()
},
methods: { methods: {
async submit() { async submit() {
if (this.username.length == 0) { if (this.username.length == 0) {
@@ -83,14 +86,27 @@
name: 'vuex_token', name: 'vuex_token',
value: res.data.access_token value: res.data.access_token
}); });
setTimeout(() => { this.getUserInfo()
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/sys/home/home'
// });
// }, 500);
}
},
getUserInfo(){
this.$u.api.getUserInfo({loginCheck: true}).then(res => {
if (res.code == '200'){
this.$store.commit('$uStore', {
name: 'vuex_user',
value: res.data.user
});
uni.reLaunch({ uni.reLaunch({
url: '/pages/sys/home/home' url: '/pages/sys/home/home'
}); });
}, 500);
} }
});
}, },
handleCheckboxChange(e) { handleCheckboxChange(e) {
this.checked = e.target.checked; this.checked = e.target.checked;
} }

View File

@@ -12,7 +12,7 @@
<view class="form-section"> <view class="form-section">
<view class="form-label">取个昵称</view> <view class="form-label">取个昵称</view>
<view class="input-row"> <view class="input-row">
<input class="form-input" v-model="nickname" placeholder="请输入昵称" /> <input class="form-input" v-model="userInfo.nickName" placeholder="请输入昵称" />
<view class="input-suffix"> <view class="input-suffix">
<image src="/static/ic_i_c_01.png" class="random-icon" /> <image src="/static/ic_i_c_01.png" class="random-icon" />
<text class="random-text">随机</text> <text class="random-text">随机</text>
@@ -20,19 +20,19 @@
</view> </view>
<view class="form-label">你的手机号</view> <view class="form-label">你的手机号</view>
<view class="input-row"> <view class="input-row">
<input class="form-input" v-model="phone" placeholder="请输入您的手机号" /> <input class="form-input" v-model="userInfo.phonenumber" placeholder="请输入您的手机号" />
<image src="/static/ic_arrow_right.png" class="arrow-icon" /> <image src="/static/ic_arrow_right.png" class="arrow-icon" />
</view> </view>
<view class="form-label">你的性别不可修改</view> <view class="form-label">你的性别不可修改</view>
<view class="gender-row"> <view class="gender-row">
<view class="gender-item selected"> <view v-if="userInfo.sex == 1" class="gender-item selected">
<image src="/static/ic_i_c_02.png" class="gender-icon" /> <image src="/static/ic_i_c_02.png" class="gender-icon" />
</view> </view>
<view class="gender-item"> <view v-else class="gender-item">
<image src="/static/ic_i_c_03.png" class="gender-icon" /> <image src="/static/ic_i_c_03.png" class="gender-icon" />
</view> </view>
</view> </view>
<view class="info-row"><text class="info-label">部门</text>生活服务部</view> <view class="info-row"><text class="info-label">部门</text>{{userInfo.deptName}}</view>
<view class="info-row"><text class="info-label">岗位</text>客服</view> <view class="info-row"><text class="info-label">岗位</text>客服</view>
<view class="info-row"><text class="info-label">工号</text>A10235</view> <view class="info-row"><text class="info-label">工号</text>A10235</view>
</view> </view>
@@ -44,10 +44,12 @@
export default { export default {
data() { data() {
return { return {
nickname: '帅气的小南瓜', userInfo: {},
phone: ''
} }
}, },
onLoad() {
this.userInfo = this.vuex_user
},
methods: { methods: {
goBack() { goBack() {
uni.navigateBack(); uni.navigateBack();
@@ -186,7 +188,6 @@
.gender-item { .gender-item {
width: 188rpx; width: 188rpx;
height: 97rpx; height: 97rpx;
border: 2rpx dashed #bbb;
border-radius: 10rpx; border-radius: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -6,8 +6,8 @@
<view class="mine-info-row"> <view class="mine-info-row">
<image class="mine-avatar" src="/static/ic_mine_head.png" /> <image class="mine-avatar" src="/static/ic_mine_head.png" />
<view class="mine-userinfo"> <view class="mine-userinfo">
<view class="mine-nick">昵称</view> <view class="mine-nick">{{userInfo.nickname}}</view>
<view class="mine-phone">1789548878</view> <view class="mine-phone">{{userInfo.phone}}</view>
</view> </view>
</view> </view>
<view class="mine-header-icons"> <view class="mine-header-icons">
@@ -36,42 +36,81 @@ export default {
name: 'Mine', name: 'Mine',
data() { data() {
return { return {
list: [ userInfo:{
{ icon: '/static/ic_mine_info.png', text: '我的信息' }, nickname: '',
{ icon: '/static/ic_mine_pay.png', text: '我的缴费' }, phone:''
{ icon: '/static/ic_mine_repair.png', text: '我的报修' }, },
{ icon: '/static/ic_mine_visitor.png', text: '我的访客' }, list: [{
{ icon: '/static/ic_mine_check.png', text: '我的考勤' }, icon: '/static/ic_mine_info.png',
{ icon: '/static/ic_mine_pwd.png', text: '修改密码' }, text: '我的信息'
{ icon: '/static/ic_mine_version.png', text: '系统版本', extra: 'v1.00.01' }, },
{ icon: '/static/ic_mine_setting2.png', text: '设置' } {
icon: '/static/ic_mine_pay.png',
text: '我的缴费'
},
{
icon: '/static/ic_mine_repair.png',
text: '我的报修'
},
{
icon: '/static/ic_mine_visitor.png',
text: '我的访客'
},
{
icon: '/static/ic_mine_check.png',
text: '我的考勤'
},
{
icon: '/static/ic_mine_pwd.png',
text: '修改密码'
},
{
icon: '/static/ic_mine_version.png',
text: '系统版本',
extra: 'v1.00.01'
},
{
icon: '/static/ic_mine_setting2.png',
text: '设置'
}
] ]
} }
}, },
onLoad() { onLoad() {
this.$u.api.getUserInfo().then(res => { this.userInfo.nickname =this.vuex_user.nickName
if (res.code == '200'){ this.userInfo.phone = this.vuex_user.phonenumber
}
});
}, },
methods: { methods: {
handleItemClick(idx) { handleItemClick(idx) {
if (idx === 0) { if (idx === 0) {
uni.navigateTo({ url: '/pages/sys/user/changeInfo/changeInfo' }); uni.navigateTo({
url: '/pages/sys/user/changeInfo/changeInfo'
});
} else if (idx === -1) { } else if (idx === -1) {
uni.navigateTo({ url: '/pages/sys/user/message/message' }); uni.navigateTo({
url: '/pages/sys/user/message/message'
});
} else if (idx === -2) { } else if (idx === -2) {
uni.navigateTo({ url: '/pages/sys/user/serviceCenter/serviceCenter' }); uni.navigateTo({
url: '/pages/sys/user/serviceCenter/serviceCenter'
});
} else if (idx === 1) { } else if (idx === 1) {
uni.navigateTo({ url: '/pages/sys/user/myPayment/myPayment' }); uni.navigateTo({
url: '/pages/sys/user/myPayment/myPayment'
});
} else if (idx === 2) { } else if (idx === 2) {
uni.navigateTo({ url: '/pages/sys/user/myRepair/myRepair' }); uni.navigateTo({
url: '/pages/sys/user/myRepair/myRepair'
});
} else if (idx === 3) { } else if (idx === 3) {
uni.navigateTo({ url: '/pages/sys/user/myVisitor/myVisitor' }); uni.navigateTo({
url: '/pages/sys/user/myVisitor/myVisitor'
});
} else if (idx === 4) { } else if (idx === 4) {
uni.navigateTo({ url: '/pages/sys/user/myRecord/myRecord' }); // uni.navigateTo({
// uni.navigateTo({ url: '/pages/workbench/oa/oa' }); // url: '/pages/sys/user/myRecord/myRecord'
// });
uni.navigateTo({ url: '/pages/sys/workbench/oa/oa' });
} }
} }
} }
@@ -85,6 +124,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.mine-header { .mine-header {
width: 100%; width: 100%;
height: 343rpx; height: 343rpx;
@@ -93,8 +133,10 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
padding-bottom: 0; padding-bottom: 0;
flex-shrink: 0; /* 防止被压缩 */ flex-shrink: 0;
/* 防止被压缩 */
} }
.mine-bg { .mine-bg {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -103,6 +145,7 @@ export default {
height: 343rpx; height: 343rpx;
z-index: 0; z-index: 0;
} }
.mine-header-wave { .mine-header-wave {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -114,6 +157,7 @@ export default {
border-bottom-right-radius: 36rpx; border-bottom-right-radius: 36rpx;
z-index: 2; z-index: 2;
} }
.mine-info-row { .mine-info-row {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -122,6 +166,7 @@ export default {
margin-left: 32rpx; margin-left: 32rpx;
bottom: 127rpx; bottom: 127rpx;
} }
.mine-header-icons { .mine-header-icons {
position: absolute; position: absolute;
right: 22rpx; right: 22rpx;
@@ -129,6 +174,7 @@ export default {
display: flex; display: flex;
z-index: 4; z-index: 4;
} }
.mine-avatar { .mine-avatar {
width: 90rpx; width: 90rpx;
height: 90rpx; height: 90rpx;
@@ -137,16 +183,19 @@ export default {
margin-right: 24rpx; margin-right: 24rpx;
border: 4rpx solid #fff; border: 4rpx solid #fff;
} }
.mine-userinfo { .mine-userinfo {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.mine-nick { .mine-nick {
color: #fff; color: #fff;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-bottom: 6rpx; margin-bottom: 6rpx;
} }
.mine-phone { .mine-phone {
color: #fff; color: #fff;
font-size: 24rpx; font-size: 24rpx;
@@ -157,11 +206,13 @@ export default {
height: 35rpx; height: 35rpx;
margin-left: 24rpx; margin-left: 24rpx;
} }
.mine-header-icon2 { .mine-header-icon2 {
width: 33rpx; width: 33rpx;
height: 33rpx; height: 33rpx;
margin-left: 24rpx; margin-left: 24rpx;
} }
.mine-panel { .mine-panel {
position: relative; position: relative;
z-index: 10; z-index: 10;
@@ -174,9 +225,12 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
flex: 1; /* 占据剩余空间 */ flex: 1;
overflow-y: auto; /* 开启滚动 */ /* 占据剩余空间 */
overflow-y: auto;
/* 开启滚动 */
} }
.mine-list { .mine-list {
width: 92vw; width: 92vw;
background: transparent; background: transparent;
@@ -185,6 +239,7 @@ export default {
box-shadow: none; box-shadow: none;
padding: 0; padding: 0;
} }
.mine-list-item { .mine-list-item {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -193,29 +248,35 @@ export default {
position: relative; position: relative;
background: transparent; background: transparent;
} }
.mine-list-item:last-child { .mine-list-item:last-child {
border-bottom: none; border-bottom: none;
} }
.mine-list-icon { .mine-list-icon {
width: 38rpx; width: 38rpx;
height: 38rpx; height: 38rpx;
margin: 0 24rpx 0 30rpx; margin: 0 24rpx 0 30rpx;
} }
.mine-list-text { .mine-list-text {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
color: #1A1A1A; color: #1A1A1A;
} }
.mine-list-extra { .mine-list-extra {
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.mine-list-arrow { .mine-list-arrow {
width: 18rpx; width: 18rpx;
height: 28rpx; height: 28rpx;
margin-right: 24rpx; margin-right: 24rpx;
} }
.logout-btn { .logout-btn {
width: 88vw; width: 88vw;
height: 80rpx; height: 80rpx;

View File

@@ -12,15 +12,15 @@
<view class="visitor-list"> <view class="visitor-list">
<view v-for="(item, idx) in list" :key="idx" class="visitor-card" @click="showVisitorDetail(item)"> <view v-for="(item, idx) in list" :key="idx" class="visitor-card" @click="showVisitorDetail(item)">
<view class="card-row"> <view class="card-row">
<view class="card-type">{{ item.type }}</view> <view class="card-type">{{ item.visitorUnit }}</view>
<view class="card-status" :class="item.statusClass">{{ item.status }}</view> <view class="card-status" :class="getStatusColor(item.serveStatus)">{{ getStatusLabel(item.serveStatus) }}</view>
</view> </view>
<view class="card-info">{{ item.name }} <view class="card-info">{{ item.visitorName }}
<text class="card-phone">{{ item.phone }}</text> <text class="card-phone">{{ item.visitorPhone }}</text>
<text class="card-divider"></text> <text class="card-divider"></text>
<text class="card-address">{{ item.address }}</text> <text class="card-address">{{ item.visitorUnit }}</text>
</view> </view>
<view class="card-time">{{ item.time }}</view> <view class="card-time">{{ item.createTime }}</view>
</view> </view>
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
@@ -32,12 +32,14 @@
<image src="/static/ic_close_01.png" class="visitor-detail-close" @click="closeVisitorDetail" /> <image src="/static/ic_close_01.png" class="visitor-detail-close" @click="closeVisitorDetail" />
</view> </view>
<view class="visitor-detail-info"> <view class="visitor-detail-info">
<view>{{ detailData.name }} {{ detailData.phone }}</view> <view>{{ detailData.visitorName }} {{ detailData.visitorPhone }}</view>
<view>{{ detailData.idCard || '5021119740208****' }}</view> <view v-if="detailData.idCard">{{ detailData.idCard}}</view>
<view>车牌号{{ detailData.carNumber || '渝A·H1455' }}</view> <view v-if="detailData.carNumber">车牌号{{ detailData.carNumber}}</view>
<view>来访时间{{ detailData.time }}</view> <view>来访时间{{ detailData.visitingBeginTime }}</view>
<view>访问地址{{ detailData.address || '服务中心1栋8楼6871' }}</view> <view>访问地址{{ detailData.visitorUnit}}</view>
<image :src="detailData.statusClass === 'orange' ? '/static/ic_my_visitor_01.png' : '/static/ic_my_visitor_02.png'" class="visitor-detail-status-img" /> <image
:src="detailData.statusClass === 'orange' ? '/static/ic_my_visitor_01.png' : '/static/ic_my_visitor_02.png'"
class="visitor-detail-status-img" />
</view> </view>
<button class="visitor-detail-btn">修改</button> <button class="visitor-detail-btn">修改</button>
</view> </view>
@@ -89,104 +91,20 @@
async loadTabData(idx) { async loadTabData(idx) {
this.loading = true; this.loading = true;
// 模拟接口请求不同tab返回不同mock数据 // 模拟接口请求不同tab返回不同mock数据
let data = []; let params = {}
if (idx === 0) { if (idx === 0) {
data = [{ params = {
type: '商务合作', "interviewedPerson": this.vuex_user.userId
status: '待处理',
statusClass: 'orange',
name: '张小晓',
phone: '18725468789',
address: '8栋2楼309',
time: '2025-07-06 15:28:16'
},
{
type: '送货上门',
status: '已到访',
statusClass: 'green',
name: '张小晓',
phone: '18725468789',
address: '8栋2楼309',
time: '2025-07-06 15:28:16'
},
{
type: '送货上门',
status: '未到访',
statusClass: 'green',
name: '张小晓',
phone: '18725468789',
address: '8栋2楼309',
time: '2025-07-06 15:28:16'
},
{ type: '商务合作', status: '待处理', statusClass: 'orange', name: '刘小备', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' },
{ type: '送货上门', status: '已到访', statusClass: 'green', name: '关小羽', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' },
{ type: '送货上门', status: '未到访', statusClass: 'green', name: '张小飞', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' },
{ type: '商务合作', status: '待处理', statusClass: 'orange', name: '曹小操', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' },
{ type: '送货上门', status: '已到访', statusClass: 'green', name: '孙小权', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' },
{ type: '送货上门', status: '未到访', statusClass: 'green', name: '周小瑜', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' }
];
} else if (idx === 1) {
data = [{
type: '商务合作',
status: '待处理',
statusClass: 'orange',
name: '李明',
phone: '13812345678',
address: '5栋1楼101',
time: '2025-07-07 10:00:00'
},
{
type: '送货上门',
status: '已到访',
statusClass: 'green',
name: '王五',
phone: '13987654321',
address: '6栋3楼202',
time: '2025-07-07 11:00:00'
},
{ type: '商务合作', status: '待处理', statusClass: 'orange', name: '赵六', phone: '13812345678', address: '5栋1楼101', time: '2025-07-07 10:00:00' },
{ type: '送货上门', status: '已到访', statusClass: 'green', name: '钱七', phone: '13987654321', address: '6栋3楼202', time: '2025-07-07 11:00:00' },
{ type: '商务合作', status: '待处理', statusClass: 'orange', name: '孙八', phone: '13812345678', address: '5栋1楼101', time: '2025-07-07 10:00:00' },
{ type: '送货上门', status: '已到访', statusClass: 'green', name: '周九', phone: '13987654321', address: '6栋3楼202', time: '2025-07-07 11:00:00' }
];
} else {
data = [{
type: '商务合作',
status: '已结束',
statusClass: 'gray',
name: '张小晓',
phone: '18725468789',
address: '8栋2楼309',
time: '2025-07-06 15:28:16'
},
{
type: '送货上门',
status: '已结束',
statusClass: 'gray',
name: '李明',
phone: '13812345678',
address: '5栋1楼101',
time: '2025-07-07 10:00:00'
},
{
type: '送货上门',
status: '已结束',
statusClass: 'gray',
name: '王五',
phone: '13987654321',
address: '6栋3楼202',
time: '2025-07-07 11:00:00'
},
{ type: '商务合作', status: '已结束', statusClass: 'gray', name: '张小晓', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' },
{ type: '送货上门', status: '已结束', statusClass: 'gray', name: '李明', phone: '13812345678', address: '5栋1楼101', time: '2025-07-07 10:00:00' },
{ type: '送货上门', status: '已结束', statusClass: 'gray', name: '王五', phone: '13987654321', address: '6栋3楼202', time: '2025-07-07 11:00:00' },
{ type: '商务合作', status: '已结束', statusClass: 'gray', name: '张小晓', phone: '18725468789', address: '8栋2楼309', time: '2025-07-06 15:28:16' },
{ type: '送货上门', status: '已结束', statusClass: 'gray', name: '李明', phone: '13812345678', address: '5栋1楼101', time: '2025-07-07 10:00:00' },
{ type: '送货上门', status: '已结束', statusClass: 'gray', name: '王五', phone: '13987654321', address: '6栋3楼202', time: '2025-07-07 11:00:00' }
];
} }
// 模拟网络延迟 }
await new Promise(res => setTimeout(res, 300));
let data = [];
let res = await this.$u.api.getMyVisitor(params);
if (res.code == '200') {
data = res.rows
}
this.$set(this.tabData, idx, data); this.$set(this.tabData, idx, data);
this.$set(this.tabLoaded, idx, true); this.$set(this.tabLoaded, idx, true);
this.loading = false; this.loading = false;
@@ -197,6 +115,25 @@
}, },
closeVisitorDetail() { closeVisitorDetail() {
this.showDetail = false; this.showDetail = false;
},
getStatusLabel(status) {
const statusMap = {
0: '待确认',
1: '已确认',
2: '已取消',
3: '已完成'
};
return statusMap[status] || '';
},
getStatusColor(status){
const statusMap = {
0: '待确认',
1: 'orange',
2: '已取消',
3: '已完成'
};
return statusMap[status] || '';
} }
} }
} }
@@ -219,7 +156,8 @@
justify-content: center; justify-content: center;
position: relative; position: relative;
background: #fff; background: #fff;
flex-shrink: 0; /* 防止被压缩 */ flex-shrink: 0;
/* 防止被压缩 */
} }
.visitor-back { .visitor-back {
@@ -241,7 +179,8 @@
background: #fff; background: #fff;
height: 80rpx; height: 80rpx;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
flex-shrink: 0; /* 防止被压缩 */ flex-shrink: 0;
/* 防止被压缩 */
} }
.visitor-tab { .visitor-tab {
@@ -273,9 +212,12 @@
.visitor-list { .visitor-list {
margin: 25rpx 0 0 0; margin: 25rpx 0 0 0;
padding: 0 35rpx; padding: 0 35rpx;
flex: 1; /* 占据所有剩余空间 */ flex: 1;
overflow-y: auto; /* 内容超出时,开启垂直滚动 */ /* 占据所有剩余空间 */
padding-bottom: 200rpx; /* 为底部按钮留出空间 */ overflow-y: auto;
/* 内容超出时,开启垂直滚动 */
padding-bottom: 200rpx;
/* 为底部按钮留出空间 */
} }
.visitor-card { .visitor-card {
@@ -323,6 +265,7 @@
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #333;
margin-bottom: 8rpx; margin-bottom: 8rpx;
margin-left: 8rpx;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@@ -348,6 +291,7 @@
.card-time { .card-time {
font-size: 28rpx; font-size: 28rpx;
color: #626262; color: #626262;
margin-left: 8rpx;
} }
.visitor-btn { .visitor-btn {
@@ -395,8 +339,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.visitor-detail-dialog { .visitor-detail-dialog {
width: 66vw; width: 80vw;
background: #fff; background: #fff;
border-radius: 36rpx; border-radius: 36rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12); box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);
@@ -406,6 +351,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.visitor-detail-title-row { .visitor-detail-title-row {
width: 100%; width: 100%;
display: flex; display: flex;
@@ -414,10 +360,12 @@
position: relative; position: relative;
margin-bottom: 52rpx; margin-bottom: 52rpx;
} }
.visitor-detail-title { .visitor-detail-title {
font-size: 36rpx; font-size: 36rpx;
color: #000; color: #000;
} }
.visitor-detail-close { .visitor-detail-close {
position: absolute; position: absolute;
right: 0; right: 0;
@@ -425,6 +373,7 @@
width: 22rpx; width: 22rpx;
height: 22rpx; height: 22rpx;
} }
.visitor-detail-info { .visitor-detail-info {
width: 100%; width: 100%;
font-size: 28rpx; font-size: 28rpx;
@@ -435,6 +384,7 @@
gap: 28rpx; gap: 28rpx;
position: relative; position: relative;
} }
.visitor-detail-status-img { .visitor-detail-status-img {
position: absolute; position: absolute;
right: 0; right: 0;
@@ -444,6 +394,7 @@
z-index: 1; z-index: 1;
pointer-events: none; pointer-events: none;
} }
.visitor-detail-btn { .visitor-detail-btn {
width: 320rpx; width: 320rpx;
height: 80rpx; height: 80rpx;

View File

@@ -1,10 +1,5 @@
<template> <template>
<view class="oa-container"> <view class="oa-container">
<!-- 顶部导航栏 -->
<view class="oa-navbar">
<image src="/static/ic_back.png" class="oa-back" @click="goBack" />
<text class="oa-title">申批中心</text>
</view>
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="oa-search"> <view class="oa-search">
<view class="search-box"> <view class="search-box">
@@ -22,7 +17,7 @@
</view> </view>
<!-- 列表区 --> <!-- 列表区 -->
<view class="oa-list"> <view class="oa-list">
<view v-for="(item, idx) in list" :key="idx" class="oa-card" :class="{'special-leave': item.status === '已通过'}" @click="goToDetail(item)"> <view v-for="(item, idx) in list" :key="idx" class="oa-card" @click="goToDetail(item)">
<view class="card-row"> <view class="card-row">
<view class="card-type">{{ item.type }}</view> <view class="card-type">{{ item.type }}</view>
<view class="card-status-tag" :class="item.statusClass">{{ item.status }}</view> <view class="card-status-tag" :class="item.statusClass">{{ item.status }}</view>
@@ -238,19 +233,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.oa-navbar {
width: 100%;
height: 120rpx;
padding-top: 40rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
background: #fff;
flex-shrink: 0;
}
.oa-back { .oa-back {
position: absolute; position: absolute;
left: 37rpx; left: 37rpx;
@@ -423,21 +405,5 @@
color: #626262; color: #626262;
} }
.special-leave {
position: relative;
overflow: hidden;
}
.special-leave::after {
content: '特批假';
position: absolute;
top: 10rpx;
right: -50rpx;
background-color: #F3831F;
color: #fff;
padding: 5rpx 60rpx;
transform: rotate(45deg);
font-size: 22rpx;
font-weight: bold;
}
</style> </style>

View File

@@ -13,7 +13,7 @@
<!-- banner 区域 --> <!-- banner 区域 -->
<view class="workbench-banner"> <view class="workbench-banner">
<image class="banner-img" src="/static/workbench_banner.png" mode="aspectFill" /> <image class="banner-img" src="/static/ic_work_01.png" />
</view> </view>
</view> </view>
<!-- 常用应用九宫格 --> <!-- 常用应用九宫格 -->
@@ -26,15 +26,15 @@
<!-- 全部应用 --> <!-- 全部应用 -->
<view> <view>
<view class="all-apps-title">全部应用</view> <view class="all-apps-title">全部应用</view>
<view class="all-apps-tabs"> <view class="all-apps-tabs" v-if="false">
<text v-for="(tab, idx) in tabs" :key="idx" :class="['tab', {active: idx === activeTab}]" <text v-for="(tab, idx) in tabs" :key="idx" :class="['tab', {active: idx === activeTab}]"
@click="activeTab = idx">{{ tab }}</text> @click="activeTab = idx">{{ tab }}</text>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="workbench-grid"> <view class="workbench-grid">
<view class="grid-item" v-for="(item, idx) in allApps[activeTab]" :key="idx"> <view class="grid-item" v-for="(item, idx) in allApps" :key="idx" @click="handleItemClick(item.url)">
<image :src="item.icon" class="grid-icon" /> <image :src="item.icon" class="grid-icon" />
<text class="grid-text">{{ item.text }}</text> <text class="grid-text">{{ item.name }}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -47,55 +47,60 @@
name: 'Workbench', name: 'Workbench',
data() { data() {
return { return {
commonApps: [ commonApps: [{
{ icon: 'https://picsum.photos/80/80?random=3', text: '审批' }, icon: 'https://picsum.photos/80/80?random=3',
{ icon: 'https://picsum.photos/80/80?random=3', text: '假勤' }, text: '审批'
{ icon: 'https://picsum.photos/80/80?random=3', text: '工单' }, },
{ icon: 'https://picsum.photos/80/80?random=3', text: '停车' }, {
{ icon: 'https://picsum.photos/80/80?random=3', text: '保洁' }, icon: 'https://picsum.photos/80/80?random=3',
{ icon: 'https://picsum.photos/80/80?random=3', text: '邀约' }, text: '假勤'
{ icon: 'https://picsum.photos/80/80?random=3', text: '会议' }, },
{ icon: 'https://picsum.photos/80/80?random=3', text: '添加常用' } {
icon: 'https://picsum.photos/80/80?random=3',
text: '工单'
},
{
icon: 'https://picsum.photos/80/80?random=3',
text: '停车'
},
{
icon: 'https://picsum.photos/80/80?random=3',
text: '保洁'
},
{
icon: 'https://picsum.photos/80/80?random=3',
text: '邀约'
},
{
icon: 'https://picsum.photos/80/80?random=3',
text: '会议'
},
{
icon: 'https://picsum.photos/80/80?random=3',
text: '添加常用'
}
], ],
tabs: ['最近使用', 'OA 管理', '敏捷开发', '协同办公'], tabs: ['最近使用', 'OA 管理', '敏捷开发', '协同办公'],
activeTab: 0, activeTab: 0,
allApps: [ allApps: []
// 最近使用 }
[ },
{ icon: 'https://picsum.photos/80/80?random=3', text: '文档' }, onLoad() {
{ icon: 'https://picsum.photos/80/80?random=3', text: '表格' }, this.getWorkList()
{ icon: 'https://picsum.photos/80/80?random=3', text: 'PPT' }, },
{ icon: 'https://picsum.photos/80/80?random=3', text: '笔记' }, methods: {
{ icon: 'https://picsum.photos/80/80?random=3', text: '录音' }, async getWorkList() {
{ icon: 'https://picsum.photos/80/80?random=3', text: '云打印' }, let res = await this.$u.api.getFunList({
{ icon: 'https://picsum.photos/80/80?random=3', text: '智能门禁' }, "roleid": this.vuex_user.roles[0].roleId
{ icon: 'https://picsum.photos/80/80?random=3', text: '易企秀H5' }, });
{ icon: 'https://picsum.photos/80/80?random=3', text: '多维表格' }, if (res.code == '200') {
{ icon: 'https://picsum.photos/80/80?random=3', text: '问卷网' }, this.allApps = res.rows
{ icon: 'https://picsum.photos/80/80?random=3', text: '集客云' }, }
{ icon: 'https://picsum.photos/80/80?random=3', text: '收票宝' }, },
{ icon: 'https://picsum.photos/80/80?random=3', text: '图表' }, handleItemClick(url) {
{ icon: 'https://picsum.photos/80/80?random=3', text: '消息' }, uni.navigateTo({
{ icon: 'https://picsum.photos/80/80?random=3', text: '沟通' }, url: url
{ icon: 'https://picsum.photos/80/80?random=3', text: '' } });
],
// OA 管理
[
{ icon: 'https://picsum.photos/80/80?random=3', text: '文档' },
{ icon: 'https://picsum.photos/80/80?random=3', text: '表格' },
{ icon: 'https://picsum.photos/80/80?random=3', text: 'PPT' }
],
// 敏捷开发
[
{ icon: 'https://picsum.photos/80/80?random=3', text: '集客云' },
{ icon: 'https://picsum.photos/80/80?random=3', text: '问卷网' }
],
// 协同办公
[
{ icon: 'https://picsum.photos/80/80?random=3', text: '笔记' },
{ icon: 'https://picsum.photos/80/80?random=3', text: '沟通' }
]
]
} }
} }
} }
@@ -114,7 +119,6 @@
position: relative; position: relative;
height: 463rpx; height: 463rpx;
width: 100vw; width: 100vw;
margin-bottom: -40rpx;
flex-shrink: 0; flex-shrink: 0;
} }
@@ -167,9 +171,8 @@
} }
.workbench-banner { .workbench-banner {
width: 92vw; width: 90vw;
height: 140rpx; margin: 20rpx auto 20rpx auto;
margin: 0 auto 20rpx auto;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
@@ -179,9 +182,7 @@
} }
.banner-img { .banner-img {
width: 100%; height: 293rpx;
height: 140rpx;
border-radius: 20rpx;
} }
.workbench-grid { .workbench-grid {
@@ -224,22 +225,29 @@
.all-apps-tabs { .all-apps-tabs {
display: flex; display: flex;
align-items: center; flex-wrap: wrap;
padding-left: 54rpx; padding-left: 32rpx;
padding-right: 54rpx; padding-right: 32rpx;
} }
.tab { .tab {
font-size: 24rpx; flex: 1 0 0;
color: #999; font-size: 28rpx;
margin-right: 32rpx; color: #333333;
padding-bottom: 6rpx; margin-right: 0;
padding-bottom: 15rpx;
border-bottom: 4rpx solid transparent; border-bottom: 4rpx solid transparent;
text-align: center;
font-weight: 500;
} }
.tab.active { .tab.active {
color: #2e6cf6; color: #0090FF;
border-bottom: 4rpx solid #2e6cf6; border-bottom: 6rpx solid #007CFF;
font-weight: bold;
position: relative;
border-left: 20rpx;
border-right: 20rpx;
} }
.all-apps-grid { .all-apps-grid {
@@ -249,6 +257,7 @@
border-radius: 20rpx; border-radius: 20rpx;
padding: 0 54rpx 0 54rpx; padding: 0 54rpx 0 54rpx;
} }
.line { .line {
background: #DCDCDC; background: #DCDCDC;
height: 2rpx; height: 2rpx;