import http from "@/api/http.js"

/* 数据库管理模块  */
const dataBaseInterface = {
	/**
	 * 新增分类
	 * @param {ClassifyName} params 
	 * @param {ParentId} params 
	 * @returns 
	 */
	nodeAdd: params => {
		return http.post('/datamanage/classify/add',params)
	},
	/**
	 * 删除分类接口
	 * @param {ClassifyId} params 
	 * @param {EdbInfoId} params 
	 * @returns 
	 */
	nodeDelete: params => {
		return http.post('/datamanage/classify/delete',params)
	},
	/**
	 * 删除检测
	 * @param {ClassifyId} params 
	 * @param {EdbInfoId} params 
	 * @returns 0:默认值，如果为0，继续走其他校验，1:若目录关联指标不可删除,2:确认删除当前目录及包含的子目录吗,3:当前指标已用作画图，不可删除
	 */
	nodeDelCheck: params => {
		return http.post('/datamanage/classify/delete/check',params)
	},
	/**
	 * 修改分类
	 * @param {ClassifyId} params 
	 * @param {ClassifyName} params 
	 * @returns 
	 */
	nodeEdit: params => {
		return http.post('/datamanage/classify/edit',params)
	},
	/**
	 * 获取分类层级 截止到3及目录
	 * @param {*} params 
	 * @returns 
	 */
	menuList: params => {
		return http.get('/datamanage/classify/items',params)
	},
	/**
	 * 获取分类层级 截止到3及目录
	 * @param {*} params 
	 * @returns 
	 */
	menuListV2: params => {
		return http.get('/datamanage/classify/items/v2',params)
	},
	/**
	 * 通过分类查找指标列表数据
	 * @param ClassifyId
	 */
	getEdbListForClassify:params=>{
		return http.get('/datamanage/classify/edb_info/list',params)
	},
	/**
	 * 树列表
	 * @returns 
	 */
	nodeTree: params => {
		return http.get('/datamanage/classify/list',params)
	},
	/**
	 * 搜索指标
	 * @param {Source } params  1:同花顺,2:wind
	 * @param {EdbCode } params  指标编码
	 * @returns 
	 */
	getTarget: params => {
		return http.get('/datamanage/edb_info/search',params)
	},
	/**
	 * 新增指标
	 * @param {*} params 
	 *
		"ClassifyId": 0,
		"EdbCode": "string",
		"EdbName": "string",
		"EndDate": "string",
		"Frequency": "string",
		"Source": 0,
		"StartDate": "string",
		"Unit": "string"
	 * @returns 
	 */
	targetAdd: params => {
		return http.post('/datamanage/edb_info/add',params)
	},
	/**
	 * 编辑指标
	 * @param {*} params 
	 * @returns 
	 */
	targetEdit: params => {
		return http.post('/datamanage/edb_info/edit',params)
	},
	/**
	 * 获取指标详情接口
	 * @param {EdbInfoId} params 指标id
	 * @returns 
	 */
	targetDetail: params => {
		return http.get('/datamanage/edb_info/detail',params)
	},
	/**
	 * 分类移动
	 * @param {ClassifyId} 分类id 
	 * @param {ParentClassifyId} 父级分类id
	 * @param {PrevClassifyId} 上一个兄弟节点分类id
	 * @returns 
	 */
	classifyMove:params=>{
		return http.post('/datamanage/edb_classify/move',params)
	},
	/**
	 * 移动指标
	 * @param {ClassifyId} params 
	 * @param {EdbInfoId} params 
	 * @returns 
	 */
	targetMove: params => {
		return http.post('/datamanage/edb_info/move',params)
	},
	/**
	 * 指标数据列表
	 * @param { PageSize } params 
	 * @param { CurrentIndex } params 
	 * @param { EdbInfoId } params 
	 * @param { KeyWord } params 
	 * @returns 
	 */
	targetList: params => {
		return http.get('/datamanage/edb_info/list',params)
	},
	/**
	 * 获取最新指标
	 * @returns 
	 */
	targetNew: params => {
		return http.get('/datamanage/edb_info/newest',params)
	},
	/**
	 * 指标刷新
	 * @param {EdbInfoId} params 指标id
	 * @returns 
	 */
	targetRefresh: params => {
		return http.get('/datamanage/edb_info/refresh',params)
	},
	/**
	 * 指标搜索
	 * @param {KeyWord} params 
	 * @param {FilterSource} params 1其他 2转月值 3变频  4基础 
	 * @returns
	 */
	targetSearch: params => {
		return http.get('/datamanage/edb_info/filter',params)
	},
	/**
	 * 指标搜索分页
	 * @param {KeyWord} params 
	 * @param {FilterSource} params 1其他 2转月值 3变频  4基础 
	 * @param {CurrentIndex} params
	 * @returns
	 */
	targetSearchByPage: params => {
		return http.get('/datamanage/edb_info/filter_by_es',params)
	},

	/**
	 * 生成计算指标
	 * @param {CalculateFormula} params 
	 * @param {ClassifyId} params 
	 * @param {EdbInfoIdArr} params {  EdbInfoId FromTag }
	 * @param {EdbName} params 
	 * @param {Frequency} params 
	 * @param {Unit} params 
	 * @returns 
	 */
	calculateAdd: params => {
		return http.post('/datamanage/edb_info/calculate/save',params)
	},
	/**
	 * 修改计算指标
	 * @param {EdbInfoId} params
	 * @returns 
	 */
	calculateEdit: params => {
		return http.post('/datamanage/edb_info/calculate/edit',params)
	},
	/**
	 * 获取计算指标详情
	 * @param {EdbInfoId} params 
	 * @returns 
 */
	calculateDetail: params => {
		return http.get('/datamanage/edb_info/calculate/detail',params)
	},
	/**
	 * 累计值转月-同比值-同差等计算
	 * @param {ClassifyId} params 
	 * @param {FromEdbInfoId} params
	 * @param {EdbName} params 
	 * @param {Formula} params N值
	 * @param {Frequency} params 
	 * @param {Source} params  1:同花顺,2:wind,3:彭博,4:指标运算,5:累计值转月,6:同比值,7:同差值,8:N数值移动平均计算 12:环比 13:环差 14变频
	 * @param {Unit} params 
	 * @returns 
	 */
	calculateTargetSave: params => {
		return http.post('/datamanage/edb_info/calculate/batch/save',params)
	},
	/**
	 * 累计值转月-同比值-同差编辑
	 * @param {ClassifyId} params 
	 * @param {EdbInfoId} params 
	 * @param {EdbName} params 
	 * @param {Formula} params 
	 * @param {Frequency} params 
	 * @param {FromEdbInfoId} params 
	 * @param {Source} params 
	 * @param {Unit} params 
	 * @returns 
	 */
	calculateTargetEdit: params => {
		return http.post('/datamanage/edb_info/calculate/batch/edit',params)
	},
	/**
	 * 重新计算
	 * @param {EdbInfoId} params 
	 * @returns 
	 */
	reCalculateTarget: params => {
		return http.post('/datamanage/edb_info/calculate/batch/reset',params)
	},
	/**
	 * 基础指标刷新
	 * @param {EdbInfoId} params 
	 */
	refreshBaseTarget: params => {
		return http.get('/datamanage/edb_info/refresh/all',params)
	},
	/**
	 * 一键成图获取指标所有历史数据
	 * @param {EdbInfoId} params 
	 * @param {DateType} params 
	 * 1:00年至今,2:10年至今,3:15年至今，4：21年至今，5:自定义时间,6:自定义起始时间至今，7：18年至今,8:19年至今,9:20年至今,10:全部
	 * @param {StartDate} params 
	 * @param {EndDate} params 
	 * @returns 
	 */
	ebd_data: params => {
		return http.get('/datamanage/edb_info/data',params)
	},
	/**
	 * 指标更新数据
	 * @param {Status} params 1:未更新，2：已更新
	 * @param {Source} params  0:全部，1:同花顺,2:wind,3:彭博,9:手工指标,10:隆众,11:有色，99:计算指标
	 * @returns 
	 */
	updateData: params => {
		return http.get('/datamanage/edb_info/updates/list',params)
	},
	/**
	 * 更新统计
	 * @param {*} params 
	 */
	updateStatistical: params => {
		return http.get('/datamanage/edb_info/updates/statistical')
	},
	/**
	 * 指标一键刷新
	 * @param {*} params 
	 * @returns 
	 */
	edbUpdate: params => {
		return http.post('/datamanage/edb_info/updates',params)
	},
	/* 刷新校验 */
	updateCheck: params => {
		return http.post('/datamanage/edb_info/updates/check',params)
	},
	/**
	 * 指标替换
	 * @param {NewEdbInfoId} params 
	 * @param {OldEdbInfoId} params 
	 * @returns 
	 */
	edbReplace: params => {
		return http.post('/datamanage/edb_info/replace',params)
	},
	/**
	 * 替换校验
	 * @param {*} params 
	 * @returns 
	 */
	replaceCheck: params => {
		return http.post('/datamanage/edb_info/replace/check',params)
	},

	/**
	 * 获取同比数据
	 * @param {*} params EdbInfoId DateType StartDate EndDate
	 * @returns 
	 */
	edbOnyearData: params => {
		return http.get('/datamanage/edb_info/data/tb',params)
	},

	/**
	 * 获取指标季节数据 
	 * @param {*} params EdbInfoId Calendar StartDate  EndDate
	 * @returns 
	 */
	ebdSeasonData: params => {
		return http.get('/datamanage/edb_info/data/seasonal',params)
	},

	/**
	 * 设置插入值
	 * @param {*} params  EdbInfoId Date  Value
	 * @returns 
	 */
	insertData: params => {
		return http.post('/datamanage/edb_info/insert_config/set',params)
	},

	/**
	 * 记录指标库中英文
	 * @param {*} params 
	 * ConfigCode edb指标库：edb_language；预测指标库：predict_edb_language
	 * ConfigValue 中文：CN；英文：EN
	 * @returns 
	 */
	setUserLang: params => {
		return http.post('/system/sysuser/config/set',params)
	},

	/**
	 * 获取指标历史生成记录
	 * @param {*} params  EdbInfoId
	 * @returns 
	 */
	getEdbCreateHistory: params => {
		return http.get('datamanage/edb_info/trace',params)
	},


	//========================================chart
	// /**
	//  * 
	//  * @param {Image} params 
	//  * @returns 
	//  */
	uploadImg:params => {
		return http.post('/resource/upload_image_base64',params)
	},
	// /**
	//  * 上传图片 转svg
	//  * @param {Img} params 
	//  * @returns 
	//  */
	uploadImgSvg:params => {
		return http.post('/datamanage/chart_info/base64Upload',params)
	},
	/**
	 * 新增图表分类
	 * @param {ChartClassifyName} params 
	 * @param {Level} params 
	 * @param {ParentId} params 
	 * @returns 
	 */
	addChartClassify: params => {
		return http.post('/datamanage/chart_classify/add',params)
	},
	/**
	 * 删除图表分类/图表
	 * @param {ChartClassifyId} params 
	 * @param {ChartInfoId} params 
	 * @returns 
	 */
	delChartClassify: params => {
		return http.post('/datamanage/chart_classify/delete',params)
	},
	/**
	 * 删除图表检测
	 * @param {ChartClassifyId} params 
	 * @param {ChartInfoId} params 
	 * @returns 
	 */
	delChartCheck: params => {
		return http.post('/datamanage/chart_classify/delete/check',params)
	},
	/**
	 * 修改图表分类
	 * @param {ChartClassifyName} params 
	 * @param {ChartClassifyId} params 
	 * @returns 
	 */
	editChartClassify: params => {
		return http.post('/datamanage/chart_classify/edit',params)
	},
	/**
	 * 获取图表分类 截止到3级
	 * @param {*} params 
	 * @returns 
	 */
	chartClassify: params => {
		return http.get('/datamanage/chart_classify/items',params)
	},
	/**
	 * 获取图表分类树
	 * @param {*} params 
	 * @returns 
	 */
	chartTree: params => {
		return http.get('/datamanage/chart_classify/list',params)
	},

	/**
	 * 通过分类查找分类下面的图数据
	 * @param  IsShowMe
	 * @param ChartClassifyId
	 */
	getChartListForClassify:params=>{
		return http.get('/datamanage/chart_classify/chart/list',params)
	},

	/**
	 * 图表详情
	 * @param {ChartInfoId } params 
	 * @param {Calendar } params 
	 * @param {DateType} params 
	 * @param {StartDate} params 
	 * @param {EndDate} params 
	 * @returns 
	 */
	chartInfo: params => {
		return http.get('/datamanage/chart_info/detail',params)
	},
	/**
	 * 获取指标详情
	 * @param {EdbInfoId} params 
	 * @param {DateType} params  1:00年至今,2:10年至今,3:15年至今，4：21年至今，5:自定义时间
	 * @param {StartDate} params 
	 * @param {EndDate} params 
	 * @param {EdbInfoType} params 1:标准指标,0:领先指标
	 * @param {LeadValue} params 
	 * @param {LeadUnit} params 
	 */
	edbinfoDetail: params => {
		return http.get('/datamanage/chart_info/edb_info/detail',params)
	},
	/**
	 * 图表指标模糊搜索接口
	 * @param {KeyWord} params 
	 * @returns 
	 */
	edbSearch: params => {
		return http.get('/datamanage/chart_info/edb_info/search',params)
	},
	/**
	 * 编辑图表
	 * @param {ChartClassifyId } params 
	 * @param {ChartInfoId } params 
	 * @param {ChartName } params 
	 * @returns 
	 */
	chartEdit: params => {
		return http.post('/datamanage/chart_info/edit',params)
	},
	/**
	 * 分类移动
	 * @param {ClassifyId} 分类id 
	 * @param {ParentClassifyId} 父级分类id
	 * @param {PrevClassifyId} 上一个兄弟节点分类id
	 * @returns 
	 */
	chartClassifyMove:params=>{
		return http.post('/datamanage/chart_classify/move',params)
	},
	/**
	 * 移动图表
	 * @param {ChartClassifyId } params 
	 * @param {ChartInfoId } params 
	 * @returns 
	 */
	chartMove: params => {
		return http.post('/datamanage/chart_info/move',params)
	},
	/**
	 * 最新图表
	 * @returns 
	 */
	chartNew: params => {
		return http.get('/datamanage/chart_info/newest',params)
	},
	/**
	 * 保存图表
	 * @param {ChartClassifyId} params 
	 * @param {ChartEdbInfoList} params 
	 *  {
      "ChartColor": "string",
      "ChartStyle": "string",
      "ChartWidth": 0,
      "EdbInfoId": 0,
      "EdbInfoType": 0,
      "IsAxis": 0,
      "IsOrder": 0,
      "LeadUnit": "string",
      "LeadValue": 0,
      "MaxData": 0,
      "MinData": 0
    }
	 *@param {ChartInfoId}
		@returns 
	 */
	chartSave: params => {
		return http.post('/datamanage/chart_info/save',params)
	},
	/**
	 * 新增图表 弹窗形式
	 * @param {ChartClassifyId} params
	 * @param {ChartName} params
	 * @param {ChartEdbInfoList} params
	 * {
	 * "ChartColor": "string",
      "ChartStyle": "string",
      "ChartWidth": 0,
      "EdbInfoId": 0,
      "EdbInfoType": 0,
      "IsAxis": 0,
      "IsOrder": true,
      "LeadUnit": "string",
      "LeadValue": 0,
      "MaxData": 0,
      "MinData": 0
	 * }
 	 */
	chartAdd: params => {
		return http.post('/datamanage/chart_info/add',params)
	},
	/**
	 * 编辑图表
	 * @param {ChartClassifyId} params 
	 * @param {ChartInfoId} params 
	 * @param {ChartName} params 
	 * @param {ChartEdbInfoList} params 
	 * @returns 
	 */
	chartEdit: params => {
		return http.post('/datamanage/chart_info/edit',params)
	},
	/**
	 * 搜索图表
	 * @param {KeyWord} params 
	 * @returns 
	 */
	chartSearch: params => {
		return http.get('/datamanage/chart_info/search',params)
	},
	/**
	 * 图表刷新接口
	 * @param {ChartInfoId} params 
	 * @returns 
	 */
		chartRefresh: params => {
			return http.get('/datamanage/chart_info/refresh',params)
		},
		/**
		 * 设置图表图片
		 * @param {ChartInfoId} params 
		 * @param {ImageUrl} params 
		 * @returns 
		 */
		setChartImage: params => {
			return http.post('/datamanage/chart_info/image/set',params)
		},
		/**
		 * 通过unicode获取图表信息
		 * @param {UniqueCode} params 
		 * @returns 
		 */
		getChartByCode: params => {
			return http.get('/datamanage/chart_info/common/detail/from_unique_code',params)
		},
		/**
		 * 多图表一键刷新
		 * @param {ChartInfoCode} params 
		 * @returns 
		 */
		reportRefresh: params => {
			return http.post('/datamanage/chart_info/batch_refresh',params)
		},
		
		/**
		 * 图表另存为
		 * @param {*} params 
		 * @returns 
		 * ChartInfoId ChartClassifyId ChartName
		 */
		saveChartOther: params => {
			return http.post('/datamanage/chart_info/copy',params)
		},


		/* ================代码运算========================= */
		/**
		 * 新增代码运算指标
		 * @param {*} params PythonCode EdbName Frequency Unit ClassifyId
		 * @returns 
		 */
		addCountCode: params => {
			return http.post('/datamanage/edb_info/python/add',params)
		},

		/**
		 * 编辑代码运算指标
		 * @param {*} params PythonCode EdbName Frequency Unit ClassifyId EdbInfoId
		 * @returns 
		 */
		editCountCode: params => {
			return http.post('/datamanage/edb_info/python/edit',params)
		},

		/**
		 * 执行代码 
		 * @param {*} params PythonCode
		 */
		runCode: params => {
			return http.post('/datamanage/edb_info/python/exec',params)
		},
		
		/**
		 * py代码详情
		 * @param {} params EdbInfoId
		 * @returns 
		 */
		countCodeDetail: params => {
			return http.get('/datamanage/edb_info/python/detail',params)
		},

		/**
		 * 获取指标表结构
		 * @param {} params EdbInfoId
		 * @returns 
		 */
		edbSheetDetail: params => {
			return http.get('/datamanage/edb_data/table/detail',params)
		},

		/**
	 * IsShowMe  Keyword PageSize  CurrentIndex
	 * @param {*} params 
	 * @returns 
	 */
		chartSearchByEs: params => {
			return http.get('/datamanage/chart_info/search_by_es',params)
		},

	/**
	 * 编辑指标英文信息
	 * @param {*} params EdbInfoId(指标ID) EdbNameEn(英文指标名称) UnitEn(英文单位)
	 * @returns 
	 */
	edbInfoEditEn: params => {
		return http.post('datamanage/edb_info/en/edit',params)
	},

	/**
 * 编辑图表英文信息
 * @param {*} params ChartInfoId(图表ID)  ChartNameEn(英文图表名称) 
 * @param {*} params ChartEdbInfoList(指标数据)->{EdbInfoId(指标ID) EdbNameEn(英文指标名称) UnitEn(英文单位)}
 * @returns 
 */
	chartInfoEditEn: params => {
		return http.post('datamanage/chart_info/en/edit',params)
	},

	/**
	 * ETA指标关联的图表列表
	 * @param EdbInfoId
	 * @param CurrentIndex
	 */
	edbRelationChartList:params=>{
		return http.get('datamanage/edb_info/relation/chart_list',params)
	},

	/**
	 * ETA指标引用的计算指标
	 * @param EdbInfoId
	 * @param CurrentIndex
	 */
	edbRelationComputerList:params=>{
		return http.get('datamanage/edb_info/relation/edbinfo_list',params)
	},

	/**
	 * 获取柱状图数据
	 * EdbInfoIdList [] { EdbInfoId,Name }
	 * DateList [] {
	 * 	Type 1最新 2N天前  3固定
	 * 	Date
	 * 	Value
	 * 	Color
	 * }
	 * Sort  { Sort DateIndex }
	 */
	getBarData: params => {
		return http.post('/datamanage/chart_info/preview_bar',params)
	},

	/**
	 * 数据调整指标 新增/编辑
	 * @param {} params 
	 * "EdbName,
		"Frequency,
		"Unit",
		"ClassifyId",
    "EdbInfoId",
    "FromEdbInfoId",
		"DataList
	 * @returns 
	 */
	adjustEdbEdit: params => {
		return http.post('/datamanage/edb_info/adjust/save',params)
	},

	/**
	 * 截面散点图预览数据
	 * @param {*} params 
	 * ExtraConfig
	 * {
	 * 	"XName" "XNameEn" "XUnitName" "XUnitNameEn" "YName" "YNameEn" "YUnitName" "YUnitNameEn" "XMinValue" "XMaxValue" "YMinValue" "YMaxValue"
	 * SeriesList [{
	 * 	Name Color ShowLine ShowEquation ShowR
	 *  EdbInfoList:[{
	 * 	 "XEdbInfoId":100221,
				"YEdbInfoId":100220,
				"Name":"螺纹价格",
				"NameEn":"Luo Wen",
				"XDateType":1,
				"XDate":"",
				"XDateValue":0,
				"YDateType":2,
				"YDate":"",
				"YDateValue":30,
				"IsShow":true
	 *  }]
	 * }]
	 * }
	 * @returns 
	 */
	sectionScatterPreviewData: params => {
		return http.post('/datamanage/chart_info/preview/time_section',params)
	},

	 /* 批量计算
	 * @param {*} params 
	 * CalculateId
	 * CalculateInfo {
	 * 	"ClassifyId": 341,
			"EdbName": "PVC出口占比同比2",
			"Formula": "1",
			"Frequency": "月度",
			"FromEdbInfoId": 101712,
			"MoveFrequency": "天",
			"MoveType": 1,
			"Source": 6,
			"Unit": "无"
	 * }
	 * @returns 
	 */
	batchCalculateTargetAdd: params => {
		return http.post('/datamanage/edb_info/calculate/batch/save/batch',params)
	},

	/**
	 * 获取计算指标与基础指标关联信息
	 * @param EdbInfoId
	 */
	getEDBInfoCalculateMap:params=>{
		return http.get('/datamanage/edb_info/calculate/mapping',params)
	}

}

/* 我的图库 */
const mychartInterface = {
	/**
	 * 公用图库列表
	 * @param {PageSize} params 
	 * @param {CurrentIndex} params 
	 * @param {ChartClassifyId} params 
	 * @param {KeyWord} params 
	 */
	publicList: params => {
		return http.get('/my_chart/chart/list',params)
	},
	/**
	 * 加入我的图库
	 * @param {ChartInfoId} params 
	 * @param {MyChartClassifyId} params 
	 */
	add: params => {
		return http.post('/my_chart/add',params)
	},
	/**
	 * 添加分类
	 * @param {MyChartClassifyName} params 
	 * @returns 
	 */
	addClassify: params => {
		return http.post('/my_chart/classify/add',params)
	},
	/**
	 * 删除分类
	 * @param {MyChartClassifyId} params 
	 * @returns 
	 */
	delClassify: params => {
		return http.post('/my_chart/classify/delete',params)
	},
	/**
	 * 编辑分类
	 * @param {MyChartClassifyId} params 
	 * @param {MyChartClassifyName} params 
	 * @returns 
	 */
	editClassify: params => {
		return http.post('/my_chart/classify/edit',params)
	},
	/**
	 * 我的图库分类 
	 * @param {*} params 
	 * @returns 
	 */
	classifyList: params => {
		return http.get('/my_chart/classify/list',params);
	},
	/**
	 * 移出我的图库
	 * @param {MyChartId} params 
	 * @param {MyChartClassifyId} params 
	 * @returns 
	 */
	del: params => {
		return http.post('/my_chart/delete',params)
	},
	/**
	 * 我的图库列表
	 * @param {PageSize } params 
	 * @param {CurrentIndex} params 
	 * @param {MyChartClassifyId} params 
	 * @returns 
	 */
	myList: params => {
		return http.get('/my_chart/list',params);
	},
	/**
	 * 移动
	 * @param {MyChartId} params 
	 * @param {MyChartClassifyId} params 
	 * @param {PrevMyChartId} params 
	 * @param {NextMyChartId} params 
	 * @returns 
	 */
	move: params => {
		return http.post('/my_chart/move',params)
	},
	/**
	 * 图表详情 推荐图表列表
	 * @param {ChartClassifyId} params 
	 * @returns 
	 */
	recommendChart: params => {
		return http.get('/my_chart/chart/recommend/list',params)
	},
	/**
	 * 搜索
	 * @param {KeyWord} params 
	 * @returns 
	 */
	search: params => {
		return http.get('/my_chart/search',params)
	},
	/**
	 * 移动到
	 * @param {MyChartClassifyId} params []
	 * @param {MyChartId} params 
	 * @param {CurrentMyChartClassifyId} params 
	 */
	moveChart: params => {
		return http.post('/my_chart/edit',params)
	},
	/**
	 * 拖动分类
	 * @param {MyChartClassifyId} parmas 
	 * @param {NextClassifyId} parmas 
	 * @param {PrevClassifyId} parmas 
	 * @returns 
	 */
	moveClassify: params => {
		return http.post('/my_chart/classify/move',params)
	},
	/**
	 * 公用分类
	 * @param {*} params 
	 * @returns 
	 */
	publicClassify: params => {
		return http.get('/my_chart/classify/public_list',params)
	},
	/**
	 * 设置分类是否可见
	 * @param {IsPublic} params  0:own  1:public 
	 * @param {MyChartClassifyId} params
	 * @returns 
	 */
	setPublic: params => {
		return http.post('/my_chart/classify/modify_public',params)
	},
	/**
	 * 复制分类
	 * @param {MyChartClassifyId} params 
	 * @returns 
	 */
	copyclassify: params => {
		return http.post('/my_chart/classify/copy',params)
	},

	/**
	 * 我的图库中公共分类
	 */
	commonClassify:()=>{
		return http.get('/my_chart/classify/company_public_list',{})
	},
	/**
	 * 我的图库中公共分类
	 */
	commonClassifys:params=>{
		return http.get('/my_chart/classify/company_public_list',params)
	},
	/**
	 * 设置分类是否客户可见
	 */
	setClassifyAuthToUser:params=>{
		return http.post('/my_chart/classify/modify_company_public',params)
	},

	/**
	 * 获取当前图表所属分类
	 * @param {ChartInfoId} params 
	 * @returns 
	 */
	getChartInClassify: params => {
		return http.get('/my_chart/get_mychart_classify_id_list',params)
	},

	/**
	 * 复制图表到其他分类
	 * @param {ChartInfoId} params 
	 * @param {MyChartClassifyId} params []
	 * @returns 
	 */
	copyMyChart: params => {
		return http.post('/my_chart/add_to_classify',params)
	},

	/**
	 * 图表搜素 es
	 * @param {*} params Keyword  CurrentIndex 
	 * @returns 
	 */
	mychartSearchByEs: params => {
		return http.get('/my_chart/search_by_es',params)
	}
}

export {
	dataBaseInterface,
	mychartInterface,
}