axwen-test31 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1234) hide show
  1. package/.browserslistrc +3 -0
  2. package/.editorconfig +5 -0
  3. package/.env.dev +8 -0
  4. package/.env.sit +4 -0
  5. package/.env.uat +4 -0
  6. package/.eslintrc.bak +2 -0
  7. package/.prettierignore +0 -0
  8. package/.prettierrc +10 -0
  9. package/README.md +168 -0
  10. package/babel.config.js +10 -0
  11. package/commitlint.config.js +32 -0
  12. package/package.json +137 -0
  13. package/postcss.config.js +6 -0
  14. package/public/StreamSaver.js +310 -0
  15. package/public/favicon.ico +0 -0
  16. package/public/favicon_back.ico +0 -0
  17. package/public/index.html +94 -0
  18. package/public/mitm.html +166 -0
  19. package/public/sw.js +124 -0
  20. package/sj/folder/g6.js +9 -0
  21. package/sj/g6.js.map +1 -0
  22. package/sonar-project.properties +5 -0
  23. package/src/App.vue +46 -0
  24. package/src/_backup/api/init.js +23 -0
  25. package/src/_backup/api/system.js +232 -0
  26. package/src/_backup/views/init-submit-log.vue +46 -0
  27. package/src/_backup/views/init.vue +112 -0
  28. package/src/actions.js +22 -0
  29. package/src/api/act-type-manage.js +49 -0
  30. package/src/api/allocation-rule.js +14 -0
  31. package/src/api/analysis.js +13 -0
  32. package/src/api/anti-disturbance.js +25 -0
  33. package/src/api/attachment-approval.js +23 -0
  34. package/src/api/calculate.js +10 -0
  35. package/src/api/channel-comp.js +47 -0
  36. package/src/api/channel.js +69 -0
  37. package/src/api/common.js +45 -0
  38. package/src/api/customer/customer-explore.js +162 -0
  39. package/src/api/customer/customer-group.js +168 -0
  40. package/src/api/customer/customer-tags.js +47 -0
  41. package/src/api/event.js +143 -0
  42. package/src/api/file.js +52 -0
  43. package/src/api/gift.js +69 -0
  44. package/src/api/init.js +22 -0
  45. package/src/api/lottery.js +11 -0
  46. package/src/api/market/component-manage.js +16 -0
  47. package/src/api/market.js +507 -0
  48. package/src/api/monitor.js +115 -0
  49. package/src/api/newHome.js +36 -0
  50. package/src/api/oa.js +53 -0
  51. package/src/api/other.js +3 -0
  52. package/src/api/process.js +29 -0
  53. package/src/api/product.js +72 -0
  54. package/src/api/reach.js +126 -0
  55. package/src/api/reachsource.js +4 -0
  56. package/src/api/recommend/recommend-fund.js +96 -0
  57. package/src/api/report.js +44 -0
  58. package/src/api/resource/file.js +83 -0
  59. package/src/api/scene.js +72 -0
  60. package/src/api/system.js +144 -0
  61. package/src/api/task.js +5 -0
  62. package/src/api/temp-content.js +36 -0
  63. package/src/api/template/template-active.js +157 -0
  64. package/src/api/template/template-app-message.js +14 -0
  65. package/src/api/template/template-audio.js +17 -0
  66. package/src/api/template/template-game.js +10 -0
  67. package/src/api/template/template-h5.js +16 -0
  68. package/src/api/template/template-message.js +35 -0
  69. package/src/api/template/template-picture.js +19 -0
  70. package/src/api/template/template-task.js +9 -0
  71. package/src/api/user.js +71 -0
  72. package/src/api/yunhu.js +13 -0
  73. package/src/assets/fonts/D-DINExp-Bold.otf +0 -0
  74. package/src/assets/fonts/Helvetica-Bold.ttf +0 -0
  75. package/src/assets/fonts/fonts.less +8 -0
  76. package/src/assets/iconfont/iconfont.css +348 -0
  77. package/src/assets/iconfont/iconfont.eot +0 -0
  78. package/src/assets/iconfont/iconfont.js +1 -0
  79. package/src/assets/iconfont/iconfont.json +520 -0
  80. package/src/assets/iconfont/iconfont.svg +243 -0
  81. package/src/assets/iconfont/iconfont.ttf +0 -0
  82. package/src/assets/iconfont/iconfont.woff +0 -0
  83. package/src/assets/iconfont/iconfont.woff2 +0 -0
  84. package/src/assets/iconfont1/iconfont.css +359 -0
  85. package/src/assets/iconfont1/iconfont.js +1 -0
  86. package/src/assets/iconfont1/iconfont.json +611 -0
  87. package/src/assets/iconfont1/iconfont.ttf +0 -0
  88. package/src/assets/iconfont1/iconfont.woff +0 -0
  89. package/src/assets/iconfont1/iconfont.woff2 +0 -0
  90. package/src/assets/images/avatar.png +0 -0
  91. package/src/assets/images/brief-report/bg.png +0 -0
  92. package/src/assets/images/brief-report/download.png +0 -0
  93. package/src/assets/images/brief-report/summary.png +0 -0
  94. package/src/assets/images/canvas-icon/act.png +0 -0
  95. package/src/assets/images/canvas-icon/activeCst.png +0 -0
  96. package/src/assets/images/canvas-icon/activityCst.png +0 -0
  97. package/src/assets/images/canvas-icon/appPush.png +0 -0
  98. package/src/assets/images/canvas-icon/canvas-bg.png +0 -0
  99. package/src/assets/images/canvas-icon/chnlRespFlow.png +0 -0
  100. package/src/assets/images/canvas-icon/composeCst.png +0 -0
  101. package/src/assets/images/canvas-icon/content.png +0 -0
  102. package/src/assets/images/canvas-icon/cst.png +0 -0
  103. package/src/assets/images/canvas-icon/custFlow.png +0 -0
  104. package/src/assets/images/canvas-icon/ebankApp.png +0 -0
  105. package/src/assets/images/canvas-icon/equity.png +0 -0
  106. package/src/assets/images/canvas-icon/evtRespFlow.png +0 -0
  107. package/src/assets/images/canvas-icon/flowCst.png +0 -0
  108. package/src/assets/images/canvas-icon/intligCall.png +0 -0
  109. package/src/assets/images/canvas-icon/labelFlow.png +0 -0
  110. package/src/assets/images/canvas-icon/merge.png +0 -0
  111. package/src/assets/images/canvas-icon/prod.png +0 -0
  112. package/src/assets/images/canvas-icon/randomFlow.png +0 -0
  113. package/src/assets/images/canvas-icon/sms.png +0 -0
  114. package/src/assets/images/canvas-icon/teleSalesPlat.png +0 -0
  115. package/src/assets/images/canvas-icon/waitEvent.png +0 -0
  116. package/src/assets/images/canvas-icon/waitFixTime.png +0 -0
  117. package/src/assets/images/canvas-icon/waitToTime.png +0 -0
  118. package/src/assets/images/canvas-icon/weChat.png +0 -0
  119. package/src/assets/images/channel-icon/crm.png +0 -0
  120. package/src/assets/images/channel-icon/ebankapp.png +0 -0
  121. package/src/assets/images/channel-icon/intligcall.png +0 -0
  122. package/src/assets/images/channel-icon/manageapp.png +0 -0
  123. package/src/assets/images/channel-icon/sms.png +0 -0
  124. package/src/assets/images/channel-icon/telesalesplat.png +0 -0
  125. package/src/assets/images/channel-icon/wechat.png +0 -0
  126. package/src/assets/images/channel-icon/wechatminiprogram.png +0 -0
  127. package/src/assets/images/channel-icon/wechatpublicaccount.png +0 -0
  128. package/src/assets/images/egg.png +0 -0
  129. package/src/assets/images/expand.png +0 -0
  130. package/src/assets/images/icon-png/analysis/right-arrows.png +0 -0
  131. package/src/assets/images/icon-png/error.png +0 -0
  132. package/src/assets/images/icon-png/level-icon.png +0 -0
  133. package/src/assets/images/icon-png/success.png +0 -0
  134. package/src/assets/images/icon-png/warn.png +0 -0
  135. package/src/assets/images/icon-side-menu-svg/channel-selected.svg +1 -0
  136. package/src/assets/images/icon-side-menu-svg/channel.svg +23 -0
  137. package/src/assets/images/icon-side-menu-svg/cognization-selected.svg +1 -0
  138. package/src/assets/images/icon-side-menu-svg/cognization.svg +1 -0
  139. package/src/assets/images/icon-side-menu-svg/customer-selected.svg +1 -0
  140. package/src/assets/images/icon-side-menu-svg/customer.svg +1 -0
  141. package/src/assets/images/icon-side-menu-svg/event-selected.svg +1 -0
  142. package/src/assets/images/icon-side-menu-svg/event.svg +1 -0
  143. package/src/assets/images/icon-side-menu-svg/home-selected.svg +1 -0
  144. package/src/assets/images/icon-side-menu-svg/home.svg +1 -0
  145. package/src/assets/images/icon-side-menu-svg/kehu-selected.svg +1 -0
  146. package/src/assets/images/icon-side-menu-svg/kehu.svg +1 -0
  147. package/src/assets/images/icon-side-menu-svg/market-selected.svg +1 -0
  148. package/src/assets/images/icon-side-menu-svg/market.svg +1 -0
  149. package/src/assets/images/icon-side-menu-svg/oa-selected.svg +1 -0
  150. package/src/assets/images/icon-side-menu-svg/oa.svg +1 -0
  151. package/src/assets/images/icon-side-menu-svg/product-selected.svg +1 -0
  152. package/src/assets/images/icon-side-menu-svg/product.svg +1 -0
  153. package/src/assets/images/icon-side-menu-svg/report-selected.svg +1 -0
  154. package/src/assets/images/icon-side-menu-svg/report.svg +1 -0
  155. package/src/assets/images/icon-side-menu-svg/resourceManager-selected.svg +1 -0
  156. package/src/assets/images/icon-side-menu-svg/resourceManager.svg +1 -0
  157. package/src/assets/images/icon-side-menu-svg/scene-selected.svg +1 -0
  158. package/src/assets/images/icon-side-menu-svg/scene.svg +1 -0
  159. package/src/assets/images/icon-side-menu-svg/system-selected.svg +1 -0
  160. package/src/assets/images/icon-side-menu-svg/system.svg +1 -0
  161. package/src/assets/images/icon-side-menu-svg/template-selected.svg +1 -0
  162. package/src/assets/images/icon-side-menu-svg/template.svg +46 -0
  163. package/src/assets/images/icon-svg/biaoqian.svg +1 -0
  164. package/src/assets/images/icon-svg/biaoqianxin.svg +1 -0
  165. package/src/assets/images/icon-svg/big.svg +12 -0
  166. package/src/assets/images/icon-svg/disabled.svg +17 -0
  167. package/src/assets/images/icon-svg/fullscreen.svg +25 -0
  168. package/src/assets/images/icon-svg/huodongmoban.svg +1 -0
  169. package/src/assets/images/icon-svg/scene-icon.svg +29 -0
  170. package/src/assets/images/icon-svg/wenjianjiaguanbi.svg +1 -0
  171. package/src/assets/images/jiugongge.png +0 -0
  172. package/src/assets/images/login/login-bg.png +0 -0
  173. package/src/assets/images/login/logo.svg +16 -0
  174. package/src/assets/images/netError.png +0 -0
  175. package/src/assets/images/sceneDefaultBg.jpg +0 -0
  176. package/src/assets/images/starEmpty.png +0 -0
  177. package/src/assets/images/turntable_circle.png +0 -0
  178. package/src/assets/images/yatop-logo.png +0 -0
  179. package/src/assets/less/animation.less +116 -0
  180. package/src/assets/less/common.less +715 -0
  181. package/src/assets/less/index.less +9 -0
  182. package/src/assets/less/reset.less +295 -0
  183. package/src/assets/less/scroll.less +28 -0
  184. package/src/assets/less/var.less +74 -0
  185. package/src/assets/less/yt-ui-cover.less +12 -0
  186. package/src/assets/svg/1th.svg +27 -0
  187. package/src/assets/svg/2th.svg +27 -0
  188. package/src/assets/svg/3th.svg +23 -0
  189. package/src/assets/svg/activity.svg +45 -0
  190. package/src/assets/svg/activityCount.svg +43 -0
  191. package/src/assets/svg/activityCoverCount.svg +40 -0
  192. package/src/assets/svg/activityNum.svg +39 -0
  193. package/src/assets/svg/app.svg +55 -0
  194. package/src/assets/svg/bit.svg +11 -0
  195. package/src/assets/svg/bizline-active.svg +1 -0
  196. package/src/assets/svg/bizline.svg +1 -0
  197. package/src/assets/svg/channel.svg +37 -0
  198. package/src/assets/svg/chart-empty.svg +1 -0
  199. package/src/assets/svg/content-error.svg +1 -0
  200. package/src/assets/svg/content-loading.svg +1 -0
  201. package/src/assets/svg/custmoer-list.svg +1 -0
  202. package/src/assets/svg/empty.svg +30 -0
  203. package/src/assets/svg/empty_2.svg +28 -0
  204. package/src/assets/svg/equity.svg +39 -0
  205. package/src/assets/svg/event.svg +38 -0
  206. package/src/assets/svg/group.svg +24 -0
  207. package/src/assets/svg/labelCount.svg +34 -0
  208. package/src/assets/svg/line-center.svg +19 -0
  209. package/src/assets/svg/line-left.svg +19 -0
  210. package/src/assets/svg/menu-active.svg +1 -0
  211. package/src/assets/svg/menu.svg +1 -0
  212. package/src/assets/svg/message.svg +36 -0
  213. package/src/assets/svg/monitoring-icon.svg +1 -0
  214. package/src/assets/svg/org-active.svg +1 -0
  215. package/src/assets/svg/org.svg +1 -0
  216. package/src/assets/svg/product.svg +41 -0
  217. package/src/assets/svg/scene-share.svg +22 -0
  218. package/src/assets/svg/status-running.svg +19 -0
  219. package/src/assets/svg/status-stop.svg +16 -0
  220. package/src/assets/svg/template.svg +40 -0
  221. package/src/bus.js +3 -0
  222. package/src/components/Editor.vue +108 -0
  223. package/src/components/attachment-approval/assets/svg/file-icon-jpg.svg +1 -0
  224. package/src/components/attachment-approval/assets/svg/file-icon-pdf.svg +1 -0
  225. package/src/components/attachment-approval/assets/svg/file-icon-png.svg +1 -0
  226. package/src/components/attachment-approval/assets/svg/file-icon-word.svg +1 -0
  227. package/src/components/attachment-approval/assets/svg/upload-icon.svg +1 -0
  228. package/src/components/attachment-approval/attachment-approval-dialog.vue +240 -0
  229. package/src/components/attachment-approval/attachment-approval-item.vue +88 -0
  230. package/src/components/attachment-approval/attachment-approval.js +68 -0
  231. package/src/components/attachment-approval/attachment-approval.vue +124 -0
  232. package/src/components/channel-components-config/channel-class-rule.vue +54 -0
  233. package/src/components/channel-components-config/channel-fields.vue +0 -0
  234. package/src/components/channel-components-config/channel-reach-temp.vue +0 -0
  235. package/src/components/channel-components-config/channel-select-url-dialog.vue +145 -0
  236. package/src/components/channel-components-config/channel-select.vue +184 -0
  237. package/src/components/channel-components-config/channel-switch.vue +69 -0
  238. package/src/components/channel-components-config/channel-text.vue +75 -0
  239. package/src/components/channel-components-config/channel-time-range-picker.vue +100 -0
  240. package/src/components/channel-components-config/channel-time.vue +62 -0
  241. package/src/components/channel-components-config/channel-timerange.vue +67 -0
  242. package/src/components/channel-components-config/channel-turnover.vue +51 -0
  243. package/src/components/channel-components-config/configs.js +13 -0
  244. package/src/components/channel-components-config/field-key.vue +40 -0
  245. package/src/components/channel-components-view/channel-class-rule.vue +44 -0
  246. package/src/components/channel-components-view/channel-fields.vue +0 -0
  247. package/src/components/channel-components-view/channel-reach-temp.vue +57 -0
  248. package/src/components/channel-components-view/channel-select.vue +55 -0
  249. package/src/components/channel-components-view/channel-switch.vue +53 -0
  250. package/src/components/channel-components-view/channel-text.vue +72 -0
  251. package/src/components/channel-components-view/channel-time.vue +62 -0
  252. package/src/components/channel-components-view/channel-timerange.vue +113 -0
  253. package/src/components/channel-components-view/channel-turnover.vue +57 -0
  254. package/src/components/channel-params-loading.vue +100 -0
  255. package/src/components/chart/resize.js +55 -0
  256. package/src/components/chart/the-chart.vue +68 -0
  257. package/src/components/creator-select/index.vue +119 -0
  258. package/src/components/customer-explore-select/index.vue +248 -0
  259. package/src/components/customer-label-select/index.vue +184 -0
  260. package/src/components/customer-loading.vue +238 -0
  261. package/src/components/dynamic-components/form-date.vue +28 -0
  262. package/src/components/dynamic-components/form-input-number.vue +30 -0
  263. package/src/components/dynamic-components/form-input.vue +30 -0
  264. package/src/components/dynamic-components/form-multiple-select.vue +33 -0
  265. package/src/components/dynamic-components/form-select.vue +37 -0
  266. package/src/components/dynamic-components/form-time-picker.vue +28 -0
  267. package/src/components/ellipsisText.vue +45 -0
  268. package/src/components/empty.vue +22 -0
  269. package/src/components/event-edit/event-edit.vue +83 -0
  270. package/src/components/event-edit/index.js +3 -0
  271. package/src/components/form-img/form-img.vue +82 -0
  272. package/src/components/form-img/index.js +3 -0
  273. package/src/components/h5-editor.vue +344 -0
  274. package/src/components/image-selector/index.js +3 -0
  275. package/src/components/image-selector/main.vue +239 -0
  276. package/src/components/member-select.vue +89 -0
  277. package/src/components/product-select-dialog/index.vue +237 -0
  278. package/src/components/radio-table.vue +97 -0
  279. package/src/components/search-select.vue +150 -0
  280. package/src/components/split-panel/index.js +2 -0
  281. package/src/components/split-panel/index.less +114 -0
  282. package/src/components/split-panel/split.vue +159 -0
  283. package/src/components/split-panel/trigger.vue +43 -0
  284. package/src/components/system-layout.vue +88 -0
  285. package/src/components/tag-editor.vue +262 -0
  286. package/src/components/temp-content/channel-return-dialog.vue +227 -0
  287. package/src/components/temp-content/event-dialog.vue +298 -0
  288. package/src/components/temp-content/functions.js +47 -0
  289. package/src/components/temp-content/index.vue +378 -0
  290. package/src/components/temp-content/label-dialog.vue +291 -0
  291. package/src/components/temp-content/product-dialog.vue +268 -0
  292. package/src/components/temp-content/product-select-dialog.vue +225 -0
  293. package/src/components/temp-content/temp-content-preview.vue +221 -0
  294. package/src/components/temp-selector.vue +83 -0
  295. package/src/components/transform/download-act-btn.vue +245 -0
  296. package/src/components/transform/download-btn.vue +198 -0
  297. package/src/components/transform/uploader-btn.vue +143 -0
  298. package/src/components/transform/uploaderOptions.js +8 -0
  299. package/src/components/transform/utils/computeMD5.js +61 -0
  300. package/src/components/tree-select.vue +371 -0
  301. package/src/components/yt-editor.vue +303 -0
  302. package/src/components/yt-org/1.json +11720 -0
  303. package/src/components/yt-org/data.js +159 -0
  304. package/src/components/yt-org/index.js +3 -0
  305. package/src/components/yt-org/main.vue +143 -0
  306. package/src/components/yt-table-download.vue +226 -0
  307. package/src/components/yt-/342/200/216questionnaire/index.js +3 -0
  308. package/src/components/yt-/342/200/216questionnaire/main.vue +422 -0
  309. package/src/directive/common.js +8 -0
  310. package/src/directive/directives.js +13 -0
  311. package/src/directive/yt-dialog-drag/index.js +3 -0
  312. package/src/directive/yt-dialog-drag/yt-dialog-drag.js +88 -0
  313. package/src/directive/yt-hover/base.js +106 -0
  314. package/src/directive/yt-hover/index.js +14 -0
  315. package/src/hooks/index.js +1 -0
  316. package/src/hooks/system.js +18 -0
  317. package/src/icons/index.js +3 -0
  318. package/src/icons/resource/empty.png +0 -0
  319. package/src/icons/resource/icon.png +0 -0
  320. package/src/icons/resource/icon2.png +0 -0
  321. package/src/icons/resource/image.png +0 -0
  322. package/src/icons/svg/analysis-logo.svg +1 -0
  323. package/src/icons/svg/btn-export.svg +1 -0
  324. package/src/icons/svg/channel-class-rule.svg +1 -0
  325. package/src/icons/svg/channel-fields.svg +1 -0
  326. package/src/icons/svg/channel-reach-temp.svg +1 -0
  327. package/src/icons/svg/channel-select.svg +1 -0
  328. package/src/icons/svg/channel-switch.svg +1 -0
  329. package/src/icons/svg/channel-text.svg +1 -0
  330. package/src/icons/svg/channel-time.svg +1 -0
  331. package/src/icons/svg/channel-timerange.svg +1 -0
  332. package/src/icons/svg/channel-turnover.svg +1 -0
  333. package/src/icons/svg/earlyTermination.svg +20 -0
  334. package/src/icons/svg/equity-active.svg +1 -0
  335. package/src/icons/svg/equity.svg +1 -0
  336. package/src/icons/svg/event-file.svg +1 -0
  337. package/src/icons/svg/event-tree-icon.svg +1 -0
  338. package/src/icons/svg/finish.svg +20 -0
  339. package/src/icons/svg/full-screen.svg +12 -0
  340. package/src/icons/svg/monitoring-operate1.svg +1 -0
  341. package/src/icons/svg/monitoring-operate2.svg +1 -0
  342. package/src/icons/svg/monitoring-operate3.svg +1 -0
  343. package/src/icons/svg/more.svg +12 -0
  344. package/src/icons/svg/publish.svg +1 -0
  345. package/src/icons/svg/running.svg +20 -0
  346. package/src/icons/svg/scene-add.svg +1 -0
  347. package/src/icons/svg/scene-edit.svg +1 -0
  348. package/src/icons/svg/scene-sub.svg +1 -0
  349. package/src/icons/svg/tree-add.svg +1 -0
  350. package/src/icons/svg/tree-del.svg +1 -0
  351. package/src/icons/svg/tree-down.svg +1 -0
  352. package/src/icons/svg/tree-edit.svg +1 -0
  353. package/src/icons/svg/tree-file.svg +1 -0
  354. package/src/icons/svg/tree-refresh.svg +1 -0
  355. package/src/icons/svg/tree-up.svg +1 -0
  356. package/src/icons/svgo.yml +21 -0
  357. package/src/layout/layout-chrome-nav.vue +420 -0
  358. package/src/layout/layout-header.vue +393 -0
  359. package/src/layout/layout-nav.vue +583 -0
  360. package/src/layout/layout-side1.vue +290 -0
  361. package/src/layout/layout-water.vue +75 -0
  362. package/src/layout/layout.vue +610 -0
  363. package/src/layout/my-keep-alive.js +178 -0
  364. package/src/libs/yt-ui/index.js +9 -0
  365. package/src/main.js +149 -0
  366. package/src/micro-app.js +113 -0
  367. package/src/public-path.js +9 -0
  368. package/src/router/analysis.js +21 -0
  369. package/src/router/brief-report.js +13 -0
  370. package/src/router/channel.js +22 -0
  371. package/src/router/controlCenter.js +39 -0
  372. package/src/router/customer.js +367 -0
  373. package/src/router/event-center.js +409 -0
  374. package/src/router/gift.js +31 -0
  375. package/src/router/h5-lucky-draw.js +183 -0
  376. package/src/router/index.js +164 -0
  377. package/src/router/market-activity.js +31 -0
  378. package/src/router/market.js +499 -0
  379. package/src/router/monitoring-center.js +39 -0
  380. package/src/router/oa.js +41 -0
  381. package/src/router/process.js +58 -0
  382. package/src/router/productCenter.js +60 -0
  383. package/src/router/reach-center.js +349 -0
  384. package/src/router/report.js +274 -0
  385. package/src/router/scene.js +64 -0
  386. package/src/router/system.js +147 -0
  387. package/src/router/task.js +13 -0
  388. package/src/router/template.js +161 -0
  389. package/src/sensors.js +22 -0
  390. package/src/store/index.js +364 -0
  391. package/src/store/modules/common.js +37 -0
  392. package/src/store/modules/customerExplore.js +24 -0
  393. package/src/store/modules/market.js +31 -0
  394. package/src/store/modules/nav.js +97 -0
  395. package/src/store/variables.js +87 -0
  396. package/src/styles/common.less +4 -0
  397. package/src/styles/el-custom.less +106 -0
  398. package/src/styles/index.less +4 -0
  399. package/src/styles/tailwind.less +34 -0
  400. package/src/styles/yt-custom.less +31 -0
  401. package/src/utils/ajax.js +377 -0
  402. package/src/utils/auth.js +18 -0
  403. package/src/utils/buildHTML.js +194 -0
  404. package/src/utils/charts.js +51 -0
  405. package/src/utils/clickoutside.js +58 -0
  406. package/src/utils/copyLink.js +18 -0
  407. package/src/utils/deepClone.js +71 -0
  408. package/src/utils/dom.js +194 -0
  409. package/src/utils/encrypt.js +113 -0
  410. package/src/utils/getOptions.js +35 -0
  411. package/src/utils/htmlToPdf.js +56 -0
  412. package/src/utils/image.js +24 -0
  413. package/src/utils/index.js +786 -0
  414. package/src/utils/monitor.js +57 -0
  415. package/src/utils/repeatApi.js +39 -0
  416. package/src/utils/setProfile.js +21 -0
  417. package/src/utils/user.js +34 -0
  418. package/src/utils/variable.js +503 -0
  419. package/src/utils/xml.js +133 -0
  420. package/src/views/404.vue +96 -0
  421. package/src/views/abnormal-activity/index.vue +120 -0
  422. package/src/views/allocation-rule/common.js +12 -0
  423. package/src/views/allocation-rule/components/attr-select.vue +89 -0
  424. package/src/views/allocation-rule/index.vue +283 -0
  425. package/src/views/analysis/activity/Detail.vue +375 -0
  426. package/src/views/analysis/activity/Effect.vue +349 -0
  427. package/src/views/analysis/activity/Overview.vue +339 -0
  428. package/src/views/analysis/activity/index.vue +93 -0
  429. package/src/views/analysis/index.vue +12 -0
  430. package/src/views/analysis/utils.js +40 -0
  431. package/src/views/blank.vue +88 -0
  432. package/src/views/briefReportNew/components/bar-card.vue +110 -0
  433. package/src/views/briefReportNew/components/progress-list.vue +66 -0
  434. package/src/views/briefReportNew/components/tab-content.vue +179 -0
  435. package/src/views/briefReportNew/components/table-list.vue +102 -0
  436. package/src/views/briefReportNew/components/target-card.vue +75 -0
  437. package/src/views/briefReportNew/components/the-pending-table.vue +71 -0
  438. package/src/views/briefReportNew/components/the-pengding-progress.vue +75 -0
  439. package/src/views/briefReportNew/config/option.js +20 -0
  440. package/src/views/briefReportNew/index.vue +221 -0
  441. package/src/views/channel/avoidDisturb/avoid-disturb-range-picker.vue +49 -0
  442. package/src/views/channel/avoidDisturb/cstRange.vue +89 -0
  443. package/src/views/channel/avoidDisturb/index.vue +703 -0
  444. package/src/views/channel/channel-side.vue +354 -0
  445. package/src/views/channel/format.js +72 -0
  446. package/src/views/channel/index.vue +535 -0
  447. package/src/views/channel-components/components/component-left.vue +525 -0
  448. package/src/views/channel-components/components/component-view-item.vue +70 -0
  449. package/src/views/channel-components/components/components-configs.vue +104 -0
  450. package/src/views/channel-components/components/components-content.vue +288 -0
  451. package/src/views/channel-components/components/content-comp-dialog.vue +157 -0
  452. package/src/views/channel-components/config.js +273 -0
  453. package/src/views/channel-components/edit.vue +289 -0
  454. package/src/views/channel-components/index.vue +210 -0
  455. package/src/views/channel-components/util.js +20 -0
  456. package/src/views/controlCenter/chart-line.vue +64 -0
  457. package/src/views/controlCenter/chartOption.js +321 -0
  458. package/src/views/controlCenter/common-label.vue +48 -0
  459. package/src/views/controlCenter/content-card.vue +39 -0
  460. package/src/views/controlCenter/detail/channelDetail.vue +135 -0
  461. package/src/views/controlCenter/detail/eventDetail.vue +123 -0
  462. package/src/views/controlCenter/detail/labelDetail.vue +91 -0
  463. package/src/views/controlCenter/index.vue +146 -0
  464. package/src/views/controlCenter/label-card.vue +48 -0
  465. package/src/views/controlCenter/tab-content.vue +189 -0
  466. package/src/views/customer/app-act.vue +314 -0
  467. package/src/views/customer/bitmap/condition-save.vue +80 -0
  468. package/src/views/customer/bitmap/dialog.vue +129 -0
  469. package/src/views/customer/bitmap/loading-condition.vue +176 -0
  470. package/src/views/customer/bitmap/loading-log.vue +110 -0
  471. package/src/views/customer/bitmap/pre-loading.vue +241 -0
  472. package/src/views/customer/business-editor-tree.vue +309 -0
  473. package/src/views/customer/components/compound-tags-dialog.vue +141 -0
  474. package/src/views/customer/components/customer-to-group.vue +549 -0
  475. package/src/views/customer/components/reward-punishment.vue +106 -0
  476. package/src/views/customer/compound-tags.vue +231 -0
  477. package/src/views/customer/computed-tags/confirm-modal-new.vue +473 -0
  478. package/src/views/customer/computed-tags/confirm-modal.vue +116 -0
  479. package/src/views/customer/computed-tags/edit-modal-new.vue +512 -0
  480. package/src/views/customer/computed-tags/index.vue +290 -0
  481. package/src/views/customer/customer-ai-group-detail.vue +421 -0
  482. package/src/views/customer/customer-ai-group.vue +124 -0
  483. package/src/views/customer/customer-editor-header.vue +165 -0
  484. package/src/views/customer/customer-editor-list-multiple.vue +47 -0
  485. package/src/views/customer/customer-editor-list.vue +363 -0
  486. package/src/views/customer/customer-editor-org.vue +60 -0
  487. package/src/views/customer/customer-editor-save.vue +140 -0
  488. package/src/views/customer/customer-editor-tree-detail.vue +66 -0
  489. package/src/views/customer/customer-editor-tree.vue +457 -0
  490. package/src/views/customer/customer-get-from-group.vue +167 -0
  491. package/src/views/customer/customer-group-result-charts.vue +263 -0
  492. package/src/views/customer/customer-group-upload-detail.vue +211 -0
  493. package/src/views/customer/customer-group-upload-ext.vue +290 -0
  494. package/src/views/customer/customer-group-upload.vue +291 -0
  495. package/src/views/customer/customer-group.vue +521 -0
  496. package/src/views/customer/customer-judge-cst-group.vue +190 -0
  497. package/src/views/customer/customer-label-update-recycler.vue +151 -0
  498. package/src/views/customer/customer-label-update.vue +366 -0
  499. package/src/views/customer/customer-result-charts-detail.vue +387 -0
  500. package/src/views/customer/customer-result-charts.vue +264 -0
  501. package/src/views/customer/customer-result-checkbox.vue +58 -0
  502. package/src/views/customer/customer-result-fields-select-avyno.vue +298 -0
  503. package/src/views/customer/customer-result-fields-select-model.vue +241 -0
  504. package/src/views/customer/customer-result-fields-select-tab.vue +229 -0
  505. package/src/views/customer/customer-result-fields-select.vue +271 -0
  506. package/src/views/customer/customer-result-fields.vue +313 -0
  507. package/src/views/customer/customer-result-filter.vue +265 -0
  508. package/src/views/customer/customer-result.vue +499 -0
  509. package/src/views/customer/explore/customer-explore-detail.vue +421 -0
  510. package/src/views/customer/explore/customer-explore.vue +623 -0
  511. package/src/views/customer/explore/customer-twice-explore.vue +566 -0
  512. package/src/views/customer/growth-center.vue +156 -0
  513. package/src/views/customer/gruop/group-member.vue +338 -0
  514. package/src/views/customer/gruop/member-dialog.vue +179 -0
  515. package/src/views/customer/gruop/member-maintain.vue +241 -0
  516. package/src/views/customer/marketing-anti-disturbance.vue +199 -0
  517. package/src/views/customer/name-manage/index.vue +155 -0
  518. package/src/views/customer/name-manage/rule-name.vue +138 -0
  519. package/src/views/customer/personas/age-chart.vue +177 -0
  520. package/src/views/customer/personas/count-chart.vue +154 -0
  521. package/src/views/customer/personas/index.vue +220 -0
  522. package/src/views/customer/personas/level-chart.vue +143 -0
  523. package/src/views/customer/staff-center.vue +237 -0
  524. package/src/views/gift/gift-type-manage/gift-list-dialog.vue +115 -0
  525. package/src/views/gift/gift-type-manage/index.vue +85 -0
  526. package/src/views/gift/gift-type-manage/type-edit-dialog.vue +104 -0
  527. package/src/views/gift/gift-type-manage/type-select.vue +198 -0
  528. package/src/views/gift/gift-type-manage/type-table.vue +494 -0
  529. package/src/views/gift/gift-type-manage/type-tree.vue +333 -0
  530. package/src/views/gift/manage/index.vue +85 -0
  531. package/src/views/gift/manage/list/index.vue +545 -0
  532. package/src/views/gift/manage/pack/gift-select-dialog.vue +302 -0
  533. package/src/views/gift/manage/pack/gift-select.vue +201 -0
  534. package/src/views/gift/manage/pack/index.vue +583 -0
  535. package/src/views/gift/manage/pack/log-dialog.vue +294 -0
  536. package/src/views/gift/type/gift-list-dialog.vue +164 -0
  537. package/src/views/gift/type/gift-setting-dialog.vue +198 -0
  538. package/src/views/gift/type/index.vue +81 -0
  539. package/src/views/gift/type/type-edit-dialog.vue +109 -0
  540. package/src/views/gift/type/type-select.vue +184 -0
  541. package/src/views/gift/type/type-table.vue +482 -0
  542. package/src/views/gift/type/type-tree.vue +283 -0
  543. package/src/views/home-new/activity-data.vue +214 -0
  544. package/src/views/home-new/activity-strategy.vue +129 -0
  545. package/src/views/home-new/channel-data.vue +95 -0
  546. package/src/views/home-new/common/option.js +260 -0
  547. package/src/views/home-new/components/AnnoumcementDetail.vue +234 -0
  548. package/src/views/home-new/components/chart-container.vue +54 -0
  549. package/src/views/home-new/components/chart-parent.vue +111 -0
  550. package/src/views/home-new/components/chart-switch.vue +172 -0
  551. package/src/views/home-new/components/detail-card.vue +180 -0
  552. package/src/views/home-new/components/empty.vue +22 -0
  553. package/src/views/home-new/components/msg-card.vue +194 -0
  554. package/src/views/home-new/components/notice-card copy.vue +82 -0
  555. package/src/views/home-new/components/notice-card.vue +129 -0
  556. package/src/views/home-new/components/part-body.vue +36 -0
  557. package/src/views/home-new/components/ranking-list.vue +84 -0
  558. package/src/views/home-new/components/statistics-small-card.vue +70 -0
  559. package/src/views/home-new/components/tab-content.vue +168 -0
  560. package/src/views/home-new/index.vue +469 -0
  561. package/src/views/home-new/label-data.vue +271 -0
  562. package/src/views/home-new/list-data.vue +99 -0
  563. package/src/views/identify.vue +121 -0
  564. package/src/views/iframe/activity-detail-report.vue +31 -0
  565. package/src/views/iframe/analysis-activity-effectiveness.vue +31 -0
  566. package/src/views/iframe/analysis-activity-summary.vue +29 -0
  567. package/src/views/iframe/analysis-effectiveness-funnel.vue +29 -0
  568. package/src/views/iframe/analysis-market-effectiveness.vue +29 -0
  569. package/src/views/iframe/analysis-market-summary.vue +29 -0
  570. package/src/views/iframe/business-detail.vue +31 -0
  571. package/src/views/iframe/business-summary-account.vue +31 -0
  572. package/src/views/iframe/business-summary-branch.vue +31 -0
  573. package/src/views/iframe/business-summary-head.vue +31 -0
  574. package/src/views/iframe/business-summary-sub.vue +31 -0
  575. package/src/views/iframe/business-summary.vue +31 -0
  576. package/src/views/iframe/customer-purch-details.vue +31 -0
  577. package/src/views/iframe/customer-repurch-behavior.vue +31 -0
  578. package/src/views/iframe/product-sale-analysis.vue +31 -0
  579. package/src/views/iframe/product-sales-channel.vue +31 -0
  580. package/src/views/iframe/purch-product-detail.vue +31 -0
  581. package/src/views/iframe/self-analysis.vue +31 -0
  582. package/src/views/login/index.vue +184 -0
  583. package/src/views/login/login.less +97 -0
  584. package/src/views/market/act-type-setting/act-type-edit-dialog.vue +111 -0
  585. package/src/views/market/act-type-setting/act-type-select.vue +153 -0
  586. package/src/views/market/act-type-setting/act-type-table.vue +455 -0
  587. package/src/views/market/act-type-setting/act-type-tree.vue +235 -0
  588. package/src/views/market/act-type-setting/index.vue +71 -0
  589. package/src/views/market/business/components/add.vue +638 -0
  590. package/src/views/market/business/components/app-pop-template.vue +182 -0
  591. package/src/views/market/business/components/business-pause.vue +99 -0
  592. package/src/views/market/business/components/business-recover.vue +131 -0
  593. package/src/views/market/business/components/business-side-channel.vue +265 -0
  594. package/src/views/market/business/components/business-side-content.vue +503 -0
  595. package/src/views/market/business/components/business-side-customer.vue +257 -0
  596. package/src/views/market/business/components/business-side-detail.vue +305 -0
  597. package/src/views/market/business/components/business-side-opportunity-trigger.vue +427 -0
  598. package/src/views/market/business/components/util.js +379 -0
  599. package/src/views/market/business/index.vue +468 -0
  600. package/src/views/market/calculate/customer-group.vue +199 -0
  601. package/src/views/market/calculate/history-data.vue +457 -0
  602. package/src/views/market/calculate/index.vue +260 -0
  603. package/src/views/market/common/config.js +352 -0
  604. package/src/views/market/component-manage/index.vue +150 -0
  605. package/src/views/market/components/act-target.vue +548 -0
  606. package/src/views/market/components/activity-import-dialog.vue +115 -0
  607. package/src/views/market/components/channel-target.vue +204 -0
  608. package/src/views/market/components/corn-editor-dialog-new.vue +304 -0
  609. package/src/views/market/components/corn-editor.vue +115 -0
  610. package/src/views/market/components/cycle-setting.vue +321 -0
  611. package/src/views/market/components/event-group-selector.vue +140 -0
  612. package/src/views/market/components/event-template/apply-confirm.vue +56 -0
  613. package/src/views/market/components/event-template/index-origin.vue +357 -0
  614. package/src/views/market/components/event-template/index.vue +466 -0
  615. package/src/views/market/components/event-template/scene-template-index.vue +304 -0
  616. package/src/views/market/components/event-template/scene-template.vue +85 -0
  617. package/src/views/market/components/event-template/share-dialog.vue +111 -0
  618. package/src/views/market/components/event-template/template-item.vue +243 -0
  619. package/src/views/market/components/game-temp.vue +169 -0
  620. package/src/views/market/components/sub-activity-table.vue +173 -0
  621. package/src/views/market/components/target-run-time.vue +94 -0
  622. package/src/views/market/components/task-temp.vue +155 -0
  623. package/src/views/market/event/event-channel-status.vue +30 -0
  624. package/src/views/market/event/event-cycle.vue +773 -0
  625. package/src/views/market/event/event-delay.vue +102 -0
  626. package/src/views/market/event/event-log.vue +214 -0
  627. package/src/views/market/event/event-modify-dialog.vue +76 -0
  628. package/src/views/market/event/event-timeline.vue +80 -0
  629. package/src/views/market/event/event.vue +1226 -0
  630. package/src/views/market/event/lotteryManage.vue +602 -0
  631. package/src/views/market/external-act-manage/index.vue +329 -0
  632. package/src/views/market/group/group-analysis.vue +213 -0
  633. package/src/views/market/group/group-edit.vue +437 -0
  634. package/src/views/market/group/group-link.vue +127 -0
  635. package/src/views/market/group/group.vue +208 -0
  636. package/src/views/market/index.vue +441 -0
  637. package/src/views/market/lottery/creatActivity.vue +108 -0
  638. package/src/views/market/lottery/lotteryManage.vue +212 -0
  639. package/src/views/market/lottery/publish.vue +299 -0
  640. package/src/views/market/lottery/rewardTable.vue +310 -0
  641. package/src/views/market/lottery/uploadImage.vue +62 -0
  642. package/src/views/market/market-event-create/index.vue +371 -0
  643. package/src/views/market/market-event-create/market-event-base/cost-dialog.vue +103 -0
  644. package/src/views/market/market-event-create/market-event-base/costs-manager.vue +322 -0
  645. package/src/views/market/market-event-create/market-event-base/index.vue +947 -0
  646. package/src/views/market/market-event-create/market-event-detail/event-canvas.vue +1580 -0
  647. package/src/views/market/market-event-create/market-event-detail/event-main-btns.vue +1784 -0
  648. package/src/views/market/market-event-create/market-event-detail/event-main.vue +984 -0
  649. package/src/views/market/market-event-create/market-event-detail/index.vue +144 -0
  650. package/src/views/market/market-event-detail-pro/components/act-target-detail.vue +184 -0
  651. package/src/views/market/market-event-detail-pro/components/act-target.vue +273 -0
  652. package/src/views/market/market-event-detail-pro/components/test-group.vue +57 -0
  653. package/src/views/market/market-event-detail-pro/detail.json +218 -0
  654. package/src/views/market/market-event-detail-pro/event-canvas-detail.vue +826 -0
  655. package/src/views/market/market-event-detail-pro/event-detail-base.vue +765 -0
  656. package/src/views/market/market-event-detail-pro/event-detail-exam.vue +318 -0
  657. package/src/views/market/market-event-detail-pro/htmlGenerator/canvas.less +145 -0
  658. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/call.js +185 -0
  659. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/client.js +106 -0
  660. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/dynamic-channel.js +181 -0
  661. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/handbnk.js +120 -0
  662. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/phonebnk.js +166 -0
  663. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/sms.js +165 -0
  664. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/teleSalesPlat.js +150 -0
  665. package/src/views/market/market-event-detail-pro/htmlGenerator/channels/wechat.js +9 -0
  666. package/src/views/market/market-event-detail-pro/htmlGenerator/common.js +135 -0
  667. package/src/views/market/market-event-detail-pro/htmlGenerator/customer/activityCst.js +58 -0
  668. package/src/views/market/market-event-detail-pro/htmlGenerator/customer/composeCst.js +30 -0
  669. package/src/views/market/market-event-detail-pro/htmlGenerator/customer/cst.js +165 -0
  670. package/src/views/market/market-event-detail-pro/htmlGenerator/customer/flowCst.js +30 -0
  671. package/src/views/market/market-event-detail-pro/htmlGenerator/index.js +148 -0
  672. package/src/views/market/market-event-detail-pro/htmlGenerator/optionsApi.js +290 -0
  673. package/src/views/market/market-event-detail-pro/htmlGenerator/resources/activity.js +31 -0
  674. package/src/views/market/market-event-detail-pro/htmlGenerator/resources/content.js +237 -0
  675. package/src/views/market/market-event-detail-pro/htmlGenerator/resources/gift.js +72 -0
  676. package/src/views/market/market-event-detail-pro/htmlGenerator/resources/product.js +59 -0
  677. package/src/views/market/market-event-detail-pro/htmlGenerator/split/channel.js +17 -0
  678. package/src/views/market/market-event-detail-pro/htmlGenerator/split/channelBranch.js +103 -0
  679. package/src/views/market/market-event-detail-pro/htmlGenerator/split/customer.js +14 -0
  680. package/src/views/market/market-event-detail-pro/htmlGenerator/split/customerBranch.js +60 -0
  681. package/src/views/market/market-event-detail-pro/htmlGenerator/split/event.js +69 -0
  682. package/src/views/market/market-event-detail-pro/htmlGenerator/split/eventBranch.js +65 -0
  683. package/src/views/market/market-event-detail-pro/htmlGenerator/split/eventRespFlowBranchNoResp.js +5 -0
  684. package/src/views/market/market-event-detail-pro/htmlGenerator/split/eventRespFlowBranchResp.js +6 -0
  685. package/src/views/market/market-event-detail-pro/htmlGenerator/split/label.js +14 -0
  686. package/src/views/market/market-event-detail-pro/htmlGenerator/split/labelBranch.js +24 -0
  687. package/src/views/market/market-event-detail-pro/htmlGenerator/split/merge.js +20 -0
  688. package/src/views/market/market-event-detail-pro/htmlGenerator/split/random.js +29 -0
  689. package/src/views/market/market-event-detail-pro/htmlGenerator/split/randomBranch.js +22 -0
  690. package/src/views/market/market-event-detail-pro/htmlGenerator/time/waitEvent.js +123 -0
  691. package/src/views/market/market-event-detail-pro/htmlGenerator/time/waitFixTime.js +50 -0
  692. package/src/views/market/market-event-detail-pro/htmlGenerator/time/waitToTime.js +97 -0
  693. package/src/views/market/market-event-detail-pro/htmlGenerator/util.js +179 -0
  694. package/src/views/market/market-event-detail-pro/index.vue +373 -0
  695. package/src/views/market/market-event-detail-pro/market-event-approval-detail.vue +373 -0
  696. package/src/views/market/market-event-detail-pro/time/event-approve-time.vue +60 -0
  697. package/src/views/market/market-event-detail-pro/time/event-run-time.vue +89 -0
  698. package/src/views/market/market-event-detail-pro/time/event-watch-time.vue +99 -0
  699. package/src/views/market/market-event-edit/act-event.vue +675 -0
  700. package/src/views/market/market-event-edit/event-calc-btns.vue +107 -0
  701. package/src/views/market/market-event-edit/event-calc.vue +122 -0
  702. package/src/views/market/market-event-edit/event-canvas.vue +1593 -0
  703. package/src/views/market/market-event-edit/event-dialog-edit.vue +711 -0
  704. package/src/views/market/market-event-edit/event-main-btns.vue +1008 -0
  705. package/src/views/market/market-event-edit/event-main.vue +528 -0
  706. package/src/views/market/market-event-edit/event-publish-confirm.vue +47 -0
  707. package/src/views/market/market-event-edit/index.vue +62 -0
  708. package/src/views/market/market-event-edit/select/node-select-appact.vue +119 -0
  709. package/src/views/market/market-event-edit/select/node-select-channel-tag-ai.vue +192 -0
  710. package/src/views/market/market-event-edit/select/node-select-channel-tag.vue +242 -0
  711. package/src/views/market/market-event-edit/select/node-select-customer-ai-group.vue +113 -0
  712. package/src/views/market/market-event-edit/select/node-select-customer-detail.vue +196 -0
  713. package/src/views/market/market-event-edit/select/node-select-customer-group.vue +62 -0
  714. package/src/views/market/market-event-edit/select/node-select-customer.vue +105 -0
  715. package/src/views/market/market-event-edit/select/node-select-event.vue +123 -0
  716. package/src/views/market/market-event-edit/select/node-select-explore-group.vue +74 -0
  717. package/src/views/market/market-event-edit/select/node-select-explore.vue +86 -0
  718. package/src/views/market/market-event-edit/select/node-select-group.vue +884 -0
  719. package/src/views/market/market-event-edit/select/node-select-limit-time.vue +72 -0
  720. package/src/views/market/market-event-edit/select/node-select-maincontent-tag.vue +84 -0
  721. package/src/views/market/market-event-edit/select/node-select-message.vue +332 -0
  722. package/src/views/market/market-event-edit/select/node-select-questionnaire.vue +92 -0
  723. package/src/views/market/market-event-edit/select/node-select-suprecord.vue +97 -0
  724. package/src/views/market/market-event-edit/select/node-select-tag-customer.vue +210 -0
  725. package/src/views/market/market-event-edit/select/node-select-unique-customer.vue +83 -0
  726. package/src/views/market/market-event-edit/select/node-select.vue +280 -0
  727. package/src/views/market/market-event-edit/select/node-temp-detail.vue +88 -0
  728. package/src/views/market/market-event-edit/side/dialog-side.vue +87 -0
  729. package/src/views/market/market-event-edit/side/event-form.vue +837 -0
  730. package/src/views/market/market-event-edit/side/node-side-channel.vue +977 -0
  731. package/src/views/market/market-event-edit/side/node-side-content.vue +167 -0
  732. package/src/views/market/market-event-edit/side/node-side-customer.vue +425 -0
  733. package/src/views/market/market-event-edit/side/node-side-detail.vue +620 -0
  734. package/src/views/market/market-event-edit/side/node-side-event.vue +378 -0
  735. package/src/views/market/market-event-edit/side/node-side-merge-branch.vue +108 -0
  736. package/src/views/market/market-event-edit/side/node-side-merge-table.vue +149 -0
  737. package/src/views/market/market-event-edit/side/node-side-merge.vue +117 -0
  738. package/src/views/market/market-event-edit/side/node-side-strategy-branch-editor.vue +205 -0
  739. package/src/views/market/market-event-edit/side/node-side-strategy-branch.vue +286 -0
  740. package/src/views/market/market-event-edit/side/node-side-strategy-table.vue +210 -0
  741. package/src/views/market/market-event-edit/side/node-side-strategy.vue +200 -0
  742. package/src/views/market/market-event-edit/side/node-side-time-config.vue +45 -0
  743. package/src/views/market/market-event-edit/side/node-side-time.vue +126 -0
  744. package/src/views/market/market-event-edit/side/node-upload-customer-detail.vue +252 -0
  745. package/src/views/market/market-event-edit/side/qrcode-preview.vue +25 -0
  746. package/src/views/market/market-event-edit/time/event-approve-time.vue +58 -0
  747. package/src/views/market/market-event-edit/time/event-run-time.vue +88 -0
  748. package/src/views/market/market-event-edit/time/event-watch-time.vue +88 -0
  749. package/src/views/market/market-event-edit/util.js +1832 -0
  750. package/src/views/market/market-event-edit-pro/dialog/components/content-analysi-channel.vue +190 -0
  751. package/src/views/market/market-event-edit-pro/dialog/components/content-analysis-customer.vue +199 -0
  752. package/src/views/market/market-event-edit-pro/dialog/components/content-analysis-flow-branch.vue +170 -0
  753. package/src/views/market/market-event-edit-pro/dialog/components/content-analysis-flow.vue +168 -0
  754. package/src/views/market/market-event-edit-pro/dialog/components/content-analysis-waitEvent.vue +194 -0
  755. package/src/views/market/market-event-edit-pro/dialog/components/content-analysis-waitFixTime.vue +143 -0
  756. package/src/views/market/market-event-edit-pro/dialog/components/node-customer-list.vue +293 -0
  757. package/src/views/market/market-event-edit-pro/dialog/components/node-equity-list.vue +225 -0
  758. package/src/views/market/market-event-edit-pro/dialog/components/options.js +318 -0
  759. package/src/views/market/market-event-edit-pro/dialog/components/theEchartFunctional.vue +179 -0
  760. package/src/views/market/market-event-edit-pro/dialog/event-template-save.vue +93 -0
  761. package/src/views/market/market-event-edit-pro/dialog/fail-upload-list.vue +96 -0
  762. package/src/views/market/market-event-edit-pro/dialog/node-content-analysis.vue +86 -0
  763. package/src/views/market/market-event-edit-pro/dialog/node-content-error.vue +131 -0
  764. package/src/views/market/market-event-edit-pro/dialog/same-type-customer-list.vue +183 -0
  765. package/src/views/market/market-event-edit-pro/dialog/upload.vue +316 -0
  766. package/src/views/market/market-event-edit-pro/event-base.vue +594 -0
  767. package/src/views/market/market-event-edit-pro/event-calc-btns.vue +132 -0
  768. package/src/views/market/market-event-edit-pro/event-calc.vue +129 -0
  769. package/src/views/market/market-event-edit-pro/event-canvas.vue +1434 -0
  770. package/src/views/market/market-event-edit-pro/event-main-btns.vue +1187 -0
  771. package/src/views/market/market-event-edit-pro/event-main.vue +755 -0
  772. package/src/views/market/market-event-edit-pro/event-publish-confirm.vue +47 -0
  773. package/src/views/market/market-event-edit-pro/function/channel-func.js +18 -0
  774. package/src/views/market/market-event-edit-pro/function/getNodeForm.js +755 -0
  775. package/src/views/market/market-event-edit-pro/g6-config/behavior/active.js +35 -0
  776. package/src/views/market/market-event-edit-pro/g6-config/behavior/anchor-add-edge.js +536 -0
  777. package/src/views/market/market-event-edit-pro/g6-config/behavior/brush-select.js +266 -0
  778. package/src/views/market/market-event-edit-pro/g6-config/behavior/click-select.js +104 -0
  779. package/src/views/market/market-event-edit-pro/g6-config/behavior/copy-paste.js +317 -0
  780. package/src/views/market/market-event-edit-pro/g6-config/behavior/drag-canvas.js +167 -0
  781. package/src/views/market/market-event-edit-pro/g6-config/behavior/drag-node.js +518 -0
  782. package/src/views/market/market-event-edit-pro/g6-config/behavior/index.js +15 -0
  783. package/src/views/market/market-event-edit-pro/g6-config/behavior/key-delete.js +250 -0
  784. package/src/views/market/market-event-edit-pro/g6-config/behavior/paste.js +328 -0
  785. package/src/views/market/market-event-edit-pro/g6-config/behavior/search-node.js +72 -0
  786. package/src/views/market/market-event-edit-pro/g6-config/behavior/select-all.js +78 -0
  787. package/src/views/market/market-event-edit-pro/g6-config/behavior/template-use.js +51 -0
  788. package/src/views/market/market-event-edit-pro/g6-config/behavior/zoom-canvas.js +66 -0
  789. package/src/views/market/market-event-edit-pro/g6-config/common.js +84 -0
  790. package/src/views/market/market-event-edit-pro/g6-config/flow-line-readonly.js +59 -0
  791. package/src/views/market/market-event-edit-pro/g6-config/flow-line.js +306 -0
  792. package/src/views/market/market-event-edit-pro/g6-config/flow-node-readonly.js +171 -0
  793. package/src/views/market/market-event-edit-pro/g6-config/flow-node.js +420 -0
  794. package/src/views/market/market-event-edit-pro/g6-config/index.js +57 -0
  795. package/src/views/market/market-event-edit-pro/g6-config/plugins/AlignToolBar.js +369 -0
  796. package/src/views/market/market-event-edit-pro/g6-config/plugins/Base.js +65 -0
  797. package/src/views/market/market-event-edit-pro/g6-config/plugins/DefaultToolBar.js +425 -0
  798. package/src/views/market/market-event-edit-pro/g6-config/plugins/FullScreenToolBar.js +212 -0
  799. package/src/views/market/market-event-edit-pro/g6-config/plugins/Grid.js +66 -0
  800. package/src/views/market/market-event-edit-pro/g6-config/plugins/MenuToolBar.js +1858 -0
  801. package/src/views/market/market-event-edit-pro/g6-config/plugins/Minimap.js +510 -0
  802. package/src/views/market/market-event-edit-pro/g6-config/plugins/SearchToolBar.js +356 -0
  803. package/src/views/market/market-event-edit-pro/g6-config/plugins/ZoomToolBar.js +372 -0
  804. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignBottom.svg +12 -0
  805. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignCenter.svg +20 -0
  806. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignHorizontal.svg +12 -0
  807. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignLeft.svg +12 -0
  808. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignMiddle.svg +14 -0
  809. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignRight.svg +12 -0
  810. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignTop.svg +12 -0
  811. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/alignVertical.svg +12 -0
  812. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/beautify.svg +30 -0
  813. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/clear.svg +12 -0
  814. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/close.svg +12 -0
  815. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/detail.svg +20 -0
  816. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/download.svg +17 -0
  817. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/hide.svg +15 -0
  818. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/link.svg +17 -0
  819. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/more.svg +1 -0
  820. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/panorama.svg +10 -0
  821. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/redo.svg +11 -0
  822. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-allSelect.svg +14 -0
  823. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-copy.svg +24 -0
  824. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-del.svg +27 -0
  825. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-enable.svg +1 -0
  826. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-group.svg +15 -0
  827. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-paste.svg +25 -0
  828. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-stop.svg +1 -0
  829. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/rightClick-switch.svg +1 -0
  830. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/show.svg +15 -0
  831. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/template.svg +23 -0
  832. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/undo.svg +11 -0
  833. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/zoom-in.svg +12 -0
  834. package/src/views/market/market-event-edit-pro/g6-config/plugins/imgs/zoom-out.svg +12 -0
  835. package/src/views/market/market-event-edit-pro/g6-config/plugins/index.js +22 -0
  836. package/src/views/market/market-event-edit-pro/g6-config/plugins/util.js +6 -0
  837. package/src/views/market/market-event-edit-pro/g6-config/stack/index.js +111 -0
  838. package/src/views/market/market-event-edit-pro/g6-config/stack/linked-list.js +236 -0
  839. package/src/views/market/market-event-edit-pro/g6-config/stack/stack.js +61 -0
  840. package/src/views/market/market-event-edit-pro/index.vue +71 -0
  841. package/src/views/market/market-event-edit-pro/select/detail-test-run-customer.vue +252 -0
  842. package/src/views/market/market-event-edit-pro/select/endday-trigger-rule.vue +195 -0
  843. package/src/views/market/market-event-edit-pro/select/node-select-act-case-library.vue +283 -0
  844. package/src/views/market/market-event-edit-pro/select/node-select-act-gift-group-copy.vue +438 -0
  845. package/src/views/market/market-event-edit-pro/select/node-select-act-gift-group.vue +851 -0
  846. package/src/views/market/market-event-edit-pro/select/node-select-allocation-rule.vue +126 -0
  847. package/src/views/market/market-event-edit-pro/select/node-select-app-act-group.vue +84 -0
  848. package/src/views/market/market-event-edit-pro/select/node-select-appact.vue +120 -0
  849. package/src/views/market/market-event-edit-pro/select/node-select-call-name.vue +156 -0
  850. package/src/views/market/market-event-edit-pro/select/node-select-channel-tag-ai.vue +191 -0
  851. package/src/views/market/market-event-edit-pro/select/node-select-channel-tag-customer.vue +202 -0
  852. package/src/views/market/market-event-edit-pro/select/node-select-channel-tag.vue +341 -0
  853. package/src/views/market/market-event-edit-pro/select/node-select-content-act.vue +314 -0
  854. package/src/views/market/market-event-edit-pro/select/node-select-content-equity.vue +488 -0
  855. package/src/views/market/market-event-edit-pro/select/node-select-content-graphic-template-detail.vue +200 -0
  856. package/src/views/market/market-event-edit-pro/select/node-select-content-graphic-template.vue +118 -0
  857. package/src/views/market/market-event-edit-pro/select/node-select-content-pro.vue +412 -0
  858. package/src/views/market/market-event-edit-pro/select/node-select-content-tab.vue +409 -0
  859. package/src/views/market/market-event-edit-pro/select/node-select-content-temp-inside.vue +193 -0
  860. package/src/views/market/market-event-edit-pro/select/node-select-content-temp-outside.vue +268 -0
  861. package/src/views/market/market-event-edit-pro/select/node-select-customer-ai-group.vue +118 -0
  862. package/src/views/market/market-event-edit-pro/select/node-select-customer-detail.vue +195 -0
  863. package/src/views/market/market-event-edit-pro/select/node-select-customer-group-tag.vue +396 -0
  864. package/src/views/market/market-event-edit-pro/select/node-select-customer-group.vue +62 -0
  865. package/src/views/market/market-event-edit-pro/select/node-select-customer-import.vue +168 -0
  866. package/src/views/market/market-event-edit-pro/select/node-select-customer.vue +105 -0
  867. package/src/views/market/market-event-edit-pro/select/node-select-equity-adv.vue +119 -0
  868. package/src/views/market/market-event-edit-pro/select/node-select-event.vue +128 -0
  869. package/src/views/market/market-event-edit-pro/select/node-select-explore-group.vue +66 -0
  870. package/src/views/market/market-event-edit-pro/select/node-select-external-act-copy.vue +279 -0
  871. package/src/views/market/market-event-edit-pro/select/node-select-external-act.vue +228 -0
  872. package/src/views/market/market-event-edit-pro/select/node-select-group.vue +1129 -0
  873. package/src/views/market/market-event-edit-pro/select/node-select-label-group.vue +930 -0
  874. package/src/views/market/market-event-edit-pro/select/node-select-maincontent-tag.vue +84 -0
  875. package/src/views/market/market-event-edit-pro/select/node-select-message.vue +384 -0
  876. package/src/views/market/market-event-edit-pro/select/node-select-prod-adv.vue +115 -0
  877. package/src/views/market/market-event-edit-pro/select/node-select-prod-detail.vue +126 -0
  878. package/src/views/market/market-event-edit-pro/select/node-select-prod-pro-name.vue +345 -0
  879. package/src/views/market/market-event-edit-pro/select/node-select-strtg-name.vue +147 -0
  880. package/src/views/market/market-event-edit-pro/select/node-select-suprecord.vue +97 -0
  881. package/src/views/market/market-event-edit-pro/select/node-select-tag-customer.vue +162 -0
  882. package/src/views/market/market-event-edit-pro/select/node-select-unique-customer.vue +118 -0
  883. package/src/views/market/market-event-edit-pro/select/node-select.vue +462 -0
  884. package/src/views/market/market-event-edit-pro/select/node-side-channel-preview.vue +144 -0
  885. package/src/views/market/market-event-edit-pro/select/node-side-customer-group-detail.vue +20 -0
  886. package/src/views/market/market-event-edit-pro/select/node-side-wechat-sub.vue +99 -0
  887. package/src/views/market/market-event-edit-pro/select/node-temp-detail.vue +94 -0
  888. package/src/views/market/market-event-edit-pro/select/product-mix-mode-custom.vue +239 -0
  889. package/src/views/market/market-event-edit-pro/select/product-select-detail.vue +190 -0
  890. package/src/views/market/market-event-edit-pro/select/product-select.vue +166 -0
  891. package/src/views/market/market-event-edit-pro/select/realtime-trigger-rule.vue +257 -0
  892. package/src/views/market/market-event-edit-pro/side/act/node-side-act.vue +193 -0
  893. package/src/views/market/market-event-edit-pro/side/channels/channel-comp.js +616 -0
  894. package/src/views/market/market-event-edit-pro/side/channels/common.js +297 -0
  895. package/src/views/market/market-event-edit-pro/side/channels/dialog/channel-dynamic-select-dialog.vue +399 -0
  896. package/src/views/market/market-event-edit-pro/side/channels/dialog/channel-target.vue +140 -0
  897. package/src/views/market/market-event-edit-pro/side/channels/dialog/code-table.vue +110 -0
  898. package/src/views/market/market-event-edit-pro/side/channels/dialog/issue-fields-select.vue +91 -0
  899. package/src/views/market/market-event-edit-pro/side/channels/dialog/preview.vue +488 -0
  900. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-call.vue +388 -0
  901. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-client.vue +226 -0
  902. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-dynamic.vue +346 -0
  903. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-elecpin.vue +231 -0
  904. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-handbnk.vue +176 -0
  905. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-phonebnk.vue +478 -0
  906. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-sms.vue +486 -0
  907. package/src/views/market/market-event-edit-pro/side/channels/node-side-channel-wechat.vue +182 -0
  908. package/src/views/market/market-event-edit-pro/side/customer/node-side-activityCst.vue +255 -0
  909. package/src/views/market/market-event-edit-pro/side/customer/node-side-composeCst.vue +186 -0
  910. package/src/views/market/market-event-edit-pro/side/customer/node-side-customer.vue +606 -0
  911. package/src/views/market/market-event-edit-pro/side/customer/node-side-flowCst.vue +186 -0
  912. package/src/views/market/market-event-edit-pro/side/dialog-side.vue +550 -0
  913. package/src/views/market/market-event-edit-pro/side/equity/node-side-equity.vue +264 -0
  914. package/src/views/market/market-event-edit-pro/side/event-form.vue +992 -0
  915. package/src/views/market/market-event-edit-pro/side/merge/node-side-merge.vue +145 -0
  916. package/src/views/market/market-event-edit-pro/side/node-card-tips.vue +178 -0
  917. package/src/views/market/market-event-edit-pro/side/node-side-detail-scene.vue +392 -0
  918. package/src/views/market/market-event-edit-pro/side/node-side-detail.vue +853 -0
  919. package/src/views/market/market-event-edit-pro/side/node-side-strategy-branch-editor.vue +153 -0
  920. package/src/views/market/market-event-edit-pro/side/node-side-strategy-table.vue +270 -0
  921. package/src/views/market/market-event-edit-pro/side/node-side-time-config.vue +45 -0
  922. package/src/views/market/market-event-edit-pro/side/node-side-time.vue +125 -0
  923. package/src/views/market/market-event-edit-pro/side/node-upload-customer-detail.vue +214 -0
  924. package/src/views/market/market-event-edit-pro/side/node-upload-customer.vue +369 -0
  925. package/src/views/market/market-event-edit-pro/side/opportunity/node-side-opportunity-delay.vue +166 -0
  926. package/src/views/market/market-event-edit-pro/side/opportunity/node-side-opportunity-timer.vue +267 -0
  927. package/src/views/market/market-event-edit-pro/side/opportunity/node-side-opportunity-trigger.vue +814 -0
  928. package/src/views/market/market-event-edit-pro/side/resource/node-side-act.vue +194 -0
  929. package/src/views/market/market-event-edit-pro/side/resource/node-side-content.vue +679 -0
  930. package/src/views/market/market-event-edit-pro/side/resource/node-side-equity.vue +293 -0
  931. package/src/views/market/market-event-edit-pro/side/resource/node-side-prod.vue +227 -0
  932. package/src/views/market/market-event-edit-pro/side/split/node-side-merge.vue +141 -0
  933. package/src/views/market/market-event-edit-pro/side/split/node-side-split-channel-branch.vue +434 -0
  934. package/src/views/market/market-event-edit-pro/side/split/node-side-split-channel.vue +303 -0
  935. package/src/views/market/market-event-edit-pro/side/split/node-side-split-cst-branch.vue +241 -0
  936. package/src/views/market/market-event-edit-pro/side/split/node-side-split-cst.vue +187 -0
  937. package/src/views/market/market-event-edit-pro/side/split/node-side-split-evt-branch-new.vue +248 -0
  938. package/src/views/market/market-event-edit-pro/side/split/node-side-split-evt-branch-no-resp.vue +127 -0
  939. package/src/views/market/market-event-edit-pro/side/split/node-side-split-evt-branch-resp.vue +127 -0
  940. package/src/views/market/market-event-edit-pro/side/split/node-side-split-evt-branch.vue +757 -0
  941. package/src/views/market/market-event-edit-pro/side/split/node-side-split-evt-new.vue +873 -0
  942. package/src/views/market/market-event-edit-pro/side/split/node-side-split-evt.vue +169 -0
  943. package/src/views/market/market-event-edit-pro/side/split/node-side-split-label-branch.vue +242 -0
  944. package/src/views/market/market-event-edit-pro/side/split/node-side-split-label.vue +198 -0
  945. package/src/views/market/market-event-edit-pro/side/split/node-side-split-rdm-branch.vue +217 -0
  946. package/src/views/market/market-event-edit-pro/side/split/node-side-split-rdm.vue +200 -0
  947. package/src/views/market/market-event-edit-pro/time/event-approve-time.vue +60 -0
  948. package/src/views/market/market-event-edit-pro/time/event-run-time.vue +96 -0
  949. package/src/views/market/market-event-edit-pro/time/event-watch-time.vue +98 -0
  950. package/src/views/market/market-event-edit-pro/util.js +3877 -0
  951. package/src/views/market/marketing-anti-disturbance.vue +554 -0
  952. package/src/views/market/monitor/act-target-table.vue +123 -0
  953. package/src/views/market/monitor/card-item.vue +219 -0
  954. package/src/views/market/monitor/circulation-customer-list.vue +219 -0
  955. package/src/views/market/monitor/customer-list-extend.js +144 -0
  956. package/src/views/market/monitor/customer-list.vue +761 -0
  957. package/src/views/market/monitor/info-card.vue +160 -0
  958. package/src/views/market/monitor/monitor-base.vue +357 -0
  959. package/src/views/market/monitor/monitor-charts-analysis.vue +41 -0
  960. package/src/views/market/monitor/monitor-detail-customer-target-detail.vue +66 -0
  961. package/src/views/market/monitor/monitor-detail-customer.vue +445 -0
  962. package/src/views/market/monitor/monitor-detail.vue +90 -0
  963. package/src/views/market/monitor/monitor-info-cur.vue +193 -0
  964. package/src/views/market/monitor/monitor-info.vue +245 -0
  965. package/src/views/market/monitor/monitor.vue +261 -0
  966. package/src/views/market/monitor/summary/channel-analysis-search.vue +198 -0
  967. package/src/views/market/monitor/summary/channel-analysis.vue +38 -0
  968. package/src/views/market/monitor/summary/channel-table.vue +353 -0
  969. package/src/views/market/monitor/summary/common/option.js +191 -0
  970. package/src/views/market/monitor/summary/components/channel-analysis-chart.vue +738 -0
  971. package/src/views/market/monitor/summary/components/channel-task-done.vue +333 -0
  972. package/src/views/market/monitor/summary/components/chart-container.vue +56 -0
  973. package/src/views/market/monitor/summary/components/chart-funnel.vue +190 -0
  974. package/src/views/market/monitor/summary/components/chart-line.vue +64 -0
  975. package/src/views/market/monitor/summary/components/chart-parent.vue +71 -0
  976. package/src/views/market/monitor/summary/components/customer-list.vue +636 -0
  977. package/src/views/market/monitor/summary/components/detail-card.vue +167 -0
  978. package/src/views/market/monitor/summary/components/empty.vue +22 -0
  979. package/src/views/market/monitor/summary/components/label-analysis-improve.vue +708 -0
  980. package/src/views/market/monitor/summary/components/label-analysis-whole.vue +859 -0
  981. package/src/views/market/monitor/summary/components/options-common.js +35 -0
  982. package/src/views/market/monitor/summary/components/part-body.vue +29 -0
  983. package/src/views/market/monitor/summary/components/ranking-list.vue +160 -0
  984. package/src/views/market/monitor/summary/components/statistics-small-card.vue +143 -0
  985. package/src/views/market/monitor/summary/components/tab-content.vue +167 -0
  986. package/src/views/market/monitor/summary/components/target-customer-list.vue +277 -0
  987. package/src/views/market/monitor/summary/components/task-content.vue +103 -0
  988. package/src/views/market/monitor/summary/components/task-sort.vue +216 -0
  989. package/src/views/market/monitor/summary/index.vue +687 -0
  990. package/src/views/market/monitor/summary/select-checkbox.vue +116 -0
  991. package/src/views/market/monitor/summary/summary-analysis.vue +547 -0
  992. package/src/views/market/monitor/summary/summary-label-analysis.vue +180 -0
  993. package/src/views/market/monitor/summary/summary-label-process.vue +19 -0
  994. package/src/views/market/monitor/summary/summary-label-result.vue +490 -0
  995. package/src/views/market/monitor/summary/summary-line-wjf.vue +456 -0
  996. package/src/views/market/monitor/summary/summary-line.vue +300 -0
  997. package/src/views/market/monitor/summary/summary-table.vue +106 -0
  998. package/src/views/market/monitor/target-analysis.vue +383 -0
  999. package/src/views/market/monitor/target-customer-list.vue +403 -0
  1000. package/src/views/market/order/order-analysis-detail.vue +277 -0
  1001. package/src/views/market/order/order-analysis.vue +258 -0
  1002. package/src/views/market/order/order.vue +151 -0
  1003. package/src/views/market/remote-canvas.vue +76 -0
  1004. package/src/views/market/report/report-customer-branch.vue +147 -0
  1005. package/src/views/market/report/report-customer-detail-target.vue +100 -0
  1006. package/src/views/market/report/report-customer-detail.vue +120 -0
  1007. package/src/views/market/report/report-customer-sub.vue +163 -0
  1008. package/src/views/market/report/report-event-all.vue +182 -0
  1009. package/src/views/market/report/report-event-sub.vue +200 -0
  1010. package/src/views/market-activity/common/config.js +221 -0
  1011. package/src/views/market-activity/components/bar-card.vue +66 -0
  1012. package/src/views/market-activity/components/custom-date-picker.vue +214 -0
  1013. package/src/views/market-activity/components/switch-tabs.vue +101 -0
  1014. package/src/views/market-activity/components/tab-content.vue +166 -0
  1015. package/src/views/market-activity/config/constant.js +82 -0
  1016. package/src/views/market-activity/config/customer-result-checkbox.vue +58 -0
  1017. package/src/views/market-activity/config/customer-result-fields.vue +324 -0
  1018. package/src/views/market-activity/config/customer-result-filter.vue +265 -0
  1019. package/src/views/market-activity/config/customer-to-group.vue +530 -0
  1020. package/src/views/market-activity/config/empty.vue +22 -0
  1021. package/src/views/market-activity/config/ranking-list.vue +81 -0
  1022. package/src/views/market-activity/config/the-activity-table.vue +295 -0
  1023. package/src/views/market-activity/config/the-echart-functional.vue +176 -0
  1024. package/src/views/market-activity/config/the-effect-table.vue +572 -0
  1025. package/src/views/market-activity/config/the-grade-dialog.vue +415 -0
  1026. package/src/views/market-activity/config/the-indicator-drawer.less +34 -0
  1027. package/src/views/market-activity/config/the-indicator-drawer.vue +835 -0
  1028. package/src/views/market-activity/config/the-views-card.vue +105 -0
  1029. package/src/views/market-activity/config/the-views-effect.vue +320 -0
  1030. package/src/views/market-activity/config/the-views-level.vue +247 -0
  1031. package/src/views/market-activity/config/the-views-type.vue +82 -0
  1032. package/src/views/market-activity/index.vue +553 -0
  1033. package/src/views/market-activity/summary/abtest-analysys.vue +150 -0
  1034. package/src/views/market-activity/summary/channel-analysis-search.vue +193 -0
  1035. package/src/views/market-activity/summary/channel-analysis.vue +45 -0
  1036. package/src/views/market-activity/summary/channel-table.vue +375 -0
  1037. package/src/views/market-activity/summary/customer-list.vue +561 -0
  1038. package/src/views/market-activity/summary/index.vue +341 -0
  1039. package/src/views/market-activity/summary/market-event-edit-pro/event-canvas.vue +1337 -0
  1040. package/src/views/market-activity/summary/market-info.vue +281 -0
  1041. package/src/views/monitoring-center/forewarning/config/common.js +302 -0
  1042. package/src/views/monitoring-center/forewarning/config/index.vue +79 -0
  1043. package/src/views/monitoring-center/forewarning/config/tab-channel.vue +287 -0
  1044. package/src/views/monitoring-center/forewarning/config/tab-event.vue +252 -0
  1045. package/src/views/monitoring-center/forewarning/config/tab-label.vue +183 -0
  1046. package/src/views/monitoring-center/forewarning/config/tab-operate.vue +236 -0
  1047. package/src/views/monitoring-center/forewarning/config/tab-timeTask.vue +242 -0
  1048. package/src/views/monitoring-center/forewarning/record/index.vue +233 -0
  1049. package/src/views/monitoring-center/manage/common.js +909 -0
  1050. package/src/views/monitoring-center/manage/components/bg-intro.vue +34 -0
  1051. package/src/views/monitoring-center/manage/components/error-components-customer-detail.vue +111 -0
  1052. package/src/views/monitoring-center/manage/components/event-leakage-customer-detail.vue +133 -0
  1053. package/src/views/monitoring-center/manage/index.vue +54 -0
  1054. package/src/views/monitoring-center/manage/tab-channel.vue +433 -0
  1055. package/src/views/monitoring-center/manage/tab-event.vue +221 -0
  1056. package/src/views/monitoring-center/manage/tab-label.vue +232 -0
  1057. package/src/views/monitoring-center/manage/tab-operate.vue +501 -0
  1058. package/src/views/mul-activity-type/act-type-edit-dialog.vue +126 -0
  1059. package/src/views/mul-activity-type/index.vue +356 -0
  1060. package/src/views/oa/components/event-channel-approve.vue +75 -0
  1061. package/src/views/oa/index.vue +316 -0
  1062. package/src/views/oa/oa-confirm.vue +57 -0
  1063. package/src/views/oa/oa-detail.vue +609 -0
  1064. package/src/views/oa/oa-message.vue +254 -0
  1065. package/src/views/oa/progress-test.vue +13 -0
  1066. package/src/views/process/charts.vue +389 -0
  1067. package/src/views/process/index.vue +402 -0
  1068. package/src/views/process/pro-manage/index.vue +0 -0
  1069. package/src/views/process/pro-manage/pro-title.vue +56 -0
  1070. package/src/views/process/process-customer-log.vue +103 -0
  1071. package/src/views/process/process-customer.vue +189 -0
  1072. package/src/views/process/process-executor.vue +251 -0
  1073. package/src/views/process/process-org.vue +333 -0
  1074. package/src/views/process/process-risk.vue +232 -0
  1075. package/src/views/process/statistics.vue +159 -0
  1076. package/src/views/product/components/product-select-dialog.vue +253 -0
  1077. package/src/views/product/dialog/picture-upload.vue +139 -0
  1078. package/src/views/product/productMatchRules/components/groupList.vue +487 -0
  1079. package/src/views/product/productMatchRules/components/product-customer-to-group.vue +581 -0
  1080. package/src/views/product/productMatchRules/components/product-select-dialog-search.vue +227 -0
  1081. package/src/views/product/productMatchRules/components/product-select-dialog.vue +284 -0
  1082. package/src/views/product/productMatchRules/components/product-target-customer-list.vue +194 -0
  1083. package/src/views/product/productMatchRules/index.vue +804 -0
  1084. package/src/views/product/productMatchRules/intelligentMatching.vue +183 -0
  1085. package/src/views/product/productMatchRules/resource.js +329 -0
  1086. package/src/views/reach/business/add.vue +508 -0
  1087. package/src/views/reach/business/bannerjump.vue +362 -0
  1088. package/src/views/reach/business/businessCopy.vue +1017 -0
  1089. package/src/views/reach/business/businessDetail.vue +786 -0
  1090. package/src/views/reach/business/businessEdit.vue +1038 -0
  1091. package/src/views/reach/business/businessList.vue +466 -0
  1092. package/src/views/reach/business/businessNew.vue +1004 -0
  1093. package/src/views/reach/business/components/act-gift-group.vue +431 -0
  1094. package/src/views/reach/business/components/actList.vue +219 -0
  1095. package/src/views/reach/business/components/activitySelector.vue +439 -0
  1096. package/src/views/reach/business/components/common.js +45 -0
  1097. package/src/views/reach/business/components/external-act.vue +260 -0
  1098. package/src/views/reach/business/components/image-con-upload.js +34 -0
  1099. package/src/views/reach/business/components/image-con.vue +229 -0
  1100. package/src/views/reach/business/components/image-upload.vue +259 -0
  1101. package/src/views/reach/business/components/resource-side-customer-upload.vue +354 -0
  1102. package/src/views/reach/business/components/resource-side-reach-customer.vue +64 -0
  1103. package/src/views/reach/business/components/resource-state-picture-upload.vue +98 -0
  1104. package/src/views/reach/business/components/resourcedetail.vue +238 -0
  1105. package/src/views/reach/business/components/resourceformItem.vue +256 -0
  1106. package/src/views/reach/business/groupList.vue +396 -0
  1107. package/src/views/reach/business/index.vue +247 -0
  1108. package/src/views/reach/business/resource.js +330 -0
  1109. package/src/views/reach/resource/location-analyse.vue +239 -0
  1110. package/src/views/reach/resource/resource-analyse.vue +247 -0
  1111. package/src/views/reach/resource-state/add.vue +508 -0
  1112. package/src/views/reach/resource-state/bannerjump.vue +362 -0
  1113. package/src/views/reach/resource-state/components/act-gift-group.vue +431 -0
  1114. package/src/views/reach/resource-state/components/actList.vue +219 -0
  1115. package/src/views/reach/resource-state/components/activitySelector.vue +439 -0
  1116. package/src/views/reach/resource-state/components/common.js +45 -0
  1117. package/src/views/reach/resource-state/components/external-act.vue +260 -0
  1118. package/src/views/reach/resource-state/components/image-con-upload.js +34 -0
  1119. package/src/views/reach/resource-state/components/image-con.vue +229 -0
  1120. package/src/views/reach/resource-state/components/image-pop.vue +372 -0
  1121. package/src/views/reach/resource-state/components/image-upload.vue +259 -0
  1122. package/src/views/reach/resource-state/components/resource-side-customer-upload.vue +354 -0
  1123. package/src/views/reach/resource-state/components/resource-side-reach-customer.vue +64 -0
  1124. package/src/views/reach/resource-state/components/resource-state-picture-upload.vue +98 -0
  1125. package/src/views/reach/resource-state/components/resourceListHead.vue +250 -0
  1126. package/src/views/reach/resource-state/components/resourcecreate.vue +410 -0
  1127. package/src/views/reach/resource-state/components/resourcedetail.vue +409 -0
  1128. package/src/views/reach/resource-state/components/resourceformItem.vue +325 -0
  1129. package/src/views/reach/resource-state/groupList.vue +419 -0
  1130. package/src/views/reach/resource-state/index copy.vue +308 -0
  1131. package/src/views/reach/resource-state/index.vue +334 -0
  1132. package/src/views/reach/resource-state/resource.js +330 -0
  1133. package/src/views/reach/resource-state/resourceCopy.vue +1612 -0
  1134. package/src/views/reach/resource-state/resourceDetail.vue +1483 -0
  1135. package/src/views/reach/resource-state/resourceEdit.vue +1609 -0
  1136. package/src/views/reach/resource-state/resourceList.vue +555 -0
  1137. package/src/views/reach/resource-state/resourceNew copy.vue +1361 -0
  1138. package/src/views/reach/resource-state/resourceNew.vue +1499 -0
  1139. package/src/views/report/components/report-effect-monitor-fields.vue +234 -0
  1140. package/src/views/report/event/report-customer-branch.vue +228 -0
  1141. package/src/views/report/event/report-customer-detail-target.vue +113 -0
  1142. package/src/views/report/event/report-customer-detail.vue +149 -0
  1143. package/src/views/report/event/report-customer-sub.vue +258 -0
  1144. package/src/views/report/event/report-event-all.vue +250 -0
  1145. package/src/views/report/event/report-event-sub.vue +255 -0
  1146. package/src/views/report/event-effect-analysis/components/marketing-customer-detail-dialog.vue +137 -0
  1147. package/src/views/report/event-effect-analysis/event-effect-analysis-executor.vue +188 -0
  1148. package/src/views/report/event-effect-analysis/index.vue +53 -0
  1149. package/src/views/report/fieldsList.js +1162 -0
  1150. package/src/views/report/report-app-detail.vue +68 -0
  1151. package/src/views/report/report-app-month-detail.vue +67 -0
  1152. package/src/views/report/report-app-month.vue +151 -0
  1153. package/src/views/report/report-app.vue +175 -0
  1154. package/src/views/report/report-effect-monitor-customer.vue +236 -0
  1155. package/src/views/report/report-effect-monitor-default.vue +374 -0
  1156. package/src/views/report/report-effect-monitor-mechanism.vue +375 -0
  1157. package/src/views/report/report-effect-monitor-staff.vue +376 -0
  1158. package/src/views/report/report-effect-monitor.vue +69 -0
  1159. package/src/views/scene/scene-edit/event-main-btns.vue +1159 -0
  1160. package/src/views/scene/scene-edit/event-main.vue +900 -0
  1161. package/src/views/scene/scene-edit/index.vue +129 -0
  1162. package/src/views/scene/scene-library-manage/scene-center.vue +798 -0
  1163. package/src/views/scene/scene-library-manage/scene-log.vue +116 -0
  1164. package/src/views/scene/scene-library-manage/scene-mode-detail.vue +313 -0
  1165. package/src/views/scene/scene-library-manage/scene-quote.vue +148 -0
  1166. package/src/views/scene/scene-library-manage/scene-side.vue +362 -0
  1167. package/src/views/scene/scene-library-manage/scene-upload.vue +265 -0
  1168. package/src/views/scene/scene-personal-template/index.vue +457 -0
  1169. package/src/views/system/data-manage.vue +89 -0
  1170. package/src/views/system/menu/index.vue +359 -0
  1171. package/src/views/system/menu/system-menu-list.vue +270 -0
  1172. package/src/views/system/notice/index.vue +213 -0
  1173. package/src/views/system/notice/notice-dialog.vue +111 -0
  1174. package/src/views/system/productMatchRules/components/product-select-dialog.vue +219 -0
  1175. package/src/views/system/productMatchRules/index.vue +484 -0
  1176. package/src/views/system/productMatchRules/intelligentMatching.vue +183 -0
  1177. package/src/views/system/role/index.vue +247 -0
  1178. package/src/views/system/role/system-role-side.vue +267 -0
  1179. package/src/views/system/system-bitmap.vue +131 -0
  1180. package/src/views/system/system-bizline.vue +313 -0
  1181. package/src/views/system/system-configure.vue +288 -0
  1182. package/src/views/system/system-infomation.vue +479 -0
  1183. package/src/views/system/system-log.vue +96 -0
  1184. package/src/views/system/system-login.vue +150 -0
  1185. package/src/views/system/system-org.vue +363 -0
  1186. package/src/views/system/system-param.vue +356 -0
  1187. package/src/views/system/system-position-setting.vue +86 -0
  1188. package/src/views/system/system-position.vue +257 -0
  1189. package/src/views/system/system-sms.vue +146 -0
  1190. package/src/views/system/user/index.vue +259 -0
  1191. package/src/views/system/user/system-user-setting.vue +82 -0
  1192. package/src/views/task/visit-record.vue +205 -0
  1193. package/src/views/template/components/audio-upload.vue +171 -0
  1194. package/src/views/template/components/equity-list.vue +148 -0
  1195. package/src/views/template/components/game-add.vue +335 -0
  1196. package/src/views/template/components/gift-list.vue +149 -0
  1197. package/src/views/template/components/picture-upload.vue +166 -0
  1198. package/src/views/template/components/rewardTable.vue +323 -0
  1199. package/src/views/template/components/task-list.vue +184 -0
  1200. package/src/views/template/components/uploadImage.vue +67 -0
  1201. package/src/views/template/dialog/app-message.vue +226 -0
  1202. package/src/views/template/dialog/audio.vue +215 -0
  1203. package/src/views/template/dialog/fail-upload-list.vue +141 -0
  1204. package/src/views/template/dialog/h5.vue +234 -0
  1205. package/src/views/template/dialog/message-content.vue +138 -0
  1206. package/src/views/template/dialog/message.vue +472 -0
  1207. package/src/views/template/dialog/picture copy.vue +273 -0
  1208. package/src/views/template/dialog/picture.vue +304 -0
  1209. package/src/views/template/dialog/send-modal.vue +52 -0
  1210. package/src/views/template/dialog/task-message.vue +256 -0
  1211. package/src/views/template/dialog/upload.vue +253 -0
  1212. package/src/views/template/oa-fields-config/app-message.js +69 -0
  1213. package/src/views/template/oa-fields-config/audio.js +76 -0
  1214. package/src/views/template/oa-fields-config/computed-tags.js +28 -0
  1215. package/src/views/template/oa-fields-config/h5.js +98 -0
  1216. package/src/views/template/oa-fields-config/message.js +71 -0
  1217. package/src/views/template/oa-fields-config/picture.js +85 -0
  1218. package/src/views/template/template-activity/branch.vue +682 -0
  1219. package/src/views/template/template-activity/canvas-edit.vue +115 -0
  1220. package/src/views/template/template-activity/event-base-information.vue +498 -0
  1221. package/src/views/template/template-activity/event-base.vue +313 -0
  1222. package/src/views/template/template-activity/master.vue +755 -0
  1223. package/src/views/template/template-app-message.vue +477 -0
  1224. package/src/views/template/template-audio.vue +517 -0
  1225. package/src/views/template/template-game.vue +258 -0
  1226. package/src/views/template/template-h5.vue +468 -0
  1227. package/src/views/template/template-message.vue +563 -0
  1228. package/src/views/template/template-picture.vue +531 -0
  1229. package/src/views/template/template-task.vue +464 -0
  1230. package/src/views/template/template.less +28 -0
  1231. package/src/views/yunhu/employee-list.vue +190 -0
  1232. package/tailwind.config.js +25 -0
  1233. package/vue.config.js +341 -0
  1234. package/workspace.code-workspace +7 -0
@@ -0,0 +1,3877 @@
1
+ import {
2
+ getAppMessages,
3
+ getCounterList,
4
+ getManagerList, getMessages, getPosition
5
+ } from '@/api/market'
6
+ import {
7
+ formatDate
8
+ } from '@/utils'
9
+ import {
10
+ SCENE_USE, TEMP_STATE_ON, NODE_SAMPLE_TYPE_NUMBER
11
+ } from '@/utils/variable'
12
+ import getNodeForm from './function/getNodeForm'
13
+ import { saveAs } from 'file-saver' //2.0.5
14
+ import G from '@antv/g'
15
+ import { deepClone } from '@/utils/deepClone'
16
+ import { formatFullDateTime } from "@/utils";
17
+ import canvasStyle from '!!raw-loader!less-loader!@/views/market/market-event-detail-pro/htmlGenerator/canvas.less'
18
+ import { pick, cloneDeep, isEmpty } from 'lodash'
19
+ const NODE_TYPE_INTERFACE = {
20
+ event: 'com.yatop.act.executor.event.EventExecutor',
21
+ cst: 'com.yatop.act.executor.cst.CstExecutor',
22
+ strategy: 'com.yatop.act.executor.strategy.StrategyExecutor',
23
+ strategyBranch: 'com.nbcb.domain.executor.StrategyBranchExecutor',
24
+ channel: 'com.nbcb.domain.executor.ChannelExecutor'
25
+ }
26
+
27
+ const NODE_CHANNEL_INTERFACE = {
28
+ 1: 'com.yatop.act.executor.channel.SmsChannelExecutor', // 短信
29
+ 2: 'com.yatop.act.executor.channel.WxChannelExecutor', // 微信
30
+ 3: 'com.yatop.act.executor.channel.ShopChannelExecutor', // 网店
31
+ 4: 'com.yatop.act.executor.channel.ManagerChannelExecutor', // 客户经理
32
+ 5: 'com.yatop.act.executor.channel.CounterChannelExecutor' // 柜面
33
+ }
34
+
35
+ export const currency = value => {
36
+ if (value === null) {
37
+ return null
38
+ }
39
+ value = Number(value)
40
+ return Math.round(value * 100) / 100
41
+ }
42
+
43
+ // true: '1', false: '0'
44
+ export const boolToString = value => {
45
+ return value ? '1' : '0'
46
+ }
47
+
48
+ // '1': true, '0': false
49
+ export const stringToBoolean = value => {
50
+ return value === '1'
51
+ }
52
+ export const numberToString = value => {
53
+ if (value === null || value === undefined) {
54
+ return ''
55
+ }
56
+ return value + ''
57
+ }
58
+ export const menuList = [{
59
+ key: 'cst',
60
+ label: '名单'
61
+ },
62
+ {
63
+ key: 'activityCst',
64
+ label: '动态名单'
65
+ },
66
+ {
67
+ key: 'composeCst',
68
+ label: '组合名单'
69
+ },
70
+ {
71
+ key: 'flowCst',
72
+ label: '实时名单'
73
+ },
74
+ {
75
+ key: 'channel',
76
+ label: '渠道'
77
+ },
78
+ {
79
+ key: 'merge',
80
+ label: '客群汇聚'
81
+ },
82
+ {
83
+ key: 'labelFlow',
84
+ label: '按标签分流'
85
+ },
86
+ {
87
+ key: 'labelFlowBranch',
88
+ label: '按标签分流分支'
89
+ },
90
+ {
91
+ key: 'custFlow',
92
+ label: '按客群分流'
93
+ },
94
+ {
95
+ key: 'custFlowBranch',
96
+ label: '按客群分流分支'
97
+ },
98
+ {
99
+ key: 'evtRespFlow',
100
+ label: '按事件分流'
101
+ },
102
+ {
103
+ key: 'evtRespFlowBranch',
104
+ label: '按事件分流分支'
105
+ },
106
+ {
107
+ key: 'evtRespFlowBranchResp',
108
+ label: '响应'
109
+ },
110
+ {
111
+ key: 'evtRespFlowBranchNoResp',
112
+ label: '未响应'
113
+ },
114
+ {
115
+ key: 'chnlRespFlow',
116
+ label: '按渠道分流'
117
+ },
118
+ {
119
+ key: 'chnlRespFlowBranch',
120
+ label: '按渠道分流分支'
121
+ },
122
+ {
123
+ key: 'randomFlow',
124
+ label: '按随机分流'
125
+ },
126
+ {
127
+ key: 'randomFlowBranch',
128
+ label: '按随机分流分支'
129
+ },
130
+ {
131
+ key: 'waitFixTime',
132
+ label: '等待一定时间'
133
+ },
134
+ {
135
+ key: 'waitToTime',
136
+ label: '等待到某个时间'
137
+ },
138
+ {
139
+ key: 'waitEvent',
140
+ label: '等待某个事件发生'
141
+ },
142
+ {
143
+ key: 'sms',
144
+ label: '短信'
145
+ },
146
+ {
147
+ key: 'ebankApp',
148
+ label: '掌银APP'
149
+ },
150
+ {
151
+ key: 'appPush',
152
+ label: '手机银行APP_PUSH'
153
+ },
154
+ {
155
+ key: 'teleSalesPlat',
156
+ label: '电销平台'
157
+ },
158
+ {
159
+ key: 'intligCall',
160
+ label: '智能外呼'
161
+ },
162
+ {
163
+ key: 'manager',
164
+ label: '客户经理'
165
+ },
166
+ {
167
+ key: 'content',
168
+ label: '内容'
169
+ },
170
+ {
171
+ key: 'equity',
172
+ label: '权益'
173
+ },
174
+ {
175
+ key: 'act',
176
+ label: '活动'
177
+ },
178
+ {
179
+ key: 'prod',
180
+ label: '产品'
181
+ }
182
+ ]
183
+
184
+ export const getMenuNameByKey = (key) => {
185
+ let menu = menuList.find(menu => menu.key === key)
186
+ return menu ? menu.label : ''
187
+ }
188
+
189
+ export const stringToNumber = value => {
190
+ if (value === null) {
191
+ return null
192
+ }
193
+ return value ? +value : 0
194
+ }
195
+ // 清楚渠道响应分流假的选项
196
+ const clearChannelParams = (val) => {
197
+ if (val === 'noResp' || val === 'noTouch') {
198
+ return ''
199
+ } else {
200
+ return val
201
+ }
202
+ }
203
+ const changeEventDefineJson = (form) => {
204
+ let { childEventDefineJson, childEventJson, ruleItemCalcDesc, eventType } = form
205
+ let json = childEventJson
206
+ if (eventType === '02' && json) {
207
+ if (childEventDefineJson && childEventDefineJson.length) {
208
+ json.ruleItem.ruleItemDetailDesc = JSON.stringify(childEventDefineJson)
209
+ let calcDetailList = json.ruleItem.ruleItemDetail.map((i, index) => {
210
+ let obj = {}
211
+ let calcDesc = childEventDefineJson[index]
212
+ if (i.type === 1) {
213
+ obj = { ...i }
214
+ delete obj.expect
215
+ } else {
216
+ obj = {
217
+ ...i,
218
+ expect: (calcDesc.expectOne && calcDesc.expectTwo) ? `${calcDesc.expectOne},${calcDesc.expectTwo}` : (calcDesc.expectOne ? calcDesc.expectOne : '')
219
+ }
220
+ }
221
+ delete obj.expectOne
222
+ delete obj.expectTwo
223
+ return obj
224
+ })
225
+ json.ruleItem.ruleItemDetail = calcDetailList
226
+ }
227
+ if (ruleItemCalcDesc && ruleItemCalcDesc.length) {
228
+ json.ruleItem.ruleItemCalcDesc = JSON.stringify(ruleItemCalcDesc)
229
+ let calcList = json.ruleItem.ruleItemCalc.map((i, index) => {
230
+ let obj = {}
231
+ let calcDesc = ruleItemCalcDesc[index]
232
+ if (i.isRule) {
233
+ obj = { ...i }
234
+ } else {
235
+ obj = {
236
+ ...i,
237
+ expect: (calcDesc.expectOne && calcDesc.expectTwo) ? `${calcDesc.expectOne},${calcDesc.expectTwo}` : (calcDesc.expectOne ? calcDesc.expectOne : 0)
238
+ }
239
+ }
240
+ delete obj.expectOne
241
+ delete obj.expectTwo
242
+ return obj
243
+ })
244
+ json.ruleItem.ruleItemCalc = calcList
245
+ }
246
+ } else if (eventType === '01' && json) {
247
+ json.subeventBody = JSON.stringify(childEventDefineJson)
248
+ json.subeventSqlParams = getEeventSqlParams(childEventDefineJson)
249
+ } else {
250
+ return ''
251
+ }
252
+ return JSON.stringify(json)
253
+ }
254
+
255
+ const getEeventSqlParams = (list) => {
256
+ let attrPropsNew = {
257
+ name: 'name',
258
+ code: 'code',
259
+ symbolCode: 'symbolCode',
260
+ valueOne: 'valueOne',
261
+ valueTwo: 'valueTwo'
262
+ }
263
+ const attrList = list.filter((item) => !item.isRule);
264
+ let arr = [];
265
+ attrList.forEach((attr) => {
266
+ const symbolCode = attr[attrPropsNew['symbolCode']];
267
+ if (symbolCode && ['IS NOT NULL', 'IS NULL'].includes(symbolCode)) {
268
+ arr.push({ type: attr.attrType, value: '' });
269
+ } else if (symbolCode && symbolCode === 'ALL_FUZZY') {
270
+ arr.push({
271
+ type: attr.attrType,
272
+ value: attr[attrPropsNew['valueOne']] ? `%${attr[attrPropsNew['valueOne']]}%` : ''
273
+ });
274
+ } else if (symbolCode && symbolCode === 'AFTER_FUZZY') {
275
+ arr.push({
276
+ type: attr.attrType,
277
+ value: attr[attrPropsNew['valueOne']] ? `${attr[attrPropsNew['valueOne']]}%` : ''
278
+ });
279
+ } else if (symbolCode) {
280
+ arr.push({ type: attr.attrType, value: attr[attrPropsNew['valueOne']] });
281
+ if (symbolCode === 'IN')
282
+ arr.push({ type: attr.attrType, value: attr[attrPropsNew['valueTwo']] });
283
+ }
284
+ });
285
+ return JSON.stringify(arr);
286
+ }
287
+
288
+ // 未触达、未响应的响应结果字段赋值
289
+ export const transferChannelParams = (form, field) => {
290
+ let result = form[field]
291
+ switch (field) {
292
+ case 'reachStatus':
293
+ case 'isTeleviewInterview':
294
+ case 'callOutStat':
295
+ if (form.breachStat === '0000') {
296
+ result = 'noTouch'
297
+ }
298
+ break
299
+ case 'taskStatVal':
300
+ case 'custIntent':
301
+ if (form.respStat === '0') {
302
+ result = 'noResp'
303
+ }
304
+ break
305
+ default:
306
+ break
307
+ }
308
+ return result
309
+ }
310
+
311
+ // 【提交】获得后端的 interface,后端用,前端无用
312
+ const getInterface = (node) => {
313
+ let menuKey = node.menuKey
314
+ if (menuKey !== 'channel') {
315
+ return NODE_TYPE_INTERFACE[node.menuKey] || ''
316
+ } else {
317
+ let form = node.form
318
+ let value = form.type === '0' ? form.channel : form.useType
319
+ return NODE_CHANNEL_INTERFACE[value] || ''
320
+ }
321
+ }
322
+
323
+ const returnChanelCode=(form={})=>{
324
+ let arr = []
325
+ const keyMapping = form.keyMapping || new Map()
326
+ let newForm = {}
327
+ if (keyMapping.entries) {
328
+ for (const [key, value] of keyMapping.entries()) {
329
+ newForm[key] = form[value]
330
+ }
331
+ } else {
332
+ // 老数据不是map类型,需要兼容
333
+ newForm = {
334
+ ...form.keyMapping
335
+ }
336
+ }
337
+
338
+ const passList=['channelGroup1','models','undisturbTime','limitNode','limitPeriod','sendNow','endByActEndDate','compIocn','distributeRules','channelTargetData']
339
+ for(let key in newForm){
340
+ if(!passList.includes(key)) arr.push({paramCode:key,paramValue:newForm[key] || '', isModi: '1'})
341
+ if(key==='undisturbTime') arr.push({paramCode:key,paramValue:newForm[key]?JSON.stringify(newForm[key]):JSON.stringify([]),isModi: '1'})
342
+ if(key==='limitNode') arr.push({paramCode:key,paramValue:boolToString(newForm[key]),isModi: '1'})
343
+ if(key==='limitPeriod') arr.push({paramCode:key,paramValue:boolToString(newForm[key]),isModi: '1'})
344
+ if(key==='sendNow') arr.push({paramCode:key,paramValue:boolToString(newForm[key]),isModi: '1'})
345
+ if(key==='endByActEndDate') arr.push({paramCode:key,paramValue:boolToString(newForm[key]),isModi: '1'})
346
+ if(key==='distributeRules') arr.push({paramCode:key,paramValue:newForm[key]?JSON.stringify(newForm[key]):JSON.stringify([]),isModi: '1'})
347
+ if(key==='channelTargetData') arr.push({paramCode:key,paramValue:newForm[key]?JSON.stringify(newForm[key]):JSON.stringify([]),isModi: '1'})
348
+ // if(key==='componentFixedParameter') arr.push({paramCode:key,paramValue:newForm[key]?JSON.stringify(newForm[key]):JSON.stringify([])})
349
+ }
350
+ return arr
351
+ }
352
+ const returnIndependenceFlag=(form, node)=>{
353
+ const channelComp = JSON.parse(sessionStorage.getItem('channelComp'));
354
+ let channelCode = node.uniqueKey || node.channelGroup
355
+ let channelNode = channelComp.find((node) => node.componentCode === channelCode)
356
+ return String(channelNode.independenceFlag)
357
+ }
358
+ // 【提交】根据 form 转成成 数组
359
+ export const getParamsListByNode = (node, formatFullDateTime,detail) => {
360
+ let paramsList = []
361
+ let form = node.form
362
+ switch (node.menuKey) {
363
+ case 'channel':
364
+ paramsList = [
365
+ ...returnChanelCode(form),
366
+ {
367
+ paramCode: 'channelGroup1',
368
+ paramValue: form.channelGroup || node.channelGroup || node.uniqueKey
369
+ },
370
+ {
371
+ paramCode: 'models',
372
+ paramValue: node.models?JSON.stringify(node.models):''
373
+ },
374
+ {
375
+ paramCode: 'compIocn',
376
+ paramValue: node.icon?node.icon:''
377
+ },
378
+ {
379
+ paramCode: 'actReachChannelId',
380
+ paramValue: form.actReachChannelId
381
+ },
382
+ {
383
+ paramCode: 'actReachPassageId',
384
+ paramValue: form.actReachPassageId
385
+ },
386
+ {
387
+ paramCode: 'businessType',
388
+ paramValue: form.businessType
389
+ },
390
+ {
391
+ paramCode: 'reachChannelType',
392
+ paramValue: form.reachChannelType
393
+ },
394
+ {
395
+ paramCode: 'independenceFlag',
396
+ paramValue: returnIndependenceFlag(form, node)
397
+ }
398
+ ]
399
+ break
400
+ case 'cst':
401
+ paramsList = [{
402
+ paramCode: 'componentName',
403
+ paramValue: form.name || ''
404
+ },
405
+ {
406
+ paramCode: 'customerIntroduction',
407
+ paramValue: form.introduction || ''
408
+ },
409
+ {
410
+ paramCode: 'total',
411
+ paramValue: form.customerTagTotal || '0'
412
+ },
413
+ {
414
+ paramCode: 'customerGroupTag',
415
+ paramValue: JSON.stringify(form.customerGroupTag)
416
+ },
417
+ {
418
+ paramCode: 'customerGroupTagApp',
419
+ paramValue: JSON.stringify(form.customerGroupTagApp)
420
+ },
421
+ {
422
+ paramCode: 'customerGroupTagAI',
423
+ paramValue: JSON.stringify(form.customerGroupTagAI)
424
+ },
425
+ {
426
+ paramCode: 'exploreGroupTag',
427
+ paramValue: JSON.stringify(form.exploreGroupTag)
428
+ },
429
+ // 普通客户导入
430
+ {
431
+ paramCode: 'successCount',
432
+ paramValue: form.uploadGroup?.successCount || 0
433
+ },
434
+ {
435
+ paramCode: 'failCount',
436
+ paramValue: 0
437
+ // form.uploadGroup.failCount ||
438
+ },
439
+ {
440
+ paramCode: 'fileName',
441
+ paramValue: form.uploadGroup?.fileName
442
+ },
443
+ // 试运行客户导入
444
+ {
445
+ paramCode: 'successCountWhite',
446
+ paramValue: form.uploadGroupWhite?.successCount || 0
447
+ },
448
+ {
449
+ paramCode: 'failCountWhite',
450
+ paramValue: 0
451
+ // form.uploadGroupWhite.failCount ||
452
+ },
453
+ {
454
+ paramCode: 'fileNameWhite',
455
+ paramValue: form.uploadGroupWhite?.fileName
456
+ },
457
+ {
458
+ paramCode: 'cycleSetting',
459
+ paramValue: form.cycleSetting || ''
460
+ },
461
+ {
462
+ paramCode: 'cycleType',
463
+ paramValue: form.cycleType || ''
464
+ },
465
+ {
466
+ paramCode: 'execDay',
467
+ paramValue: form.execDay?form.execDay.join('_'):''
468
+ },
469
+ {
470
+ paramCode: 'cycleRange',
471
+ paramValue: form.cycleRange || ''
472
+ },
473
+ {
474
+ paramCode: 'customerGroupMember',
475
+ paramValue: form.customerGroupMember || 0
476
+ },
477
+ {
478
+ // 组合公式
479
+ paramCode: 'groupCompents',
480
+ paramValue: form.groupCompents || ''
481
+ },
482
+ {
483
+ paramCode: 'viewList',
484
+ paramValue: form.viewList ? JSON.stringify(form.viewList) : ''
485
+ },
486
+ // 后端使用,值传空字符串即可
487
+ {
488
+ paramCode: 'cstMd5',
489
+ paramValue: ''
490
+ },
491
+ {
492
+ paramCode: 'testRunCstKey',
493
+ paramValue: node.id || ''
494
+ },
495
+ {
496
+ paramCode: 'execTime',
497
+ paramValue: form.execTime ? formatFullDateTime(form.execTime) : null
498
+ },
499
+ {
500
+ paramCode: 'activityCstWaitLabelFlag',
501
+ paramValue: boolToString(form.activityCstWaitLabelFlag)
502
+ }
503
+ ]
504
+ break
505
+ case 'activityCst': // 动态名单
506
+ paramsList = [{
507
+ paramCode: 'componentName',
508
+ paramValue: form.name || ''
509
+ },
510
+ {
511
+ paramCode: 'cycleSetting',
512
+ paramValue: form.cycleSetting || ''
513
+ },
514
+ {
515
+ paramCode: 'cycleType',
516
+ paramValue: form.cycleType || ''
517
+ },
518
+ {
519
+ paramCode: 'execDay',
520
+ paramValue: form.execDay?form.execDay.join('_'):''
521
+ },
522
+ {
523
+ paramCode: 'cycleRange',
524
+ paramValue: form.cycleRange || ''
525
+ },
526
+ {
527
+ paramCode: 'customerGroupTag',
528
+ paramValue: JSON.stringify(form.customerGroupTag)
529
+ },
530
+ {
531
+ paramCode: 'groupCompents',
532
+ paramValue: form.groupCompents
533
+ },
534
+ // 后端使用,值传空字符串即可
535
+ {
536
+ paramCode: 'cstMd5',
537
+ paramValue: ''
538
+ },
539
+ {
540
+ paramCode: 'customerGroupMember',
541
+ paramValue: form.customerGroupMember || 0
542
+ }]
543
+ break
544
+ case 'flowCst': // 实时名单
545
+ paramsList = [{
546
+ paramCode: 'componentName',
547
+ paramValue: form.name || ''
548
+ },
549
+ {
550
+ paramCode: 'customerGroupTag',
551
+ paramValue: JSON.stringify(form.customerGroupTag)
552
+ },
553
+ {
554
+ paramCode: 'groupCompents',
555
+ paramValue: form.groupCompents
556
+ },
557
+ // 后端使用,值传空字符串即可
558
+ {
559
+ paramCode: 'cstMd5',
560
+ paramValue: ''
561
+ },
562
+ {
563
+ paramCode: 'customerGroupMember',
564
+ paramValue: form.customerGroupMember || 0
565
+ }]
566
+ break
567
+ case 'composeCst': // 组合名单
568
+ paramsList = [{
569
+ paramCode: 'componentName',
570
+ paramValue: form.name || ''
571
+ },
572
+ {
573
+ paramCode: 'customerGroupTag',
574
+ paramValue: JSON.stringify(form.customerGroupTag)
575
+ },
576
+ {
577
+ paramCode: 'groupCompents',
578
+ paramValue: form.groupCompents
579
+ },
580
+ // 后端使用,值传空字符串即可
581
+ {
582
+ paramCode: 'cstMd5',
583
+ paramValue: ''
584
+ },
585
+ {
586
+ paramCode: 'customerGroupMember',
587
+ paramValue: form.customerGroupMember || 0
588
+ }]
589
+ break
590
+ case 'labelFlow': // 标签分流
591
+ paramsList = [{
592
+ paramCode: 'componentName',
593
+ paramValue: form.name || ''
594
+ },
595
+ {
596
+ paramCode: 'exclutionType',
597
+ paramValue: boolToString(form.exclutionType)
598
+ },
599
+ {
600
+ paramCode: 'waitSpliteLabel',
601
+ paramValue: boolToString(form.waitSpliteLabel)
602
+ },
603
+ {
604
+ paramCode: 'stage',
605
+ paramValue: form.stage || ''
606
+ },
607
+ {
608
+ paramCode: 'labelIntroduction',
609
+ paramValue: form.introduction || ''
610
+ },
611
+ ]
612
+ // 添加分支行数据
613
+ let labelFlowBranchData = form.data.map((row, i) => {
614
+ return {
615
+ ...row,
616
+ order: i
617
+ }
618
+ })
619
+ paramsList.push({
620
+ paramCode: 'labelFlowBranchData',
621
+ paramValue: JSON.stringify(labelFlowBranchData)
622
+ })
623
+ break
624
+ case 'labelFlowBranch': // 标签分流分支
625
+ paramsList = [{
626
+ paramCode: 'componentName',
627
+ paramValue: form.name || ''
628
+ },
629
+ {
630
+ paramCode: 'rowId',
631
+ paramValue: form.rowId || ''
632
+ },
633
+ {
634
+ paramCode: 'hiddenDelete',
635
+ paramValue: boolToString(form.hiddenDelete)
636
+ },
637
+ {
638
+ paramCode: 'strategyGroup',
639
+ paramValue: JSON.stringify(form.strategyGroup) || null
640
+ },
641
+ {
642
+ paramCode: 'tempLabelText',
643
+ paramValue: JSON.stringify(form.tempLabelText) || null
644
+ }]
645
+ break
646
+ case 'custFlow': // 客群分流
647
+ paramsList = [{
648
+ paramCode: 'componentName',
649
+ paramValue: form.name || ''
650
+ },
651
+ {
652
+ paramCode: 'exclutionType',
653
+ paramValue: boolToString(form.exclutionType)
654
+ },
655
+ {
656
+ paramCode: 'custIntroduction',
657
+ paramValue: form.introduction || ''
658
+ },
659
+ ]
660
+ // 添加分支行数据
661
+ let custFlowBranchData = form.data.map((row, i) => {
662
+ return {
663
+ ...row,
664
+ order: i
665
+ }
666
+ })
667
+ paramsList.push({
668
+ paramCode: 'custFlowBranchData',
669
+ paramValue: JSON.stringify(custFlowBranchData)
670
+ })
671
+ break
672
+ case 'custFlowBranch': // 客群分流分支
673
+ paramsList = [{
674
+ paramCode: 'componentName',
675
+ paramValue: form.name || ''
676
+ },
677
+ {
678
+ paramCode: 'rowId',
679
+ paramValue: form.rowId || ''
680
+ },
681
+ {
682
+ paramCode: 'hiddenDelete',
683
+ paramValue: boolToString(form.hiddenDelete)
684
+ },
685
+ // {
686
+ // paramCode: 'strategyGroup',
687
+ // paramValue: JSON.stringify(form.strategyGroup) || null
688
+ // },
689
+ // {
690
+ // // 组合公式
691
+ // paramCode: 'groupCompents',
692
+ // paramValue: getCustomerGroupFunc((form.strategyGroup || []).length ? (form.strategyGroup[0].cstGroupStrategy || []) : [] ,'idCopy')
693
+ // }
694
+ {
695
+ paramCode: 'customerGroupTag',
696
+ paramValue: JSON.stringify(form.customerGroupTag)
697
+ },
698
+ {
699
+ paramCode: 'groupCompents',
700
+ paramValue: form.groupCompents
701
+ },
702
+ {
703
+ paramCode: 'customerGroupMember',
704
+ paramValue: form.customerGroupMember || 0
705
+ }
706
+ ]
707
+ break
708
+ case 'evtRespFlow': // 事件响应
709
+ paramsList = [{
710
+ paramCode: 'componentName',
711
+ paramValue: form.name || ''
712
+ },
713
+ {
714
+ paramCode: 'exclutionType',
715
+ paramValue: boolToString(form.exclutionType)
716
+ },
717
+ {
718
+ paramCode: 'evtRespIntroduction',
719
+ paramValue: form.introduction || ''
720
+ },
721
+ {
722
+ paramCode: 'rowId',
723
+ paramValue: form.rowId || ''
724
+ },
725
+ {
726
+ paramCode: 'limitNode',
727
+ paramValue: boolToString(form.limitNode)
728
+ },
729
+ {
730
+ paramCode: 'limitPeriod',
731
+ paramValue: boolToString(form.limitPeriod)
732
+ },
733
+ {
734
+ paramCode: 'limitCycleValue',
735
+ paramValue: form.limitCycleValue || ''
736
+ },
737
+ {
738
+ paramCode: 'limitCycleUnit',
739
+ paramValue: form.limitCycleUnit || ''
740
+ },
741
+ {
742
+ paramCode: 'custLimit',
743
+ paramValue: form.custLimit || ''
744
+ },
745
+ {
746
+ paramCode: 'eventType',
747
+ paramValue: form.eventType || ''
748
+ },
749
+ {
750
+ paramCode: 'eventName',
751
+ paramValue: form.eventName ? form.eventName.split(',')[0] : ''
752
+ },
753
+ {
754
+ paramCode: 'eventCodePreview',
755
+ paramValue: form.eventName ? form.eventName.split(',')[0] : ''
756
+ },
757
+ {
758
+ paramCode: 'childEventDefineJson',
759
+ paramValue: form.childEventDefineJson && form.childEventDefineJson.length ? JSON.stringify(form.childEventDefineJson) : '[]'
760
+ },
761
+ {
762
+ paramCode: 'ruleItemCalcDesc',
763
+ paramValue: form.ruleItemCalcDesc && form.ruleItemCalcDesc.length ? JSON.stringify(form.ruleItemCalcDesc) : '[]'
764
+ },
765
+ {
766
+ paramCode: 'childEventJson',
767
+ paramValue: changeEventDefineJson(form)
768
+ },
769
+ {
770
+ paramCode: 'enddayParentId',
771
+ paramValue: form.enddayParentId || ''
772
+ },
773
+ {
774
+ paramCode: 'eventDefineId',
775
+ paramValue: form.eventDefineId ||''
776
+ },
777
+ {
778
+ paramCode: 'eventNameText',
779
+ paramValue: form.eventNameText || ''
780
+ },
781
+ {
782
+ paramCode: 'eventCycle',
783
+ paramValue: form.eventCycle
784
+ },
785
+ {
786
+ paramCode: 'startRemindDate',
787
+ paramValue: form.startRemind ? formatDate(form.startRemind[0]) : null
788
+ },
789
+ {
790
+ paramCode: 'endRemindDate',
791
+ paramValue: form.startRemind ? formatDate(form.startRemind[1]) : null
792
+ },
793
+ {
794
+ paramCode: 'startHappenDate',
795
+ paramValue: form.expireDate ? formatDate(form.expireDate[0]) : null
796
+ },
797
+ {
798
+ paramCode: 'endHappenDate',
799
+ paramValue: form.expireDate ? formatDate(form.expireDate[1]) : null
800
+ },
801
+ {
802
+ paramCode: 'computeMode',
803
+ paramValue: form.computeMode || ''
804
+ },
805
+ {
806
+ paramCode: 'computeUnit',
807
+ paramValue: form.computeUnit || ''
808
+ },
809
+ {
810
+ paramCode: 'cycleStatus',
811
+ paramValue: boolToString(form.cycleStatus)
812
+ },
813
+ {
814
+ paramCode: 'cycleValue',
815
+ paramValue: form.cycleValue || 0
816
+ },
817
+ {
818
+ paramCode: 'cycleUnit',
819
+ paramValue: form.cycleUnit || ''
820
+ },
821
+ {
822
+ paramCode: 'noRespType',
823
+ paramValue: form.noRespType || ''
824
+ },
825
+ {
826
+ paramCode: 'noRespSttTime',
827
+ paramValue: form.noRespSttTime ? formatFullDateTime(form.noRespSttTime) : null
828
+ },
829
+ {
830
+ paramCode: 'noRespStt',
831
+ paramValue: form.noRespStt || 0
832
+ },
833
+ {
834
+ paramCode: 'noRespSttUnit',
835
+ paramValue: form.noRespSttUnit || ''
836
+ }
837
+ ]
838
+
839
+ // 添加分支行数据
840
+ if(form.data) {
841
+ let evtRespFlowBranchData = form.data.map((row, i) => {
842
+ return {
843
+ ...row,
844
+ order: i
845
+ }
846
+ })
847
+ paramsList.push({
848
+ paramCode: 'evtRespFlowBranchData',
849
+ paramValue: JSON.stringify(evtRespFlowBranchData)
850
+ })
851
+ }
852
+ break
853
+ case 'evtRespFlowBranch': // 事件响应分支
854
+ paramsList = [{
855
+ paramCode: 'componentName',
856
+ paramValue: form.name || ''
857
+ },
858
+ {
859
+ paramCode: 'eventSplitRespStatus',
860
+ paramValue: form.eventSplitRespStatus || ''
861
+ },
862
+ {
863
+ paramCode: 'noRespType',
864
+ paramValue: form.noRespType || ''
865
+ },
866
+ {
867
+ paramCode: 'noRespSttTime',
868
+ paramValue: form.noRespSttTime ? formatFullDateTime(form.noRespSttTime) : null
869
+ },
870
+ {
871
+ paramCode: 'noRespStt',
872
+ paramValue: form.noRespStt || 0
873
+ },
874
+ {
875
+ paramCode: 'noRespSttUnit',
876
+ paramValue: form.noRespSttUnit || ''
877
+ }
878
+ ]
879
+ break
880
+ case 'chnlRespFlow': // 渠道响应
881
+ paramsList = [{
882
+ paramCode: 'componentName',
883
+ paramValue: form.name || ''
884
+ },
885
+ {
886
+ paramCode: 'exclutionType',
887
+ paramValue: boolToString(form.exclutionType)
888
+ },
889
+ {
890
+ paramCode: 'stage',
891
+ paramValue: form.stage || ''
892
+ },
893
+ {
894
+ paramCode: 'eventName',
895
+ paramValue: form.eventName || ''
896
+ },
897
+ {
898
+ paramCode: 'stageName',
899
+ paramValue: form.stageName || ''
900
+ },
901
+ ]
902
+ // 添加分支行数据
903
+ let chnlRespFlowBranchData = form.data.map((row, i) => {
904
+ return {
905
+ ...row,
906
+ order: i
907
+ }
908
+ })
909
+ paramsList.push({
910
+ paramCode: 'chnlRespFlowBranchData',
911
+ paramValue: JSON.stringify(chnlRespFlowBranchData)
912
+ })
913
+ break
914
+ case 'chnlRespFlowBranch': // 渠道响应分支
915
+ paramsList = [{
916
+ paramCode: 'componentName',
917
+ paramValue: form.name || ''
918
+ },
919
+ {
920
+ paramCode: 'rowId',
921
+ paramValue: form.rowId || node.id || ''
922
+ },
923
+ {
924
+ paramCode: 'channelType',
925
+ paramValue: form.channelType || ''
926
+ },
927
+ {
928
+ paramCode: 'execStat',
929
+ paramValue: form.execStat || ''
930
+ },
931
+ {
932
+ paramCode: 'channelSplitName',
933
+ paramValue: form.channelSplitName || ''
934
+ },
935
+ {
936
+ paramCode: 'unprocessedMark',
937
+ paramValue: form.unprocessedMark.toString() || ''
938
+ },
939
+ {
940
+ paramCode: 'breachStat',
941
+ paramValue: form.breachStat || ''
942
+ },
943
+ {
944
+ paramCode: 'respStat',
945
+ paramValue: form.respStat || ''
946
+ },
947
+ {
948
+ paramCode: 'splitChannelTimeType',
949
+ paramValue: form.splitChannelTimeType || ''
950
+ },
951
+ {
952
+ paramCode: 'splitChannelTime',
953
+ paramValue: form.splitChannelTime ? formatFullDateTime(form.splitChannelTime) : null
954
+ },
955
+ {
956
+ paramCode: 'splitChannelTimeInt',
957
+ paramValue: form.splitChannelTimeInt || 0
958
+ },
959
+ {
960
+ paramCode: 'splitChannelTimeUnit',
961
+ paramValue: form.splitChannelTimeUnit || ''
962
+ },
963
+ {
964
+ paramCode: 'stage',
965
+ paramValue: form.stage || ''
966
+ }
967
+ ]
968
+ break
969
+ case 'randomFlow': // 随机分流
970
+ paramsList = [{
971
+ paramCode: 'componentName',
972
+ paramValue: form.name || ''
973
+ },
974
+ {
975
+ paramCode: 'sampleType',
976
+ paramValue: form.sampleType || null
977
+ }
978
+ ]
979
+ // 添加分支行数据
980
+ let randomFlowBranchData = form.data.map((row, i) => {
981
+ return {
982
+ ...row,
983
+ order: i
984
+ }
985
+ })
986
+ paramsList.push({
987
+ paramCode: 'randomFlowBranchData',
988
+ paramValue: JSON.stringify(randomFlowBranchData)
989
+ })
990
+ break
991
+ case 'randomFlowBranch': // 随机分流分支
992
+ paramsList = [
993
+ {
994
+ paramCode: 'componentName',
995
+ paramValue: form.name || ''
996
+ },
997
+ {
998
+ paramCode: 'rowId',
999
+ paramValue: form.rowId || ''
1000
+ },
1001
+ {
1002
+ paramCode: 'hiddenDelete',
1003
+ paramValue: boolToString(form.hiddenDelete)
1004
+ },
1005
+ {
1006
+ paramCode: 'sampleType',
1007
+ paramValue: form.sampleType || ''
1008
+ },
1009
+ {
1010
+ paramCode: 'sampleValue',
1011
+ // 随机分流分支样本数/样本率值的赋值逻辑
1012
+ // 如果有值,则直接取值便可
1013
+ // 否则,先判断样本类型,如果样本类型是样本数,默认为1;如果是样本率,默认为0
1014
+ paramValue: form.sampleValue ? form.sampleValue : form.sampleType === NODE_SAMPLE_TYPE_NUMBER ? 1 : 0
1015
+ },
1016
+ {
1017
+ paramCode: 'isOther',
1018
+ paramValue: !form?.hiddenDelete ? false : true
1019
+ }
1020
+ ]
1021
+ if (form.sampleType === NODE_SAMPLE_TYPE_NUMBER) {
1022
+ paramsList.push({
1023
+ paramCode: 'samplePriority',
1024
+ paramValue: form.samplePriority || ''
1025
+ })
1026
+ }
1027
+ break
1028
+ case 'merge':
1029
+ paramsList = [{
1030
+ paramCode: 'componentName',
1031
+ paramValue: form.name || ''
1032
+ },
1033
+ {
1034
+ paramCode: 'mergeType',
1035
+ paramValue: form.mergeType || ''
1036
+ }
1037
+ ]
1038
+ break
1039
+ case 'waitFixTime': // 时机-等待一定时间
1040
+ paramsList = [{
1041
+ paramCode: 'componentName',
1042
+ paramValue: form.componentName || ''
1043
+ },
1044
+ {
1045
+ paramCode: 'time',
1046
+ paramValue: numberToString(form.time) || ''
1047
+ },
1048
+ {
1049
+ paramCode: 'timeUnit',
1050
+ paramValue: form.timeUnit || ''
1051
+ },
1052
+ // {
1053
+ // paramCode: 'exceptionHandler',
1054
+ // paramValue: form.exceptionHandler || ''
1055
+ // }
1056
+ ]
1057
+ break
1058
+ case 'waitToTime': // 时机-等待到某个时间
1059
+ form.time = form.dayCycle === '1' ? form.time : form.dateTime
1060
+ paramsList = [{
1061
+ paramCode: 'componentName',
1062
+ paramValue: form.componentName || ''
1063
+ },
1064
+ {
1065
+ paramCode: 'dayCycle',
1066
+ paramValue: form.dayCycle || ''
1067
+ },
1068
+ {
1069
+ paramCode: 'time',
1070
+ paramValue: form.time ? formatFullDateTime(form.time) : null
1071
+ },
1072
+ // {
1073
+ // paramCode: 'exceptionHandler',
1074
+ // paramValue: form.exceptionHandler || ''
1075
+ // },
1076
+ {
1077
+ paramCode: 'cycleType',
1078
+ paramValue: form.cycleType
1079
+ },
1080
+ {
1081
+ paramCode: 'cycleValue',
1082
+ paramValue: ['week', 'month'].includes(form.cycleType) && form.cycleValue ? form.cycleValue.join(',') : form.cycleValue
1083
+ }
1084
+ ]
1085
+ break
1086
+ case 'waitEvent': // 时机-等待某个事件发生
1087
+ paramsList = [{
1088
+ paramCode: 'componentName',
1089
+ paramValue: form.componentName || ''
1090
+ },
1091
+ {
1092
+ paramCode: 'eventName',
1093
+ paramValue: form.eventName ? form.eventName.split(',')[0] : ''
1094
+ },
1095
+ {
1096
+ paramCode: 'eventCodePreview',
1097
+ paramValue: form.eventName ? form.eventName.split(',')[0] : ''
1098
+ },
1099
+ {
1100
+ paramCode: 'childEventDefineJson',
1101
+ paramValue: form.childEventDefineJson && form.childEventDefineJson.length ? JSON.stringify(form.childEventDefineJson) : '[]'
1102
+ },
1103
+ {
1104
+ paramCode: 'ruleItemCalcDesc',
1105
+ paramValue: form.ruleItemCalcDesc && form.ruleItemCalcDesc.length ? JSON.stringify(form.ruleItemCalcDesc) : '[]'
1106
+ },
1107
+ {
1108
+ paramCode: 'childEventJson',
1109
+ paramValue: changeEventDefineJson(form)
1110
+ },
1111
+ {
1112
+ paramCode: 'enddayParentId',
1113
+ paramValue: form.enddayParentId || ''
1114
+ },
1115
+ {
1116
+ paramCode: 'eventDefineId',
1117
+ paramValue: form.eventDefineId ||''
1118
+ },
1119
+ {
1120
+ paramCode: 'eventType',
1121
+ paramValue: form.eventType || ''
1122
+ },
1123
+ {
1124
+ paramCode: 'eventNameText',
1125
+ paramValue: form.eventNameText || ''
1126
+ },
1127
+ {
1128
+ paramCode: 'eventCycle',
1129
+ paramValue: form.eventCycle
1130
+ },
1131
+ {
1132
+ paramCode: 'startRemindDate',
1133
+ paramValue: form.startRemind ? formatDate(form.startRemind[0]) : null
1134
+ },
1135
+ {
1136
+ paramCode: 'endRemindDate',
1137
+ paramValue: form.startRemind ? formatDate(form.startRemind[1]) : null
1138
+ },
1139
+ {
1140
+ paramCode: 'startHappenDate',
1141
+ paramValue: form.expireDate ? formatDate(form.expireDate[0]) : null
1142
+ },
1143
+ {
1144
+ paramCode: 'endHappenDate',
1145
+ paramValue: form.expireDate ? formatDate(form.expireDate[1]) : null
1146
+ },
1147
+ {
1148
+ paramCode: 'computeUnit',
1149
+ paramValue: form.computeUnit || ''
1150
+ },
1151
+ {
1152
+ paramCode: 'computeMode',
1153
+ paramValue: form.computeMode || ''
1154
+ },
1155
+ {
1156
+ paramCode: 'cycleStatus',
1157
+ paramValue: boolToString(form.cycleStatus)
1158
+ },
1159
+ {
1160
+ paramCode: 'cycleValue',
1161
+ paramValue: form.cycleValue || ''
1162
+ },
1163
+ {
1164
+ paramCode: 'cycleUnit',
1165
+ paramValue: form.cycleUnit || ''
1166
+ },
1167
+ // 流转限制配置
1168
+ {
1169
+ paramCode: 'limitNode',
1170
+ paramValue: boolToString(form.limitNode)
1171
+ },
1172
+ {
1173
+ paramCode: 'limitPeriod',
1174
+ paramValue: boolToString(form.limitPeriod)
1175
+ },
1176
+ {
1177
+ paramCode: 'limitCycleValue',
1178
+ paramValue: form.limitCycleValue || ''
1179
+ },
1180
+ {
1181
+ paramCode: 'limitCycleUnit',
1182
+ paramValue: form.limitCycleUnit || ''
1183
+ },
1184
+ {
1185
+ paramCode: 'custLimit',
1186
+ paramValue: form.custLimit || ''
1187
+ },
1188
+ {
1189
+ paramCode: 'waitEventIntroduction',
1190
+ paramValue: form.introduction || ''
1191
+ },
1192
+ ]
1193
+ break
1194
+ case 'content': // 资源-内容
1195
+ let copyLabelCampSuggest = null
1196
+ if (form.labelCampSuggest) {
1197
+ copyLabelCampSuggest = JSON.parse(JSON.stringify(form.labelCampSuggest))
1198
+ }
1199
+ if (!copyLabelCampSuggest || typeof copyLabelCampSuggest !== 'object') {
1200
+ copyLabelCampSuggest = []
1201
+ }
1202
+ // 如果要去掉第一位的客户号,从这里开始删除代码
1203
+ copyLabelCampSuggest.unshift({
1204
+ labelName: '客户号',
1205
+ labelCode: 'CUST_ID',
1206
+ labelId: '',
1207
+ value: 'CUST_ID',
1208
+ order: 0
1209
+ })
1210
+ // 这里结束
1211
+ paramsList = [{
1212
+ paramCode: 'componentName',
1213
+ paramValue: form.name || '',
1214
+ isModi: '1'
1215
+ },
1216
+ {
1217
+ paramCode: 'contentType',
1218
+ paramValue: form.contentType || '',
1219
+ isModi: '1'
1220
+ },
1221
+ {
1222
+ paramCode: 'graphicTemplateName',
1223
+ paramValue: form.graphicTemplateName || '',
1224
+ isModi: '1'
1225
+ },
1226
+ {
1227
+ paramCode: 'graphicTemplate',
1228
+ paramValue: form.graphicTemplate || '',
1229
+ isModi: '1'
1230
+ },
1231
+ {
1232
+ paramCode: 'graphicTemplateDetail',
1233
+ paramValue: JSON.stringify(form.graphicTemplateDetail) || '',
1234
+ isModi: '1'
1235
+ },
1236
+ {
1237
+ paramCode: 'reserveWay',
1238
+ paramValue: form.reserveWay || '',
1239
+ isModi: '1'
1240
+ },
1241
+ {
1242
+ paramCode: 'wordsCampSuggest',
1243
+ paramValue: form.wordsCampSuggest,
1244
+ isModi: '1'
1245
+ },
1246
+ {
1247
+ paramCode: 'labelCampSuggest',
1248
+ paramValue: copyLabelCampSuggest.length !== 1 ? JSON.stringify(copyLabelCampSuggest) : '',
1249
+ isModi: '1'
1250
+ },
1251
+ {
1252
+ paramCode: 'displayLabelName',
1253
+ paramValue: boolToString(form.displayLabelName)
1254
+ },
1255
+ {
1256
+ paramCode: 'type',
1257
+ paramValue: form.type === '' ? '' : form.type,
1258
+ isModi: '1'
1259
+ },
1260
+ {
1261
+ paramCode: 'productDetail',
1262
+ paramValue: JSON.stringify(form.productDetail) || "[]",
1263
+ isModi: '1'
1264
+ },
1265
+ {
1266
+ paramCode: 'contentIntroduction',
1267
+ paramValue: form.introduction || ''
1268
+ },
1269
+ {
1270
+ paramCode: 'sendTarget',
1271
+ paramValue: form.sendTarget || ''
1272
+ },
1273
+ {
1274
+ paramCode: 'suggestContent',
1275
+ paramValue: form.suggestContentCode // 避免传中文的问题
1276
+ },
1277
+ {
1278
+ paramCode: 'suggestArgs',
1279
+ paramValue: form.suggestArgs ? JSON.stringify(form.suggestArgs) : JSON.stringify([])
1280
+ },
1281
+ {
1282
+ paramCode: 'dispatchArgs',
1283
+ paramValue: form.dispatchArgs ? JSON.stringify(form.dispatchArgs) : JSON.stringify([])
1284
+ },
1285
+ {
1286
+ paramCode: 'templateId',
1287
+ paramValue: form.templateId || '',
1288
+ isModi: '1'
1289
+ },
1290
+ {
1291
+ paramCode: 'templateName',
1292
+ paramValue: form.templateName || '',
1293
+ isModi: '1'
1294
+ },
1295
+ {
1296
+ paramCode: 'templateContent',
1297
+ paramValue: form.templateContent || '',
1298
+ isModi: '1'
1299
+ },
1300
+ {
1301
+ paramCode: 'templateArgs',
1302
+ paramValue: form.templateArgs ? JSON.stringify(form.templateArgs) : '',
1303
+ isModi: '1'
1304
+ },
1305
+ {
1306
+ paramCode: 'externalTemplateId',
1307
+ paramValue: form.externalTemplateId || '',
1308
+ isModi: '1'
1309
+ },
1310
+ {
1311
+ paramCode: 'externalTemplateName',
1312
+ paramValue: form.externalTemplateName || '',
1313
+ isModi: '1'
1314
+ },
1315
+ {
1316
+ paramCode: 'externalTemplateContent',
1317
+ paramValue: form.externalTemplateContent || '',
1318
+ isModi: '1'
1319
+ },
1320
+ {
1321
+ paramCode: 'customArgs',
1322
+ paramValue: form.customArgs ? JSON.stringify(form.customArgs) : ''
1323
+ },
1324
+ {
1325
+ paramCode: 'templateType',
1326
+ paramValue: form.templateType ? JSON.stringify(form.templateType) : '[]'
1327
+ },
1328
+ {
1329
+ paramCode: 'templatePictureUrlPath',
1330
+ paramValue: form.templatePictureUrlPath || ''
1331
+ },
1332
+ {
1333
+ paramCode: 'isCall',
1334
+ paramValue: form.isCall || ''
1335
+ },
1336
+ {
1337
+ paramCode: 'externalTemplateField',
1338
+ paramValue: form.externalTemplateField ? JSON.stringify(form.externalTemplateField.split('、')) : '[]'
1339
+ },
1340
+ {
1341
+ paramCode: 'templatePictureRemoteUrlPath',
1342
+ paramValue: form.templatePictureRemoteUrlPath || ''
1343
+ },
1344
+ {
1345
+ paramCode: 'templateTitle',
1346
+ paramValue: form.templateTitle || ''
1347
+ },
1348
+ {
1349
+ paramCode: 'productArgs',
1350
+ paramValue: form.productArgs.arr ? JSON.stringify(filterContentTabData('productArgs',form)) : '[]'
1351
+ },
1352
+ {
1353
+ paramCode: 'equityArgs',
1354
+ paramValue: form.equityArgs.arr ? JSON.stringify(filterContentTabData('equityArgs',form)) : '[]'
1355
+ },
1356
+ {
1357
+ paramCode: 'activityArgs',
1358
+ paramValue: form.activityArgs.arr ? JSON.stringify(filterContentTabData('activityArgs',form)) : '[]'
1359
+ },
1360
+ ]
1361
+ break
1362
+ case 'prod': // 资源-产品
1363
+ paramsList = [{
1364
+ paramCode: 'componentName',
1365
+ paramValue: form.componentName || '',
1366
+ isModi: '1'
1367
+ },
1368
+ {
1369
+ paramCode: 'productData',
1370
+ paramValue: JSON.stringify(form.product)
1371
+ },
1372
+ {
1373
+ paramCode: 'autoRecommend',
1374
+ paramValue: form.autoRecommend
1375
+ },
1376
+ {
1377
+ paramCode: 'prodIntroduction',
1378
+ paramValue: form.introduction || ''
1379
+ },
1380
+ {
1381
+ paramCode: 'autoRecoProdType',
1382
+ paramValue: form.autoRecoProdType && form.autoRecoProdType.length ? form.autoRecoProdType.join(',') : ''
1383
+ },
1384
+ {
1385
+ paramCode: 'prodId',
1386
+ paramValue: form.product?.id || ''
1387
+ },
1388
+ {
1389
+ paramCode: 'prodName',
1390
+ paramValue: form.product?.productName || ''
1391
+ },
1392
+ {
1393
+ paramCode: 'linkUrl',
1394
+ paramValue: form.product?.linkUrl || ''
1395
+ },
1396
+ {
1397
+ paramCode: 'prodRiskLevel',
1398
+ paramValue: form.product?.riskLevel || ''
1399
+ },
1400
+ {
1401
+ paramCode: 'prodStatus',
1402
+ paramValue: form.product?.currentState || ''
1403
+ },
1404
+ {
1405
+ paramCode: 'prodType',
1406
+ paramValue: form.product?.productType || ''
1407
+ }
1408
+ ]
1409
+ break
1410
+ case 'equity': // 资源-权益
1411
+ paramsList = [
1412
+ {
1413
+ paramCode: 'componentName',
1414
+ paramValue: form.componentName || '',
1415
+ isModi: '1'
1416
+ },
1417
+ {
1418
+ paramCode: 'type',
1419
+ paramValue: form.type,
1420
+ isModi: '1'
1421
+ },
1422
+ {
1423
+ paramCode: 'exsit',
1424
+ paramValue: JSON.stringify(form.exsit),
1425
+ isModi: '1'
1426
+ },
1427
+ {
1428
+ paramCode: 'customerGroupTagAI',
1429
+ paramValue: JSON.stringify(form.customerGroupTagAI) || [],
1430
+ isModi: '1'
1431
+ },
1432
+ {
1433
+ paramCode: 'partNum',
1434
+ paramValue: form.partNum || 0,
1435
+ isModi: '1'
1436
+ },
1437
+ {
1438
+ paramCode: 'giftDetail',
1439
+ paramValue: JSON.stringify(form.giftDetail) || "{}",
1440
+ isModi: '1'
1441
+ },
1442
+ {
1443
+ paramCode: 'equityIntroduction',
1444
+ paramValue: form.introduction || ''
1445
+ },
1446
+ {
1447
+ paramCode: 'componentSwitch',
1448
+ paramValue: 0
1449
+ },
1450
+ {
1451
+ paramCode: 'stock',
1452
+ paramValue: form.stock,
1453
+ isModi: '1'
1454
+ },
1455
+ {
1456
+ paramCode: 'equity_id',
1457
+ paramValue: form.equityId,
1458
+ isModi: '1'
1459
+ },
1460
+ {
1461
+ paramCode: 'equity_name',
1462
+ paramValue: form.equityName,
1463
+ isModi: '1'
1464
+ }
1465
+ ]
1466
+ break
1467
+ case 'act':
1468
+ paramsList = [
1469
+ {
1470
+ paramCode: 'componentName',
1471
+ paramValue: form.componentName || '',
1472
+ isModi: '1'
1473
+ },
1474
+ {
1475
+ paramCode: 'id',
1476
+ paramValue: form.id || '',
1477
+ isModi: '1'
1478
+ },
1479
+ {
1480
+ paramCode: 'externalActSource',
1481
+ paramValue: form.externalActSource || '',
1482
+ isModi: '1'
1483
+ },
1484
+ {
1485
+ paramCode: 'actIntroduction',
1486
+ paramValue: form.introduction || ''
1487
+ },
1488
+ {
1489
+ paramCode: 'actDetail',
1490
+ paramValue: form.actDetail && form.actDetail.length ? JSON.stringify(getActDetail(form.actDetail, formatFullDateTime)): '',
1491
+ isModi: '1'
1492
+ },
1493
+ // 活动组件,前端传参增加开关字段,默认为0(后端需要)
1494
+ {
1495
+ paramCode: 'componentSwitch',
1496
+ paramValue: 0
1497
+ },
1498
+ // 后端使用字段,前端无用
1499
+ {
1500
+ paramCode: 'actCstGroupType',
1501
+ paramValue: form.actDetail && form.actDetail.length ? form.actDetail[0].actCstGroupType : ''
1502
+ },
1503
+ {
1504
+ paramCode: 'actCstGroupId',
1505
+ paramValue: form.actDetail && form.actDetail.length ? form.actDetail[0].actCstGroupId : ''
1506
+ },
1507
+ {
1508
+ paramCode: 'actExcludeGroupType',
1509
+ paramValue: form.actDetail && form.actDetail.length ? form.actDetail[0].actExcludeGroupType : ''
1510
+ },
1511
+ {
1512
+ paramCode: 'actExcludeGroupId',
1513
+ paramValue: form.actDetail && form.actDetail.length ? form.actDetail[0].actExcludeGroupId : ''
1514
+ }
1515
+ ]
1516
+ break
1517
+ case 'h5':
1518
+ paramsList = [
1519
+ {
1520
+ paramCode: 'componentName',
1521
+ paramValue: 'H5'
1522
+ },
1523
+ {
1524
+ paramCode: 'templateId',
1525
+ paramValue: form.templateId
1526
+ },
1527
+ {
1528
+ paramCode: 'imgLink',
1529
+ paramValue: form.imgLink
1530
+ },
1531
+ {
1532
+ paramCode: 'linkUrl',
1533
+ paramValue: form.linkUrl
1534
+ },
1535
+ {
1536
+ paramCode: 'titleName',
1537
+ paramValue: form.titleName
1538
+ }
1539
+ ]
1540
+ break
1541
+ default:
1542
+ break
1543
+ }
1544
+ return paramsList
1545
+ }
1546
+
1547
+ // 保存--【提交】获取渠道目标数组
1548
+ const getChannelTargetListByNode = (nodes, formatFullDateTime) => {
1549
+ let arr = []
1550
+ nodes.forEach(node => {
1551
+ if (node.form && node.form.channelTargetList && node.form.channelTargetList.length) {
1552
+ node.form.channelTargetList.forEach((e, i) => {
1553
+ arr.push({
1554
+ seqid: i + 1, // 序号
1555
+ actDefNodeId: node.id, // 渠道节点id
1556
+ channelType: node.channelGroup || node.uniqueKey || node.menuKey, // 渠道类型
1557
+ nodeName: node.label, // 渠道名称
1558
+ targetName: e.targetName, // 渠道目标名称
1559
+ targetStartTime: e.targetSuperviseStartTime ? formatFullDateTime(e.targetSuperviseStartTime) : '',// 如果没有使用监测时间
1560
+ targetEndTime: e.targetSuperviseEndTime ? formatFullDateTime(e.targetSuperviseEndTime) : '',
1561
+ superviseFlag: e.superviseUsedStatus, // 使用监测时间 0否1是
1562
+ channelTargetDesc: e.targetDesc, // 渠道目标描述
1563
+ areas: getTargetList(e) // 探索条件块数组
1564
+ })
1565
+ })
1566
+ }
1567
+ })
1568
+ return arr
1569
+ }
1570
+ // 保存--【提交】获取渠道目标数组----单独组件
1571
+ const getChannelTargetList = (node, formatFullDateTime) => {
1572
+ let arr = []
1573
+ if (node.form && node.form.channelTargetList && node.form.channelTargetList.length) {
1574
+ node.form.channelTargetList.forEach((e, i) => {
1575
+ arr.push({
1576
+ seqid: i + 1, // 序号
1577
+ actDefNodeId: node.id, // 渠道节点id
1578
+ channelType: node.channelGroup || node.uniqueKey || node.menuKey, // 渠道类型
1579
+ nodeName: node.label, // 渠道名称
1580
+ targetName: e.targetName, // 渠道目标名称
1581
+ targetStartTime: e.targetSuperviseStartTime ? formatFullDateTime(e.targetSuperviseStartTime) : '',// 如果没有使用监测时间
1582
+ targetEndTime: e.targetSuperviseEndTime ? formatFullDateTime(e.targetSuperviseEndTime) : '',
1583
+ superviseFlag: e.superviseUsedStatus, // 使用监测时间 0否1是
1584
+ channelTargetDesc: e.targetDesc, // 渠道目标描述
1585
+ areas: getTargetList(e) // 探索条件块数组
1586
+ })
1587
+ })
1588
+ }
1589
+ return arr
1590
+ }
1591
+ // 【提交】获取渠道目标 标签
1592
+ export const getTargetList = (detail) => {
1593
+ if (detail.target && detail.target.length) {
1594
+ return detail.target.map((tag, i) => {
1595
+ let item = {
1596
+ areaName: '组合' + (i + 1),
1597
+ rela: tag.isOpen === 'AND' ? 'AND' : tag.isOpen === 'OR' ? 'OR' : 'AND NOT',
1598
+ seqid: i,
1599
+ children: []
1600
+ }
1601
+ item.terms = tag.children.map((tag, j) => {
1602
+ return {
1603
+ labelCode: tag.code || tag.labelCode,
1604
+ labelId: tag.id,
1605
+ labelNm: tag.name,
1606
+ codeParam: tag.codeParam,
1607
+ matchType: tag.type,
1608
+ relaType: tag.relaType || (tag.relate === 0 ? 'OR' : 'AND'),
1609
+ seqid: j,
1610
+ op1: tag.detailType[0] || '',
1611
+ op2: tag.detailType[1],
1612
+ val1: tag.detail[0],
1613
+ val2: tag.detail[1],
1614
+ showType: tag.showTp,
1615
+ valType: tag.valType
1616
+ }
1617
+ })
1618
+ return item
1619
+ })
1620
+ }
1621
+ return []
1622
+ }
1623
+
1624
+
1625
+ // 【提交】获取策略分支附加策略
1626
+ const getTagList = (nodes) => {
1627
+ let list = []
1628
+ nodes.forEach(node => {
1629
+ const { id, menuKey, form } = node
1630
+ const { strategyGroup = [], } = form || {}
1631
+ const target = strategyGroup.find(item => item.type === 'ruleStrategy')
1632
+ if (menuKey === 'labelFlowBranch' && target && target.ruleStrategy?.length > 0) {
1633
+ list.push({
1634
+ nodeId: id,
1635
+ name: form.name,
1636
+ areas:target.ruleStrategy,
1637
+ ckAreas:target.ruleStrategyCK
1638
+ })
1639
+ }
1640
+ })
1641
+ return list
1642
+ }
1643
+
1644
+ // 保存--【提交】获取活动目标
1645
+ export const formatTargetList = (areas) => {
1646
+ if (!areas || areas.length === 0) {
1647
+ return []
1648
+ }
1649
+ // 判断是否是已经转化过,避免二次转换,导致area丢失
1650
+ // let isTranslate = areas.some(item => item.area && item.area.length)
1651
+ // if (isTranslate) return areas
1652
+ return areas.map((item, index) => ({
1653
+ ...item,
1654
+ serialNo:String(index + 1)
1655
+ }))
1656
+ // return areas.map((item, index) => {
1657
+ // item.serialNo = String(index + 1)
1658
+ // return item
1659
+ // // if (item.target && item.target.length) {
1660
+ // // if(item.targetType === 'label') {
1661
+ // // // item.area = item.target.map((tag, i) => {
1662
+ // // // let item = {
1663
+ // // // areaName: '组合' + (i + 1),
1664
+ // // // rela: tag.isOpen === 'AND' ? 'AND' : tag.isOpen === 'OR' ? 'OR' : 'AND NOT',
1665
+ // // // seqid: i,
1666
+ // // // children: []
1667
+ // // // }
1668
+ // // // item.terms = tag.children.map((tag, j) => {
1669
+ // // // return {
1670
+ // // // labelCode: tag.code || tag.labelCode,
1671
+ // // // labelId: tag.id,
1672
+ // // // labelNm: tag.name,
1673
+ // // // codeParam: tag.codeParam,
1674
+ // // // matchType: tag.type,
1675
+ // // // relaType: tag.relaType || (tag.relate === 0 ? 'OR' : 'AND'),
1676
+ // // // seqid: j,
1677
+ // // // op1: tag.detailType[0] || '',
1678
+ // // // op2: tag.detailType[1],
1679
+ // // // val1: tag.detail[0],
1680
+ // // // val2: tag.detail[1],
1681
+ // // // showType: tag.showTp,
1682
+ // // // valType: tag.valType
1683
+ // // // }
1684
+ // // // })
1685
+ // // // return item
1686
+ // // // })
1687
+ // // } else {
1688
+ // // let target = []
1689
+ // // if(item.target?.length && item.target[0]?.isOpen) {
1690
+ // // target.push(JSON.parse(item.target[0]?.children[0]?.detail[0]))
1691
+ // // } else {
1692
+ // // target = item.target
1693
+ // // }
1694
+ // // item.area = target.map((tag, i) => {
1695
+ // // let item = {
1696
+ // // areaName: '组合' + (i + 1),
1697
+ // // rela: 'AND',
1698
+ // // seqid: i,
1699
+ // // children: [],
1700
+ // // terms: [{
1701
+ // // labelCode: tag.treeCode,
1702
+ // // labelType: tag.parentKey,
1703
+ // // labelId: tag.pkId || tag.treeId,
1704
+ // // labelNm: tag.name,
1705
+ // // matchType: 'single',
1706
+ // // relaType: 'AND',
1707
+ // // seqid: i,
1708
+ // // op1: '2',
1709
+ // // val1: JSON.stringify(tag),
1710
+ // // showType: 'text',
1711
+ // // valType: 'string'
1712
+ // // }]
1713
+ // // }
1714
+ // // return item
1715
+ // // })
1716
+ // // }
1717
+ // // } else {
1718
+ // // item.area = []
1719
+ // // }
1720
+ // // delete item.target
1721
+ // // return item
1722
+ // })
1723
+ }
1724
+
1725
+
1726
+ // 【提交】获取客户群组 'cst'指客户节点的客户群组 'labelFlowBranch'指分支策略节点的客户群组
1727
+ const getStrategyBranchList = (nodes) => {
1728
+ let list = []
1729
+ nodes.forEach(node => {
1730
+ if (node.menuKey === 'custFlowBranch') {
1731
+ let customerGroupTag = []
1732
+ let targetStrategy = (node.form.strategyGroup || []).find(item => item.type === 'cstGroupStrategy')
1733
+ if (targetStrategy) {
1734
+ customerGroupTag = targetStrategy.cstGroupStrategy
1735
+ }
1736
+
1737
+ if (!customerGroupTag.length) {
1738
+ return
1739
+ }
1740
+
1741
+ let item = {
1742
+ nodeId: node.id,
1743
+ composeContent: getCustomerGroupFunc(customerGroupTag),
1744
+ cstEntityVoList: []
1745
+ }
1746
+ if (customerGroupTag.length) {
1747
+ item.cstEntityVoList = customerGroupTag.map(group => {
1748
+ return {
1749
+ id: group.id,
1750
+ name: group.name
1751
+ }
1752
+ })
1753
+ }
1754
+ list.push(item)
1755
+ }
1756
+ })
1757
+ list = list.filter(item => item.composeContent)
1758
+
1759
+ return list
1760
+ }
1761
+
1762
+ // 【提交】获取客户群组 'cst'指客户节点的客户群组 'strategyBranch'指分支策略节点的客户群组
1763
+ const getCstGroupList = (nodes) => {
1764
+ // debugger
1765
+ let list = []
1766
+ nodes.forEach(node => {
1767
+ if (['cst', 'activityCst', 'flowCst', 'composeCst'].includes(node.menuKey)) {
1768
+ let customerGroupTag = []
1769
+ customerGroupTag = node.form.customerGroupTag
1770
+
1771
+ if (!customerGroupTag?.length) {
1772
+ return
1773
+ }
1774
+
1775
+ let item = {
1776
+ nodeId: node.id,
1777
+ composeContent: node.form.groupCompents,
1778
+ cstEntityVoList: []
1779
+ }
1780
+ if (customerGroupTag?.length) {
1781
+ item.cstEntityVoList = customerGroupTag.map(group => {
1782
+ return {
1783
+ id: group.pkId,
1784
+ name: group.groupName
1785
+ }
1786
+ })
1787
+ }
1788
+ list.push(item)
1789
+ }
1790
+ })
1791
+ list = list.filter(item => item.composeContent)
1792
+
1793
+ return list
1794
+ }
1795
+
1796
+ // 【提交】获取AI客户群组
1797
+ const getCstAIGroupList = (nodes) => {
1798
+ let list = []
1799
+ nodes.forEach(node => {
1800
+ if (['cst'].includes(node.menuKey)) {
1801
+ let customerGroupTagAI = node.form.customerGroupTagAI
1802
+ let item = {
1803
+ nodeId: node.id,
1804
+ composeContent: getCustomerGroupFunc(customerGroupTagAI, 'modelId'),
1805
+ cstEntityVoList: []
1806
+ }
1807
+ if (customerGroupTagAI.length) {
1808
+ item.cstEntityVoList = customerGroupTagAI.map(group => {
1809
+ return {
1810
+ id: group.modelId,
1811
+ name: group.modelNm
1812
+ }
1813
+ })
1814
+ }
1815
+ list.push(item)
1816
+ }
1817
+ })
1818
+ list = list.filter(item => item.cstEntityVoList.length)
1819
+ return list
1820
+ }
1821
+
1822
+ // 【提交】获取客户群组公式
1823
+ export const getCustomerGroupFunc = (list, key = 'id') => {
1824
+ return list && list.reduce((arr, item, index) => {
1825
+ if (index !== 0) {
1826
+ arr.push(item.symbol)
1827
+ }
1828
+ for (let i = 0; i < item.left; i++) {
1829
+ arr.push('(')
1830
+ }
1831
+ arr.push(item[key])
1832
+ for (let i = 0; i < item.right; i++) {
1833
+ arr.push(')')
1834
+ }
1835
+ return arr
1836
+ }, []).join(' ')
1837
+ }
1838
+
1839
+ const getActDetail = (obj, formatFullDateTime) => {
1840
+ return [{
1841
+ ...obj[0],
1842
+ 'data.list[0].startTime': formatFullDateTime(obj[0]['data.list[0].startTime']),
1843
+ 'data.list[0].endTime': formatFullDateTime(obj[0]['data.list[0].endTime'])
1844
+ }]
1845
+ }
1846
+
1847
+ const getCustomerLabelList = (nodes) => {
1848
+ let list = []
1849
+ nodes.forEach(node => {
1850
+ if (['cst', 'activityCst', 'flowCst', 'composeCst'].includes(node.menuKey)) {
1851
+ let exploreGroupTag = node.form.exploreGroupTag
1852
+ let item = {
1853
+ nodeId: node.id,
1854
+ composeContent: getCustomerGroupFunc(exploreGroupTag),
1855
+ cstEntityVoList: []
1856
+ }
1857
+ if (exploreGroupTag && exploreGroupTag.length) {
1858
+ item.cstEntityVoList = exploreGroupTag.map(group => {
1859
+ return {
1860
+ id: group.id,
1861
+ name: group.templateName
1862
+ }
1863
+ })
1864
+ }
1865
+ list.push(item)
1866
+ }
1867
+ })
1868
+ list = list.filter(item => item.composeContent)
1869
+ return list
1870
+ }
1871
+
1872
+ export const getNodeType = (node) => {
1873
+ let { type, label, menuKey } = node
1874
+ if (['sms', 'ebankApp', 'appPush', 'teleSalesPlat', 'intligCall', 'manager'].includes(menuKey)) {
1875
+ menuKey = 'channel'
1876
+ node.menuKey = menuKey
1877
+ } else if (type === 'point') {
1878
+ menuKey = label === '开始' ? 'start' : 'end'
1879
+ }
1880
+ return menuKey
1881
+ }
1882
+
1883
+ export const getCstNodeIdsList = (nodes) => {
1884
+ let list = []
1885
+ nodes.forEach(node => {
1886
+ if (['cst', 'activityCst', 'flowCst', 'composeCst'].includes(node.menuKey)) {
1887
+ list.push({
1888
+ nodeId: node.id
1889
+ })
1890
+ }
1891
+ })
1892
+ return list
1893
+ }
1894
+
1895
+ // 获取客户探索条件
1896
+ const getCustomerSearch = (nodes) => {
1897
+ let list = []
1898
+ nodes.forEach(node => {
1899
+ const { menuKey,form } = node
1900
+ if (menuKey === 'cst' && !isEmpty(form?.customerGroup || {}) ) {
1901
+ list.push(form.customerGroup)
1902
+ // if (localStorage.getItem('cust-nodeId') || localStorage.getItem('cust-nodeId-copy')) {
1903
+ // if (localStorage.getItem('cust-nodeId-copy') && node.id.slice(0, 4) === 'copy') {
1904
+ // let item = JSON.parse(localStorage.getItem('cust-nodeId-copy')).filter(item => {
1905
+ // if (item.nodeId === node.id) {
1906
+ // return {
1907
+ // nodeId: item.nodeId,
1908
+ // areas: item.areas,
1909
+ // ckAreas: item.ckAreas
1910
+ // }
1911
+ // }
1912
+ // })
1913
+ // list.push(...item)
1914
+ // } else if (localStorage.getItem('cust-nodeId')) {
1915
+ // let item = JSON.parse(localStorage.getItem('cust-nodeId')).filter(item => {
1916
+ // if (item.nodeId === node.id) {
1917
+ // return {
1918
+ // nodeId: item.nodeId,
1919
+ // areas: item.areas,
1920
+ // ckAreas: item.ckAreas
1921
+ // }
1922
+ // }
1923
+ // })
1924
+ // list.push(...item)
1925
+ // }
1926
+ // }
1927
+ }
1928
+ })
1929
+ return list
1930
+ }
1931
+
1932
+ // 入参 【提交】 将浏览器的画布信息转化为接口提交的信息(非模板)
1933
+
1934
+ export const traslateSubmitData = (data = {}, formatFullDateTime, cstonly = false) => {
1935
+ let {
1936
+ canvas,
1937
+ detail
1938
+ } = data
1939
+ detail = cloneDeep(detail)
1940
+ // '-' 表示修改时需要带上,新建时无用
1941
+ let actBaseInfoVo = {
1942
+
1943
+ // 保存场景明细字段
1944
+ secneDetailName: detail.secneDetailName,//场景明细名称
1945
+ channelIntroduction: detail.channelIntroduction,//适用渠道
1946
+ sceneIntroduction: detail.sceneIntroduction,//场景说明
1947
+ strategicIntroduction: detail.strategicIntroduction,//经营策略
1948
+ actDefNodeLink: detail.externalLink,//节点连接数
1949
+ actDefNodeParams: detail.actInitiatorOrg,//节点参数表
1950
+ pkId: detail.pkId,//
1951
+ sceneStatus: detail.sceneStatus,//场景状态
1952
+ scenePkId: detail.sceneParentId,//
1953
+ file: detail.file,
1954
+ actNumber: detail.actNumber,
1955
+
1956
+ costs: detail.costsResponseDTOS?.length ? detail.costsResponseDTOS.map((item, index) => {
1957
+ return {
1958
+ name: item.costName,
1959
+ miniTypeCode: item.costSecType,
1960
+ typeCode: item.costType,
1961
+ num: item.count,
1962
+ sequence: index,
1963
+ orgName: item.orgName,
1964
+ totalPrice: item.totalPrice,
1965
+ unitPrice: item.unitPrice,
1966
+ orgId: item.orgCode
1967
+ }
1968
+ }) : [],
1969
+ totalCost: detail.totalCost || 0,
1970
+ actAttendFlag: null, // -活动参与标志
1971
+ actBudget: detail.actBudget || null, // 活动预算
1972
+ actCode: null, // -二维码地址
1973
+ actCodeFlag: null, // -是否插入活动二维码
1974
+ actCycleId: detail.actCycleId || null, // 周期活动id
1975
+ actDesc: detail.actDesc || null, // 活动描述
1976
+ actEvaluate: detail.actEvaluate || null, // 营销活动评价
1977
+ actInitiator: detail.actInitiator || null, // -活动创建人账号
1978
+ actInitiatorName: detail.actInitiatorName || null, // -活动创建人姓名
1979
+ actInitiatorOrg: detail.actInitiatorOrg || null, // -活动创建机构号
1980
+ actInitiatorOrgName: detail.actInitiatorOrgName || null, // -活动创建机构名称
1981
+ actName: detail.actName || null, // 活动名称
1982
+ budgetAmount: Number(detail.budgetAmount),
1983
+ targetConfirmType: detail.targetConfirmType,
1984
+ actType: detail.actType, // 活动类型
1985
+ actTypeSub: detail.actTypeSub, // 活动子类型
1986
+ communityFlag: null,
1987
+ communityCode: null, // 社区 ID
1988
+ communityName: null,
1989
+ createTime: detail.crtTm,
1990
+ cstCycleFlag: boolToString(detail.cstCycleFlag), // 客户生命周期标志
1991
+ cstCycleType: detail.cstCycleType, // 客户生命周期类型
1992
+ cstCycleValue: detail.cstCycleValue, // 客户生命周期值
1993
+ earlyTerminateReason: detail.earlyTerminateReason || '', // 提前终止原因
1994
+ executeEndTime: formatFullDateTime(detail.executeEndTime) || null, // 活动结束时间
1995
+ executeFlag: boolToString(detail.executeFlag) || null, // 立刻执行标志
1996
+ executeStartTime: formatFullDateTime(detail.executeStartTime) || null, // 活动执行时间
1997
+ goalType: detail.goalType, // 目标类型 0数 1率
1998
+ goalVal: detail.goalVal, // 目标数
1999
+ id: detail.id || null, // id
2000
+ requirementDesc: detail.requirementDesc, // 需求描述
2001
+ signCode: null, // -签到二维码地址
2002
+ signCodeFlag: null, // -是否插入签到二维码
2003
+ status: detail.status || null, // 活动状态
2004
+ superviseFlag: boolToString(detail.superviseFlag) || null, // 使用活动执行事件标志
2005
+ superviseStartTime: formatFullDateTime(detail.superviseStartTime) || null, // 监测时间开始
2006
+ superviseEndTime: formatFullDateTime(detail.superviseEndTime) || null, // 监测时间结束
2007
+ actCycleType: detail.actCycleType || null,
2008
+ actCycleValue: detail.actCycleValue || null,
2009
+ actCycleLimitValue: detail.actCycleLimitValue || null, // 参与限制
2010
+ actCycleLimitType: detail.actCycleLimitType || null, // 参与限制
2011
+ actCycleFrequency: detail.corn || '', // cron 表达式
2012
+ actCycleFrequencyJsonString: JSON.stringify(detail.actCycleFrequencyJsonString), // cron 表达式勾选
2013
+ actDefContent: detail.actDefContent, // 活动 h5
2014
+ externalNo: detail.externalNo,
2015
+ externalName: detail.externalName,
2016
+ externalLink: detail.externalLink,
2017
+ areas: formatTargetList(detail.areas || []), // 活动目标
2018
+ targetType: detail.targetType, // 目标类型
2019
+ actTargetDesc: localStorage.getItem('targetHtml'),
2020
+ testRunGroupConfig: detail.testGroupView && detail.testGroupCompents ? {
2021
+ testGroupCompents: detail.testGroupCompents,
2022
+ testGroupView: JSON.stringify(detail.testGroupView)
2023
+ } : null,
2024
+
2025
+ tempType: detail.tempType, // 模板类型
2026
+
2027
+ tempId: detail.tempId || null, // 游戏模板id
2028
+ tempName: detail.tempName || null, // 游戏模板名称
2029
+ deleteActCustomer: JSON.stringify(detail.deleteActCustomer),
2030
+ cstOnly: boolToString(cstonly),
2031
+ appActId: detail.appActId,
2032
+ appActName: detail.appActName,
2033
+ isNeedSmsApprove: detail.isNeedSmsApprove || null, // 是否发送短信
2034
+ expirationTime: formatFullDateTime(detail.expirationTime) || null, // 审批权限
2035
+ versionNo: '2',
2036
+ channelTargetList: getChannelTargetListByNode(data.canvas.nodes, formatFullDateTime), // 渠道目标
2037
+ marketingFlag: detail.marketingFlag, //是否有营销名单
2038
+ dataVersion: detail.dataVersion,
2039
+ monitorType: detail.monitorType, // 监测方式
2040
+ monitorDelay: detail.monitorDelay || null, // 监测时长
2041
+ cycleFlag: boolToString(detail.cycleFlag), // 周期执行
2042
+ cycleRange: detail.cycleRange, // 周期执行 - 执行周期
2043
+ cycleWay: ['week', 'month'].includes(detail.cycleRange) && detail.cycleWay ? detail.cycleWay.join(',') : detail.cycleWay, // 周期执行 - 周期方式
2044
+ cycleTime: detail.cycleTime, // 周期执行 - 开始时间
2045
+ excludeHisCust: boolToString(detail.excludeHisCust),
2046
+ hotDeployType: detail.hotDeployType || '',
2047
+ libId: detail.libId
2048
+ }
2049
+
2050
+ // 节点
2051
+ let actDefNodeList = canvas.nodes.map(node => {
2052
+ let item = {
2053
+ id: node.id,
2054
+ nodeInterface: getInterface(node),
2055
+ nodePositionX: currency(node.x),
2056
+ nodePositionY: currency(node.y),
2057
+ nodeType: getNodeType(node),
2058
+ nodeName: node.label || getMenuNameByKey(node.uniqueKey || node.channelGroup || node.menuKey || node.nodeType),
2059
+ channelGroup: node.channelGroup || node.uniqueKey || node.menuKey,
2060
+ actDefNodeParamsList: getParamsListByNode(node, formatFullDateTime, detail),
2061
+ channelTargetList: getChannelTargetList(node, formatFullDateTime), // 渠道目标
2062
+ nodeNumber: node.nodeNumber,
2063
+ hotDeployExecuteStatus: node.hotDeployExecuteStatus || 0, // 组件启用、停用 0 - 启用 1 - 停用
2064
+ hotDeployDeleteStatus: node.hotDeployDeleteStatus || 0 // 组件是否可以删除 0 - 可以删除 1 - 不可以删除
2065
+ }
2066
+ return item
2067
+ })
2068
+
2069
+ // 连线 //actDefNodeLinkResponseDTOList
2070
+ let actDefNodeLinkList = canvas.edges.map(edge => {
2071
+ let sourceOffset = edge.sourceOffset || {
2072
+ x: 32,
2073
+ y: 0
2074
+ }
2075
+ let targetOffset = edge.targetOffset || {
2076
+ x: -32,
2077
+ y: 0
2078
+ }
2079
+ return {
2080
+ nodeFrom: edge.source,
2081
+ nodeTo: edge.target,
2082
+ fromOffsetX: sourceOffset.x,
2083
+ fromOffsetY: sourceOffset.y,
2084
+ toOffsetX: targetOffset.x,
2085
+ toOffsetY: targetOffset.y,
2086
+ linkType: edge.linkType
2087
+ }
2088
+ })
2089
+
2090
+ // 附加策略
2091
+ let wholeStrategyList = getTagList(data.canvas.nodes)
2092
+ // 客户群组
2093
+ let actCstGroupVoList = getCstGroupList(data.canvas.nodes)
2094
+ // AI客户群组
2095
+ let actCstAIVoList = getCstAIGroupList(data.canvas.nodes)
2096
+ // 复合标签
2097
+ let actCstLabelVoList = getCustomerLabelList(data.canvas.nodes)
2098
+ // 所有客户节点
2099
+ let actCstNodeVoList = getCstNodeIdsList(data.canvas.nodes)
2100
+ // 客户策略分支
2101
+ let groupStrategyList = getStrategyBranchList(data.canvas.nodes)
2102
+
2103
+ let actCstExploreVoList = getCustomerSearch(data.canvas.nodes)
2104
+
2105
+ let actCstExploreShowVoList = getCustomerSearch(data.canvas.nodes)
2106
+
2107
+ return {
2108
+ actBaseInfoVo,
2109
+ actDefNodeList,
2110
+ actDefNodeLinkList, //actDefNodeLinkResponseDTOList
2111
+ actDefNodeLinkResponseDTOList: actDefNodeLinkList,
2112
+ actCstGroupVoList,
2113
+ actCstNodeVoList,
2114
+ actCstLabelVoList,
2115
+ wholeStrategyList,
2116
+ actCstAIVoList,
2117
+ groupStrategyList,
2118
+ actCstExploreVoList,
2119
+ actCstExploreShowVoList,
2120
+ scenePkId: detail.pkId,
2121
+ imagePath: detail.imagePath,
2122
+ orgCodes: Array.isArray(detail.orgCodes) ? detail.orgCodes : detail.orgCodes?.split(',') || [],
2123
+ shareLines: detail.shareLines,
2124
+ libId: detail.libId, // 场景库用到的标签库id
2125
+ tempId: detail.templateId
2126
+ }
2127
+ }
2128
+
2129
+ // 模板入参
2130
+ export const traslateSubmitData_temp = (data = {}, formatFullDateTime, cstonly = false) => {
2131
+ let {
2132
+ canvas,
2133
+ detail
2134
+ } = data
2135
+ // '-' 表示修改时需要带上,新建时无用
2136
+ let actBaseInfoVo = {
2137
+ actAttendFlag: null, // -活动参与标志
2138
+ actBudget: detail.actBudget || null, // 活动预算
2139
+ actCode: null, // -二维码地址
2140
+ actCodeFlag: null, // -是否插入活动二维码
2141
+ actCycleId: detail.actCycleId || null, // 周期活动id
2142
+ actDesc: detail.actDesc || null, // 活动描述
2143
+ actEvaluate: detail.actEvaluate || null, // 营销活动评价
2144
+ actInitiator: detail.actInitiator || null, // -活动创建人账号
2145
+ actInitiatorName: detail.actInitiatorName || null, // -活动创建人姓名
2146
+ actInitiatorOrg: detail.actInitiatorOrg || null, // -活动创建机构号
2147
+ actInitiatorOrgName: detail.actInitiatorOrgName || null, // -活动创建机构名称
2148
+ actName: detail.actName || null, // 活动名称
2149
+ actType: detail.actType, // 活动类型
2150
+ actTypeSub: detail.actTypeSub, // 活动子类型
2151
+ costs: detail.costsResponseDTOS?.length ? detail.costsResponseDTOS.map((item, index) => {
2152
+ return {
2153
+ name: item.costName,
2154
+ miniTypeCode: item.costSecType,
2155
+ typeCode: item.costType,
2156
+ num: item.count,
2157
+ sequence: index,
2158
+ orgName: item.orgName,
2159
+ totalPrice: item.totalPrice,
2160
+ unitPrice: item.unitPrice,
2161
+ orgId: item.orgCode
2162
+ }
2163
+ }) : [],
2164
+ totalCost: detail.totalCost || 0,
2165
+ communityFlag: null,
2166
+ communityCode: null, // 社区 ID
2167
+ communityName: null,
2168
+ createTime: detail.createTime,
2169
+ cstCycleFlag: boolToString(detail.cstCycleFlag), // 客户生命周期标志
2170
+ cstCycleType: detail.cstCycleType, // 客户生命周期类型
2171
+ cstCycleValue: detail.cstCycleValue, // 客户生命周期值
2172
+ earlyTerminateReason: detail.earlyTerminateReason || '', // 提前终止原因
2173
+ executeEndTime: formatFullDateTime(detail.executeEndTime) || null, // 活动结束时间
2174
+ executeFlag: boolToString(detail.executeFlag) || null, // 立刻执行标志
2175
+ executeStartTime: formatFullDateTime(detail.executeStartTime) || null, // 活动执行时间
2176
+ goalType: detail.goalType, // 目标类型 0数 1率
2177
+ goalVal: detail.goalVal, // 目标数
2178
+ id: detail.id || null, // id
2179
+ requirementDesc: detail.requirementDesc, // 需求描述
2180
+ signCode: null, // -签到二维码地址
2181
+ signCodeFlag: null, // -是否插入签到二维码
2182
+ status: detail.status || null, // 活动状态
2183
+ superviseFlag: boolToString(detail.superviseFlag) || null, // 使用活动执行事件标志
2184
+ superviseStartTime: formatFullDateTime(detail.superviseStartTime) || null, // 监测时间开始
2185
+ superviseEndTime: formatFullDateTime(detail.superviseEndTime) || null, // 监测时间结束
2186
+ actCycleType: detail.actCycleType || null,
2187
+ actCycleValue: detail.actCycleValue || null,
2188
+ actCycleLimitValue: detail.actCycleLimitValue || null, // 参与限制
2189
+ actCycleLimitType: detail.actCycleLimitType || null, // 参与限制
2190
+ actCycleFrequency: detail.corn || '', // cron 表达式
2191
+ actCycleFrequencyJsonString: JSON.stringify(detail.actCycleFrequencyJsonString), // cron 表达式勾选
2192
+ actDefContent: detail.actDefContent, // 活动 h5
2193
+ externalNo: detail.externalNo,
2194
+ externalName: detail.externalName,
2195
+ externalLink: detail.externalLink,
2196
+ areas: formatTargetList(detail.areas || []) , // 活动目标
2197
+ actTargetDesc: localStorage.getItem('targetHtml'),
2198
+ tempType: detail.tempType, // 模板类型
2199
+ tempId: detail.tempId || null, // 游戏模板id
2200
+ tempName: detail.tempName || null, // 游戏模板名称
2201
+ deleteActCustomer: JSON.stringify(detail.deleteActCustomer),
2202
+ cstOnly: boolToString(cstonly),
2203
+ appActId: detail.appActId,
2204
+ appActName: detail.appActName,
2205
+ isNeedSmsApprove: detail.isNeedSmsApprove || null, // 是否发送短信
2206
+ expirationTime: formatFullDateTime(detail.expirationTime) || null, // 审批权限
2207
+ channelTargetList: getChannelTargetListByNode(data.canvas.nodes, formatFullDateTime), // 渠道目标
2208
+ versionNo: '2',
2209
+ marketingFlag: detail.marketingFlag, //是否有营销名单
2210
+ orgCodes:detail.orgCodes ? detail.orgCodes.split(','): [] // 分享机构
2211
+ }
2212
+ // 节点
2213
+ let actDefNodeList = canvas.nodes.map(node => {
2214
+ let item = {
2215
+ id: node.id,
2216
+ nodeInterface: getInterface(node),
2217
+ nodePositionX: currency(node.x),
2218
+ nodePositionY: currency(node.y),
2219
+ nodeType: getNodeType(node),
2220
+ nodeName: node.label || getMenuNameByKey(node.uniqueKey || node.channelGroup || node.menuKey || node.nodeType),
2221
+ channelGroup: node.channelGroup || node.uniqueKey || node.menuKey,
2222
+ actDefNodeParamsList: getParamsListByNode(node, formatFullDateTime, detail),
2223
+ channelTargetList: getChannelTargetList(node, formatFullDateTime), // 渠道目标
2224
+ }
2225
+ return item
2226
+ })
2227
+ // 连线
2228
+ let actDefNodeLinkList = canvas.edges.map(edge => {
2229
+ let sourceOffset = edge.sourceOffset || {
2230
+ x: 32,
2231
+ y: 0
2232
+ }
2233
+ let targetOffset = edge.targetOffset || {
2234
+ x: -32,
2235
+ y: 0
2236
+ }
2237
+ return {
2238
+ nodeFrom: edge.source,
2239
+ nodeTo: edge.target,
2240
+ fromOffsetX: sourceOffset.x,
2241
+ fromOffsetY: sourceOffset.y,
2242
+ toOffsetX: targetOffset.x,
2243
+ toOffsetY: targetOffset.y,
2244
+ linkType: edge.linkType
2245
+ }
2246
+ })
2247
+ // 附加策略
2248
+ let wholeStrategyList = getTagList(data.canvas.nodes)
2249
+ // 客户群组
2250
+ let actCstGroupVoList = getCstGroupList(data.canvas.nodes)
2251
+ // AI客户群组
2252
+ let actCstAIVoList = getCstAIGroupList(data.canvas.nodes)
2253
+ // 复合标签
2254
+ let actCstLabelVoList = getCustomerLabelList(data.canvas.nodes)
2255
+ // 所有客户节点
2256
+ let actCstNodeVoList = getCstNodeIdsList(data.canvas.nodes)
2257
+ // 客户策略分支
2258
+ let groupStrategyList = getStrategyBranchList(data.canvas.nodes)
2259
+ let actCstExploreVoList = getCustomerSearch(data.canvas.nodes)
2260
+ let actCstExploreShowVoList = getCustomerSearch(data.canvas.nodes)
2261
+ let actDefCanvasVo = {
2262
+ actBaseInfoVo,
2263
+ actDefNodeList,
2264
+ actDefNodeLinkList,
2265
+ actCstGroupVoList,
2266
+ actCstNodeVoList,
2267
+ actCstLabelVoList,
2268
+ wholeStrategyList,
2269
+ actCstAIVoList,
2270
+ groupStrategyList,
2271
+ actCstExploreVoList,
2272
+ actCstExploreShowVoList,
2273
+ }
2274
+ return {
2275
+ actDefCanvasVo,
2276
+ actDesc: actDefCanvasVo.actBaseInfoVo.actDesc,
2277
+ actName: actDefCanvasVo.actBaseInfoVo.actName,
2278
+ actType: actDefCanvasVo.actBaseInfoVo.actType,
2279
+ areas: actDefCanvasVo.actBaseInfoVo.areas,
2280
+ tempType: actDefCanvasVo.actBaseInfoVo.actType,
2281
+ marketingFlag: actDefCanvasVo.actBaseInfoVo.marketingFlag,
2282
+ orgCodes:actDefCanvasVo.actBaseInfoVo.orgCodes,
2283
+ }
2284
+ }
2285
+
2286
+
2287
+ export const TEMPLATE_TYPE = {
2288
+ 'template-root': '总行模板',
2289
+ 'template-branch': '分行模板',
2290
+ 'template-person': '个人模板'
2291
+ }
2292
+ // 列表转树结构
2293
+ export const listToTree = (props) => {
2294
+ const {
2295
+ data = [],
2296
+ parentKey = 'parentId',
2297
+ childrenKey = 'children',
2298
+ valueKey = 'id',
2299
+ rootValue = null,
2300
+ hasChildren = false,
2301
+ treeType = '',
2302
+ disableTopLevel = false
2303
+ } = props
2304
+ let list = data
2305
+ let map = {}
2306
+ let roots = []
2307
+
2308
+ list.forEach((item, i) => {
2309
+ map[item[valueKey]] = i
2310
+ if (treeType === '') {
2311
+ item[childrenKey] = []
2312
+ }
2313
+ })
2314
+ list.forEach((node) => {
2315
+ let target = node[parentKey]
2316
+ if (target === rootValue) {
2317
+ roots.push(node)
2318
+ } else {
2319
+ if (map[target] !== undefined) {
2320
+ list[map[target]].children.push(node)
2321
+ } else {
2322
+ if (disableTopLevel) node.disabled = true
2323
+ roots.push(node)
2324
+ }
2325
+ }
2326
+ })
2327
+ if (!hasChildren) {
2328
+ list.forEach((item) => {
2329
+ if (!item.children || !item.children.length) {
2330
+ if (treeType === '') {
2331
+ delete item.children
2332
+ }
2333
+ }
2334
+ })
2335
+ }
2336
+ return roots
2337
+ }
2338
+
2339
+ // 【转换】数据的 paramsList 转成 map
2340
+ export const paramsListToMap = (list = []) => {
2341
+ if (!list || !list.length) {
2342
+ return {}
2343
+ }
2344
+ let map = {}
2345
+ list.forEach(item => {
2346
+ map[item.paramCode] = item.paramValue
2347
+ })
2348
+ return map
2349
+ }
2350
+
2351
+ // 【转换】转时间区间
2352
+ export const getDateRange = (start, end) => {
2353
+ start = start ? new Date(start) : ''
2354
+ end = end ? new Date(end) : ''
2355
+ return [start, end]
2356
+ }
2357
+
2358
+ export const getDate = (date) => {
2359
+ return date ? new Date(date) : ''
2360
+ }
2361
+
2362
+ // 回显:转换活动目标到页面上
2363
+ export const formatTargetToPage = (list, customerTagMap) => {
2364
+ if (!list || !list.length) {
2365
+ return []
2366
+ }
2367
+ // 判断是否是已经转化过,避免二次转换,导致target丢失
2368
+ let isTranslate = list.some(item => item.isTranslate)
2369
+ if (isTranslate) return list
2370
+ list.forEach(el => {
2371
+ el.target = el.area?.map(v => {
2372
+ return {
2373
+ isOpen: v.rela,
2374
+ children: v.terms?.map(item => {
2375
+ const {
2376
+ relaType,
2377
+ labelId,
2378
+ matchType,
2379
+ op1,
2380
+ op2,
2381
+ val1,
2382
+ val2
2383
+ } = item
2384
+ const tag = customerTagMap[item.labelId] || {}
2385
+ return {
2386
+ relate: relaType === 'OR' ? 0 : 1,
2387
+ name: item.labelNm || tag.labelNm || '',
2388
+ type: matchType,
2389
+ valType: item.valType || tag.valType || '',
2390
+ detailType: op2 ? {
2391
+ '0': op1,
2392
+ '1': op2
2393
+ } : {
2394
+ '0': op1
2395
+ },
2396
+ detail: val2 ? {
2397
+ '0': val1,
2398
+ '1': val2
2399
+ } : {
2400
+ '0': val1
2401
+ },
2402
+ showTp: item.showType || tag.showTp,
2403
+ codeParam: item.labelCode || tag.condCode,
2404
+ labelCode: item.labelCode || tag.condCode,
2405
+ id: labelId
2406
+ }
2407
+ })
2408
+ }
2409
+ })
2410
+ el.isTranslate = true
2411
+ delete el.area
2412
+ return el
2413
+ })
2414
+ return list
2415
+ }
2416
+
2417
+ // 回显:活动详情
2418
+ export const translateDetail = (detail, customerTagMap, actExcludeActivityList = []) => {
2419
+ let data = {
2420
+ actNumber: detail.actNumber || 0, // 活动展示id
2421
+ actAttendFlag: detail.actAttendFlag || null, // -活动参与标志
2422
+ actBudget: detail.actBudget || null, // 活动预算
2423
+ actCode: detail.actCode || null, // -二维码地址
2424
+ actCodeFlag: detail.actCodeFlag || null, // -是否插入活动二维码
2425
+ actCycleId: detail.actCycleId || null, // 周期活动id
2426
+ actDesc: detail.actDesc || null, // 活动描述
2427
+ actEvaluate: detail.actEvaluate || null, // 营销活动评价
2428
+ actInitiator: detail.actInitiator || null, // -活动创建人账号
2429
+ actInitiatorName: detail.actInitiatorName || null, // -活动创建人姓名
2430
+ actInitiatorOrg: detail.actInitiatorOrg || null, // -活动创建机构号
2431
+ actInitiatorOrgName: detail.actInitiatorOrgName || null, // -活动创建机构名称
2432
+ actName: detail.actName || null, // 活动名称
2433
+ budgetAmount: Number(detail.budgetAmount),
2434
+ targetConfirmType: detail.targetConfirmType,
2435
+ actType: detail.actType, // 活动类型
2436
+ actTypeSub: detail.actTypeSub, // 活动子类型
2437
+ communityFlag: detail.communityFlag || null,
2438
+ communityCode: detail.communityCode || null, // 社区 ID
2439
+ communityName: detail.communityName || null,
2440
+ createTime: detail.createTime, //创建时间
2441
+ cstCycleFlag: stringToBoolean(detail.cstCycleFlag), // 客户生命周期标志
2442
+ cstCycleType: detail.cstCycleType, // 客户生命周期类型
2443
+ cstCycleValue: detail.cstCycleValue, // 客户生命周期值
2444
+ earlyTerminateReason: detail.earlyTerminateReason || '', // 提前终止原因
2445
+ executeEndTime: getDate(detail.executeEndTime) || null, // 活动结束时间
2446
+ executeFlag: stringToBoolean(detail.executeFlag) || null, // 立刻执行标志
2447
+ executeStartTime: getDate(detail.executeStartTime) || null, // 活动执行时间
2448
+ goalType: detail.goalType, // 目标类型 0数 1率
2449
+ goalVal: detail.goalVal, // 目标数
2450
+ id: detail.id || null, // id
2451
+ requirementDesc: detail.requirementDesc, // 需求描述
2452
+ signCode: detail.signCode || null, // -签到二维码地址
2453
+ signCodeFlag: detail.signCodeFlag || null, // -是否插入签到二维码
2454
+ status: detail.status || null, // 活动状态
2455
+ superviseFlag: stringToBoolean(detail.superviseFlag) || null, // 使用活动执行事件标志
2456
+ superviseStartTime: getDate(detail.superviseStartTime) || null, // 监测时间开始
2457
+ superviseEndTime: getDate(detail.superviseEndTime) || null, // 监测时间结束
2458
+ actCycleType: detail.actCycleType || null,
2459
+ actCycleValue: detail.actCycleValue || null,
2460
+ actCycleLimitValue: detail.actCycleLimitValue || null, // 参与限制
2461
+ actCycleLimitType: detail.actCycleLimitType || null, // 参与限制
2462
+ corn: detail.actCycleFrequency, // cron 表达式
2463
+ costsResponseDTOS: detail.costsResponseDTOS, // 成本管理
2464
+ actDefContent: detail.actDefContent || {}, // 活动 h5
2465
+ externalNo: detail.externalNo || '',
2466
+ externalName: detail.externalName || '',
2467
+ externalLink: detail.externalLink || '',
2468
+ areas: detail.areas, // 活动目标
2469
+ target: detail.areas, // 活动目标
2470
+ tempType: detail.tempType, // 模板类型
2471
+ testGroupView: detail.testRunGroupConfig && detail.testRunGroupConfig.testGroupView ? JSON.parse(detail.testRunGroupConfig.testGroupView) : '',
2472
+ testGroupCompents: detail.testRunGroupConfig && detail.testRunGroupConfig.testGroupCompents ? detail.testRunGroupConfig.testGroupCompents : '',
2473
+
2474
+ tempId: detail.tempId, // 游戏模板id
2475
+ tempName: detail.tempName, // 游戏模板名称
2476
+ deleteActCustomer: (actExcludeActivityList || []).map(row => {
2477
+ return row ? {
2478
+ ...row,
2479
+ id: row.excludeActId,
2480
+ actName: row.excludeActName
2481
+ } : {}
2482
+ }),
2483
+ marketingFlag: detail.marketingFlag,
2484
+ appActId: detail.appActId,
2485
+ appActName: detail.appActName,
2486
+ cstonly: stringToBoolean(detail.cstOnly), // 模板总分行模式
2487
+ isNeedSmsApprove: detail.isNeedSmsApprove, // 是否发送短信
2488
+ expirationTime: getDate(detail.expirationTime) || null, // 审批权限
2489
+ totalCost: detail.totalCost, //成本合计
2490
+ // 以下为模板最新返回参数 暂时这样写
2491
+ crtBy: detail.crtBy || '',
2492
+ crtByName: detail.crtByName || '',
2493
+ crtOrg: detail.crtOrg || '',
2494
+ crtOrgName: detail.crtOrgName || '',
2495
+ dataVersion: detail.dataVersion,
2496
+ monitorType: detail.monitorType, // 监测方式
2497
+ monitorDelay: detail.monitorDelay ? String(detail.monitorDelay) : '', // 监测时长
2498
+ cycleFlag: stringToBoolean(detail.cycleFlag), // 周期执行
2499
+ cycleRange: detail.cycleRange, // 周期执行 - 执行周期
2500
+ cycleWay: ['week', 'month'].includes(detail.cycleRange) ? (detail.cycleWay ? detail.cycleWay.split(',') : []) : detail.cycleWay, // 周期执行 - 周期方式
2501
+ cycleTime: detail.cycleTime, // 周期执行 - 开始时间
2502
+ excludeHisCust: stringToBoolean(String(detail.excludeHisCust)),
2503
+ actNumber: detail.actNumber,
2504
+ hotDeployType: detail.hotDeployType || '',
2505
+ orgCodes: detail?.orgCodes?.join(',') || '',
2506
+ libId: detail.libId || ''
2507
+ }
2508
+ // // cron 表达式勾选
2509
+ if (detail.actCycleFrequencyJsonString) {
2510
+ data.actCycleFrequencyJsonString = JSON.parse(detail.actCycleFrequencyJsonString)
2511
+ }
2512
+ return data
2513
+ }
2514
+
2515
+ // 回显:【转换】将接口的数据转化为页面上的数据 actDefNodeLinkResponseDTOList
2516
+ export const translatePageData = (data = {}, customerTagMap, edgeKey = 'actDefNodeLinkList', nodeKey = 'actDefNodeList') => {
2517
+ let {
2518
+ actBaseInfoVo,
2519
+ questionList,
2520
+ wholeStrategyList,
2521
+ actCstGroupVoList,
2522
+ actCstLabelVoList,
2523
+ actExcludeActivityList,
2524
+ actCstExploreShowVoList,
2525
+ introduction
2526
+ } = data
2527
+ // // 初始化客户探索数据
2528
+ // localStorage.removeItem('cust-nodeId-copy')
2529
+ // if (actCstExploreShowVoList && actCstExploreShowVoList.length) {
2530
+ // for (let i = 0; i < actCstExploreShowVoList.length; i++) {
2531
+ // actCstExploreShowVoList[i].isOrigin = true
2532
+ // }
2533
+ // if (actCstExploreShowVoList.length && actCstExploreShowVoList[0].nodeId.slice(0, 4) === 'copy') {
2534
+ // localStorage.setItem('cust-nodeId-copy', JSON.stringify(actCstExploreShowVoList))
2535
+ // } else {
2536
+ // localStorage.setItem('cust-nodeId', JSON.stringify(actCstExploreShowVoList))
2537
+ // }
2538
+ // }
2539
+ let nodeLinkList = data[edgeKey] || []
2540
+ let nodeList = data[nodeKey] || []
2541
+ let edges = nodeLinkList.map(item => {
2542
+ return {
2543
+ label: item.cstNum,
2544
+ source: item.nodeFrom,
2545
+ target: item.nodeTo,
2546
+ linkType: item.linkType,
2547
+ sourceOffset: {
2548
+ x: stringToNumber(item.fromOffsetX) || 32,
2549
+ y: stringToNumber(item.fromOffsetY)
2550
+ },
2551
+ targetOffset: {
2552
+ x: stringToNumber(item.toOffsetX) || -32,
2553
+ y: stringToNumber(item.toOffsetY)
2554
+ }
2555
+ }
2556
+ })
2557
+ nodeList = nodeList.map(item => {
2558
+ let nodeItem = {
2559
+ ...item,
2560
+ nodeType: item.channelGroup || item.nodeType
2561
+ }
2562
+ if(item.nodeType==='channel') nodeItem.nodeType=item.nodeType
2563
+ return nodeItem
2564
+ })
2565
+ let nodes = nodeList.map(item => {
2566
+ let node = {
2567
+ id: item.id,
2568
+ menuKey: item.nodeType,
2569
+ label: item.nodeName,
2570
+ channelGroup: item.channelGroup,
2571
+ nodeInterface: item.nodeInterface,
2572
+ status: item.status,
2573
+ x: stringToNumber(item.nodePositionX),
2574
+ y: stringToNumber(item.nodePositionY),
2575
+ nodeNumber: actBaseInfoVo?.status == '0' ? '' : item.nodeNumber,
2576
+ form: getNodeForm(item, customerTagMap, {
2577
+ questionList,
2578
+ wholeStrategyList,
2579
+ actCstGroupVoList,
2580
+ actCstLabelVoList,
2581
+ actCstExploreShowVoList,
2582
+ introduction
2583
+ }),
2584
+ parentNodeId: getParentNodeId(item.id, nodeLinkList),
2585
+ models:[],
2586
+ hotDeployExecuteStatus: actBaseInfoVo?.queryMode === 'copy' ? 0 : item.hotDeployExecuteStatus || 0, // 组件启用、停用 0 - 启用 1 - 停用
2587
+ hotDeployDeleteStatus: item.hotDeployDeleteStatus || 0 // 组件是否可以删除 0 - 可以删除 1 - 不可以删除
2588
+ }
2589
+ //赋值渠道组件的配置
2590
+ if(item.nodeType==='channel' && node.form.models) {
2591
+ node.models = node.form.models
2592
+ node.icon = node.form.compIocn
2593
+ }
2594
+ if (item.nodeName === '开始' || item.nodeName === '结束') {
2595
+ node.type = 'point'
2596
+ }
2597
+ return node
2598
+ })
2599
+ let detail
2600
+ if (customerTagMap) {
2601
+ detail = translateDetail(actBaseInfoVo, customerTagMap, actExcludeActivityList)
2602
+ }
2603
+ return {
2604
+ edges,
2605
+ nodes,
2606
+ detail,
2607
+ actCstExploreShowVoList
2608
+ }
2609
+ }
2610
+
2611
+ //获取node节点所关联的父节点ID
2612
+ export const getParentNodeId = (id, nodeLinkList) => {
2613
+ let filterTargetArr = nodeLinkList.filter(item => item.nodeTo === id)
2614
+ let parentNodeId = filterTargetArr.length ? filterTargetArr[0].nodeFrom : null
2615
+ return parentNodeId
2616
+ }
2617
+
2618
+ // 回显:【转换】将接口的数据转化为页面上的数据 for 模板详情
2619
+ export const translatePageDataForTemplate = (data = {}, customerTagMap, edgeKey = 'actDefNodeLinkList', nodeKey = 'actDefNodeList') => {
2620
+ let {
2621
+ actBaseInfoVo,
2622
+ questionList,
2623
+ wholeStrategyList,
2624
+ actCstGroupVoList,
2625
+ actCstLabelVoList,
2626
+ actExcludeActivityList,
2627
+ actCstExploreShowVoList,
2628
+ introduction
2629
+ } = data
2630
+ let canvasData = data
2631
+
2632
+ // if (actCstExploreShowVoList && actCstExploreShowVoList.length) {
2633
+ // for (let i = 0; i < actCstExploreShowVoList.length; i++) {
2634
+ // actCstExploreShowVoList[i].isOrigin = true
2635
+ // }
2636
+ // if (actCstExploreShowVoList.length && actCstExploreShowVoList[0].nodeId.slice(0, 4) === 'copy') {
2637
+ // localStorage.setItem('cust-nodeId-copy', JSON.stringify(actCstExploreShowVoList))
2638
+ // } else {
2639
+ // localStorage.setItem('cust-nodeId', JSON.stringify(actCstExploreShowVoList))
2640
+ // }
2641
+ // }
2642
+ let nodeLinkList = canvasData[edgeKey] || []
2643
+ let nodeList = canvasData[nodeKey] || []
2644
+ let edges = nodeLinkList.map(item => {
2645
+ return {
2646
+ label: item.cstNum,
2647
+ source: item.nodeFrom,
2648
+ target: item.nodeTo,
2649
+ linkType: item.linkType,
2650
+ sourceOffset: {
2651
+ x: stringToNumber(item.fromOffsetX) || 32,
2652
+ y: stringToNumber(item.fromOffsetY)
2653
+ },
2654
+ targetOffset: {
2655
+ x: stringToNumber(item.toOffsetX) || -32,
2656
+ y: stringToNumber(item.toOffsetY)
2657
+ }
2658
+ }
2659
+ })
2660
+ nodeList = nodeList.map(item => {
2661
+ let nodeItem = {
2662
+ ...item,
2663
+ nodeType: item.channelGroup || item.nodeType
2664
+ }
2665
+ if(item.nodeType==='channel') nodeItem.nodeType=item.nodeType
2666
+ return nodeItem
2667
+ })
2668
+ let nodes = nodeList.map(item => {
2669
+ let node = {
2670
+ id: item.id,
2671
+ menuKey: item.nodeType,
2672
+ label: item.nodeName,
2673
+ channelGroup: item.channelGroup,
2674
+ nodeInterface: item.nodeInterface,
2675
+ status: item.status,
2676
+ x: stringToNumber(item.nodePositionX),
2677
+ y: stringToNumber(item.nodePositionY),
2678
+ form: getNodeForm(item, customerTagMap, {
2679
+ questionList,
2680
+ wholeStrategyList,
2681
+ actCstGroupVoList,
2682
+ actCstLabelVoList,
2683
+ actCstExploreShowVoList,
2684
+ introduction
2685
+ })
2686
+ }
2687
+ if (item.nodeName === '开始' || item.nodeName === '结束') {
2688
+ node.type = 'point'
2689
+ }
2690
+ //赋值渠道组件的配置
2691
+ if(item.nodeType==='channel' && node.form.models) {
2692
+ node.models = node.form.models
2693
+ node.icon = node.form.compIocn
2694
+ }
2695
+ return node
2696
+ })
2697
+ let detail
2698
+ if (customerTagMap) {
2699
+ detail = translateDetail(actBaseInfoVo, customerTagMap, actExcludeActivityList)
2700
+ detail.actInitiator = actBaseInfoVo.crtBy
2701
+ detail.actInitiatorName = actBaseInfoVo.crtByName
2702
+ detail.actInitiatorOrg = actBaseInfoVo.crtOrg
2703
+ detail.actInitiatorOrgName = actBaseInfoVo.crtOrgName
2704
+ }
2705
+ return {
2706
+ edges,
2707
+ nodes,
2708
+ detail,
2709
+ actCstExploreShowVoList
2710
+ }
2711
+ }
2712
+
2713
+ // 回显:【转换】将接口的数据转化为页面上的数据 for 场景库
2714
+ export const translatePageDataForScene = (data = {}, customerTagMap, edgeKey = 'actDefNodeLinkList', nodeKey = 'actDefNodeList') => {
2715
+ let {
2716
+ actBaseInfoVo,
2717
+ questionList,
2718
+ wholeStrategyList,
2719
+ actCstGroupVoList,
2720
+ actCstLabelVoList,
2721
+ actExcludeActivityList,
2722
+ actCstExploreShowVoList
2723
+ } = data
2724
+ let canvasData = data
2725
+
2726
+ // if (actCstExploreShowVoList && actCstExploreShowVoList.length) {
2727
+ // for (let i = 0; i < actCstExploreShowVoList.length; i++) {
2728
+ // actCstExploreShowVoList[i].isOrigin = true
2729
+ // }
2730
+ // if (actCstExploreShowVoList.length && actCstExploreShowVoList[0].nodeId.slice(0, 4) === 'copy') {
2731
+ // localStorage.setItem('cust-nodeId-copy', JSON.stringify(actCstExploreShowVoList))
2732
+ // } else {
2733
+ // localStorage.setItem('cust-nodeId', JSON.stringify(actCstExploreShowVoList))
2734
+ // }
2735
+ // }
2736
+ let nodeLinkList = canvasData[edgeKey] || []
2737
+ let nodeList = canvasData[nodeKey] || []
2738
+ let edges = nodeLinkList.map(item => {
2739
+ return {
2740
+ label: item.cstNum,
2741
+ source: item.nodeFrom,
2742
+ target: item.nodeTo,
2743
+ linkType: item.linkType,
2744
+ sourceOffset: {
2745
+ x: stringToNumber(item.fromOffsetX) || 32,
2746
+ y: stringToNumber(item.fromOffsetY)
2747
+ },
2748
+ targetOffset: {
2749
+ x: stringToNumber(item.toOffsetX) || -32,
2750
+ y: stringToNumber(item.toOffsetY)
2751
+ }
2752
+ }
2753
+ })
2754
+ nodeList = nodeList.map(item => {
2755
+ let nodeItem = {
2756
+ ...item,
2757
+ nodeType: item.channelGroup || item.nodeType
2758
+ }
2759
+ if(item.nodeType==='channel') nodeItem.nodeType=item.nodeType
2760
+ return nodeItem
2761
+ })
2762
+ let nodes = nodeList.map(item => {
2763
+ let node = {
2764
+ id: item.id,
2765
+ menuKey: item.nodeType,
2766
+ label: item.nodeName,
2767
+ channelGroup: item.channelGroup,
2768
+ nodeInterface: item.nodeInterface,
2769
+ status: item.status,
2770
+ x: stringToNumber(item.nodePositionX),
2771
+ y: stringToNumber(item.nodePositionY),
2772
+ form: getNodeForm(item, customerTagMap, {
2773
+ questionList,
2774
+ wholeStrategyList,
2775
+ actCstGroupVoList,
2776
+ actCstLabelVoList,
2777
+ actCstExploreShowVoList
2778
+ })
2779
+ }
2780
+ //赋值渠道组件的配置
2781
+ if(item.nodeType==='channel' && node.form.models) {
2782
+ node.models = node.form.models
2783
+ node.icon = node.form.compIocn
2784
+ }
2785
+ if (item.nodeName === '开始' || item.nodeName === '结束') {
2786
+ node.type = 'point'
2787
+ }
2788
+ return node
2789
+ })
2790
+ let detail
2791
+ if (customerTagMap) {
2792
+ detail = translateDetail(actBaseInfoVo, customerTagMap, actExcludeActivityList)
2793
+ detail.actInitiator = data.crtBy
2794
+ detail.actInitiatorName = data.crtByName
2795
+ detail.actInitiatorOrg = data.crtOrg
2796
+ detail.actInitiatorOrgName = data.crtOrgName
2797
+ }
2798
+ return {
2799
+ edges,
2800
+ nodes,
2801
+ detail,
2802
+ actCstExploreShowVoList
2803
+ }
2804
+ }
2805
+
2806
+ const NOT_START_EDGE_MESSAGE = '缺少开始节点连线'
2807
+ const NOT_END_EDGE_MESSAGE = '缺少结束节点连线'
2808
+ const NODE_LESS_MESSAGE = '至少需要一个节点'
2809
+ const EDGE_LESS_MESSAGE = '缺少连线'
2810
+ const START_TO_END_MESSAGE = '开始节点前面不能是结束节点'
2811
+ const STRATEGY_ERROR_MESSAGE = '响应策略前面只能连接渠道节点'
2812
+ const CHANNEL_ERROR_MESSAGE = '渠道节点选择指定执行人时前面有且只有一个客户节点'
2813
+ const MERGE_ERROR_MESSAGE = '等待某个事件发生、汇聚、按事件响应分流、按渠道响应分流、等待到某个时间中每日轮询不允许进行汇聚,请重新调整活动内容'
2814
+ const MERGE_ERROR_MESSAGE1 = '汇聚组件前的组件连接有误,请重新调整活动内容'
2815
+ const NODE_NAME_REPEART_MESSAGE = '不能存在重复名字的节点'
2816
+
2817
+ export const checkValidateChannelComp = (data,checkFunc,getMenuByKey) => {
2818
+ let { canvas } = data;
2819
+ let { nodes } = canvas;
2820
+ const channelNodes = nodes.filter((node)=>node.menuKey==='channel')
2821
+ let flag = true
2822
+ let text = ''
2823
+ channelNodes.forEach((node)=>{
2824
+ const menu = getMenuByKey(node.uniqueKey || node.channelGroup)
2825
+ if(!checkFunc(node.form,menu)) {
2826
+ flag = false
2827
+ text = node.label
2828
+ }
2829
+ })
2830
+ return { flag, text };
2831
+ }
2832
+
2833
+ export const checkValidateChannelTarget = (data) => {
2834
+ let { canvas, detail } = data;
2835
+ let { nodes } = canvas;
2836
+ const channelNodes = nodes.filter((node)=>node.menuKey==='channel')
2837
+ let flag = true
2838
+ let nodeId = ''
2839
+ channelNodes.forEach((node)=>{
2840
+ let channelTargetData = node.form.channelTargetData || []
2841
+ channelTargetData.forEach(item => {
2842
+ let isHaveEqual = detail.areas.filter(i => i.actTargetDesc === item.targetName) || []
2843
+ if (isHaveEqual.length === 0) {
2844
+ flag = false
2845
+ nodeId = node.id
2846
+ return { flag, nodeId }
2847
+ }
2848
+ })
2849
+ })
2850
+ return { flag, nodeId };
2851
+ }
2852
+ // 【校验】校验页面的每一项数据是否正确
2853
+ export const checkData = async (data, validateSideForm, messageAlert, nameRepeat, checkType = '') => {
2854
+ let {
2855
+ canvas,
2856
+ graph
2857
+ } = data
2858
+ let {
2859
+ edges,
2860
+ nodes
2861
+ } = canvas
2862
+ let startNode = nodes.find(node => node.type === 'point' && node.label === '开始')
2863
+ let endNode = nodes.find(node => node.type === 'point' && node.label === '结束')
2864
+
2865
+ // 校验是否有开始连线
2866
+ let isNotStartEdge = checkStartEdge(startNode, edges)
2867
+ if (!isNotStartEdge) {
2868
+ messageAlert(NOT_START_EDGE_MESSAGE)
2869
+ return false
2870
+ }
2871
+
2872
+ // 校验是不是有结束连线
2873
+ let iFINndEdge = checkEndEdge(endNode, edges)
2874
+ if (!iFINndEdge) {
2875
+ messageAlert(NOT_END_EDGE_MESSAGE)
2876
+ return false
2877
+ }
2878
+
2879
+ // 校验是不是缺少节点
2880
+ let isNodeLess = checkNodeLess(nodes)
2881
+ if (!isNodeLess) {
2882
+ messageAlert(NODE_LESS_MESSAGE)
2883
+ return false
2884
+ }
2885
+
2886
+ // 校验是不是少线
2887
+ let isEdgeLess = checkEdgeLess(nodes, edges, graph)
2888
+ if (!isEdgeLess) {
2889
+ messageAlert(EDGE_LESS_MESSAGE)
2890
+ return false
2891
+ }
2892
+
2893
+ // 开始不能直接结束
2894
+ let isStartToEnd = checkStartToEnd(startNode, endNode, edges)
2895
+ if (!isStartToEnd) {
2896
+ messageAlert(START_TO_END_MESSAGE)
2897
+ return false
2898
+ }
2899
+
2900
+ // 客户后面不能有行为策略
2901
+ let isStrategyError = checkStrategyError(graph.getNodes())
2902
+
2903
+ if (!isStrategyError) {
2904
+ messageAlert(STRATEGY_ERROR_MESSAGE)
2905
+ return false
2906
+ }
2907
+
2908
+ // 渠道前面只能有一个客户节点
2909
+ let isChannelError = checkChannelError(graph.getNodes())
2910
+
2911
+ if (!isChannelError) {
2912
+ messageAlert(CHANNEL_ERROR_MESSAGE)
2913
+ return false
2914
+ }
2915
+
2916
+ // 汇聚前序组件验证
2917
+ let isMergeError = checkMergeError(nodes, edges)
2918
+ // 流向汇聚的流程和连接到汇聚的线是否一致
2919
+ if (isMergeError == 'edgeError') {
2920
+ messageAlert(MERGE_ERROR_MESSAGE1)
2921
+ return false
2922
+ }
2923
+ // 汇聚前序组件不能有渠道响应分流/事件响应分流/等待某个事件发生/汇聚
2924
+ if (isMergeError == 'nodeError') {
2925
+ messageAlert(MERGE_ERROR_MESSAGE)
2926
+ return false
2927
+ }
2928
+
2929
+ // 校验页面表单
2930
+ if (validateSideForm) {
2931
+ let text = await checkForm(nodes, validateSideForm, checkType)
2932
+ if (text === 'noNeedTip') {
2933
+ return false
2934
+ }
2935
+ if (text) {
2936
+ messageAlert(`请完善【${text}】的表单信息`)
2937
+ return false
2938
+ }
2939
+ }
2940
+
2941
+ // 随机样本率校检
2942
+ let isSampleType = checkSampleType(nodes)
2943
+ if (!isSampleType) {
2944
+ messageAlert('随机分流样本率总和不能超过100%')
2945
+ return false
2946
+ }
2947
+
2948
+ let isValidateBranchNum = checkBranchNum(nodes, edges)
2949
+ if (!isValidateBranchNum) {
2950
+ messageAlert('必须存在条件分支')
2951
+ return false
2952
+ }
2953
+
2954
+ return true
2955
+ }
2956
+
2957
+ // 【校验】是不是开始节点没有连线
2958
+ const checkStartEdge = (startNode, edges) => {
2959
+ let {
2960
+ afterEdges
2961
+ } = getNodeBeforeAndAfterEdges(startNode, edges)
2962
+ return afterEdges.length > 0
2963
+ }
2964
+
2965
+ // 【校验】是不是结束节点没有连线
2966
+ const checkEndEdge = (endNode, edges) => {
2967
+ let {
2968
+ beforeEdges
2969
+ } = getNodeBeforeAndAfterEdges(endNode, edges)
2970
+ return beforeEdges.length > 0
2971
+ }
2972
+
2973
+ // 【校验】结束前面节点不能是开始节点
2974
+ const checkStartToEnd = (startNode, endNode, edges) => {
2975
+ let {
2976
+ beforeEdges
2977
+ } = getNodeBeforeAndAfterEdges(endNode, edges)
2978
+ return beforeEdges[0].source !== startNode.id
2979
+ }
2980
+
2981
+ // 【校验】行为策略前面只能是渠道节点
2982
+ const checkStrategyError = (nodes) => {
2983
+ for (let i = 0; i < nodes.length; i++) {
2984
+ let node = nodes[i]
2985
+ let model = node.getModel()
2986
+ if (model.menuKey === 'strategyBranch' && model.form.strategyGroup && model.form.strategyGroup.some(item => item.type === 'behaviorStrategy')) {
2987
+ let strategyEdges = node.getInEdges()[0].getSource().getInEdges()
2988
+ for (let j = 0; j < strategyEdges.length; j++) {
2989
+ if (strategyEdges[j].getSource().getModel().menuKey !== 'channel') {
2990
+ return false
2991
+ }
2992
+ }
2993
+ }
2994
+ }
2995
+ return true
2996
+ }
2997
+
2998
+ // 【校验】渠道节点选择指定执行人时前面只能有一个客户节点
2999
+ const checkChannelError = (nodes) => {
3000
+ let channelCount = 0
3001
+ let cstCount = 0
3002
+ let contentCount = 0
3003
+ let isExecPersionChannelLeaf = false
3004
+ for (let i = 0; i < nodes.length; i++) {
3005
+ let node = nodes[i]
3006
+ let model = node.getModel()
3007
+ if (model.menuKey === 'channel') {
3008
+ channelCount++
3009
+ }
3010
+ if (model.menuKey === 'cst') {
3011
+ cstCount++
3012
+ }
3013
+ if (model.menuKey === 'content') {
3014
+ contentCount++
3015
+ }
3016
+ if (model.menuKey === 'channel' && model.form.useType === '11') {
3017
+ isExecPersionChannelLeaf = true
3018
+ let z = 0
3019
+ let strategyEdges = node.getInEdges()
3020
+ for (let j = 0; j < strategyEdges.length; j++) {
3021
+ if (strategyEdges[j].getSource().getModel().menuKey === 'cst' || strategyEdges[j].getSource().getModel().menuKey === 'content') {
3022
+ z++
3023
+ } else {
3024
+ return false
3025
+ }
3026
+ }
3027
+ if (z !== 1) {
3028
+ return false
3029
+ }
3030
+ }
3031
+ }
3032
+ if (isExecPersionChannelLeaf) {
3033
+ if (channelCount > 1 || cstCount > 1 || contentCount > 1) {
3034
+ return false
3035
+ }
3036
+ }
3037
+ return true
3038
+ }
3039
+
3040
+ // 【校验】流向汇聚的流程和连接到汇聚的线必须一致|汇聚节点前面不能有渠道响应分流/事件响应分流/等待某个事件发生/汇聚
3041
+ const checkMergeError = (nodes, edges) => {
3042
+ let result = true
3043
+ let error = ''
3044
+ const loop = (node, edges) => {
3045
+ let beforeNodes = edges.filter(e => node.id === e.target)
3046
+ if (beforeNodes.length > 1 && node.menuKey !== 'merge') {
3047
+ error = 'edgeError'
3048
+ return error
3049
+ }
3050
+ beforeNodes.forEach((sourceEdge, index) => {
3051
+ let sourceNode = nodes.filter(e => e.id === sourceEdge.source)[0]
3052
+ if (
3053
+ sourceNode?.menuKey === 'evtRespFlowBranchResp' ||
3054
+ sourceNode?.menuKey === 'evtRespFlowBranchNoResp' ||
3055
+ sourceNode?.menuKey === 'chnlRespFlowBranch' ||
3056
+ sourceNode?.menuKey === 'waitEvent' ||
3057
+ sourceNode?.menuKey === 'merge' ||
3058
+ (sourceNode?.menuKey === 'waitToTime' && sourceNode?.form && sourceNode?.form.dayCycle === '1')
3059
+ ) {
3060
+ error = 'nodeError'
3061
+ return
3062
+ } else if (sourceNode.label === '开始') {
3063
+ return
3064
+ } else {
3065
+ return loop(sourceNode, edges)
3066
+ }
3067
+ })
3068
+ return error
3069
+ }
3070
+ for (let i = 0; i < nodes.length; i++) {
3071
+ let node = nodes[i]
3072
+ if (node.menuKey === 'merge') {
3073
+ result = loop(node, edges)
3074
+ }
3075
+ }
3076
+ return result
3077
+ }
3078
+
3079
+ // 【校验】确认所有节点都有连线
3080
+ export const checkEdgeLess = (nodes, edges, graph) => {
3081
+ return graph.getNodes().every(node => {
3082
+ let model = node.getModel()
3083
+ if (model.type === 'point') {
3084
+ return true
3085
+ } else if (node.getInEdges().length < 1 || node.getOutEdges().length < 1) {
3086
+ return false
3087
+ } else {
3088
+ return true
3089
+ }
3090
+ })
3091
+ }
3092
+
3093
+ // 【校验】至少需要 3 个节点
3094
+ export const checkNodeLess = (nodes) => {
3095
+ return nodes.length > 2
3096
+ }
3097
+
3098
+ // 获取节点的前后线
3099
+ const getNodeBeforeAndAfterEdges = (node, edges) => {
3100
+ let beforeEdges = []
3101
+ let afterEdges = []
3102
+ edges.forEach(edge => {
3103
+ if (edge.target === node.id) {
3104
+ beforeEdges.push(edge)
3105
+ }
3106
+ if (edge.source === node.id) {
3107
+ afterEdges.push(edge)
3108
+ }
3109
+ })
3110
+ return {
3111
+ beforeEdges,
3112
+ afterEdges
3113
+ }
3114
+ }
3115
+
3116
+ export const checkNodeName = (nodes) => {
3117
+ let map = {}
3118
+ for (let i = 0; i < nodes.length; i++) {
3119
+ let node = nodes[i]
3120
+ if (map[node.label]) {
3121
+ return false
3122
+ }
3123
+ map[node.label] = node.label
3124
+ }
3125
+ return true
3126
+ }
3127
+
3128
+ // 【校验】所有表单
3129
+ export const checkForm = async (nodes, validateSideForm, checkType) => {
3130
+ console.log({nodes,validateSideForm,checkType})
3131
+ let valid = await validateSideForm('detail')
3132
+ if (!valid) {
3133
+ return '详情'
3134
+ }
3135
+ for (let i = 0; i < nodes.length; i++) {
3136
+ let node = nodes[i]
3137
+ if (node.type !== 'point' && checkType === 'test' && ['cst', 'activityCst', 'flowCst', 'composeCst'].includes(node.menuKey)) {
3138
+ } else if (node.type !== 'point') {
3139
+ let valid = await validateSideForm(node.uniqueKey || node.channelGroup || node.menuKey || node.nodeType, node, checkType)
3140
+ if(node.menuKey==='channel') valid=await validateSideForm(node.menuKey, node)
3141
+ if (valid == undefined) {
3142
+ return
3143
+ }
3144
+ if (valid === 'noNeedTip') {
3145
+ return 'noNeedTip'
3146
+ }
3147
+ if (!valid) {
3148
+ if(node.menuKey==='channel') return getMenuNameByKey(node.menuKey)
3149
+ return getMenuNameByKey(node.uniqueKey || node.channelGroup || node.menuKey || node.nodeType)
3150
+ }
3151
+ }
3152
+ }
3153
+ // 最后再回到主表单
3154
+ validateSideForm('detail')
3155
+ return ''
3156
+ }
3157
+
3158
+ // 【校验】随机分流样本类型是样本率时,所有分支的样本率相加不能超过100%
3159
+ const checkSampleType = (nodes) => {
3160
+ let result = true
3161
+ let rdmNodes = nodes.filter(e => e?.menuKey === "randomFlow" && e.form.sampleType === '1')
3162
+ let randomFlowBranchs = nodes.filter(e => e?.menuKey === "randomFlowBranch" && e.form.sampleType === '1')
3163
+ if (rdmNodes.length > 0) {
3164
+ rdmNodes.forEach(e => {
3165
+ let branchIds = e.form.data.map(e => e.id)
3166
+ let branchs = randomFlowBranchs.filter(e => branchIds.includes(e.form.rowId))
3167
+ let sampleValueArr = branchs.map(e => e.form.sampleValue)
3168
+ let sum = sampleValueArr.length ? sampleValueArr.reduce((a, b) => a / 1 + b / 1) : 0
3169
+ if (sum > 100) {
3170
+ result = false
3171
+ }
3172
+ })
3173
+ }
3174
+ return result
3175
+ }
3176
+
3177
+ // 【校验】随即分流、客群分流、标签分流后续分支至少有一个条件分支
3178
+ const checkBranchNum = (nodes, edges) => {
3179
+ let flowNodes = nodes.filter((node) => ['randomFlow', 'custFlow', 'labelFlow'].includes(node.menuKey))
3180
+ let validate = true
3181
+ if (flowNodes && flowNodes.length) {
3182
+ flowNodes.forEach((node) => {
3183
+ let num = edges.filter(edge => node.id === edge.source)
3184
+ if (num && num.length === 1) {
3185
+ validate = false
3186
+ }
3187
+ })
3188
+ } else {
3189
+ return true
3190
+ }
3191
+ return validate
3192
+ }
3193
+
3194
+ // 监测时间校验
3195
+ export const validateWatchDate = function (rule, value, callback) {
3196
+ let context = this.$refs.form ? this.$refs.form : this.$refs.main
3197
+ let form = context.getForm()
3198
+ let runDate = form.runDate || []
3199
+ if (!value[0]) {
3200
+ callback(new Error('请选择活动监测时间'))
3201
+ } else if (!runDate[0]) {
3202
+ callback(new Error('请先选择执行时间'))
3203
+ } else {
3204
+ if (runDate[0] > value[0]) {
3205
+ callback(new Error('监测开始时间需要大于执行开始时间'))
3206
+ } else if (runDate[1] > value[1]) {
3207
+ callback(new Error('监测结束时间需要大于执行结束时间'))
3208
+ } else {
3209
+ callback()
3210
+ }
3211
+ }
3212
+ }
3213
+ // 渠道 options -------------------------------------
3214
+ let messageOptions = []
3215
+ let counterOptions = []
3216
+ let managerOptions = []
3217
+ let positionOptions = []
3218
+
3219
+ // 岗位数据
3220
+ export const getPositionOptions = (form) => {
3221
+ return new Promise(resolve => {
3222
+ if (positionOptions.length) {
3223
+ resolve(positionOptions)
3224
+ return
3225
+ }
3226
+ let options = []
3227
+ getPosition().then(data => {
3228
+ options.push(...data.data.map(item => {
3229
+ return {
3230
+ label: item.positionName,
3231
+ value: item.positionId
3232
+ }
3233
+ }))
3234
+ positionOptions = options
3235
+ resolve(options)
3236
+ })
3237
+ })
3238
+ }
3239
+
3240
+ // 加载短信数据
3241
+ export const getMessageOptions = (form = {}) => {
3242
+ return new Promise(resolve => {
3243
+ let params = {
3244
+ pageSize: 30,
3245
+ pageNum: 1,
3246
+ search: {
3247
+ tepltStat: TEMP_STATE_ON,
3248
+ scene: SCENE_USE
3249
+ }
3250
+ }
3251
+ getMessages(params).then(data => {
3252
+ data.data = data.data.list || []
3253
+ let options = data.data.map(item => {
3254
+ return {
3255
+ value: item.pkId,
3256
+ label: item.tepltName,
3257
+ smsTemplateContext: item.tepltContent
3258
+ }
3259
+ })
3260
+ messageOptions = options
3261
+ resolve(messageOptions)
3262
+ })
3263
+ })
3264
+ }
3265
+
3266
+ // 加载 App 消息数据
3267
+ export const getAppMessageOptions = (form = {}) => {
3268
+ return new Promise(resolve => {
3269
+ let params = {
3270
+ pageSize: 500,
3271
+ pageNum: 1,
3272
+ search: {
3273
+ tempStatus: TEMP_STATE_ON,
3274
+ scene: SCENE_USE
3275
+ }
3276
+ }
3277
+ getAppMessages(params).then(data => {
3278
+ data.data = data.data.list || []
3279
+ let options = data.data.map(item => {
3280
+ return {
3281
+ value: item.id,
3282
+ label: item.tempName,
3283
+ msgContent: item.msgContent,
3284
+ msgTitle: item.msgTitle
3285
+ }
3286
+ })
3287
+ messageOptions = options
3288
+ resolve(messageOptions)
3289
+ })
3290
+ })
3291
+ }
3292
+
3293
+ export const setMessageOptions = (options) => {
3294
+ messageOptions = options
3295
+ }
3296
+
3297
+ // 加载柜面经理处理者数据
3298
+ export const getCounterOptions = () => {
3299
+ return new Promise(resolve => {
3300
+ if (counterOptions.length) {
3301
+ resolve(counterOptions)
3302
+ return
3303
+ }
3304
+ getCounterList({}).then(data => {
3305
+ let options = data.data.map(item => {
3306
+ return {
3307
+ value: item.userName,
3308
+ label: item.realName
3309
+ }
3310
+ })
3311
+ counterOptions = options
3312
+ resolve(options)
3313
+ })
3314
+ })
3315
+ }
3316
+
3317
+ // 加载客户经理处理者数据
3318
+ export const getManagerOptions = () => {
3319
+ return new Promise(resolve => {
3320
+ if (managerOptions.length) {
3321
+ resolve(managerOptions)
3322
+ return
3323
+ }
3324
+ getManagerList({}).then(data => {
3325
+ let options = data.data.map(item => {
3326
+ return {
3327
+ value: item.userName,
3328
+ label: item.realName
3329
+ }
3330
+ })
3331
+ managerOptions = options
3332
+ resolve(options)
3333
+ })
3334
+ })
3335
+ }
3336
+
3337
+ export const clearOptions = () => {
3338
+ managerOptions = []
3339
+ messageOptions = []
3340
+ counterOptions = []
3341
+ positionOptions = []
3342
+ appMessageOptions = []
3343
+ }
3344
+
3345
+ export function tryToFitview(graph, fitViewPadding) {
3346
+ Promise.resolve()
3347
+ .then(() => {
3348
+ // graph.fitView(fitViewPadding)
3349
+ let padding = fitViewPadding;
3350
+ if (!Array.isArray(fitViewPadding)) {
3351
+ padding = new Array(fitViewPadding || 200, fitViewPadding || 200, fitViewPadding || 200, fitViewPadding || 200)
3352
+ }
3353
+ const group = graph.get('group');
3354
+ const width = graph.get('width');
3355
+ const height = graph.get('height');
3356
+ group.resetMatrix();
3357
+ const bbox = group.getBBox();
3358
+ const viewCenter = {
3359
+ x: (width - padding[1] - padding[3]) / 2 + padding[3],
3360
+ y: (height - padding[0] - padding[2]) / 2 + padding[0]
3361
+ };
3362
+ const groupCenter = {
3363
+ x: bbox.x + bbox.width / 2,
3364
+ y: bbox.y + bbox.height / 2
3365
+ };
3366
+ graph.translate(viewCenter.x - groupCenter.x, viewCenter.y - groupCenter.y);
3367
+ const w = (width - padding[1] - padding[3]) / bbox.width;
3368
+ const h = (height - padding[0] - padding[2]) / bbox.height;
3369
+ let ratio = w;
3370
+ if (w > h) {
3371
+ ratio = h;
3372
+ }
3373
+ graph.zoomTo(ratio, viewCenter);
3374
+ })
3375
+ .then(() => {
3376
+ const zoom = graph.getZoom()
3377
+ if (zoom > 1) {
3378
+ graph.zoomTo(1, { x: graph.get('width') / 2, y: graph.get('height') / 2 })
3379
+ }
3380
+ })
3381
+ }
3382
+
3383
+ export const toBack = (item) => {
3384
+ const target = item.get('group')
3385
+ const parent = target.get('parent')
3386
+ if (!parent) {
3387
+ return;
3388
+ }
3389
+ const children = parent.get('children') || []
3390
+ const el = target.get('el');
3391
+ const index = children.indexOf(target);
3392
+ children.splice(index, 1);
3393
+ children.unshift(target);
3394
+ moveTo(el, 0);
3395
+ }
3396
+
3397
+ export const toFront = (item) => {
3398
+ const target = item.get('group')
3399
+ const parent = target.get('parent')
3400
+ if (!parent) {
3401
+ return;
3402
+ }
3403
+ const children = parent.get('children') || []
3404
+ const el = target.get('el');
3405
+ const index = children.indexOf(target);
3406
+ children.splice(index, 1);
3407
+ children.push(target);
3408
+ moveTo(el, children.length - 1);
3409
+ }
3410
+
3411
+ /**
3412
+ * 将 dom 元素移动到父元素下的指定位置
3413
+ * @param {SVGElement} element dom 元素
3414
+ * @param {number} targetIndex 目标位置(从 0 开始)
3415
+ */
3416
+ export function moveTo(element, targetIndex) {
3417
+ if (!element) return
3418
+ const parentNode = element.parentNode;
3419
+ const siblings = Array.from(parentNode.childNodes).filter(
3420
+ // 要求为元素节点,且不能为 defs 节点
3421
+ (node) => node.nodeType === 1 && node.nodeName.toLowerCase() !== 'defs'
3422
+ );
3423
+ const target = siblings[targetIndex];
3424
+ if (target) {
3425
+ parentNode.insertBefore(element, target);
3426
+ } else {
3427
+ parentNode.appendChild(element);
3428
+ }
3429
+ }
3430
+
3431
+
3432
+ function blendColors(color1, color2, ratio = 0.5) {
3433
+ const rgb1 = hexToRgb(color1)
3434
+ const rgb2 = hexToRgb(color2)
3435
+
3436
+ const r = Math.round(rgb1.r * ratio + rgb2.r * (1 - ratio))
3437
+ const g = Math.round(rgb1.g * ratio + rgb2.g * (1 - ratio))
3438
+ const b = Math.round(rgb1.b * ratio + rgb2.b * (1 - ratio))
3439
+ const blendedColor = rgbToHex(r, g, b)
3440
+
3441
+ return blendedColor
3442
+ }
3443
+
3444
+ function hexToRgb(hex) {
3445
+ if (hex.length === 4) {
3446
+ const r = hex[1]
3447
+ const g = hex[2]
3448
+ const b = hex[3]
3449
+ hex = `#${r}${r}${g}${g}${b}${b}`
3450
+ }
3451
+
3452
+ const r = parseInt(hex.substring(1, 3), 16)
3453
+ const g = parseInt(hex.substring(3, 5), 16)
3454
+ const b = parseInt(hex.substring(5, 7), 16)
3455
+
3456
+ return { r, g, b }
3457
+ }
3458
+
3459
+ function rgbToHex(r, g, b) {
3460
+ const componentToHex = (c) => {
3461
+ const hex = c.toString(16);
3462
+ return hex.length === 1 ? '0' + hex : hex
3463
+ }
3464
+ return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`
3465
+ }
3466
+
3467
+ const colorMap = {
3468
+ orange: '#F5B609',
3469
+ red: 'l(45), 0:#ffb07c 1:#ff4c2f',
3470
+ sky: '#2AD1F5',
3471
+ blue: 'l(45), 0:#7698F5 1:#1B4BE2',
3472
+ green: '#4DCE97',
3473
+ lightblue: '#4A85FE',
3474
+ orangered: '#F77151',
3475
+ purple: 'l(45), 0:#997eec 1:#581d8e',
3476
+ gray: 'l(45), 0:#ddd 1:#bbb',
3477
+ }
3478
+
3479
+ function getSimpleColor() {
3480
+ const ret = {}
3481
+ Object.keys(colorMap).forEach((key) => {
3482
+ const value = colorMap[key]
3483
+ const colors = value.match(/#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/g)
3484
+ ret[key] = blendColors(...colors)
3485
+ })
3486
+ return ret
3487
+ }
3488
+
3489
+ export function getBackGroundColor(cstonly, menu, noLinear, model) {
3490
+ let { color, key } = menu
3491
+ // hotDeployExecuteStatus为1时组件禁用
3492
+ if (!color || (cstonly && !['cst', 'activeCst'].includes(key)) || model?.hotDeployExecuteStatus === '1') {
3493
+ color = 'gray'
3494
+ }
3495
+ const colorText = colorMap[color]
3496
+ return colorText
3497
+ }
3498
+
3499
+ export function getImage(cfg) {
3500
+ const { menuKey, uniqueKey, channelGroup,icon } = cfg
3501
+ const key = menuKey
3502
+ if(key==='channel' && icon){
3503
+ return require(`@/assets/images/channel-icon/${icon}.png`)
3504
+ }
3505
+ const imageMap = {
3506
+ channel: require('@/assets/images/canvas-icon/sms.png'),
3507
+ cst: require('@/assets/images/canvas-icon/cst.png'),
3508
+ activityCst: require('@/assets/images/canvas-icon/activityCst.png'),
3509
+ composeCst: require('@/assets/images/canvas-icon/composeCst.png'),
3510
+ flowCst: require('@/assets/images/canvas-icon/flowCst.png'),
3511
+ activeCst: require('@/assets/images/canvas-icon/activeCst.png'),
3512
+ merge: require('@/assets/images/canvas-icon/merge.png'),
3513
+ evtRespFlow: require('@/assets/images/canvas-icon/evtRespFlow.png'),
3514
+ evtRespFlowBranch: require('@/assets/images/canvas-icon/evtRespFlow.png'),
3515
+ evtRespFlowBranchResp: require('@/assets/images/canvas-icon/evtRespFlow.png'),
3516
+ evtRespFlowBranchNoResp: require('@/assets/images/canvas-icon/evtRespFlow.png'),
3517
+ chnlRespFlow: require('@/assets/images/canvas-icon/chnlRespFlow.png'),
3518
+ chnlRespFlowBranch: require('@/assets/images/canvas-icon/chnlRespFlow.png'),
3519
+ custFlow: require('@/assets/images/canvas-icon/custFlow.png'),
3520
+ custFlowBranch: require('@/assets/images/canvas-icon/custFlow.png'),
3521
+ labelFlow: require('@/assets/images/canvas-icon/labelFlow.png'),
3522
+ labelFlowBranch: require('@/assets/images/canvas-icon/labelFlow.png'),
3523
+ randomFlow: require('@/assets/images/canvas-icon/randomFlow.png'),
3524
+ randomFlowBranch: require('@/assets/images/canvas-icon/randomFlow.png'),
3525
+ intligCall: require('@/assets/images/canvas-icon/intligCall.png'),
3526
+ ebankApp: require('@/assets/images/canvas-icon/ebankApp.png'),
3527
+ sms: require('@/assets/images/canvas-icon/sms.png'),
3528
+ appPush: require('@/assets/images/canvas-icon/appPush.png'),
3529
+ manager: require('@/assets/images/canvas-icon/act.png'),
3530
+ teleSalesPlat: require('@/assets/images/canvas-icon/teleSalesPlat.png'),
3531
+ weChat: require('@/assets/images/canvas-icon/weChat.png'),
3532
+ waitFixTime: require('@/assets/images/canvas-icon/waitFixTime.png'),
3533
+ waitEvent: require('@/assets/images/canvas-icon/waitEvent.png'),
3534
+ waitToTime: require('@/assets/images/canvas-icon/waitToTime.png'),
3535
+ content: require('@/assets/images/canvas-icon/content.png'),
3536
+ equity: require('@/assets/images/canvas-icon/equity.png'),
3537
+ prod: require('@/assets/images/canvas-icon/prod.png'),
3538
+ act: require('@/assets/images/canvas-icon/act.png'),
3539
+ }
3540
+ return imageMap[key] || ''
3541
+ }
3542
+
3543
+ export function downloadPng(graph, name = 'graph', watermark = '', padding = [20, 20, 20, 20]) {
3544
+ const { canvas, width, height } = genCancasAndSize(graph, padding)
3545
+ return new Promise((resolve, reject) => {
3546
+ //等待display完成后执行下一步
3547
+ window.setTimeout(() => { resolve(toDataURL.call(this, canvas, width, height, watermark)) }, 500)
3548
+ })
3549
+ .then(dataURL => {
3550
+ saveAs(dataURL, name.replace(/^\u4e00-\u9fa5\w _/g, '_'))
3551
+ })
3552
+ }
3553
+
3554
+ export function genCancasAndSize(graph, padding = [20, 20, 20, 20]) {
3555
+ const renderer = 'svg'
3556
+ const mul = 1
3557
+ const g = graph.get('group')
3558
+ const clonedGroup = g.clone()
3559
+
3560
+ clonedGroup.resetMatrix()
3561
+ clonedGroup.scale(mul, mul)
3562
+
3563
+ const newBBox = clonedGroup.getBBox()
3564
+ clonedGroup.translate(- newBBox.x * mul + padding[3], - newBBox.y * mul + padding[0])
3565
+ const containerDOM = document.createElement('div')
3566
+ const canvas = new G.Canvas({
3567
+ containerDOM,
3568
+ width: newBBox.width * mul + padding[1] + padding[3],
3569
+ height: newBBox.height * mul + padding[0] + padding[2],
3570
+ renderer: renderer,
3571
+ pixelRatio: renderer == 'svg' ? 1 : graph.get('pixelRatio')
3572
+ })
3573
+ canvas.add(clonedGroup)
3574
+ canvas.draw()
3575
+ //clone过来的style都是display:none,不知道为什么,所以给他设置成block
3576
+ Array.prototype.forEach.call(canvas.get('el').querySelectorAll('.content-info'), div => {
3577
+ div.style.display = 'block'
3578
+ })
3579
+ console.log('canvas---', canvas);
3580
+ return {
3581
+ canvas,
3582
+ width: newBBox.width * mul + padding[1] + padding[3],
3583
+ height: newBBox.height * mul + padding[0] + padding[2]
3584
+ }
3585
+ }
3586
+
3587
+
3588
+ export function toDataURL(canvas, width, height, watermark = '') {
3589
+ const renderer = canvas.getRenderer();
3590
+ const canvasDom = canvas.get('el');
3591
+ let dataURL = '';
3592
+ if (renderer === 'svg') {
3593
+ const clone = canvasDom.cloneNode(true)
3594
+
3595
+ const g = document.createElementNS('http://www.w3.org/2000/svg', 'g')
3596
+ g.style.transform = 'rotate(-22deg)'
3597
+ g.style.transformOrigin = '50% 50%'
3598
+ g.style.fontSize = '12px'
3599
+ g.style.userSelect = 'none'
3600
+ g.style.pointerEvents = 'none'
3601
+ const xPadding = 380
3602
+ const yPadding = 200
3603
+ for (let j = -yPadding; j < height + yPadding; j += yPadding) {
3604
+ for (let i = -xPadding; i < width + xPadding; i += xPadding) {
3605
+ const text = document.createElementNS('http://www.w3.org/2000/svg', 'text')
3606
+ text.setAttributeNS(null, 'x', i + j / 2 * Math.random())
3607
+ text.setAttributeNS(null, 'y', j)
3608
+ text.setAttributeNS(null, 'fill', 'rgba(200,200,200,0.3)')
3609
+ text.appendChild(document.createTextNode(watermark))
3610
+ g.appendChild(text)
3611
+ }
3612
+ }
3613
+ // 导出时的class样式
3614
+ let style = document.createElement("style")
3615
+ style.type = 'text/css'
3616
+ // 短信模板和app消息模板展示全部内容由原来的title改为hover
3617
+ let styleInnerHtml = canvasStyle + `.show-msg-content:hover {
3618
+ height: 150px !important;
3619
+ word-break: break-all !important;
3620
+ overflow: hidden scroll !important;
3621
+ white-space: unset !important;
3622
+ text-overflow: unset !important;
3623
+ -o-text-overflow: unset !important;
3624
+ }`
3625
+ style.innerHTML = styleInnerHtml
3626
+ clone.appendChild(style)
3627
+ clone.appendChild(g)
3628
+ const svgDocType = document.implementation.createDocumentType(
3629
+ 'svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'
3630
+ );
3631
+ const svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);
3632
+ svgDoc.replaceChild(clone, svgDoc.documentElement);
3633
+ const svgData = (new XMLSerializer()).serializeToString(svgDoc);
3634
+ dataURL = 'data:image/svg+xml;charset=utf8,' + encodeURIComponent(svgData);
3635
+ } else if (renderer == 'canvas') {
3636
+ dataURL = canvasDom.toDataURL('image/png');
3637
+ }
3638
+ return dataURL;
3639
+ }
3640
+
3641
+ //pick权益组件customerGroupTagAI参数中需要的参数
3642
+ function pickCustomerGroupTagAI(params) {
3643
+ if (params) {
3644
+ return params.map(item => {
3645
+ let { id, name, giftStockResponseDTO, partNum, details, giftPackageDetailResponseDTOS, receiveNum, receiveType,
3646
+ startTime, endTime, remark, equityGrouptype
3647
+ } = item
3648
+ if (details) {
3649
+ details = details.map(item => {
3650
+ return pick(item, ['id', 'giftStockResponseDTO', 'giftName', 'giftId', 'unitNum', 'stockAvailable'])
3651
+ })
3652
+ }
3653
+ return {
3654
+ id, name, giftStockResponseDTO, partNum, details, giftPackageDetailResponseDTOS, receiveNum, receiveType,
3655
+ startTime, endTime, remark, equityGrouptype
3656
+ }
3657
+ })
3658
+ }
3659
+ return ''
3660
+ }
3661
+
3662
+ // 校验渠道组件下发字段预览功能动参有产品相关动参时校验前序是否有产品组建并且给对应动参赋值
3663
+ /**
3664
+ *
3665
+ * @param {需校验的渠道节点} node
3666
+ * @param {实例} vm
3667
+ * @returns
3668
+ */
3669
+ export function validAndMatchProduct(node, vm) {
3670
+ // 校验规则,前序出现分叉或无连线直接失败
3671
+ // 前序为一条线情况下找到以下节点直接失败:开始,渠道
3672
+ // 字段为产品代码的判断前序节点是否有产品组件并且选择了产品,将产品编码拿过来放入产品字段的value中
3673
+ const returnMenuKey = ['ebankApp', 'sms', 'appPush', 'intligCall', 'teleSalesPlat', 'weChat', 'manager']
3674
+ let beforeEdgesLength = node.getInEdges().length
3675
+ if (beforeEdgesLength > 1 || beforeEdgesLength === 0) {
3676
+ vm.$error('未找到匹配产品,请检查前序节点中是否有[产品节点]并选择了产品!')
3677
+ return { valid: false, value: '' }
3678
+ }
3679
+ let beforeNode = node.getInEdges()[0].getSource()
3680
+ let beforeModel = beforeNode.getModel()
3681
+ if (returnMenuKey.includes(beforeModel.menuKey) || beforeModel.label === '开始') {
3682
+ vm.$error('未找到匹配产品,请检查前序节点中是否有[产品]节点并选择了产品!')
3683
+ return { valid: false, value: '' }
3684
+ }
3685
+ // 找到产品组件
3686
+ if (beforeModel.menuKey === 'prod') {
3687
+ if (beforeModel.form.product?.prodId) {
3688
+ // 给当前表格中的产品动参value赋值
3689
+ return { valid: true, value: beforeModel.form.product.prodId }
3690
+ } else {
3691
+ vm.$error('请选择前序产品组件中的产品')
3692
+ return { valid: false, value: '' }
3693
+ }
3694
+ }
3695
+ return validAndMatchProduct(beforeNode, vm)
3696
+ }
3697
+
3698
+ export function validCanPreview({ tableData, alterInfo = '请完善动参列表', vm }) {
3699
+ let valid = true
3700
+ if (tableData.some(item => !item.parEName || !item.mappingCName)) {
3701
+ valid = false
3702
+ vm.$error(alterInfo)
3703
+ }
3704
+ return valid
3705
+ }
3706
+
3707
+ export function validContentChannel (sourceModel, targetModel) {
3708
+ const channelComp = JSON.parse(sessionStorage.getItem('channelComp'));
3709
+ let channelCode = targetModel.uniqueKey || targetModel.channelGroup
3710
+ let channelNode = channelComp.find((node) => node.componentCode === channelCode)
3711
+ // independenceFlag值为1时可以单独使用
3712
+ if (channelNode.independenceFlag === 1) return false
3713
+ if (sourceModel.menuKey === 'content' && targetModel.menuKey === 'channel') {
3714
+ if (targetModel?.form?.businessType == 2 || targetModel?.form?.businessType == 3) {
3715
+ return true
3716
+ }
3717
+ if (sourceModel.form.templateType && sourceModel.form.templateType.length) {
3718
+ if (sourceModel.form.templateType.includes(targetModel.uniqueKey || targetModel.channelGroup)) {
3719
+ return false
3720
+ } else {
3721
+ return true
3722
+ }
3723
+ }
3724
+ return false
3725
+ }
3726
+ // 权益组件只能连接权益渠道组件
3727
+ if (sourceModel.menuKey === 'equity' && targetModel.menuKey === 'channel' && targetModel?.form?.businessType == 2) {
3728
+ return false
3729
+ }
3730
+ // 活动组件只能连接活动渠道组件
3731
+ if (sourceModel.menuKey === 'act' && targetModel.menuKey === 'channel' && targetModel?.form?.businessType == 3) {
3732
+ return false
3733
+ }
3734
+ // 产品组件只能连接产品渠道组件
3735
+ if (sourceModel.menuKey === 'prod' && targetModel.menuKey === 'channel' && targetModel?.form?.businessType == 4) {
3736
+ return false
3737
+ }
3738
+ return true
3739
+ }
3740
+
3741
+ export function isTempleteMasterOrBranchView($route) {
3742
+ let query = $route.query
3743
+ if(($route.name==='template/market/event/detail-pro') && (query.mode==='view') && (query.type ==='template-branch' || query.type ==='template-root')){
3744
+ return true
3745
+ } else if($route.name==='template/template-activity/event-base' || $route.name==='/scene/scene-library-manage/scene-center'){
3746
+ return true
3747
+ } else {
3748
+ return false
3749
+ }
3750
+ }
3751
+
3752
+ /**
3753
+ * item: 被删除的项
3754
+ * type:被删除的项的类型
3755
+ * graph: 画布实例
3756
+ */
3757
+ export const clearChannelStageAndExecStat = ({type , item}) => {
3758
+ if(type === 'node') {
3759
+ const outEdges = item.getOutEdges() || []
3760
+ outEdges.forEach(outEdge => {
3761
+ const outEdgeTargetNode = outEdge.getTarget()
3762
+ const outEdgeTargetModel = outEdgeTargetNode?.getModel()
3763
+ if (outEdgeTargetModel) {
3764
+ const { menuKey } = outEdgeTargetModel
3765
+ if(menuKey === 'chnlRespFlow') { //清空按渠道分流的分流方式
3766
+ outEdgeTargetModel.form.stage = ''
3767
+ const chnlRespFlowOutEdges = outEdgeTargetNode.getOutEdges()
3768
+ chnlRespFlowOutEdges.forEach((e)=>{
3769
+ e.getTarget().getModel().form.execStat = '' //清空按渠道分流分支的响应结果
3770
+ })
3771
+ }
3772
+ }
3773
+ })
3774
+ }
3775
+
3776
+ if(type === 'edge') {
3777
+ const targetNode = item?.getTarget()
3778
+ const targetNodeModel = targetNode?.getModel()
3779
+ if(targetNodeModel) {
3780
+ const { menuKey } = targetNodeModel
3781
+ if(menuKey === 'chnlRespFlow') { //清空按渠道分流的分流方式
3782
+ targetNodeModel.form.stage = ''
3783
+ const chnlRespFlowOutEdges = targetNode.getOutEdges()
3784
+ chnlRespFlowOutEdges.forEach((e)=>{
3785
+ e.getTarget().getModel().form.execStat = '' //清空按渠道分流分支的响应结果
3786
+ })
3787
+ }
3788
+ }
3789
+ }
3790
+ }
3791
+
3792
+ // 过滤内容组件字段
3793
+ function filterContentTabData(type,form){
3794
+ const data = form[type].arr
3795
+ let arr = []
3796
+ if(type == 'productArgs' && form[type].autoRecommend == '1'){
3797
+ arr = [
3798
+ {
3799
+ componentName: '',
3800
+ autoRecommend: '1',
3801
+ autoRecoProdType: form.productArgs.autoRecoProdType && form.productArgs.autoRecoProdType.length ? form.productArgs.autoRecoProdType.join(',') : '',
3802
+ }
3803
+ ]
3804
+ return arr
3805
+ }
3806
+ arr = data.map(item=>{
3807
+ let obj = {}
3808
+ if(type == 'productArgs'){
3809
+ delete item.productData
3810
+ obj = {
3811
+ componentName: '',
3812
+ productData: JSON.stringify(item),
3813
+ autoRecommend: '0',
3814
+ prodIntroduction: item.introduction,
3815
+ autoRecoProdType: item.autoRecoProdType && item.autoRecoProdType.length ? item.autoRecoProdType.join(',') : '',
3816
+ prodId: item.id,
3817
+ prodName: item.productName,
3818
+ linkUrl: item.linkUrl,
3819
+ prodRiskLevel: item.riskLevel,
3820
+ prodStatus: item.currentState,
3821
+ prodType: item.productType,
3822
+ }
3823
+ }
3824
+ if(type == 'activityArgs'){
3825
+ obj = {
3826
+ componentName: '',
3827
+ id: item.id,
3828
+ actIntroduction: item.introduction,
3829
+ actDetail: item.actDetail || '[{}]',
3830
+ componentSwitch: 0,
3831
+ actCstGroupType: item.actCstGroupType,
3832
+ actCstGroupId: item.actCstGroupId,
3833
+ actExcludeGroupType: item.actExcludeGroupType,
3834
+ actExcludeGroupId: item.actExcludeGroupId,
3835
+ }
3836
+ }
3837
+ if(type == 'equityArgs'){
3838
+ // obj = {
3839
+ // componentName: item.componentName,
3840
+ // introduction: item.equityIntroduction,
3841
+ // packageFlg: item.packageFlg,
3842
+ // customerGroupTagAI: form[type].customerGroupTagAI ? JSON.stringify(form[type].customerGroupTagAI) : '[]',
3843
+ // partNum: item.partNum ? item.partNum : 0,
3844
+ // type: Number(item.type),
3845
+ // giftDetail: item.giftDetail ? JSON.parse(item.giftDetail) : {},
3846
+ // exsit: Number(item.exsit),
3847
+ // stock: item.stock ? item.stock : 0,
3848
+ // equityId: item.equity_id || item.pkId,
3849
+ // equityName: item.equity_name ? item.equity_name : ''
3850
+ // }
3851
+ let giftDetail = {}
3852
+ try {
3853
+ giftDetail = JSON.parse(item.giftDetail)
3854
+ } catch (e) {}
3855
+ obj = {
3856
+ // componentName: item.componentName,
3857
+ componentName: item.productName,
3858
+ introduction: item.equityIntroduction,
3859
+ packageFlg: item.packageFlg,
3860
+ customerGroupTagAI: form[type].customerGroupTagAI ? JSON.stringify(form[type].customerGroupTagAI) : '[]',
3861
+ partNum: item.partNum ? item.partNum : 0,
3862
+ type: Number(item.type),
3863
+ giftDetail,
3864
+ exsit: Number(item.exsit),
3865
+ stock: item.stock ? item.stock : 0,
3866
+ // equityId: item.equity_id || item.pkId,
3867
+ equityId: item.id,
3868
+ // equityName: item.equity_name ? item.equity_name : '',
3869
+ equityName: item.productName || '',
3870
+ id: item.id,
3871
+ productName: item.productName || ''
3872
+ }
3873
+ }
3874
+ return obj
3875
+ })
3876
+ return arr
3877
+ }