瀏覽代碼

fix:数据导出筛选页接口增加总数返回

xuemingyang 3 年之前
父節點
當前提交
5db34d1f1e
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 3 1
      src/jfw/front/ws_dataExport.go
  2. 3 1
      src/jfw/modules/app/src/app/front/ws_dataExport.go

+ 3 - 1
src/jfw/front/ws_dataExport.go

@@ -199,13 +199,15 @@ func (w *WsDataExport) GetPreview() error {
 	if res == nil || err != nil {
 		return w.Render("/pc/dataExport_noDataErr.html", &w.T)
 	}
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, _id)
 	//格式化字段
 	res_screen := dataexport.ScreenData(res, dataType, 20, kws)
 	list := dataexport.FormatExportData(public.Mgo_Ent, &res_screen, config.Sysconfig["webdomain"].(string), dataType, true)
 	_res["data"] = subUrl(list, dataType)
 	_res["dataType"] = dataType
 	w.ServeJson(map[string]interface{}{
-		"res": _res,
+		"res":   _res,
+		"total": msgCount,
 	})
 	return nil
 }

+ 3 - 1
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -68,6 +68,7 @@ func (w *WsDataExport) GetPreview() error {
 	if res == nil || err != nil {
 		return w.Render("/pc/dataExport_noDataErr.html", &w.T)
 	}
+	msgCount := dataexport.GetDataExportSearchCountByScdId(public.MQFW, public.Mgo_Bidding, public.DbConf.Mongodb.Bidding.DbName, public.DbConf.Elasticsearch.Main.Address, _id)
 	//格式化字段
 	res_screen := dataexport.ScreenData(res, dataType, 20, kws)
 	var EntArr = []string{}
@@ -83,7 +84,8 @@ func (w *WsDataExport) GetPreview() error {
 	_res["data"] = subUrl(list, dataType)
 	_res["dataType"] = dataType
 	w.ServeJson(map[string]interface{}{
-		"res": _res,
+		"res":   _res,
+		"total": msgCount,
 	})
 	return nil
 }