yangzhou-cyber 3 лет назад
Родитель
Сommit
f8dbcf70bd
9 измененных файлов: 338 добавлений и 74 удалений
  1. +6
    -0
      src/api/second/segmentation/basicTable.js
  2. +3
    -0
      src/api/second/segmentation/constraint.js
  3. +3
    -0
      src/api/second/segmentation/reward.js
  4. +3
    -0
      src/api/second/taskSummary.js
  5. +2
    -2
      src/config/setting.js
  6. +181
    -0
      src/views/second/summary/index.vue
  7. +63
    -26
      src/views/second/taskSummary/basicTable.vue
  8. +34
    -20
      src/views/second/taskSummary/constraint.vue
  9. +43
    -26
      src/views/second/taskSummary/reward.vue

+ 6
- 0
src/api/second/segmentation/basicTable.js Просмотреть файл

@@ -15,5 +15,11 @@ export default {
},
deleteItem(id){
return axios.delete("/basictaskitem/deleteItem/"+id)
},
editPoints(params){
return axios.post('/basictaskitem/updateItemDeduction',params)
},
getItemDeptScoreList(id){
return axios.get('/basictaskitem/getItemDeptScoreList/'+id)
}
}

+ 3
- 0
src/api/second/segmentation/constraint.js Просмотреть файл

@@ -15,5 +15,8 @@ export default {
},
deleteItem(id){
return axios.delete("/rigidityconstraintitem/deleteItem/"+id)
},
editPoints(params){
return axios.post('/rigidityconstraintitem/updateItemDeduction',params)
}
}

+ 3
- 0
src/api/second/segmentation/reward.js Просмотреть файл

@@ -15,5 +15,8 @@ export default {
},
deleteItem(id){
return axios.delete("/specialpoweritem/deleteItem/"+id)
},
editPoints(params){
return axios.post('/specialpoweritem/updateItemBonus',params)
}
}

+ 3
- 0
src/api/second/taskSummary.js Просмотреть файл

@@ -18,5 +18,8 @@ export default {
},
exportRewardList(params){
return axios.get('/specialpoweritem/export',{params})
},
getSummaryList(){
return axios.get('/statistics/reportDataSummary')
}
}

+ 2
- 2
src/config/setting.js Просмотреть файл

@@ -4,8 +4,8 @@
export default {
version: '1.0',
name: 'JNDZ考核管理系统', // 项目名称
baseURL: 'http://121.40.249.52: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', // 菜单数据接口

+ 181
- 0
src/views/second/summary/index.vue Просмотреть файл

@@ -0,0 +1,181 @@
<template>
<div class="ele-body">
<el-card shadow="never">
<div class="upload" style="margin-bottom: 20px">
<el-button type="primary" size="small" style="margin-right: 20px"
>上传</el-button
>
<input type="file" style="display: none" ref="file" />
<el-button type="default" size="small" @click="$refs.file.click()"
>选择文件</el-button
>
<div style="display: inline-block; margin-left: 20px"></div>
</div>
<el-table
height="calc(100vh - 220px)"
:data="dataList"
:loading="loading"
>
<el-table-column
label="部门名称"
align="center"
min-width="120"
show-overflow-tooltip
prop="deptName"
></el-table-column>
<el-table-column label="基础目标" align="center">
<el-table-column
label="牵头次数"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.basicTaskInfo.leaderNum||'/' }}
</template>
</el-table-column>
<el-table-column
label="配合次数"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.basicTaskInfo.cooperateNum||'/' }}
</template>
</el-table-column>
<el-table-column
label="承担分数"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.basicTaskInfo.bearScore||'/' }}
</template>
</el-table-column>
<el-table-column
label="牵头承担分数"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.basicTaskInfo.leaderBearScore||'/' }}
</template>
</el-table-column>
<el-table-column
label="评分"
align="center"
min-width="100"
show-overflow-tooltip
>
<tempalte slot-scope="{ row }">
{{ row.basicTaskInfo.points||'/' }}
</tempalte>
</el-table-column>
</el-table-column>
<el-table-column label="重点专项" align="center">
<el-table-column
label="参与次数"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.specialPowerInfo.partyNum ||'/'}}
</template>
</el-table-column>
<el-table-column
label="评分"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.specialPowerInfo.points||'/' }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="刚性约束" align="center">
<el-table-column
label="参与次数"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.rigidityConstraintInfo.partyNum||'/' }}
</template>
</el-table-column>
<el-table-column
label="评分"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.rigidityConstraintInfo.points||'/' }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="总分" align="center">
<el-table-column
label="参与次数"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.summaryInfo.partyNum ||'/'}}
</template>
</el-table-column>
<el-table-column
label="评分"
align="center"
min-width="100"
show-overflow-tooltip
>
<template slot-scope="{ row }">
{{ row.summaryInfo.points||'/' }}
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-card>
</div>
</template>

<script>
import summaryApi from "@/api/second/taskSummary";
export default {
data() {
return {
dataList: [],
loading: false,
};
},
created() {
this.loading = true;
summaryApi
.getSummaryList()
.then((res) => {
let data = res.data;
if (data.code == 0) {
this.dataList = data.data;
} else {
this.dataList = [];
}
})
.catch((e) => {
this.dataList = [];
})
.finally(() => {
this.loading = false;
});
},
};
</script>

<style>
</style>

+ 63
- 26
src/views/second/taskSummary/basicTable.vue Просмотреть файл

@@ -53,22 +53,26 @@
align="center"
prop="points"
></el-table-column>
<!-- <el-table-column label="扣分" width="80" align="center">
<el-table-column label="最终扣分" width="80" align="center">
<template slot-scope="{ row, $index }">
<div @click="showText($index, true)" style="height: 100%">
<div
@dblclick="showText($index, true) && refs['input' + $index].focus"
style="height: 100%"
>
<el-input
:ref="'input' + $index"
v-model="row.deptPoints"
v-model="row.deduction"
v-if="row.focus"
@hook:mounted="autoFocus($index)"
@blur="
showText($index, false);
updatePoints(row, $index);
"
></el-input>
<span v-else>{{ row.deptPoints || 0 }}</span>
<span v-else>{{ row.deduction || 0 }}</span>
</div>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column
label="区牵头单位"
width="95"
@@ -127,7 +131,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"
@@ -142,6 +146,12 @@
fixed="right"
>编辑</el-link
>
<el-link
@click="showPoints = true"
type="warning"
icon="el-icon-edit-outline"
>评分</el-link
>
</template>
</el-table-column>
</el-table>
@@ -378,6 +388,20 @@
<el-button @click="showEdit = false">取消</el-button>&nbsp;
</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"
>
<div slot="footer">
<el-button type="primary" @click="savePoints">确定</el-button>
<el-button @click="showPoints = false">取消</el-button>&nbsp;
</div>
</el-dialog>
</el-card>
</div>
</template>
@@ -404,6 +428,8 @@ export default {
],
data() {
return {
showPoints: false,
pointForm: {},
searchParams: {},
dataList: [],
loading: false,
@@ -420,8 +446,8 @@ export default {
preValue: null,
};
},
created() {
this.getDataList();
async created() {
await this.getDataList();
this.$store.dispatch("base/getPrincipalList");
},
computed: {
@@ -435,34 +461,50 @@ export default {
},
},
methods: {
savePoints() {},
autoFocus(index) {
this.$refs["input" + index].focus();
},
updatePoints(row, index) {
if (row.deptPoints == this.preValue) {
if(!row.id){
this.$message({
type:"warning",
message:"请想拆分小条"
})
this.$set(this.dataList[index], "deduction", this.preValue);
return
}
if (row.deduction == this.preValue) {
return;
}
if (
row.deptPoints < 0 ||
row.deptPoints > row.points ||
!row.deptPoints.trim()
row.deduction < 0 ||
!row.deduction.trim() ||
Number(row.deduction) !== Number(row.deduction)
) {
this.$message({
type: "warning",
message: "请输入数值0~" + row.points,
message: "请输入数值",
});
let data = this.dataList;
data[index].deptPoints = this.preValue;
this.dataList = data;
this.$set(this.dataList[index], "deduction", this.preValue);
return;
}
editApi
.editItem({
.editPoints({
itemId: row.id,
expectedPoints: row.deptPoints,
deduction: row.deduction,
})
.then((res) => {
this.$message({ type: "success", message: "修改成功" });
let data = res.data;
if (data.code == 0) {
this.$message({ type: "success", message: "修改成功" });
} else {
this.$message.error(data.msg);
}
})
.catch(() => {
this.$message.error("修改失败");
}).finally(()=>{
this.getDataList();
});
},
@@ -473,14 +515,9 @@ export default {
// this.dataList = data;
this.$set(this.dataList[index], "focus", bool);
if (bool) {
this.preValue = data[index].deptPoints;
this.preValue = data[index].deduction;
}
this.$nextTick(() => {
this.$refs["input" + index].focus();
});
} catch (e) {
console.log(e);
}
} catch {}
},
exportData(data) {
this.loading = true;

+ 34
- 20
src/views/second/taskSummary/constraint.vue Просмотреть файл

@@ -42,22 +42,23 @@
prop="itemContent"
></el-table-column>

<!-- <el-table-column label="扣分" width="80" align="center">
<el-table-column label="最终扣分" width="80" align="center">
<template slot-scope="{ row, $index }">
<div @click="showText($index, true)" style="height: 100%">
<div @dblclick="showText($index, true)" style="height: 100%">
<el-input
:ref="'input' + $index"
v-model="row.deptPoints"
v-model="row.deduction"
v-if="row.focus"
@hook:mounted="autoFocus($index)"
@blur="
showText($index, false);
updatePoints(row, $index);
"
></el-input>
<span v-else>{{ row.deptPoints || 0 }}</span>
<span v-else>{{ row.deduction || 0 }}</span>
</div>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column
label="区牵头单位"
width="95"
@@ -423,34 +424,50 @@ export default {
},
},
methods: {
autoFocus(index) {
this.$refs["input" + index].focus();
},
updatePoints(row, index) {
if (row.deptPoints == this.preValue) {
if (!row.id) {
this.$message({
type: "warning",
message: "请想拆分小条",
});
this.$set(this.dataList[index], "deduction", this.preValue);
return
}
if (row.deduction == this.preValue) {
return;
}
if (
row.deptPoints < 0 ||
row.deptPoints > row.points ||
!row.deptPoints.trim()
row.deduction < 0 ||
!row.deduction.trim() ||
Number(row.deduction) !== Number(row.deduction)
) {
this.$message({
type: "warning",
message: "请输入数值0~" + row.points,
message: "请输入数值",
});
let data = this.dataList;
data[index].deptPoints = this.preValue;
this.dataList = data;
this.$set(this.dataList[index], "deduction", this.preValue);
return;
}
editApi
.editItem({
.editPoints({
itemId: row.id,
expectedPoints: row.deptPoints,
deduction: row.deduction,
})
.then((res) => {
this.$message({ type: "success", message: "修改成功" });
let data = res.data;
if (data.code == 0) {
this.$message({ type: "success", message: "修改成功" });
} else {
this.$message.error(data.msg);
}
})
.catch(() => {
this.$message.error("修改失败");
})
.finally(() => {
this.getDataList();
});
},
@@ -461,11 +478,8 @@ export default {
// this.dataList = data;
this.$set(this.dataList[index], "focus", bool);
if (bool) {
this.preValue = data[index].deptPoints;
this.preValue = data[index].deduction;
}
this.$nextTick(() => {
this.$refs["input" + index].focus();
});
} catch (e) {
console.log(e);
}

+ 43
- 26
src/views/second/taskSummary/reward.vue Просмотреть файл

@@ -53,22 +53,23 @@
align="center"
prop="points"
></el-table-column>
<!-- <el-table-column label="加分" width="80" align="center">
<el-table-column label="最终加分" width="80" align="center">
<template slot-scope="{ row, $index }">
<div @click="showText($index, true)" style="height: 100%">
<div @dblclick="showText($index, true)" style="height: 100%">
<el-input
:ref="'input' + $index"
v-model="row.deptPoints"
v-model="row.bonus"
v-if="row.focus"
@hook:mounted="autoFocus($index)"
@blur="
showText($index, false);
updatePoints(row, $index);
"
></el-input>
<span v-else>{{ row.deptPoints || 0 }}</span>
<span v-else>{{ row.bonus || 0 }}</span>
</div>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column
label="区牵头单位"
width="95"
@@ -134,7 +135,10 @@
type="primary"
:underline="false"
@click="edit(row)"
:disabled="!row.id || (user.user.deptId != 1 && user.user.deptId != row.leaderDept)"
:disabled="
!row.id ||
(user.user.deptId != 1 && user.user.deptId != row.leaderDept)
"
icon="el-icon-edit"
>编辑</el-link
>
@@ -358,7 +362,7 @@
};
}
"
/>
/>
</el-col>
</el-row>
</div>
@@ -414,7 +418,7 @@ export default {
(document.documentElement.clientHeight - 260 - 45) / 45
),
},
preValue: null
preValue: null,
};
},
created() {
@@ -432,34 +436,50 @@ export default {
},
},
methods: {
autoFocus(index) {
this.$refs["input" + index].focus();
},
updatePoints(row, index) {
if (row.deptPoints == this.preValue) {
if (!row.id) {
this.$message({
type: "warning",
message: "请想拆分小条",
});
this.$set(this.dataList[index], "deduction", this.preValue);
return;
}
if (row.bonus == this.preValue) {
return;
}
if (
row.deptPoints < 0 ||
row.deptPoints > row.points ||
!row.deptPoints.trim()
row.bonus < 0 ||
!row.bonus.trim() ||
Number(row.bonus) !== Number(row.bonus)
) {
this.$message({
type: "warning",
message: "请输入数值0~" + row.points,
message: "请输入数值",
});
let data = this.dataList;
data[index].deptPoints = this.preValue;
this.dataList = data;
this.$set(this.dataList[index], "bonus", this.preValue);
return;
}
editApi
.editItem({
.editPoints({
itemId: row.id,
expectedPoints: row.deptPoints,
bonus: row.bonus,
})
.then((res) => {
this.$message({ type: "success", message: "修改成功" });
let data = res.data;
if (data.code == 0) {
this.$message({ type: "success", message: "修改成功" });
} else {
this.$message.error(data.msg);
}
})
.catch(() => {
this.$message.error("修改失败");
})
.finally(() => {
this.getDataList();
});
},
@@ -470,11 +490,8 @@ export default {
// this.dataList = data;
this.$set(this.dataList[index], "focus", bool);
if (bool) {
this.preValue = data[index].deptPoints;
this.preValue = data[index].bonus;
}
this.$nextTick(() => {
this.$refs["input" + index].focus();
});
} catch (e) {
console.log(e);
}
@@ -488,7 +505,7 @@ export default {
.then((res) => {
if (res.data.code == 0) {
// window.open(res.data.data);
window.location.href=res.data.data
window.location.href = res.data.data;
this.$message({
type: "success",
message: "导出成功",
@@ -641,7 +658,7 @@ export default {
}
}
} else {
if (param!="points"&&!form[param]) {
if (param != "points" && !form[param]) {
this.$message({
type: "warning",
message: "请完善信息",
@@ -661,7 +678,7 @@ export default {
}
if (
param == "points" &&
form[param]&&
form[param] &&
parseInt(form[param]) !== parseInt(form[param])
) {
this.$message({

Загрузка…
Отмена
Сохранить