@@ -1,6 +1,6 @@ | |||
<template> | |||
<div class="basic-target" v-loading="loading"> | |||
<search :type="1" @search:task="updateParams($event)"/> | |||
<search :type="1" @search:task="updateParams($event)" /> | |||
<el-table | |||
:data="dataList" | |||
border | |||
@@ -62,7 +62,9 @@ | |||
</el-table-column> | |||
<el-table-column label="牵头部门" width="100" align="center"> | |||
<template slot-scope="{ row }"> | |||
<span><pre>{{ row.leaderDeptList | formatList }}</pre></span> | |||
<span> | |||
<pre>{{ row.leaderDeptList | formatList }}</pre> | |||
</span> | |||
</template> | |||
</el-table-column> | |||
@@ -73,7 +75,9 @@ | |||
</el-table-column> | |||
<el-table-column label="配合部门" width="100" align="center"> | |||
<template slot-scope="{ row }"> | |||
<span><pre>{{ row.cooperateDeptList | formatList }}</pre></span> | |||
<span> | |||
<pre>{{ row.cooperateDeptList | formatList }}</pre> | |||
</span> | |||
</template> | |||
</el-table-column> | |||
@@ -84,14 +88,14 @@ | |||
</el-table-column> | |||
<el-table-column label="操作" width="80" align="center"> | |||
<template slot-scope="{ row }"> | |||
<el-link | |||
@click="edit(row)" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="judge(row)" | |||
>申请</el-link | |||
> | |||
<el-link | |||
@click="edit(row)" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="judge(row)" | |||
>申请</el-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -146,7 +150,7 @@ import { mapGetters } from "vuex"; | |||
import api from "@/api/second/taskSummary"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
import applyApi from "@/api/second/coordinationManage/applyCooperation"; | |||
import successVue from '../../../result/success.vue'; | |||
import successVue from "../../../result/success.vue"; | |||
export default { | |||
components: { | |||
search, | |||
@@ -172,20 +176,23 @@ export default { | |||
count: 0, | |||
showEdit: false, | |||
loading: false, | |||
form:{note: ''} | |||
form: { note: "" }, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["formatDep",'user']), | |||
...mapGetters(["formatDep", "user"]), | |||
}, | |||
created() { | |||
this.getDataList(); | |||
}, | |||
methods: { | |||
judge(row){ | |||
let arr=[].concat(row.cooperateDept.split(',').map(item=>parseInt(item)),row.leaderDept.split(',').map(item=>parseInt(item))) | |||
let bool=arr.includes(this.user.user.deptId) | |||
return bool | |||
judge(row) { | |||
let arr = [].concat( | |||
row.cooperateDept.split(",").map((item) => parseInt(item)), | |||
row.leaderDept.split(",").map((item) => parseInt(item)) | |||
); | |||
let bool = arr.includes(this.user.user.deptId); | |||
return bool; | |||
}, | |||
updateParams(data) { | |||
this.searchParams = data; | |||
@@ -199,17 +206,17 @@ export default { | |||
this.page = page; | |||
}, | |||
getDataList() { | |||
api | |||
api | |||
.getBasicTableList(Object.assign({}, this.page, this.searchParams)) | |||
.then((res) => { | |||
let data = res.data.data; | |||
this.count=data.total | |||
this.count = data.total; | |||
this.dataList = this.reduceData(data.records); | |||
console.log(this.dataList); | |||
}) | |||
.catch((e) => { | |||
this.dataList = []; | |||
this.count=0 | |||
this.count = 0; | |||
}) | |||
.finally(() => { | |||
this.loading = false; | |||
@@ -217,29 +224,29 @@ export default { | |||
}, | |||
edit(row) { | |||
this.showEdit = true; | |||
this.form.type = 1 | |||
this.form.itemId = row.id | |||
this.form.leaderDept = row.leaderDept | |||
this.form.type = 1; | |||
this.form.itemId = row.id; | |||
this.form.leaderDept = row.leaderDept; | |||
}, | |||
save() { | |||
console.log(this.form); | |||
applyApi. | |||
applyCooperate(Object.assign({}, this.form)) | |||
.then((res)=> { | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'success', | |||
message: '提交申请成功' | |||
}) | |||
this.getDataList() | |||
}) | |||
.catch((e)=>{ | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'error', | |||
message: '提交申请失败' | |||
console.log(this.form); | |||
applyApi | |||
.applyCooperate(Object.assign({}, this.form)) | |||
.then((res) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "success", | |||
message: "提交申请成功", | |||
}); | |||
this.getDataList(); | |||
}) | |||
}) | |||
.catch((e) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "error", | |||
message: "提交申请失败", | |||
}); | |||
}); | |||
}, | |||
}, | |||
filters: { |
@@ -1,6 +1,6 @@ | |||
<template> | |||
<div class="constraint" v-loading="loading"> | |||
<search :type="3" @search:task="updateParams($event)"/> | |||
<search :type="3" @search:task="updateParams($event)" /> | |||
<el-table | |||
:data="dataList" | |||
border | |||
@@ -56,7 +56,9 @@ | |||
</el-table-column> | |||
<el-table-column label="牵头部门" width="100" align="center"> | |||
<template slot-scope="{ row }"> | |||
<span><pre>{{ row.leaderDeptList | formatList }}</pre></span> | |||
<span> | |||
<pre>{{ row.leaderDeptList | formatList }}</pre> | |||
</span> | |||
</template> | |||
</el-table-column> | |||
@@ -67,7 +69,9 @@ | |||
</el-table-column> | |||
<el-table-column label="配合部门" width="100" align="center"> | |||
<template slot-scope="{ row }"> | |||
<span><pre>{{ row.cooperateDeptList | formatList }}</pre></span> | |||
<span> | |||
<pre>{{ row.cooperateDeptList | formatList }}</pre> | |||
</span> | |||
</template> | |||
</el-table-column> | |||
@@ -77,13 +81,16 @@ | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" width="80" align="center"> | |||
<el-link | |||
@click="edit" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
>申请</el-link | |||
> | |||
<template slot-scope="{ row }"> | |||
<el-link | |||
@click="edit" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="judge(row)" | |||
>申请</el-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
@@ -116,7 +123,7 @@ | |||
> | |||
<el-form-item label="申请理由:"> | |||
<el-input | |||
v-model="form.note" | |||
v-model="form.note" | |||
type="textarea" | |||
placeholder="请输入申请理由" | |||
:rows="5" | |||
@@ -160,16 +167,24 @@ export default { | |||
count: 0, | |||
showEdit: false, | |||
loading: false, | |||
form:{} | |||
form: {}, | |||
}; | |||
}, | |||
created() { | |||
this.getDataList(); | |||
}, | |||
computed: { | |||
...mapGetters(["formatDep"]), | |||
...mapGetters(["formatDep","user"]), | |||
}, | |||
methods: { | |||
judge(row) { | |||
let arr = [].concat( | |||
row.cooperateDept.split(",").map((item) => parseInt(item)), | |||
row.leaderDept.split(",").map((item) => parseInt(item)) | |||
); | |||
let bool = arr.includes(this.user.user.deptId); | |||
return bool; | |||
}, | |||
updateParams(data) { | |||
this.searchParams = data; | |||
this.resetCurrentPage(); | |||
@@ -196,31 +211,31 @@ export default { | |||
this.loading = false; | |||
}); | |||
}, | |||
edit(row) { | |||
edit(row) { | |||
this.showEdit = true; | |||
this.form.type = 3 | |||
this.form.itemId = row.id | |||
this.form.leaderDept = row.leaderDept | |||
this.form.type = 3; | |||
this.form.itemId = row.id; | |||
this.form.leaderDept = row.leaderDept; | |||
}, | |||
save() { | |||
console.log(this.form); | |||
applyApi. | |||
applyCooperate(Object.assign({}, this.form)) | |||
.then((res)=> { | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'success', | |||
message: '提交申请成功' | |||
}) | |||
this.getDataList() | |||
}) | |||
.catch((e)=>{ | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'error', | |||
message: '提交申请失败' | |||
console.log(this.form); | |||
applyApi | |||
.applyCooperate(Object.assign({}, this.form)) | |||
.then((res) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "success", | |||
message: "提交申请成功", | |||
}); | |||
this.getDataList(); | |||
}) | |||
}) | |||
.catch((e) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "error", | |||
message: "提交申请失败", | |||
}); | |||
}); | |||
}, | |||
}, | |||
filters: { |
@@ -62,7 +62,9 @@ | |||
</el-table-column> | |||
<el-table-column label="牵头部门" width="100" align="center"> | |||
<template slot-scope="{ row }"> | |||
<span><pre>{{ row.leaderDeptList | formatList }}</pre></span> | |||
<span> | |||
<pre>{{ row.leaderDeptList | formatList }}</pre> | |||
</span> | |||
</template> | |||
</el-table-column> | |||
@@ -73,7 +75,9 @@ | |||
</el-table-column> | |||
<el-table-column label="配合部门" width="100" align="center"> | |||
<template slot-scope="{ row }"> | |||
<span><pre>{{ row.cooperateDeptList | formatList }}</pre></span> | |||
<span> | |||
<pre>{{ row.cooperateDeptList | formatList }}</pre> | |||
</span> | |||
</template> | |||
</el-table-column> | |||
@@ -83,13 +87,16 @@ | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" width="80" align="center"> | |||
<el-link | |||
@click="edit" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
>申请</el-link | |||
> | |||
<template slot-scope="{ row }"> | |||
<el-link | |||
@click="edit" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="judge(row)" | |||
>申请</el-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
@@ -122,7 +129,7 @@ | |||
> | |||
<el-form-item label="申请理由:"> | |||
<el-input | |||
v-model="form.note" | |||
v-model="form.note" | |||
type="textarea" | |||
placeholder="请输入申请理由" | |||
:rows="5" | |||
@@ -168,16 +175,24 @@ export default { | |||
count: 0, | |||
showEdit: false, | |||
loading: false, | |||
form:{} | |||
form: {}, | |||
}; | |||
}, | |||
created() { | |||
this.getDataList(); | |||
}, | |||
computed: { | |||
...mapGetters(["formatDep"]), | |||
...mapGetters(["formatDep","user"]), | |||
}, | |||
methods: { | |||
judge(row) { | |||
let arr = [].concat( | |||
row.cooperateDept.split(",").map((item) => parseInt(item)), | |||
row.leaderDept.split(",").map((item) => parseInt(item)) | |||
); | |||
let bool = arr.includes(this.user.user.deptId); | |||
return bool; | |||
}, | |||
updateParams(data) { | |||
this.searchParams = data; | |||
this.resetCurrentPage(); | |||
@@ -193,12 +208,12 @@ export default { | |||
.getRewardList(Object.assign({}, this.page, this.searchParams)) | |||
.then((res) => { | |||
let data = res.data.data; | |||
this.count = data.total | |||
this.count = data.total; | |||
this.dataList = this.reduceData(data.records); | |||
}) | |||
.catch((e) => { | |||
this.dataList = []; | |||
this.count=0 | |||
this.count = 0; | |||
}) | |||
.finally(() => { | |||
this.loading = false; | |||
@@ -206,29 +221,29 @@ export default { | |||
}, | |||
edit(row) { | |||
this.showEdit = true; | |||
this.form.type = 2 | |||
this.form.itemId = row.id | |||
this.form.leaderDept = row.leaderDept | |||
this.form.type = 2; | |||
this.form.itemId = row.id; | |||
this.form.leaderDept = row.leaderDept; | |||
}, | |||
save() { | |||
console.log(this.form); | |||
applyApi. | |||
applyCooperate(Object.assign({}, this.form)) | |||
.then((res)=> { | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'success', | |||
message: '提交申请成功' | |||
}) | |||
this.getDataList() | |||
}) | |||
.catch((e)=>{ | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'error', | |||
message: '提交申请失败' | |||
console.log(this.form); | |||
applyApi | |||
.applyCooperate(Object.assign({}, this.form)) | |||
.then((res) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "success", | |||
message: "提交申请成功", | |||
}); | |||
this.getDataList(); | |||
}) | |||
}) | |||
.catch((e) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "error", | |||
message: "提交申请失败", | |||
}); | |||
}); | |||
}, | |||
}, | |||
filters: { |
@@ -1,11 +1,15 @@ | |||
<template> | |||
<div class="assessing-content ele-body"> | |||
<el-card shadow="never" v-loading="loading" element-loading-background="rgba(255, 255, 255, 1)"> | |||
<search :type="1" @search:task="updateParams($event)" /> | |||
<div class="operating"> | |||
<el-card | |||
shadow="never" | |||
v-loading="loading" | |||
element-loading-background="rgba(255, 255, 255, 1)" | |||
> | |||
<search :type="1" @search:task="updateParams($event)" /> | |||
<div class="operating"> | |||
<el-button size="small" type="primary">导出</el-button> | |||
</div> | |||
<el-table | |||
</div> | |||
<el-table | |||
highlight-current-row | |||
:data="dataList" | |||
:height="tableHeight" | |||
@@ -94,11 +98,7 @@ | |||
<pre>{{ row.cooperatePrincipalList | formatList }}</pre> | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
label="操作" | |||
width="80" | |||
align="center" | |||
> | |||
<el-table-column label="操作" width="80" align="center"> | |||
<template slot-scope="{ row }"> | |||
<el-link | |||
slot="reference" | |||
@@ -111,7 +111,7 @@ | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
<el-pagination | |||
:current-page.sync="page.page" | |||
:page-size="page.limit" | |||
:total="count" | |||
@@ -123,125 +123,175 @@ | |||
@current-change="getDataList()" | |||
/> | |||
<el-dialog | |||
title="编辑考核内容" | |||
:visible.sync="showEdit" | |||
width="400px" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="false" | |||
:destroy-on-close="true" | |||
@closed="form = {}" | |||
> | |||
<el-form | |||
:model="form" | |||
label-width="82px" | |||
custom-class="editForm" | |||
@keyup.enter.native="save" | |||
@submit.native.prevent | |||
ref="editForm" | |||
title="编辑考核内容" | |||
:visible.sync="showEdit" | |||
width="650px" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="false" | |||
:destroy-on-close="true" | |||
@closed="form = {}" | |||
> | |||
<el-form-item label="小条内容:"> | |||
<el-input | |||
type="textarea" | |||
:rows="5" | |||
placeholder="请输入考核内容" | |||
v-model="form.itemContent" | |||
></el-input> | |||
</el-form-item> | |||
<el-form-item label="分值:"> | |||
<el-input placeholder="请输入分值" v-model="form.points"></el-input> | |||
</el-form-item> | |||
<el-form-item label="牵头部门:"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
:options="formatDep" | |||
:multiple="true" | |||
placeholder="请选择牵头部门" | |||
:defaultExpandLevel="2" | |||
:normalizer=" | |||
(d) => { | |||
return { | |||
id: d.id, | |||
label: d.name, | |||
children: | |||
d.children && d.children.length > 0 | |||
? d.children | |||
: undefined, | |||
}; | |||
} | |||
" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="责任领导:"> | |||
<treeselect | |||
:multiple="true" | |||
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-form-item> | |||
<el-form-item label="配合部门:"> | |||
<treeselect | |||
v-model="form.cooperateDept" | |||
:flat="true" | |||
:options="formatDep" | |||
:multiple="true" | |||
placeholder="请选择配合部门" | |||
:defaultExpandLevel="2" | |||
:normalizer=" | |||
(d) => { | |||
return { | |||
id: d.id, | |||
label: d.name, | |||
children: | |||
d.children && d.children.length > 0 | |||
? d.children | |||
: undefined, | |||
}; | |||
} | |||
" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="责任领导:"> | |||
<treeselect | |||
:multiple="true" | |||
v-model="form.cooperatePrincipal" | |||
: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-form-item> | |||
</el-form> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="save">确定</el-button> | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
<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 | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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"></span> | |||
<el-row> | |||
<el-col :span="4" class="title"> 其他牵头部门: </el-col> | |||
<el-col :span="7"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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> | |||
<div class="cooperate"> | |||
<span class="el-icon-circle-plus-outline add"></span> | |||
<el-row> | |||
<el-col :span="4" class="title">配合部门: </el-col> | |||
<el-col :span="7"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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> | |||
<el-row> | |||
<el-col :span="4" class="title">分值:</el-col> | |||
<el-col :span="7"><el-input placeholder="请输入分值"></el-input></el-col> | |||
</el-row> | |||
</div> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="save">确定</el-button> | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
</el-card> | |||
</div> | |||
</template> | |||
@@ -288,7 +338,7 @@ export default { | |||
this.$store.dispatch("base/getPrincipalList"); | |||
}, | |||
computed: { | |||
...mapGetters(["formatDep", "principalList" ]), | |||
...mapGetters(["formatDep", "principalList"]), | |||
}, | |||
filters: { | |||
formatList(val) { | |||
@@ -326,21 +376,21 @@ export default { | |||
}); | |||
}, | |||
edit(row) { | |||
this.showEdit = true | |||
this.showEdit = true; | |||
let form = JSON.parse(JSON.stringify(row)); | |||
form.leaderDept = form.leaderDept | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
form.cooperateDept = form.cooperateDept | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
form.leaderPrincipal = form.leaderPrincipal | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
form.cooperatePrincipal = form.cooperatePrincipal | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
this.form = form; | |||
form.leaderDept = form.leaderDept | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
form.cooperateDept = form.cooperateDept | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
form.leaderPrincipal = form.leaderPrincipal | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
form.cooperatePrincipal = form.cooperatePrincipal | |||
.split(",") | |||
.map((item) => parseInt(item)); | |||
this.form = form; | |||
}, | |||
save() { | |||
let form = this.form; | |||
@@ -350,31 +400,54 @@ export default { | |||
form.leaderPrincipal && form.leaderPrincipal.join(","); | |||
form.cooperatePrincipal = | |||
form.cooperatePrincipal && form.cooperatePrincipal.join(","); | |||
editApi.editItem(Object.assign({}, form)) | |||
.then((res)=> { | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'success', | |||
message: '提交申请成功' | |||
editApi | |||
.editItem(Object.assign({}, form)) | |||
.then((res) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "success", | |||
message: "提交申请成功", | |||
}); | |||
this.getDataList(); | |||
}) | |||
this.getDataList() | |||
}) | |||
.catch((e)=>{ | |||
this.showEdit = false; | |||
this.$message({ | |||
type:'error', | |||
message: '提交申请失败' | |||
.catch((e) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "error", | |||
message: "提交申请失败", | |||
}); | |||
}) | |||
}) | |||
.finally(() => { | |||
this.form = {} | |||
this.loading = false; | |||
}); | |||
.finally(() => { | |||
this.form = {}; | |||
this.loading = false; | |||
}); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style scoped> | |||
.el-row { | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-content: center; | |||
} | |||
.el-col { | |||
text-align: right; | |||
} | |||
.title { | |||
margin-right: 10px; | |||
line-height: 36px; | |||
} | |||
.leader, | |||
.cooperate { | |||
position: relative; | |||
} | |||
.add { | |||
font-size: 20px; | |||
position: absolute; | |||
right: 0px; | |||
top: 8px; | |||
color:#4d9efc; | |||
} | |||
</style> |
@@ -117,127 +117,176 @@ | |||
@current-change="getDataList()" | |||
/> | |||
</el-card> | |||
<el-dialog | |||
title="编辑考核内容" | |||
:visible.sync="showEdit" | |||
width="400px" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="false" | |||
:destroy-on-close="true" | |||
@closed="form = {}" | |||
> | |||
<el-form | |||
:model="form" | |||
label-width="82px" | |||
custom-class="editForm" | |||
@keyup.enter.native="save" | |||
@submit.native.prevent | |||
ref="editForm" | |||
<el-dialog | |||
title="编辑考核内容" | |||
:visible.sync="showEdit" | |||
width="650px" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="false" | |||
:destroy-on-close="true" | |||
@closed="form = {}" | |||
> | |||
<el-form-item label="小条内容:"> | |||
<el-input | |||
v-model="form.itemContent" | |||
type="textarea" | |||
:rows="5" | |||
placeholder="请输入考核内容" | |||
></el-input> | |||
</el-form-item> | |||
<el-form-item label="分值:" prop=""> | |||
<el-input placeholder="请输入分值"></el-input> | |||
</el-form-item> | |||
<el-form-item label="牵头部门:"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
:options="formatDep" | |||
:multiple="true" | |||
placeholder="请选择牵头部门" | |||
:defaultExpandLevel="2" | |||
:normalizer=" | |||
(d) => { | |||
return { | |||
id: d.id, | |||
label: d.name, | |||
children: | |||
d.children && d.children.length > 0 | |||
? d.children | |||
: undefined, | |||
}; | |||
} | |||
" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="责任领导:"> | |||
<treeselect | |||
:multiple="true" | |||
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-form-item> | |||
<el-form-item label="配合部门:"> | |||
<treeselect | |||
v-model="form.cooperateDept" | |||
:flat="true" | |||
:options="formatDep" | |||
:multiple="true" | |||
placeholder="请选择配合部门" | |||
:defaultExpandLevel="2" | |||
:normalizer=" | |||
(d) => { | |||
return { | |||
id: d.id, | |||
label: d.name, | |||
children: | |||
d.children && d.children.length > 0 | |||
? d.children | |||
: undefined, | |||
}; | |||
} | |||
" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="责任领导:"> | |||
<treeselect | |||
:multiple="true" | |||
v-model="form.cooperatePrincipal" | |||
: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-form-item> | |||
</el-form> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="save">确定</el-button> | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
<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 | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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"></span> | |||
<el-row> | |||
<el-col :span="4" class="title"> 其他牵头部门: </el-col> | |||
<el-col :span="7"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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> | |||
<div class="cooperate"> | |||
<span class="el-icon-circle-plus-outline add"></span> | |||
<el-row> | |||
<el-col :span="4" class="title">配合部门: </el-col> | |||
<el-col :span="7"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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> | |||
<el-row> | |||
<el-col :span="4" class="title">分值:</el-col> | |||
<el-col :span="7"><el-input placeholder="请输入分值"></el-input></el-col> | |||
</el-row> | |||
</div> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="save">确定</el-button> | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
@@ -369,4 +418,27 @@ export default { | |||
</script> | |||
<style scoped> | |||
.el-row { | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-content: center; | |||
} | |||
.el-col { | |||
text-align: right; | |||
} | |||
.title { | |||
margin-right: 10px; | |||
line-height: 36px; | |||
} | |||
.leader, | |||
.cooperate { | |||
position: relative; | |||
} | |||
.add { | |||
font-size: 20px; | |||
position: absolute; | |||
right: 0px; | |||
top: 8px; | |||
color:#4d9efc; | |||
} | |||
</style> |
@@ -122,127 +122,176 @@ | |||
:flat="true" | |||
@current-change="getDataList()" | |||
/> | |||
<el-dialog | |||
title="编辑考核内容" | |||
:visible.sync="showEdit" | |||
width="400px" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="false" | |||
:destroy-on-close="true" | |||
@closed="form = {}" | |||
> | |||
<el-form | |||
:model="form" | |||
label-width="82px" | |||
custom-class="editForm" | |||
@keyup.enter.native="save" | |||
@submit.native.prevent | |||
ref="editForm" | |||
<el-dialog | |||
title="编辑考核内容" | |||
:visible.sync="showEdit" | |||
width="650px" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="false" | |||
:destroy-on-close="true" | |||
@closed="form = {}" | |||
> | |||
<el-form-item label="小条内容:"> | |||
<el-input | |||
type="textarea" | |||
:rows="5" | |||
placeholder="请输入考核内容" | |||
v-model="form.itemContent" | |||
></el-input> | |||
</el-form-item> | |||
<el-form-item label="分值:"> | |||
<el-input placeholder="请输入分值" v-model="form.points"></el-input> | |||
</el-form-item> | |||
<el-form-item label="牵头部门:"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
:options="formatDep" | |||
:multiple="true" | |||
placeholder="请选择牵头部门" | |||
:defaultExpandLevel="2" | |||
:normalizer=" | |||
(d) => { | |||
return { | |||
id: d.id, | |||
label: d.name, | |||
children: | |||
d.children && d.children.length > 0 | |||
? d.children | |||
: undefined, | |||
}; | |||
} | |||
" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="责任领导:"> | |||
<treeselect | |||
:multiple="true" | |||
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-form-item> | |||
<el-form-item label="配合部门:"> | |||
<treeselect | |||
v-model="form.cooperateDept" | |||
:flat="true" | |||
:options="formatDep" | |||
:multiple="true" | |||
placeholder="请选择配合部门" | |||
:defaultExpandLevel="2" | |||
:normalizer=" | |||
(d) => { | |||
return { | |||
id: d.id, | |||
label: d.name, | |||
children: | |||
d.children && d.children.length > 0 | |||
? d.children | |||
: undefined, | |||
}; | |||
} | |||
" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="责任领导:"> | |||
<treeselect | |||
:multiple="true" | |||
v-model="form.cooperatePrincipal" | |||
: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-form-item> | |||
</el-form> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="save">确定</el-button> | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
<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 | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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"></span> | |||
<el-row> | |||
<el-col :span="4" class="title"> 其他牵头部门: </el-col> | |||
<el-col :span="7"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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> | |||
<div class="cooperate"> | |||
<span class="el-icon-circle-plus-outline add"></span> | |||
<el-row> | |||
<el-col :span="4" class="title">配合部门: </el-col> | |||
<el-col :span="7"> | |||
<treeselect | |||
v-model="form.leaderDept" | |||
:flat="true" | |||
: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> | |||
<el-row> | |||
<el-col :span="4" class="title">分值:</el-col> | |||
<el-col :span="7"><el-input placeholder="请输入分值"></el-input></el-col> | |||
</el-row> | |||
</div> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="save">确定</el-button> | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
</el-card> | |||
</div> | |||
</template> | |||
@@ -376,4 +425,27 @@ export default { | |||
</script> | |||
<style scoped> | |||
.el-row { | |||
margin-bottom: 20px; | |||
display: flex; | |||
align-content: center; | |||
} | |||
.el-col { | |||
text-align: right; | |||
} | |||
.title { | |||
margin-right: 10px; | |||
line-height: 36px; | |||
} | |||
.leader, | |||
.cooperate { | |||
position: relative; | |||
} | |||
.add { | |||
font-size: 20px; | |||
position: absolute; | |||
right: 0px; | |||
top: 8px; | |||
color:#4d9efc; | |||
} | |||
</style> |