chartApi.js 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  1. import http from "@/api/http.js"
  2. /* 数据库管理模块 */
  3. const dataBaseInterface = {
  4. /**
  5. * 指标库目录
  6. */
  7. targetCatalog:params=>{
  8. return http.get('/datamanage/classify/simple',params)
  9. },
  10. /**
  11. * 指标和目录拖动排序
  12. */
  13. classifyMoveSort:params=>{
  14. return http.post('/datamanage/edb_classify/move',params)
  15. },
  16. /**
  17. * 新增分类
  18. * @param {ClassifyName} params
  19. * @param {ParentId} params
  20. * @returns
  21. */
  22. nodeAdd: params => {
  23. return http.post('/datamanage/classify/add',params)
  24. },
  25. nodeAddV2: params => {
  26. return http.post('/datamanage/classify/addv2',params)
  27. },
  28. /**
  29. * 删除分类接口
  30. * @param {ClassifyId} params
  31. * @param {EdbInfoId} params
  32. * @returns
  33. */
  34. nodeDelete: params => {
  35. return http.post('/datamanage/classify/delete',params)
  36. },
  37. /**
  38. * 删除检测
  39. * @param {ClassifyId} params
  40. * @param {EdbInfoId} params
  41. * @returns 0:默认值,如果为0,继续走其他校验,1:若目录关联指标不可删除,2:确认删除当前目录及包含的子目录吗,3:当前指标已用作画图,不可删除
  42. */
  43. nodeDelCheck: params => {
  44. return http.post('/datamanage/classify/delete/check',params)
  45. },
  46. /**
  47. * 修改分类
  48. * @param {ClassifyId} params
  49. * @param {ClassifyName} params
  50. * @returns
  51. */
  52. nodeEdit: params => {
  53. return http.post('/datamanage/classify/edit',params)
  54. },
  55. /**
  56. * 获取分类层级 截止到3及目录
  57. * @param {*} params
  58. * @returns
  59. */
  60. menuList: params => {
  61. return http.get('/datamanage/classify/items',params)
  62. },
  63. /**
  64. * 获取分类层级 截止到3及目录
  65. * @param {*} params
  66. * @returns
  67. */
  68. menuListV2: params => {
  69. return http.get('/datamanage/classify/items/v2',params)
  70. },
  71. menuListV3: params => {
  72. // return http.get('/datamanage/classify/items/v3',params)
  73. return http.get('/datamanage/classify/tree',params)
  74. },
  75. /**
  76. * 通过分类查找指标列表数据
  77. * @param ClassifyId
  78. */
  79. getEdbListForClassify:params=>{
  80. return http.get('/datamanage/classify/edb_info/list',params)
  81. },
  82. /**
  83. * 树列表
  84. * @returns
  85. */
  86. nodeTree: params => {
  87. return http.get('/datamanage/classify/list',params)
  88. },
  89. /**
  90. * 搜索指标
  91. * @param {Source } params 1:同花顺,2:wind
  92. * @param {EdbCode } params 指标编码
  93. * @returns
  94. */
  95. getTarget: params => {
  96. return http.get('/datamanage/edb_info/search',params)
  97. },
  98. /**
  99. * 新增指标
  100. * @param {*} params
  101. *
  102. "ClassifyId": 0,
  103. "EdbCode": "string",
  104. "EdbName": "string",
  105. "EndDate": "string",
  106. "Frequency": "string",
  107. "Source": 0,
  108. "StartDate": "string",
  109. "Unit": "string"
  110. * @returns
  111. */
  112. targetAdd: params => {
  113. return http.post('/datamanage/edb_info/add',params)
  114. },
  115. /**
  116. * 编辑指标
  117. * @param {*} params
  118. * @returns
  119. */
  120. targetEdit: params => {
  121. return http.post('/datamanage/edb_info/edit',params)
  122. },
  123. /**
  124. * 获取指标详情接口
  125. * @param {EdbInfoId} params 指标id
  126. * @returns
  127. */
  128. targetDetail: params => {
  129. return http.get('/datamanage/edb_info/detail',params)
  130. },
  131. /**
  132. * 分类移动
  133. * @param {ClassifyId} 分类id
  134. * @param {ParentClassifyId} 父级分类id
  135. * @param {PrevClassifyId} 上一个兄弟节点分类id
  136. * @returns
  137. */
  138. classifyMove:params=>{
  139. return http.post('/datamanage/edb_classify/move',params)
  140. },
  141. /**
  142. * 移动指标
  143. * @param {ClassifyId} params
  144. * @param {EdbInfoId} params
  145. * @returns
  146. */
  147. targetMove: params => {
  148. return http.post('/datamanage/edb_info/move',params)
  149. },
  150. /**
  151. * 指标数据列表
  152. * @param { PageSize } params
  153. * @param { CurrentIndex } params
  154. * @param { EdbInfoId } params
  155. * @param { KeyWord } params
  156. * @returns
  157. */
  158. targetList: params => {
  159. return http.get('/datamanage/edb_info/list',params)
  160. },
  161. /**
  162. * 获取最新指标
  163. * @returns
  164. */
  165. targetNew: params => {
  166. return http.get('/datamanage/edb_info/newest',params)
  167. },
  168. /**
  169. * 指标刷新
  170. * @param {EdbInfoId} params 指标id
  171. * @returns
  172. */
  173. targetRefresh: params => {
  174. return http.get('/datamanage/edb_info/refresh',params)
  175. },
  176. /**
  177. * 指标搜索
  178. * @param {KeyWord} params
  179. * @param {FilterSource} params 1其他 2转月值 3变频 4基础
  180. * @returns
  181. */
  182. targetSearch: params => {
  183. return http.get('/datamanage/edb_info/filter',params)
  184. },
  185. /**
  186. * 指标搜索分页
  187. * @param {KeyWord} params
  188. * @param {FilterSource} params 1其他 2转月值 3变频 4基础
  189. * @param {CurrentIndex} params
  190. * @returns
  191. */
  192. targetSearchByPage: params => {
  193. return http.get('/datamanage/edb_info/filter_by_es',params)
  194. },
  195. /**
  196. * 生成计算指标
  197. * @param {CalculateFormula} params
  198. * @param {ClassifyId} params
  199. * @param {EdbInfoIdArr} params { EdbInfoId FromTag }
  200. * @param {EdbName} params
  201. * @param {Frequency} params
  202. * @param {Unit} params
  203. * @returns
  204. */
  205. calculateAdd: params => {
  206. return http.post('/datamanage/edb_info/calculate/save',params)
  207. },
  208. /**
  209. * 修改计算指标
  210. * @param {EdbInfoId} params
  211. * @returns
  212. */
  213. calculateEdit: params => {
  214. return http.post('/datamanage/edb_info/calculate/edit',params)
  215. },
  216. /**
  217. * 获取计算指标详情
  218. * @param {EdbInfoId} params
  219. * @returns
  220. */
  221. calculateDetail: params => {
  222. return http.get('/datamanage/edb_info/calculate/detail',params)
  223. },
  224. /**
  225. * 累计值转月-同比值-同差等计算
  226. * @param {ClassifyId} params
  227. * @param {FromEdbInfoId} params
  228. * @param {EdbName} params
  229. * @param {Formula} params N值
  230. * @param {Frequency} params
  231. * @param {Source} params 1:同花顺,2:wind,3:彭博,4:指标运算,5:累计值转月,6:同比值,7:同差值,8:N数值移动平均计算 12:环比 13:环差 14变频
  232. * @param {Unit} params
  233. * @returns
  234. */
  235. calculateTargetSave: params => {
  236. return http.post('/datamanage/edb_info/calculate/batch/save',params)
  237. },
  238. /**
  239. * 累计值转月-同比值-同差编辑
  240. * @param {ClassifyId} params
  241. * @param {EdbInfoId} params
  242. * @param {EdbName} params
  243. * @param {Formula} params
  244. * @param {Frequency} params
  245. * @param {FromEdbInfoId} params
  246. * @param {Source} params
  247. * @param {Unit} params
  248. * @returns
  249. */
  250. calculateTargetEdit: params => {
  251. return http.post('/datamanage/edb_info/calculate/batch/edit',params)
  252. },
  253. /**
  254. * 重新计算
  255. * @param {EdbInfoId} params
  256. * @returns
  257. */
  258. reCalculateTarget: params => {
  259. return http.post('/datamanage/edb_info/calculate/batch/reset',params)
  260. },
  261. /**
  262. * 基础指标刷新
  263. * @param {EdbInfoId} params
  264. */
  265. refreshBaseTarget: params => {
  266. return http.get('/datamanage/edb_info/refresh/all',params)
  267. },
  268. /**
  269. * 一键成图获取指标所有历史数据
  270. * @param {EdbInfoId} params
  271. * @param {DateType} params
  272. * 1:00年至今,2:10年至今,3:15年至今,4:21年至今,5:自定义时间,6:自定义起始时间至今,7:18年至今,8:19年至今,9:20年至今,10:全部
  273. * @param {StartDate} params
  274. * @param {EndDate} params
  275. * @returns
  276. */
  277. ebd_data: params => {
  278. return http.get('/datamanage/edb_info/data',params)
  279. },
  280. /**
  281. * 指标更新数据
  282. * @param {Status} params 1:未更新,2:已更新
  283. * @param {Source} params 0:全部,1:同花顺,2:wind,3:彭博,9:手工指标,10:隆众,11:有色,99:计算指标
  284. * @returns
  285. */
  286. updateData: params => {
  287. return http.get('/datamanage/edb_info/updates/list',params)
  288. },
  289. /**
  290. * 更新统计
  291. * @param {*} params
  292. */
  293. updateStatistical: params => {
  294. return http.get('/datamanage/edb_info/updates/statistical')
  295. },
  296. /**
  297. * 指标一键刷新
  298. * @param {*} params
  299. * @returns
  300. */
  301. edbUpdate: params => {
  302. return http.post('/datamanage/edb_info/updates',params)
  303. },
  304. /* 刷新校验 */
  305. updateCheck: params => {
  306. return http.post('/datamanage/edb_info/updates/check',params)
  307. },
  308. /**
  309. * 指标替换
  310. * @param {NewEdbInfoId} params
  311. * @param {OldEdbInfoId} params
  312. * @returns
  313. */
  314. edbReplace: params => {
  315. return http.post('/datamanage/edb_info/replace',params)
  316. },
  317. /**
  318. * 替换校验
  319. * @param {*} params
  320. * @returns
  321. */
  322. replaceCheck: params => {
  323. return http.post('/datamanage/edb_info/replace/check',params)
  324. },
  325. /**
  326. * 获取同比数据
  327. * @param {*} params EdbInfoId DateType StartDate EndDate
  328. * @returns
  329. */
  330. edbOnyearData: params => {
  331. return http.get('/datamanage/edb_info/data/tb',params)
  332. },
  333. /**
  334. * 获取指标季节数据
  335. * @param {*} params EdbInfoId Calendar StartDate EndDate
  336. * @returns
  337. */
  338. ebdSeasonData: params => {
  339. return http.get('/datamanage/edb_info/data/seasonal',params)
  340. },
  341. /**
  342. * 设置插入值
  343. * @param {*} params EdbInfoId Date Value
  344. * @returns
  345. */
  346. insertData: params => {
  347. return http.post('/datamanage/edb_info/insert_config/set',params)
  348. },
  349. /**
  350. * 记录指标库中英文
  351. * @param {*} params
  352. * ConfigCode edb指标库:edb_language;预测指标库:predict_edb_language
  353. * ConfigValue 中文:CN;英文:EN
  354. * @returns
  355. */
  356. setUserLang: params => {
  357. return http.post('/system/sysuser/config/set',params)
  358. },
  359. /**
  360. * 获取指标历史生成记录
  361. * @param {*} params EdbInfoId
  362. * @returns
  363. */
  364. getEdbCreateHistory: params => {
  365. return http.get('datamanage/edb_info/trace',params)
  366. },
  367. /** 拟合残差相关系数
  368. * @param {*} params
  369. *"Formula": "2020-01-01,2022-12-13",
  370. "EdbInfoIdArr": [
  371. {
  372. "EdbInfoId": 113123,
  373. "FromTag": "A",
  374. "MoveValue": 0
  375. }
  376. ]
  377. */
  378. correlationIndex: params => {
  379. return http.post('/datamanage/edb_info/calculate/compute_correlation',params)
  380. },
  381. /**
  382. * 代码运算的sourceList
  383. * @param {*} params
  384. */
  385. getCodecountEdbSources: params => {
  386. return http.get('/datamanage/edb_source/list/python')
  387. },
  388. /**
  389. * 新增指标 检验指标是否存在接口
  390. * @param {*} params Source SubSource EdbCode StockCode
  391. */
  392. edbExistCheck: params => {
  393. return http.get('/datamanage/edb_info/exist/check',params)
  394. },
  395. /**
  396. * 批量新增指标
  397. * @param {*} params BatchList[{Source,EdbName,Frequency,Unit,ClassifyId,StockCode,EdbCode}]
  398. */
  399. edbAddBatch: params => {
  400. return http.post('/datamanage/edb_info/batch/add',params)
  401. },
  402. // 批量计算指标时获取当前筛选条件下选择的指标
  403. getBatchFilterAddEdbList:params=>{
  404. return http.get('/datamanage/edb_info/calculate/multi/choice',params)
  405. },
  406. //批量计算指标时待选指标的搜索列表
  407. getBatchAddEdbSearchList:params=>{
  408. return http.get('/datamanage/edb_info/calculate/multi/search',params)
  409. },
  410. /**
  411. * 设置指标对应版本信息
  412. * @param {*} params
  413. * EdbInfoId EdbName Unit
  414. */
  415. setEdbLangInfo: params => {
  416. return http.post('/datamanage/edb_info/base/edit',params)
  417. },
  418. /**
  419. * 设置图表对应版本信息
  420. * @param {*} params
  421. * ChartInfoId ChartName ChartEdbInfoList
  422. * @returns
  423. */
  424. setChartLangInfo: params => {
  425. return http.post('/datamanage/chart_info/base/edit',params)
  426. },
  427. //========================================chart
  428. // /**
  429. // *
  430. // * @param {Image} params
  431. // * @returns
  432. // */
  433. uploadImg:params => {
  434. return http.post('/resource/upload_image_base64',params)
  435. },
  436. // /**
  437. // * 上传图片 转svg
  438. // * @param {Img} params
  439. // * @returns
  440. // */
  441. uploadImgSvg:params => {
  442. return http.post('/datamanage/chart_info/base64Upload',params)
  443. },
  444. /**
  445. * 新增图表分类
  446. * @param {ChartClassifyName} params
  447. * @param {Level} params
  448. * @param {ParentId} params
  449. * @returns
  450. */
  451. addChartClassify: params => {
  452. return http.post('/datamanage/chart_classify/add',params)
  453. },
  454. /**
  455. * 删除图表分类/图表
  456. * @param {ChartClassifyId} params
  457. * @param {ChartInfoId} params
  458. * @returns
  459. */
  460. delChartClassify: params => {
  461. return http.post('/datamanage/chart_classify/delete',params)
  462. },
  463. /**
  464. * 删除图表检测
  465. * @param {ChartClassifyId} params
  466. * @param {ChartInfoId} params
  467. * @returns
  468. */
  469. delChartCheck: params => {
  470. return http.post('/datamanage/chart_classify/delete/check',params)
  471. },
  472. /**
  473. * 修改图表分类
  474. * @param {ChartClassifyName} params
  475. * @param {ChartClassifyId} params
  476. * @returns
  477. */
  478. editChartClassify: params => {
  479. return http.post('/datamanage/chart_classify/edit',params)
  480. },
  481. /**
  482. * 获取图表分类 截止到3级
  483. * @param {*} params
  484. * @returns
  485. */
  486. chartClassify: params => {
  487. return http.get('/datamanage/chart_classify/items',params)
  488. },
  489. /**
  490. * 获取图表分类树
  491. * @param {*} params
  492. * @returns
  493. */
  494. chartTree: params => {
  495. return http.get('/datamanage/chart_classify/list',params)
  496. },
  497. /**
  498. * 通过分类查找分类下面的图数据
  499. * @param IsShowMe
  500. * @param ChartClassifyId
  501. */
  502. getChartListForClassify:params=>{
  503. return http.get('/datamanage/chart_classify/chart/list',params)
  504. },
  505. /**
  506. * 图表详情
  507. * @param {ChartInfoId } params
  508. * @param {Calendar } params
  509. * @param {DateType} params
  510. * @param {StartDate} params
  511. * @param {EndDate} params
  512. * @returns
  513. */
  514. chartInfo: params => {
  515. return http.get('/datamanage/chart_info/detail',params)
  516. },
  517. /**
  518. * 获取指标详情
  519. * @param {EdbInfoId} params
  520. * @param {DateType} params 1:00年至今,2:10年至今,3:15年至今,4:21年至今,5:自定义时间
  521. * @param {StartDate} params
  522. * @param {EndDate} params
  523. * @param {EdbInfoType} params 1:标准指标,0:领先指标
  524. * @param {LeadValue} params
  525. * @param {LeadUnit} params
  526. */
  527. edbinfoDetail: params => {
  528. return http.get('/datamanage/chart_info/edb_info/detail',params)
  529. },
  530. /**
  531. * 图表指标模糊搜索接口
  532. * @param {KeyWord} params
  533. * @returns
  534. */
  535. edbSearch: params => {
  536. return http.get('/datamanage/chart_info/edb_info/search',params)
  537. },
  538. /**
  539. * 编辑图表
  540. * @param {ChartClassifyId } params
  541. * @param {ChartInfoId } params
  542. * @param {ChartName } params
  543. * @returns
  544. */
  545. chartEdit: params => {
  546. return http.post('/datamanage/chart_info/edit',params)
  547. },
  548. /**
  549. * 分类移动
  550. * @param {ClassifyId} 分类id
  551. * @param {ParentClassifyId} 父级分类id
  552. * @param {PrevClassifyId} 上一个兄弟节点分类id
  553. * @returns
  554. */
  555. chartClassifyMove:params=>{
  556. return http.post('/datamanage/chart_classify/move',params)
  557. },
  558. /**
  559. * 移动图表
  560. * @param {ChartClassifyId } params
  561. * @param {ChartInfoId } params
  562. * @returns
  563. */
  564. chartMove: params => {
  565. return http.post('/datamanage/chart_info/move',params)
  566. },
  567. /**
  568. * 最新图表
  569. * @returns
  570. */
  571. chartNew: params => {
  572. return http.get('/datamanage/chart_info/newest',params)
  573. },
  574. /**
  575. * 保存图表
  576. * @param {ChartClassifyId} params
  577. * @param {ChartEdbInfoList} params
  578. * {
  579. "ChartColor": "string",
  580. "ChartStyle": "string",
  581. "ChartWidth": 0,
  582. "EdbInfoId": 0,
  583. "EdbInfoType": 0,
  584. "IsAxis": 0,
  585. "IsOrder": 0,
  586. "LeadUnit": "string",
  587. "LeadValue": 0,
  588. "MaxData": 0,
  589. "MinData": 0
  590. }
  591. *@param {ChartInfoId}
  592. @returns
  593. */
  594. chartSave: params => {
  595. return http.post('/datamanage/chart_info/save',params)
  596. },
  597. /**
  598. * 新增图表 弹窗形式
  599. * @param {ChartClassifyId} params
  600. * @param {ChartName} params
  601. * @param {ChartEdbInfoList} params
  602. * {
  603. * "ChartColor": "string",
  604. "ChartStyle": "string",
  605. "ChartWidth": 0,
  606. "EdbInfoId": 0,
  607. "EdbInfoType": 0,
  608. "IsAxis": 0,
  609. "IsOrder": true,
  610. "LeadUnit": "string",
  611. "LeadValue": 0,
  612. "MaxData": 0,
  613. "MinData": 0
  614. * }
  615. */
  616. chartAdd: params => {
  617. return http.post('/datamanage/chart_info/add',params)
  618. },
  619. /**
  620. * 编辑图表
  621. * @param {ChartClassifyId} params
  622. * @param {ChartInfoId} params
  623. * @param {ChartName} params
  624. * @param {ChartEdbInfoList} params
  625. * @returns
  626. */
  627. chartEdit: params => {
  628. return http.post('/datamanage/chart_info/edit',params)
  629. },
  630. /**
  631. * 搜索图表
  632. * @param {KeyWord} params
  633. * @returns
  634. */
  635. chartSearch: params => {
  636. return http.get('/datamanage/chart_info/search',params)
  637. },
  638. /**
  639. * 图表刷新接口
  640. * @param {ChartInfoId} params
  641. * @returns
  642. */
  643. chartRefresh: params => {
  644. return http.get('/datamanage/chart_info/refresh',params)
  645. },
  646. /**
  647. * 设置图表图片
  648. * @param {ChartInfoId} params
  649. * @param {ImageUrl} params
  650. * @returns
  651. */
  652. setChartImage: params => {
  653. return http.post('/datamanage/chart_info/image/set',params)
  654. },
  655. /**
  656. * 通过unicode获取图表信息
  657. * @param {UniqueCode} params
  658. * @returns
  659. */
  660. getChartByCode: params => {
  661. return http.get('/datamanage/chart_info/common/detail/from_unique_code',params)
  662. },
  663. /**
  664. * 多图表一键刷新
  665. * @param {ChartInfoCode} params
  666. * @returns
  667. */
  668. reportRefresh: params => {
  669. return http.post('/datamanage/chart_info/batch_refresh',params)
  670. },
  671. /**
  672. * 图表另存为
  673. * @param {*} params
  674. * @returns
  675. * ChartInfoId ChartClassifyId ChartName
  676. */
  677. saveChartOther: params => {
  678. return http.post('/datamanage/chart_info/copy',params)
  679. },
  680. /* ================代码运算========================= */
  681. /**
  682. * 新增代码运算指标
  683. * @param {*} params PythonCode EdbName Frequency Unit ClassifyId
  684. * @returns
  685. */
  686. addCountCode: params => {
  687. return http.post('/datamanage/edb_info/python/add',params)
  688. },
  689. /**
  690. * 编辑代码运算指标
  691. * @param {*} params PythonCode EdbName Frequency Unit ClassifyId EdbInfoId
  692. * @returns
  693. */
  694. editCountCode: params => {
  695. return http.post('/datamanage/edb_info/python/edit',params)
  696. },
  697. /**
  698. * 执行代码
  699. * @param {*} params PythonCode
  700. */
  701. runCode: params => {
  702. return http.post('/datamanage/edb_info/python/exec',params)
  703. },
  704. /**
  705. * py代码详情
  706. * @param {} params EdbInfoId
  707. * @returns
  708. */
  709. countCodeDetail: params => {
  710. return http.get('/datamanage/edb_info/python/detail',params)
  711. },
  712. /**
  713. * 获取指标表结构
  714. * @param {} params EdbInfoId
  715. * @returns
  716. */
  717. edbSheetDetail: params => {
  718. return http.get('/datamanage/edb_data/table/detail',params)
  719. },
  720. /**
  721. * IsShowMe Keyword PageSize CurrentIndex
  722. * @param {*} params
  723. * @returns
  724. */
  725. chartSearchByEs: params => {
  726. return http.get('/datamanage/chart_info/search_by_es',params)
  727. },
  728. /**
  729. * 编辑指标英文信息
  730. * @param {*} params EdbInfoId(指标ID) EdbNameEn(英文指标名称) UnitEn(英文单位)
  731. * @returns
  732. */
  733. edbInfoEditEn: params => {
  734. return http.post('datamanage/edb_info/en/edit',params)
  735. },
  736. /**
  737. * 编辑图表英文信息
  738. * @param {*} params ChartInfoId(图表ID) ChartNameEn(英文图表名称)
  739. * @param {*} params ChartEdbInfoList(指标数据)->{EdbInfoId(指标ID) EdbNameEn(英文指标名称) UnitEn(英文单位)}
  740. * @returns
  741. */
  742. chartInfoEditEn: params => {
  743. return http.post('datamanage/chart_info/en/edit',params)
  744. },
  745. /**
  746. * ETA指标关联的图表列表
  747. * @param EdbInfoId
  748. * @param CurrentIndex
  749. */
  750. edbRelationChartList:params=>{
  751. return http.get('datamanage/edb_info/relation/chart_list',params)
  752. },
  753. /**
  754. * ETA指标引用的计算指标
  755. * @param EdbInfoId
  756. * @param CurrentIndex
  757. */
  758. edbRelationComputerList:params=>{
  759. return http.get('datamanage/edb_info/relation/edbinfo_list',params)
  760. },
  761. /**
  762. * 获取柱状图数据
  763. * EdbInfoIdList [] { EdbInfoId,Name }
  764. * DateList [] {
  765. * Type 1最新 2N天前 3固定
  766. * Date
  767. * Value
  768. * Color
  769. * }
  770. * Sort { Sort DateIndex }
  771. */
  772. getBarData: params => {
  773. return http.post('/datamanage/chart_info/preview_bar',params)
  774. },
  775. /**
  776. * 数据调整指标 新增/编辑
  777. * @param {} params
  778. * "EdbName,
  779. "Frequency,
  780. "Unit",
  781. "ClassifyId",
  782. "EdbInfoId",
  783. "FromEdbInfoId",
  784. "DataList
  785. * @returns
  786. */
  787. adjustEdbEdit: params => {
  788. return http.post('/datamanage/edb_info/adjust/save',params)
  789. },
  790. /**
  791. * 截面散点图预览数据
  792. * @param {*} params
  793. * ExtraConfig
  794. * {
  795. * "XName" "XNameEn" "XUnitName" "XUnitNameEn" "YName" "YNameEn" "YUnitName" "YUnitNameEn" "XMinValue" "XMaxValue" "YMinValue" "YMaxValue"
  796. * SeriesList [{
  797. * Name Color ShowLine ShowEquation ShowR
  798. * EdbInfoList:[{
  799. * "XEdbInfoId":100221,
  800. "YEdbInfoId":100220,
  801. "Name":"螺纹价格",
  802. "NameEn":"Luo Wen",
  803. "XDateType":1,
  804. "XDate":"",
  805. "XDateValue":0,
  806. "YDateType":2,
  807. "YDate":"",
  808. "YDateValue":30,
  809. "IsShow":true
  810. * }]
  811. * }]
  812. * }
  813. * @returns
  814. */
  815. sectionScatterPreviewData: params => {
  816. return http.post('/datamanage/chart_info/preview/time_section',params)
  817. },
  818. /* 批量计算
  819. * @param {*} params
  820. * CalculateId
  821. * CalculateInfo {
  822. * "ClassifyId": 341,
  823. "EdbName": "PVC出口占比同比2",
  824. "Formula": "1",
  825. "Frequency": "月度",
  826. "FromEdbInfoId": 101712,
  827. "MoveFrequency": "天",
  828. "MoveType": 1,
  829. "Source": 6,
  830. "Unit": "无"
  831. * }
  832. * @returns
  833. */
  834. batchCalculateTargetAdd: params => {
  835. return http.post('/datamanage/edb_info/calculate/batch/save/batch',params)
  836. },
  837. //批量计算编辑
  838. batchCalculateTargetEdit: params => {
  839. return http.post('/datamanage/edb_info/calculate/batch/edit/batch',params)
  840. },
  841. /**
  842. * 获取计算指标与基础指标关联信息
  843. * @param EdbInfoId
  844. */
  845. getEDBInfoCalculateMap:params=>{
  846. return http.get('/datamanage/edb_info/calculate/mapping',params)
  847. },
  848. /**
  849. * 获取创建人列表
  850. * Source - 来源 :1:手工数据指标 2:钢联化工数据库 3:ETA指标库 4:ETA预测指标 5:图库
  851. */
  852. getEdbChartAdminList: params => {
  853. return http.get('/datamanage/edb_chart/adminList',params)
  854. },
  855. /* eta图库 图表预览 启用之前根据传参刷数据的详情接口
  856. {
  857. ChartType:1,
  858. "ChartEdbInfoList": [
  859. {
  860. "EdbInfoId": 102767,
  861. "EdbInfoType": 1,
  862. "LeadUnit": "",
  863. "LeadValue": 0,
  864. },
  865. {
  866. "EdbInfoId": 102769,
  867. "EdbInfoType": 1,
  868. "LeadUnit": "",
  869. "LeadValue": 0,
  870. }
  871. ],
  872. "DateType": 3,
  873. "StartDate": "",
  874. "EndDate": "",
  875. Calendar
  876. SeasonStartDate
  877. SeasonEndDate
  878. }
  879. */
  880. getSplinePreviewData: params => {
  881. return http.post('/datamanage/chart_info/detail/preview',params)
  882. },
  883. /**
  884. * 获取图表信息 在eta图库内替换上面的图表详情接口
  885. * @param {*} params ChartInfoId
  886. * @returns
  887. */
  888. getChartInfoById: params => {
  889. return http.get('/datamanage/chart_info/detail/v2',params)
  890. },
  891. /**
  892. * 接口获取指标数据来源
  893. * @param params.IsBase
  894. */
  895. getDataSource:(params)=>{
  896. return http.get('datamanage/edb_source/list',params)
  897. },
  898. /**
  899. * 指标图表列表
  900. * @param {Number} PageSize
  901. * @param {Number} CurrentIndex
  902. * @param {Number} ClassifyId
  903. * @param {Number} AdminId
  904. * @param {Boolean} IsOnlyMe
  905. */
  906. getEdbChartList:(params)=>{
  907. return http.get('/datamanage/edb_info/chart/list',params)
  908. },
  909. /**
  910. * 保存指标上下限
  911. * @param {*} params
  912. * @returns
  913. */
  914. saveEdbChartLimit:(params)=>{
  915. return http.post('/datamanage/edb_info/modify',params)
  916. },
  917. /**
  918. * 保存指标缩略图
  919. * @param {Number} EdbInfoId
  920. * @param {String} ImageUrl
  921. * @returns
  922. */
  923. saveEdbChartImg:(params)=>{
  924. return http.post('/datamanage/edb_info/image/set',params)
  925. },
  926. /**
  927. * 获取图表批量刷新结果
  928. * Source ReportId ReportChapterId
  929. *
  930. */
  931. getReportrefreshStatus: params => {
  932. return http.post('/datamanage/chart_info/batch_refresh/result',params)
  933. },
  934. /**
  935. * 获取雷达图预览数据
  936. * @param {
  937. * ExtraConfig: { EdbInfoIdList DateList }
  938. * } params
  939. */
  940. getRadarPreviewData: params => {
  941. return http.post('/datamanage/chart_info/preview/radar',params)
  942. },
  943. /**
  944. * 获取数据转换后Edb数据
  945. * @param {Object} params
  946. * @param {Number} params.IsConvert 是否数据转换
  947. * @param {Number} params.ConvertType 数据转换类型 1乘 2除 3对数
  948. * @param {Number} params.ConvertValue 数据转换值
  949. * @param {String} params.ConvertUnit 数据转换单位
  950. * @param {String} params.ConvertEnUnit 数据转换单位英文
  951. * @param {*} params.SeasonStartDate
  952. * @param {*} params.SeasonEndDate
  953. * @param {*} params.EdbInfoId
  954. * @returns
  955. */
  956. getChangeEdbData:params=>{
  957. return http.get('/datamanage/chart_info/convert/detail',params)
  958. }
  959. }
  960. /* 我的图库 */
  961. const mychartInterface = {
  962. /**
  963. * 公用图库列表
  964. * @param {PageSize} params
  965. * @param {CurrentIndex} params
  966. * @param {ChartClassifyId} params
  967. * @param {KeyWord} params
  968. */
  969. publicList: params => {
  970. return http.get('/my_chart/chart/list',params)
  971. },
  972. /**
  973. * 加入我的图库
  974. * @param {ChartInfoId} params
  975. * @param {MyChartClassifyId} params
  976. */
  977. add: params => {
  978. return http.post('/my_chart/add',params)
  979. },
  980. /**
  981. * 添加分类
  982. * @param {MyChartClassifyName} params
  983. * @returns
  984. */
  985. addClassify: params => {
  986. return http.post('/my_chart/classify/add',params)
  987. },
  988. /**
  989. * 获取图表关联的节点列表
  990. * @param {MyChartClassifyId} params
  991. */
  992. getFrameNode:params =>{
  993. return http.get('/my_chart/classify/framework_node_list',params)
  994. },
  995. /**
  996. * 删除分类
  997. * @param {MyChartClassifyId} params
  998. * @returns
  999. */
  1000. delClassify: params => {
  1001. return http.post('/my_chart/classify/delete',params)
  1002. },
  1003. /**
  1004. * 编辑分类
  1005. * @param {MyChartClassifyId} params
  1006. * @param {MyChartClassifyName} params
  1007. * @returns
  1008. */
  1009. editClassify: params => {
  1010. return http.post('/my_chart/classify/edit',params)
  1011. },
  1012. /**
  1013. * 我的图库分类
  1014. * @param {*} params
  1015. * @returns
  1016. */
  1017. classifyList: params => {
  1018. return http.get('/my_chart/classify/list',params);
  1019. },
  1020. /**
  1021. * 移出我的图库
  1022. * @param {MyChartId} params
  1023. * @param {MyChartClassifyId} params
  1024. * @returns
  1025. */
  1026. del: params => {
  1027. return http.post('/my_chart/delete',params)
  1028. },
  1029. /**
  1030. * 我的图库列表
  1031. * @param {PageSize } params
  1032. * @param {CurrentIndex} params
  1033. * @param {MyChartClassifyId} params
  1034. * @returns
  1035. */
  1036. myList: params => {
  1037. return http.get('/my_chart/list',params);
  1038. },
  1039. /**
  1040. * 移动
  1041. * @param {MyChartId} params
  1042. * @param {MyChartClassifyId} params
  1043. * @param {PrevMyChartId} params
  1044. * @param {NextMyChartId} params
  1045. * @returns
  1046. */
  1047. move: params => {
  1048. return http.post('/my_chart/move',params)
  1049. },
  1050. /**
  1051. * 图表详情 推荐图表列表
  1052. * @param {ChartClassifyId} params
  1053. * @returns
  1054. */
  1055. recommendChart: params => {
  1056. return http.get('/my_chart/chart/recommend/list',params)
  1057. },
  1058. /**
  1059. * 搜索
  1060. * @param {KeyWord} params
  1061. * @returns
  1062. */
  1063. search: params => {
  1064. return http.get('/my_chart/search',params)
  1065. },
  1066. /**
  1067. * 移动到
  1068. * @param {MyChartClassifyId} params []
  1069. * @param {MyChartId} params
  1070. * @param {CurrentMyChartClassifyId} params
  1071. */
  1072. moveChart: params => {
  1073. return http.post('/my_chart/edit',params)
  1074. },
  1075. /**
  1076. * 拖动分类
  1077. * @param {MyChartClassifyId} parmas
  1078. * @param {NextClassifyId} parmas
  1079. * @param {PrevClassifyId} parmas
  1080. * @returns
  1081. */
  1082. moveClassify: params => {
  1083. return http.post('/my_chart/classify/move',params)
  1084. },
  1085. /**
  1086. * 公用分类
  1087. * @param {*} params
  1088. * @returns
  1089. */
  1090. publicClassify: params => {
  1091. return http.get('/my_chart/classify/public_list',params)
  1092. },
  1093. /**
  1094. * 设置分类是否可见
  1095. * @param {IsPublic} params 0:own 1:public
  1096. * @param {MyChartClassifyId} params
  1097. * @returns
  1098. */
  1099. setPublic: params => {
  1100. return http.post('/my_chart/classify/modify_public',params)
  1101. },
  1102. /**
  1103. * 复制分类
  1104. * @param {MyChartClassifyId} params
  1105. * @returns
  1106. */
  1107. copyclassify: params => {
  1108. return http.post('/my_chart/classify/copy',params)
  1109. },
  1110. /**
  1111. * 我的图库中公共分类
  1112. */
  1113. commonClassify:()=>{
  1114. return http.get('/my_chart/classify/company_public_list',{})
  1115. },
  1116. /**
  1117. * 我的图库中公共分类
  1118. */
  1119. commonClassifys:params=>{
  1120. return http.get('/my_chart/classify/company_public_list',params)
  1121. },
  1122. /**
  1123. * 设置分类是否客户可见
  1124. */
  1125. setClassifyAuthToUser:params=>{
  1126. return http.post('/my_chart/classify/modify_company_public',params)
  1127. },
  1128. /**
  1129. * 获取当前图表所属分类
  1130. * @param {ChartInfoId} params
  1131. * @returns
  1132. */
  1133. getChartInClassify: params => {
  1134. return http.get('/my_chart/get_mychart_classify_id_list',params)
  1135. },
  1136. /**
  1137. * 复制图表到其他分类
  1138. * @param {ChartInfoId} params
  1139. * @param {MyChartClassifyId} params []
  1140. * @returns
  1141. */
  1142. copyMyChart: params => {
  1143. return http.post('/my_chart/add_to_classify',params)
  1144. },
  1145. /**
  1146. * 图表搜素 es
  1147. * @param {*} params Keyword CurrentIndex
  1148. * @returns
  1149. */
  1150. mychartSearchByEs: params => {
  1151. return http.get('/my_chart/search_by_es',params)
  1152. }
  1153. }
  1154. /* 图库框架 */
  1155. const chartFrameInterface = {
  1156. /**
  1157. * 添加框架
  1158. * @param {Object} params
  1159. * @param {String} params.FrameworkName 框架名称
  1160. * @param {String} params.FrameworkImg 框架图片地址
  1161. * @param {String} params.FrameworkContent 框架内容
  1162. * @param {Array} params.Nodes 框架所包含的节点数组
  1163. * @param {String} Nodes.NodeName 节点名称
  1164. * @param {Number} Nodes.MyChartClassifyId 节点对应图库分类id
  1165. * @returns
  1166. */
  1167. addFrame: params => {
  1168. return http.post('/chart_framework/add',params)
  1169. },
  1170. /**
  1171. * 编辑框架
  1172. * @param {Object} params
  1173. * @param {Number} params.ChartFrameworkId 框架id
  1174. * 其他参数同上
  1175. * @returns
  1176. */
  1177. editFrame: params => {
  1178. return http.post('/chart_framework/edit',params)
  1179. },
  1180. getFrameDetail:params=>{
  1181. return http.get('/chart_framework/detail',params)
  1182. },
  1183. /**
  1184. * 重命名框架
  1185. * @param {Object} params
  1186. * @param {Number} params.ChartFrameworkId
  1187. * @param {String} params.FrameworkName
  1188. * @returns
  1189. */
  1190. reNameFrame: params => {
  1191. return http.post('/chart_framework/rename',params)
  1192. },
  1193. /**
  1194. * 删除框架
  1195. * @param {Object} params
  1196. * @param {Number} params.ChartFrameworkId
  1197. * @returns
  1198. */
  1199. deleteFrame: params => {
  1200. return http.post('/chart_framework/remove',params)
  1201. },
  1202. /**
  1203. * 公开/隐藏框架
  1204. * @param {Object} params
  1205. * @param {Number} params.ChartFrameworkId
  1206. * @param {Number} params.IsPublic 0隐藏 1公开
  1207. * @returns
  1208. */
  1209. changePublicFrame: params => {
  1210. return http.post('/chart_framework/edit_public',params)
  1211. },
  1212. /**
  1213. * 框架移动排序
  1214. * @param {Object} params
  1215. * @param {Number} params.ChartFrameworkId
  1216. * @param {Number} params.PrevChartFrameworkId
  1217. * @param {Number} params.NextChartFrameworkId
  1218. * @returns
  1219. */
  1220. moveFrame: params => {
  1221. return http.post('/chart_framework/move',params)
  1222. },
  1223. /**
  1224. * 获取公开框架目录
  1225. * @returns
  1226. */
  1227. getPublicFrameList:params=>{
  1228. return http.get('/chart_framework/public_menu',params)
  1229. },
  1230. /**
  1231. * 获取我的框架列表
  1232. * @param {Object} params
  1233. * @param {Number} params.AdminId
  1234. * @param {String} params.Keyword 筛选关键词
  1235. * @param {Number} params.Visibility 0所有用户 1自己用户
  1236. * @returns
  1237. */
  1238. getMyFrameList:params=>{
  1239. return http.get('/chart_framework/list',params)
  1240. },
  1241. }
  1242. export {
  1243. dataBaseInterface,
  1244. mychartInterface,
  1245. chartFrameInterface
  1246. }