|
@@ -35,16 +35,11 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="part-box-action">
|
|
<div class="part-box-action">
|
|
- <el-button
|
|
|
|
- icon="el-icon-circle-plus-outline"
|
|
|
|
- type="primary"
|
|
|
|
- :disabled="loading"
|
|
|
|
- @click="toBatchPush"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button icon="el-icon-top-right" type="primary" @click="toBatchPush">
|
|
批量推送
|
|
批量推送
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button icon="el-icon-circle-plus-outline" @click="toMergePush">
|
|
|
|
- 合并推送印刷计划
|
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-s-order" @click="toResult">
|
|
|
|
+ 推送结果
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -66,52 +61,22 @@
|
|
label="印刷计划"
|
|
label="印刷计划"
|
|
min-width="180"
|
|
min-width="180"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <el-table-column prop="examStartTime" label="考试开始时间" width="170">
|
|
|
|
- <span slot-scope="scope">{{
|
|
|
|
- scope.row.examStartTime | timestampFilter
|
|
|
|
- }}</span>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="examEndTime" label="考试结束时间" width="170">
|
|
|
|
- <span slot-scope="scope">{{
|
|
|
|
- scope.row.examEndTime | timestampFilter
|
|
|
|
- }}</span>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="status" label="计划状态" width="100">
|
|
|
|
- <span slot-scope="scope">
|
|
|
|
- {{ scope.row.status | printPlanStatusFilter }}
|
|
|
|
- </span>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="totalGates" label="总门次" width="70">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="totalSubjects" label="总科次" width="70">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="totalPackages" label="总卷袋数" width="80">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="createTime" label="创建时间" width="170">
|
|
|
|
- <span slot-scope="scope">{{
|
|
|
|
- scope.row.createTime | timestampFilter
|
|
|
|
- }}</span>
|
|
|
|
- </el-table-column>
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="createName"
|
|
prop="createName"
|
|
- label="创建人"
|
|
|
|
- min-width="80"
|
|
|
|
|
|
+ label="推送人"
|
|
|
|
+ min-width="100"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="thirdRelateName"
|
|
|
|
- label="考试名称"
|
|
|
|
- min-width="180"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="createTime" label="推送时间" width="170">
|
|
<span slot-scope="scope">{{
|
|
<span slot-scope="scope">{{
|
|
- scope.row.thirdRelateName | defaultFieldFilter
|
|
|
|
|
|
+ scope.row.createTime | timestampFilter
|
|
}}</span>
|
|
}}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="thirdRelateId" label="考试ID" min-width="80">
|
|
|
|
|
|
+ <el-table-column prop="thirdRelateId" label="考试ID" min-width="120">
|
|
<span slot-scope="scope">{{
|
|
<span slot-scope="scope">{{
|
|
scope.row.thirdRelateId | defaultFieldFilter
|
|
scope.row.thirdRelateId | defaultFieldFilter
|
|
}}</span>
|
|
}}</span>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="syncStatus" label="同步状态" width="100">
|
|
|
|
|
|
+ <el-table-column prop="syncStatus" label="同步结果" width="120">
|
|
<span slot-scope="scope">{{
|
|
<span slot-scope="scope">{{
|
|
scope.row.syncStatus | syncPrintStatusFilter
|
|
scope.row.syncStatus | syncPrintStatusFilter
|
|
}}</span>
|
|
}}</span>
|
|
@@ -123,17 +88,10 @@
|
|
fixed="right"
|
|
fixed="right"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button
|
|
|
|
- class="btn-primary"
|
|
|
|
- type="text"
|
|
|
|
- @click="toPreview(scope.row)"
|
|
|
|
- >查看</el-button
|
|
|
|
- >
|
|
|
|
<el-button
|
|
<el-button
|
|
v-if="scope.row.canPush"
|
|
v-if="scope.row.canPush"
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
type="text"
|
|
type="text"
|
|
- :disabled="loading"
|
|
|
|
@click="toPush(scope.row)"
|
|
@click="toPush(scope.row)"
|
|
>推送</el-button
|
|
>推送</el-button
|
|
>
|
|
>
|
|
@@ -143,44 +101,41 @@
|
|
<div class="part-page">
|
|
<div class="part-page">
|
|
<el-pagination
|
|
<el-pagination
|
|
background
|
|
background
|
|
- layout="total,prev, pager, next"
|
|
|
|
|
|
+ layout="total,prev, pager, next,sizes"
|
|
:current-page="current"
|
|
:current-page="current"
|
|
:total="total"
|
|
:total="total"
|
|
:page-size="size"
|
|
:page-size="size"
|
|
@current-change="toPage"
|
|
@current-change="toPage"
|
|
|
|
+ @size-change="sizeChange"
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="tips-info">
|
|
|
|
+ <p>说明:</p>
|
|
|
|
+ <p>1、印刷计划下的印刷任务,印刷完成后才允许推送;</p>
|
|
|
|
+ <p>
|
|
|
|
+ 2、同步状态说明:5/0,前面表示计划下未推送的命题任务数量,后面表示已推送的命题任务数量;
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- MergePushDialog -->
|
|
|
|
- <merge-push-dialog
|
|
|
|
- ref="MergePushDialog"
|
|
|
|
- :ids="multipleSelection"
|
|
|
|
|
|
+ <!-- PrintPlanBatchPushDialog -->
|
|
|
|
+ <print-plan-batch-push-dialog
|
|
|
|
+ ref="PrintPlanBatchPushDialog"
|
|
|
|
+ :ids="curSelectedPlanIds"
|
|
@modified="mergePushed"
|
|
@modified="mergePushed"
|
|
- ></merge-push-dialog>
|
|
|
|
- <!-- ModifyPrintPlan -->
|
|
|
|
- <modify-print-plan
|
|
|
|
- ref="ModifyPrintPlan"
|
|
|
|
- :instance="curPrintPlan"
|
|
|
|
- edit-type="PREVIEW"
|
|
|
|
- ></modify-print-plan>
|
|
|
|
|
|
+ ></print-plan-batch-push-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {
|
|
|
|
- printPlanPushListQuery,
|
|
|
|
- printPlanBatchPush,
|
|
|
|
- printPlanPush
|
|
|
|
-} from "../api";
|
|
|
|
|
|
+import { printPlanPushListQuery } from "../api";
|
|
import { examSemesterList } from "../../base/api";
|
|
import { examSemesterList } from "../../base/api";
|
|
-import MergePushDialog from "../components/MergePushDialog";
|
|
|
|
-import ModifyPrintPlan from "../../print/components/ModifyPrintPlan";
|
|
|
|
|
|
+import PrintPlanBatchPushDialog from "../components/PrintPlanBatchPushDialog.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "print-plan-push-manage",
|
|
name: "print-plan-push-manage",
|
|
- components: { MergePushDialog, ModifyPrintPlan },
|
|
|
|
|
|
+ components: { PrintPlanBatchPushDialog },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
filter: {
|
|
filter: {
|
|
@@ -195,7 +150,8 @@ export default {
|
|
semesters: [],
|
|
semesters: [],
|
|
dataList: [],
|
|
dataList: [],
|
|
curPrintPlan: {},
|
|
curPrintPlan: {},
|
|
- multipleSelection: []
|
|
|
|
|
|
+ multipleSelection: [],
|
|
|
|
+ curSelectedPlanIds: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -224,6 +180,10 @@ export default {
|
|
search() {
|
|
search() {
|
|
this.toPage(1);
|
|
this.toPage(1);
|
|
},
|
|
},
|
|
|
|
+ sizeChange(size) {
|
|
|
|
+ this.size = size;
|
|
|
|
+ this.toPage(1);
|
|
|
|
+ },
|
|
async getSemesters() {
|
|
async getSemesters() {
|
|
const res = await examSemesterList({});
|
|
const res = await examSemesterList({});
|
|
this.semesters = res || [];
|
|
this.semesters = res || [];
|
|
@@ -236,58 +196,23 @@ export default {
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
this.multipleSelection = val.map(item => item.id);
|
|
this.multipleSelection = val.map(item => item.id);
|
|
},
|
|
},
|
|
- async toBatchPush() {
|
|
|
|
- if (this.loading) return;
|
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
|
- this.$message.error("请选择要批量推送的数据");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- const result = await this.$confirm("确定要推送选中的计划吗?", "提示", {
|
|
|
|
- type: "warning"
|
|
|
|
- }).catch(() => {});
|
|
|
|
- if (result !== "confirm") return;
|
|
|
|
-
|
|
|
|
- this.loading = true;
|
|
|
|
- const data = await printPlanBatchPush(
|
|
|
|
- this.multipleSelection
|
|
|
|
- ).catch(() => {});
|
|
|
|
- this.loading = false;
|
|
|
|
- if (!data) return;
|
|
|
|
-
|
|
|
|
- this.$message.success("提交成功!");
|
|
|
|
- this.toPage(this.current);
|
|
|
|
|
|
+ toBatchPush() {
|
|
|
|
+ // if (!this.multipleSelection.length) {
|
|
|
|
+ // this.$message.error("请选择要批量推送的印刷计划");
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
|
|
+ this.curSelectedPlanIds = [...this.multipleSelection];
|
|
|
|
+ this.$refs.PrintPlanBatchPushDialog.open();
|
|
},
|
|
},
|
|
- toMergePush() {
|
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
|
- this.$message.error("请选择要合并推送的数据");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- this.$refs.MergePushDialog.open();
|
|
|
|
|
|
+ toPush(row) {
|
|
|
|
+ this.curSelectedPlanIds = [row.id];
|
|
|
|
+ this.$refs.PrintPlanBatchPushDialog.open();
|
|
},
|
|
},
|
|
mergePushed() {
|
|
mergePushed() {
|
|
this.toPage(this.current);
|
|
this.toPage(this.current);
|
|
},
|
|
},
|
|
- toPreview(row) {
|
|
|
|
- this.curPrintPlan = row;
|
|
|
|
- this.$refs.ModifyPrintPlan.open();
|
|
|
|
- },
|
|
|
|
- async toPush(row) {
|
|
|
|
- if (this.loading) return;
|
|
|
|
- const result = await this.$confirm("确定要推送当前计划吗?", "提示", {
|
|
|
|
- type: "warning"
|
|
|
|
- }).catch(() => {});
|
|
|
|
- if (result !== "confirm") return;
|
|
|
|
-
|
|
|
|
- this.loading = true;
|
|
|
|
- const data = await printPlanPush({
|
|
|
|
- printPlanId: row.id,
|
|
|
|
- thirdRelateId: row.thirdRelateId
|
|
|
|
- }).catch(() => {});
|
|
|
|
- this.loading = false;
|
|
|
|
- if (!data) return;
|
|
|
|
-
|
|
|
|
- this.$message.success("提交成功!");
|
|
|
|
- this.toPage(this.current);
|
|
|
|
|
|
+ toResult() {
|
|
|
|
+ // todo:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|