You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.vue 22 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. <template>
  2. <div>
  3. <el-dialog
  4. :title="$t('notebook.createNewNotebook')"
  5. :visible.sync="dialogVisible"
  6. width="50%"
  7. :close-on-click-modal="false"
  8. @closed="handleClose"
  9. >
  10. <div class="wrapper">
  11. <div v-show="alertCb" class="ui message alert-info">
  12. <div style="display: flex;align-items: center;">
  13. <i class="ri-information-line" style="font-size: 35px;color: rgba(242, 113, 28, 1);;"></i>
  14. <div style="text-align: left;margin-left: 1rem;">
  15. <div style="font-weight: 600;line-height: 2;">{{$t('notebook.sameTaskTips1')}} <span style="color:rgba(242, 113, 28, 1);">{{$t('notebook.sameTaskTips2')}}</span> {{$t('notebook.sameTaskTips3')}}</div>
  16. <div style="color:#939393">{{$t('notebook.sameTaskTips4')}} “<a href="/cloudbrains" target="_blank">{{$t('notebook.sameTaskTips5')}} &gt; {{$t('notebook.sameTaskTips6')}}</a>” {{$t('notebook.sameTaskTips7')}}</div>
  17. </div>
  18. </div>
  19. </div>
  20. <div
  21. class="three-resource-type"
  22. :class="{ active: selectIndex == 0 }"
  23. @click="selectResource(0)"
  24. >
  25. <div class="resource-child-node">
  26. <div class="resource-type-icon background-C">
  27. <span class="text">C</span>
  28. </div>
  29. <div class="resource-type-detail">
  30. <div class="detail-title"><span>{{$t('notebook.cpuEnv')}}</span></div>
  31. <div class="detail-spec">
  32. <span>{{cpuSpec}}</span>
  33. </div>
  34. <div class="detail-spec">
  35. <span>{{$t('image')}}:{{notebookInfo.imageCpuDescription}}</span>
  36. </div>
  37. </div>
  38. <div class="resource-select">
  39. <i v-if="selectIndex===0" :class="{'slide-in-bottom': !slideActive && !initSelect }" class="ri-checkbox-circle-line green"></i>
  40. <i
  41. class="ri-checkbox-blank-circle-line gray"
  42. :class="{'fade-out':selectIndex===0}"
  43. ></i>
  44. </div>
  45. </div>
  46. </div>
  47. <div
  48. class="three-resource-type"
  49. :class="{ active: selectIndex == 1 }"
  50. @click="selectResource(1)"
  51. >
  52. <div class="resource-child-node">
  53. <div class="resource-type-icon background-G">
  54. <span class="text">G</span>
  55. </div>
  56. <div class="resource-type-detail">
  57. <div class="detail-title"><span>{{$t('notebook.gpuEnv')}}</span></div>
  58. <div class="detail-spec">
  59. <span>{{gpuSpec}}</span>
  60. </div>
  61. <div class="detail-spec">
  62. <span>{{$t('image')}}:{{notebookInfo.imageGpuDescription}}</span>
  63. </div>
  64. </div>
  65. <div class="resource-select">
  66. <i v-if="selectIndex===1 && !initSelect" :class="[slideActive && !initSelect ?'slide-in-top':'slide-in-bottom']" class="ri-checkbox-circle-line green"></i>
  67. <i v-if="selectIndex===1 && initSelect" class="ri-checkbox-circle-line green"></i>
  68. <i
  69. class="ri-checkbox-blank-circle-line gray"
  70. :class="{'fade-out':selectIndex===1}"
  71. ></i>
  72. </div>
  73. </div>
  74. </div>
  75. <div
  76. class="three-resource-type"
  77. :class="{ active: selectIndex == 2 }"
  78. @click="selectResource(2)"
  79. >
  80. <div class="resource-child-node">
  81. <div class="resource-type-icon background-N">
  82. <span class="text">N</span>
  83. </div>
  84. <div class="resource-type-detail">
  85. <div class="detail-title"><span>{{$t('notebook.npuEnv')}}</span></div>
  86. <div class="detail-spec">
  87. <span>{{npuSpec}}</span>
  88. </div>
  89. <div class="detail-spec">
  90. <span>{{$t('image')}}:{{notebookInfo.imageNpuDescription}}</span>
  91. </div>
  92. </div>
  93. <div class="resource-select">
  94. <i v-if="selectIndex===2" :class="{'slide-in-top': slideActive && !initSelect}" class="ri-checkbox-circle-line green"></i>
  95. <i
  96. class="ri-checkbox-blank-circle-line gray"
  97. :class="{'fade-out':selectIndex===2}"
  98. ></i>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="resource-footer">
  103. <div class="resource-operate" v-if="selectIndex==0">
  104. <div v-if="btnStatus[0]===0">
  105. <button class="ui green small button" @click="createTask(0)"></i>{{$t('notebook.newTask')}}</button>
  106. <span v-if="notebookInfo.waitCountGpu==0" class="text">{{$t('notebook.noQuene')}}</span>
  107. <span v-else class="text">{{$t('notebook.queneTips1')}} <span style="color: red;">{{notebookInfo.waitCountGpu}}</span>  {{$t('notebook.queneTips2')}}</span>
  108. </div>
  109. <div v-else-if="btnStatus[0]===1">
  110. <button class="ui disabled small button" style="background-color: #888;"><i class="loading spinner icon" style="color: #fff;"></i>{{$t('notebook.newTask')}}</button>
  111. <span class="text">{{$t('notebook.watiResource')}}</span>
  112. </div>
  113. <div v-else-if="btnStatus[0]===2">
  114. <button class="ui small button" style="background-color: #1684fc;">
  115. <a style="color:#fff" :href="deubgUrlGpu" target="_blank">{{$t('notebook.debug')}}</a>
  116. </button>
  117. <button class="ui small button" @click="stopDebug(0)">{{$t('notebook.stop')}}</button>
  118. <span class="text">{{$t('notebook.notebookRunning')}}</span>
  119. </div>
  120. <div v-else>
  121. <button class="ui disabled small button" style="background-color: #888;"><i class="loading spinner icon" style="color: #fff;"></i>{{$t('notebook.stopping')}}</button>
  122. </div>
  123. </div>
  124. <div class="resource-operate" v-if="selectIndex==1">
  125. <div v-if="btnStatus[1]===0">
  126. <button class="ui green small button" @click="createTask(1)"></i>{{$t('notebook.newTask')}}</button>
  127. <span v-if="notebookInfo.waitCountGpu==0" class="text">{{$t('notebook.noQuene')}}</span>
  128. <span v-else class="text">{{$t('notebook.queneTips1')}} <span style="color: red;">{{notebookInfo.waitCountGpu}}</span>  {{$t('notebook.queneTips2')}}</span>
  129. </div>
  130. <div v-else-if="btnStatus[1]===1">
  131. <button class="ui disabled small button" style="background-color: #888;"><i class="loading spinner icon" style="color: #fff;"></i>{{$t('notebook.newTask')}}</button>
  132. <span class="text">{{$t('notebook.watiResource')}}</span>
  133. </div>
  134. <div v-else-if="btnStatus[1]===2">
  135. <button class="ui small button" style="background-color: #1684fc;">
  136. <a style="color:#fff" :href="deubgUrlGpu" target="_blank">{{$t('notebook.debug')}}</a>
  137. </button>
  138. <button class="ui small button" @click="stopDebug(1)">{{$t('notebook.stop')}}</button>
  139. <span class="text">{{$t('notebook.notebookRunning')}}</span>
  140. </div>
  141. <div v-else>
  142. <button class="ui disabled small button" style="background-color: #888;"><i class="loading spinner icon" style="color: #fff;"></i>{{$t('notebook.stopping')}}</button>
  143. </div>
  144. </div>
  145. <div class="resource-operate" v-if="selectIndex==2">
  146. <div v-if="btnStatus[2]===0">
  147. <button class="ui green small button" @click="createTask(2)"></i>{{$t('notebook.newTask')}}</button>
  148. <span v-if="notebookInfo.waitCountNpu==0" class="text">{{$t('notebook.noQuene')}}</span>
  149. <span v-else class="text">{{$t('notebook.queneTips1')}} <span style="color: red;">{{notebookInfo.waitCountNpu}}</span>  {{$t('notebook.queneTips2')}}</span>
  150. </div>
  151. <div v-else-if="btnStatus[2]===1">
  152. <button class="ui disabled small button" style="background-color: #888;"><i class="loading spinner icon" style="color: #fff;"></i>{{$t('notebook.newTask')}}</button>
  153. <span class="text">{{$t('notebook.watiResource')}}</span>
  154. </div>
  155. <div v-else-if="btnStatus[2]===2">
  156. <button class="ui small button" style="background-color: #1684fc;">
  157. <a style="color:#fff" :href="deubgUrlNpu" target="_blank">{{$t('notebook.debug')}}</a>
  158. </button>
  159. <button class="ui small button" @click="stopDebug(2)">{{$t('notebook.stop')}}</button>
  160. <span class="text">{{$t('notebook.notebookRunning')}}</span>
  161. </div>
  162. <div v-else>
  163. <button class="ui disabled small button" style="background-color: #888;"><i class="loading spinner icon" style="color: #fff;"></i>{{$t('notebook.stopping')}}</button>
  164. </div>
  165. </div>
  166. </div>
  167. <div style="text-align: right;padding-bottom: 12px;">
  168. <span style="color: #f2711c;font-size: 12px;">{{$t('notebook.tips')}}</span>
  169. </div>
  170. </div>
  171. </el-dialog>
  172. </div>
  173. </template>
  174. <script>
  175. import { getFileNotebook,createNotebook,getCb1Notebook,getCb2Notebook,stopNotebook } from "~/apis/modules/notobook";
  176. import { Message } from "element-ui";
  177. let timerCb1,timerCb2
  178. let {AppSubUrl} = window.config
  179. const finalState = [
  180. "STOPPED",
  181. "CREATE_FAILED",
  182. "UNAVAILABLE",
  183. "DELETED",
  184. "RESIZE_FAILED",
  185. "SUCCEEDED",
  186. "IMAGE_FAILED",
  187. "SUBMIT_FAILED",
  188. "DELETE_FAILED",
  189. "KILLED",
  190. "COMPLETED",
  191. "FAILED",
  192. "CANCELED",
  193. "LOST",
  194. "START_FAILED",
  195. "SUBMIT_MODEL_FAILED",
  196. "DEPLOY_SERVICE_FAILED",
  197. "CHECK_FAILED",
  198. "STOPPING"
  199. ];
  200. export default {
  201. data() {
  202. return {
  203. dialogVisible: false,
  204. selectIndex: 0,
  205. slideActive:true,
  206. initSelect:true,
  207. notebookInfo:{specCpu:{acc_cards_num:0},specGpu:{acc_cards_num:0},specNpu:{acc_cards_num:0}},
  208. fileInfo:{
  209. file:'',
  210. branch_name:'',
  211. owner_name:'',
  212. project_name:'',
  213. },
  214. btnStatus:{0:0,1:0,2:0},
  215. alertCb:false,
  216. deubgUrlNpu:'',
  217. deubgUrlGpu:'',
  218. deubgUrlNpuStop:'',
  219. deubgUrlGpuStop:'',
  220. };
  221. },
  222. methods: {
  223. handleClose(done) {
  224. this.initSelect = true
  225. this.alertCb = false
  226. },
  227. selectResource(index) {
  228. this.getNotebookInfo()
  229. if(index==this.selectIndex){
  230. return
  231. }
  232. if(index>this.selectIndex){
  233. this.slideActive = true
  234. }else{
  235. this.slideActive = false
  236. }
  237. this.selectIndex = index;
  238. this.initSelect = false
  239. this.alertCb = false
  240. },
  241. getNotebookInfo(){
  242. getFileNotebook().then((res)=>{
  243. if(res.data.code==0){
  244. this.notebookInfo = res.data
  245. }else{
  246. Message.error(res.data.message)
  247. }
  248. }).catch((err)=>{
  249. Message.error(err)
  250. })
  251. },
  252. getCb1NotebookInfo(path,id,index){
  253. getCb1Notebook(path,id).then((res)=>{
  254. if(res.status===200){
  255. if(res.data.JobStatus==="RUNNING"){
  256. this.btnStatus[index]=2
  257. this.deubgUrlGpu = `${AppSubUrl}/${this.fileInfo.owner_name}/${this.notebookInfo.projectName}/cloudbrain/${id}/debug`
  258. this.deubgUrlGpuStop = `${AppSubUrl}/${this.fileInfo.owner_name}/${this.notebookInfo.projectName}/cloudbrain/${id}/stop`
  259. clearInterval(timerCb1)
  260. }
  261. if(finalState.includes(res.data.JobStatus)){
  262. this.btnStatus[index] = 0
  263. clearInterval(timerCb1)
  264. }
  265. }
  266. })
  267. },
  268. getCb2NotebookInfo(path,id){
  269. getCb2Notebook(path,id).then((res)=>{
  270. if(res.status===200){
  271. if(res.data.JobStatus==="RUNNING"){
  272. this.btnStatus[2]=2
  273. this.deubgUrlNpu = `${AppSubUrl}/${this.fileInfo.owner_name}/${this.notebookInfo.projectName}/modelarts/notebook/${id}/debug`
  274. this.deubgUrlNpuStop = `${AppSubUrl}/${this.fileInfo.owner_name}/${this.notebookInfo.projectName}/modelarts/notebook/${id}/stop`
  275. clearInterval(timerCb2)
  276. }
  277. if(finalState.includes(res.data.JobStatus)){
  278. this.btnStatus[2] = 0
  279. clearInterval(timerCb2)
  280. }
  281. }
  282. })
  283. },
  284. stopDebug(index){
  285. this.btnStatus[index]=3
  286. let url = index===2 ? this.deubgUrlNpuStop :this.deubgUrlGpuStop
  287. stopNotebook(url).then((res)=>{
  288. if(res.data.result_code==='0'){
  289. this.btnStatus[index]=0
  290. Message.success(this.$t("notebook.stopSuccess"))
  291. }else{
  292. this.btnStatus[index]=0
  293. Message.error(res.data.error_msg)
  294. }
  295. }).catch((err)=>{
  296. this.btnStatus[index]=0
  297. Message.error(err)
  298. })
  299. },
  300. createTask(index){
  301. this.btnStatus[index]=1
  302. const data = {type:index,...this.fileInfo}
  303. let repoPath = `repos/${this.fileInfo.owner_name}/${this.fileInfo.project_name}`
  304. createNotebook(data).then((res)=>{
  305. if(res.data.code===0 && res.status===200){
  306. if(index===2){
  307. timerCb2 = setInterval(() => {
  308. setTimeout(this.getCb2NotebookInfo(repoPath,res.data.message), 0)
  309. }, 10000)
  310. }else{
  311. timerCb1 = setInterval(() => {
  312. setTimeout(this.getCb1NotebookInfo(repoPath,res.data.message,index), 0)
  313. }, 10000)
  314. }
  315. this.alertCb = false
  316. }else if(res.data.code==2){
  317. this.btnStatus[index]=0
  318. this.alertCb = true
  319. }else{
  320. this.btnStatus[index]=0
  321. Message.error(res.data.message)
  322. }
  323. }).catch((err)=>{
  324. console.log("------",err,err.response)
  325. if(err.response.status===403 && err.response.data.code===1 ){
  326. location.href=`${AppSubUrl}/authentication/wechat/bind`
  327. }
  328. this.btnStatus[index]=0
  329. this.alertCb = false
  330. Message.error(err)
  331. })
  332. }
  333. },
  334. computed: {
  335. cpuSpec(){
  336. return `${this.$t("notebook.specification")}:GPU: ${this.notebookInfo.specCpu.acc_cards_num}*${this.notebookInfo.specCpu.acc_card_type},
  337. CPU: ${this.notebookInfo.specCpu.cpu_cores}, ${this.$t("notebook.graphicMemory")}: ${this.notebookInfo.specCpu.gpu_mem_gi_b}GB,
  338. ${this.$t("notebook.memory")}: ${this.notebookInfo.specCpu.mem_gi_b}GB, ${this.$t("notebook.sharedMemory")}: ${this.notebookInfo.specCpu.share_mem_gi_b}GB`
  339. },
  340. npuSpec(){
  341. return `${this.$t("notebook.specification")}:NPU: ${this.notebookInfo.specNpu.acc_cards_num}*${this.notebookInfo.specNpu.acc_card_type},
  342. CPU: ${this.notebookInfo.specNpu.cpu_cores}, ${this.$t("notebook.graphicMemory")}: ${this.notebookInfo.specNpu.gpu_mem_gi_b}GB,
  343. ${this.$t("notebook.memory")}: ${this.notebookInfo.specNpu.mem_gi_b}GB, ${this.$t("notebook.sharedMemory")}: ${this.notebookInfo.specNpu.share_mem_gi_b}GB`
  344. },
  345. gpuSpec(){
  346. return `${this.$t("notebook.specification")}:NPU: ${this.notebookInfo.specGpu.acc_cards_num}*${this.notebookInfo.specGpu.acc_card_type},
  347. CPU: ${this.notebookInfo.specGpu.cpu_cores}, ${this.$t("notebook.graphicMemory")}: ${this.notebookInfo.specGpu.gpu_mem_gi_b}GB,
  348. ${this.$t("notebook.memory")}: ${this.notebookInfo.specGpu.mem_gi_b}GB, ${this.$t("notebook.sharedMemory")}: ${this.notebookInfo.specGpu.share_mem_gi_b}GB`
  349. }
  350. },
  351. beforeDestroy() {
  352. clearInterval(timerCb1)
  353. clearInterval(timerCb2)
  354. },
  355. mounted() {
  356. console.log("'asdasd")
  357. this.getNotebookInfo()
  358. const selfData = document.querySelector('#__vue-self-data')
  359. this.fileInfo.file = selfData.getAttribute('data-file')
  360. this.fileInfo.branch_name = selfData.getAttribute('data-branch')
  361. this.fileInfo.owner_name = selfData.getAttribute('data-owner')
  362. this.fileInfo.project_name = selfData.getAttribute('data-project')
  363. let that = this;
  364. document
  365. .querySelector("#notebook-debug")
  366. .addEventListener("click", function () {
  367. that.dialogVisible = true;
  368. });
  369. },
  370. };
  371. </script>
  372. <style scoped lang="less">
  373. /deep/ .el-dialog__header {
  374. text-align: left;
  375. height: 45px;
  376. background: rgb(240, 240, 240);
  377. border-radius: 5px 5px 0px 0px;
  378. border-bottom: 1px solid rgb(212, 212, 213);
  379. padding: 0 15px;
  380. display: flex;
  381. align-items: center;
  382. font-weight: 500;
  383. font-size: 16px;
  384. color: rgb(16, 16, 16);
  385. font-family: Roboto;
  386. .el-dialog__title {
  387. font-weight: 600;
  388. font-size: 15px;
  389. color: rgb(16, 16, 16);
  390. }
  391. .el-dialog__headerbtn {
  392. top: 15px;
  393. right: 15px;
  394. }
  395. }
  396. /deep/ .el-dialog__body {
  397. padding: 55px 15px 0 15px;
  398. }
  399. .wrapper {
  400. width: 100%;
  401. .active {
  402. background: linear-gradient(
  403. 269.2deg,
  404. rgba(183, 247, 255, 0.5) 0%,
  405. rgba(233, 233, 255, 0) 78.67%
  406. );
  407. border-radius: 5px 5px 0px 0px;
  408. }
  409. .alert-info{
  410. width: 70%;
  411. background-color: rgba(242, 113, 28, 0.05);
  412. border: 1px solid rgb(242, 113, 28);
  413. border-radius: 5px;
  414. margin: 0 auto;
  415. padding-bottom: 10px;
  416. }
  417. & >.three-resource-type:nth-child(2){
  418. border:none;
  419. }
  420. .three-resource-type {
  421. width: 70%;
  422. margin: 0 auto;
  423. display: flex;
  424. border-top: 1px solid rgba(16, 16, 16, 0.1);
  425. cursor: pointer;
  426. .resource-child-node {
  427. display: flex;
  428. align-items: center;
  429. width: 100%;
  430. height: 115px;
  431. .resource-type-icon {
  432. width: 50px;
  433. height: 50px;
  434. line-height: 20px;
  435. border-radius: 25px;
  436. text-align: center;
  437. display: flex;
  438. align-items: center;
  439. justify-content: center;
  440. flex-shrink: 0;
  441. .text {
  442. font-size: 26px;
  443. color: rgba(251, 251, 251, 1);
  444. font-family: ZKXiaoWeiLogo-regular;
  445. }
  446. }
  447. .background-C {
  448. background: linear-gradient(
  449. 134.2deg,
  450. rgba(130, 209, 246, 1) 0%,
  451. rgba(41, 182, 244, 1) 51.94%,
  452. rgba(0, 137, 205, 1) 102.83%
  453. );
  454. }
  455. .background-N {
  456. background: linear-gradient(
  457. 151.47deg,
  458. rgba(123, 50, 178, 1) 20.02%,
  459. rgba(64, 26, 93, 1) 100%
  460. );
  461. }
  462. .background-G {
  463. background: linear-gradient(
  464. -25.25deg,
  465. rgba(254, 86, 77, 1) 9.3%,
  466. rgba(251, 155, 54, 1) 38.86%,
  467. rgba(249, 202, 38, 1) 67.95%
  468. );
  469. }
  470. }
  471. .resource-type-detail {
  472. margin-left: 23px;
  473. .detail-title {
  474. font-family: SourceHanSansSC;
  475. font-weight: 500;
  476. font-size: 16px;
  477. color: rgb(16, 16, 16);
  478. font-style: normal;
  479. letter-spacing: 0px;
  480. line-height: 32px;
  481. text-decoration: none;
  482. }
  483. .detail-spec {
  484. font-family: SourceHanSansSC;
  485. font-weight: 400;
  486. font-size: 14px;
  487. color: rgba(136, 136, 136, 1);
  488. font-style: normal;
  489. letter-spacing: 0px;
  490. line-height: 24px;
  491. text-decoration: none;
  492. }
  493. }
  494. .resource-select {
  495. margin-left: auto;
  496. margin-right: 20px;
  497. font-size: 20px;
  498. height: 100%;
  499. display: flex;
  500. align-items: center;
  501. .green {
  502. color: green;
  503. }
  504. .gray {
  505. color: rgba(16, 16, 16, 0.1);
  506. }
  507. }
  508. }
  509. .resource-footer {
  510. margin-top: 40px;
  511. border-top: 1px solid rgba(16, 16, 16, 0.1);
  512. height: 71px;
  513. display: flex;
  514. align-items: center;
  515. .resource-operate {
  516. display: flex;
  517. align-items: center;
  518. .text{
  519. color: #101010;
  520. margin-left: 20px;
  521. }
  522. }
  523. }
  524. .slide-in-top {
  525. -webkit-animation: slide-in-top 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  526. animation: slide-in-top 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  527. }
  528. .slide-in-bottom {
  529. -webkit-animation: slide-in-bottom 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  530. animation: slide-in-bottom 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  531. }
  532. .fade-out {
  533. -webkit-animation: fade-in 1.2s cubic-bezier(0.39, 0.575, 0.565, 1) both;
  534. animation: fade-in 1.2s cubic-bezier(0.39, 0.575, 0.565, 1) both;
  535. position: absolute
  536. }
  537. @-webkit-keyframes slide-in-top {
  538. 0% {
  539. -webkit-transform: translateY(-50px);
  540. transform: translateY(-50px);
  541. opacity: 0;
  542. }
  543. 100% {
  544. -webkit-transform: translateY(0);
  545. transform: translateY(0);
  546. opacity: 1;
  547. }
  548. }
  549. @keyframes slide-in-top {
  550. 0% {
  551. -webkit-transform: translateY(-50px);
  552. transform: translateY(-50px);
  553. opacity: 0;
  554. }
  555. 100% {
  556. -webkit-transform: translateY(0);
  557. transform: translateY(0);
  558. opacity: 1;
  559. }
  560. }
  561. @-webkit-keyframes slide-in-bottom {
  562. 0% {
  563. -webkit-transform: translateY(50px);
  564. transform: translateY(50px);
  565. opacity: 0;
  566. }
  567. 100% {
  568. -webkit-transform: translateY(0);
  569. transform: translateY(0);
  570. opacity: 1;
  571. }
  572. }
  573. @keyframes slide-in-bottom {
  574. 0% {
  575. -webkit-transform: translateY(50px);
  576. transform: translateY(50px);
  577. opacity: 0;
  578. }
  579. 100% {
  580. -webkit-transform: translateY(0);
  581. transform: translateY(0);
  582. opacity: 1;
  583. }
  584. }
  585. @-webkit-keyframes fade-in {
  586. 0% {
  587. opacity: 1;
  588. }
  589. 100% {
  590. opacity: 0;
  591. }
  592. }
  593. @keyframes fade-in {
  594. 0% {
  595. opacity: 1;
  596. }
  597. 100% {
  598. opacity: 0;
  599. }
  600. }
  601. }
  602. </style>