fix: 计划查看-导航栏空白高度

fix: 计划查看-接口地址调整
This commit is contained in:
wangzhuo
2025-09-01 13:02:08 +08:00
parent 63a9a1def5
commit 9223b619f5
6 changed files with 48 additions and 50 deletions

View File

@@ -1,36 +1,29 @@
import request from "@/utils/request" import request from "@/utils/request"
// 获取用户信息
export function getPersonalPlanList(params) { /*export function getUserInfo(data) {
return request.post({
url: '/getPersonalPlanList',
params
})
}
export function getUserInfo(data) {
return request.get({ return request.get({
url: '/app/user/getUserInfo', url: '/app/user/getUserInfo',
data data
}, {isTransformResponse: false}) }, {isTransformResponse: false})
}*/
//获取个人周计划列表
export function getWeeklyPlanList(data) {
return request.get({
url: '/crm/app/appWeeklyPlan/getWeeklyListByUser',
data
}, {isTransformResponse: false})
} }
//获取所有人周计划列表 //获取所有人周计划列表
export function getAllWeekPlanList(params){ export function getAllWeekPlanList(params){
return request.get({ return request.get({
url: '/app/appWeeklyPlan/list', url: '/crm/app/appWeeklyPlan/list',
data: params data: params
},{isTransformResponse: false}) },{isTransformResponse: false})
} }
//获取个人周计划列表
export function getWeeklyPlanList(data) {
return request.get({
url: '/app/appWeeklyPlan/getWeeklyListByUser',
data
}, {isTransformResponse: false})
}
// 组合查询计划列表 // 组合查询计划列表
export function getWeekPlanListByDate(params){ export function getWeekPlanListByDate(params){
return request.get({ return request.get({
url: '/app/appWeeklyPlan/weeklyListByDate', url: '/crm/app/appWeeklyPlan/weeklyListByDate',
data: params data: params
},{isTransformResponse: false}) },{isTransformResponse: false})
} }

View File

@@ -2,7 +2,7 @@ import request from "@/utils/request"
export function updateWeekPlanList(data){ export function updateWeekPlanList(data){
return request.post({ return request.post({
url: '/app/appWeeklyPlan/updateWeekly', url: '/crm/app/appWeeklyPlan/updateWeekly',
data: data, data: data,
header: { header: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
@@ -12,7 +12,7 @@ export function updateWeekPlanList(data){
// 判断本周是否写过计划 // 判断本周是否写过计划
export function judgeThisWeek (data){ export function judgeThisWeek (data){
return request.post({ return request.post({
url: '/app/appWeeklyPlan/Judgethisweek', url: '/crm/app/appWeeklyPlan/Judgethisweek',
data, data,
header: {'Content-Type': 'application/json;charset=UTF-8'} header: {'Content-Type': 'application/json;charset=UTF-8'}
}) })
@@ -21,7 +21,7 @@ export function judgeThisWeek (data){
// 新增周计划 // 新增周计划
export function addPlan(data){ export function addPlan(data){
return request.post({ return request.post({
url: '/app/appWeeklyPlan/addComment', url: '/crm/app/appWeeklyPlan/addComment',
data, data,
header:{'Content-Type': 'application/json;charset=UTF-8'} header:{'Content-Type': 'application/json;charset=UTF-8'}
}) })

View File

@@ -8,7 +8,7 @@
<!-- #endif --> <!-- #endif -->
<!-- 高度来避免头部遮挡 --> <!-- 高度来避免头部遮挡 -->
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view> <view class="top-height"></view>
<view class="white-bg"> <view class="white-bg">
<navigator url="/pages/business/CRM/plan/myPlan"> <navigator url="/pages/business/CRM/plan/myPlan">

View File

@@ -17,7 +17,7 @@
<view class="top-height"></view> <view class="top-height"></view>
<view class="week-plan-title"> <view class="week-plan-title">
<view>姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view> <view v-if="userInfo.nickName">姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
<view v-if="weekNum"> <view v-if="weekNum">
{{ yearMonth }} {{ yearMonth }}
<view v-if="isThisWeek" style=" display: inline-block;"> <view v-if="isThisWeek" style=" display: inline-block;">
@@ -54,10 +54,11 @@
</view> </view>
</view> </view>
</view> </view>
<view class='bottom-spliter bg-gray'></view>
</block> </block>
<!-- 底部加高度来避免tabbar遮挡 --> <!-- 底部加高度来避免tabbar遮挡 -->
<view class="bottom-height"></view> <!-- <view class="bottom-height bg-gray"></view> -->
</view> </view>
@@ -106,12 +107,12 @@ let getWorkEvent = (index) => {
const refreshPlanList = () => { const refreshPlanList = () => {
message.showLoading(); message.showLoading();
// 获取用户信息 // 获取用户信息
getUserInfo().then(res => { // getUserInfo().then(res => {
userInfo.value = res.user; // userInfo.value = res.user;
console.log(route.path, ":用户信息获取成功"); // console.log(route.path, ":用户信息获取成功");
}).catch(err => { // }).catch(err => {
console.warn(err, "用户信息获取失败") // console.warn(err, "用户信息获取失败")
}); // });
// 获取周计划列表 // 获取周计划列表
getWeeklyPlanList(queryParams.value).then(res => { getWeeklyPlanList(queryParams.value).then(res => {
const {rows} = res; const {rows} = res;
@@ -180,11 +181,11 @@ function handleCreate() {
handlePlanEdit({itemList, selectIndex: result.tapIndex}, true); handlePlanEdit({itemList, selectIndex: result.tapIndex}, true);
}).catch((err) => { }).catch((err) => {
console.warn(err, "已存在周计划") console.warn(err, "已存在周计划")
uni.showToast({ // uni.showToast({
icon: 'error', // icon: 'error',
title: '已有本周或下周计划', // title: '已有本周或下周计划',
duration: 2000 // duration: 2000
}) // })
}) })
// }else{ // 创建下周计划 // }else{ // 创建下周计划
// } // }
@@ -234,7 +235,7 @@ function handleEdit(index) {
// console.log(JSON.stringify(formData)) // console.log(JSON.stringify(formData))
console.log(route.path, formData, "前往修改页面"); console.log(route.path, formData, "前往修改页面");
const editFields = [OrdinalDate[index], WorkType[index], WorkEvent[index]]; const editFields = [OrdinalDate[index], WorkType[index], WorkEvent[index]];
let userName = userInfo.value.nickName || userInfo.value.userName; let userName = null; // userInfo.value.userName || userInfo.value.nickName;
handlePlanEdit({userName, formData, editFields}, false); handlePlanEdit({userName, formData, editFields}, false);
} }
@@ -268,9 +269,14 @@ function handleEdit(index) {
} }
.white-bg.white-bg-2 { .white-bg.white-bg-2 {
margin-bottom: 20rpx; /* margin-bottom: 20rpx; */
}
.bottom-spliter{
height: 20rpx;
}
.bg-gray{
background-color: #f0f0f0;
} }
.report-list .w-b-title .btn-edit { .report-list .w-b-title .btn-edit {
background-color: #5C96F7; background-color: #5C96F7;
} }

View File

@@ -4,7 +4,7 @@
<!-- 头部 --> <!-- 头部 -->
<customHeader ref="customHeaderRef" :title="title" :leftFlag="true" :rightFlag="true"> <customHeader ref="customHeaderRef" :title="title" :leftFlag="true" :rightFlag="true">
<template #right> <template #right>
<view class="head-right" @click="submitForm" v-if="userInfo.nickName || userInfo.userName"> <view class="head-right" @click="submitForm">
<uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22" <uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22"
color="#B7D2FF"></uni-icons> color="#B7D2FF"></uni-icons>
保存 保存
@@ -16,7 +16,7 @@
<!-- 正文内容 --> <!-- 正文内容 -->
<view class="week-plan-title"> <view class="week-plan-title">
<view>姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view> <view v-if="userInfo.nickName">姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
<view>{{ currentEditDate.yearMonth }} <strong>{{ currentEditDate.weekNum }}</strong> </view> <view>{{ currentEditDate.yearMonth }} <strong>{{ currentEditDate.weekNum }}</strong> </view>
</view> </view>
<uni-forms ref="formRef" :model="weekPlanFormData" :rules="rules" label-width="100px" label-position="top"> <uni-forms ref="formRef" :model="weekPlanFormData" :rules="rules" label-width="100px" label-position="top">

View File

@@ -11,8 +11,7 @@
</customHeader> </customHeader>
<!-- 高度来避免头部遮挡 --> <!-- 高度来避免头部遮挡 -->
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view> <view class="top-height"></view>
<!-- 正文内容 --> <!-- 正文内容 -->
<view> <view>