youhua
This commit is contained in:
parent
fe31203171
commit
2a74174d93
@ -69,7 +69,7 @@
|
|||||||
::-webkit-scrollbar
|
::-webkit-scrollbar
|
||||||
{
|
{
|
||||||
width: 2px;
|
width: 2px;
|
||||||
height: 2px;
|
height: 8px;
|
||||||
background: #409EFF;
|
background: #409EFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@
|
|||||||
/*定义滑块 内阴影+圆角*/
|
/*定义滑块 内阴影+圆角*/
|
||||||
::-webkit-scrollbar-thumb
|
::-webkit-scrollbar-thumb
|
||||||
{
|
{
|
||||||
border-radius: 1px;
|
border-radius:4px;
|
||||||
-webkit-box-shadow: inset 0 0 2px #409EFF;
|
-webkit-box-shadow: inset 0 0 2px #409EFF;
|
||||||
background: #409EFF;
|
background: #409EFF;
|
||||||
}
|
}
|
||||||
@ -35,6 +35,7 @@ import {
|
|||||||
MenuItem,
|
MenuItem,
|
||||||
Loading,
|
Loading,
|
||||||
Image,
|
Image,
|
||||||
|
Transfer,
|
||||||
Avatar
|
Avatar
|
||||||
} from 'element-ui'
|
} from 'element-ui'
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ Vue.prototype.$message = Message
|
|||||||
Vue.prototype.$confirm = MessageBox.confirm
|
Vue.prototype.$confirm = MessageBox.confirm
|
||||||
Vue.prototype.$alert = MessageBox.alert
|
Vue.prototype.$alert = MessageBox.alert
|
||||||
|
|
||||||
|
Vue.use(Transfer)
|
||||||
Vue.use(Tabs)
|
Vue.use(Tabs)
|
||||||
Vue.use(TabPane)
|
Vue.use(TabPane)
|
||||||
Vue.use(Cascader)
|
Vue.use(Cascader)
|
||||||
|
|||||||
@ -176,6 +176,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleGetNext () {
|
async handleGetNext () {
|
||||||
const arr = this.handleFilter(this.obj.recortModelDtos)
|
const arr = this.handleFilter(this.obj.recortModelDtos)
|
||||||
|
console.log('arr: ', arr)
|
||||||
for (let i in arr) {
|
for (let i in arr) {
|
||||||
if (arr[i].detailDtos.length > 0 && !arr[i].isTrue) {
|
if (arr[i].detailDtos.length > 0 && !arr[i].isTrue) {
|
||||||
this.$message.error(arr[i].name + '维度内的权重和必须为' + Math.round((arr[i].weight * 100) * 1000) / 1000)
|
this.$message.error(arr[i].name + '维度内的权重和必须为' + Math.round((arr[i].weight * 100) * 1000) / 1000)
|
||||||
@ -185,14 +186,12 @@ export default {
|
|||||||
let res1 = await apiSaveDetail(this.obj)
|
let res1 = await apiSaveDetail(this.obj)
|
||||||
if (res1.code !== 200) {
|
if (res1.code !== 200) {
|
||||||
this.$message.error(res1.msg)
|
this.$message.error(res1.msg)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
const obj = {status: 1, menuName: '制定了目标'}
|
const obj = {status: 1, menuName: '制定了目标'}
|
||||||
const params = Object.assign({}, {resultRecordId: this.$route.query.id || ''}, obj)
|
const params = Object.assign({}, {resultRecordId: this.$route.query.id || ''}, obj)
|
||||||
let res = await apiSaveapproval(params)
|
let res = await apiSaveapproval(params)
|
||||||
if (res.code !== 200) {
|
if (res.code !== 200) {
|
||||||
this.$message.error(res.msg || '出错了 ')
|
this.$message.error(res.msg || '出错了 ')
|
||||||
return
|
|
||||||
}
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@ -214,7 +213,7 @@ export default {
|
|||||||
num += i.isDelete !== 1 ? i.checkWeight : 0
|
num += i.isDelete !== 1 ? i.checkWeight : 0
|
||||||
return num
|
return num
|
||||||
}, 0)
|
}, 0)
|
||||||
arr.isTrue = weight === arr.weight
|
arr.isTrue = (Math.round((weight * 100) * 1000) / 1000) === (Math.round((arr.weight * 100) * 1000) / 1000)
|
||||||
return Math.round((weight * 100) * 1000) / 1000
|
return Math.round((weight * 100) * 1000) / 1000
|
||||||
},
|
},
|
||||||
async handleSaveDetail (params = this.obj) {
|
async handleSaveDetail (params = this.obj) {
|
||||||
|
|||||||
@ -3,13 +3,15 @@
|
|||||||
<div v-if="obj.recortModelDtos.length !== 0" class="table-list commonFont">
|
<div v-if="obj.recortModelDtos.length !== 0" class="table-list commonFont">
|
||||||
<div class="table-header">
|
<div class="table-header">
|
||||||
<div class="table-left name">维度</div>
|
<div class="table-left name">维度</div>
|
||||||
<div class="table-header-flex names ">名称</div>
|
<div class="table-content-right-item" style="flex:1;">
|
||||||
<div class="table-header-flex kaohe">考核标准</div>
|
<div class="table-header-flex names ">名称</div>
|
||||||
<div class="table-header-flex jieguo" v-if="tableInfo.result || tableAuth.showResult">结果值</div>
|
<div class="table-header-flex pre kaohe">考核标准</div>
|
||||||
<div class="table-header-flex quanzhomng" style="flex:none;">权重({{obj.weight*100}}%)</div>
|
<div class="table-header-flex jieguo" v-if="tableInfo.result || tableAuth.showResult">结果值</div>
|
||||||
<div class="table-header-flex" style="flex:none;width:130px;" v-if="tableInfo.score || tableAuth.showScore">上级评分</div>
|
<div class="table-header-flex quanzhomng" style="flex:none;">权重({{obj.weight*100}}%)</div>
|
||||||
<div class="table-header-flex quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">得分</div>
|
<div class="table-header-flex" style="flex:none;width:130px;" v-if="tableInfo.score || tableAuth.showScore">上级评分</div>
|
||||||
<div class="table-header-flex" v-if="tableInfo.score || tableAuth.showScore">评分说明</div>
|
<div class="table-header-flex quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">得分</div>
|
||||||
|
<div class="table-header-flex" style="min-width: 200px;" v-if="tableInfo.score || tableAuth.showScore">评分说明</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-for="(item,index) in ((tableInfo.score || tableAuth.showScore)?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))" :key="index" class="table-content">
|
<div v-for="(item,index) in ((tableInfo.score || tableAuth.showScore)?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))" :key="index" class="table-content">
|
||||||
@ -23,7 +25,7 @@
|
|||||||
<div class="names">
|
<div class="names">
|
||||||
<span> {{child.target || ''}}</span>
|
<span> {{child.target || ''}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="kaohe">
|
<div class="kaohe pre">
|
||||||
<pre >
|
<pre >
|
||||||
{{child.keyResult || ''}}
|
{{child.keyResult || ''}}
|
||||||
</pre>
|
</pre>
|
||||||
@ -51,7 +53,7 @@
|
|||||||
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
||||||
<span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || '--'}}</span>
|
<span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || '--'}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class='pre' style="padding:10px;" v-if="tableInfo.score || tableAuth.showScore">
|
<div class='pre' style="padding:10px;min-width: 200px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||||
<el-input v-if="tableInfo.score" style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
|
<el-input v-if="tableInfo.score" style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
|
||||||
<span v-else>{{child.scoreComment || '--'}}</span>
|
<span v-else>{{child.scoreComment || '--'}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -60,7 +62,7 @@
|
|||||||
<div v-if="item.detailDtos.length ===0 && item.name !=='总分'" class="table-content-right-item">
|
<div v-if="item.detailDtos.length ===0 && item.name !=='总分'" class="table-content-right-item">
|
||||||
<div class="names">
|
<div class="names">
|
||||||
</div>
|
</div>
|
||||||
<div class="kaohe">
|
<div class="kaohe pre">
|
||||||
</div>
|
</div>
|
||||||
<div class='jieguo' v-if="tableInfo.result || tableAuth.showResult">
|
<div class='jieguo' v-if="tableInfo.result || tableAuth.showResult">
|
||||||
</div>
|
</div>
|
||||||
@ -72,13 +74,13 @@
|
|||||||
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="padding:10px;" v-if="tableInfo.score || tableAuth.showScore">
|
<div style="padding:10px;min-width: 200px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.name==='总分'" class="table-content-right-item">
|
<div v-if="item.name==='总分'" class="table-content-right-item">
|
||||||
<div class="names">
|
<div class="names">
|
||||||
</div>
|
</div>
|
||||||
<div class="kaohe">
|
<div class="kaohe pre">
|
||||||
</div>
|
</div>
|
||||||
<div class='jieguo' v-if="tableInfo.result || tableAuth.showResult">
|
<div class='jieguo' v-if="tableInfo.result || tableAuth.showResult">
|
||||||
</div>
|
</div>
|
||||||
@ -90,7 +92,7 @@
|
|||||||
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
||||||
{{score.lastScore}}
|
{{score.lastScore}}
|
||||||
</div>
|
</div>
|
||||||
<div style="padding:10px;" v-if="tableInfo.score || tableAuth.showScore">
|
<div style="padding:10px;min-width: 200px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -249,12 +251,14 @@ export default {
|
|||||||
flex: none !important;
|
flex: none !important;
|
||||||
}
|
}
|
||||||
.name{
|
.name{
|
||||||
|
.center();
|
||||||
flex: none !important;
|
flex: none !important;
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
}
|
}
|
||||||
.kaohe{
|
.kaohe{
|
||||||
width: 300px !important;
|
width: 300px !important;
|
||||||
display: block;
|
display: block;
|
||||||
|
flex: none;
|
||||||
pre{
|
pre{
|
||||||
white-space:pre-line;
|
white-space:pre-line;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
@ -271,25 +275,28 @@ export default {
|
|||||||
border-bottom: 1px solid @borderColor;
|
border-bottom: 1px solid @borderColor;
|
||||||
}
|
}
|
||||||
.table-list{
|
.table-list{
|
||||||
|
overflow: auto;
|
||||||
border: 1px solid @borderColor;
|
border: 1px solid @borderColor;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
|
|
||||||
}
|
}
|
||||||
.table-header{
|
.table-header{
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #f5f5f5;
|
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
border-bottom: 1px solid @borderColor;;
|
|
||||||
// border: 1px solid @borderColor;
|
// border: 1px solid @borderColor;
|
||||||
>div{
|
>div{
|
||||||
padding: 10px;
|
background: #f5f5f5;
|
||||||
|
// padding: 10px;
|
||||||
|
border-bottom: 1px solid @borderColor;;
|
||||||
border-right: 1px solid @borderColor;;
|
border-right: 1px solid @borderColor;;
|
||||||
}
|
}
|
||||||
>div:last-child{
|
>div:last-child{
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
&-flex{
|
&-flex{
|
||||||
flex: 1;
|
// flex: 1;
|
||||||
// .center();
|
// .center();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -321,7 +328,8 @@ export default {
|
|||||||
// justify-content: space-between;
|
// justify-content: space-between;
|
||||||
// align-items: center;
|
// align-items: center;
|
||||||
>div{
|
>div{
|
||||||
flex: 1;
|
// flex: 1;
|
||||||
|
height: 100%;
|
||||||
border-bottom: 1px solid @borderColor;;
|
border-bottom: 1px solid @borderColor;;
|
||||||
}
|
}
|
||||||
>div:last-child{
|
>div:last-child{
|
||||||
@ -342,7 +350,7 @@ export default {
|
|||||||
// flex: 1;
|
// flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
>div{
|
>div{
|
||||||
flex: 1;
|
// flex: 1;
|
||||||
// .center();
|
// .center();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,7 +94,6 @@ export default {
|
|||||||
this.departmentIds = list.value
|
this.departmentIds = list.value
|
||||||
this.personnelList = list
|
this.personnelList = list
|
||||||
this.handleDetailReq()
|
this.handleDetailReq()
|
||||||
console.log('list: ', list)
|
|
||||||
this.showDialogDepart = false
|
this.showDialogDepart = false
|
||||||
},
|
},
|
||||||
handlePush (item) {
|
handlePush (item) {
|
||||||
|
|||||||
@ -0,0 +1,387 @@
|
|||||||
|
<!-- -->
|
||||||
|
<template>
|
||||||
|
<div class="basis">
|
||||||
|
<div class="basis-title commonFont">
|
||||||
|
基本信息
|
||||||
|
</div>
|
||||||
|
<div class="basis-form">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="考评组名称:" prop="name">
|
||||||
|
<el-input
|
||||||
|
size="small"
|
||||||
|
v-model="form.name" placeholder="请输入名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="周期类型:">
|
||||||
|
<el-radio-group v-model="form.radio">
|
||||||
|
<el-radio
|
||||||
|
v-for="(i,index) in zhouqi"
|
||||||
|
:key="index"
|
||||||
|
:label="i.id">{{i.name}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="考评组管理员:" >
|
||||||
|
<el-tooltip class="item" effect="light" placement="right">
|
||||||
|
<div slot="content">
|
||||||
|
考评组管理员<br/>
|
||||||
|
只有考评组管理员可以编辑这个考评组,<br/>
|
||||||
|
权限为全部考评组的管理员默认可以管理<br/>
|
||||||
|
所有考评组,考评组管理员只能从智能绩<br/>
|
||||||
|
效的管理员中选择
|
||||||
|
</div>
|
||||||
|
<el-input
|
||||||
|
@focus='showRight=true'
|
||||||
|
style="width:300px;cursor: pointer;"
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择考评组管理员"
|
||||||
|
readonly
|
||||||
|
:value="Ground.title?(Ground.title+ ' 等'+ Ground.list.length + '人'):''">
|
||||||
|
<i @click='showRight=true' slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||||
|
</el-input>
|
||||||
|
</el-tooltip>
|
||||||
|
<div class="commonFont" style="font-size:12px">设置哪些管理员可以管理该考评组</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="被考核人员" prop="name">
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="考评员工:">
|
||||||
|
<div v-if="showData.list.length>0">
|
||||||
|
<el-input
|
||||||
|
@focus="handleGetChoose('isShow')"
|
||||||
|
style="width:300px;cursor: pointer;"
|
||||||
|
size="small"
|
||||||
|
:value ="showData.title + '等' + showData.list.length + '个部门' || '请选择部门'"
|
||||||
|
readonly>
|
||||||
|
<i @click="handleGetChoose('isShow')" slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||||
|
</el-input>
|
||||||
|
<i @click="handleClearList('showData')" style="margin-left:10px;cursor: pointer;" class="el-icon-delete"></i>
|
||||||
|
</div>
|
||||||
|
<div v-if="personnelList.list.length>0">
|
||||||
|
<el-input
|
||||||
|
@focus="handleGetChoose('isShowPersonnel')"
|
||||||
|
style="width:300px;cursor: pointer;"
|
||||||
|
size="small"
|
||||||
|
:value ="personnelList.list[0].name + '等' + personnelList.list.length + '个人'"
|
||||||
|
readonly>
|
||||||
|
<i @click="handleGetChoose('isShowPersonnel')" slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||||
|
</el-input>
|
||||||
|
<i @click="handleClearList('personnelList')" style="margin-left:10px;cursor: pointer;" class="el-icon-delete"></i>
|
||||||
|
</div>
|
||||||
|
<el-button size='mini' @click="handleGetChoose('isShow')" icon="el-icon-plus">选部门</el-button>
|
||||||
|
<!-- <el-button size='mini' @click="handleGetChoose" icon="el-icon-plus">选角色</el-button> -->
|
||||||
|
<el-button size='mini' @click="handleGetChoose('isShowPersonnel')" icon="el-icon-plus">选人员</el-button>
|
||||||
|
<div class="commonFont" style="font-size:12px">
|
||||||
|
按部门设置,新加入部门的员工将自动加入考评组
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="showData.list.length>0" label="无需考评人员:">
|
||||||
|
<div v-if="outIdsLsit.list.length>0">
|
||||||
|
<el-input
|
||||||
|
@focus="handleGetChoose('isSshowOutIds')"
|
||||||
|
style="width:300px;cursor: pointer;"
|
||||||
|
size="small"
|
||||||
|
:value ="outIdsLsit.list[0].name + '等' + outIdsLsit.list.length + '个人'"
|
||||||
|
readonly>
|
||||||
|
<i @clcik="handleGetChoose('isSshowOutIds')" slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||||
|
</el-input>
|
||||||
|
<i @click="handleClearList('outIdsLsit')" style="margin-left:10px;cursor: pointer;" class="el-icon-delete"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <el-button size='mini' @click="handleGetChoose(0)" icon="el-icon-plus">选部门</el-button> -->
|
||||||
|
<!-- <el-button size='mini' @click="handleGetChoose" icon="el-icon-plus">选角色</el-button> -->
|
||||||
|
<el-button size='mini' @click="handleGetChoose('isSshowOutIds')" icon="el-icon-plus">选人员</el-button>
|
||||||
|
<div class="commonFont" style="font-size:12px">
|
||||||
|
从已选部门中排除无需在本考评组或无需考核的人员
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<getPersonnel @cb='handleCheckOutIds' v-if="isSshowOutIds" :value.sync='form.outIds' :isShow.sync='isSshowOutIds' :showDataList.sync='outIdsLsit'/>
|
||||||
|
<getPersonnel @cb='handleCheckStaffIds' v-if="isShowPersonnel" :value.sync='form.staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
|
||||||
|
<get-depart @cb='handleCheckDepIds' v-if="isShow" :value.sync='form.depIds' :isShow.sync='isShow' :showDataList.sync='showData'/>
|
||||||
|
<popup-right v-if="showRight" @cancel='handleCancel' @submit="handleSubmit" title="选择考评组管理员">
|
||||||
|
<div slot="content" class="chooseManage">
|
||||||
|
<div v-for="i in GroundList" :key="i.staffId" class="chooseManage-item" >
|
||||||
|
<el-checkbox :true-label='1' :false-label='0' :disabled='i.isDisable===1' :checked='i.isDisable===1' v-model='i.isSelect'></el-checkbox><span class='commonFont' style="margin:0 0 0 10px;">{{i.staffName}} </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</popup-right>
|
||||||
|
<el-dialog title="将重复的人员进行归位" :visible.sync="dialogTableVisible">
|
||||||
|
<el-transfer :props="options" :titles="transferTitle" v-model="mobileList" :data="repeatList"></el-transfer>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogTableVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleChangeList">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import getDepart from '@/components/getDepart'
|
||||||
|
import getPersonnel from '@/components/getPersonnel'
|
||||||
|
import PopupRight from '@/components/PopupRight'
|
||||||
|
import { getGround } from '@/api/data'
|
||||||
|
import { getByIdForBasis, apiCheckStaff } from '@/api/workbench'
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
basisForm: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
counts: '', // 参与考核人数
|
||||||
|
depIds: '', // 参与部门id,逗号隔开
|
||||||
|
managerIdList: [],
|
||||||
|
managerIds: '', // 绩效管理员ID,system_user,id,逗号隔开
|
||||||
|
outIds: '', // 排除人员ids,逗号隔开
|
||||||
|
staffIds: '', // 参与考核员工staff_id,逗号隔开
|
||||||
|
name: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
repeatList: [],
|
||||||
|
mobileList: [],
|
||||||
|
chooseList: [],
|
||||||
|
options: {key: 'staffId', label: 'name'},
|
||||||
|
transferTitle: ['排除人员', '参评人员'],
|
||||||
|
dialogTableVisible: false,
|
||||||
|
id: '',
|
||||||
|
GroundList: [],
|
||||||
|
GroundList1: [],
|
||||||
|
isSshowOutIds: false,
|
||||||
|
outIdsLsit: {
|
||||||
|
list: []
|
||||||
|
},
|
||||||
|
showRight: false,
|
||||||
|
isShow: false,
|
||||||
|
isShowPersonnel: false,
|
||||||
|
personnelList: {
|
||||||
|
list: []
|
||||||
|
},
|
||||||
|
showData: {
|
||||||
|
list: []
|
||||||
|
}, // 部门信息
|
||||||
|
form: {
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入考评组', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
getDepart,
|
||||||
|
getPersonnel,
|
||||||
|
PopupRight
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
Ground () {
|
||||||
|
const params = {
|
||||||
|
list: [],
|
||||||
|
title: '',
|
||||||
|
managerIds: ''
|
||||||
|
}
|
||||||
|
params.list = this.GroundList1.filter(i => i.isSelect === 1)
|
||||||
|
params.list.map((i, index) => {
|
||||||
|
params.managerIds += i.staffId + ','
|
||||||
|
if (index < 2) params.title += i.staffName.split(' ')[0] + ','
|
||||||
|
})
|
||||||
|
params.managerIds = params.managerIds.substring(0, params.managerIds.length - 1)
|
||||||
|
params.title = params.title.substring(0, params.title.length - 1)
|
||||||
|
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
||||||
|
this.form.managerIds = params.managerIds
|
||||||
|
return params
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeMount () {},
|
||||||
|
async mounted () {
|
||||||
|
this.$loadingStart()
|
||||||
|
await this.handleGetGround()
|
||||||
|
const id = this.$route.query.id || ''
|
||||||
|
this.id = id
|
||||||
|
if (id) {
|
||||||
|
await this.handleGetByIdForBasis(id)
|
||||||
|
}
|
||||||
|
this.$loadingEnd()
|
||||||
|
this.form = this.basisForm
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChangeList (diff) {
|
||||||
|
console.log('repeatList: ', this.repeatList)
|
||||||
|
console.log('mobileList: ', this.mobileList)
|
||||||
|
},
|
||||||
|
handleClearList (item) {
|
||||||
|
this[item].list = []
|
||||||
|
if (item === 'outIdsLsit') {
|
||||||
|
this.form.outIds = ''
|
||||||
|
}
|
||||||
|
if (item === 'personnelList') {
|
||||||
|
this.form.staffIds = ''
|
||||||
|
}
|
||||||
|
if (item === 'showData') {
|
||||||
|
this.form.depIds = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDifferec (list, choose) {
|
||||||
|
this.repeatList = list
|
||||||
|
this.chooseList = choose
|
||||||
|
this.dialogTableVisible = true
|
||||||
|
},
|
||||||
|
handleCheckOutIds (item) {
|
||||||
|
this.transferTitle = ['排除人员', '参评人员']
|
||||||
|
this.handleDifferec(this._.intersectionBy(this.personnelList.list, item.list, 'staffId'), ['outIdsLsit', 'personnelList'])
|
||||||
|
this.dialogTableVisible = true
|
||||||
|
console.log(this._.intersectionBy(this.personnelList.list, item.list, 'staffId'))
|
||||||
|
// this.form.outIds = item.value
|
||||||
|
// this.outIdsLsit = item
|
||||||
|
// this.isSshowOutIds = false
|
||||||
|
},
|
||||||
|
async handleCheckStaffIds (item) {
|
||||||
|
const params = Object.assign({}, this.form, {staffIds: item.value})
|
||||||
|
const bool = await this.handleCheckStaff(params)
|
||||||
|
if (bool) {
|
||||||
|
this.form.staffIds = item.value
|
||||||
|
this.personnelList = item
|
||||||
|
this.isShowPersonnel = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleCheckDepIds (item) {
|
||||||
|
const params = Object.assign({}, this.form, {depIds: item.value})
|
||||||
|
const bool = await this.handleCheckStaff(params)
|
||||||
|
if (bool) {
|
||||||
|
this.form.depIds = item.value
|
||||||
|
this.showData = item
|
||||||
|
this.isShow = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleCheckStaff (parmas = this.form) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let res = await apiCheckStaff(Object.assign({}, parmas, {confirm: 0, id: this.$route.query.id || ''}))
|
||||||
|
if (res.code === 504) {
|
||||||
|
this.$confirm(res.msg, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
resolve(true)
|
||||||
|
}).catch(() => {
|
||||||
|
resolve(false)
|
||||||
|
})
|
||||||
|
} else if (res.code === 200) {
|
||||||
|
resolve(true)
|
||||||
|
} else {
|
||||||
|
resolve(false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取基础设置
|
||||||
|
async handleGetByIdForBasis (id) {
|
||||||
|
try {
|
||||||
|
let res = await getByIdForBasis({id})
|
||||||
|
res = res.data
|
||||||
|
this.GroundList1 = res.managers ? res.managers.map(i => {
|
||||||
|
i.staffId = i.id
|
||||||
|
i.staffName = i.name
|
||||||
|
i.isSelect = 1
|
||||||
|
this.GroundList = this.GroundList.map(j => {
|
||||||
|
if (i.staffId === j.staffId) {
|
||||||
|
i = Object.assign({}, j, i)
|
||||||
|
j.isSelect = 1
|
||||||
|
}
|
||||||
|
return j
|
||||||
|
})
|
||||||
|
return i
|
||||||
|
}) : []
|
||||||
|
|
||||||
|
const obj = {
|
||||||
|
id: this.$route.query.copy ? '' : res.id,
|
||||||
|
name: this.$route.query.copy ? '' : res.name
|
||||||
|
}
|
||||||
|
if (res.deps && res.deps.length !== 0 && !this.$route.query.copy) {
|
||||||
|
const b = this.$personlGetForm(res.outs)
|
||||||
|
this.outIdsLsit = b
|
||||||
|
obj.outIds = b.value
|
||||||
|
}
|
||||||
|
if (!this.$route.query.copy) {
|
||||||
|
const a = this.$personlGetForm(res.staffs)
|
||||||
|
const c = this.$departGetForm(res.deps)
|
||||||
|
obj.staffIds = a.value
|
||||||
|
obj.depIds = c.value
|
||||||
|
this.personnelList = a
|
||||||
|
this.showData = c
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form = obj
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error(error.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleGetGround () {
|
||||||
|
try {
|
||||||
|
let res = await getGround({groupId: 1})
|
||||||
|
res = res.data
|
||||||
|
res = res.map(i => {
|
||||||
|
i.isDisable = i.isSelect
|
||||||
|
return i
|
||||||
|
})
|
||||||
|
this.GroundList = JSON.parse(JSON.stringify(res))
|
||||||
|
this.GroundList1 = JSON.parse(JSON.stringify(res))
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error(error.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.GroundList = JSON.parse(JSON.stringify(this.GroundList1))
|
||||||
|
this.showRight = false
|
||||||
|
},
|
||||||
|
handleSubmit () {
|
||||||
|
this.GroundList1 = JSON.parse(JSON.stringify(this.GroundList))
|
||||||
|
this.showRight = false
|
||||||
|
},
|
||||||
|
handleGetChoose (item) {
|
||||||
|
this[item] = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
form: {
|
||||||
|
deep: true,
|
||||||
|
handler (n, o) {
|
||||||
|
this.$emit('update:basisForm', n)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.basis{
|
||||||
|
.el-transfer{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang='less' scoped>
|
||||||
|
.basis{
|
||||||
|
&-title{
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
&-form{
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.chooseManage-item{
|
||||||
|
min-width: 300px;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid @borderColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user