index.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476
  1. <template>
  2. <div class="app-container">
  3. <div class="title">
  4. 任务列表
  5. </div>
  6. <div class="app-container-table-screening">
  7. <div class="app-container-table-screening-item">
  8. 账号类型
  9. <img src="../../assets/address/unfold_more.svg" alt="unfold_more">
  10. </div>
  11. <div class="app-container-table-screening-item">
  12. 余额
  13. <img src="../../assets/address/unfold_more.svg" alt="unfold_more">
  14. </div>
  15. </div>
  16. <div class="app-container-table-main">
  17. <div class="app-container-table-main-item" v-for="(item,index) in missionData">
  18. <div class="head">
  19. <div class="avatar">
  20. <img class="avatar" :src="url + 'disk/file/' + item.projectLogo" alt="avatar">
  21. </div>
  22. <div class="name" @click="viewTaskDetails(item)">
  23. <div class="missionName">
  24. {{item.taskName}}
  25. <img src="../../assets/autoplay/arrow_forward.svg" alt="arrow_forward">
  26. </div>
  27. <div class="projectName">
  28. {{item.projectName}}
  29. </div>
  30. </div>
  31. </div>
  32. <div class="jump" @click="viewExecutionHistory(item)">
  33. 执行记录
  34. <img src="../../assets/autoplay/arrow_forward.svg" alt="arrow_forward">
  35. </div>
  36. <div class="implementationStrategy">
  37. <!-- <div class="item" v-if="item.implementationStrategy.length > 0" v-for="(item1,index) in item.implementationStrategy">-->
  38. <!-- {{item1}}-->
  39. <!-- </div>-->
  40. <div class="item-no" >
  41. 暂无
  42. </div>
  43. </div>
  44. <div class="implementationStrategyText">
  45. 执行策略
  46. </div>
  47. <div class="underImplementation" v-if="item.executeStatus === 0">
  48. <div class="numberOfExecutions">
  49. <div class="text">
  50. 当前执行/计划执行次数
  51. </div>
  52. <div class="number">
  53. {{item.executeTimes}}/{{item.planTimes}}
  54. </div>
  55. </div>
  56. <div class="progressBar" @click="progressBarDetails(item)">
  57. <div class="progressBar-blue">
  58. <img src="../../assets/autoplay/airplanemode_active.svg" alt="airplanemode_active">
  59. 进行中
  60. </div>
  61. <div class="details">
  62. 详情
  63. <img src="../../assets/autoplay/arrow_forward.svg" alt="arrow_forward">
  64. </div>
  65. </div>
  66. </div>
  67. <div class="batchExecution" v-if="item.executeStatus === 1">
  68. <div class="left">
  69. <div class="number">
  70. {{item.executeTimes}}/{{item.planTimes}}
  71. </div>
  72. <div class="text">
  73. 当前执行/计划执行次数
  74. </div>
  75. </div>
  76. <div class="right" @click="batchExecution(item)">
  77. <img src="../../assets/autoplay/autoplay.svg" alt="autoplay">
  78. 批量执行
  79. </div>
  80. </div>
  81. <div class="horizontalLine"/>
  82. <div class="time">
  83. 上次执行时间: {{item.lastExecuteTime}}
  84. </div>
  85. </div>
  86. </div>
  87. <el-drawer
  88. :visible.sync="drawerDetails"
  89. :with-header="false">
  90. <div class="drawerAddress-container">
  91. <div class="drawerAddress-container-head">
  92. <div class="drawerAddress-container-head-left">
  93. <div class="avatar">
  94. <img class="avatar" :src="url + 'disk/file/' + currentTaskInfo.projectLogo" alt="avatar">
  95. </div>
  96. <div class="info">
  97. <div class="projectName">
  98. {{currentTaskInfo.projectName}}
  99. </div>
  100. <div class="id">
  101. {{currentTaskInfo.amsTaskId}}
  102. </div>
  103. </div>
  104. </div>
  105. <div class="drawerAddress-container-head-right">
  106. <!-- <div class="complete" @click="modifyTask">-->
  107. <!-- <img src="../../assets/address/done_all.svg" alt="done_all">-->
  108. <!-- 完成-->
  109. <!-- </div>-->
  110. </div>
  111. </div>
  112. <div class="drawerAddress-container-main">
  113. <div class="title">
  114. 任务详情
  115. </div>
  116. <div class="input">
  117. <el-input v-model="currentTaskInfo.taskName" placeholder="任务名称"></el-input>
  118. </div>
  119. <div class="select">
  120. <el-select style="width: 140px" v-model="currentTaskInfo.taskType" placeholder="选择类型">
  121. <el-option
  122. v-for="item in optionsTaskType"
  123. :key="item.value"
  124. :label="item.label"
  125. :value="item.value">
  126. </el-option>
  127. </el-select>
  128. <el-select style="width: 400px" v-model="chainId" placeholder="选择合约">
  129. <el-option
  130. v-for="item in options"
  131. :key="item.value"
  132. :label="item.label"
  133. :value="item.value">
  134. </el-option>
  135. </el-select>
  136. </div>
  137. <div class="input">
  138. <el-input v-model="currentTaskInfo.planTimes" placeholder="计划任务执行次数"></el-input>
  139. </div>
  140. </div>
  141. </div>
  142. </el-drawer>
  143. <el-drawer
  144. :visible.sync="drawerRecord"
  145. :with-header="false"
  146. @closed="drawerRecordStatus = 0">
  147. <div class="drawerRecord-container" v-if="drawerRecordStatus === 0">
  148. <div class="drawerAddress-container-head">
  149. <div class="drawerAddress-container-head-left">
  150. <div class="missionName">
  151. <div class="name">
  152. 任务名称
  153. </div>
  154. </div>
  155. <div class="text">
  156. 查看历史交互记录
  157. </div>
  158. </div>
  159. </div>
  160. <div class="drawerAddress-container-main">
  161. <div class="drawerAddress-container-head-left">
  162. <div class="avatar">
  163. <img class="avatar" :src="url + 'disk/file/' + currentTaskInfo.projectLogo" alt="avatar">
  164. </div>
  165. <div class="info">
  166. <div class="projectName">
  167. {{currentTaskInfo.projectName}}
  168. </div>
  169. <div class="webLink">
  170. <img src="../../assets/autoplay/language.svg" alt="language">
  171. <!-- {{currentTaskInfo.projectUrl}}-->
  172. <a :href="currentTaskInfo.projectUrl" target="_blank">{{currentTaskInfo.projectUrl}}</a>
  173. </div>
  174. </div>
  175. </div>
  176. <div class="horizontalLine"/>
  177. <div class="recordTitle">
  178. <div class="left">
  179. <div class="text">
  180. 执行记录
  181. </div>
  182. <div class="number">
  183. 累计执行: {{recordData.length}}
  184. </div>
  185. </div>
  186. <div class="right">
  187. <!-- <el-date-picker-->
  188. <!-- v-model="value1"-->
  189. <!-- type="daterange"-->
  190. <!-- range-separator="至"-->
  191. <!-- start-placeholder="开始日期"-->
  192. <!-- end-placeholder="结束日期">-->
  193. <!-- </el-date-picker>-->
  194. </div>
  195. </div>
  196. <div class="table">
  197. <el-table
  198. :data="recordData"
  199. style="width: 100%">
  200. <el-table-column
  201. prop="executeId"
  202. label="执行ID">
  203. </el-table-column>
  204. <el-table-column
  205. prop="createTime"
  206. label="时间">
  207. </el-table-column>
  208. <el-table-column
  209. prop="totalAmount"
  210. label="累计金额">
  211. </el-table-column>
  212. <el-table-column
  213. prop="totalGas"
  214. label="总GAS">
  215. </el-table-column>
  216. <el-table-column
  217. prop="executeStatus"
  218. label="状态"
  219. width="120"
  220. align="center">
  221. <template v-slot="scope">
  222. <div class="status" v-if="scope.row.executeStatus === 0" @click="viewRecordDetails(scope.row,1)">
  223. <div class="text" style="color: #2980FF;">
  224. <img src="../../assets/autoplay/clock_loader_60.svg" alt="clock_loader_60">
  225. 进行中
  226. </div>
  227. <img src="../../assets/autoplay/chevron_right.svg" alt="chevron_right">
  228. </div>
  229. <div class="status" v-if="scope.row.executeStatus === 1" @click="viewRecordDetails(scope.row,2)">
  230. <div class="text">
  231. <img src="../../assets/autoplay/check.svg" alt="check">
  232. 已完成
  233. </div>
  234. <img src="../../assets/autoplay/chevron_right.svg" alt="chevron_right">
  235. </div>
  236. </template>
  237. </el-table-column>
  238. </el-table>
  239. </div>
  240. </div>
  241. <div class="drawerView-container-footer">
  242. <div class="pagination">
  243. <el-pagination
  244. small
  245. layout="prev, pager, next"
  246. :page-size="10"
  247. :total="3">
  248. </el-pagination>
  249. </div>
  250. </div>
  251. </div>
  252. <div class="drawerRecord-container" v-if="drawerRecordStatus === 1">
  253. <div class="drawerAddress-container-head">
  254. <div class="drawerAddress-container-head-left">
  255. <div class="missionName">
  256. <div class="id">
  257. {{currentTaskInfo.amsTaskId}}
  258. </div>
  259. <div class="name">
  260. {{currentTaskInfo.taskName}}
  261. </div>
  262. </div>
  263. <div class="text" style="color: #2980FF">
  264. 任务交互类型: {{currentTaskInfo.taskType}}
  265. </div>
  266. </div>
  267. </div>
  268. <div class="drawerAddress-container-main">
  269. <div class="interactionStrategy">
  270. <div class="item">
  271. <div class="title">
  272. <img src="../../assets/autoplay/account_balance_wallet.svg" alt="account_balance_wallet">
  273. 交互钱包
  274. </div>
  275. <div class="info">
  276. {{currentRecordData.groupName}}
  277. </div>
  278. </div>
  279. <div class="item">
  280. <div class="title">
  281. <img src="../../assets/autoplay/avg_pace.svg" alt="avg_pace">
  282. 最小间隔时间
  283. </div>
  284. <div class="info">
  285. {{currentRecordData.intervalMin}}/分
  286. </div>
  287. </div>
  288. <div class="item">
  289. <div class="title">
  290. <img src="../../assets/autoplay/avg_pace.svg" alt="avg_pace">
  291. 最大间隔时间
  292. </div>
  293. <div class="info">
  294. {{currentRecordData.intervalMax}}/分
  295. </div>
  296. </div>
  297. <div class="item">
  298. <div class="title">
  299. <img src="../../assets/autoplay/gas_meter.svg" alt="gas_meter">
  300. 最大 Gas fee
  301. </div>
  302. <div class="info">
  303. {{currentRecordData.maxGas}}
  304. </div>
  305. </div>
  306. </div>
  307. <div class="recordTitle">
  308. <div class="left">
  309. <div class="text">
  310. 正在进行中
  311. </div>
  312. <div class="number">
  313. 总计交互地址: 3/100
  314. </div>
  315. </div>
  316. <div class="right" style="cursor: pointer" @click="refresh">
  317. <img src="../../assets/autoplay/Frame.svg" alt="Frame">
  318. </div>
  319. </div>
  320. <div class="table">
  321. <el-table
  322. :data="ongoingData"
  323. style="width: 100%">
  324. <el-table-column
  325. prop="address"
  326. width="150">
  327. </el-table-column>
  328. <el-table-column
  329. prop="amount">
  330. </el-table-column>
  331. <el-table-column
  332. prop="gas">
  333. </el-table-column>
  334. <el-table-column
  335. prop="txId">
  336. </el-table-column>
  337. <el-table-column
  338. prop="status">
  339. <template v-slot="scope">
  340. <div class="status" style="cursor: auto">
  341. <div class="text" v-if="scope.row.status === 0" style="color: #EB5757;">
  342. <img src="../../assets/autoplay/cancel.svg" alt="cancel">
  343. 未完成
  344. </div>
  345. <div class="text" v-if="scope.row.status === 1" >
  346. <img src="../../assets/autoplay/check.svg" alt="check">
  347. 已完成
  348. </div>
  349. </div>
  350. </template>
  351. </el-table-column>
  352. </el-table>
  353. </div>
  354. </div>
  355. <div class="drawerView-container-footer">
  356. <div class="pagination">
  357. <el-pagination
  358. small
  359. layout="prev, pager, next"
  360. :page-size="10"
  361. :total="3">
  362. </el-pagination>
  363. </div>
  364. </div>
  365. <div class="progressBarBox">
  366. <div class="progressBar">
  367. <div class="progressBar-two">
  368. <img src="../../assets/autoplay/motion_photos_paused.svg" alt="motion_photos_paused">
  369. 当前执行进度
  370. </div>
  371. <div class="number">
  372. {{currentTaskInfo.executeTimes}}/{{currentTaskInfo.planTimes}}
  373. </div>
  374. </div>
  375. </div>
  376. </div>
  377. <div class="drawerRecord-container" v-if="drawerRecordStatus === 2">
  378. <div class="drawerAddress-container-head">
  379. <div class="drawerAddress-container-head-left">
  380. <div class="missionName">
  381. <div class="id">
  382. {{currentTaskInfo.amsTaskId}}
  383. </div>
  384. <div class="name">
  385. {{currentTaskInfo.taskName}}
  386. </div>
  387. </div>
  388. <div class="text" style="color: #2980FF">
  389. 任务交互类型: {{currentTaskInfo.taskType}}
  390. </div>
  391. </div>
  392. </div>
  393. <div class="drawerAddress-container-main">
  394. <div class="interactionStrategy">
  395. <div class="item">
  396. <div class="title">
  397. <img src="../../assets/autoplay/account_balance_wallet.svg" alt="account_balance_wallet">
  398. 交互钱包
  399. </div>
  400. <div class="info">
  401. {{currentRecordData.groupName}}
  402. </div>
  403. </div>
  404. <div class="item">
  405. <div class="title">
  406. <img src="../../assets/autoplay/avg_pace.svg" alt="avg_pace">
  407. 最小间隔时间
  408. </div>
  409. <div class="info">
  410. {{currentRecordData.intervalMin}}/分
  411. </div>
  412. </div>
  413. <div class="item">
  414. <div class="title">
  415. <img src="../../assets/autoplay/avg_pace.svg" alt="avg_pace">
  416. 最大间隔时间
  417. </div>
  418. <div class="info">
  419. {{currentRecordData.intervalMax}}/分
  420. </div>
  421. </div>
  422. <div class="item">
  423. <div class="title">
  424. <img src="../../assets/autoplay/gas_meter.svg" alt="gas_meter">
  425. 最大 Gas fee
  426. </div>
  427. <div class="info">
  428. {{currentRecordData.maxGas}}
  429. </div>
  430. </div>
  431. </div>
  432. <div class="recordTitle">
  433. <div class="left">
  434. <div class="text">
  435. 已完成
  436. </div>
  437. <div class="number">
  438. 总计交互地址: 3/100
  439. </div>
  440. </div>
  441. </div>
  442. <div class="table">
  443. <el-table
  444. :data="ongoingData"
  445. style="width: 100%">
  446. <el-table-column
  447. prop="address"
  448. width="150">
  449. </el-table-column>
  450. <el-table-column
  451. prop="amount">
  452. </el-table-column>
  453. <el-table-column
  454. prop="gas">
  455. </el-table-column>
  456. <el-table-column
  457. prop="txId">
  458. </el-table-column>
  459. <el-table-column
  460. prop="status">
  461. <template v-slot="scope">
  462. <div class="status" style="cursor: auto">
  463. <div class="text">
  464. <img src="../../assets/autoplay/check.svg" alt="check">
  465. 已完成
  466. </div>
  467. </div>
  468. </template>
  469. </el-table-column>
  470. </el-table>
  471. </div>
  472. </div>
  473. <div class="drawerView-container-footer">
  474. <div class="pagination">
  475. <el-pagination
  476. small
  477. layout="prev, pager, next"
  478. :page-size="10"
  479. :total="3">
  480. </el-pagination>
  481. </div>
  482. </div>
  483. <div class="progressBarBox">
  484. <div class="progressBar" style="background: black">
  485. <div class="progressBar-two" style="background: black">
  486. <img src="../../assets/autoplay/done_all.svg" alt="done_all">
  487. 执行进度已完成
  488. </div>
  489. <div class="number">
  490. {{currentTaskInfo.executeTimes}}/{{currentTaskInfo.planTimes}}
  491. </div>
  492. </div>
  493. </div>
  494. </div>
  495. </el-drawer>
  496. <el-drawer
  497. :visible.sync="drawerStrategy"
  498. :with-header="false"
  499. @closed="accountPassword = false">
  500. <div class="drawerStrategy-container">
  501. <div class="drawerAddress-container-head">
  502. <div class="drawerAddress-container-head-left">
  503. <div class="info">
  504. <div class="projectName">
  505. 执行策略
  506. </div>
  507. <div class="id">
  508. {{currentTaskInfo.taskType}} | {{currentTaskInfo.taskName}}
  509. </div>
  510. </div>
  511. </div>
  512. <div class="drawerAddress-container-head-right">
  513. <div class="complete" @click="accountPassword = true">
  514. <img src="../../assets/address/done_all.svg" alt="done_all">
  515. 下一步
  516. </div>
  517. </div>
  518. </div>
  519. <div class="drawerAddress-container-main">
  520. <div class="item">
  521. <div class="title">
  522. 交互钱包
  523. </div>
  524. <el-select v-model="batchExecutionParams.groupName" placeholder="选择交互钱包">
  525. <el-option
  526. v-for="item in optionsAddress"
  527. :key="item.value"
  528. :label="item.label"
  529. :value="item.value">
  530. </el-option>
  531. </el-select>
  532. </div>
  533. <!-- <div class="item">-->
  534. <!-- <div class="title">-->
  535. <!-- 目标资产(From)-->
  536. <!-- </div>-->
  537. <!-- <el-select v-model="chainId" placeholder="选择交互资产">-->
  538. <!-- <el-option-->
  539. <!-- v-for="item in options"-->
  540. <!-- :key="item.value"-->
  541. <!-- :label="item.label"-->
  542. <!-- :value="item.value">-->
  543. <!-- </el-option>-->
  544. <!-- </el-select>-->
  545. <!-- </div>-->
  546. <!-- <div class="item">-->
  547. <!-- <div class="title">-->
  548. <!-- 目标资产(To)-->
  549. <!-- </div>-->
  550. <!-- <el-select v-model="chainId" placeholder="选择交互资产">-->
  551. <!-- <el-option-->
  552. <!-- v-for="item in options"-->
  553. <!-- :key="item.value"-->
  554. <!-- :label="item.label"-->
  555. <!-- :value="item.value">-->
  556. <!-- </el-option>-->
  557. <!-- </el-select>-->
  558. <!-- </div>-->
  559. <div class="item">
  560. <div class="title">
  561. 间隔时间
  562. </div>
  563. <div style="display: flex;gap:24px">
  564. <el-input v-model="batchExecutionParams.intervalMin" placeholder="输入最小间隔时间/分"></el-input>
  565. <el-input v-model="batchExecutionParams.intervalMax" placeholder="输入最大间隔时间/分"></el-input>
  566. </div>
  567. </div>
  568. <div class="item">
  569. <div class="title">
  570. 交互金额
  571. </div>
  572. <el-input v-model="batchExecutionParams.amount" placeholder="输入最大交互金额"></el-input>
  573. </div>
  574. <div class="item">
  575. <div class="title">
  576. 最大 Gas fee
  577. </div>
  578. <el-input v-model="batchExecutionParams.maxGas" placeholder="输入最大 Gas fee"></el-input>
  579. </div>
  580. <div class="item" v-for="item in paramsData">
  581. <div class="title">
  582. {{item.note}}
  583. </div>
  584. <el-input v-model="item.value"></el-input>
  585. </div>
  586. </div>
  587. <div class="accountPassword" v-if="accountPassword">
  588. <div class="title">
  589. 输入钱包密码
  590. </div>
  591. <div class="inputTitle">
  592. 钱包密码
  593. </div>
  594. <el-input type="password" :show-password="true" v-model="batchExecutionParams.password" placeholder="输入钱包密码"></el-input>
  595. <div class="confirm" @click="batchExecutionTask">
  596. <img src="../../assets/autoplay/check1.svg" alt="check1">
  597. 确认
  598. </div>
  599. <div class="tip">
  600. <div class="title">
  601. <img src="../../assets/address/tips_and_updates.svg" alt="tips_and_updates">
  602. 提示
  603. </div>
  604. <div class="description">
  605. 此密码为您账户钱包的 Keystore 密码,请妥善保管,
  606. 系统无法为您找回。
  607. </div>
  608. </div>
  609. </div>
  610. </div>
  611. </el-drawer>
  612. </div>
  613. </template>
  614. <script>
  615. import {batchExecution, getExecutionRecord, modifyTaskInfo, parameterSearch, taskPage} from "@/api/task";
  616. import {getGroupList} from "@/api/adress";
  617. import {getInteractionRecord} from "@/api/record";
  618. export default {
  619. data() {
  620. return {
  621. missionData:[],
  622. drawerDetails:false,
  623. input:'',
  624. chainId:'',
  625. options: [{
  626. value: '1',
  627. label: 'ETH'
  628. }],
  629. optionsTaskType: [
  630. {
  631. value: 'BRIDGE',
  632. label: 'Bridge'
  633. },
  634. {
  635. value: 'NFT',
  636. label: 'NFT'
  637. },
  638. {
  639. value: 'SWAP',
  640. label: 'Swap'
  641. }
  642. ],
  643. optionsAddress: [],
  644. drawerRecord:false,
  645. drawerRecordStatus:0,
  646. value1: '',
  647. recordData:[],
  648. ongoingData:[],//下一层
  649. drawerStrategy:false,
  650. accountPassword:false,
  651. batchExecutionParams:{
  652. groupName:'',
  653. maxGas:'',
  654. intervalMax:10,
  655. intervalMin:1,
  656. amount:'',
  657. password:'',
  658. projectId:'',
  659. taskId:''
  660. },
  661. currentTaskInfo:{
  662. taskType:'',
  663. taskName:'',
  664. amsProjectId:'',
  665. amsTaskId:'',
  666. planTimes:0,
  667. projectName:''
  668. },
  669. currentRecordData:{
  670. },
  671. paramsData:[],
  672. url:process.env.VUE_APP_BASE_API,
  673. }
  674. },
  675. mounted() {
  676. this.getTaskList()
  677. this.getWalletAddress()
  678. },
  679. methods: {
  680. progressBarDetails(item) {
  681. this.drawerRecord = true
  682. this.drawerRecordStatus = 1
  683. this.currentTaskInfo = JSON.parse(JSON.stringify(item))
  684. this.currentRecordData.groupName = item.groupName
  685. this.currentRecordData.intervalMax = item.intervalMax
  686. this.currentRecordData.intervalMin = item.intervalMin
  687. this.currentRecordData.maxGas = item.maxGas
  688. let params = {
  689. page:1,
  690. pageSize:10,
  691. executeId:item.executeId
  692. }
  693. getInteractionRecord(params).then(res=>{
  694. this.ongoingData = res.records
  695. })
  696. },
  697. getTaskList() {
  698. taskPage().then(res=>{
  699. this.missionData = res
  700. })
  701. },
  702. batchExecution(item) {
  703. this.drawerStrategy = true
  704. this.currentTaskInfo.taskName = item.taskName
  705. this.currentTaskInfo.taskType = item.taskType
  706. this.batchExecutionParams.projectId = item.amsProjectId
  707. this.batchExecutionParams.taskId = item.amsTaskId
  708. if(item.taskCode){
  709. this.getParameterSearch(item.taskCode)
  710. }
  711. },
  712. getWalletAddress() {
  713. getGroupList().then(res=>{
  714. res.forEach((item)=>{
  715. let obj = {
  716. value:item,
  717. label:item
  718. }
  719. this.optionsAddress.push(obj)
  720. })
  721. })
  722. },
  723. batchExecutionTask() {
  724. this.batchExecutionParams.airdropParams = this.paramsData
  725. batchExecution(this.batchExecutionParams).then(()=>{
  726. this.accountPassword = false
  727. this.drawerStrategy = false
  728. this.getTaskList()
  729. })
  730. },
  731. viewTaskDetails(item) {
  732. this.currentTaskInfo = JSON.parse(JSON.stringify(item))
  733. this.drawerDetails = true
  734. },
  735. modifyTask(){
  736. let params = {
  737. taskType:this.currentTaskInfo.taskType,
  738. taskName:this.currentTaskInfo.taskName,
  739. amsProjectId:this.currentTaskInfo.amsProjectId,
  740. amsTaskId:this.currentTaskInfo.amsTaskId,
  741. planTimes:this.currentTaskInfo.planTimes,
  742. }
  743. modifyTaskInfo(params).then(()=>{
  744. this.drawerDetails = false
  745. this.getTaskList()
  746. })
  747. },
  748. viewExecutionHistory(item) {
  749. this.currentTaskInfo = JSON.parse(JSON.stringify(item))
  750. let params = {
  751. page: 1,
  752. pageSize: 10,
  753. queryValue: item.amsTaskId
  754. }
  755. getExecutionRecord(params).then((res)=>{
  756. this.drawerRecord = true
  757. this.recordData = res.records
  758. })
  759. },
  760. viewRecordDetails(item,page){
  761. this.drawerRecordStatus = page
  762. this.currentRecordData = item
  763. let params = {
  764. page:1,
  765. pageSize:10,
  766. executeId:item.executeId
  767. }
  768. getInteractionRecord(params).then(res=>{
  769. this.ongoingData = res.records
  770. })
  771. },
  772. refresh(){
  773. let params = {
  774. page:1,
  775. pageSize:10,
  776. executeId:this.currentRecordData.executeId
  777. }
  778. getInteractionRecord(params).then(res=>{
  779. this.ongoingData = res.records
  780. })
  781. },
  782. getParameterSearch(taskCode){
  783. parameterSearch(taskCode).then(res=>{
  784. this.paramsData = res
  785. })
  786. }
  787. }
  788. }
  789. </script>
  790. <style lang="scss" scoped>
  791. .app-container{
  792. .title{
  793. font-weight: 700;
  794. font-size: 21px;
  795. line-height: 28px;
  796. color: #181818;
  797. }
  798. .app-container-table-screening{
  799. display: flex;
  800. align-items: center;
  801. gap:100px;
  802. padding: 20px 0;
  803. margin: 20px 0;
  804. border-top: 1px solid #f5f5f5;
  805. border-bottom: 1px solid #f5f5f5;
  806. .app-container-table-screening-item{
  807. display: flex;
  808. align-items: center;
  809. gap:6px;
  810. font-weight: 400;
  811. font-size: 15px;
  812. line-height: 20px;
  813. color: #4d4d4e;
  814. }
  815. }
  816. .app-container-table-main{
  817. display: flex;
  818. justify-content: space-between;
  819. gap:20px;
  820. flex-wrap: wrap;
  821. .app-container-table-main-item{
  822. width: 345px;
  823. height: 315px;
  824. background: #FFFFFF;
  825. border: 1px solid #2980FF;
  826. border-radius: 10px;
  827. padding:24px;
  828. position: relative;
  829. .head{
  830. display: flex;
  831. gap:8px;
  832. .avatar{
  833. width: 46px;
  834. height: 46px;
  835. background: black;
  836. border-radius: 50%;
  837. }
  838. .name{
  839. display: flex;
  840. flex-direction: column;
  841. gap:8px;
  842. cursor: pointer;
  843. .projectName{
  844. font-weight: 700;
  845. font-size: 12px;
  846. line-height: 16px;
  847. color: #919191;
  848. }
  849. .missionName{
  850. font-weight: 700;
  851. font-size: 17px;
  852. line-height: 22px;
  853. color: #222222;
  854. display: flex;
  855. align-items: center;
  856. gap:8px
  857. }
  858. }
  859. }
  860. .jump{
  861. position: absolute;
  862. bottom:25px;
  863. right:24px;
  864. display: flex;
  865. gap:8px;
  866. font-weight: 700;
  867. font-size: 12px;
  868. line-height: 16px;
  869. color: #2980FF;
  870. cursor: pointer;
  871. }
  872. .implementationStrategy{
  873. display: flex;
  874. gap:12px;
  875. margin-top: 32px;
  876. .item{
  877. width: 68px;
  878. height: 24px;
  879. background: #edf2ff;
  880. border: 1px solid #2980FF;
  881. border-radius: 4px;
  882. display: flex;
  883. justify-content: center;
  884. align-items: center;
  885. font-weight: 500;
  886. font-size: 12px;
  887. line-height: 16px;
  888. color: #222222;
  889. }
  890. .item-no{
  891. width: 44px;
  892. height: 24px;
  893. background: #F5F5F5;
  894. border: 1px solid #E0E0E0;
  895. border-radius: 4px;
  896. display: flex;
  897. justify-content: center;
  898. align-items: center;
  899. font-weight: 500;
  900. font-size: 12px;
  901. line-height: 16px;
  902. color: #828282;
  903. }
  904. }
  905. .implementationStrategyText{
  906. font-weight: 400;
  907. font-size: 12px;
  908. line-height: 16px;
  909. color: #919191;
  910. margin-top: 8px;
  911. }
  912. .underImplementation{
  913. display: flex;
  914. flex-direction: column;
  915. gap:8px;
  916. margin-top: 24px;
  917. height: 50px;
  918. .numberOfExecutions{
  919. display: flex;
  920. gap:4px;
  921. .text{
  922. font-weight: 400;
  923. font-size: 12px;
  924. line-height: 16px;
  925. color: #919191;
  926. }
  927. .number{
  928. font-weight: 700;
  929. font-size: 12px;
  930. line-height: 16px;
  931. color: #222222;
  932. }
  933. }
  934. .progressBar{
  935. width: 100%;
  936. height: 28px;
  937. background: #F5F5F5;
  938. border-radius: 21px;
  939. display: flex;
  940. justify-content: space-between;
  941. padding-right: 6px;
  942. cursor: pointer;
  943. .progressBar-blue{
  944. width: 147px;
  945. height: 28px;
  946. background: #2980FF;
  947. border-radius: 26px;
  948. display: flex;
  949. align-items: center;
  950. padding-left: 10px;
  951. gap:4px;
  952. font-weight: 400;
  953. font-size: 12px;
  954. line-height: 16px;
  955. color: #FFFFFF;
  956. }
  957. .details{
  958. display: flex;
  959. align-items: center;
  960. gap:4px;
  961. font-weight: 400;
  962. font-size: 12px;
  963. line-height: 16px;
  964. color: #7b7b7b;
  965. }
  966. }
  967. }
  968. .batchExecution{
  969. display: flex;
  970. justify-content: space-between;
  971. gap:8px;
  972. margin-top: 24px;
  973. height: 50px;
  974. .left{
  975. display: flex;
  976. gap:8px;
  977. flex-direction: column;
  978. .text{
  979. font-weight: 400;
  980. font-size: 12px;
  981. line-height: 16px;
  982. color: #919191;
  983. }
  984. .number{
  985. font-weight: 700;
  986. font-size: 17px;
  987. line-height: 22px;
  988. color: #222222;
  989. }
  990. }
  991. .right{
  992. display: flex;
  993. gap:4px;
  994. align-items: center;
  995. font-weight: 700;
  996. font-size: 15px;
  997. line-height: 20px;
  998. color: #FFFFFF;
  999. width: 132px;
  1000. height: 44px;
  1001. justify-content: center;
  1002. background: #2980FF;
  1003. border: 1px solid #2980FF;
  1004. border-radius: 10px;
  1005. cursor: pointer;
  1006. }
  1007. }
  1008. .horizontalLine{
  1009. width: 343px;
  1010. height: 1px;
  1011. border-bottom: 1px solid #F5F5F5;
  1012. margin-left: -24px;
  1013. margin-top: 28px;
  1014. }
  1015. .time{
  1016. font-weight: 400;
  1017. font-size: 12px;
  1018. line-height: 16px;
  1019. color: #919191;
  1020. margin-top: 20px;
  1021. }
  1022. }
  1023. }
  1024. .drawerAddress-container{
  1025. display: flex;
  1026. flex-direction: column;
  1027. height: 100vh;
  1028. overflow: auto;
  1029. .drawerAddress-container-head{
  1030. padding: 56px 40px;
  1031. background: #FFFFFF;
  1032. display: flex;
  1033. align-items: center;
  1034. justify-content: space-between;
  1035. .drawerAddress-container-head-left{
  1036. display: flex;
  1037. gap:8px;
  1038. .avatar{
  1039. width: 46px;
  1040. height: 46px;
  1041. border-radius: 50%;
  1042. background: black;
  1043. }
  1044. .info{
  1045. display: flex;
  1046. flex-direction: column;
  1047. gap:8px;
  1048. .projectName{
  1049. font-weight: 700;
  1050. font-size: 17px;
  1051. line-height: 22px;
  1052. color: #222222;
  1053. }
  1054. .id{
  1055. font-weight: 400;
  1056. font-size: 12px;
  1057. line-height: 16px;
  1058. color: #838383;
  1059. }
  1060. }
  1061. }
  1062. .drawerAddress-container-head-right{
  1063. display: flex;
  1064. align-items: center;
  1065. gap:48px;
  1066. .complete{
  1067. width: 118px;
  1068. height: 52px;
  1069. border: 2px solid #4A76FF;
  1070. border-radius: 10px;
  1071. gap:4px;
  1072. display: flex;
  1073. align-items: center;
  1074. justify-content: center;
  1075. font-weight: 700;
  1076. font-size: 15px;
  1077. line-height: 20px;
  1078. color: #2980FF;
  1079. cursor: pointer;
  1080. }
  1081. }
  1082. }
  1083. .drawerAddress-container-main{
  1084. padding: 36px 40px;
  1085. background: #f9fbff;
  1086. flex-grow: 1;
  1087. display: flex;
  1088. flex-direction: column;
  1089. gap:20px;
  1090. .select{
  1091. display: flex;
  1092. gap:24px;
  1093. }
  1094. }
  1095. }
  1096. .drawerRecord-container{
  1097. display: flex;
  1098. flex-direction: column;
  1099. height: 100vh;
  1100. overflow: auto;
  1101. position: relative;
  1102. .drawerAddress-container-head{
  1103. padding: 56px 40px;
  1104. background: #FFFFFF;
  1105. display: flex;
  1106. align-items: center;
  1107. justify-content: space-between;
  1108. .drawerAddress-container-head-left{
  1109. display: flex;
  1110. flex-direction: column;
  1111. gap:8px;
  1112. .missionName{
  1113. display: flex;
  1114. gap:8px;
  1115. align-items: center;
  1116. .id{
  1117. padding: 0 8px;
  1118. height: 24px;
  1119. background: #F5F5F5;
  1120. border: 1px solid #E0E0E0;
  1121. border-radius: 4px;
  1122. font-weight: 400;
  1123. font-size: 12px;
  1124. line-height: 16px;
  1125. color: #7b7b7b;
  1126. display: flex;
  1127. align-items: center;
  1128. justify-content: center;
  1129. }
  1130. .name{
  1131. font-weight: 700;
  1132. font-size: 21px;
  1133. line-height: 28px;
  1134. color: #181818;
  1135. }
  1136. }
  1137. .text{
  1138. font-weight: 400;
  1139. font-size: 12px;
  1140. line-height: 16px;
  1141. color: #919191;
  1142. }
  1143. }
  1144. }
  1145. .drawerAddress-container-main{
  1146. padding: 36px 40px;
  1147. background: #f9fbff;
  1148. flex-grow: 1;
  1149. display: flex;
  1150. flex-direction: column;
  1151. gap:20px;
  1152. .drawerAddress-container-head-left{
  1153. display: flex;
  1154. gap:24px;
  1155. .avatar{
  1156. width: 46px;
  1157. height: 46px;
  1158. border-radius: 50%;
  1159. background: black;
  1160. }
  1161. .info{
  1162. display: flex;
  1163. flex-direction: column;
  1164. gap:8px;
  1165. .projectName{
  1166. font-weight: 700;
  1167. font-size: 17px;
  1168. line-height: 22px;
  1169. color: #222222;
  1170. }
  1171. .webLink{
  1172. font-weight: 700;
  1173. font-size: 15px;
  1174. line-height: 20px;
  1175. color: #2980FF;
  1176. text-decoration-line: underline;
  1177. display: flex;
  1178. align-items: center;
  1179. gap:8px
  1180. }
  1181. }
  1182. }
  1183. .horizontalLine{
  1184. width: 100%;
  1185. height: 1px;
  1186. border-bottom: 1px solid #f1f1f1;
  1187. margin-top: 40px;
  1188. margin-bottom: 30px;
  1189. }
  1190. .interactionStrategy{
  1191. width: 100%;
  1192. height: 108px;
  1193. background: #FFFFFF;
  1194. border: 1px solid #F5F5F5;
  1195. border-radius: 4px;
  1196. padding: 28px;
  1197. display: flex;
  1198. justify-content: space-between;
  1199. .item{
  1200. display: flex;
  1201. flex-direction: column;
  1202. gap:12px;
  1203. .title{
  1204. font-weight: 400;
  1205. font-size: 14px;
  1206. line-height: 18px;
  1207. color: #181818;
  1208. display: flex;
  1209. align-items: center;
  1210. gap:6px;
  1211. }
  1212. .info{
  1213. font-weight: 700;
  1214. font-size: 17px;
  1215. line-height: 22px;
  1216. color: #222222;
  1217. }
  1218. }
  1219. }
  1220. .recordTitle{
  1221. display: flex;
  1222. justify-content: space-between;
  1223. align-items: center;
  1224. .left{
  1225. display: flex;
  1226. flex-direction: column;
  1227. gap:8px;
  1228. .text{
  1229. font-weight: 700;
  1230. font-size: 21px;
  1231. line-height: 28px;
  1232. color: #181818;
  1233. }
  1234. .number{
  1235. font-weight: 700;
  1236. font-size: 12px;
  1237. line-height: 16px;
  1238. color: #8e8f91;
  1239. }
  1240. }
  1241. }
  1242. .table{
  1243. .status{
  1244. display: flex;
  1245. justify-content: space-between;
  1246. cursor: pointer;
  1247. .text{
  1248. display: flex;
  1249. align-items: center;
  1250. gap:4px;
  1251. font-weight: 400;
  1252. font-size: 15px;
  1253. line-height: 20px;
  1254. color: #222222;
  1255. white-space: nowrap;
  1256. }
  1257. }
  1258. }
  1259. }
  1260. .drawerView-container-footer {
  1261. height: 84px;
  1262. padding: 30px 10px;
  1263. display: flex;
  1264. align-items: center;
  1265. //justify-content: space-around;
  1266. .pagination{
  1267. width: 250px;
  1268. }
  1269. .manageAccount{
  1270. display: flex;
  1271. align-items: center;
  1272. gap:12px;
  1273. font-weight: 700;
  1274. font-size: 17px;
  1275. line-height: 22px;
  1276. color: #222222;
  1277. }
  1278. .disassociation{
  1279. display: flex;
  1280. align-items: center;
  1281. gap:12px;
  1282. font-weight: 700;
  1283. font-size: 17px;
  1284. line-height: 22px;
  1285. color: #EB5757;
  1286. }
  1287. }
  1288. .progressBarBox{
  1289. display: flex;
  1290. justify-content: center;
  1291. .progressBar{
  1292. position: absolute;
  1293. top:138px;
  1294. width: 90%;
  1295. height: 50px;
  1296. background: #2980FF;
  1297. box-shadow: 0px 1px 16px rgba(15, 15, 15, 0.16);
  1298. border-radius: 144px;
  1299. display: flex;
  1300. align-items: center;
  1301. justify-content: space-between;
  1302. .progressBar-two{
  1303. width: 40%;
  1304. height: 50px;
  1305. background: #3b9ffa;
  1306. border-radius: 144px;
  1307. display: flex;
  1308. align-items: center;
  1309. padding-left: 16px;
  1310. gap:6px;
  1311. font-weight: 400;
  1312. font-size: 14px;
  1313. line-height: 18px;
  1314. color: #FFFFFF;
  1315. }
  1316. .number{
  1317. font-weight: 700;
  1318. font-size: 17px;
  1319. line-height: 22px;
  1320. color: #FFFFFF;
  1321. padding-right: 16px;
  1322. }
  1323. }
  1324. }
  1325. }
  1326. .drawerStrategy-container{
  1327. display: flex;
  1328. flex-direction: column;
  1329. height: 100vh;
  1330. overflow: auto;
  1331. .drawerAddress-container-head{
  1332. padding: 56px 40px;
  1333. background: #FFFFFF;
  1334. display: flex;
  1335. align-items: center;
  1336. justify-content: space-between;
  1337. .drawerAddress-container-head-left{
  1338. display: flex;
  1339. gap:8px;
  1340. .info{
  1341. display: flex;
  1342. flex-direction: column;
  1343. gap:8px;
  1344. .projectName{
  1345. font-weight: 700;
  1346. font-size: 17px;
  1347. line-height: 22px;
  1348. color: #222222;
  1349. }
  1350. .id{
  1351. font-weight: 400;
  1352. font-size: 12px;
  1353. line-height: 16px;
  1354. color: #838383;
  1355. }
  1356. }
  1357. }
  1358. .drawerAddress-container-head-right{
  1359. display: flex;
  1360. align-items: center;
  1361. gap:48px;
  1362. .complete{
  1363. width: 118px;
  1364. height: 52px;
  1365. border: 2px solid #4A76FF;
  1366. border-radius: 10px;
  1367. gap:4px;
  1368. display: flex;
  1369. align-items: center;
  1370. justify-content: center;
  1371. font-weight: 700;
  1372. font-size: 15px;
  1373. line-height: 20px;
  1374. color: #2980FF;
  1375. cursor: pointer;
  1376. }
  1377. }
  1378. }
  1379. .drawerAddress-container-main{
  1380. padding: 36px 40px;
  1381. background: #f9fbff;
  1382. flex-grow: 1;
  1383. display: flex;
  1384. flex-direction: column;
  1385. gap:12px;
  1386. .item{
  1387. display: flex;
  1388. flex-direction: column;
  1389. gap:12px;
  1390. .title{
  1391. font-weight: 400;
  1392. font-size: 14px;
  1393. line-height: 18px;
  1394. color: #181818;
  1395. }
  1396. }
  1397. }
  1398. .accountPassword{
  1399. width: 440px;
  1400. height: 374px;
  1401. background: #fbfdff;
  1402. border-radius: 10px;
  1403. position: fixed;
  1404. margin: auto;
  1405. left: 0;
  1406. right: 0;
  1407. top: 0;
  1408. bottom: 0;
  1409. padding: 36px 40px;
  1410. .title{
  1411. font-weight: 700;
  1412. font-size: 21px;
  1413. line-height: 28px;
  1414. color: #212121;
  1415. }
  1416. .inputTitle{
  1417. font-weight: 500;
  1418. font-size: 14px;
  1419. line-height: 18px;
  1420. color: #383838;
  1421. margin-top: 32px;
  1422. margin-bottom: 12px;
  1423. }
  1424. .confirm{
  1425. display: flex;
  1426. align-items: center;
  1427. justify-content: center;
  1428. gap:8px;
  1429. font-weight: 700;
  1430. font-size: 15px;
  1431. line-height: 20px;
  1432. color: #FFFFFF;
  1433. width: 100%;
  1434. height: 52px;
  1435. background: #2980ff;
  1436. border-radius: 6px;
  1437. margin-top: 12px;
  1438. margin-bottom: 20px;
  1439. cursor: pointer;
  1440. }
  1441. .tip{
  1442. display: flex;
  1443. flex-direction: column;
  1444. gap:9px;
  1445. margin-top: 36px;
  1446. .title{
  1447. display: flex;
  1448. align-items: center;
  1449. gap:4px;
  1450. font-weight: 700;
  1451. font-size: 17px;
  1452. line-height: 22px;
  1453. color: #EB5757;
  1454. }
  1455. .description{
  1456. font-weight: 400;
  1457. font-size: 14px;
  1458. line-height: 18px;
  1459. color: #EB5757;
  1460. }
  1461. }
  1462. }
  1463. }
  1464. }
  1465. </style>