|
|
|
@ -90,7 +90,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="考核任务备注" align="center" prop="remark" />
|
|
|
|
<el-table-column label="考核任务备注" align="center" prop="remark" />
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240px" >
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="320px" >
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@ -110,9 +110,17 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-s-grid"
|
|
|
|
icon="el-icon-s-grid"
|
|
|
|
@click="goTotalScore(scope.row)"
|
|
|
|
@click="goKaoHeScore(scope.row)"
|
|
|
|
v-hasPermi="['kaohe:kh_result:generate']"
|
|
|
|
v-hasPermi="['kaohe:kh_result:generate']"
|
|
|
|
>考核得分
|
|
|
|
>生成考核得分
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
|
|
|
@click="viewKaoHeScore(scope.row)"
|
|
|
|
|
|
|
|
v-hasPermi="['kaohe:kh_result:generate']"
|
|
|
|
|
|
|
|
>查看考核得分
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@ -357,26 +365,6 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<!-- <el-table-column label="评分选项" align="center" prop="options" min-width="220" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId===1">
|
|
|
|
|
|
|
|
<el-select :disabled="scope.row.vote.id && !(new Date(scope.row.vote.sTime) > (new Date()))"
|
|
|
|
|
|
|
|
v-model="scope.row.vote.voteItems" multiple placeholder="请选择评分选项">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in vote_options"
|
|
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
|
|
:label="item.vitemName"
|
|
|
|
|
|
|
|
:value="item.id">
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-else>
|
|
|
|
|
|
|
|
<div v-if=" scope.row.vote.voteItems">
|
|
|
|
|
|
|
|
<div>{{ scope.row.vote.voteItemsName }}</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</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!==1">
|
|
|
|
<div v-if="scope.$index=== pcSetUp.xzhIndex && scope.row.typeId!==1">
|
|
|
|
@ -493,8 +481,8 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 考核得分-->
|
|
|
|
<!--查看考核得分-->
|
|
|
|
<el-dialog title="考核得分" :visible.sync="khdf.open" width="90%">
|
|
|
|
<el-dialog title="查看考核得分" :visible.sync="khdf.open" width="90%">
|
|
|
|
|
|
|
|
|
|
|
|
<el-table border :data="khdf.list">
|
|
|
|
<el-table border :data="khdf.list">
|
|
|
|
<template v-for="column in khdf.tableHeader">
|
|
|
|
<template v-for="column in khdf.tableHeader">
|
|
|
|
@ -507,6 +495,32 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 生成评分账号对话框 -->
|
|
|
|
|
|
|
|
<el-dialog title="生成评分账号" :visible.sync="scpfzh.open" width="600px" append-to-body>
|
|
|
|
|
|
|
|
<el-form ref="scpfzhForm" :model="scpfzh.form" :rules="scpfzh.rules" label-width="110px">
|
|
|
|
|
|
|
|
<el-form-item label="所属部门" prop="deptId">
|
|
|
|
|
|
|
|
<treeselect v-model="scpfzh.form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择所属部门" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="评分考核项" prop="items">
|
|
|
|
|
|
|
|
<el-select v-model="scpfzh.form.items" multiple placeholder="请选择评分考核项" clearable style="width: 100%">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in scpfzh.itemsOtions"
|
|
|
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
|
|
|
:label="dict.itemName"
|
|
|
|
|
|
|
|
:value="dict.id"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="生成账号数量" prop="num">
|
|
|
|
|
|
|
|
<el-input-number v-model="scpfzh.form.num" :min="1" label="请输入生成账号数量"></el-input-number>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="scpfzhSubmit">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="scpfzhCancel">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
@ -528,6 +542,7 @@ export default {
|
|
|
|
components: { Treeselect, TableColumn },
|
|
|
|
components: { Treeselect, TableColumn },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
// 考核得分
|
|
|
|
khdf:{
|
|
|
|
khdf:{
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
|
@ -656,7 +671,24 @@ export default {
|
|
|
|
itemIds: null
|
|
|
|
itemIds: null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 评分选项类型数据
|
|
|
|
// 评分选项类型数据
|
|
|
|
vote_options: []
|
|
|
|
vote_options: [],
|
|
|
|
|
|
|
|
// 生成评分账号
|
|
|
|
|
|
|
|
scpfzh:{
|
|
|
|
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
form:{},
|
|
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
deptId: [
|
|
|
|
|
|
|
|
{ required: true, message: "所属部门不能为空", trigger: "change" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
|
|
|
{ required: true, message: "评分考核项不能为空", trigger: "change" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
num: [
|
|
|
|
|
|
|
|
{ required: true, message: "生成账号数量不能为空", trigger: "change" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemsOtions: [],
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
@ -965,18 +997,6 @@ export default {
|
|
|
|
item.vote.pingceId = this.pcSetUp.pingceId;
|
|
|
|
item.vote.pingceId = this.pcSetUp.pingceId;
|
|
|
|
item.vote.pingceName = this.pcSetUp.pingceName;
|
|
|
|
item.vote.pingceName = this.pcSetUp.pingceName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*if(item.vote.voteItems){
|
|
|
|
|
|
|
|
item.vote.voteItems = item.vote.voteItems.split(',');
|
|
|
|
|
|
|
|
let VoteItemsName = []
|
|
|
|
|
|
|
|
item.vote.voteItems.forEach(e => {
|
|
|
|
|
|
|
|
this.vote_options.forEach(e1 => {
|
|
|
|
|
|
|
|
if(e === e1.id){
|
|
|
|
|
|
|
|
VoteItemsName.push(e1.vitemName)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
item.vote['voteItemsName'] = VoteItemsName.join(',');
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
pcSetUpList.push(item);
|
|
|
|
pcSetUpList.push(item);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.pcSetUp.list = pcSetUpList;
|
|
|
|
this.pcSetUp.list = pcSetUpList;
|
|
|
|
@ -1026,12 +1046,6 @@ export default {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*if(row.typeId===1 && (!Vote.voteItems)){
|
|
|
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
this.$alert(`评分选项不能为空!`, `提示`, {
|
|
|
|
|
|
|
|
type: 'Danger'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
if(row.typeId!==1 && (!Vote.maxNum)){
|
|
|
|
if(row.typeId!==1 && (!Vote.maxNum)){
|
|
|
|
flag = false;
|
|
|
|
flag = false;
|
|
|
|
this.$alert(`最大值不能为空!`, `提示`, {
|
|
|
|
this.$alert(`最大值不能为空!`, `提示`, {
|
|
|
|
@ -1050,29 +1064,15 @@ export default {
|
|
|
|
type: 'Danger'
|
|
|
|
type: 'Danger'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*if(!Vote.vDescription){
|
|
|
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
this.$alert(`评分详情描述不能为空!`, `提示`, {
|
|
|
|
|
|
|
|
type: 'Danger'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(row.typeId===1){
|
|
|
|
if(row.typeId===1){
|
|
|
|
Vote.voteItems = '1,2,3,4'
|
|
|
|
Vote.voteItems = '1,2,3,4'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (Vote.id != null && flag ) {
|
|
|
|
if (Vote.id != null && flag ) {
|
|
|
|
/*if(Vote.voteItems){
|
|
|
|
|
|
|
|
Vote.voteItems = Vote.voteItems.join(',')
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
updateVote(Vote).then(response => {
|
|
|
|
updateVote(Vote).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功")
|
|
|
|
this.$modal.msgSuccess("修改成功")
|
|
|
|
this.cancelVote()
|
|
|
|
this.cancelVote()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else if(Vote.id === null && flag){
|
|
|
|
} else if(Vote.id === null && flag){
|
|
|
|
/*if(Vote.voteItems){
|
|
|
|
|
|
|
|
Vote.voteItems = Vote.voteItems.join(',')
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
Vote.state = '0'
|
|
|
|
Vote.state = '0'
|
|
|
|
addVote(Vote).then(response => {
|
|
|
|
addVote(Vote).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
@ -1087,27 +1087,6 @@ export default {
|
|
|
|
goVotepage(row){
|
|
|
|
goVotepage(row){
|
|
|
|
this.$router.push({ path: '/votepage', query: { id: row.vote.id }});
|
|
|
|
this.$router.push({ path: '/votepage', query: { id: row.vote.id }});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 生成评分账号
|
|
|
|
|
|
|
|
handleAddsUser(row){
|
|
|
|
|
|
|
|
this.$prompt('请输入生成数量', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
|
|
inputPattern: /^([1-9][0-9]){1,3}$/,
|
|
|
|
|
|
|
|
inputErrorMessage: '生成数量格式不正确'
|
|
|
|
|
|
|
|
}).then(({ value }) => {
|
|
|
|
|
|
|
|
addsUser({
|
|
|
|
|
|
|
|
pcId: 1,
|
|
|
|
|
|
|
|
num: value
|
|
|
|
|
|
|
|
}).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("生成成功")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
viewUser(){
|
|
|
|
|
|
|
|
this.$router.push({ path: '/system/user', query: { pcId: 1}});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getVoteItemsList() {
|
|
|
|
getVoteItemsList() {
|
|
|
|
listVote_items({
|
|
|
|
listVote_items({
|
|
|
|
pageSize: 1000000,
|
|
|
|
pageSize: 1000000,
|
|
|
|
@ -1156,20 +1135,24 @@ export default {
|
|
|
|
this.emp.queryParams.deptId = data.id;
|
|
|
|
this.emp.queryParams.deptId = data.id;
|
|
|
|
this.empQuery();
|
|
|
|
this.empQuery();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
goTotalScore(row){
|
|
|
|
// 生成考核得分
|
|
|
|
this.khdf.list = [];
|
|
|
|
goKaoHeScore(row){
|
|
|
|
this.khdf.tableHeader = [];
|
|
|
|
|
|
|
|
this.khdf.open = true;
|
|
|
|
|
|
|
|
generateResult({
|
|
|
|
generateResult({
|
|
|
|
id: row.id,
|
|
|
|
id: row.id,
|
|
|
|
pcTitle: row.pcTitle,
|
|
|
|
pcTitle: row.pcTitle,
|
|
|
|
bkhdxType: row.bkhdxType,
|
|
|
|
bkhdxType: row.bkhdxType,
|
|
|
|
}).then(response => {
|
|
|
|
}).then(response => {
|
|
|
|
this.getListKhResult(row.id)
|
|
|
|
this.$modal.msgSuccess("生成成功")
|
|
|
|
}).catch(e=>{
|
|
|
|
|
|
|
|
this.getListKhResult(row.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 查看考核得分
|
|
|
|
|
|
|
|
viewKaoHeScore(row){
|
|
|
|
|
|
|
|
this.khdf.list = [];
|
|
|
|
|
|
|
|
this.khdf.tableHeader = [];
|
|
|
|
|
|
|
|
this.khdf.open = true;
|
|
|
|
|
|
|
|
this.getListKhResult(row.id);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取考核得分列表
|
|
|
|
getListKhResult(pcId){
|
|
|
|
getListKhResult(pcId){
|
|
|
|
listKh_result({
|
|
|
|
listKh_result({
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
@ -1177,7 +1160,6 @@ export default {
|
|
|
|
pcId: pcId,
|
|
|
|
pcId: pcId,
|
|
|
|
}).then(response => {
|
|
|
|
}).then(response => {
|
|
|
|
this.khdf.list = JSON.parse(response.rows[0].tableData);
|
|
|
|
this.khdf.list = JSON.parse(response.rows[0].tableData);
|
|
|
|
|
|
|
|
|
|
|
|
let btTabelTree = JSON.parse(response.rows[0].tableHeader);
|
|
|
|
let btTabelTree = JSON.parse(response.rows[0].tableHeader);
|
|
|
|
btTabelTree.forEach(item => {
|
|
|
|
btTabelTree.forEach(item => {
|
|
|
|
item.prop = item.name;
|
|
|
|
item.prop = item.name;
|
|
|
|
@ -1185,13 +1167,10 @@ export default {
|
|
|
|
this.setProp(item.children, item.prop)
|
|
|
|
this.setProp(item.children, item.prop)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
this.khdf.tableHeader = btTabelTree;
|
|
|
|
this.khdf.tableHeader = btTabelTree;
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this.khdf.list,8787);
|
|
|
|
|
|
|
|
console.log(this.khdf.tableHeader,9898);
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 递归函数 设置prop参数
|
|
|
|
setProp(list, prop){
|
|
|
|
setProp(list, prop){
|
|
|
|
list.forEach(item=>{
|
|
|
|
list.forEach(item=>{
|
|
|
|
if(prop){
|
|
|
|
if(prop){
|
|
|
|
@ -1203,6 +1182,44 @@ export default {
|
|
|
|
this.setProp(item.children, item.prop)
|
|
|
|
this.setProp(item.children, item.prop)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 生成评分账号
|
|
|
|
|
|
|
|
handleAddsUser(row){
|
|
|
|
|
|
|
|
this.scpfzh.form = {
|
|
|
|
|
|
|
|
deptId: null,
|
|
|
|
|
|
|
|
pcId: row.id,
|
|
|
|
|
|
|
|
items: null,
|
|
|
|
|
|
|
|
itemIds: null,
|
|
|
|
|
|
|
|
num: null,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.scpfzh.itemsOtions = []
|
|
|
|
|
|
|
|
getItemVote({
|
|
|
|
|
|
|
|
id: row.templateId,
|
|
|
|
|
|
|
|
pingceId: row.id,
|
|
|
|
|
|
|
|
}).then(response => {
|
|
|
|
|
|
|
|
this.scpfzh.itemsOtions = response.data.items
|
|
|
|
|
|
|
|
this.scpfzh.open = true;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 查看评分账号
|
|
|
|
|
|
|
|
viewUser(row){
|
|
|
|
|
|
|
|
this.$router.push({ path: '/system/user', query: { pcId: row.id}});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 提交生成评分账号
|
|
|
|
|
|
|
|
scpfzhSubmit(){
|
|
|
|
|
|
|
|
this.$refs["scpfzhForm"].validate(valid => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
this.scpfzh.form.itemIds = this.scpfzh.form.items.join(",")
|
|
|
|
|
|
|
|
addsUser(this.scpfzh.form).then(response => {
|
|
|
|
|
|
|
|
this.scpfzh.open = false;
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("生成成功")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 取消生成评分账号
|
|
|
|
|
|
|
|
scpfzhCancel(){
|
|
|
|
|
|
|
|
this.scpfzh.open = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|