first commit
This commit is contained in:
@@ -0,0 +1,471 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
overflow-y: unset !important;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
height: calc(100vh - 100px) !important;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">评议名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.assessment" placeholder="根据测评名称查询"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="项目列表" :app="this">
|
||||
<template #func>
|
||||
<!--<el-button type="primary" size="small">添加信息</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="年度" prop="annual" header-align="center" width="300px"
|
||||
sortable align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核名称" prop="assessment" header-align="center"
|
||||
show-overflow-tooltipalign="center"></el-table-column>
|
||||
|
||||
<el-table-column label="评测模式" prop="assessmentMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.assessmentMode===1?'工会评家':'主席/副主席评家'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打分模式" prop="scoringMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.scoringMode===1?'评分模式':'选择模式'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="250px">
|
||||
<template scope="scope">
|
||||
<el-button size="mini" type="primary" @click="openView(scope.row.id)">
|
||||
查看
|
||||
</el-button>
|
||||
<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>
|
||||
<template v-else>
|
||||
<el-button size="mini" type="primary" @click="openReview(scope.row)">评议结果</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" style="float: right;margin-top: 5px;margin-left: 10px;"
|
||||
@click="doSubmit()">提交
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" plain style="float: right;margin-top: 5px" @click="doSaveOrSubmit('save')">保存</el-button>-->
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" ref="form" label-width="100px"
|
||||
style="height: calc(100vh - 50px);overflow-y: scroll;padding: 10px 15px">
|
||||
|
||||
<template v-if="formData.assessmentMode==2">
|
||||
<vi-title title="评议对象选择"></vi-title>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="president" label-width="0px">
|
||||
<el-select v-model="formData.president" placeholder="请选择主席/副主席进行评议"
|
||||
style="width: 100%">
|
||||
<el-option v-for="o in userList" :key="o.id" :label="o.presidents" :value="o.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="margin: 8px 10px">
|
||||
<span style="color: #ac2925">如已完成该对象的评议,请您手动更换评议对象</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
|
||||
<vi-title title="评议内容"></vi-title>
|
||||
|
||||
<el-form-item label="" label-width="0" v-for="o,idx in formData.nrs" :key="o.id">
|
||||
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="o.content" readonly maxlength="30" style="width: 50%">
|
||||
<template slot="prepend"><span>{{ idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="o.bzs" style="width: 100%" border :show-summary = "formData.scoringMode !== 2 ? 'always' : false">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="100px">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="主要评比内容" disabled prop="inspection" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.inspection"
|
||||
readonly type="textarea" rows="2"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<template v-if="formData.scoringMode===1">
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center"
|
||||
width="250px">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.score" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评议分" prop="resultScore" header-align="center"
|
||||
align="center" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.resultScore" maxlength="4" @blur="changeScore(row)"
|
||||
placeholder="请填写评议分"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.scoringMode===2">
|
||||
<el-table-column label="满意度" prop="resultScore" header-align="center"
|
||||
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-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div v-if="formData.scoringMode===1">
|
||||
<el-divider content-position="left">简述工作情况</el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
|
||||
v-model="o.remark" placeholder="请简述工作情况"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="formData.scoringMode===2">
|
||||
<vi-title title="简述工作情况"></vi-title>
|
||||
<el-form-item prop="options" label-width="0px">
|
||||
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
|
||||
v-model="presidentOpinions" placeholder="请简述工作情况"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.reviewMode===1 && formData.scoringMode===1">
|
||||
<vi-title title="职工评家总结"></vi-title>
|
||||
<el-form-item prop="files" label-width="0px">
|
||||
<file-upload :files.sync="formData.files" card :max="3"
|
||||
:type="['doc','docx','xls','xlsx','pdf', 'jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式,最多上传3个文件
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
||||
</template>
|
||||
|
||||
|
||||
<template #public>
|
||||
<wakes-home-review ref="wakesHomeReview"></wakes-home-review>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tabLoading: false,
|
||||
loading: true,
|
||||
activeName: '1',
|
||||
tableData: [],
|
||||
formData: {},
|
||||
viewData: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
id:'',
|
||||
presidentOpinions: '',
|
||||
isShowSubmit: true,
|
||||
isReadOnly: true,
|
||||
userList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async openReview(row){
|
||||
const resp = await $.get(loc() + "/getPeoId",{id:row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.public()
|
||||
this.$refs.wakesHomeReview.findOne(resp.data)
|
||||
}
|
||||
},
|
||||
changeScore(row) {
|
||||
if (Number(row.score) < Number(row.resultScore)) {
|
||||
row.resultScore = null;
|
||||
this.$message.warning('评议分不能超过标准分');
|
||||
}
|
||||
},
|
||||
async doReview(o) {
|
||||
//自评模式
|
||||
if (o.reviewMode == 1 && !o.canJoin) {
|
||||
this.$message.warning('您不在自评人员范围中');
|
||||
return
|
||||
}
|
||||
|
||||
const isExist = await getScopeUser(o.activityGroupId)
|
||||
if ((o.commentTarget == 1 && !isExist) || (o.commentTarget == 3 && !o.canJoin)) {
|
||||
this.$message.warning('您不在自评人员范围中');
|
||||
return
|
||||
}
|
||||
|
||||
const res = await $.get('/mobile/wakeshome/review/appraisal/isAssess',{id:o.id})
|
||||
if (res.data > 0){
|
||||
this.$message.warning('您已经填写过该评议,请点击评议结果可查看评议详情')
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getById', {id: o.id})
|
||||
if (resp.code === 0) {
|
||||
this.id = o.id
|
||||
this.formData = resp.data
|
||||
if (this.formData.assessmentMode === 2) {
|
||||
this.formData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
o.resultScore = '满意'
|
||||
})
|
||||
})
|
||||
await this.getPresidents()
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
},
|
||||
async getPresidents() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/getPresidents')
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
}
|
||||
if (this.userList && this.userList.length > 0) {
|
||||
this.president = this.userList[0].id
|
||||
await this.presidentChange();
|
||||
}
|
||||
},
|
||||
async presidentChange() {
|
||||
const resp = await $.get('/mobile/wakeshome/review/appraisal/isAssess', {
|
||||
id: this.id,
|
||||
evaluatedPersonId: this.president,
|
||||
})
|
||||
if (resp.data > 0) {
|
||||
this.$message.warning('您已经评测过该主席(副主席),请在点击评议结果可查看评议信息,或更换主席(副主席)进行测评')
|
||||
this.isShowSubmit = true;
|
||||
this.isReadOnly = true
|
||||
}
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.loading = true;
|
||||
const {code, data, msg} = await $.get('/platform/wakeshome/review/khzb/edit', {id})
|
||||
if (code === 0) {
|
||||
this.viewData = data
|
||||
this.viewData.applyTime = [this.viewData.startTime,this.viewData.endTime]
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
async assignment(){
|
||||
const self = this;
|
||||
const bzList = [];
|
||||
this.formData.nrs.forEach(v => {
|
||||
v.bzs.forEach(o => {
|
||||
if (self.formData.assessmentMode === 1 && v.remark){
|
||||
o.options = v.remark
|
||||
}
|
||||
bzList.push(o)
|
||||
})
|
||||
})
|
||||
this.formData.bzList = bzList
|
||||
this.formData.id = this.id
|
||||
this.formData.president = this.president
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
},
|
||||
async doSubmit(){
|
||||
const validate = await this.$refs.form.validate()
|
||||
if (!validate) {
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('确定要提交该测评结果吗?提交后不可修改,请仔细检查后提交', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
await this.assignment()
|
||||
if (!this.formData.reviewResult) {
|
||||
await this.createdReviewResult()
|
||||
}
|
||||
this.formData.bzList = JSON.stringify(this.formData.bzList)
|
||||
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit',this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('提交成功')
|
||||
this.$refs.guava.index()
|
||||
this.formData = {}
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async createdReviewResult(){
|
||||
if (this.formData.assessmentMode === 1) {
|
||||
let source = 0; // 标准分
|
||||
let resultScore = 0; // 评议分
|
||||
this.formData.bzList.forEach(v => {
|
||||
source += Number(v.score)
|
||||
resultScore += Number(v.resultScore)
|
||||
})
|
||||
const result = (resultScore / source) * 100
|
||||
|
||||
if (result > 95) {
|
||||
this.formData.reviewResult = '非常满意'
|
||||
} else if (result > 80 && result <= 94) {
|
||||
this.formData.reviewResult = '满意'
|
||||
} else if (result > 60 && result <= 79) {
|
||||
this.formData.reviewResult = '良好'
|
||||
} else {
|
||||
this.formData.reviewResult = '一般'
|
||||
}
|
||||
/*if (result >= 80) {
|
||||
this.formData.reviewResult = '满意'
|
||||
} else if (result >= 60 && result <= 79) {
|
||||
this.formData.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.formData.reviewResult = '不满意'
|
||||
}*/
|
||||
} else if (this.formData.assessmentMode === 2) {
|
||||
const result = this.formData.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
||||
const satisfactionPercentage = (result.length / this.formData.bzList.length) * 100;
|
||||
|
||||
if (satisfactionPercentage > 95) {
|
||||
this.formData.reviewResult = '非常满意'
|
||||
} else if (satisfactionPercentage > 80 && satisfactionPercentage <= 94) {
|
||||
this.formData.reviewResult = '满意'
|
||||
} else if (satisfactionPercentage > 60 && satisfactionPercentage <= 79) {
|
||||
this.formData.reviewResult = '良好'
|
||||
} else {
|
||||
this.formData.reviewResult = '一般'
|
||||
}
|
||||
/*if (satisfactionPercentage >= 80) {
|
||||
this.formData.reviewResult = '满意'
|
||||
} else if (satisfactionPercentage >= 60 && satisfactionPercentage <= 79) {
|
||||
this.formData.reviewResult = '基本满意'
|
||||
} else {
|
||||
this.formData.reviewResult = '不满意'
|
||||
}*/
|
||||
const user = this.userList.find(v=> v.id === this.president)
|
||||
this.formData.evaluatedPersonName = user.username
|
||||
this.formData.evaluatedPersonType = user.evaluatedPersonType
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,212 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
overflow-y: unset !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input v-model="pageForm.assessment" placeholder="根据测评名称查询"></el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="年度" prop="annual" header-align="center" width="300px"
|
||||
sortable align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核名称" prop="assessment" header-align="center"
|
||||
show-overflow-tooltipalign="center"></el-table-column>
|
||||
|
||||
<el-table-column label="评测模式" prop="assessmentMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.assessmentMode===1?'工会评家':'主席/副主席评家'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打分模式" prop="scoringMode" header-align="center"
|
||||
show-overflow-tooltipalign="center">
|
||||
<template scope="{row}">
|
||||
{{row.scoringMode===1?'评分模式':'选择模式'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="250px">
|
||||
<template scope="scope">
|
||||
<el-button size="mini" type="primary" @click="openView(scope.row.id)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="openEdit(scope.row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" @click="doDelete(scope.row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
<template #edit_func>
|
||||
<el-button type="primary" style="float: right;margin-top: 5px"
|
||||
@click="doEdit()">提交
|
||||
</el-button>
|
||||
</template>
|
||||
<template #edit>
|
||||
<union-comment-zb :data="formData" @change="v=>{this.formData=v}"></union-comment-zb>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<union-comment-zb :data="viewData" :is_view="true"></union-comment-zb>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tabLoading: false,
|
||||
loading: true,
|
||||
activeName: '1',
|
||||
tableData: [],
|
||||
formData: {
|
||||
applyTime: []
|
||||
},
|
||||
viewData: {
|
||||
nrs: [{
|
||||
bzs: [{}]
|
||||
}],
|
||||
},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async openEdit(id) {
|
||||
const {code, data, msg} = await $.get(loc() + '/edit', {id})
|
||||
if (code === 0) {
|
||||
this.formData = data
|
||||
if (data.startTime && data.endTime) {
|
||||
this.$set(this.formData, 'applyTime', [data.startTime, data.endTime])
|
||||
// this.formData.applyTime = [this.formData.startTime, this.formData.endTime]
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
},
|
||||
doEdit() {
|
||||
if (this.formData.applyTime && this.formData.applyTime.length > 0) {
|
||||
this.formData.startTime = this.formData.applyTime[0]
|
||||
this.formData.endTime = this.formData.applyTime[1]
|
||||
}
|
||||
$.post(loc() + "/doEdit", {kh_zb: JSON.stringify(this.formData)}, (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code == 0) {
|
||||
this.$message({
|
||||
message: msg,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
this.$refs.guava.index()
|
||||
this.pageData()
|
||||
},
|
||||
)
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('您确定要删除吗!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
$.post(loc() + "/delete", {id: id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.loading = true;
|
||||
const {code, data, msg} = await $.get(loc() + '/edit', {id})
|
||||
if (code === 0) {
|
||||
this.viewData = data
|
||||
if (data.startTime && data.endTime) {
|
||||
this.$set(this.viewData, 'applyTime', [data.startTime, data.endTime])
|
||||
// this.formData.applyTime = [this.formData.startTime, this.formData.endTime]
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,436 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
@change="getZbList"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.annual"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">评测名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.zbId" placeholder="请选择评测名称" filterable
|
||||
clearable
|
||||
@change="doSearch();zbData = zbList.find(v => v.id === pageForm.zbId)"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in zbList"
|
||||
:key="item.id"
|
||||
:label="item.annual+item.assessment"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
||||
@change="doSearch"
|
||||
filterable>
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="工会列表" :app="this">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
:size="tableSize"
|
||||
v-loading="tableLoading" ref="table" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
: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="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">
|
||||
<el-button v-if="canDownload && row.num > 0" size="mini" type="primary"
|
||||
@click="doDownLoad(row,canDownload)">导出
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-button size="mini" type="primary" @click="downloadFilesByUnion(row)">导出附件</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工号/姓名:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入工号/姓名" v-model="userPageForm.searchKeyword">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item" style="width: 480px !important;">
|
||||
<div class="search-item-option">
|
||||
<el-radio-group v-model="userPageForm.reviewResult"
|
||||
@change="doUserSearch">
|
||||
<el-radio-button label="">
|
||||
全部
|
||||
<span class="ml2">
|
||||
{{reviewResultData.fcmy + reviewResultData.my + reviewResultData.lh + reviewResultData.yb}}
|
||||
</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="非常满意">非常满意
|
||||
<span class="ml2">{{reviewResultData.fcmy || 0}}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="满意">满意
|
||||
<span class="ml2">{{reviewResultData.my || 0}}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="良好">良好
|
||||
<span class="ml2">{{reviewResultData.lh || 0}}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="一般">一般
|
||||
<span class="ml2">{{reviewResultData.yb || 0}}</span>
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doUserSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="userTableData" style="width: 100%" row-key="id"
|
||||
:size="tableSize" v-loading="tableLoading" ref="table" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号" width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in userTableColumns"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:label="column.label"
|
||||
:prop="column.prop" :width="column.width" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="evaluatedPersonName" align="center" show-overflow-tooltip
|
||||
label="被测评人" v-if="zbData.assessmentMode==2"></el-table-column>
|
||||
<el-table-column prop="presidentOpinions" align="center" show-overflow-tooltip
|
||||
label="意见建议" v-if="zbData.assessmentMode==2"></el-table-column>
|
||||
<el-table-column prop="reviewTime" align="center"
|
||||
label="测评时间"></el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="240px" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" @click="openUserView(row)">查看</el-button>
|
||||
<el-button v-if="canDownload" size="mini" type="primary" @click="downloadByPeoId(row)">导出</el-button>
|
||||
<el-button v-if="canDownload" size="mini" type="primary" @click="downloadFilesByPeoId(row)">导出附件</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userPageForm.pageNumber"
|
||||
:page-sizes="[5,10, 20, 30, 50]"
|
||||
:page-size="userPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="userPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
userDrawer: false,
|
||||
zbData: {},
|
||||
zpxx: {
|
||||
commentPeo: {},
|
||||
zbxx: []
|
||||
},
|
||||
unions: [],
|
||||
zbList: [],
|
||||
pageForm: {
|
||||
annual: new Date().getFullYear() + ''
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '分工会名称'},
|
||||
{prop: 'num', label: '测评人数'},
|
||||
{prop: 'isGrading', label: '是否定级'},
|
||||
{prop: 'gradingName', label: '定级结果'},
|
||||
],
|
||||
tableData: [],
|
||||
userTableData: [],
|
||||
userTableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位'},
|
||||
{prop: 'reviewResult', label: '测评结果'},
|
||||
],
|
||||
userPageForm: {
|
||||
reviewResult: "",
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
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,自我评议
|
||||
window.open(loc() + '/doDownLoadSingleByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||
} else {
|
||||
// false, 会员评议,导出压缩包
|
||||
window.open(loc() + '/doDownLoadZipByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||
}
|
||||
},
|
||||
async downloadFilesByUnion(row) {
|
||||
const result = await this.validateHasFiles({unionId: row.id, zbId: this.pageForm.zbId})
|
||||
if (result) {
|
||||
window.open(loc() + '/exportFilesByUnionId?zbId=' + this.pageForm.zbId + '&unionId=' + row.id)
|
||||
}
|
||||
},
|
||||
downloadByPeoId(row) {
|
||||
window.open(loc() + '/exportByPeoId?peoId=' + row.id)
|
||||
},
|
||||
async downloadFilesByPeoId(row) {
|
||||
const result = await this.validateHasFiles({peoId: row.id})
|
||||
if (result) {
|
||||
window.open(loc() + '/exportFilesByPeoId?peoId=' + row.id)
|
||||
}
|
||||
},
|
||||
async validateHasFiles(data) {
|
||||
const res = await $.post('/platform/wakeshome/review/statistics/validateHasFiles', {
|
||||
peoId: data.peoId ? data.peoId : '',
|
||||
zbId: data.zbId ? data.zbId : '',
|
||||
unionId: data.unionId ? data.unionId : ''
|
||||
})
|
||||
if (res.code === 0) {
|
||||
return true
|
||||
} else {
|
||||
this.$message.warning("未上传附件,无法导出")
|
||||
return false
|
||||
}
|
||||
},
|
||||
async getReviewResultNum(row) {
|
||||
const res = await $.post(loc() + "/getReviewResultNum", {
|
||||
zbId: this.userPageForm.zbId,
|
||||
unionId: row.id
|
||||
})
|
||||
this.reviewResultData = res.data
|
||||
},
|
||||
async openUserView(row) {
|
||||
this.userDrawer = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.wakesHomeReview.findOne(row.id)
|
||||
})
|
||||
},
|
||||
doUserSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.userPageForm.pageNumber = 1
|
||||
this.userPageData()
|
||||
},
|
||||
userPageNumberChange(val) {
|
||||
this.userPageForm.pageNumber = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageSizeChange(val) {
|
||||
this.userPageForm.pageSize = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post(loc() + "/getUserPeoByZbIdOrUnionId", this.userPageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.userTableData = data.data.list;
|
||||
this.userPageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async openView(row) {
|
||||
this.userPageForm.searchKeyword = ''
|
||||
this.userPageForm.unionId = row.id
|
||||
this.userPageForm.zbId = this.pageForm.zbId
|
||||
this.userPageData()
|
||||
await this.getReviewResultNum(row)
|
||||
this.$refs.guava.view()
|
||||
|
||||
},
|
||||
async getZbList() {
|
||||
const res = await $.get("/platform/wakeshome/review/Xjkhzb/getZbList", {year: this.pageForm.annual})
|
||||
this.zbList = res.data
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "zbId", res.data[0].id)
|
||||
|
||||
} else {
|
||||
this.$set(this.pageForm, "zbId", null)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
canDownload() {
|
||||
const data = this.zbList.find(v => v.id === this.pageForm.zbId)
|
||||
return data.scoringMode == 1
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getZbList()
|
||||
this.unions = await getUnions(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.el-card__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<div>
|
||||
<h3 style="color: #1867b0">新建考核指标</h3>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="doAdd()">
|
||||
提交
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template>
|
||||
<union-comment-zb ref="unionZb" :data="formData" @change="v=>{this.formData=v}"></union-comment-zb>
|
||||
</template>
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
v: 'index',
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
async doAdd() {
|
||||
const {
|
||||
annual,
|
||||
assessment,
|
||||
assessmentMode,
|
||||
scoringMode,
|
||||
commentTarget,
|
||||
activityGroupId
|
||||
} = this.formData
|
||||
let flag = true
|
||||
if (!annual) {
|
||||
this.$message.warning("年度不能为空")
|
||||
return
|
||||
}
|
||||
if (!assessment) {
|
||||
this.$message.warning("测评名称不能为空")
|
||||
return
|
||||
}
|
||||
if (!scoringMode) {
|
||||
this.$message.warning("打分模式不能为空")
|
||||
return
|
||||
}
|
||||
if (!assessmentMode) {
|
||||
this.$message.warning("评测模式不能为空")
|
||||
return
|
||||
}
|
||||
if (!commentTarget) {
|
||||
this.$message.warning("测评对象不能为空")
|
||||
return
|
||||
}
|
||||
if (commentTarget == 1 && !activityGroupId) {
|
||||
this.$message.warning("发送人员范围不能为空")
|
||||
return
|
||||
}
|
||||
this.formData.nrs.forEach(nr => {
|
||||
nr.bzs.forEach(bz => {
|
||||
if (!nr.content) {
|
||||
this.$message.error("测评内容不能为空")
|
||||
flag = false;
|
||||
throw Error()
|
||||
} else if (!bz.inspection) {
|
||||
this.$message.error("测评标准不能为空")
|
||||
flag = false;
|
||||
throw Error()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
if (!(this.formData.applyTime && this.formData.applyTime.length > 0)) {
|
||||
this.$message.warning('评议时间不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.commentTarget == 3 && !(this.formData.unionIds && this.formData.unionIds.length > 0)) {
|
||||
this.$message.warning('请选择评议分工会')
|
||||
return
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
if (this.formData.applyTime && this.formData.applyTime.length > 0) {
|
||||
this.formData.startTime = this.formData.applyTime[0]
|
||||
this.formData.endTime = this.formData.applyTime[1]
|
||||
}
|
||||
|
||||
const res = await $.post(loc() + "/doAdd", {kh_zb: JSON.stringify(this.formData)})
|
||||
if (res.code === 0) {
|
||||
this.$set(this.formData, "nrs", [{bzs: [{}]}])
|
||||
this.$set(this.formData, "annual", null)
|
||||
this.$set(this.formData, "assessment", null)
|
||||
this.$set(this.formData, "assessmentMode", null)
|
||||
this.$set(this.formData, "workersNum", null)
|
||||
this.$set(this.formData, "scoringMode", null)
|
||||
this.$set(this.formData, "activityGroupId", null)
|
||||
this.$set(this.formData, "commentTarget", null)
|
||||
this.$set(this.formData, "zbId", null)
|
||||
this.$set(this.formData, "applyTime", undefined)
|
||||
this.$message.success(res.msg);
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user