领导管理页面添加

main
wanglei 2 months ago
parent 2479a99acf
commit bf5b15d9d9

@ -0,0 +1,707 @@
<template>
<div class="app-container">
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" v-if="!isEmployee" label-width="80px">
<el-form-item label="部门名称" prop="deptName">
<el-input
v-model="queryParams.deptName"
placeholder="请输入部门名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="职工姓名" prop="empName">
<el-input
v-model="queryParams.empName"
placeholder="请输入职工姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工号" prop="wordId">
<el-input
v-model="queryParams.wordId"
placeholder="请输入工号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['kaohe:employee:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['kaohe:employee:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['kaohe:employee:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain
icon="el-icon-upload2"
size="mini"
@click="handleImport" v-hasPermi="['kaohe:employee:import']">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['kaohe:employee:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="employeeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<!-- <el-table-column label="主键" align="center" prop="id" fixed/>-->
<el-table-column label="工号" align="center" prop="wordId" fixed/>
<el-table-column label="所属部门" align="center" prop="deptId" :show-overflow-tooltip="true" min-width="120"/>
<el-table-column label="部门名称" align="center" prop="deptName" :show-overflow-tooltip="true" min-width="120"/>
<el-table-column label="职工姓名" align="center" prop="empName" :show-overflow-tooltip="true" min-width="120"/>
<el-table-column label="性别" align="center" prop="sex" :show-overflow-tooltip="true" min-width="120">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
</template>
</el-table-column>
<el-table-column label="年龄" align="center" prop="age" />
<el-table-column label="身份" align="center" prop="position" />
<el-table-column label="附件" align="center" prop="docs" width="120">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
v-hasPermi="['kaohe:employee:docs']"
@click="handleFuJian(scope.row)"
>附件详情/编辑</el-button>
</template>
</el-table-column>
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="身份证号" align="center" prop="idcard" />
<el-table-column label="银行卡号" align="center" prop="bankCardNumber" />
<el-table-column label="开户行" align="center" prop="openingBank" />
<el-table-column label="学历" align="center" prop="education" />
<el-table-column label="家庭住址" align="center" prop="address" :show-overflow-tooltip="true" min-width="120"/>
<el-table-column label="紧急联系人" align="center" prop="contact" :show-overflow-tooltip="true" min-width="120"/>
<el-table-column label="紧急联系人电话" align="center" prop="contactPhone" :show-overflow-tooltip="true" min-width="120"/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="140px">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['kaohe:employee:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['kaohe:employee:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!--
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
-->
<!-- 添加或修改职工信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="工号" prop="wordId">
<el-input v-model="form.wordId" placeholder="请输入工号" :disabled="isEmployee"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属部门" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" placeholder="请选择所属部门" :disabled="isEmployee"
:show-count="true" @select="changeDept"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="职工姓名" prop="empName">
<el-input v-model="form.empName" placeholder="请输入职工姓名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年龄" prop="age">
<el-input v-model="form.age" placeholder="请输入年龄" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="身份" prop="position">
<el-input v-model="form.position" placeholder="请输入年龄" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别" prop="sex">
<el-select v-model="form.sex" placeholder="请选择性别" style="width: 100%;">
<el-option
v-for="dict in dict.type.sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="手机号" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="身份证号" prop="idcard">
<el-input v-model="form.idcard" placeholder="请输入身份证号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="银行卡号" prop="bankCardNumber">
<el-input v-model="form.bankCardNumber" placeholder="请输入银行卡号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行" prop="openingBank">
<el-input v-model="form.openingBank" placeholder="请输入开户行" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="学历" prop="education">
<el-input v-model="form.education" placeholder="请输入学历" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="家庭住址" prop="address">
<el-input v-model="form.address" placeholder="请输入家庭住址" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="紧急联系人" prop="contact">
<el-input v-model="form.contact" placeholder="请输入紧急联系人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="紧急联系人电话" prop="contactPhone">
<el-input v-model="form.contactPhone" placeholder="请输入紧急联系人电话" />
</el-form-item>
</el-col>
<el-col :span="12"></el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body :close-on-click-modal="false">
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate"></el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
<!-- 附件详情对话框 -->
<el-dialog title="附件详情/编辑" :visible.sync="uploadFJ.open" width="900px" append-to-body :close-on-click-modal="false">
<div v-for="item in uploadFJ.docDiscripList">
<el-row :gutter="20">
<el-col :span="3" style="text-align: right;">
<div class="my_required" style="margin-top: 10px;">附件主题</div>
</el-col>
<el-col :span="20">
<el-input v-model.trim="item.title" placeholder="请输入附件主题"/>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="3" style="text-align: right;">
<div class="my_required" style="margin-top: 10px;">附件简介</div>
</el-col>
<el-col :span="20">
<el-input type="textarea" v-model.trim="item.docDiscrip" placeholder="请输入附件简介"/>
</el-col>
</el-row>
</div>
<div class="_con">
<div class="left">
<el-card style="margin-bottom: 10px;">
<div slot="header">
<span>已有附件</span>
</div>
<div v-for="(item,index) in uploadFJ.fileList" :key="item.url" class="yy_fj_list">
<a :href="item.url" :download="item.name" target="_blank">{{ item.name }}</a>
<i class="el-icon-close" @click="uploadFJListRemove(index)"></i>
</div>
</el-card>
</div>
<div class="right">
<el-upload ref="uploadFJ" :limit="5" :headers="uploadFJ.headers" :action="uploadFJ.url" multiple
:disabled="uploadFJ.isUploading" :on-progress="fileUploadProgressFJ" :on-success="fileSuccessFJ"
:auto-upload="true" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="updateFileFJ"></el-button>
<el-button @click="uploadFJ.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listEmployee, getEmployee, delEmployee, addEmployee, updateEmployee, editEmployeeDocs } from "@/api/kaohe/employee";
import { getToken } from "@/utils/auth"
import { deptTreeSelect } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Employee",
components: { Treeselect },
dicts: ['sys_user_sex'],
data() {
return {
isEmployee: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
employeeList: [],
//
deptOptions: undefined,
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/kaohe/employee/importData"
},
//
uploadFJ: {
//
open: false,
//
fileList: [],
//
docDiscripList: [],
//
isUploading: false,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/common/upload"
},
//
updataRow: {},
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 1000000000,
userId: null,
deptId: null,
deptName: null,
empName: null,
wordId: null
},
//
form: {},
//
rules: {
deptId: [
{ required: true, message: "所属部门不能为空", trigger: "blur" }
],
empName: [
{ required: true, message: "职工姓名不能为空", trigger: "blur" }
],
wordId: [
{ required: true, message: "工号不能为空", trigger: "blur" }
],
}
}
},
created() {
let userInfo = this.$store.state.user
if(userInfo.roles.length===1 && userInfo.roles[0]==='employee'){
this.isEmployee = true;
this.queryParams.wordId = userInfo.name
}
this.getList()
this.getDeptTree()
},
methods: {
/** 查询职工信息列表 */
getList() {
this.loading = true
listEmployee(this.queryParams).then(response => {
let arr = ['金佳勇','单丽','靳铎','张杰','李建强','孙溢','马丽贞','王倞','安静','潘颖','马连营','朱玲','李爱民','隋雪莲','亓鋆',
'冯春爽','徐铁红','王芊然','沈芝','高卫华','张青','李丽娜','王芳','王丽红','朱立明','刘建明','李丽山','杜学东','李诚','时代','张建环',
'孟祥昕','吴海波','贾长胜','秦丹','董慧彬','杨长锁','马振','李敬华','刘继祥','李志伟','鲁芳','王芳','蔡建丰','常海龙','王建国','尹海',
'刘云伟','陈伟莲','杜光熙','王文娟','黄静','唐翠云','霍翠红','曹丽君','王丹丹','刘冰怡','张志伟','王洋','杨焱','高一帆','王璐',
'石野飞','檀艳','周庆平','刘梦','刘庆辉','朱艳伟','李雪梅','谷世海','侯宇','刘颖','郭海莉','于静','李旭','崔岩','郭小松','刘金玲',
'陈克良','范永山','陈静','王英','马作东','沈方','石瑾','杜福光','白玉海','闫敬','张志宇','谌志鹏','蔡玉梅','安彬','刘凯','鲁丽丽',
'刘肇民','宋晓敏','董怀晶','赵婉华','武炜','张琮','李晓萍','贾秀敏','李桃桃','郑向群','丁新龙','张海卿','崔乃忠','任翠香','李师广',
'韩雅倩','杨玉娟','李远航','王学增','康晓梅','张运峰']
let arr1 = []
response.rows.forEach(item=>{
if(arr.indexOf(item.empName) !== -1 && (item.wordId!='110009') && (item.wordId!='110009') && (item.wordId!='117014')){
arr1.push(item)
}
})
console.log(arr1);
this.employeeList = arr1
this.total = response.total
this.loading = false
})
},
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
console.log(this.deptOptions);
});
},
/** 查询时选择部门 */
changeDept(dept) {
this.form.deptName = dept.label
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
userId: null,
deptId: null,
deptName: null,
empName: null,
sex: null,
age: null,
wordId: null,
position: null,
docs: null,
phone: null,
idcard: null,
bankCardNumber: null,
openingBank: null,
education: null,
address: null,
contact: null,
contactPhone: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加职工信息"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getEmployee(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改职工信息"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateEmployee(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
this.form.userId = this.$store.state.user.id
addEmployee(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除该数据项?').then(function() {
return delEmployee(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('kaohe/employee/export', {
...this.queryParams
}, `employee_${new Date().getTime()}.xlsx`)
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = "用户导入"
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
this.download('kaohe/employee/importTemplate', {
}, `职工模板_${new Date().getTime()}.xlsx`)
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true })
this.getList()
},
//
submitFileForm() {
this.$refs.upload.submit()
},
//
handleFuJian(row){
this.updataRow = row;
this.uploadFJ.fileList = [];
this.uploadFJ.docDiscripList = [{
title:'',
docDiscrip:'',
}];
if(row.docs){
let arr = row.docs.split(';');
arr.forEach( item => {
let arr1 = item.split(',');
this.uploadFJ.fileList.push({
name: arr1[0],
url: arr1[1]
});
})
this.uploadFJ.docDiscripList = JSON.parse(row.docDiscrip);
}
this.uploadFJ.open = true;
},
//
uploadFJListRemove(index){
this.uploadFJ.fileList.splice(index, 1);
},
submitFileFormFJ(){
this.$refs.uploadFJ.submit()
},
//
fileUploadProgressFJ(event, file, fileList) {
this.uploadFJ.isUploading = true
},
//
fileSuccessFJ(response, file, fileList) {
this.uploadFJ.isUploading = false
},
updateFileFJ(){
let flag = true;
if(!this.uploadFJ.docDiscripList[0].title){
flag = false;
this.$alert(`附近主题不能为空`, `提示`, {
type: 'warning'
})
}
if(!this.uploadFJ.docDiscripList[0].docDiscrip){
flag = false;
this.$alert(`附近简介不能为空`, `提示`, {
type: 'warning'
})
}
if(flag){
let uploadFiles = this.$refs.uploadFJ.$data.uploadFiles;
let arr = []
this.uploadFJ.fileList.forEach(item=>{
arr.push(item.name+','+item.url);
})
uploadFiles.forEach( item => {
arr.push(item.response.originalFilename+','+item.response.url);
})
this.updataRow.docs = arr.join(';');
this.updataRow.docDiscrip =JSON.stringify(this.uploadFJ.docDiscripList);
editEmployeeDocs(this.updataRow).then(response => {
this.$modal.msgSuccess("修改成功");
this.uploadFJ.open = false;
this.$refs.uploadFJ.clearFiles();
this.getList();
})
}
}
}
}
</script>
<style scoped lang="scss">
.el-dialog__body{
.my_required:before{
content: "*";
color: #f56c6c;
margin-right: 4px;
}
._con{
display: flex;
justify-content: space-between;
min-height: 400px;
margin-top: 15px;
.left{
width: 480px;
.yy_fj_list {
display: flex;
justify-content: space-between;
align-items: center;
height: 36px;
border-bottom: 1px solid #39CCCC;
i{
cursor: pointer;
}
}
}
.right{
width: 360px;
}
}
}
</style>

@ -384,7 +384,7 @@
<!--选择发布考核信息--> <!--选择发布考核信息-->
<el-dialog title="发布考核" :visible.sync="pcSetUp.open" width="99%" :close-on-click-modal="false"> <el-dialog title="发布考核" :visible.sync="pcSetUp.open" width="99%" :close-on-click-modal="false">
<div style="font-size: 16px;margin-bottom: 15px;font-weight: 600">考核任务名称{{ pcSetUp.pingceName }}</div> <div style="font-size: 16px;margin-bottom: 15px;font-weight: 600">考核任务名称{{ pcSetUp.pingceName }}</div>
<el-alert title="评分占比请输入小于 1 的小数,评分占比合计需为 1 " style="font-weight: bold" type="info" :closable="false"></el-alert> <el-alert title="评分占比请输入小于 1 的小数,评分占比合计需为 1;评优最大值默认为 0 ,为 0 时不做限制" style="font-weight: bold" type="info" :closable="false"></el-alert>
<el-table border v-loading="pcSetUp.loading" :data="pcSetUpList" style="margin-top: 10px;"> <el-table border v-loading="pcSetUp.loading" :data="pcSetUpList" style="margin-top: 10px;">
<el-table-column label="考核项主键" align="center" prop="id" width="90" fixed/> <el-table-column label="考核项主键" align="center" prop="id" width="90" fixed/>
<el-table-column label="考核项名称" align="center" prop="itemName" min-width="120" :show-overflow-tooltip="true" fixed/> <el-table-column label="考核项名称" align="center" prop="itemName" min-width="120" :show-overflow-tooltip="true" fixed/>
@ -548,7 +548,7 @@
</el-dialog> </el-dialog>
<!--查看考核得分--> <!--查看考核得分-->
<el-dialog title="查看考核得分" :visible.sync="khdf.open" width="90%" top="20px !important" :close-on-click-modal="false"> <el-dialog :title="khdf.title" :visible.sync="khdf.open" width="90%" top="20px !important" :close-on-click-modal="false">
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<el-button <el-button
type="warning" type="warning"
@ -706,6 +706,7 @@ export default {
return { return {
// //
khdf:{ khdf:{
title:'',
open: false, open: false,
id: null, id: null,
pcName: null, pcName: null,
@ -833,7 +834,7 @@ export default {
sTime: null, sTime: null,
eTime: null, eTime: null,
maxNum: null, maxNum: null,
umax: null, umax: 0,
percentage: null, percentage: null,
state: null, state: null,
itemIds: null, itemIds: null,
@ -1329,12 +1330,6 @@ export default {
type: 'Danger' type: 'Danger'
}) })
} }
if(row.typeId===1 && (!Vote.umax)){
flag = false;
this.$alert(`评优最大值不能为空!`, `提示`, {
type: 'Danger'
})
}
if(row.typeId===1 && (Vote.umax>this.pcSetUp.row.pcBkhdxs.length)){ if(row.typeId===1 && (Vote.umax>this.pcSetUp.row.pcBkhdxs.length)){
flag = false; flag = false;
this.$alert(`评优最大值不能大于被考核对象个数!`, `提示`, { this.$alert(`评优最大值不能大于被考核对象个数!`, `提示`, {
@ -1484,6 +1479,7 @@ export default {
this.khdf.list = []; this.khdf.list = [];
this.khdf.tableHeader = []; this.khdf.tableHeader = [];
this.khdf.open = true; this.khdf.open = true;
this.khdf.title = row.pcTitle;
this.getListKhResult(row.id); this.getListKhResult(row.id);
}, },
// //
@ -1675,7 +1671,9 @@ export default {
drwScpfzhSubmit(){ drwScpfzhSubmit(){
this.$refs["drwScpfzhForm"].validate(valid => { this.$refs["drwScpfzhForm"].validate(valid => {
if (valid) { if (valid) {
let VoteIds=[];
this.drwScpfzhForm.itemsOpt.forEach(item=>{ this.drwScpfzhForm.itemsOpt.forEach(item=>{
VoteIds.push(item.selectVotes.map(item1 => item1.id))
item['khrwNames'] = item.pcName +''+ item.selectVotes.map(item1 => item1.khitemName).join('、'); item['khrwNames'] = item.pcName +''+ item.selectVotes.map(item1 => item1.khitemName).join('、');
}) })
let itemNames = this.drwScpfzhForm.itemsOpt.map(item1 => item1.khrwNames).join(';'); let itemNames = this.drwScpfzhForm.itemsOpt.map(item1 => item1.khrwNames).join(';');
@ -1685,6 +1683,7 @@ export default {
pcNames: this.drwScpfzhForm.pcNames, pcNames: this.drwScpfzhForm.pcNames,
num: this.drwScpfzhForm.num, num: this.drwScpfzhForm.num,
itemNames: itemNames, itemNames: itemNames,
voteIds: VoteIds.join(','),
}).then(response => { }).then(response => {
this.drwScpfzhOpen = false; this.drwScpfzhOpen = false;
this.$modal.msgSuccess("生成成功"); this.$modal.msgSuccess("生成成功");

@ -10,7 +10,7 @@
<div class="tou_piao_item"> <div class="tou_piao_item">
<div> <div>
{{ item.bkhdxName }} {{ item.bkhdxName }}
<el-link type="primary" @click="goPage(item)" icon="el-icon-view"></el-link> <el-link type="primary" @click="goPage(item)" icon="el-icon-view" v-hasPermi="['system:dept:query','kaohe:employee:query']"></el-link>
</div> </div>
<div class="_desc">参与评分 {{ item.voteNum!==null?item.voteNum: ''}} </div> <div class="_desc">参与评分 {{ item.voteNum!==null?item.voteNum: ''}} </div>
<div class="_desc">均值{{ item.avgScore!==null?item.avgScore: '' }} </div> <div class="_desc">均值{{ item.avgScore!==null?item.avgScore: '' }} </div>
@ -26,7 +26,7 @@
<div class="tou_piao_item"> <div class="tou_piao_item">
<div> <div>
{{ item.bkhdxName }} {{ item.bkhdxName }}
<el-link type="primary" @click="goPage(item)" icon="el-icon-view"></el-link> <el-link type="primary" @click="goPage(item)" icon="el-icon-view" v-hasPermi="['system:dept:query','kaohe:employee:query']"></el-link>
</div> </div>
<div class="_desc">参与评分 {{ item.voteNum!==null?item.voteNum: ''}} </div> <div class="_desc">参与评分 {{ item.voteNum!==null?item.voteNum: ''}} </div>
<div class="_desc">均值{{ item.avgScore!==null?item.avgScore: '' }} </div> <div class="_desc">均值{{ item.avgScore!==null?item.avgScore: '' }} </div>
@ -185,7 +185,7 @@ export default {
bkhdxName=bkhdxName.slice(0, -1); bkhdxName=bkhdxName.slice(0, -1);
} }
if(pyA>this.vote.umax){ if(this.vote.umax && pyA>this.vote.umax){
flag = false; flag = false;
this.$alert(`评优数量不能超过评优最大值!`, `提示`, { this.$alert(`评优数量不能超过评优最大值!`, `提示`, {
type: 'Danger' type: 'Danger'
@ -193,16 +193,27 @@ export default {
} }
if(flag){ if(flag){
if(new Date(this.vote.eTime) > (new Date())){ if(new Date(this.vote.eTime) > (new Date())){
VoteEmpSubmit({ this.$confirm('是否确认提交评分?', '提示', {
khitemTypeid : this.vote.khitemTypeid, confirmButtonText: '确定',
voteId : this.vote.id, cancelButtonText: '取消',
userId : this.$store.state.user.id, type: 'warning'
userName : this.$store.state.user.name, }).then(() => {
uid : 1, VoteEmpSubmit({
voteEmpList: voteEmpList khitemTypeid : this.vote.khitemTypeid,
}).then(response => { voteId : this.vote.id,
this.$modal.msgSuccess("提交成功"); userId : this.$store.state.user.id,
this.$router.go(-1) userName : this.$store.state.user.name,
uid : 1,
voteEmpList: voteEmpList
}).then(response => {
this.$modal.msgSuccess("提交成功");
this.$router.go(-1)
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消提交操作'
});
}); });
}else { }else {
this.$alert(`已超时,无法提交评分!`, `提示`, { this.$alert(`已超时,无法提交评分!`, `提示`, {

Loading…
Cancel
Save