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> </u-form>
<view class="between"> <view class="between">
<view class="link" @click="forgetPassword">忘记密码</view> <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> </view>
<view class="selectDept" v-else> <view class="selectDept" v-else>

View File

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

View File

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

View File

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

View File

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

View File

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