|
@@ -200,6 +200,14 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ {
|
|
|
+ prop1: "searchStartTime",
|
|
|
+ prop2: "searchEndTime",
|
|
|
+ placeholder1: "查询开始时间",
|
|
|
+ placeholder2: "查询结束时间",
|
|
|
+ scope: "moreDataPicker",
|
|
|
+ Diszing: true,
|
|
|
+ },
|
|
|
{
|
|
|
prop: "searchKey",
|
|
|
placeholder: "请输入商品编码/商品名称",
|
|
@@ -336,12 +344,20 @@ export default {
|
|
|
loadingClose() {
|
|
|
this.disabledBtn = false;
|
|
|
},
|
|
|
- exputs() {
|
|
|
- var data = this.$refs.exportTable.formData;
|
|
|
- if (!data.businessid) {
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param {Object} data
|
|
|
+ * @remards 导出条件
|
|
|
+ */
|
|
|
+ exputs(data) {
|
|
|
+ // var data = this.$refs.exportTable.formData;
|
|
|
+ if (!data.businessId) {
|
|
|
this.$message.warning("请选择业务层次");
|
|
|
return;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * @remards 学习状态为2的话 需要勾选学时官方推送状态
|
|
|
+ */
|
|
|
if (
|
|
|
data.studyStatus === 2 &&
|
|
|
data.officialStatus !== 0 &&
|
|
@@ -351,14 +367,9 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.disabledBtn = true;
|
|
|
+ this.$modal.loading("正在导出数据,请稍后...");
|
|
|
this.$api
|
|
|
- .inquireGradegradeListexport({
|
|
|
- businessId: data.businessid,
|
|
|
- studyStatus: data.studyStatus,
|
|
|
- businessName: data.businessName,
|
|
|
- officialStatus:
|
|
|
- data.studyStatus === 2 ? data.officialStatus : undefined,
|
|
|
- })
|
|
|
+ .inquireGradegradeListexport(data)
|
|
|
.then((res) => {
|
|
|
let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
|
|
|
let link = document.createElement("a");
|
|
@@ -369,13 +380,39 @@ export default {
|
|
|
link.click();
|
|
|
link.remove();
|
|
|
this.$message.success("批量导出成功");
|
|
|
- this.dialogDR = false;
|
|
|
+ // this.dialogDR = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ /**
|
|
|
+ * @remards 请求超时处理
|
|
|
+ */
|
|
|
+ let { message } = err;
|
|
|
+ if (message.includes("timeout")) {
|
|
|
+ this.$message.error(
|
|
|
+ "数据体量过大,无法正常导出,请调整导出的日期范围,缩小数据体量"
|
|
|
+ );
|
|
|
+ }
|
|
|
})
|
|
|
.finally(() => {
|
|
|
- this.disabledBtn = false;
|
|
|
+ this.$modal.closeLoading();
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 导出前收集条件
|
|
|
+ */
|
|
|
moreActive() {
|
|
|
+ let data = {
|
|
|
+ studyStatus: this.formData.studyStatus || "",
|
|
|
+ educationTypeId: this.formData.educationTypeId || "",
|
|
|
+ businessId: this.formData.businessId || "",
|
|
|
+ searchKey: this.formData.searchKey || "",
|
|
|
+ searchStartTime: this.formData.searchStartTime / 1000 || "",
|
|
|
+ searchEndTime: this.formData.searchEndTime / 1000 || "",
|
|
|
+ officialStatus:
|
|
|
+ this.formData.studyStatus === 2 ? this.formData.learnStatus : "",
|
|
|
+ };
|
|
|
+ this.exputs(data);
|
|
|
+ return;
|
|
|
this.dialogDR = true;
|
|
|
},
|
|
|
/**
|
|
@@ -412,6 +449,9 @@ export default {
|
|
|
};
|
|
|
this.vidBox = true;
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 搜索列表
|
|
|
+ */
|
|
|
search(int) {
|
|
|
this.loading = true;
|
|
|
if (int === 1) {
|
|
@@ -430,6 +470,12 @@ export default {
|
|
|
this.formData.pageNum = 1;
|
|
|
}
|
|
|
var data = JSON.parse(JSON.stringify(this.formData));
|
|
|
+ if (this.formData.searchStartTime) {
|
|
|
+ data.searchStartTime = data.searchStartTime / 1000;
|
|
|
+ }
|
|
|
+ if (this.formData.searchEndTime) {
|
|
|
+ data.searchEndTime = data.searchEndTime / 1000;
|
|
|
+ }
|
|
|
this.$api
|
|
|
.inquireGradegradelistUserPeriod(data)
|
|
|
.then((res) => {
|
|
@@ -441,14 +487,27 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 重置列表
|
|
|
+ */
|
|
|
init() {
|
|
|
this.search(2);
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param {Number} v
|
|
|
+ * @remards 每页数量
|
|
|
+ */
|
|
|
handleSizeChange(v) {
|
|
|
this.formData.pageSize = v;
|
|
|
this.formData.pageNum = 1;
|
|
|
this.search();
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param {Number} v
|
|
|
+ * @remards 切换页码
|
|
|
+ */
|
|
|
handleCurrentChange(v) {
|
|
|
this.formData.pageNum = v;
|
|
|
this.search();
|
|
@@ -547,5 +606,4 @@ export default {
|
|
|
margin: 5px 0px;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
-
|
|
|
+</style>
|