|
|
|
|
@ -82,18 +82,23 @@
|
|
|
|
|
<el-table v-loading="loading" :data="pingceList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="主键" align="center" prop="id" />
|
|
|
|
|
<el-table-column label="考核名称" align="center" prop="pcTitle" />
|
|
|
|
|
<el-table-column label="评测名称" align="center" prop="pcTitle" />
|
|
|
|
|
<el-table-column label="考核描述" align="center" prop="pcDescription" />
|
|
|
|
|
<el-table-column label="模板名称" align="center" prop="templateName" />
|
|
|
|
|
<el-table-column label="评测结果Id" align="center" prop="pcResultId" />
|
|
|
|
|
<el-table-column label="评测状态" align="center" prop="state">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.kh_state" :value="scope.row.state"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="120px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-s-tools"
|
|
|
|
|
@click="handleSetUp(scope.row)"
|
|
|
|
|
>评测设置</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@ -283,15 +288,134 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 选择评测设置信息 -->
|
|
|
|
|
<el-dialog title="评测设置" :visible.sync="pcSetUp.open" width="1200px">
|
|
|
|
|
<el-table border v-loading="pcSetUp.loading" :data="pcSetUp.list">
|
|
|
|
|
<el-table-column label="考核项主键" align="center" prop="id" width="100"/>
|
|
|
|
|
<el-table-column label="考核名称" align="center" prop="itemName" min-width="120" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="投票主题" align="center" prop="vote" min-width="120" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.vote">{{ scope.row.vote.voteTitle }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="最大投票数" align="center" prop="vote" min-width="100" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.vote">{{ scope.row.vote.maxNum }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="评分占比" align="center" prop="vote" min-width="100" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.vote">{{ scope.row.vote.percentage }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="评测状态" align="center" prop="vote" min-width="100" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag v-if="scope.row.vote" :options="dict.type.kh_state" :value="scope.row.vote.state"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="开始时间" align="center" prop="vote" min-width="100" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.vote">{{ parseTime(scope.row.vote.sTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="结束时间" align="center" prop="vote" min-width="100" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.vote">{{ parseTime(scope.row.vote.eTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="详情描述" align="center" prop="vote" min-width="120" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.vote">{{ scope.row.vote.vDescription }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="vote" min-width="120" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.vote">{{ scope.row.vote.remark }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-s-tools"
|
|
|
|
|
@click="setUpTouPiao(scope.row)"
|
|
|
|
|
>投票评测设置</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="scope.row.vote && scope.row.vote.state === '1'"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-thumb"
|
|
|
|
|
@click="setUpTouPiao(scope.row)"
|
|
|
|
|
>去投票</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="tempCancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改投票评测对话框 -->
|
|
|
|
|
<el-dialog title="投票评测" :visible.sync="vote.open" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="touPiaoForm" :model="vote.form" :rules="vote.rules" label-width="90px">
|
|
|
|
|
<el-form-item label="投票主题" prop="voteTitle">
|
|
|
|
|
<el-input v-model="vote.form.voteTitle" placeholder="请输入投票主题" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="最大投票数" prop="maxNum">
|
|
|
|
|
<el-input v-model="vote.form.maxNum" placeholder="请输入最大投票数" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="评分占比" prop="percentage">
|
|
|
|
|
<el-input v-model="vote.form.percentage" placeholder="请输入评分占比" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="开始时间" prop="sTime">
|
|
|
|
|
<el-date-picker clearable style="width: 100%;"
|
|
|
|
|
v-model="vote.form.sTime"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择开始时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="结束时间" prop="eTime">
|
|
|
|
|
<el-date-picker clearable style="width: 100%;"
|
|
|
|
|
v-model="vote.form.eTime"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择结束时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="评测状态" prop="state">
|
|
|
|
|
<el-select v-model="vote.form.state" placeholder="请选择评测状态" clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.kh_state"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="详情描述" prop="vDescription">
|
|
|
|
|
<el-input v-model="vote.form.vDescription" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="vote.form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="voteSubmitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="voteCancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listPingce, getPingce, delPingce, addPingce, updatePingce } from "@/api/kaohe/pingce"
|
|
|
|
|
import { listPingce, getPingce, delPingce, addPingce, updatePingce, getItemVote } from "@/api/kaohe/pingce"
|
|
|
|
|
import { deptTreeSelect } from "@/api/system/user";
|
|
|
|
|
import { listTemplate } from "@/api/kaohe/template"
|
|
|
|
|
import { listEmployee } from "@/api/kaohe/employee"
|
|
|
|
|
import { addVote, updateVote } from "@/api/kaohe/vote"
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
|
|
|
|
@ -389,6 +513,48 @@ export default {
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
},
|
|
|
|
|
pcSetUp: {
|
|
|
|
|
open: false,
|
|
|
|
|
pingceId:undefined,
|
|
|
|
|
pingceName:undefined,
|
|
|
|
|
templateId:undefined,
|
|
|
|
|
list: []
|
|
|
|
|
},
|
|
|
|
|
vote:{
|
|
|
|
|
open: false,
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {
|
|
|
|
|
id: null,
|
|
|
|
|
voteTitle: null,
|
|
|
|
|
vDescription: null,
|
|
|
|
|
khitemId: null,
|
|
|
|
|
khitemName: null,
|
|
|
|
|
percentage: null,
|
|
|
|
|
pingceId: null,
|
|
|
|
|
pingceName: null,
|
|
|
|
|
sTime: null,
|
|
|
|
|
eTime: null,
|
|
|
|
|
maxNum: null,
|
|
|
|
|
state: null,
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null,
|
|
|
|
|
remark: null
|
|
|
|
|
},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
voteTitle: [
|
|
|
|
|
{ required: true, message: "投票主题不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
state: [
|
|
|
|
|
{ required: true, message: "评测状态不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
percentage:[
|
|
|
|
|
{ required: true, message: "评分占比不能为空", trigger: "blur" }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
@ -621,6 +787,76 @@ export default {
|
|
|
|
|
delEmpList(row,index){
|
|
|
|
|
this.form.pcEmps.splice(index,1)
|
|
|
|
|
},
|
|
|
|
|
// 评测设置
|
|
|
|
|
handleSetUp(row){
|
|
|
|
|
this.pcSetUp.pingceId = row.id;
|
|
|
|
|
this.pcSetUp.pingceName = row.pcTitle;
|
|
|
|
|
this.pcSetUp.templateId = row.templateId;
|
|
|
|
|
this.pcSetUp.open = true;
|
|
|
|
|
this.getItemVote()
|
|
|
|
|
},
|
|
|
|
|
getItemVote(){
|
|
|
|
|
getItemVote({
|
|
|
|
|
id: this.pcSetUp.templateId,
|
|
|
|
|
pingceId: this.pcSetUp.pingceId,
|
|
|
|
|
}).then(response => {
|
|
|
|
|
this.pcSetUp.list = response.data.items;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 投票评测设置
|
|
|
|
|
setUpTouPiao(row){
|
|
|
|
|
this.vote.open = true;
|
|
|
|
|
if(row.vote){
|
|
|
|
|
this.vote.form = row.vote;
|
|
|
|
|
}else {
|
|
|
|
|
this.vote.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
voteTitle: null,
|
|
|
|
|
vDescription: null,
|
|
|
|
|
khitemId: null,
|
|
|
|
|
khitemName: null,
|
|
|
|
|
percentage: null,
|
|
|
|
|
pingceId: null,
|
|
|
|
|
pingceName: null,
|
|
|
|
|
sTime: null,
|
|
|
|
|
eTime: null,
|
|
|
|
|
maxNum: null,
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null,
|
|
|
|
|
remark: null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.vote.form.khitemId = row.id;
|
|
|
|
|
this.vote.form.khitemName = row.itemName;
|
|
|
|
|
this.vote.form.pingceId = this.pcSetUp.pingceId;
|
|
|
|
|
this.vote.form.pingceName = this.pcSetUp.pingceName;
|
|
|
|
|
},
|
|
|
|
|
voteSubmitForm(){
|
|
|
|
|
this.$refs["touPiaoForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
|
|
console.log(this.vote.form);
|
|
|
|
|
if (this.vote.form.id != null) {
|
|
|
|
|
updateVote(this.vote.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功")
|
|
|
|
|
this.vote.open = false
|
|
|
|
|
this.getItemVote()
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
addVote(this.vote.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
|
this.vote.open = false
|
|
|
|
|
this.getItemVote()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
voteCancel(){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|