|
|
@@ -1,10 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="assessing-content ele-body"> |
|
|
|
<el-card |
|
|
|
shadow="never" |
|
|
|
v-loading="loading" |
|
|
|
element-loading-background="rgba(255, 255, 255, 1)" |
|
|
|
> |
|
|
|
<el-card shadow="never" element-loading-background="rgba(255, 255, 255, 1)"> |
|
|
|
<search :type="3" @search:task="updateParams($event)" /> |
|
|
|
<div class="operating"> |
|
|
|
<el-button size="small" type="primary">导出</el-button> |
|
|
@@ -14,6 +10,7 @@ |
|
|
|
:data="dataList" |
|
|
|
:height="tableHeight" |
|
|
|
border |
|
|
|
v-loading="loading" |
|
|
|
:span-method="arraySpanMethod" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
@@ -118,205 +115,205 @@ |
|
|
|
/> |
|
|
|
</el-card> |
|
|
|
<el-dialog |
|
|
|
title="编辑考核内容" |
|
|
|
:visible.sync="showEdit" |
|
|
|
width="675px" |
|
|
|
custom-class="ele-dialog-form" |
|
|
|
:lock-scroll="false" |
|
|
|
:destroy-on-close="true" |
|
|
|
@closed="form = {}" |
|
|
|
> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title">考核内容:</el-col> |
|
|
|
<el-col :span="18" |
|
|
|
><el-input |
|
|
|
type="textarea" |
|
|
|
:rows="4" |
|
|
|
placeholder="请输入考核内容" |
|
|
|
v-model="form.itemContent" |
|
|
|
></el-input |
|
|
|
></el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title"> 牵头部门: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
title="编辑考核内容" |
|
|
|
:visible.sync="showEdit" |
|
|
|
width="675px" |
|
|
|
custom-class="ele-dialog-form" |
|
|
|
:lock-scroll="false" |
|
|
|
:destroy-on-close="true" |
|
|
|
@closed="form = {}" |
|
|
|
> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title">考核内容:</el-col> |
|
|
|
<el-col :span="18" |
|
|
|
><el-input |
|
|
|
type="textarea" |
|
|
|
:rows="4" |
|
|
|
placeholder="请输入考核内容" |
|
|
|
v-model="form.itemContent" |
|
|
|
></el-input |
|
|
|
></el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title"> 牵头部门: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
@select="changePrincipal($event, 'leader')" |
|
|
|
v-model="form.leaderDept" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择牵头部门" |
|
|
|
:defaultExpandLevel="2" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="title"> 责任领导: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
v-model="form.leaderPrincipal" |
|
|
|
:options="principalList" |
|
|
|
placeholder="请选择牵头部门责任领导" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.realname, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div class="leader"> |
|
|
|
v-model="form.leaderDept" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择牵头部门" |
|
|
|
:defaultExpandLevel="2" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="title"> 责任领导: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
v-model="form.leaderPrincipal" |
|
|
|
:options="principalList" |
|
|
|
placeholder="请选择牵头部门责任领导" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.realname, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div class="leader"> |
|
|
|
<span |
|
|
|
class="el-icon-circle-plus-outline add" |
|
|
|
@click="addDept('other')" |
|
|
|
></span> |
|
|
|
<div |
|
|
|
style="position: relative" |
|
|
|
v-for="(item, index) of form.otherDept" |
|
|
|
:key="index" |
|
|
|
> |
|
|
|
<span |
|
|
|
class="el-icon-circle-plus-outline add" |
|
|
|
@click="addDept('other')" |
|
|
|
class="el-icon-remove-outline delete" |
|
|
|
style="z-index: 10" |
|
|
|
@click="deleteDept(index, 'other')" |
|
|
|
></span> |
|
|
|
<div |
|
|
|
style="position: relative" |
|
|
|
v-for="(item, index) of form.otherDept" |
|
|
|
:key="index" |
|
|
|
> |
|
|
|
<span |
|
|
|
class="el-icon-remove-outline delete" |
|
|
|
style="z-index: 10" |
|
|
|
@click="deleteDept(index, 'other')" |
|
|
|
></span> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title"> 其他牵头部门: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
@select="changePrincipal($event, 'other',index)" |
|
|
|
v-model="form.otherDept[index]" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择其他牵头部门" |
|
|
|
:defaultExpandLevel="2" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="title"> 责任领导: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
v-model="form.otherPrincipal[index]" |
|
|
|
:options="principalList" |
|
|
|
placeholder="请选择其他牵头部门责任领导" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.realname, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title"> 其他牵头部门: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
@select="changePrincipal($event, 'other', index)" |
|
|
|
v-model="form.otherDept[index]" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择其他牵头部门" |
|
|
|
:defaultExpandLevel="2" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="title"> 责任领导: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
v-model="form.otherPrincipal[index]" |
|
|
|
:options="principalList" |
|
|
|
placeholder="请选择其他牵头部门责任领导" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.realname, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
<div class="cooperate"> |
|
|
|
</div> |
|
|
|
<div class="cooperate"> |
|
|
|
<span |
|
|
|
class="el-icon-circle-plus-outline add" |
|
|
|
@click="addDept('cooperate')" |
|
|
|
></span> |
|
|
|
<div |
|
|
|
style="position: relative" |
|
|
|
v-for="(item, index) of form.cooperateDept" |
|
|
|
:key="index" |
|
|
|
> |
|
|
|
<span |
|
|
|
class="el-icon-circle-plus-outline add" |
|
|
|
@click="addDept('cooperate')" |
|
|
|
class="el-icon-remove-outline delete" |
|
|
|
style="z-index: 10" |
|
|
|
@click="deleteDept(index, 'cooperate')" |
|
|
|
></span> |
|
|
|
<div |
|
|
|
style="position: relative" |
|
|
|
v-for="(item, index) of form.cooperateDept" |
|
|
|
:key="index" |
|
|
|
> |
|
|
|
<span |
|
|
|
class="el-icon-remove-outline delete" |
|
|
|
style="z-index: 10" |
|
|
|
@click="deleteDept(index, 'cooperate')" |
|
|
|
></span> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title">配合部门: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
@select="changePrincipal($event, 'cooperate',index)" |
|
|
|
v-model="form.cooperateDept[index]" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择配合部门" |
|
|
|
:defaultExpandLevel="2" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="title"> 责任领导: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
v-model="form.cooperatePrincipal[index]" |
|
|
|
:options="principalList" |
|
|
|
placeholder="请选择配合部门责任领导" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.realname, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title">配合部门: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
@select="changePrincipal($event, 'cooperate', index)" |
|
|
|
v-model="form.cooperateDept[index]" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择配合部门" |
|
|
|
:defaultExpandLevel="2" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="title"> 责任领导: </el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<treeselect |
|
|
|
v-model="form.cooperatePrincipal[index]" |
|
|
|
:options="principalList" |
|
|
|
placeholder="请选择配合部门责任领导" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.realname, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title">分值:</el-col> |
|
|
|
<el-col :span="7" |
|
|
|
><el-input placeholder="请输入分值" v-model="form.points"></el-input |
|
|
|
></el-col> |
|
|
|
</el-row> |
|
|
|
<div slot="footer"> |
|
|
|
<el-button type="primary" @click="save">确定</el-button> |
|
|
|
<el-button @click="showEdit = false">取消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="title">分值:</el-col> |
|
|
|
<el-col :span="7" |
|
|
|
><el-input placeholder="请输入分值" v-model="form.points"></el-input |
|
|
|
></el-col> |
|
|
|
</el-row> |
|
|
|
<div slot="footer"> |
|
|
|
<el-button type="primary" @click="save">确定</el-button> |
|
|
|
<el-button @click="showEdit = false">取消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@@ -371,22 +368,22 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
changePrincipal(e, type,index) { |
|
|
|
let nameId; |
|
|
|
this.department.forEach(item=>{ |
|
|
|
if(item.id==e.id){ |
|
|
|
nameId=item.principal; |
|
|
|
changePrincipal(e, type, index) { |
|
|
|
let nameId; |
|
|
|
this.department.forEach((item) => { |
|
|
|
if (item.id == e.id) { |
|
|
|
nameId = item.principal; |
|
|
|
return; |
|
|
|
} |
|
|
|
}) |
|
|
|
if(type=="other"){ |
|
|
|
this.$set(this.form.otherPrincipal,index,parseInt(nameId)) |
|
|
|
}); |
|
|
|
if (type == "other") { |
|
|
|
this.$set(this.form.otherPrincipal, index, parseInt(nameId)); |
|
|
|
} |
|
|
|
if(type=="cooperate"){ |
|
|
|
this.$set(this.form.cooperatePrincipal,index,parseInt(nameId)) |
|
|
|
if (type == "cooperate") { |
|
|
|
this.$set(this.form.cooperatePrincipal, index, parseInt(nameId)); |
|
|
|
} |
|
|
|
if(type=='leader'){ |
|
|
|
this.$set(this.form,'leaderPrincipal',parseInt(nameId)) |
|
|
|
if (type == "leader") { |
|
|
|
this.$set(this.form, "leaderPrincipal", parseInt(nameId)); |
|
|
|
} |
|
|
|
}, |
|
|
|
addDept(type) { |
|
|
@@ -421,6 +418,7 @@ export default { |
|
|
|
this.page = page; |
|
|
|
}, |
|
|
|
getDataList() { |
|
|
|
this.loading=true |
|
|
|
api |
|
|
|
.getContraintList(Object.assign({}, this.page, this.searchParams)) |
|
|
|
.then((res) => { |
|
|
@@ -458,12 +456,10 @@ export default { |
|
|
|
this.form = form; |
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.loading=true; |
|
|
|
let form = JSON.parse(JSON.stringify(this.form)); |
|
|
|
console.log(form) |
|
|
|
console.log(form); |
|
|
|
form.cooperateDept = form.cooperateDept && form.cooperateDept.join(","); |
|
|
|
// form.leaderDept = form.leaderDept && form.leaderDept.join(","); |
|
|
|
// form.leaderPrincipal = |
|
|
|
// form.leaderPrincipal && form.leaderPrincipal.join(","); |
|
|
|
form.cooperatePrincipal = |
|
|
|
form.cooperatePrincipal && form.cooperatePrincipal.join(","); |
|
|
|
form.otherDept = form.otherDept && form.otherDept.join(","); |