chartApi.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359
  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 {EdbInfoId} params
  311. * @param {ModifyStatus} params 需要更改的状态:启用、暂停
  312. * @returns
  313. */
  314. edbRefreshStatusSet: params => {
  315. return http.post('/datamanage/edb_info/single_refresh/status/save',params)
  316. },
  317. /**
  318. * 指标替换
  319. * @param {NewEdbInfoId} params
  320. * @param {OldEdbInfoId} params
  321. * @returns
  322. */
  323. edbReplace: params => {
  324. return http.post('/datamanage/edb_info/replace',params)
  325. },
  326. /**
  327. * 替换校验
  328. * @param {*} params
  329. * @returns
  330. */
  331. replaceCheck: params => {
  332. return http.post('/datamanage/edb_info/replace/check',params)
  333. },
  334. /**
  335. * 获取同比数据
  336. * @param {*} params EdbInfoId DateType StartDate EndDate
  337. * @returns
  338. */
  339. edbOnyearData: params => {
  340. return http.get('/datamanage/edb_info/data/tb',params)
  341. },
  342. /**
  343. * 获取指标季节数据
  344. * @param {*} params EdbInfoId Calendar StartDate EndDate
  345. * @returns
  346. */
  347. ebdSeasonData: params => {
  348. return http.get('/datamanage/edb_info/data/seasonal',params)
  349. },
  350. /**
  351. * 设置插入值
  352. * @param {*} params EdbInfoId Date Value
  353. * @returns
  354. */
  355. insertData: params => {
  356. return http.post('/datamanage/edb_info/insert_config/set',params)
  357. },
  358. /**
  359. * 记录指标库中英文
  360. * @param {*} params
  361. * ConfigCode edb指标库:edb_language;预测指标库:predict_edb_language
  362. * ConfigValue 中文:CN;英文:EN
  363. * @returns
  364. */
  365. setUserLang: params => {
  366. return http.post('/system/sysuser/config/set',params)
  367. },
  368. /**
  369. * 获取指标历史生成记录
  370. * @param {*} params EdbInfoId
  371. * @returns
  372. */
  373. getEdbCreateHistory: params => {
  374. return http.get('datamanage/edb_info/trace',params)
  375. },
  376. /** 拟合残差相关系数
  377. * @param {*} params
  378. *"Formula": "2020-01-01,2022-12-13",
  379. "EdbInfoIdArr": [
  380. {
  381. "EdbInfoId": 113123,
  382. "FromTag": "A",
  383. "MoveValue": 0
  384. }
  385. ]
  386. */
  387. correlationIndex: params => {
  388. return http.post('/datamanage/edb_info/calculate/compute_correlation',params)
  389. },
  390. /**
  391. * 代码运算的sourceList
  392. * @param {*} params
  393. */
  394. getCodecountEdbSources: params => {
  395. return http.get('/datamanage/edb_source/list/python')
  396. },
  397. /**
  398. * 新增指标 检验指标是否存在接口
  399. * @param {*} params Source SubSource EdbCode StockCode
  400. */
  401. edbExistCheck: params => {
  402. return http.get('/datamanage/edb_info/exist/check',params)
  403. },
  404. /**
  405. * 批量新增指标
  406. * @param {*} params BatchList[{Source,EdbName,Frequency,Unit,ClassifyId,StockCode,EdbCode}]
  407. */
  408. edbAddBatch: params => {
  409. return http.post('/datamanage/edb_info/batch/add',params)
  410. },
  411. // 批量计算指标时获取当前筛选条件下选择的指标
  412. /**
  413. * @param {Object} params
  414. * @param {Number} params.EdbInfoType 0-指标;1-预测指标
  415. * @returns
  416. */
  417. getBatchFilterAddEdbList:params=>{
  418. return http.get('/datamanage/edb_info/calculate/multi/choice',params)
  419. },
  420. //批量计算指标时待选指标的搜索列表
  421. /**
  422. * @param {Object} params
  423. * @param {Number} params.EdbInfoType 0-指标;1-预测指标
  424. * @returns
  425. */
  426. getBatchAddEdbSearchList:params=>{
  427. return http.get('/datamanage/edb_info/calculate/multi/search',params)
  428. },
  429. /**
  430. * 设置指标对应版本信息
  431. * @param {*} params
  432. * EdbInfoId EdbName Unit
  433. */
  434. setEdbLangInfo: params => {
  435. return http.post('/datamanage/edb_info/base/edit',params)
  436. },
  437. /**
  438. * 设置图表对应版本信息
  439. * @param {*} params
  440. * ChartInfoId ChartName ChartEdbInfoList
  441. * @returns
  442. */
  443. setChartLangInfo: params => {
  444. return http.post('/datamanage/chart_info/base/edit',params)
  445. },
  446. //========================================chart
  447. // /**
  448. // *
  449. // * @param {Image} params
  450. // * @returns
  451. // */
  452. uploadImg:params => {
  453. return http.post('/resource/upload_image_base64',params)
  454. },
  455. // /**
  456. // * 上传图片 转svg
  457. // * @param {Img} params
  458. // * @returns
  459. // */
  460. uploadImgSvg:params => {
  461. return http.post('/datamanage/chart_info/base64Upload',params)
  462. },
  463. /**
  464. * 新增图表分类
  465. * @param {ChartClassifyName} params
  466. * @param {Level} params
  467. * @param {ParentId} params
  468. * @returns
  469. */
  470. addChartClassify: params => {
  471. return http.post('/datamanage/chart_classify/add',params)
  472. },
  473. /**
  474. * 删除图表分类/图表
  475. * @param {ChartClassifyId} params
  476. * @param {ChartInfoId} params
  477. * @returns
  478. */
  479. delChartClassify: params => {
  480. return http.post('/datamanage/chart_classify/delete',params)
  481. },
  482. /**
  483. * 删除图表检测
  484. * @param {ChartClassifyId} params
  485. * @param {ChartInfoId} params
  486. * @returns
  487. */
  488. delChartCheck: params => {
  489. return http.post('/datamanage/chart_classify/delete/check',params)
  490. },
  491. /**
  492. * 修改图表分类
  493. * @param {ChartClassifyName} params
  494. * @param {ChartClassifyId} params
  495. * @returns
  496. */
  497. editChartClassify: params => {
  498. return http.post('/datamanage/chart_classify/edit',params)
  499. },
  500. /**
  501. * 获取图表分类 截止到3级
  502. * @param {*} params
  503. * @returns
  504. */
  505. chartClassify: params => {
  506. return http.get('/datamanage/chart_classify/items',params)
  507. },
  508. /**
  509. * 获取图表分类树
  510. * @param {*} params
  511. * @returns
  512. */
  513. chartTree: params => {
  514. return http.get('/datamanage/chart_classify/list',params)
  515. },
  516. /**
  517. * 通过分类查找分类下面的图数据
  518. * @param IsShowMe
  519. * @param ChartClassifyId
  520. */
  521. getChartListForClassify:params=>{
  522. return http.get('/datamanage/chart_classify/chart/list',params)
  523. },
  524. /**
  525. * 图表详情
  526. * @param {ChartInfoId } params
  527. * @param {Calendar } params
  528. * @param {DateType} params
  529. * @param {StartDate} params
  530. * @param {EndDate} params
  531. * @returns
  532. */
  533. chartInfo: params => {
  534. return http.get('/datamanage/chart_info/detail',params)
  535. },
  536. /**
  537. * 获取指标详情
  538. * @param {EdbInfoId} params
  539. * @param {DateType} params 1:00年至今,2:10年至今,3:15年至今,4:21年至今,5:自定义时间
  540. * @param {StartDate} params
  541. * @param {EndDate} params
  542. * @param {EdbInfoType} params 1:标准指标,0:领先指标
  543. * @param {LeadValue} params
  544. * @param {LeadUnit} params
  545. */
  546. edbinfoDetail: params => {
  547. return http.get('/datamanage/chart_info/edb_info/detail',params)
  548. },
  549. /**
  550. * 图表指标模糊搜索接口
  551. * @param {KeyWord} params
  552. * @returns
  553. */
  554. edbSearch: params => {
  555. return http.get('/datamanage/chart_info/edb_info/search',params)
  556. },
  557. /**
  558. * 编辑图表
  559. * @param {ChartClassifyId } params
  560. * @param {ChartInfoId } params
  561. * @param {ChartName } params
  562. * @returns
  563. */
  564. chartEdit: params => {
  565. return http.post('/datamanage/chart_info/edit',params)
  566. },
  567. /**
  568. * 分类移动
  569. * @param {ClassifyId} 分类id
  570. * @param {ParentClassifyId} 父级分类id
  571. * @param {PrevClassifyId} 上一个兄弟节点分类id
  572. * @returns
  573. */
  574. chartClassifyMove:params=>{
  575. return http.post('/datamanage/chart_classify/move',params)
  576. },
  577. /**
  578. * 移动图表
  579. * @param {ChartClassifyId } params
  580. * @param {ChartInfoId } params
  581. * @returns
  582. */
  583. chartMove: params => {
  584. return http.post('/datamanage/chart_info/move',params)
  585. },
  586. /**
  587. * 最新图表
  588. * @returns
  589. */
  590. chartNew: params => {
  591. return http.get('/datamanage/chart_info/newest',params)
  592. },
  593. /**
  594. * 保存图表
  595. * @param {ChartClassifyId} params
  596. * @param {ChartEdbInfoList} params
  597. * {
  598. "ChartColor": "string",
  599. "ChartStyle": "string",
  600. "ChartWidth": 0,
  601. "EdbInfoId": 0,
  602. "EdbInfoType": 0,
  603. "IsAxis": 0,
  604. "IsOrder": 0,
  605. "LeadUnit": "string",
  606. "LeadValue": 0,
  607. "MaxData": 0,
  608. "MinData": 0
  609. }
  610. *@param {ChartInfoId}
  611. @returns
  612. */
  613. chartSave: params => {
  614. return http.post('/datamanage/chart_info/save',params)
  615. },
  616. /**
  617. * 新增图表 弹窗形式
  618. * @param {ChartClassifyId} params
  619. * @param {ChartName} params
  620. * @param {ChartEdbInfoList} params
  621. * {
  622. * "ChartColor": "string",
  623. "ChartStyle": "string",
  624. "ChartWidth": 0,
  625. "EdbInfoId": 0,
  626. "EdbInfoType": 0,
  627. "IsAxis": 0,
  628. "IsOrder": true,
  629. "LeadUnit": "string",
  630. "LeadValue": 0,
  631. "MaxData": 0,
  632. "MinData": 0
  633. * }
  634. */
  635. chartAdd: params => {
  636. return http.post('/datamanage/chart_info/add',params)
  637. },
  638. /**
  639. * 编辑图表
  640. * @param {ChartClassifyId} params
  641. * @param {ChartInfoId} params
  642. * @param {ChartName} params
  643. * @param {ChartEdbInfoList} params
  644. * @returns
  645. */
  646. chartEdit: params => {
  647. return http.post('/datamanage/chart_info/edit',params)
  648. },
  649. /**
  650. * 搜索图表
  651. * @param {KeyWord} params
  652. * @returns
  653. */
  654. chartSearch: params => {
  655. return http.get('/datamanage/chart_info/search',params)
  656. },
  657. /**
  658. * 图表刷新接口
  659. * @param {ChartInfoId} params
  660. * @returns
  661. */
  662. chartRefresh: params => {
  663. return http.get('/datamanage/chart_info/refresh',params)
  664. },
  665. /**
  666. * 设置图表图片
  667. * @param {ChartInfoId} params
  668. * @param {ImageUrl} params
  669. * @returns
  670. */
  671. setChartImage: params => {
  672. return http.post('/datamanage/chart_info/image/set',params)
  673. },
  674. /**
  675. * 设置图表缩略图 formData
  676. * @param {Img} string
  677. * @param {Chartlnfold} number
  678. * @returns
  679. */
  680. setChartThumbnail: params => {
  681. return http.post('/datamanage/chart_info/image/set_by_svg',params)
  682. },
  683. /**
  684. * 通过unicode获取图表信息
  685. * @param {UniqueCode} params
  686. * @returns
  687. */
  688. getChartByCode: params => {
  689. return http.get('/datamanage/chart_info/common/detail/from_unique_code',params)
  690. },
  691. /**
  692. * 多图表一键刷新
  693. * @param {Object} params
  694. * @param {Array} params.ChartInfoCode
  695. * @param {String} params.Source 来源,枚举值:report、english_report、smart_report、ppt、en_ppt
  696. * @param {Number} params.PrimaryId 报告id/pptId
  697. * @returns
  698. */
  699. reportRefresh: params => {
  700. return http.post('/datamanage/chart_info/batch_refresh',params)
  701. },
  702. /**
  703. * 图表另存为
  704. * @param {*} params
  705. * @returns
  706. * ChartInfoId ChartClassifyId ChartName
  707. */
  708. saveChartOther: params => {
  709. return http.post('/datamanage/chart_info/copy',params)
  710. },
  711. // 图表类型
  712. chartTypeList:()=>{
  713. return http.get('/datamanage/chart_info/type_list',{})
  714. },
  715. /* ================代码运算========================= */
  716. /**
  717. * 新增代码运算指标
  718. * @param {*} params PythonCode EdbName Frequency Unit ClassifyId
  719. * @returns
  720. */
  721. addCountCode: params => {
  722. return http.post('/datamanage/edb_info/python/add',params)
  723. },
  724. /**
  725. * 编辑代码运算指标
  726. * @param {*} params PythonCode EdbName Frequency Unit ClassifyId EdbInfoId
  727. * @returns
  728. */
  729. editCountCode: params => {
  730. return http.post('/datamanage/edb_info/python/edit',params)
  731. },
  732. /**
  733. * 执行代码
  734. * @param {*} params PythonCode
  735. */
  736. runCode: params => {
  737. return http.post('/datamanage/edb_info/python/exec',params)
  738. },
  739. /**
  740. * py代码详情
  741. * @param {} params EdbInfoId
  742. * @returns
  743. */
  744. countCodeDetail: params => {
  745. return http.get('/datamanage/edb_info/python/detail',params)
  746. },
  747. /**
  748. * 获取指标表结构
  749. * @param {} params EdbInfoId
  750. * @returns
  751. */
  752. edbSheetDetail: params => {
  753. return http.get('/datamanage/edb_data/table/detail',params)
  754. },
  755. /**
  756. * IsShowMe Keyword PageSize CurrentIndex
  757. * @param {*} params
  758. * @returns
  759. */
  760. chartSearchByEs: params => {
  761. return http.get('/datamanage/chart_info/search_by_es',params)
  762. },
  763. /**
  764. * 编辑指标英文信息
  765. * @param {*} params EdbInfoId(指标ID) EdbNameEn(英文指标名称) UnitEn(英文单位)
  766. * @returns
  767. */
  768. edbInfoEditEn: params => {
  769. return http.post('datamanage/edb_info/en/edit',params)
  770. },
  771. /**
  772. * 编辑图表英文信息
  773. * @param {*} params ChartInfoId(图表ID) ChartNameEn(英文图表名称)
  774. * @param {*} params ChartEdbInfoList(指标数据)->{EdbInfoId(指标ID) EdbNameEn(英文指标名称) UnitEn(英文单位)}
  775. * @returns
  776. */
  777. chartInfoEditEn: params => {
  778. return http.post('datamanage/chart_info/en/edit',params)
  779. },
  780. /**
  781. * ETA指标关联的图表列表
  782. * @param EdbInfoId
  783. * @param CurrentIndex
  784. */
  785. edbRelationChartList:params=>{
  786. return http.get('datamanage/edb_info/relation/chart_list',params)
  787. },
  788. /**
  789. * ETA指标引用的计算指标
  790. * @param EdbInfoId
  791. * @param CurrentIndex
  792. */
  793. edbRelationComputerList:params=>{
  794. return http.get('datamanage/edb_info/relation/edbinfo_list',params)
  795. },
  796. /**
  797. * 获取柱状图数据
  798. * EdbInfoIdList [] { EdbInfoId,Name }
  799. * DateList [] {
  800. * Type 1最新 2N天前 3固定
  801. * Date
  802. * Value
  803. * Color
  804. * }
  805. * Sort { Sort DateIndex }
  806. */
  807. getBarData: params => {
  808. return http.post('/datamanage/chart_info/preview_bar',params)
  809. },
  810. /**
  811. * 数据调整指标 新增/编辑
  812. * @param {} params
  813. * "EdbName,
  814. "Frequency,
  815. "Unit",
  816. "ClassifyId",
  817. "EdbInfoId",
  818. "FromEdbInfoId",
  819. "DataList
  820. * @returns
  821. */
  822. adjustEdbEdit: params => {
  823. return http.post('/datamanage/edb_info/adjust/save',params)
  824. },
  825. /**
  826. * 截面散点图预览数据
  827. * @param {*} params
  828. * ExtraConfig
  829. * {
  830. * "XName" "XNameEn" "XUnitName" "XUnitNameEn" "YName" "YNameEn" "YUnitName" "YUnitNameEn" "XMinValue" "XMaxValue" "YMinValue" "YMaxValue"
  831. * SeriesList [{
  832. * Name Color ShowLine ShowEquation ShowR
  833. * EdbInfoList:[{
  834. * "XEdbInfoId":100221,
  835. "YEdbInfoId":100220,
  836. "Name":"螺纹价格",
  837. "NameEn":"Luo Wen",
  838. "XDateType":1,
  839. "XDate":"",
  840. "XDateValue":0,
  841. "YDateType":2,
  842. "YDate":"",
  843. "YDateValue":30,
  844. "IsShow":true
  845. * }]
  846. * }]
  847. * }
  848. * @returns
  849. */
  850. sectionScatterPreviewData: params => {
  851. return http.post('/datamanage/chart_info/preview/time_section',params)
  852. },
  853. seasonPreviewData:params=>{
  854. return http.post('/datamanage/chart_info/preview/season',params)
  855. },
  856. // 截面组合图预览数据
  857. sectionalCombinationPreviewData:params=>{
  858. return http.post('/datamanage/chart_info/preview/section_combine',params)
  859. },
  860. /* 批量计算
  861. * @param {*} params
  862. * CalculateId
  863. * CalculateInfo {
  864. * "ClassifyId": 341,
  865. "EdbName": "PVC出口占比同比2",
  866. "Formula": "1",
  867. "Frequency": "月度",
  868. "FromEdbInfoId": 101712,
  869. "MoveFrequency": "天",
  870. "MoveType": 1,
  871. "Source": 6,
  872. "Unit": "无"
  873. * }
  874. * @returns
  875. */
  876. batchCalculateTargetAdd: params => {
  877. return http.post('/datamanage/edb_info/calculate/batch/save/batch',params)
  878. },
  879. //批量计算编辑
  880. batchCalculateTargetEdit: params => {
  881. return http.post('/datamanage/edb_info/calculate/batch/edit/batch',params)
  882. },
  883. /**
  884. * 获取计算指标与基础指标关联信息
  885. * @param EdbInfoId
  886. */
  887. getEDBInfoCalculateMap:params=>{
  888. return http.get('/datamanage/edb_info/calculate/mapping',params)
  889. },
  890. /**
  891. * 获取创建人列表
  892. * Source - 来源 :1:手工数据指标 2:钢联化工数据库 3:ETA指标库 4:ETA预测指标 5:图库
  893. */
  894. getEdbChartAdminList: params => {
  895. return http.get('/datamanage/edb_chart/adminList',params)
  896. },
  897. /* eta图库 图表预览 启用之前根据传参刷数据的详情接口
  898. {
  899. ChartType:1,
  900. "ChartEdbInfoList": [
  901. {
  902. "EdbInfoId": 102767,
  903. "EdbInfoType": 1,
  904. "LeadUnit": "",
  905. "LeadValue": 0,
  906. },
  907. {
  908. "EdbInfoId": 102769,
  909. "EdbInfoType": 1,
  910. "LeadUnit": "",
  911. "LeadValue": 0,
  912. }
  913. ],
  914. "DateType": 3,
  915. "StartDate": "",
  916. "EndDate": "",
  917. Calendar
  918. SeasonStartDate
  919. SeasonEndDate
  920. }
  921. */
  922. getSplinePreviewData: params => {
  923. return http.post('/datamanage/chart_info/detail/preview',params)
  924. },
  925. /**
  926. * 获取图表信息 在eta图库内替换上面的图表详情接口
  927. * @param {*} params ChartInfoId
  928. * @returns
  929. */
  930. getChartInfoById: params => {
  931. return http.get('/datamanage/chart_info/detail/v2',params)
  932. },
  933. /**
  934. * 接口获取指标数据来源
  935. * @param params.IsBase
  936. */
  937. getDataSource:(params)=>{
  938. return http.get('datamanage/edb_source/list',params)
  939. },
  940. /**
  941. * 指标图表列表
  942. * @param {Number} PageSize
  943. * @param {Number} CurrentIndex
  944. * @param {Number} ClassifyId
  945. * @param {Number} AdminId
  946. * @param {Boolean} IsOnlyMe
  947. */
  948. getEdbChartList:(params)=>{
  949. return http.get('/datamanage/edb_info/chart/list',params)
  950. },
  951. /**
  952. * 保存指标上下限
  953. * @param {*} params
  954. * @returns
  955. */
  956. saveEdbChartLimit:(params)=>{
  957. return http.post('/datamanage/edb_info/modify',params)
  958. },
  959. /**
  960. * 保存指标缩略图
  961. * @param {Number} EdbInfoId
  962. * @param {String} ImageUrl
  963. * @returns
  964. */
  965. saveEdbChartImg:(params)=>{
  966. return http.post('/datamanage/edb_info/image/set',params)
  967. },
  968. /**
  969. * 设置图表缩略图 formData
  970. * @param {Number} EdbInfoId
  971. * @param {String} Img
  972. * @returns
  973. */
  974. saveEdbChartThumbnail:(params)=>{
  975. return http.post('/datamanage/edb_info/image/set_by_svg',params)
  976. },
  977. /**
  978. * 获取图表批量刷新结果
  979. * @param {Object} params
  980. * @param {String} params.Source 来源,枚举值:report、english_report、smart_report、ppt、en_ppt
  981. * @param {Number} params.PrimaryId 报告id/pptId
  982. *
  983. */
  984. getReportrefreshStatus: params => {
  985. return http.post('/datamanage/chart_info/batch_refresh/result',params)
  986. },
  987. /**
  988. * 获取雷达图预览数据
  989. * @param {
  990. * ExtraConfig: { EdbInfoIdList DateList }
  991. * } params
  992. */
  993. getRadarPreviewData: params => {
  994. return http.post('/datamanage/chart_info/preview/radar',params)
  995. },
  996. /**
  997. * 获取数据转换后Edb数据
  998. * @param {Object} params
  999. * @param {Number} params.IsConvert 是否数据转换
  1000. * @param {Number} params.ConvertType 数据转换类型 1乘 2除 3对数
  1001. * @param {Number} params.ConvertValue 数据转换值
  1002. * @param {String} params.ConvertUnit 数据转换单位
  1003. * @param {String} params.ConvertEnUnit 数据转换单位英文
  1004. * @param {*} params.SeasonStartDate
  1005. * @param {*} params.SeasonEndDate
  1006. * @param {*} params.EdbInfoId
  1007. * @returns
  1008. */
  1009. getChangeEdbData:params=>{
  1010. return http.get('/datamanage/chart_info/convert/detail',params)
  1011. },
  1012. //上传至社区
  1013. chartUploadToForum:params=>{
  1014. return http.post('/datamanage/chart_info/forum/upload',params)
  1015. },
  1016. //同步至社区
  1017. chartUpdateToForum:params=>{
  1018. return http.post('/datamanage/chart_info/forum/update',params)
  1019. },
  1020. //从社区撤回
  1021. chartWithdrawFromForum:params=>{
  1022. return http.post('/datamanage/chart_info/forum/delete',params)
  1023. }
  1024. }
  1025. /* 我的图库 */
  1026. const mychartInterface = {
  1027. /**
  1028. * 公用图库列表
  1029. * @param {PageSize} params
  1030. * @param {CurrentIndex} params
  1031. * @param {ChartClassifyId} params
  1032. * @param {KeyWord} params
  1033. */
  1034. publicList: params => {
  1035. return http.get('/my_chart/chart/list',params)
  1036. },
  1037. /**
  1038. * 加入我的图库
  1039. * @param {ChartInfoId} params
  1040. * @param {MyChartClassifyId} params
  1041. */
  1042. add: params => {
  1043. return http.post('/my_chart/add',params)
  1044. },
  1045. /**
  1046. * 添加分类
  1047. * @param {MyChartClassifyName} params
  1048. * @returns
  1049. */
  1050. addClassify: params => {
  1051. return http.post('/my_chart/classify/add',params)
  1052. },
  1053. /**
  1054. * 获取图表关联的节点列表
  1055. * @param {MyChartClassifyId} params
  1056. */
  1057. getFrameNode:params =>{
  1058. return http.get('/my_chart/classify/framework_node_list',params)
  1059. },
  1060. /**
  1061. * 删除分类
  1062. * @param {MyChartClassifyId} params
  1063. * @returns
  1064. */
  1065. delClassify: params => {
  1066. return http.post('/my_chart/classify/delete',params)
  1067. },
  1068. /**
  1069. * 编辑分类
  1070. * @param {MyChartClassifyId} params
  1071. * @param {MyChartClassifyName} params
  1072. * @returns
  1073. */
  1074. editClassify: params => {
  1075. return http.post('/my_chart/classify/edit',params)
  1076. },
  1077. /**
  1078. * 我的图库分类
  1079. * @param {*} params
  1080. * @returns
  1081. */
  1082. classifyList: params => {
  1083. return http.get('/my_chart/classify/list',params);
  1084. },
  1085. /**
  1086. * 移出我的图库
  1087. * @param {MyChartId} params
  1088. * @param {MyChartClassifyId} params
  1089. * @returns
  1090. */
  1091. del: params => {
  1092. return http.post('/my_chart/delete',params)
  1093. },
  1094. /**
  1095. * 我的图库列表
  1096. * @param {PageSize } params
  1097. * @param {CurrentIndex} params
  1098. * @param {MyChartClassifyId} params
  1099. * @returns
  1100. */
  1101. myList: params => {
  1102. return http.get('/my_chart/list',params);
  1103. },
  1104. /**
  1105. * 移动
  1106. * @param {MyChartId} params
  1107. * @param {MyChartClassifyId} params
  1108. * @param {PrevMyChartId} params
  1109. * @param {NextMyChartId} params
  1110. * @returns
  1111. */
  1112. move: params => {
  1113. return http.post('/my_chart/move',params)
  1114. },
  1115. /**
  1116. * 图表详情 推荐图表列表
  1117. * @param {ChartClassifyId} params
  1118. * @returns
  1119. */
  1120. recommendChart: params => {
  1121. return http.get('/my_chart/chart/recommend/list',params)
  1122. },
  1123. /**
  1124. * 搜索
  1125. * @param {KeyWord} params
  1126. * @returns
  1127. */
  1128. search: params => {
  1129. return http.get('/my_chart/search',params)
  1130. },
  1131. /**
  1132. * 移动到
  1133. * @param {MyChartClassifyId} params []
  1134. * @param {MyChartId} params
  1135. * @param {CurrentMyChartClassifyId} params
  1136. */
  1137. moveChart: params => {
  1138. return http.post('/my_chart/edit',params)
  1139. },
  1140. /**
  1141. * 拖动分类
  1142. * @param {MyChartClassifyId} parmas
  1143. * @param {NextClassifyId} parmas
  1144. * @param {PrevClassifyId} parmas
  1145. * @returns
  1146. */
  1147. moveClassify: params => {
  1148. return http.post('/my_chart/classify/move',params)
  1149. },
  1150. /**
  1151. * 公用分类
  1152. * @param {*} params
  1153. * @returns
  1154. */
  1155. publicClassify: params => {
  1156. return http.get('/my_chart/classify/public_list',params)
  1157. },
  1158. /**
  1159. * 设置分类是否可见
  1160. * @param {IsPublic} params 0:own 1:public
  1161. * @param {MyChartClassifyId} params
  1162. * @returns
  1163. */
  1164. setPublic: params => {
  1165. return http.post('/my_chart/classify/modify_public',params)
  1166. },
  1167. /**
  1168. * 复制分类
  1169. * @param {MyChartClassifyId} params
  1170. * @returns
  1171. */
  1172. copyclassify: params => {
  1173. return http.post('/my_chart/classify/copy',params)
  1174. },
  1175. /**
  1176. * 我的图库中公共分类
  1177. */
  1178. commonClassify:()=>{
  1179. return http.get('/my_chart/classify/company_public_list',{})
  1180. },
  1181. /**
  1182. * 我的图库中公共分类
  1183. */
  1184. commonClassifys:params=>{
  1185. return http.get('/my_chart/classify/company_public_list',params)
  1186. },
  1187. /**
  1188. * 设置分类是否客户可见
  1189. */
  1190. setClassifyAuthToUser:params=>{
  1191. return http.post('/my_chart/classify/modify_company_public',params)
  1192. },
  1193. /**
  1194. * 获取当前图表所属分类
  1195. * @param {ChartInfoId} params
  1196. * @returns
  1197. */
  1198. getChartInClassify: params => {
  1199. return http.get('/my_chart/get_mychart_classify_id_list',params)
  1200. },
  1201. /**
  1202. * 复制图表到其他分类
  1203. * @param {ChartInfoId} params
  1204. * @param {MyChartClassifyId} params []
  1205. * @returns
  1206. */
  1207. copyMyChart: params => {
  1208. return http.post('/my_chart/add_to_classify',params)
  1209. },
  1210. /**
  1211. * 图表搜素 es
  1212. * @param {*} params Keyword CurrentIndex
  1213. * @returns
  1214. */
  1215. mychartSearchByEs: params => {
  1216. return http.get('/my_chart/search_by_es',params)
  1217. }
  1218. }
  1219. /* 图库框架 */
  1220. const chartFrameInterface = {
  1221. /**
  1222. * 添加框架
  1223. * @param {Object} params
  1224. * @param {String} params.FrameworkName 框架名称
  1225. * @param {String} params.FrameworkImg 框架图片地址
  1226. * @param {String} params.FrameworkContent 框架内容
  1227. * @param {Array} params.Nodes 框架所包含的节点数组
  1228. * @param {String} Nodes.NodeName 节点名称
  1229. * @param {Number} Nodes.MyChartClassifyId 节点对应图库分类id
  1230. * @returns
  1231. */
  1232. addFrame: params => {
  1233. return http.post('/chart_framework/add',params)
  1234. },
  1235. /**
  1236. * 编辑框架
  1237. * @param {Object} params
  1238. * @param {Number} params.ChartFrameworkId 框架id
  1239. * 其他参数同上
  1240. * @returns
  1241. */
  1242. editFrame: params => {
  1243. return http.post('/chart_framework/edit',params)
  1244. },
  1245. getFrameDetail:params=>{
  1246. return http.get('/chart_framework/detail',params)
  1247. },
  1248. /**
  1249. * 重命名框架
  1250. * @param {Object} params
  1251. * @param {Number} params.ChartFrameworkId
  1252. * @param {String} params.FrameworkName
  1253. * @returns
  1254. */
  1255. reNameFrame: params => {
  1256. return http.post('/chart_framework/rename',params)
  1257. },
  1258. /**
  1259. * 删除框架
  1260. * @param {Object} params
  1261. * @param {Number} params.ChartFrameworkId
  1262. * @returns
  1263. */
  1264. deleteFrame: params => {
  1265. return http.post('/chart_framework/remove',params)
  1266. },
  1267. /**
  1268. * 公开/隐藏框架
  1269. * @param {Object} params
  1270. * @param {Number} params.ChartFrameworkId
  1271. * @param {Number} params.IsPublic 0隐藏 1公开
  1272. * @returns
  1273. */
  1274. changePublicFrame: params => {
  1275. return http.post('/chart_framework/edit_public',params)
  1276. },
  1277. /**
  1278. * 框架移动排序
  1279. * @param {Object} params
  1280. * @param {Number} params.ChartFrameworkId
  1281. * @param {Number} params.PrevChartFrameworkId
  1282. * @param {Number} params.NextChartFrameworkId
  1283. * @returns
  1284. */
  1285. moveFrame: params => {
  1286. return http.post('/chart_framework/move',params)
  1287. },
  1288. /**
  1289. * 获取公开框架目录
  1290. * @returns
  1291. */
  1292. getPublicFrameList:params=>{
  1293. return http.get('/chart_framework/public_menu',params)
  1294. },
  1295. /**
  1296. * 获取我的框架列表
  1297. * @param {Object} params
  1298. * @param {Number} params.AdminId
  1299. * @param {String} params.Keyword 筛选关键词
  1300. * @param {Number} params.Visibility 0所有用户 1自己用户
  1301. * @returns
  1302. */
  1303. getMyFrameList:params=>{
  1304. return http.get('/chart_framework/list',params)
  1305. },
  1306. }
  1307. export {
  1308. dataBaseInterface,
  1309. mychartInterface,
  1310. chartFrameInterface
  1311. }