|
@@ -61,10 +61,17 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
class-name="action-column"
|
|
class-name="action-column"
|
|
label="操作"
|
|
label="操作"
|
|
- width="90"
|
|
|
|
|
|
+ width="160"
|
|
fixed="right"
|
|
fixed="right"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="checkPrivilege('link', 'view')"
|
|
|
|
+ class="btn-primary"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="toCalculate(scope.row)"
|
|
|
|
+ >重新计算</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
v-if="checkPrivilege('link', 'view')"
|
|
v-if="checkPrivilege('link', 'view')"
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
@@ -99,7 +106,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { targetStatisticsListPage } from "../api";
|
|
|
|
|
|
+import { targetStatisticsListPage, targetStatisticsCalculate } from "../api";
|
|
import DetailTargetStatistics from "../components/target-statistics/DetailTargetStatistics.vue";
|
|
import DetailTargetStatistics from "../components/target-statistics/DetailTargetStatistics.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -117,6 +124,7 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
dataList: [],
|
|
dataList: [],
|
|
curRow: {},
|
|
curRow: {},
|
|
|
|
+ loading: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -149,6 +157,18 @@ export default {
|
|
this.curRow = row;
|
|
this.curRow = row;
|
|
this.$refs.DetailTargetStatistics.open();
|
|
this.$refs.DetailTargetStatistics.open();
|
|
},
|
|
},
|
|
|
|
+ async toCalculate(row) {
|
|
|
|
+ if (this.loading) return;
|
|
|
|
+ this.loading = true;
|
|
|
|
+ const res = await targetStatisticsCalculate({
|
|
|
|
+ cultureProgramId: row.cultureProgramId,
|
|
|
|
+ courseId: row.courseId,
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ this.loading = false;
|
|
|
|
+ if (!res) return;
|
|
|
|
+
|
|
|
|
+ this.$message.success("操作成功!");
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|