|
|
@@ -67,13 +67,13 @@ |
|
|
|
<div class="segmentation" style="margin-top: 30px"> |
|
|
|
<div class="title"> |
|
|
|
<span>分项信息</span> |
|
|
|
<el-button type="primary" size="small" style="margin-right: 50px" |
|
|
|
<el-button type="primary" size="small" style="margin-right: 50px" @click="showAdd" |
|
|
|
>添加</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-table |
|
|
|
:data="dataDetail" |
|
|
|
:data="detailList" |
|
|
|
border |
|
|
|
highlight-current-row |
|
|
|
v-loading="tableLoading" |
|
|
@@ -89,41 +89,61 @@ |
|
|
|
align="center" |
|
|
|
min-width="150" |
|
|
|
max-width="200" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="分值" |
|
|
|
align="center" |
|
|
|
width="80" |
|
|
|
></el-table-column> |
|
|
|
> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
placeholder="请输入小项内容" |
|
|
|
v-model="dataDetail.itemContent" |
|
|
|
v-if="row.edit" |
|
|
|
></el-input> |
|
|
|
<span v-else>{{ row.itemContent }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="分值" align="center" width="80"> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<el-input |
|
|
|
type="number" |
|
|
|
placeholder="请输入分值" |
|
|
|
v-if="row.edit" |
|
|
|
></el-input> |
|
|
|
<span>{{ row.points }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="牵头部门" align="center" width="180"> |
|
|
|
<treeselect |
|
|
|
:multiple="true" |
|
|
|
v-model="dataDetail.leaderDept" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择牵头部门" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<treeselect |
|
|
|
v-if="row.edit" |
|
|
|
:multiple="true" |
|
|
|
v-model="dataDetail.leaderDept" |
|
|
|
:options="formatDep" |
|
|
|
placeholder="请选择牵头部门" |
|
|
|
:defaultExpandLevel="1" |
|
|
|
:normalizer=" |
|
|
|
(d) => { |
|
|
|
return { |
|
|
|
id: d.id, |
|
|
|
label: d.name, |
|
|
|
children: |
|
|
|
d.children && d.children.length > 0 |
|
|
|
? d.children |
|
|
|
: undefined, |
|
|
|
}; |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
<span v-else>{{ row.leaderDeptList | formatList }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="责任领导" align="center" width="100"> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<span>{{ row.leaderPrincipalList | formatList }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="责任领导" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="配合部门" align="center" width="180"> |
|
|
|
<template> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<treeselect |
|
|
|
v-if="row.edit" |
|
|
|
:multiple="true" |
|
|
|
v-model="dataDetail.cooperateDept" |
|
|
|
:options="formatDep" |
|
|
@@ -142,23 +162,41 @@ |
|
|
|
} |
|
|
|
" |
|
|
|
/> |
|
|
|
<span v-else>{{ row.cooperateDeptList | formatList }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="责任领导" align="center" width="100"> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<span>{{ row.cooperatePrincipalList | formatList }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="责任领导" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="操作" align="center" width="150"> |
|
|
|
<template> |
|
|
|
<el-button type="primary" size="small">编辑</el-button> |
|
|
|
<el-button type="danger" size="small">删除</el-button> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<el-link |
|
|
|
@click="edit(row)" |
|
|
|
icon="el-icon-edit" |
|
|
|
type="primary" |
|
|
|
:underline="false" |
|
|
|
>修改</el-link |
|
|
|
> |
|
|
|
<el-popconfirm |
|
|
|
title="确定要删除此表格?" |
|
|
|
@confirm="remove(row.id)" |
|
|
|
class="ele-action" |
|
|
|
> |
|
|
|
<el-link |
|
|
|
slot="reference" |
|
|
|
icon="el-icon-delete" |
|
|
|
type="danger" |
|
|
|
:underline="false" |
|
|
|
>删除</el-link |
|
|
|
> |
|
|
|
</el-popconfirm> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div slot="footer" class="footer"> |
|
|
|
<el-button type="primary" @click="save">确定</el-button> |
|
|
|
<el-button @click="close">取消</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@@ -173,6 +211,11 @@ import basicTableApi from "@/api/second/segmentation/basicTable"; |
|
|
|
import rewardApi from "@/api/second/segmentation/reward"; |
|
|
|
import constraintApi from "@/api/second/segmentation/constraint"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
let map={ |
|
|
|
1:"specialPowerId", |
|
|
|
2:"specialPowerItemList", |
|
|
|
3:"rigidityConstraintItemList" |
|
|
|
} |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
id: { |
|
|
@@ -188,13 +231,17 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
data: {}, |
|
|
|
dataDetail: [], |
|
|
|
dataDetail: {}, |
|
|
|
allLoading: false, |
|
|
|
tableLoading: false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters(["formatDep"]), |
|
|
|
detailList() { |
|
|
|
let that = this; |
|
|
|
return map[this.type] |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getData(); |
|
|
@@ -243,12 +290,28 @@ export default { |
|
|
|
this.tableLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.$router.back(-1); |
|
|
|
showAdd(){ |
|
|
|
let data=this.data; |
|
|
|
data. |
|
|
|
}, |
|
|
|
close() { |
|
|
|
this.$router.back(-1); |
|
|
|
}, |
|
|
|
remove(id) { |
|
|
|
this.allLoading = true; |
|
|
|
this.getApi() |
|
|
|
.deleteItem(id) |
|
|
|
.then((res) => { |
|
|
|
this.$message({ type: "success", message: "删除小项成功" }); |
|
|
|
this.getData(); |
|
|
|
}) |
|
|
|
.catch((e) => { |
|
|
|
console.log(e) |
|
|
|
this.$message.error("删除小项失败"); |
|
|
|
}).finally(()=>{ |
|
|
|
this.allLoading=false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |