ios 测试问题修改

This commit is contained in:
lSun 2025-01-13 09:40:16 +08:00
parent 31bac90095
commit 6974d98583
9 changed files with 758 additions and 743 deletions

View File

@ -18,7 +18,7 @@
// #endif
// 线使
// console.log('%c uni-appuni-app & uniCloud hr2013@dcloud.io', 'color: red');
console.log('App Launch');
// console.log('App Launch');
// #ifdef APP-PLUS
// AppuniCloudhttps://ext.dcloud.net.cn/plugin?id=4542
if (plus.runtime.appid !== 'HBuilder') { // appid'HBuilder'appid
@ -43,10 +43,10 @@
// #endif
},
onShow: function() {
console.log('App Show')
// console.log('App Show')
},
onHide: function() {
console.log('App Hide')
// console.log('App Hide')
},
globalData: {
test: ''

File diff suppressed because it is too large Load Diff

View File

@ -158,6 +158,30 @@
</view>
</view>
</view>
<view class="proInformationLevel">
<block v-for="(item, index) in top5List" :key="index">
<view class="layui-row">
<view style="width: 20%;text-align: center;">
<view class="grid-demo grid-demo-bg1">
<image :src="getImgUrl(index + 1)" style="width: 60rpx;height: 60rpx;"></image>
</view>
</view>
<view style="width: 60%;">
<view class="grid-demo">{{ item.subComName }}</view>
</view>
<view style="width: 20%;text-align: center;">
<view class="grid-demo grid-demo-bg1">{{ item.subNum }}</view>
</view>
</view>
</block>
<view style="text-align: center; margin-top: 20px;">
<image src="/static/image/overlap.png" style="width: 50rpx;height: 28rpx;margin-top: 5px;">
</image>
项目参建单位项目数量排名TOP5
</view>
</view>
<!-- &lt;!&ndash; 饼图 &ndash;&gt; -->
<view class="charts_container">
<PieChartsModel />
@ -504,22 +528,23 @@
femaleNum: 0,
sexAmount: 0,
colorAmount: 0
colorAmount: 0,
listRank: [],
top5List: []
}
},
onLoad() {
//
this.getHomePageListData();
//
if (this.type.indexOf('4') > -1) {
this.showPopup = true;
this.getPro();
}
const isFirstLoad = !uni.getStorageSync('pageLoaded');
if (isFirstLoad) {
//
this.getHomePageListData();
this.showRules();
//
if (this.type.indexOf('4') > -1) {
this.showPopup = true;
this.getPro();
}
//
uni.setStorageSync('pageLoaded', true);
}
@ -578,7 +603,7 @@
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
console.log(res)
// console.log(res)
res = res.data
if (res.code == 200) {
this.proList = res.data
@ -594,7 +619,6 @@
if (this.type.indexOf('4') > -1) {
this.showPopup = true
}
},
//
chosenPro(item) {
@ -615,115 +639,138 @@
/* 获取首页数据 */
async getHomePageListData() {
const {
data: res
} = await getHomePageListApi({})
console.log('首页数据', res)
try {
uni.showLoading({
title: '加载中...'
});
const {
data: res
} = await getHomePageListApi({})
// console.log('', res)
if (!res) return
if (!res) return
const {
homePageBean,
personAtt,
workerMsgBean,
proMsgBean
} = res
const {
highRiskNum,
mediumRiskNum,
lowRiskNum,
planPersonNum
} = homePageBean
const {
buildProNum,
prepareProNum,
stopProNum,
completeProNum
} = proMsgBean
this.noticeText =
`高风险:${highRiskNum} 中风险:${mediumRiskNum} 低风险:${lowRiskNum} 作业计划人数:${planPersonNum}`
this.highRiskNum = homePageBean.highRiskNum
this.mediumRiskNum = homePageBean.mediumRiskNum
this.lowRiskNum = homePageBean.lowRiskNum
this.planPersonNum = homePageBean.planPersonNum
const {
homePageBean,
personAtt,
workerMsgBean,
proMsgBean
} = res
const {
highRiskNum,
mediumRiskNum,
lowRiskNum,
planPersonNum
} = homePageBean
const {
buildProNum,
prepareProNum,
stopProNum,
completeProNum,
listRank
} = proMsgBean
this.noticeText =
`高风险:${highRiskNum} 中风险:${mediumRiskNum} 低风险:${lowRiskNum} 作业计划人数:${planPersonNum}`
this.highRiskNum = homePageBean.highRiskNum
this.mediumRiskNum = homePageBean.mediumRiskNum
this.lowRiskNum = homePageBean.lowRiskNum
this.planPersonNum = homePageBean.planPersonNum
this.attPersonNum = personAtt.attPersonNum
this.einFormalAttPersonNum = personAtt.einFormalAttPersonNum
this.einTemporaryAttPersonNum = personAtt.einTemporaryAttPersonNum
this.planAttNum = personAtt.planAttNum
this.attPersonNum = personAtt.attPersonNum
this.einFormalAttPersonNum = personAtt.einFormalAttPersonNum
this.einTemporaryAttPersonNum = personAtt.einTemporaryAttPersonNum
this.planAttNum = personAtt.planAttNum
this.einPersonNum = homePageBean.einPersonNum
this.formalPersonNum = personAtt.formalPersonNum
this.temporaryPersonNum = personAtt.temporaryPersonNum
this.einPersonNum = homePageBean.einPersonNum
this.formalPersonNum = personAtt.formalPersonNum
this.temporaryPersonNum = personAtt.temporaryPersonNum
this.greenNum = workerMsgBean.greenNum
this.yellowNum = workerMsgBean.yellowNum
this.redNum = workerMsgBean.redNum
this.greenNum = workerMsgBean.greenNum
this.yellowNum = workerMsgBean.yellowNum
this.redNum = workerMsgBean.redNum
this.maleNum = workerMsgBean.maleNum
this.femaleNum = workerMsgBean.femaleNum
this.sexAmount = this.maleNum + this.femaleNum
this.colorAmount = this.greenNum + this.yellowNum + this.redNum
this.maleNum = workerMsgBean.maleNum
this.femaleNum = workerMsgBean.femaleNum
this.sexAmount = this.maleNum + this.femaleNum
this.colorAmount = this.greenNum + this.yellowNum + this.redNum
this.buildProNum = homePageBean.buildProNum
this.subNum = homePageBean.subNum
this.teamNum = homePageBean.teamNum
// this.einPersonNum = homePageBean.einPersonNum
this.buildProNum = homePageBean.buildProNum
this.subNum = homePageBean.subNum
this.teamNum = homePageBean.teamNum
// this.einPersonNum = homePageBean.einPersonNum
this.dataOverviewList[0].data_num = this.buildProNum
this.dataOverviewList[1].data_num = this.subNum
this.dataOverviewList[2].data_num = this.teamNum
this.dataOverviewList[3].data_num = this.einPersonNum
this.dataOverviewList[4].data_num = this.planAttNum
this.dataOverviewList[5].data_num = this.attPersonNum
this.dataOverviewList[0].data_num = this.buildProNum
this.dataOverviewList[1].data_num = this.subNum
this.dataOverviewList[2].data_num = this.teamNum
this.dataOverviewList[3].data_num = this.einPersonNum
this.dataOverviewList[4].data_num = this.planAttNum
this.dataOverviewList[5].data_num = this.attPersonNum
this.progressList.forEach((e, i) => {
if (i === 0 || i === 2 || i === 3) {
e.progress_amount = this.einPersonNum
}
if (i === 0) {
e.progress_ready = this.attPersonNum
}
if (i === 1) {
e.progress_amount = this.planPersonNum
e.progress_ready = this.planAttNum
}
if (i === 2) {
e.progress_ready = this.formalPersonNum
}
if (i === 3) {
e.progress_ready = this.temporaryPersonNum
}
if (i === 4) {
e.progress_amount = this.formalPersonNum
e.progress_ready = this.einFormalAttPersonNum
}
if (i === 5) {
e.progress_amount = this.einTemporaryAttPersonNum
e.progress_ready = this.einTemporaryAttPersonNum
}
e.progress_proportion = ((e.progress_ready / e.progress_amount) * 100).toFixed(2)
})
this.progressList.forEach((e, i) => {
if (i === 0 || i === 2 || i === 3) {
e.progress_amount = this.einPersonNum
}
if (i === 0) {
e.progress_ready = this.attPersonNum
}
if (i === 1) {
e.progress_amount = this.planPersonNum
e.progress_ready = this.planAttNum
}
if (i === 2) {
e.progress_ready = this.formalPersonNum
}
if (i === 3) {
e.progress_ready = this.temporaryPersonNum
}
if (i === 4) {
e.progress_amount = this.formalPersonNum
e.progress_ready = this.einFormalAttPersonNum
}
if (i === 5) {
e.progress_amount = this.einTemporaryAttPersonNum
e.progress_ready = this.einTemporaryAttPersonNum
}
e.progress_proportion = ((e.progress_ready / e.progress_amount) * 100).toFixed(2)
})
console.log('this.progressList', this.progressList)
const proAmount = buildProNum + prepareProNum + stopProNum + completeProNum
this.projectList.forEach((e, i) => {
if (i === 0) {
e.project_num = buildProNum
}
if (i === 1) {
e.project_num = prepareProNum
}
if (i === 2) {
e.project_num = stopProNum
}
if (i === 3) {
e.project_num = completeProNum
}
// console.log('this.progressList', this.progressList)
const proAmount = buildProNum + prepareProNum + stopProNum + completeProNum
this.projectList.forEach((e, i) => {
if (i === 0) {
e.project_num = buildProNum
}
if (i === 1) {
e.project_num = prepareProNum
}
if (i === 2) {
e.project_num = stopProNum
}
if (i === 3) {
e.project_num = completeProNum
}
e.project_ratio = ((e.project_num / proAmount) * 100).toFixed(2)
})
e.project_ratio = ((e.project_num / proAmount) * 100).toFixed(2)
})
listRank.sort((a, b) => b.subNum - a.subNum);
this.top5List = listRank.slice(0, 5);
} catch (error) {
//
console.error('获取首页数据失败:', error);
uni.showToast({
title: '加载数据失败,请稍后再试',
icon: 'none'
});
} finally {
//
uni.hideLoading();
}
},
getImgUrl(index) {
return `/static/image/No.${index}.png`;
},
/* 跳转作业计划 */
onJumpWorkPlan() {
uni.navigateTo({
@ -1386,4 +1433,19 @@
.close-btn:disabled {
background-color: #ccc;
}
/* 根据需要添加样式 */
.proInformationLevel .layui-row {
display: flex;
margin-bottom: 10px;
}
.proInformationLevel .layui-col-md4 {
flex: 1;
text-align: center;
}
.grid-demo-bg1 {
// background-color: #f0f0f0;
}
</style>

View File

@ -180,7 +180,7 @@ export default {
success: res => {
res = res.data;
if(res.code==200){
console.log(res)
// console.log(res)
this.proName = res.data[0].abbreviation||"";
}
},
@ -207,7 +207,7 @@ export default {
param.exitStatus='评价';
param.name=this.keyWord1;
}
console.log(param)
// console.log(param)
this.listData=[]
this.isLoading=true;
uni.request({
@ -219,7 +219,7 @@ export default {
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
console.log(res)
// console.log(res)
this.isLoading=false;
res = res.data;
if(res.code==200){
@ -357,7 +357,7 @@ export default {
this.getOutWorkUser(0)
},
leftClick() {
console.log('返回')
// console.log('')
uni.navigateBack({
delta: 1 //
});

View File

@ -16,7 +16,15 @@
</view>
<view style="font-size: 26rpx;">{{item.name}}</view>
</view>
<view class="view-item" @click="goOutPerson">
<view>
<image class="img1" src="@/static/realName/out_person.png"
style="width: 80rpx;height: 80rpx;" alt="">
</view>
<view style="font-size: 28rpx;">人员暂退</view>
</view>
</view>
</scroll-view>
</view>
@ -171,9 +179,9 @@
url: `/pages/realName/workbench/electronicContract/contractTip`
})
} else if (name == '电子合同签署') {
uni.navigateTo({ //
url: `/pages/realName/workbench/electronicContractSign/index`
})
uni.navigateTo({ //
url: `/pages/realName/workbench/electronicContractSign/index`
})
} else if (name == '电子合同审核') {
uni.navigateTo({
url: `/pages/realName/workbench/electronicContractExam/index`
@ -208,19 +216,25 @@
})
} else if (name == '我的组织') {
uni.navigateTo({ //
url: `/pages/realName/workbench/outPerson/index`
url: `/pages/realName/workbench/myOrg/index`
})
}else if (name == '作业计划管理') {
} else if (name == '作业计划管理') {
uni.navigateTo({ //
url: `/pages/realName/workbench/dailyPlanManagement/index`
})
}else if(name == '人员信息录入'){
uni.navigateTo({ //
url: `/pages/realName/workbench/personEnter/index`
})
}
} else if (name == '人员信息录入') {
uni.navigateTo({ //
url: `/pages/realName/workbench/personEnter/index`
})
}
},
goOutPerson() {
uni.navigateTo({ //退
url: `/pages/realName/workbench/outPerson/index`
})
},
//
//
goPlan() {
@ -266,7 +280,7 @@
idNumber: this.idNumber,
teamId: this.teamId
}
console.log(param)
// console.log(param)
uni.request({
url: config.realAppUrl + '/BasePerson/selectPersonAccess',
method: 'post',
@ -276,7 +290,7 @@
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
console.log(res)
// console.log(res)
res = res.data;
if (res.code == 200) {
this.accessData = res.data;

View File

@ -1331,7 +1331,12 @@ export default {
this.faceImgUrl=base64;
this.entryCruxBean.facePath=uploadFileRes.data.url;
}else{
uni.$u.toast(uploadFileRes.msg);
if(uploadFileRes.msg ==null || uploadFileRes.msg ==""){
uni.$u.toast('上传失败');
}else{
uni.$u.toast(uploadFileRes.msg);
}
}
}else{
uni.$u.toast('上传失败');

View File

@ -3,7 +3,7 @@ const version = '2.0.37'
// 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development') {
console.log(`\n %c uView V${version} %c https://uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0; border-radius: 5px;');
// console.log(`\n %c uView V${version} %c https://uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0; border-radius: 5px;');
}
export default {

View File

@ -8,7 +8,7 @@ let timeout = 60000
// const baseUrl = config.loginBaseUrl
// const baseUrl = config.loginUrl
const baseUrl = config.lpLoginUrl
console.log('baseUrl-请求', baseUrl)
// console.log('baseUrl-请求', baseUrl)
const request = config => {
// 是否需要设置 token

View File

@ -7,7 +7,7 @@ import { toast, showConfirm, tansParams } from '@/utils/common'
let timeout = 60000
// const baseUrl = config.realNewBmwUrl
const baseUrl = config.lpBmwUrl
console.log('baseUrl-请求', baseUrl)
// console.log('baseUrl-请求', baseUrl)
const request = config => {
// 是否需要设置 token