Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -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,8 +257,8 @@ 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; // 标准分
|
||||
@@ -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
|
||||
}
|
||||
@@ -291,9 +307,9 @@ layout("/mobile/platform.html"){
|
||||
if (resp.code === 0) {
|
||||
await this.getCommentById();
|
||||
vant.Toast.success('操作成功')
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
window.location.href = '/mobile/wakeshome/review/appraisal/mine'
|
||||
},500)
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">沿用之前活动名额 </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">沿用之前活动名额 </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) {
|
||||
|
||||
Reference in New Issue
Block a user