|
@@ -29,7 +29,11 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="状态">
|
|
<el-form-item label="状态">
|
|
- <el-select v-model="searchForm.weixinAnswerEnabled" class="input">
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="searchForm.weixinAnswerEnabled"
|
|
|
|
+ class="input"
|
|
|
|
+ clearable
|
|
|
|
+ >
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="启用" value="true"></el-option>
|
|
<el-option label="启用" value="true"></el-option>
|
|
<el-option label="禁用" value="false"></el-option>
|
|
<el-option label="禁用" value="false"></el-option>
|
|
@@ -60,7 +64,7 @@
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
:disabled="noBatchSelected"
|
|
:disabled="noBatchSelected"
|
|
- @click="xxx"
|
|
|
|
|
|
+ @click="batchEnabled(true)"
|
|
>批量启用</el-button
|
|
>批量启用</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
@@ -68,21 +72,21 @@
|
|
type="danger"
|
|
type="danger"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
:disabled="noBatchSelected"
|
|
:disabled="noBatchSelected"
|
|
- @click="xxx"
|
|
|
|
|
|
+ @click="batchEnabled(false)"
|
|
>批量禁用</el-button
|
|
>批量禁用</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-upload2"
|
|
icon="el-icon-upload2"
|
|
- @click="xxx"
|
|
|
|
|
|
+ @click="importSetting"
|
|
>导入设置</el-button
|
|
>导入设置</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
- @click="xxx"
|
|
|
|
|
|
+ @click="exportSetting"
|
|
>导出设置</el-button
|
|
>导出设置</el-button
|
|
>
|
|
>
|
|
|
|
|
|
@@ -108,7 +112,7 @@
|
|
<el-pagination
|
|
<el-pagination
|
|
:current-page="searchForm.pageNo"
|
|
:current-page="searchForm.pageNo"
|
|
:page-size="searchForm.pageSize"
|
|
:page-size="searchForm.pageSize"
|
|
- :page-sizes="[2, 20, 50, 100, 200, 300]"
|
|
|
|
|
|
+ :page-sizes="[10, 20, 50, 100, 200, 300]"
|
|
:total="totalElements"
|
|
:total="totalElements"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
@current-change="handlePagerNo"
|
|
@current-change="handlePagerNo"
|
|
@@ -164,10 +168,50 @@ export default {
|
|
this.totalElements = response.data.totalElements;
|
|
this.totalElements = response.data.totalElements;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- xxx() {
|
|
|
|
|
|
+ importSetting() {
|
|
console.log("examId", this.searchForm.examId);
|
|
console.log("examId", this.searchForm.examId);
|
|
console.log("courseIds", JSON.stringify(this.selectedCourseIds));
|
|
console.log("courseIds", JSON.stringify(this.selectedCourseIds));
|
|
},
|
|
},
|
|
|
|
+ exportSetting() {
|
|
|
|
+ this.$confirm("确认导出设置?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let url =
|
|
|
|
+ EXAM_WORK_API +
|
|
|
|
+ "/exam/course/export/weixinAnswerEnabledSetting?examId=" +
|
|
|
|
+ this.searchForm.examId +
|
|
|
|
+ "&weixinAnswerEnabled=" +
|
|
|
|
+ this.searchForm.weixinAnswerEnabled;
|
|
|
|
+ window.open(url);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ batchEnabled(enabled) {
|
|
|
|
+ this.$confirm(enabled ? "确认启用?" : "确认禁用?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let courseIds = this.selectedCourseIds.join(",");
|
|
|
|
+
|
|
|
|
+ let url =
|
|
|
|
+ EXAM_WORK_API +
|
|
|
|
+ "/exam/course/weixinAnswerEnabled?examId=" +
|
|
|
|
+ this.searchForm.examId +
|
|
|
|
+ "&enabled=" +
|
|
|
|
+ enabled +
|
|
|
|
+ "&courseIds=" +
|
|
|
|
+ courseIds;
|
|
|
|
+ this.$http.post(url).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: enabled ? "批量启用成功!" : "批量禁用成功!",
|
|
|
|
+ });
|
|
|
|
+ this.doSearch(1);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
handlePagerNo(pageNo) {
|
|
handlePagerNo(pageNo) {
|
|
this.doSearch(pageNo);
|
|
this.doSearch(pageNo);
|
|
},
|
|
},
|