|
@@ -21,15 +21,18 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <!-- <el-button type="primary" :disabled="paramsMiss()" @click="searchHandler">查询</el-button>-->
|
|
|
|
|
|
+ <!-- <el-button type="primary" :disabled="disableParam()" @click="searchHandler">查询</el-button>-->
|
|
|
|
|
|
- <el-button type="primary" :disabled="paramsMiss()" @click="countHandler"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="disableParam()"
|
|
|
|
+ @click="refreshHandler"
|
|
>刷新计算</el-button
|
|
>刷新计算</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
style="float: right"
|
|
style="float: right"
|
|
- :disabled="paramsMiss()"
|
|
|
|
|
|
+ :disabled="disableParam()"
|
|
@click="openDialog"
|
|
@click="openDialog"
|
|
>及格线设置</el-button
|
|
>及格线设置</el-button
|
|
>
|
|
>
|
|
@@ -99,8 +102,8 @@
|
|
|
|
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
- :disabled="paramsMiss()"
|
|
|
|
- @click="orgExportExcel"
|
|
|
|
|
|
+ :disabled="disableParam()"
|
|
|
|
+ @click="exportOrgStatisticExcel"
|
|
>导出</el-button
|
|
>导出</el-button
|
|
>
|
|
>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -139,8 +142,8 @@
|
|
|
|
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
- :disabled="paramsMiss()"
|
|
|
|
- @click="courseExportExcel"
|
|
|
|
|
|
+ :disabled="disableParam()"
|
|
|
|
+ @click="exportCourseStatisticExcel"
|
|
>导出</el-button
|
|
>导出</el-button
|
|
>
|
|
>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -237,7 +240,7 @@ import { mapState } from "vuex";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- counting: false,
|
|
|
|
|
|
+ refreshing: false,
|
|
setLineLoading: false,
|
|
setLineLoading: false,
|
|
visible: false,
|
|
visible: false,
|
|
dialogLoading: false,
|
|
dialogLoading: false,
|
|
@@ -310,7 +313,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
- paramsMiss() {
|
|
|
|
|
|
+ disableParam() {
|
|
return !this.searchParams.examId;
|
|
return !this.searchParams.examId;
|
|
},
|
|
},
|
|
getExamList(examName) {
|
|
getExamList(examName) {
|
|
@@ -409,22 +412,22 @@ export default {
|
|
this.courseTableData = res.data || [];
|
|
this.courseTableData = res.data || [];
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- orgExportExcel() {
|
|
|
|
|
|
+ exportOrgStatisticExcel() {
|
|
const { examId, orgId } = this.searchParams;
|
|
const { examId, orgId } = this.searchParams;
|
|
let key = this.user.key;
|
|
let key = this.user.key;
|
|
let token = this.user.token;
|
|
let token = this.user.token;
|
|
let url = `/api/ecs_oe_admin/exam/statistic/overview/for/org/export?examId=${examId}&orgId=${orgId}&$key=${key}&$token=${token}`;
|
|
let url = `/api/ecs_oe_admin/exam/statistic/overview/for/org/export?examId=${examId}&orgId=${orgId}&$key=${key}&$token=${token}`;
|
|
location.href = url;
|
|
location.href = url;
|
|
},
|
|
},
|
|
- courseExportExcel() {
|
|
|
|
|
|
+ exportCourseStatisticExcel() {
|
|
const { examId, courseId } = this.searchParams;
|
|
const { examId, courseId } = this.searchParams;
|
|
let key = this.user.key;
|
|
let key = this.user.key;
|
|
let token = this.user.token;
|
|
let token = this.user.token;
|
|
let url = `/api/ecs_oe_admin/exam/statistic/overview/for/course/export?examId=${examId}&courseId=${courseId}&$key=${key}&$token=${token}`;
|
|
let url = `/api/ecs_oe_admin/exam/statistic/overview/for/course/export?examId=${examId}&courseId=${courseId}&$key=${key}&$token=${token}`;
|
|
location.href = url;
|
|
location.href = url;
|
|
},
|
|
},
|
|
- countHandler() {
|
|
|
|
- this.counting = true;
|
|
|
|
|
|
+ refreshHandler() {
|
|
|
|
+ this.refreshing = true;
|
|
this.$http
|
|
this.$http
|
|
.post(
|
|
.post(
|
|
"/api/ecs_oe_admin/exam/statistic/overview/refresh",
|
|
"/api/ecs_oe_admin/exam/statistic/overview/refresh",
|
|
@@ -436,8 +439,17 @@ export default {
|
|
}
|
|
}
|
|
)
|
|
)
|
|
.then(() => {
|
|
.then(() => {
|
|
- this.counting = false;
|
|
|
|
|
|
+ this.refreshing = false;
|
|
this.searchHandler();
|
|
this.searchHandler();
|
|
|
|
+ })
|
|
|
|
+ .catch((e) => {
|
|
|
|
+ if (e.response.status === 500) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ showClose: true,
|
|
|
|
+ message: e.response.data.desc,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|