Merge remote-tracking branch 'origin/main'

main
hshansha 6 months ago
commit a09c836833

@ -42,3 +42,13 @@ export function delVote_emp(id) {
method: 'delete' method: 'delete'
}) })
} }
// 修改投票选项
export function VoteEmpSubmit(data) {
return request({
url: '/kaohe/vote_emp/voteSubmit',
method: 'put',
data: data
})
}

@ -4,7 +4,7 @@
<div v-for="item in voteList" :key="item.id" class="voteitems"> <div v-for="item in voteList" :key="item.id" class="voteitems">
<div class="left"> <div class="left">
<div class="vote_title">{{ item.voteTitle }}</div> <div class="vote_title">{{ item.voteTitle }}</div>
<div class="vote_time">{{ item.sTime + '-' + item.eTime }}</div> <div class="vote_time">{{ item.sTime + ' - ' + item.eTime }}</div>
</div> </div>
<div class="right"> <div class="right">
<el-button <el-button
@ -86,7 +86,7 @@ export default {
} }
.vote_time{ .vote_time{
color: #af0000; color: #af5e5e;
} }
} }

@ -146,7 +146,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改考核评测对话框 --> <!-- 添加或修改考核任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="考核任务名称" prop="pcTitle"> <el-form-item label="考核任务名称" prop="pcTitle">
@ -345,7 +345,7 @@
<el-table border v-loading="pcSetUp.loading" :data="pcSetUp.list"> <el-table border v-loading="pcSetUp.loading" :data="pcSetUp.list">
<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/>
<el-table-column label="考核项类型" align="center" prop="type" fixed/> <el-table-column label="考核项类型" align="center" prop="type" min-width="110" fixed/>
<el-table-column label="评分主题" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true"> <el-table-column label="评分主题" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.$index=== pcSetUp.xzhIndex"> <div v-if="scope.$index=== pcSetUp.xzhIndex">
@ -389,7 +389,7 @@
</el-table-column> </el-table-column>
<el-table-column label="评分占比" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true"> <el-table-column label="评分占比" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId!==5"> <div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId!==3">
<el-input-number :disabled="scope.row.vote.id && !(new Date(scope.row.vote.sTime) > (new Date()))" <el-input-number :disabled="scope.row.vote.id && !(new Date(scope.row.vote.sTime) > (new Date()))"
v-model="scope.row.vote.percentage" :precision="2" :step="0.01" :max="1" style="width: 150px;"></el-input-number> v-model="scope.row.vote.percentage" :precision="2" :step="0.01" :max="1" style="width: 150px;"></el-input-number>
</div> </div>
@ -720,7 +720,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
pingceList: [], pingceList: [],
// //
title: "", title: "",
@ -839,7 +839,7 @@ export default {
this.getVoteItemsList(); this.getVoteItemsList();
}, },
methods: { methods: {
/** 查询考核评测列表 */ /** 查询考核任务列表 */
getList() { getList() {
this.loading = true this.loading = true
listPingce(this.queryParams).then(response => { listPingce(this.queryParams).then(response => {
@ -897,7 +897,7 @@ export default {
handleAdd() { handleAdd() {
this.reset() this.reset()
this.open = true this.open = true
this.title = "添加考核评测" this.title = "添加考核任务"
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -927,7 +927,7 @@ export default {
} }
this.form.pcBkhdxs = []; this.form.pcBkhdxs = [];
this.open = true; this.open = true;
this.title = "修改考核评测"; this.title = "修改考核任务";
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -994,7 +994,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids
this.$modal.confirm('是否确认删除考核评测编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除考核任务编号为"' + ids + '"的数据项?').then(function() {
return delPingce(ids) return delPingce(ids)
}).then(() => { }).then(() => {
this.getList() this.getList()
@ -1164,12 +1164,6 @@ export default {
type: 'Danger' type: 'Danger'
}) })
} }
/*if(!Vote.state){
flag = false;
this.$alert(`状态不能为空!`, `提示`, {
type: 'Danger'
})
}*/
if(!Vote.sTime){ if(!Vote.sTime){
flag = false; flag = false;
this.$alert(`开始时间不能为空!`, `提示`, { this.$alert(`开始时间不能为空!`, `提示`, {
@ -1212,7 +1206,7 @@ export default {
type: 'Danger' type: 'Danger'
}) })
} }
if(row.typeId!==5 && (!Vote.percentage)){ if(row.typeId!==3 && (!Vote.percentage)){
flag = false; flag = false;
this.$alert(`评分占比不能为空!`, `提示`, { this.$alert(`评分占比不能为空!`, `提示`, {
type: 'Danger' type: 'Danger'
@ -1242,6 +1236,7 @@ export default {
if(Vote.voteItems){ if(Vote.voteItems){
Vote.voteItems = Vote.voteItems.join(',') Vote.voteItems = Vote.voteItems.join(',')
} }
Vote.state = '0'
addVote(Vote).then(response => { addVote(Vote).then(response => {
this.$modal.msgSuccess("新增成功") this.$modal.msgSuccess("新增成功")
this.cancelVote() this.cancelVote()

@ -59,7 +59,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.khitemTypeid===1"></span> <span v-if="scope.row.khitemTypeid===1"></span>
<span v-if="scope.row.khitemTypeid===2"></span> <span v-if="scope.row.khitemTypeid===2"></span>
<span v-if="scope.row.khitemTypeid===5"></span> <span v-if="scope.row.khitemTypeid===3"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="评分主题" align="center" prop="voteTitle" min-width="200" :show-overflow-tooltip="true"> <el-table-column label="评分主题" align="center" prop="voteTitle" min-width="200" :show-overflow-tooltip="true">
@ -100,7 +100,7 @@
</el-table-column> </el-table-column>
<el-table-column label="评分占比" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true"> <el-table-column label="评分占比" align="center" prop="vote" min-width="220" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.$index===xzhIndex && scope.row.khitemTypeid!==5"> <div v-if="scope.$index===xzhIndex && scope.row.khitemTypeid!==3">
<el-input-number :disabled="!(new Date(scope.row.sTime) > (new Date()))" <el-input-number :disabled="!(new Date(scope.row.sTime) > (new Date()))"
v-model="scope.row.percentage" :precision="2" :step="0.01" :max="1" style="width: 150px;"></el-input-number> v-model="scope.row.percentage" :precision="2" :step="0.01" :max="1" style="width: 150px;"></el-input-number>
</div> </div>
@ -311,12 +311,6 @@ export default {
type: 'Danger' type: 'Danger'
}) })
} }
if(!Vote.state){
flag = false;
this.$alert(`状态不能为空!`, `提示`, {
type: 'Danger'
})
}
if(!Vote.sTime){ if(!Vote.sTime){
flag = false; flag = false;
this.$alert(`开始时间不能为空!`, `提示`, { this.$alert(`开始时间不能为空!`, `提示`, {
@ -359,7 +353,7 @@ export default {
type: 'Danger' type: 'Danger'
}) })
} }
if(row.khitemTypeid!==5 && (!Vote.percentage)){ if(row.khitemTypeid!==3 && (!Vote.percentage)){
flag = false; flag = false;
this.$alert(`评分占比不能为空!`, `提示`, { this.$alert(`评分占比不能为空!`, `提示`, {
type: 'Danger' type: 'Danger'

Loading…
Cancel
Save