|
@@ -393,10 +393,23 @@ func (this *BaseFromKplerController) KplerClassify() {
|
|
br.ErrMsg = "获取数据失败,Err:" + e.Error()
|
|
br.ErrMsg = "获取数据失败,Err:" + e.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ fList := make([]*data_manage.BaseFromKplerClassifyItems, 0)
|
|
|
|
+ if classifyId == 0 {
|
|
|
|
+ // 返回未分类文件夹
|
|
|
|
+ fList = append(fList, &data_manage.BaseFromKplerClassifyItems{
|
|
|
|
+ ClassifyId: 0,
|
|
|
|
+ ClassifyName: "未分类",
|
|
|
|
+ LevelPath: "",
|
|
|
|
+ ParentId: 0,
|
|
|
|
+ })
|
|
|
|
+ fList = append(fList, list...)
|
|
|
|
+ }else{
|
|
|
|
+ fList = list
|
|
|
|
+ }
|
|
|
|
|
|
//组装二级分类
|
|
//组装二级分类
|
|
var ret data_manage.BaseFromKplerClassifyResp
|
|
var ret data_manage.BaseFromKplerClassifyResp
|
|
- ret.List = list
|
|
|
|
|
|
+ ret.List = fList
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|
|
br.Msg = "获取成功"
|
|
br.Msg = "获取成功"
|
|
@@ -1434,10 +1447,6 @@ func (this *BaseFromKplerController) ExportKplerList() {
|
|
classifyId, _ := this.GetInt("ClassifyId")
|
|
classifyId, _ := this.GetInt("ClassifyId")
|
|
indexCode := this.GetString("IndexCode")
|
|
indexCode := this.GetString("IndexCode")
|
|
|
|
|
|
- if classifyId <= 0 && indexCode == "" {
|
|
|
|
- br.Msg = "请选择分类或者指标"
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
dir, _ := os.Executable()
|
|
dir, _ := os.Executable()
|
|
exPath := filepath.Dir(dir)
|
|
exPath := filepath.Dir(dir)
|
|
downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
|
|
downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
|