fix: 修改人员管理以及进度管理模块中的样式问题以及交互BUG

This commit is contained in:
kun 2024-07-03 17:56:30 +08:00
parent c275f70bc3
commit 61e65aef50
6 changed files with 134 additions and 56 deletions

View File

@ -22,7 +22,7 @@
</u-form>
<view class="between">
<view class="link" @click="forgetPassword">忘记密码</view>
<view class="link" @click="goToPage">{{ type == "user" ? "用户账号注册" : "供应商账号注册" }}</view>
<!-- <view class="link" @click="goToPage">{{ type == "user" ? "用户账号注册" : "供应商账号注册" }}</view> -->
</view>
</view>
<view class="selectDept" v-else>

View File

@ -60,6 +60,10 @@
<view>城乡居民医疗保险{{item.medicalInsurance==1?'否':item.medicalInsurance==2?'是':''}}</view>
<view>城乡居民养老保险{{item.endowmentInsurance==1?'否':item.endowmentInsurance==2?'是':''}}</view>
</view>
<view class="no_data" v-if="info.length == 0">
<image src="/static/noData.png"></image>
<view>暂无数据</view>
</view>
</view>
<view class="info_wrap" v-if="type==4">
<view class="title">
@ -67,7 +71,7 @@
<text class="state2" v-else>已培训</text>
</view>
<view class="detailInfo" v-for="(item,index) in info" :key="index">
<view>培训类型 {{
<!-- <view>培训类型 {{
item.eduType == 1
? "入场三级教育"
: item.eduType == 2
@ -77,11 +81,11 @@
: item.eduType == 4
? "VR安全教育"
: ""
}}</view>
<view>培训主题{{item.eduCourseName}}</view>
<view>培训课时{{item.eduClasshour}}</view>
<view>培训得分{{item.score}}</view>
<view>是否合格{{item.isQualified == 1 ? "合格":item.isQualified == 2? "不合格":''}}</view>
}}</view> -->
<view>培训日期{{item.date}}</view>
<view>培训主题{{item.subject}}</view>
<view>考试分数{{item.score}}</view>
<view>是否合格{{item.isPass == 1 ? "是":item.isPass == 0? "否":''}}</view>
</view>
</view>
</view>
@ -93,15 +97,36 @@
data() {
return {
type: 1,
info: null
info: null,
workerId: ""
}
},
onLoad(option) {
this.type = Number(option.type);
this.workerId = option.workerId;
this.info = uni.getStorageSync('moduleInfo');
this.getFileInfo();
if(this.type == 4){ //
this.getExamDataList();
}
},
methods: {
//
getExamDataList() {
this.sendRequest({
url: 'xmgl/workerInfo/getTrainRecordsByWorkerId',
method: 'post',
data: {
projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn,
workerId: this.workerId,
},
success: res => {
if(res.code == 200){
this.info = res.result;
}
}
})
},
//
getFileInfo() {
let data = JSON.parse(JSON.stringify(this.info))
@ -151,6 +176,7 @@
<style>
.info_wrap {
text-align: center;
padding-bottom: 2rpx;
}
.detailInfo {
@ -162,7 +188,24 @@
font-size: 30rpx;
line-height: 28px;
}
.no_data{
position: fixed;
top: 35%;
// transform: translateY(-50%);
left: 50%;
transform: translateX(-50%);
padding-top: 60rpx;
text-align: center;
color: rgba(0,0,0,0.5);
font-size: 28rpx;
uni-image{
width: 162rpx;
height: 130rpx;
display: block;
margin: 0 auto;
margin-bottom: 40rpx;
}
}
.info_wrap .title {
font-size: 30rpx;
margin-top: 8px;

View File

@ -574,7 +574,8 @@
} else if (type == 3) {
moduleInfo = this.insuranceList;
} else if (type == 4) {
moduleInfo = this.safeEducationList;
// moduleInfo = this.safeEducationList;
moduleInfo = [];
} else if (type == 5) {
// moduleInfo = this.safeEducationList;
} else if (type == 6) {
@ -585,7 +586,7 @@
};
uni.setStorageSync('moduleInfo', moduleInfo)
uni.navigateTo({
url: "./detailsMod?type=" + type
url: "./detailsMod?type=" + type + "&workerId=" + this.workerId
})
},

View File

@ -31,7 +31,8 @@
</view>
<view class="b-bottom-textarea">
<view class="name">反馈内容</view>
<textarea auto-height :maxlength="-1" @input='supplementTextarea' :value="form.feedbackContent" placeholder="多行输入"></textarea>
<textarea auto-height :maxlength="-1" @input='supplementTextarea' :value="form.feedbackContent"
placeholder="多行输入"></textarea>
</view>
<view class="b-bottom" style="border-bottom: 2rpx solid #f0f0f0;">
<view class="name">上传图片</view>
@ -49,20 +50,32 @@
<view class="delay-content" style="border-bottom: 2rpx solid #f0f0f0;">
<view class="name"><text class="mustStar">*</text>是否有延期误工事件</view>
<radio-group class="radio_box" @change="radioChange">
<label class="radio"><radio value="1" /></label>
<label class="radio"><radio value="0" checked="true"/></label>
<label class="radio">
<radio value="1" />
</label>
<label class="radio">
<radio value="0" checked="true" />
</label>
</radio-group>
</view>
<view class="b-bottom-textarea" v-if="form.hasDelayEvent == 1">
<view class="name" style="width: 30%;"><text class="mustStar">*</text>延期误工原因</view>
<textarea auto-height :maxlength="-1" @input='reasonTextarea' :value="form.delayEventReason" placeholder="多行输入"></textarea>
<textarea auto-height :maxlength="-1" @input='reasonTextarea' :value="form.delayEventReason"
placeholder="多行输入"></textarea>
</view>
<view class="delay-reason-content" style="border-bottom: 2rpx solid #f0f0f0;" v-if="form.hasDelayEvent == 1">
<view class="delay-reason-content" style="border-bottom: 2rpx solid #f0f0f0;"
v-if="form.hasDelayEvent == 1">
<view class="name"><text class="mustStar">*</text>延期原因类型</view>
<checkbox-group class="check_box" @change="checkChange">
<label class="check"><checkbox value="1" />人为因素</label>
<label class="check"><checkbox value="2" />环境因素</label>
<label class="check"><checkbox value="3" />不可抵抗因素</label>
<label class="check">
<checkbox value="1" />人为因素
</label>
<label class="check">
<checkbox value="2" />环境因素
</label>
<label class="check">
<checkbox value="3" />不可抵抗因素
</label>
</checkbox-group>
</view>
<!-- <view class="title">
@ -101,31 +114,31 @@
imgFileList: [],
projectSn: '',
materialList: [],
id: ''
itemForm: {}
}
},
onLoad(option) {
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
this.id = option.id
console.log('id有了吗', this.id);
this.itemForm = JSON.parse(decodeURIComponent(option.item));
console.log("数据itemForm",this.itemForm)
},
onShow() {
// this.getList()
},
methods: {
checkChange(e){
console.log(e,777)
checkChange(e) {
console.log(e, 777)
this.form.delayEventType = e.detail.value
},
radioChange(e){
console.log(e,666)
radioChange(e) {
console.log(e, 666)
this.form.hasDelayEvent = e.detail.value;
},
//
getList() {
let data = {
projectSn: this.projectSn,
taskProgressId: this.id,
taskProgressId: this.itemForm.id,
}
this.sendRequest({
url: 'xmgl/xzTaskProgressMaterialRel/detailList',
@ -146,7 +159,7 @@
//
getDetail() {
let data = {
taskProgressId: this.id,
taskProgressId: this.itemForm.id,
}
this.sendRequest({
url: 'xmgl/xzTaskProgressContent/list',
@ -162,7 +175,7 @@
if (res.result[0].image !== "") {
this.imgFileList = JSON.parse(res.result.image)
}
}else {
} else {
this.selectNowDate()
}
@ -178,7 +191,7 @@
}
},
//
reasonTextarea(e){
reasonTextarea(e) {
this.form.delayEventReason = e.detail.value
},
//
@ -243,37 +256,44 @@
},
//
addSaveBtn() {
console.log(this.form,111222);
console.log(this.form, 111222);
if (this.form.uploadDate == "") {
uni.showToast({
title: "请选择上报时间",
icon: 'error'
icon: 'none'
})
return
}
if(this.form.hasDelayEvent !== '0'){
if(!this.form.delayEventReason){
if (this.form.hasDelayEvent !== '0') {
if (!this.form.delayEventReason) {
uni.showToast({
title: "请输入延期误工原因",
icon: 'error'
icon: 'none'
})
return
}
if(this.form.delayEventType.length == 0){
if (this.form.delayEventType.length == 0) {
uni.showToast({
title: "请选择延期原因类型",
icon: 'error'
icon: 'none'
})
return
}
}
let data = JSON.parse(JSON.stringify(this.form));
data.projectSn = this.projectSn;
data.taskProgressId = String(this.id)
data.taskProgressId = String(this.itemForm.id)
data.image = JSON.stringify(this.imgFileList)
data.typeDataList = this.materialList
console.log('新增提交的数据', data);
data.delayEventType = this.form.delayEventType.join(',')
if (+this.form.progressRatio <= +this.itemForm.progressRatio) {
uni.showToast({
title: "上报进度必须大于当前进度",
icon: 'none'
})
return;
}
this.sendRequest({
url: 'xmgl/xzTaskProgressContent/add',
method: 'post',
@ -369,48 +389,54 @@
}
.b-bottom-textarea{
.b-bottom-textarea {
border-top: 2rpx solid #f0f0f0;
display: flex;
min-height: 200rpx;
// line-height: 80rpx;
padding-top: 20rpx;
.inputFrom {
width: 80%;
margin-left: 40rpx;
}
.name {
width: 20%;
}
.icon-right {
margin-left: 16rpx;
width: 16rpx;
height: 32rpx;
}
/deep/.uni-textarea-placeholder{
/deep/.uni-textarea-placeholder {
font-size: 28rpx;
}
}
.delay-content{
.delay-content {
border-top: 2rpx solid #f0f0f0;
display: flex;
align-items: center;
justify-content: space-between;
height: 200rpx;
.name {
width: 50%;
}
.radio_box{
.radio_box {
display: flex;
.radio {
margin-right: 40rpx;
display: flex;
align-items: center;
}
// /deep/.uni-radio-input{
// width: 28rpx;
// height: 28rpx;
@ -421,34 +447,39 @@
// }
}
}
.delay-reason-content{
.delay-reason-content {
border-top: 2rpx solid #f0f0f0;
display: flex;
height: 200rpx;
padding-top: 20rpx;
.name {
width: 28%;
}
.check_box{
.check_box {
display: flex;
flex-direction: column;
.check {
margin-bottom: 20rpx;
display: flex;
align-items: center;
}
/deep/.uni-checkbox-input{
/deep/.uni-checkbox-input {
width: 28rpx;
height: 28rpx;
font-size: 28rpx;
}
/deep/.uni-checkbox-input-checked::before{
/deep/.uni-checkbox-input-checked::before {
font-size: 28rpx;
}
}
}
.addProgess {
width: 50%;
background: #5181f6;
@ -560,4 +591,4 @@
.mustStar {
color: red;
}
</style>
</style>

View File

@ -228,7 +228,8 @@
let that = this;
let requestData = {
...that.condition,
...that.option
...that.option,
isApprovalList: 1
}
if (this.checkedTab == 1) {
requestData.isAudit = 0

View File

@ -156,10 +156,12 @@
},
//
addProgessBtn() {
// uni.navigateTo({
// url: './addFrom?id=' + this.itemFrom.id
// })
uni.navigateTo({
url: './addFrom?id=' + this.itemFrom.id
url: './addFrom?item=' + encodeURIComponent(JSON.stringify(this.itemFrom))
})
},
//
startTask() {