Merge remote-tracking branch 'origin/main'

This commit is contained in:
zhaoxinyu
2024-09-20 16:57:02 +08:00
31 changed files with 991 additions and 231 deletions
@@ -237,13 +237,20 @@ layout("/mobile/platform.html"){
<van-button v-if="o.isJoin === true" size="small" disabled color="grey">已签到</van-button>-->
<van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, false)"
@click="needLeave(o, true, true)"
color="#1867b0" size="small" style="margin-right: 8px"
v-if="${@shiro.hasRole('H04')}"
type="primary">替他人请假
</van-button>
<van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, false, false)"
color="#1867b0" size="small" style="margin-right: 8px"
type="primary">查看请假状态
</van-button>
<van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, true)"
@click="needLeave(o, true, false)"
color="#1867b0" size="small" style="margin-right: 8px"
type="primary">我要请假
</van-button>
@@ -275,16 +282,28 @@ layout("/mobile/platform.html"){
</div>
<div class="content">
<div class="van-doc-card" v-for="(item, index) in timeList">
<van-field
v-if="helpLeave"
v-model="needLeaveUser.userName"
label="请假人"
readonly=""
@click="helpUserShow = true"
placeholder="请点击选择请假人"
input-align="right"
></van-field>
<div v-if="timeList.length > 0" class="van-doc-card" v-for="(item, index) in timeList">
<div>
<div><span style="color: grey">会议名称:</span>{{item.timePeriodName}}</div>
<div>
<span style="color: grey">会议名称:</span>
<span>{{item.timePeriodName}}</span>
</div>
</div>
<div @click="leaveClick(item, index)"
style="display: flex; justify-content: space-between">
<div>
<div>
<span style="color: grey">会议时间:</span>
{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}
<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</span>
</div>
<!--<div><span style="color: grey">结束时间:</span>{{moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</div>-->
</div>
@@ -297,12 +316,15 @@ layout("/mobile/platform.html"){
</div>
</div>
<div v-if="item.isJoin === false">
<div><span style="color: grey">审核状态:</span>{{item.stateName}}</div>
<div>
<span style="color: grey">审核状态:</span>
<span>{{item.stateName}}</span>
</div>
</div>
<div>
<span style="float: left; color: grey">请假原因:</span>
<van-field :disabled="item.isJoin === false" placeholder="请输入请假原因" rows="1"
style="font-size: 12px; padding: 0; width: 70%; line-height: 20px"
style="font-size: 12px; padding: 0; width: 70%; line-height: 20px; margin-left: 69px"
type="textarea" autosize
v-model="item.leaveReason"></van-field>
</div>
@@ -318,6 +340,7 @@ layout("/mobile/platform.html"){
</van-button>
</div>
</div>
</div>
<div v-if="flag === true">
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 20px; width: 100%">
@@ -330,6 +353,24 @@ layout("/mobile/platform.html"){
</div>
</div>
</van-action-sheet>
<van-popup position="bottom" round v-model="helpUserShow" :style="{ height: '70%' }" closeable>
<van-search v-model="searchResult" show-action style="padding: 10px;margin-top: 45px" placeholder="请输入工号或姓名搜索"
@input="delaySearch">
</van-search>
<van-cell-group>
<div>
<van-checkbox-group style="text-align: center">
<van-cell-group>
<van-cell v-for="(item, index) in userList" :key="item.index" clickable
:title="item.name"
@click="toResult(item.loginname)">
</van-cell>
</van-cell-group>
</van-checkbox-group>
</div>
</van-cell-group>
</van-popup>
</div>
<script>
@@ -340,6 +381,14 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins],
data() {
return {
searchResult: '',
userList: [],
helpUserShow: false,
needLeaveUser: {
userName: '',
userId: '',
},
helpLeave: false,
timeList: [],
checked: [],
checkboxRefs: [],
@@ -361,12 +410,34 @@ layout("/mobile/platform.html"){
}
},
methods: {
async delaySearch(query) {
if (query) {
const data = await this.searchUser(query)
data.forEach(v => {
v.name = v.username + '(' + v.loginname + ')'
return v
})
this.userList = data
}
},
async searchUser(query) {
const res = await $.post('/mobile/meeting/mine/searchUser', {query: query, meetId: this.clickRow.id})
return res.data
},
toResult(loginname) {
this.timeList = []
const data = this.userList.find(o => o.loginname === loginname)
this.$set(this.needLeaveUser, 'userName', data.username)
this.$set(this.needLeaveUser, 'userId', data.id)
this.helpUserShow = false
this.findTimeList(this.clickRow)
},
refreshApply(o) {
vant.Dialog.confirm({
title: '温馨提示',
message: '您确定要重新申请吗?',
}).then(async () => {
await this.needLeave(this.clickRow, true)
await this.needLeave(this.clickRow, true, false)
this.timeList.forEach((re, index) => {
if (re.stateAuditType === 1) {
re.isJoin = null
@@ -437,23 +508,39 @@ layout("/mobile/platform.html"){
this.loading = false
})
},
async needLeave(o, flag) {
async needLeave(o, flag, helpLeave) {
this.flag = flag
this.clickRow = o
this.helpLeave = helpLeave
this.timeList = []
this.needLeaveUser = {
userName: '',
userId: '',
}
if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) {
vant.Toast('抱歉,已过请假截止时间');
return
}
this.leaveReason = ''
this.checked = []
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {meetingId: o.id})
if(helpLeave) {
this.leaveShow = true
} else {
await this.findTimeList(o)
}
},
async findTimeList(o) {
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {
meetingId: o.id,
helpLeave: this.helpLeave,
userId: this.needLeaveUser.userId
})
if (res.code === 0) {
this.timeList = res.data
if (this.timeList.length === 0) {
vant.Toast('您暂无可请假的假时间段');
vant.Toast('暂无可请假的假时间段');
return
}
this.leaveShow = true
this.$nextTick(function () {
this.timeList.forEach((re, index) => {
@@ -474,7 +561,7 @@ layout("/mobile/platform.html"){
}
const array = this.timeList.find(o => o.stateCode === null || o.stateCode < this.clickRow.firstState)
if (array === undefined) {
vant.Toast('您的所有请假均已处于审核阶段');
vant.Toast('所有请假均已处于审核阶段');
return
}
const paramArray = []
@@ -502,6 +589,15 @@ layout("/mobile/platform.html"){
if (valid) {
return
}
if(this.helpLeave) {
const confirm = await vant.Dialog.confirm({
title: '提示',
message: '您确定要替' + this.needLeaveUser.userName + '报名吗?',
})
if (confirm !== 'confirm') {
return
}
}
const resp = await $.post('/mobile/meeting/mine/askForLeave', {
meetingId: this.clickRow.id,
data: JSON.stringify(paramArray)
@@ -146,7 +146,15 @@ layout("/mobile/platform.html"){
const now = new Date();
// 检查当前时间是否在 startTime 和 endTime 之间
return now >= start && now <= end;
if (now < start && now > end){
vant.Dialog.alert({
title: '温馨提示',
message: '不在测评时间内,暂无法测评',
confirmButtonColor: '#1867b0'
})
return
}
//自评模式
if (o.reviewMode == 1 && !o.canJoin) {
@@ -3,7 +3,7 @@ layout("/mobile/platform.html"){
#-->
<style>
.van-doc-card {
margin: 14px;
margin: 5px;
padding: 6px;
background-color: #fff;
border-radius: 10px;
@@ -78,7 +78,9 @@ layout("/mobile/platform.html"){
{{item.contentNumber}}、{{item.inspection}}
</div>
<van-row>
<div style="font-size: 15px;text-align: right;margin-right: 30px;margin-bottom:-4px">标准分:{{item.score}}</div>
<div style="font-size: 15px;text-align: right;margin-right: 30px;margin-bottom:-4px">
标准分:{{item.score}}
</div>
</van-row>
<van-field
v-model="item.resultScore"
@@ -98,7 +100,7 @@ layout("/mobile/platform.html"){
<van-field v-model="o.remark"
name="备注" label="备注"
required rows="3" type="textarea"
autosize show-word-limit
autosize show-word-limit
maxlength="300"
placeholder="请填写备注"
:readonly="isReadOnly"
@@ -107,7 +109,8 @@ layout("/mobile/platform.html"){
</van-collapse-item>
</div>
<div v-if="commentatorData.reviewMode == 1" class="content_div">
<van-field name="files" label="职工评家总结" required style="flex-flow: column" input-align="left">
<van-field name="files" label="职工评家总结" required style="flex-flow: column"
input-align="left">
<template #label>
<div class="mb10">职工评家总结</div>
</template>
@@ -120,28 +123,35 @@ layout("/mobile/platform.html"){
<div v-if="commentatorData.scoringMode==2">
<div class="search-fixed">
<div class="search-fixed" style="margin: 0px auto 60px auto" v-if="commentatorData.assessmentMode == 2">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="president" :options="presidentList"
@change="presidentChange"></van-dropdown-item>
</van-dropdown-menu>
</div>
<div v-for="o in commentatorData.nrs" style="margin: 60px auto 0 auto">
<div v-for="item in o.bzs">
<div class="van-doc-card">
<div style="font-size: 15px;color: black">{{item.contentNumber}}、{{item.inspection}}
<div>
<div v-for="o in commentatorData.nrs">
<van-collapse-item :title="o.content" :name="o.id" style="margin: 5px">
<div v-for="item in o.bzs">
<div class="van-doc-card">
<div style="font-size: 15px;color: black">
{{item.contentNumber}}、{{item.inspection}}
</div>
<van-field name="radio" style="padding: 12px 2px;margin: 5px">
<template #input>
<van-radio-group v-model="item.resultScore" :disabled="isReadOnly"
direction="horizontal">
<van-radio name="非常满意">非常满意</van-radio>
<van-radio name="满意">满意</van-radio>
<van-radio name="良好">良好</van-radio>
<van-radio name="一般">一般</van-radio>
</van-radio-group>
</template>
</van-field>
</div>
</div>
<van-field name="radio" label="满意度" style="padding: 12px 2px;margin: 5px">
<template #input>
<van-radio-group style="margin-left: -20px" v-model="item.resultScore" :disabled="isReadOnly" direction="horizontal">
<van-radio name="满意">满意</van-radio>
<van-radio name="基本满意">基本满意</van-radio>
<van-radio name="不满意">不满意</van-radio>
</van-radio-group>
</template>
</van-field>
</div>
</van-collapse-item>
</div>
</div>
<div class="van-doc-card">
@@ -163,8 +173,11 @@ layout("/mobile/platform.html"){
<div>
<van-tabbar>
<van-button id="buttonAss" :disabled="isShowSubmit" round block type="info" @click="showAssess">查看测评结果</van-button>
<van-button id="buttonSub" :disabled="isShowSubmit" round block type="info" @click="onSubmit">提交</van-button>
<van-button id="buttonAss" :disabled="isShowSubmit" round block type="info" @click="showAssess">
查看测评结果
</van-button>
<van-button id="buttonSub" :disabled="isShowSubmit" round block type="info" @click="onSubmit">提交
</van-button>
</van-tabbar>
</div>
@@ -183,10 +196,10 @@ layout("/mobile/platform.html"){
bzList: [],
president: '',
presidentList: [],
userList:[],
userList: [],
isShowSubmit: false,
isReadOnly:false,
formData:{
isReadOnly: false,
formData: {
id: '',
reviewResult: '',
presidentOpinions: '',
@@ -201,7 +214,7 @@ layout("/mobile/platform.html"){
assessmentFiles: [],
assessmentNrs: [],
assessmentReviewMode: '',
assessmentScoringMode:'',
assessmentScoringMode: '',
}
}
},
@@ -226,7 +239,10 @@ layout("/mobile/platform.html"){
this.bzList = [];
this.commentatorData.nrs.forEach(v => {
v.bzs.forEach(o => {
if (self.commentatorData.assessmentMode === 1 && v.remark){
if (self.commentatorData.assessmentMode === 1 && v.remark) {
if (!o.resultScore) {
return
}
o.options = v.remark
}
self.bzList.push(o)
@@ -241,15 +257,15 @@ layout("/mobile/platform.html"){
})
await this.assignment();
let evaluatedPersonName=null;
let evaluatedPersonType=null;
let evaluatedPersonName = null;
let evaluatedPersonType = null;
if (this.commentatorData.assessmentMode === 1) {
let source = 0; // 标准分
let resultScore = 0; // 评议分
this.bzList.forEach(v => {
source += Number(v.source)
source += Number(v.score)
resultScore += Number(v.resultScore)
})
const result = (resultScore / source) * 100
@@ -272,7 +288,7 @@ layout("/mobile/platform.html"){
this.reviewResult = '不满意'
}
const user = this.userList.find(v=> v.id === this.president)
const user = this.userList.find(v => v.id === this.president)
evaluatedPersonName = user.username
evaluatedPersonType = user.evaluatedPersonType
}
@@ -290,16 +306,36 @@ layout("/mobile/platform.html"){
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit', formData)
if (resp.code === 0) {
await this.getCommentById();
window.location.href = '/mobile/wakeshome/review/appraisal/mine'
vant.Toast.success('操作成功')
setTimeout(() => {
window.location.href = '/mobile/wakeshome/review/appraisal/mine'
}, 500)
}
})
},
async showAssess() {
this.$refs['addForm'].validate().then(async () => {
let score = 0;
await this.assignment();
// let score = 0;
if (this.commentatorData.assessmentMode === 1) {
await this.assignment();
let source = 0; // 标准分
let resultScore = 0; // 评议分
this.bzList.forEach(v => {
source += Number(v.score)
resultScore += Number(v.resultScore)
})
const result = (resultScore / source) * 100
if (result >= 80) {
this.reviewResult = '满意'
} else if (result >= 60 && result <= 79) {
this.reviewResult = '基本满意'
} else {
this.reviewResult = '不满意'
}
/*this.bzList.forEach(v => {
score += Number(v.resultScore)
})
if (score >= Number(80)) {
@@ -308,12 +344,13 @@ layout("/mobile/platform.html"){
this.reviewResult = '基本满意'
} else {
this.reviewResult = '不满意'
}
console.log(score)
}*/
console.log(source)
console.log(resultScore)
console.log(this.reviewResult)
vant.Dialog.alert({
title: '测评结果',
message: '您的测评分数为【' + score + "】分,测评结果为【" + this.reviewResult + "】",
message: '您的测评分数为【' + resultScore + "】分,测评结果为【" + this.reviewResult + "】",
confirmButtonColor: '#1867b0'
})
} else if (this.commentatorData.assessmentMode === 2) {