|
|
|
|
@ -91,7 +91,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="考核任务备注" align="center" prop="remark" />
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280px" >
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="350px" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
@ -100,6 +100,13 @@
|
|
|
|
|
@click="handleSetUp(scope.row, scope.$index)"
|
|
|
|
|
>发布考核
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
@click="viewVote(scope.row)"
|
|
|
|
|
>查看评分任务
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@ -157,7 +164,7 @@
|
|
|
|
|
<el-form-item label="考核任务描述" prop="pcDescription" :disabled="form.state!=='0'">
|
|
|
|
|
<el-input v-model="form.pcDescription" type="textarea" placeholder="请输入考核任务描述" :disabled="form.state==='2'"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="考核任务状态" prop="state">
|
|
|
|
|
<!-- <el-form-item label="考核任务状态" prop="state">
|
|
|
|
|
<el-select v-model="form.state" placeholder="请选择考核任务状态" clearable style="width: 100%" :disabled="form.state!=='0'">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.kh_state"
|
|
|
|
|
@ -166,7 +173,7 @@
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
<el-form-item label="被考核对象类型" prop="bkhdxType">
|
|
|
|
|
<el-radio-group v-model="form.bkhdxType" :disabled="form.state!=='0'">
|
|
|
|
|
<el-radio v-for="dict in dict.type.bkhdx_type" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
|
|
|
|
@ -425,7 +432,7 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="状态" align="center" prop="vote" min-width="100" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.kh_state" :value="scope.row.vote.state"/>
|
|
|
|
|
<dict-tag :options="dict.type.pf_state" :value="scope.row.vote.state"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
|
|
|
|
|
@ -526,7 +533,7 @@ import TableColumn from '@/components/TableColumn'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Pingce",
|
|
|
|
|
dicts: ['kh_state', 'sys_user_sex', 'bkhdx_type'],
|
|
|
|
|
dicts: ['kh_state', 'sys_user_sex', 'bkhdx_type', 'pf_state'],
|
|
|
|
|
components: { Treeselect, TableColumn },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -626,6 +633,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 考核发布
|
|
|
|
|
pcSetUp: {
|
|
|
|
|
row: null,
|
|
|
|
|
// 选中行Index
|
|
|
|
|
xzhIndex: null,
|
|
|
|
|
isRowEdit: false,
|
|
|
|
|
@ -833,6 +841,7 @@ export default {
|
|
|
|
|
this.getList()
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.form.state = '0'
|
|
|
|
|
addPingce(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
|
this.open = false
|
|
|
|
|
@ -963,6 +972,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 发布考核
|
|
|
|
|
handleSetUp(row){
|
|
|
|
|
this.pcSetUp.row = row;
|
|
|
|
|
this.pcSetUp.pingceId = row.id;
|
|
|
|
|
this.pcSetUp.pingceName = row.pcTitle;
|
|
|
|
|
this.pcSetUp.templateId = row.templateId;
|
|
|
|
|
@ -1047,6 +1057,32 @@ export default {
|
|
|
|
|
type: 'Danger'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(row.typeId!==3 && Vote.percentage){
|
|
|
|
|
let allFlag = true;
|
|
|
|
|
let sumPercentage = 0;
|
|
|
|
|
this.pcSetUp.list.forEach(item=>{
|
|
|
|
|
if(item.typeId!==3){
|
|
|
|
|
if(!item.vote || !item.vote.percentage){
|
|
|
|
|
allFlag=false;
|
|
|
|
|
}
|
|
|
|
|
if(item.vote && item.vote.percentage){
|
|
|
|
|
sumPercentage += item.vote.percentage
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if(allFlag && sumPercentage!==1){
|
|
|
|
|
flag = false;
|
|
|
|
|
this.$alert(`评分占比合计需要为1!`, `提示`, {
|
|
|
|
|
type: 'Danger'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(!allFlag && sumPercentage>1){
|
|
|
|
|
flag = false;
|
|
|
|
|
this.$alert(`评分占比合计不能超过1!`, `提示`, {
|
|
|
|
|
type: 'Danger'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!Vote.voteTitle){
|
|
|
|
|
flag = false;
|
|
|
|
|
this.$alert(`评分主题不能为空!`, `提示`, {
|
|
|
|
|
@ -1062,11 +1098,18 @@ export default {
|
|
|
|
|
this.cancelVote()
|
|
|
|
|
})
|
|
|
|
|
} else if(Vote.id === null && flag){
|
|
|
|
|
Vote.state = '0'
|
|
|
|
|
Vote.state = '0';
|
|
|
|
|
addVote(Vote).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
|
this.cancelVote()
|
|
|
|
|
})
|
|
|
|
|
this.cancelVote();
|
|
|
|
|
});
|
|
|
|
|
if(this.pcSetUp.row.state==='0'){
|
|
|
|
|
// 修改考核任务状态 进行中
|
|
|
|
|
this.pcSetUp.row.state='1'
|
|
|
|
|
updatePingce(this.pcSetUp.row).then(response => {
|
|
|
|
|
this.getList()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
cancelVote(){
|
|
|
|
|
@ -1194,6 +1237,10 @@ export default {
|
|
|
|
|
viewUser(row){
|
|
|
|
|
this.$router.push({ path: '/system/user', query: { pcId: row.id}});
|
|
|
|
|
},
|
|
|
|
|
// 查看评分任务
|
|
|
|
|
viewVote(row){
|
|
|
|
|
this.$router.push({ path: '/toupiao/vote', query: { pcId: row.id}});
|
|
|
|
|
},
|
|
|
|
|
// 提交生成评分账号
|
|
|
|
|
scpfzhSubmit(){
|
|
|
|
|
this.$refs["scpfzhForm"].validate(valid => {
|
|
|
|
|
|