@@ -18,5 +18,11 @@ export default { | |||
}, | |||
editPoints(params){ | |||
return axios.post('/rigidityconstraintitem/updateItemDeduction',params) | |||
}, | |||
getItemDeptScoreList(id){ | |||
return axios.get('/rigidityconstraintitem/getItemDeptScoreList/'+id) | |||
}, | |||
setItemDeptScore(data){ | |||
return axios.post('/rigidityconstraintitem/setItemDeptScore',data) | |||
} | |||
} |
@@ -18,5 +18,11 @@ export default { | |||
}, | |||
editPoints(params){ | |||
return axios.post('/specialpoweritem/updateItemBonus',params) | |||
}, | |||
getItemDeptScoreList(id){ | |||
return axios.get('/specialpoweritem/getItemDeptScoreList/'+id) | |||
}, | |||
setItemDeptScore(data){ | |||
return axios.post('/specialpoweritem/setItemDeptScore',data) | |||
} | |||
} |
@@ -27,5 +27,8 @@ export default { | |||
}, | |||
getReportDataSummaryAttach(){ | |||
return axios.get('/statistics/getReportDataSummaryAttach') | |||
}, | |||
setPoint(type){ | |||
return axios.post(`/${type}/setItemDeptPoints`,{"rule": "6:4"}) | |||
} | |||
} |
@@ -4,8 +4,8 @@ | |||
export default { | |||
version: '1.0', | |||
name: 'JNDZ考核管理系统', // 项目名称 | |||
baseURL: 'http://121.40.249.52:9031/api/', // 正式环境 | |||
// baseURL:'http://47.98.157.120:9031/api/', //测试环境 | |||
// baseURL: 'http://121.40.249.52:9031/api/', // 正式环境 | |||
baseURL:'http://47.98.157.120:9031/api/', //测试环境 | |||
whiteList: ['/login', '/forget'], // 路由白名单(不需要登录的) | |||
keepAliveList: [], // 需要缓存的组件名称 | |||
menuUrl: '/index/getMenuList', // 菜单数据接口 |
@@ -116,6 +116,14 @@ | |||
@click="emitExport" | |||
>导出</el-button | |||
> | |||
<el-button | |||
v-if="baseUrl" | |||
size="small" | |||
type="success" | |||
@click="setPoint" | |||
:loading="editPoint" | |||
>评分</el-button | |||
> | |||
</el-form-item> | |||
</el-form> | |||
<!-- <div class="operating" v-if="showExport"> | |||
@@ -127,6 +135,7 @@ | |||
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | |||
import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | |||
import { mapGetters, mapActions } from "vuex"; | |||
import api from "@/api/second/taskSummary" | |||
export default { | |||
props: { | |||
type: { | |||
@@ -147,6 +156,12 @@ export default { | |||
return false; | |||
}, | |||
}, | |||
baseUrl:{ | |||
type:String, | |||
default(){ | |||
return '' | |||
} | |||
} | |||
}, | |||
components: { | |||
Treeselect, | |||
@@ -162,6 +177,7 @@ export default { | |||
content: "", | |||
leaderUnit: "", | |||
}, | |||
editPoint:false | |||
}; | |||
}, | |||
created() { | |||
@@ -193,6 +209,24 @@ export default { | |||
emitExport() { | |||
this.$emit("export", this.searchParams); | |||
}, | |||
setPoint(){ | |||
this.editPoint=true | |||
api.setPoint(this.baseUrl).then(res=>{ | |||
console.log(res.data) | |||
if(res.data.code===0){ | |||
this.$message({ | |||
type:"success", | |||
message:"修改成功" | |||
}) | |||
}else{ | |||
this.$message.error(res.data.msg) | |||
} | |||
}).catch(e=>{ | |||
this.$message.error(e.message); | |||
}).finally(()=>{ | |||
this.editPoint=false | |||
}) | |||
} | |||
}, | |||
computed: { | |||
...mapGetters(["quota1", "quota2", "formatDep", "quota"]), | |||
@@ -210,6 +244,6 @@ export default { | |||
<style scoped> | |||
.action >>> .el-form-item__content{ | |||
width:200px | |||
width:280px | |||
} | |||
</style> |
@@ -429,7 +429,7 @@ | |||
</el-row> | |||
</div> | |||
</div> | |||
<el-row class="edit"> | |||
<el-row class="edit" v-if="type == 1"> | |||
<el-col :span="4" class="edit-title" | |||
><span style="color: red">* </span>分值:</el-col | |||
> | |||
@@ -440,6 +440,15 @@ | |||
></el-input | |||
></el-col> | |||
</el-row> | |||
<el-row class="edit" v-if="type == 2"> | |||
<el-col :span="4" class="edit-title">分值:</el-col> | |||
<el-col :span="7" | |||
><el-input | |||
placeholder="请输入分值" | |||
v-model="form.points" | |||
></el-input | |||
></el-col> | |||
</el-row> | |||
<!-- </el-scrollbar> --> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="add">确定</el-button> | |||
@@ -662,9 +671,11 @@ export default { | |||
} | |||
} | |||
if (param == "points") { | |||
if (!form[param]) { | |||
this.$message.error("请输入分值"); | |||
return; | |||
if (this.type == 1) { | |||
if (!form[param]) { | |||
this.$message.error("请输入分值"); | |||
return; | |||
} | |||
} | |||
if (Number(form[param]) !== Number(form[param])) { | |||
this.$message.error("分值请输入数值"); |
@@ -6,6 +6,7 @@ | |||
@search:task="updateParams($event)" | |||
@export="exportData($event)" | |||
:show-export="true" | |||
base-url="basictaskitem" | |||
/> | |||
<el-table | |||
highlight-current-row | |||
@@ -89,7 +90,7 @@ | |||
align="center" | |||
> | |||
<template slot-scope="{ row }"> | |||
<pre>{{formatList(row,'leader')}}</pre> | |||
<pre>{{ formatList(row, "leader") }}</pre> | |||
</template> | |||
</el-table-column> | |||
<!-- <el-table-column | |||
@@ -107,7 +108,7 @@ | |||
align="center" | |||
> | |||
<template slot-scope="{ row }"> | |||
<pre>{{ formatList(row,'other') }}</pre> | |||
<pre>{{ formatList(row, "other") }}</pre> | |||
</template> | |||
</el-table-column> | |||
<!-- <el-table-column | |||
@@ -119,13 +120,9 @@ | |||
<pre>{{ row.otherPrincipalList | formatList }}</pre> | |||
</template> | |||
</el-table-column> --> | |||
<el-table-column | |||
label="配合部门和责任领导" | |||
width="250" | |||
align="center" | |||
> | |||
<el-table-column label="配合部门和责任领导" width="250" align="center"> | |||
<template slot-scope="{ row }"> | |||
<pre>{{formatList(row,'cooperate') }}</pre> | |||
<pre>{{ formatList(row, "cooperate") }}</pre> | |||
</template> | |||
</el-table-column> | |||
<!-- <el-table-column | |||
@@ -395,27 +392,58 @@ | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
<el-dialog | |||
:loading="pointLoading" | |||
@closed="pointForm = []" | |||
title="编辑分数" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="true" | |||
:destroy-on-close="true" | |||
width="500px" | |||
width="600px" | |||
:visible.sync="showPoints" | |||
> | |||
<el-form label-width="50%"> | |||
<!-- <el-form label-width="50%"> | |||
<template v-for="(item, index) of pointForm"> | |||
<el-form-item :label="item | formatLabel" :key="index"> | |||
<el-input | |||
placeholder="请输入得分" | |||
v-model="item.actualPoints" | |||
clearable | |||
></el-input> | |||
</el-form-item> | |||
<el-row :key="index"> | |||
<el-form-item :label="item | formatLabel"> | |||
<el-input | |||
placeholder="请输入承担得分" | |||
v-model="item.actualPoints" | |||
clearable | |||
></el-input> | |||
</el-form-item> | |||
<el-form-item label="得分"> | |||
<el-input | |||
placeholder="请输入得分" | |||
v-model="item.actualPoints" | |||
clearable | |||
></el-input> | |||
</el-form-item> | |||
</el-row> | |||
</template> | |||
</el-form> --> | |||
<div class="edit-point-body"> | |||
<template v-for="item of pointForm"> | |||
<el-row :key="item.id" type="flex"> | |||
<el-col :span="12" style="padding-right:15px">{{ item | formatLabel }}</el-col> | |||
<el-col :span="5"> | |||
<el-input | |||
placeholder="请输入承担得分" | |||
v-model="item.bearPoints" | |||
clearable | |||
></el-input> | |||
</el-col> | |||
<el-col :span="4" class="right">得分</el-col> | |||
<el-col :span="5"> | |||
<el-input | |||
placeholder="请输入得分" | |||
v-model="item.actualPoints" | |||
clearable | |||
></el-input> | |||
</el-col> | |||
</el-row> | |||
</template> | |||
</el-form> | |||
</div> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="savePoints">确定</el-button> | |||
<el-button @click="showPoints = false">取消</el-button> | |||
@@ -448,7 +476,6 @@ export default { | |||
data() { | |||
return { | |||
showPoints: false, | |||
pointLoading: false, | |||
pointForm: [], | |||
searchParams: {}, | |||
dataList: [], | |||
@@ -477,25 +504,30 @@ export default { | |||
filters: { | |||
formatLabel(data) { | |||
if (data.isLeader == 1) { | |||
return "第一牵头 '" + data.deptName + "' 得分:"; | |||
return "第一牵头 '" + data.deptName + "' 承担得分:"; | |||
} else if (data.isLeader == 2) { | |||
return "其他牵头 '" + data.deptName + "' 得分:"; | |||
return "其他牵头 '" + data.deptName + "' 承担得分:"; | |||
} else if (data.isLeader == 3) { | |||
return "配合部门 '" + data.deptName + "' 得分:"; | |||
return "配合部门 '" + data.deptName + "' 承担得分:"; | |||
} else { | |||
return ""; | |||
} | |||
}, | |||
}, | |||
methods: { | |||
formatList(data,type) { | |||
let arr=[] | |||
for(let key in data[type+'DeptList']){ | |||
arr.push(`${data[type+'DeptList'][key]}(${data[type+'PrincipalList'][key]})`) | |||
formatList(data, type) { | |||
let arr = []; | |||
for (let key in data[type + "DeptList"]) { | |||
arr.push( | |||
`${data[type + "DeptList"][key]}(${ | |||
data[type + "PrincipalList"][key] | |||
})` | |||
); | |||
} | |||
return arr.join('\n') | |||
return arr.join("\n"); | |||
}, | |||
showPointsDialog(row) { | |||
console.log(row) | |||
if (!row.id) { | |||
this.$message({ | |||
type: "warning", | |||
@@ -507,7 +539,12 @@ export default { | |||
this.getItemDeptScoreList(row.id); | |||
}, | |||
getItemDeptScoreList(id) { | |||
this.pointLoading = true; | |||
const loading = this.$loading({ | |||
lock: true, | |||
text: 'Loading', | |||
spinner: 'el-icon-refresh-right', | |||
background: 'rgba(1, 1, 1, 1)' | |||
}); | |||
editApi | |||
.getItemDeptScoreList(id) | |||
.then((res) => { | |||
@@ -520,7 +557,7 @@ export default { | |||
this.showPoints = false; | |||
this.$message({ | |||
type: "warning", | |||
message: "当前无数据", | |||
message: data.msg, | |||
}); | |||
} | |||
}) | |||
@@ -529,16 +566,26 @@ export default { | |||
this.showPoints = false; | |||
this.$message({ | |||
type: "warning", | |||
message: "当前无数据", | |||
message: e.message, | |||
}); | |||
}) | |||
.finally(() => { | |||
this.pointLoading = false; | |||
this.$nextTick(()=>{ | |||
loading.close(); | |||
}) | |||
}); | |||
}, | |||
savePoints() { | |||
let list = JSON.parse(JSON.stringify(this.pointForm)); | |||
console.log(list) | |||
for (let obj of list) { | |||
if (!(obj.bearPoints + "").trim()) { | |||
this.$message({ | |||
type: "warning", | |||
message: "请输入" + obj.deptName + "的承担得分", | |||
}); | |||
return; | |||
} | |||
if (!(obj.actualPoints + "").trim()) { | |||
this.$message({ | |||
type: "warning", | |||
@@ -546,6 +593,13 @@ export default { | |||
}); | |||
return; | |||
} | |||
if (Number(obj.bearPoints) !== Number(obj.bearPoints)) { | |||
this.$message({ | |||
type: "warning", | |||
message: obj.deptName + "的承担得分请输入数值", | |||
}); | |||
return; | |||
} | |||
if (Number(obj.actualPoints) !== Number(obj.actualPoints)) { | |||
this.$message({ | |||
type: "warning", | |||
@@ -556,7 +610,7 @@ export default { | |||
} | |||
let obj = {}; | |||
list.forEach((item) => { | |||
obj[item.deptId] = item.actualPoints; | |||
obj[item.deptId] =item.bearPoints+','+item.actualPoints; | |||
}); | |||
editApi | |||
.setItemDeptScore( | |||
@@ -762,14 +816,19 @@ export default { | |||
}, | |||
save() { | |||
let form = this.form; | |||
let params = ["itemContent", "points", "leaderDept", "leaderPrincipal",]; | |||
let arr=['otherDept','otherPrincipal','cooperateDept','cooperatePrincipal'] | |||
for(let key of arr){ | |||
if(form[key]){ | |||
for (let item of form[key]){ | |||
if(!item||(item.length==0)){ | |||
this.$message.error('请选择部门及对应责任领导') | |||
return | |||
let params = ["itemContent", "points", "leaderDept", "leaderPrincipal"]; | |||
let arr = [ | |||
"otherDept", | |||
"otherPrincipal", | |||
"cooperateDept", | |||
"cooperatePrincipal", | |||
]; | |||
for (let key of arr) { | |||
if (form[key]) { | |||
for (let item of form[key]) { | |||
if (!item || item.length == 0) { | |||
this.$message.error("请选择部门及对应责任领导"); | |||
return; | |||
} | |||
} | |||
} | |||
@@ -884,4 +943,11 @@ export default { | |||
max-height: 60vh; | |||
overflow-y: scroll; | |||
} | |||
.edit-point-body .el-row{ | |||
align-items: center; | |||
} | |||
.edit-point-body .el-col.right{ | |||
text-align: center; | |||
} | |||
</style> |
@@ -6,6 +6,7 @@ | |||
@search:task="updateParams($event)" | |||
:show-export="true" | |||
@export="exportData($event)" | |||
base-url="rigidityconstraintitem" | |||
/> | |||
<el-table | |||
highlight-current-row | |||
@@ -120,7 +121,7 @@ | |||
<pre>{{ row.cooperatePrincipalList | formatList }}</pre> | |||
</template> | |||
</el-table-column> --> | |||
<el-table-column label="操作" width="80" align="center" fixed="right"> | |||
<el-table-column label="操作" width="150" align="center" fixed="right"> | |||
<template slot-scope="{ row }"> | |||
<el-link | |||
slot="reference" | |||
@@ -134,6 +135,12 @@ | |||
icon="el-icon-edit" | |||
>编辑</el-link | |||
> | |||
<el-link | |||
@click="showPointsDialog(row)" | |||
type="warning" | |||
icon="el-icon-edit-outline" | |||
>评分</el-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -364,6 +371,31 @@ | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
<el-dialog | |||
@closed="pointForm = []" | |||
title="编辑分数" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="true" | |||
:destroy-on-close="true" | |||
width="500px" | |||
:visible.sync="showPoints" | |||
> | |||
<el-form label-width="50%"> | |||
<template v-for="(item, index) of pointForm"> | |||
<el-form-item :label="item | formatLabel" :key="index"> | |||
<el-input | |||
placeholder="请输入得分" | |||
v-model="item.actualPoints" | |||
clearable | |||
></el-input> | |||
</el-form-item> | |||
</template> | |||
</el-form> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="savePoints">确定</el-button> | |||
<el-button @click="showPoints = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
@@ -388,6 +420,8 @@ export default { | |||
], | |||
data() { | |||
return { | |||
showPoints: false, | |||
pointForm: [], | |||
searchParams: {}, | |||
dataList: [{}], | |||
loading: false, | |||
@@ -411,8 +445,111 @@ export default { | |||
computed: { | |||
...mapGetters(["formatDep", "principalList", "department", "user"]), | |||
}, | |||
filters: { | |||
formatLabel(data) { | |||
if (data.isLeader == 1) { | |||
return "第一牵头 '" + data.deptName + "' 得分:"; | |||
} else if (data.isLeader == 2) { | |||
return "其他牵头 '" + data.deptName + "' 得分:"; | |||
} else if (data.isLeader == 3) { | |||
return "配合部门 '" + data.deptName + "' 得分:"; | |||
} else { | |||
return ""; | |||
} | |||
}, | |||
}, | |||
methods: { | |||
showPointsDialog(row) { | |||
if (!row.id) { | |||
this.$message({ | |||
type: "warning", | |||
message: "请先拆分小条", | |||
}); | |||
return; | |||
} | |||
this.showPoints = true; | |||
this.getItemDeptScoreList(row.id); | |||
}, | |||
getItemDeptScoreList(id) { | |||
const loading = this.$loading({ | |||
lock: true, | |||
text: 'Loading', | |||
spinner: 'el-icon-refresh-right', | |||
background: 'rgba(1, 1, 1, 1)' | |||
}); | |||
editApi | |||
.getItemDeptScoreList(id) | |||
.then((res) => { | |||
let data = res.data; | |||
if (data.code == 0) { | |||
this.pointForm = data.data; | |||
this.itemId = id; | |||
} else { | |||
this.pointForm = []; | |||
this.showPoints = false; | |||
this.$message({ | |||
type: "warning", | |||
message: data.msg, | |||
}); | |||
} | |||
}) | |||
.catch((e) => { | |||
this.pointForm = []; | |||
this.showPoints = false; | |||
this.$message({ | |||
type: "warning", | |||
message: e.message, | |||
}); | |||
}) | |||
.finally(() => { | |||
this.$nextTick(() => { | |||
loading.close(); | |||
}); | |||
}); | |||
}, | |||
savePoints() { | |||
let list = JSON.parse(JSON.stringify(this.pointForm)); | |||
for (let obj of list) { | |||
if (!(obj.actualPoints + "").trim()) { | |||
this.$message({ | |||
type: "warning", | |||
message: "请输入" + obj.deptName + "的得分", | |||
}); | |||
return; | |||
} | |||
if (Number(obj.actualPoints) !== Number(obj.actualPoints)) { | |||
this.$message({ | |||
type: "warning", | |||
message: obj.deptName + "的得分请输入数值", | |||
}); | |||
return; | |||
} | |||
} | |||
let obj = {}; | |||
list.forEach((item) => { | |||
obj[item.deptId] = item.actualPoints; | |||
}); | |||
editApi | |||
.setItemDeptScore( | |||
Object.assign({ itemId: this.itemId, deptScore: obj }) | |||
) | |||
.then((res) => { | |||
let data = res.data; | |||
if (data.code == 0) { | |||
this.$message({ | |||
type: "success", | |||
message: "编辑分数成功", | |||
}); | |||
this.showPoints = false; | |||
this.getDataList(); | |||
} else { | |||
this.$message.error(data.msg); | |||
} | |||
}) | |||
.catch((e) => { | |||
this.$message.error("编辑分数失败"); | |||
}); | |||
}, | |||
formatList(data, type) { | |||
let arr = []; | |||
for (let key in data[type + "DeptList"]) { |
@@ -6,6 +6,7 @@ | |||
@search:task="updateParams($event)" | |||
@export="exportData($event)" | |||
:show-export="true" | |||
base-url="specialpoweritem" | |||
/> | |||
<el-table | |||
highlight-current-row | |||
@@ -131,7 +132,7 @@ | |||
<pre>{{ row.cooperatePrincipalList | formatList }}</pre> | |||
</template> | |||
</el-table-column> --> | |||
<el-table-column label="操作" width="80" align="center" fixed="right"> | |||
<el-table-column label="操作" width="150" align="center" fixed="right"> | |||
<template slot-scope="{ row }"> | |||
<el-link | |||
slot="reference" | |||
@@ -145,6 +146,12 @@ | |||
icon="el-icon-edit" | |||
>编辑</el-link | |||
> | |||
<el-link | |||
@click="showPointsDialog(row)" | |||
type="warning" | |||
icon="el-icon-edit-outline" | |||
>评分</el-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -380,6 +387,31 @@ | |||
<el-button @click="showEdit = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
<el-dialog | |||
@closed="pointForm = []" | |||
title="编辑分数" | |||
custom-class="ele-dialog-form" | |||
:lock-scroll="true" | |||
:destroy-on-close="true" | |||
width="500px" | |||
:visible.sync="showPoints" | |||
> | |||
<el-form label-width="50%"> | |||
<template v-for="(item, index) of pointForm"> | |||
<el-form-item :label="item | formatLabel" :key="index"> | |||
<el-input | |||
placeholder="请输入得分" | |||
v-model="item.actualPoints" | |||
clearable | |||
></el-input> | |||
</el-form-item> | |||
</template> | |||
</el-form> | |||
<div slot="footer"> | |||
<el-button type="primary" @click="savePoints">确定</el-button> | |||
<el-button @click="showPoints = false">取消</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -406,6 +438,8 @@ export default { | |||
], | |||
data() { | |||
return { | |||
showPoints: false, | |||
pointForm: [], | |||
searchParams: {}, | |||
dataList: [], | |||
showEdit: false, | |||
@@ -429,7 +463,112 @@ export default { | |||
computed: { | |||
...mapGetters(["formatDep", "principalList", "department", "user"]), | |||
}, | |||
filters: { | |||
formatLabel(data) { | |||
if (data.isLeader == 1) { | |||
return "第一牵头 '" + data.deptName + "' 得分:"; | |||
} else if (data.isLeader == 2) { | |||
return "其他牵头 '" + data.deptName + "' 得分:"; | |||
} else if (data.isLeader == 3) { | |||
return "配合部门 '" + data.deptName + "' 得分:"; | |||
} else { | |||
return ""; | |||
} | |||
}, | |||
}, | |||
methods: { | |||
showPointsDialog(row) { | |||
if (!row.id) { | |||
this.$message({ | |||
type: "warning", | |||
message: "请先拆分小条", | |||
}); | |||
return; | |||
} | |||
this.showPoints = true; | |||
this.getItemDeptScoreList(row.id); | |||
}, | |||
getItemDeptScoreList(id) { | |||
const loading = this.$loading({ | |||
lock: true, | |||
text: 'Loading', | |||
spinner: 'el-icon-refresh-right', | |||
background: 'rgba(1, 1, 1, 1)' | |||
}); | |||
editApi | |||
.getItemDeptScoreList(id) | |||
.then((res) => { | |||
let data = res.data; | |||
if (data.code == 0) { | |||
this.pointForm = data.data; | |||
this.itemId = id; | |||
} else { | |||
this.pointForm = []; | |||
this.showPoints = false; | |||
this.$message({ | |||
type: "warning", | |||
message: data.msg, | |||
}); | |||
} | |||
}) | |||
.catch((e) => { | |||
this.pointForm = []; | |||
this.showPoints = false; | |||
this.$message({ | |||
type: "warning", | |||
message: e.message, | |||
}); | |||
}) | |||
.finally(() => { | |||
this.$nextTick(() => { | |||
loading.close(); | |||
}); | |||
}); | |||
}, | |||
savePoints() { | |||
let list = JSON.parse(JSON.stringify(this.pointForm)); | |||
for (let obj of list) { | |||
if (!(obj.actualPoints + "").trim()) { | |||
this.$message({ | |||
type: "warning", | |||
message: "请输入" + obj.deptName + "的得分", | |||
}); | |||
return; | |||
} | |||
if (Number(obj.actualPoints) !== Number(obj.actualPoints)) { | |||
this.$message({ | |||
type: "warning", | |||
message: obj.deptName + "的得分请输入数值", | |||
}); | |||
return; | |||
} | |||
} | |||
let obj = {}; | |||
list.forEach((item) => { | |||
obj[item.deptId] = item.actualPoints; | |||
}); | |||
editApi | |||
.setItemDeptScore( | |||
Object.assign({ itemId: this.itemId, deptScore: obj }) | |||
) | |||
.then((res) => { | |||
let data = res.data; | |||
if (data.code == 0) { | |||
this.$message({ | |||
type: "success", | |||
message: "编辑分数成功", | |||
}); | |||
this.showPoints = false; | |||
this.getDataList(); | |||
} else { | |||
this.$message.error(data.msg); | |||
} | |||
}) | |||
.catch((e) => { | |||
this.$message.error("编辑分数失败"); | |||
}); | |||
}, | |||
formatList(data, type) { | |||
let arr = []; | |||
for (let key in data[type + "DeptList"]) { |