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) {
@@ -34,7 +34,11 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool label="统计" :app="this"></table-tool>
<table-tool label="统计" :app="this">
<template #func>
<el-button type="primary" size="small" @click="exportXlsx">导出</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" style="width: 100%">
<el-table-column type="index" label="序号" width="80px"></el-table-column>
<el-table-column
@@ -46,9 +50,9 @@ layout("/layouts/platform.html"){
:prop="column.prop"
:sortable="column.sortable"
>
<!-- <template v-if="column.prop==='sumDuration'" scope="{row}">-->
<!-- {{(row.sumDuration / 60 / 60).toFixed(2) + 'h'}}-->
<!-- </template>-->
<!-- <template v-if="column.prop==='sumDuration'" scope="{row}">-->
<!-- {{(row.sumDuration / 60 / 60).toFixed(2) + 'h'}}-->
<!-- </template>-->
<template v-if="column.prop==='isQualified'" scope="{row}">
<span v-if="row.watchCount>=row.qualifiedNum" class="text-success">
是
@@ -58,48 +62,48 @@ layout("/layouts/platform.html"){
</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" header-align="center" label="操作" width="200">-->
<!-- <template scope="{row}">-->
<!-- <el-button size="mini" type="primary" @click="openView(row)">查看具体学习情况</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" header-align="center" label="操作" width="200">-->
<!-- <template scope="{row}">-->
<!-- <el-button size="mini" type="primary" @click="openView(row)">查看具体学习情况</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<!-- <template #view>-->
<!-- <el-table :data="viewTableData" stripe border style="width: 100%">-->
<!-- <el-table-column type="index" label="序号" width="80px">-->
<!-- <template scope="scope">-->
<!-- <span>{{ scope.$index + (viewPageForm.pageNumber - 1) * viewPageForm.pageSize + 1 }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- align="center"-->
<!-- header-align="center"-->
<!-- v-for="column in viewTableColumns"-->
<!-- show-overflow-tooltip-->
<!-- :label="column.label"-->
<!-- :prop="column.prop"-->
<!-- :sortable="column.sortable"-->
<!-- >-->
<!-- <template v-if="column.prop==='studyDuration'" scope="{row}">-->
<!-- {{(row.studyDuration / 60 / 60).toFixed(2) + 'h'}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <template #view>-->
<!-- <el-table :data="viewTableData" stripe border style="width: 100%">-->
<!-- <el-table-column type="index" label="序号" width="80px">-->
<!-- <template scope="scope">-->
<!-- <span>{{ scope.$index + (viewPageForm.pageNumber - 1) * viewPageForm.pageSize + 1 }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- align="center"-->
<!-- header-align="center"-->
<!-- v-for="column in viewTableColumns"-->
<!-- show-overflow-tooltip-->
<!-- :label="column.label"-->
<!-- :prop="column.prop"-->
<!-- :sortable="column.sortable"-->
<!-- >-->
<!-- <template v-if="column.prop==='studyDuration'" scope="{row}">-->
<!-- {{(row.studyDuration / 60 / 60).toFixed(2) + 'h'}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <el-row class="el-pagination-container" style="margin-bottom: 0px">-->
<!-- <el-pagination-->
<!-- @current-change="(val)=>{viewPageForm.pageNumber=val;viewPageData()}"-->
<!-- :current-page="viewPageForm.pageNumber"-->
<!-- :page-size="viewPageForm.pageSize"-->
<!-- layout="total, sizes, prev, pager, next"-->
<!-- :total="viewPageForm.totalCount">-->
<!-- </el-pagination>-->
<!-- </el-row>-->
<!-- <el-row class="el-pagination-container" style="margin-bottom: 0px">-->
<!-- <el-pagination-->
<!-- @current-change="(val)=>{viewPageForm.pageNumber=val;viewPageData()}"-->
<!-- :current-page="viewPageForm.pageNumber"-->
<!-- :page-size="viewPageForm.pageSize"-->
<!-- layout="total, sizes, prev, pager, next"-->
<!-- :total="viewPageForm.totalCount">-->
<!-- </el-pagination>-->
<!-- </el-row>-->
<!-- </template>-->
<!-- </template>-->
</guava>
</div>
@@ -155,6 +159,9 @@ layout("/layouts/platform.html"){
}
},
viewPageNumberChange(val) {
},
exportXlsx() {
window.open(loc() + '/exportXlsx?albumId=' + this.pageForm.albumId)
}
},
async created() {
@@ -105,13 +105,40 @@ layout("/layouts/platform.html"){
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="350px">
<!-- <el-table-column label="操作" width="350px">
<template scope="{row}">
<el-button @click="makeCode(row)" size="mini" type="primary">生成二维码</el-button>
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="deleteDo(row)" size="mini" type="primary">删除</el-button>
</template>
</el-table-column>-->
<el-table-column label="操作" width="150px">
<template scope="{row}">
<el-dropdown>
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="openCode(row.id)">
活动二维码
</el-dropdown-item>
<el-dropdown-item @click.native="makeCode(row)">
签到二维码
</el-dropdown-item>
<el-dropdown-item @click.native="openView(row)">
查看
</el-dropdown-item>
<el-dropdown-item @click.native="openEdit(row)">
编辑
</el-dropdown-item>
<el-dropdown-item @click.native="deleteDo(row)">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
@@ -164,6 +191,8 @@ layout("/layouts/platform.html"){
</el-table>
</el-dialog>
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
</div>
<script>
@@ -197,9 +226,16 @@ layout("/layouts/platform.html"){
courseTimeList: [],
viewMapDialog: false,
clickRow: {},
url: '',
}
},
components: {
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
},
methods: {
openCode(id) {
this.$refs.openQRCode.openCode("/platform/mobile/trainSignUpActivity/trainList")
},
makeCode(row) {
this.clickRow = row
const type = this.trainTypeList.find(o => o.code === row.trainType)
@@ -96,7 +96,7 @@ layout("/layouts/platform.html"){
<template v-if="!scope.row.isReview">
<el-tooltip content="评议页面的提交按钮在右上角哦" placement="top">
<el-button size="mini" type="primary" @click="doReview(scope.row)">
去评议
自评
</el-button>
</el-tooltip>
</template>
@@ -123,7 +123,7 @@ layout("/layouts/platform.html"){
<el-form :model="formData" ref="form" label-width="100px"
style="height: calc(100vh - 50px);overflow-y: scroll;padding: 10px 15px">
<template v-if="formData.scoringMode==2">
<template v-if="formData.assessmentMode==2">
<vi-title title="评议对象选择"></vi-title>
<el-row>
<el-col :span="12">
@@ -189,9 +189,10 @@ layout("/layouts/platform.html"){
align="center" width="350px">
<template slot-scope="{row}">
<el-radio-group v-model="row.resultScore" size="small">
<el-radio label="非常满意">非常满意</el-radio>
<el-radio label="满意">满意</el-radio>
<el-radio label="基本满意">基本满意</el-radio>
<el-radio label="不满意">不满意</el-radio>
<el-radio label="良好">良好</el-radio>
<el-radio label="一般">一般</el-radio>
</el-radio-group>
</template>
</el-table-column>
@@ -414,7 +415,7 @@ layout("/layouts/platform.html"){
let source = 0; // 标准分
let resultScore = 0; // 评议分
this.formData.bzList.forEach(v => {
source += Number(v.source)
source += Number(v.score)
resultScore += Number(v.resultScore)
})
const result = (resultScore / source) * 100
@@ -76,11 +76,25 @@ layout("/layouts/platform.html"){
:sortable="column.sortable"
:label="column.label"
:prop="column.prop" :width="column.width" min-width="100px">
<template v-if="column.prop=='isGrading'" scope="{row}">
<el-tag v-if="row.isGrading" type="success">是</el-tag>
<el-tag v-else type="danger">否</el-tag>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="240px" fixed="right">
width="380px" fixed="right">
<template scope="{row}">
<el-button size="mini" @click="openView(row)">查看</el-button>
<el-button
v-if="!row.isGrading && row.num > 0 && ${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
size="mini" type="primary"
@click="openGrading(row)">定级
</el-button>
<el-button
v-if="row.isGrading && row.num > 0 && ${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
size="mini" type="primary"
@click="editGrading(row)">修改定级
</el-button>
<el-tooltip
:content="canDownload ? ('导出【'+ row.unionName +'】管理员自我评议的评议结果') : ('导出【'+ row.unionName +'】下所有评议结果的压缩包') "
placement="top">
@@ -185,6 +199,26 @@ layout("/layouts/platform.html"){
<el-dialog title="评议结果" :visible.sync="userDrawer" close-on-press-escape>
<wakes-home-review ref="wakesHomeReview"></wakes-home-review>
</el-dialog>
<el-dialog :title="gradingTitle" :visible.sync="gradingDialog" width="40%" :close-on-press-escape="false">
<el-form :model="gradingData" ref="gradingForm" :rules="gradingRules" label-width="120px">
<el-form-item prop="zbName" label="评测名称">
<el-input readonly v-model="gradingData.zbName"></el-input>
</el-form-item>
<el-form-item prop="unionName" label="定级分工会">
<el-input readonly v-model="gradingData.unionName"></el-input>
</el-form-item>
<el-form-item prop="gradingName" label="定级结果">
<dict-select v-model="gradingData.gradingName" style="width: 100%" clearable
placeholder="请选择定级结果" code="GRADING_TYPE"></dict-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="gradingDialog = false">取 消</el-button>
<el-button type="primary" @click="doGrading">确 定</el-button>
</span>
</el-dialog>
</div>
@@ -216,6 +250,8 @@ layout("/layouts/platform.html"){
tableColumns: [
{prop: 'unionName', label: '分工会名称'},
{prop: 'num', label: '测评人数'},
{prop: 'isGrading', label: '是否定级'},
{prop: 'gradingName', label: '定级结果'},
],
tableData: [],
userTableData: [],
@@ -235,13 +271,53 @@ layout("/layouts/platform.html"){
pageOrderName: "",
pageOrderBy: ""
},
reviewResultData: {}
reviewResultData: {},
gradingDialog: false,
gradingTitle: '',
gradingData: {
unionName: '',
unionId: '',
zbId: '',
zbName: '',
},
gradingRules: {
gradingName: [ {required: true, message: '请选择定级结果', trigger: 'blur'} ]
}
}
},
components: {
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=' + moment(new Date()).unix()),
},
methods: {
editGrading(row) {
this.gradingData = {...row}
this.$set(this.gradingData, 'zbId', this.pageForm.zbId)
this.$set(this.gradingData, 'zbName', this.zbList.find(v => v.id === this.pageForm.zbId).assessment)
this.gradingDialog = true
},
doGrading() {
this.$refs['gradingForm'].validate(async (valid) => {
if (valid) {
const resp = await $.post(loc() + '/doGrading', this.gradingData)
if (resp.code === 0) {
this.gradingDialog = false
this.pageData()
this.$message.success(resp.msg)
} else {
this.$message.warning(resp.msg)
}
}
})
},
openGrading(row) {
this.$set(this.gradingData, 'unionId', row.id)
this.$set(this.gradingData, 'unionName', row.unionName)
this.$set(this.gradingData, 'zbId', this.pageForm.zbId)
this.$set(this.gradingData, 'zbName', this.zbList.find(v => v.id === this.pageForm.zbId).assessment)
this.gradingDialog = true
},
doDownLoad(row, flag) {
if (flag) {
// 为true,自我评议
@@ -271,9 +271,86 @@ layout("/layouts/platform.html"){
</div>
</transition>
<transition name="el-zoom-in-bottom">
<div class="transition-box" style="margin-top: 20px;"
v-show="stepActive==1">
<div class="pull-right offscreen-right mt5">
<div class="transition-box" style="margin-top: 20px;" v-show="stepActive==1">
<vi-title2 title="分段设置">
<template #func>
<el-button size="small" type="primary" @click="unionLimitQuickSetting">
应用分段设置
</el-button>
</template>
</vi-title2>
<el-row v-for="(item,index) in unionUserNumCalc" :gutter="20" class="mb5">
<el-col :span="7">
<el-input-number v-model="item.startNum" :precision="0" :step="1" :min="1"
placeholder="请输入最小人数"
style="width: 100%"></el-input-number>
</el-col>
<el-col :span="7">
<el-input-number v-model="item.endNum" :precision="0" :step="1" :min="1"
placeholder="请输入最大人数"
style="width: 100%"></el-input-number>
</el-col>
<el-col :span="6">
<el-input-number v-model="item.resultNum" :precision="0" :step="1" :min="1"
placeholder="请输入限制人数"
style="width: 100%"></el-input-number>
</el-col>
<el-col :span="4" class="text-right">
<el-button icon="el-icon-plus"
@click="unionUserNumCalc.push({})"></el-button>
<el-button icon="el-icon-minus" @click="unionUserNumCalc.splice(index,1)"
:disabled="unionUserNumCalc.length===1"></el-button>
</el-col>
</el-row>
<el-row class="mt10">
<div v-for="(item,index) in unionUserNumCalcTips" class="text-danger">
<span class="mr10">({{index+1}}).</span> {{item}}
</div>
</el-row>
<vi-title2 title="比例设置" class="mt20">
<template #func>
一键比例:
<el-input-number v-model="unionUserNumOneKeyRatio" :precision="0" :step="1"
:min="0"
placeholder="请输入一键比例"
size="small"
:max="100"></el-input-number>
<el-button size="small" type="primary" @click="applyScaleSettings"
class="ml5">应用比例设置
</el-button>
</template>
</vi-title2>
<el-table :data="unionUserNumberLimit" max-height="500px">
<el-table-column prop="unionname" label="分工会"></el-table-column>
<el-table-column prop="teacherCount" label="人数"></el-table-column>
<el-table-column prop="ratio" label="比例(%)">
<template scope="{row}">
<el-input-number v-model="row.ratio" :precision="0" :step="1" :min="0"
:max="100"></el-input-number>
</template>
</el-table-column>
<el-table-column prop="limitNum" label="限制人数">
<template scope="{row}">
<el-input-number v-model="row.limitNum" :precision="0" :step="1"
:min="0"
:max="row.teacherCount"
@change="calSummaryCount"></el-input-number>
</template>
</el-table-column>
</el-table>
<el-row class="mt20" justify="end" type="flex">
<div class="text-danger"
style="width: 100%;font-size: 18px;display: flex;align-items: center;font-weight: bold">
限制总人数:{{summaryCount}}人
</div>
<el-button @click="clearUnionLimit" type="danger">清空分工会人数限制</el-button>
<!--<el-button @click="setUpUnionLimitDialog=false">取消</el-button>-->
<!--<el-button @click="doConfirmSetUpUnionLimit" type="primary">确定</el-button>-->
</el-row>
<!--<div class="pull-right offscreen-right mt5">
<span style="color:#409EFF">沿用之前活动名额&nbsp;&nbsp;</span>
<el-select @change="mefpChange" class="d-select" clearable
filterable
@@ -313,7 +390,7 @@ layout("/layouts/platform.html"){
v-model="scope.row.number"></el-input-number>
</template>
</el-table-column>
</el-table>
</el-table>-->
<div style="float: right;margin: 20px 0">
<el-button @click="stepActive=0">上一步</el-button>
@@ -416,59 +493,93 @@ layout("/layouts/platform.html"){
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" @click="doEdit()"
type="primary">修 改
type="primary">修改基础数据
</el-button>
</div>
</el-tab-pane>
<el-tab-pane label="名额分配" name="2">
<el-form label-width="120px">
<vi-title title="修改名额分配"></vi-title>
<div class="pull-right offscreen-right mt5">
<span style="color:#409EFF">沿用之前活动名额&nbsp;&nbsp;</span>
<el-select @change="mefpChange" class="d-select"
clearable filterable
placeholder="请选择活动"
v-model="pastQuota" width="300px">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in lxyHd">
</el-option>
</el-select>
<vi-title2 title="分段设置">
<template #func>
<el-button size="small" type="primary" @click="unionLimitQuickSetting">
应用分段设置
</el-button>
</template>
</vi-title2>
<el-row v-for="(item,index) in unionUserNumCalc" :gutter="20" class="mb5">
<el-col :span="7">
<el-input-number v-model="item.startNum" :precision="0" :step="1" :min="1"
placeholder="请输入最小人数"
style="width: 100%"></el-input-number>
</el-col>
<el-col :span="7">
<el-input-number v-model="item.endNum" :precision="0" :step="1" :min="1"
placeholder="请输入最大人数"
style="width: 100%"></el-input-number>
</el-col>
<el-col :span="6">
<el-input-number v-model="item.resultNum" :precision="0" :step="1" :min="1"
placeholder="请输入限制人数"
style="width: 100%"></el-input-number>
</el-col>
<el-col :span="4" class="text-right">
<el-button icon="el-icon-plus"
@click="unionUserNumCalc.push({})"></el-button>
<el-button icon="el-icon-minus" @click="unionUserNumCalc.splice(index,1)"
:disabled="unionUserNumCalc.length===1"></el-button>
</el-col>
</el-row>
<el-row class="mt10">
<div v-for="(item,index) in unionUserNumCalcTips" class="text-danger">
<span class="mr10">({{index+1}}).</span> {{item}}
</div>
</el-form>
<el-table :data="unions_" height="70vh" size="medium">
<el-table-column align="center" header-align="center"
label="序号"
type="index"></el-table-column>
</el-row>
<el-table-column label="分工会" prop="unionname" sortable>
<vi-title2 title="比例设置" class="mt20">
<template #func>
一键比例:
<el-input-number v-model="unionUserNumOneKeyRatio" :precision="0" :step="1"
:min="0"
placeholder="请输入一键比例"
size="small"
:max="100"></el-input-number>
<el-button size="small" type="primary" @click="applyScaleSettings"
class="ml5">应用比例设置
</el-button>
</template>
</vi-title2>
<el-table :data="unionUserNumberLimit" max-height="500px">
<el-table-column prop="unionname" label="分工会"></el-table-column>
<el-table-column prop="teacherCount" label="人数"></el-table-column>
<el-table-column prop="ratio" label="比例(%)">
<template scope="{row}">
{{isDisPlayCode?'('+row.unioncode+')':null}}{{row.unionname}}
<el-input-number v-model="row.ratio" :precision="0" :step="1" :min="0"
:max="100"></el-input-number>
</template>
</el-table-column>
<el-table-column label="会员人数" prop="membercount"
sortable></el-table-column>
<el-table-column align="center" header-align="center"
label="名额" prop="number"
width="200px">
<template scope="scope">
<el-input-number :max="1000"
<el-table-column prop="limitNum" label="限制人数">
<template scope="{row}">
<el-input-number v-model="row.limitNum" :precision="0" :step="1"
:min="0"
controls-position="right"
placeholder="请填写名额数"
v-model="scope.row.number"></el-input-number>
:max="row.teacherCount"
@change="calSummaryCount"></el-input-number>
</template>
</el-table-column>
</el-table>
<el-row class="mt20" justify="end" type="flex">
<div class="text-danger"
style="width: 100%;font-size: 18px;display: flex;align-items: center;font-weight: bold">
限制总人数:{{summaryCount}}人
</div>
<el-button @click="clearUnionLimit" type="danger">清空分工会人数限制</el-button>
<!--<el-button @click="setUpUnionLimitDialog=false">取消</el-button>-->
<!--<el-button @click="doConfirmSetUpUnionLimit" type="primary">确定</el-button>-->
</el-row>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" @click="doEditMefp"
type="primary">提 交
type="primary">修改名额分配
</el-button>
</div>
</el-tab-pane>
@@ -501,6 +612,10 @@ layout("/layouts/platform.html"){
}
};
return {
summaryCount: 0,
unionUserNumCalc: [{}],
unionUserNumOneKeyRatio: null,
unionUserNumberLimit: [],
pastQuota: "",
tabs_active: '1',
unions: [],
@@ -541,7 +656,7 @@ layout("/layouts/platform.html"){
}
},
methods: {
mefpChange() {
/*mefpChange() {
if (this.pastQuota === '') {
this.unions_ = this.unions.map(v => {
const o = {
@@ -558,7 +673,7 @@ layout("/layouts/platform.html"){
$.post(base + "/platform/zgfw/lxy/hd/getPastQuota", {pastQuota: this.pastQuota}, res => {
this.unions_ = res.data
})
},
},*/
doEditMefp() {
const loading = this.$loading({
lock: true,
@@ -567,7 +682,10 @@ layout("/layouts/platform.html"){
background: 'rgba(0, 0, 0, 0.7)'
});
$.post(base + "/platform/zgfw/lxy/hd/doEditMefp", {mefp: JSON.stringify(this.unions_)}, (data) => {
$.post(base + "/platform/zgfw/lxy/hd/doEditMefp", {
mefp: JSON.stringify(this.unionUserNumberLimit),
hdId: this.id
}, (data) => {
loading.close()
if (data.code == 0) {
this.v = 'index'
@@ -703,7 +821,8 @@ layout("/layouts/platform.html"){
}
});
},
openEdit(id) {
async openEdit(id) {
this.id = id
this.pastQuota = ""
this.fileList = []
this.delFiles = []
@@ -754,6 +873,20 @@ layout("/layouts/platform.html"){
this.loading = false
}, "json");
this.unionUserNumberLimit = []
this.unionUserNumOneKeyRatio = null
this.unionUserNumCalc = [{}]
// this.summaryCount = 0
await this.getLimitUnionData()
this.unionUserNumberLimit.forEach(v=>{
v.limitNum = this.unions_.find(item=>item.ghid===v.id).number
})
this.summaryCount = this.unionUserNumberLimit.reduce((accumulator, currentObject) => {
return accumulator + currentObject.limitNum;
}, 0);
},
doDelete(id) {
this.$confirm('确定要删除吗?', '提示', {
@@ -798,7 +931,7 @@ layout("/layouts/platform.html"){
formdata.append("files", val.raw, val.raw.name);
});
//const unions_ = this.unions_.filter(v => v.number)
formdata.append('mefp', JSON.stringify(this.unions_))
formdata.append('mefp', JSON.stringify(this.unionUserNumberLimit))
this.subDis = true
const loading = this.$loading({
@@ -872,6 +1005,11 @@ layout("/layouts/platform.html"){
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
this.unionUserNumberLimit = []
this.unionUserNumOneKeyRatio = null
this.unionUserNumCalc = [{}]
this.summaryCount = 0
this.getLimitUnionData()
},
doSearch() {
this.tabKey = new Date().getTime()
@@ -908,6 +1046,70 @@ layout("/layouts/platform.html"){
}
}, "json");
},
applyScaleSettings() {
this.unionUserNumberLimit.forEach(v => {
v.limitNum = parseFloat((v.teacherCount * this.unionUserNumOneKeyRatio / 100).toFixed(0))
if (v.ratio) {
v.limitNum = parseFloat((v.teacherCount * v.ratio / 100).toFixed(0))
}
})
this.calSummaryCount()
},
calSummaryCount() {
const array = this.unionUserNumberLimit
if (array) {
this.summaryCount = array.reduce((prev, curr) => {
const value = Number(curr.limitNum);
if (!isNaN(value)) {
return prev + curr.limitNum;
} else {
return prev;
}
}, 0)
}
},
unionLimitQuickSetting() {
this.unionUserNumCalc.forEach((v, i) => {
const startNum = v.startNum
const endNum = v.endNum
const resultNum = v.resultNum
if (startNum > endNum) {
this.$message.warning('第' + (i + 1) + '行设置错误')
} else {
this.unionUserNumberLimit.forEach(x => {
if (x.teacherCount >= startNum && x.teacherCount <= endNum) {
x.limitNum = resultNum
}
})
this.calSummaryCount()
}
})
},
async clearUnionLimit(){
const confirm = await this.$confirm('确定要清空分工会人数限制吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' === confirm) {
this.unionUserNumberLimit = []
this.unionUserNumOneKeyRatio = null
this.unionUserNumCalc = [{}]
this.summaryCount = 0
await this.getLimitUnionData()
}
},
async getLimitUnionData() {
const resp = await $.get('/platform/trainSingUp/manage/activity/getUnionLimit')
this.unionUserNumberLimit = resp.data
}
},
computed: {
unionUserNumCalcTips() {
return this.unionUserNumCalc.map(v => {
return (v.startNum ? v.startNum : '?') + '-' + (v.endNum ? v.endNum : '?') + '人的分工会,限报' + (v.resultNum ? v.resultNum : '?') + '人'
})
},
},
async created() {
const unions_resp = await $.get(loc() + '/getUnions')
@@ -470,45 +470,44 @@ display: -webkit-box;
async yjTg() {
if (this.multipleSelectionGh.length == 0) {
this.$message({
message: '请选择工会!',
message: '请勾选审核列表的分工会!',
type: 'warning'
});
return
}
const confirm = await this.$confirm('确定要给报名人员发送消息吗', '提示', {
const confirm = await this.$confirm('确定要一键审核勾选的分工会吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
}
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let arr = []
this.multipleSelectionGh.map(v => {
arr.push({ghid: v.ghid, hdid: v.hdid})
})
const data = await $.post(base + "/platform/zgfw/lxy/xghsh/yjSh", {maps: JSON.stringify(arr)})
if (data.code == 0) {
this.$message({
message: '提交成功',
type: 'success'
});
this.toggleSelectionGh()
this.openShGh({id: this.pageForm.hdid});
} else {
this.$message({
message: data.msg,
type: 'error'
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let arr = []
this.multipleSelectionGh.map(v => {
arr.push({ghid: v.ghid, hdid: v.hdid})
})
const data = await $.post(base + "/platform/zgfw/lxy/xghsh/yjSh", {maps: JSON.stringify(arr)})
if (data.code === 0) {
this.$message({
message: '提交成功',
type: 'success'
});
this.toggleSelectionGh()
this.openShGh({id: this.pageForm.hdid});
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
loading.close()
}
loading.close()
},
sh(zt) {
if (this.multipleSelection.length == 0) {