浏览代码

'导出数量限制'

哥哥玩剑魂呢 3 年之前
父节点
当前提交
368fa12ba2
共有 1 个文件被更改,包括 14 次插入3 次删除
  1. 14 3
      src/views/ranking/integral_event.vue

+ 14 - 3
src/views/ranking/integral_event.vue

@@ -368,11 +368,13 @@ export default {
 			//导入相关
 			toleadShw: false,
 			nowIndex: 1,
-			toleadResult: {}
+			toleadResult: {},
+			deriveNum: 0,
 		};
 	},
 	components: { noData, Steps, toLead },
 	mounted() {
+		this.deriveRestrict()
 		this.getDepartment();
 		this.get_rule_trees();
 		this.get_integral_list(this.formData);
@@ -422,6 +424,15 @@ export default {
 		}
 	},
 	methods: {
+		deriveRestrict(){
+			this.deriveNum = 0
+			this.$axios('GET', '/api/site/info')
+				.then(res => {
+					if (res.data.code == 1) {
+						this.deriveNum = Number(res.data.data.export_max_num)
+					}
+				})
+		},
 		getTypes() {
 			var arr = this.$getTyps();
 			return arr.filter(function(item) {
@@ -531,8 +542,8 @@ export default {
 			}
 		},
 		exportExcel() {
-			if(this.total >= 10000){
-				this.$message.warning('当前数据已超出10000条,请拆分时间段分批导出');
+			if(this.deriveNum > 0 && this.total >= this.deriveNum){
+				this.$message.warning('当前数据已超出'+ this.deriveNum +'条,请拆分时间段分批导出');
 				return
 			}
 			window.open(