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.

referenceDataset.vue 24 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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <template>
  2. <div>
  3. <template v-if="showFlag">
  4. <div v-loading="loadingLinkPage">
  5. <div class="ui container">
  6. <div class="ui mobile reversed stackable grid">
  7. <div class="row" style="justify-content: space-between">
  8. <div class="ui blue small menu compact selectcloudbrain">
  9. <a class="item" :href="`${repoLink}/datasets`">{{
  10. i18n.current_dataset
  11. }}</a>
  12. <a
  13. class="active item"
  14. :href="`${repoLink}/datasets/reference_datasets`"
  15. >{{ i18n.linked_datasets }}</a
  16. >
  17. </div>
  18. <button
  19. style="margin-right: 2rem"
  20. class="ui green button"
  21. :class="{ disabled: !canWrite }"
  22. @click="openDataset()"
  23. >
  24. {{ i18n.linked_datasets }}
  25. </button>
  26. </div>
  27. <div class="row">
  28. <div class="ui two cards" style="width: 100%">
  29. <div
  30. class="ui card refer-dataset-card"
  31. v-for="(item, index) in datasetList"
  32. :key="index"
  33. @click="gotoDataset(item)"
  34. >
  35. <div class="content" style="border-bottom: none">
  36. <div class="refer-dataset-card-content">
  37. <div class="refer-dataset-card-title">
  38. <span
  39. :title="item.Title"
  40. class="nowrap"
  41. style="display: inline-block; max-width: 90%"
  42. >{{ item.Title }}</span
  43. ><img
  44. v-if="item.Recommend"
  45. src="/img/jian.svg"
  46. style="margin-left: 0.5rem"
  47. />
  48. </div>
  49. <template v-if="item.IsStaring">
  50. <div style="display: flex">
  51. <button
  52. class="ui mini basic button dataset-card-flavor"
  53. @click.stop="postStar(item, isSigned)"
  54. >
  55. <i class="ri-heart-fill" style="color: #fa8c16"></i>
  56. <span style="margin-left: 0.3rem">{{
  57. i18n.unfavorite
  58. }}</span>
  59. </button>
  60. <a class="ui mini basic button card-flavor-num">
  61. {{ item.NumStars }}
  62. </a>
  63. </div>
  64. </template>
  65. <template v-else>
  66. <div style="display: flex">
  67. <button
  68. class="ui mini basic button dataset-card-flavor"
  69. @click.stop="postStar(item, isSigned)"
  70. >
  71. <i class="ri-heart-line"></i>
  72. <span style="margin-left: 0.3rem">{{
  73. i18n.favorite
  74. }}</span>
  75. </button>
  76. <a class="ui mini basic button card-flavor-num">
  77. {{ item.NumStars }}
  78. </a>
  79. </div>
  80. </template>
  81. </div>
  82. <div style="font-size: 12px; margin-top: 5px">
  83. <a
  84. v-if="item.Category"
  85. :href="'/explore/datasets?category=' + item.Category"
  86. class="ui repo-topic label topic"
  87. @click.stop
  88. >{{ i18n[item.Category] || item.Category }}</a
  89. >
  90. <a
  91. v-if="item.Task"
  92. :href="'/explore/datasets?task=' + item.Task"
  93. class="ui repo-topic label topic"
  94. @click.stop
  95. >{{ i18n[item.Task] || item.Task }}</a
  96. >
  97. <a
  98. v-if="item.License"
  99. :href="'/explore/datasets?license=' + item.License"
  100. class="ui repo-topic label topic"
  101. @click.stop
  102. >{{ item.License }}</a
  103. >
  104. </div>
  105. <div class="description card-flavor-desc">
  106. <p>{{ item.Description }}</p>
  107. </div>
  108. </div>
  109. <div
  110. class="extra content"
  111. style="border-top: none !important"
  112. >
  113. <div style="display: flex; align-items: center">
  114. <a
  115. :href="'/' + item.Repo.OwnerName"
  116. :title="item.Repo.OwnerName"
  117. @click.stop
  118. >
  119. <img
  120. class="ui avatar image"
  121. style="width: 22px; height: 22px"
  122. :src="'/user/avatar/' + item.Repo.OwnerName + '/-1'"
  123. />
  124. </a>
  125. <span
  126. style="
  127. color: #999999;
  128. font-size: 12px;
  129. margin-left: 0.5rem;
  130. "
  131. >{{ item.CreatedUnix | transformTimestamp }}</span
  132. >
  133. <span
  134. style="
  135. display: flex;
  136. align-items: center;
  137. justify-content: center;
  138. margin: 0 1rem;
  139. "
  140. :title="i18n.citations"
  141. >
  142. <i class="ri-link"></i>
  143. <span
  144. style="
  145. color: #101010;
  146. font-size: 12px;
  147. margin-left: 0.2rem;
  148. "
  149. >{{ item.UseCount }}</span
  150. >
  151. </span>
  152. <span
  153. style="display: flex; align-items: center; flex: 1"
  154. :title="i18n.downloads"
  155. >
  156. <i class="ri-download-line"></i>
  157. <span
  158. style="
  159. color: #101010;
  160. font-size: 12px;
  161. margin-left: 0.2rem;
  162. "
  163. >{{ item.DownloadTimes }}</span
  164. >
  165. </span>
  166. <button
  167. class="ui mini button"
  168. :class="{ disabled1: !canWrite }"
  169. @click.stop="
  170. cancelReferData(item.ID, item.Title, canWrite)
  171. "
  172. >
  173. {{ i18n.disassociate }}
  174. </button>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </template>
  184. <template v-else>
  185. <div class="ui container">
  186. <div class="ui mobile reversed stackable grid">
  187. <div class="row" style="justify-content: space-between">
  188. <div class="ui blue small menu compact selectcloudbrain">
  189. <a class="item" :href="`${repoLink}/datasets`">{{
  190. i18n.current_dataset
  191. }}</a>
  192. <a
  193. class="active item"
  194. :href="`${repoLink}/datasets/reference_datasets`"
  195. >{{ i18n.linked_datasets }}</a
  196. >
  197. </div>
  198. <button class="ui green button" @click="openDataset()">
  199. {{ i18n.linked_datasets }}
  200. </button>
  201. </div>
  202. </div>
  203. <div class="ui placeholder segment bgtask-none">
  204. <div class="ui icon header bgtask-header-pic"></div>
  205. <div class="bgtask-content-header">{{ i18n.not_link_dataset }}</div>
  206. <div class="bgtask-content">
  207. <div class="bgtask-content-txt">
  208. {{ i18n.no_link_dataset_tips1 }}
  209. </div>
  210. <div class="bgtask-content-txt">
  211. {{ i18n.dataset_instructions_for_use
  212. }}<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">{{
  213. i18n.dataset_camp_course
  214. }}</a>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. </template>
  220. <el-dialog
  221. :title="i18n.linked_datasets"
  222. :visible.sync="dialogVisible"
  223. :width="dialogWidth"
  224. @closed="refreshData"
  225. >
  226. <div class="ui icon input dataset-search-vue">
  227. <i
  228. class="search icon"
  229. style="cursor: pointer; pointer-events: auto"
  230. @click="searchName"
  231. ></i>
  232. <input
  233. type="text"
  234. :placeholder="i18n.search_dataset"
  235. v-model="search"
  236. @keydown.enter.stop.prevent="searchName"
  237. />
  238. </div>
  239. <el-row>
  240. <el-col
  241. :span="17"
  242. style="
  243. padding-right: 1rem;
  244. border-right: 1px solid #f5f5f6;
  245. position: relative;
  246. "
  247. >
  248. <el-tabs v-model="activeName">
  249. <el-tab-pane :label="i18n.public_dataset" name="first">
  250. <el-row v-loading="loadingPublicPage">
  251. <el-checkbox-group
  252. v-model="checkList"
  253. style="font-size: 14px; line-height: 1"
  254. >
  255. <div
  256. v-for="(item, index) in publicDatasetList"
  257. :key="index"
  258. class="select-data-wrap"
  259. >
  260. <div class="dataset-header-vue">
  261. <el-checkbox
  262. :label="item.ID"
  263. @change="(checked) => changeCheckbox(checked, item)"
  264. :title="item.Title"
  265. class="select-data-title"
  266. style="display: flex; align-items: end"
  267. ><span class="ref-data-title">
  268. <span
  269. style="overflow: hidden; text-overflow: ellipsis"
  270. >
  271. {{ item.Title }}
  272. </span>
  273. <img
  274. v-if="item.Recommend"
  275. src="/img/jian.svg"
  276. style="margin-left: 0.5rem"
  277. /> </span
  278. ></el-checkbox>
  279. <a
  280. class="select-data-title select-data-href"
  281. :href="`/${item.Repo.OwnerName}/${item.Repo.Name}/datasets`"
  282. :title="`${item.Repo.OwnerName}/${item.Repo.Alias}`"
  283. style="font-size: 12px"
  284. target="_blank"
  285. >{{ item.Repo.OwnerName }}/{{ item.Repo.Alias }}</a
  286. >
  287. </div>
  288. <div class="data-multiple-wrap" :title="item.Description">
  289. {{ item.Description }}
  290. </div>
  291. </div>
  292. </el-checkbox-group>
  293. </el-row>
  294. <div
  295. class="ui container"
  296. style="margin-top: 25px; text-align: center"
  297. >
  298. <el-pagination
  299. background
  300. @current-change="currentChange"
  301. :current-page="currentPage"
  302. :page-size="5"
  303. layout="total, prev, pager, next"
  304. :total="totalNum"
  305. >
  306. </el-pagination>
  307. </div>
  308. </el-tab-pane>
  309. </el-tabs>
  310. </el-col>
  311. <el-col
  312. :span="7"
  313. style="
  314. display: flex;
  315. flex-direction: column;
  316. height: 100%;
  317. right: 0;
  318. position: absolute;
  319. padding: 0 1.5rem;
  320. "
  321. >
  322. <div
  323. style="
  324. font-size: 14px;
  325. height: 40px;
  326. text-align: left;
  327. color: #0066ff;
  328. line-height: 40px;
  329. "
  330. >
  331. {{ i18n.selected_data_file }}
  332. </div>
  333. <div
  334. style="
  335. flex: 1;
  336. margin-top: 1.5rem;
  337. margin-bottom: 1rem;
  338. overflow-y: auto;
  339. "
  340. >
  341. <el-checkbox-group v-model="checkList">
  342. <el-checkbox
  343. v-for="(item, index) in selectDatasetArray"
  344. :key="index"
  345. :label="item.ID"
  346. :title="item.Title"
  347. @change="(checked) => changeCheckSelected(checked, item)"
  348. style="display: flex; margin: 0.5rem 0"
  349. ><span class="select-data-right">{{
  350. item.Title
  351. }}</span></el-checkbox
  352. >
  353. </el-checkbox-group>
  354. </div>
  355. <div style="text-align: end">
  356. <el-button
  357. @click.native="confirmDataset"
  358. size="small"
  359. style="
  360. background: #389e0d;
  361. color: #fff;
  362. border: 1px solid #389e0d;
  363. "
  364. >{{ i18n.sure }}</el-button
  365. >
  366. </div>
  367. </el-col>
  368. </el-row>
  369. </el-dialog>
  370. </div>
  371. </template>
  372. <script>
  373. const { _AppSubUrl, _StaticUrlPrefix, csrf } = window.config;
  374. export default {
  375. components: {},
  376. data() {
  377. return {
  378. dialogWidth: "65%",
  379. dialogVisible: false,
  380. activeName: "first",
  381. repoLink: "",
  382. datasetList: [],
  383. test: false,
  384. checkList: [],
  385. publicDatasetList: [],
  386. showFlag: true,
  387. search: "",
  388. selectDatasetArray: [],
  389. paramsPublics: { page: 1, q: "" },
  390. i18n: {},
  391. totalNum: 0,
  392. currentPage: 1,
  393. loadingLinkPage: false,
  394. loadingPublicPage: false,
  395. canWrite: true,
  396. isSigned: false,
  397. maxReferenceNum: 20,
  398. isCurrentUrl: true,
  399. };
  400. },
  401. methods: {
  402. openDataset() {
  403. this.checkList = this.datasetList.map((item) => {
  404. this.selectDatasetArray.push({ ID: item.ID, Title: item.Title });
  405. return item.ID;
  406. });
  407. this.dialogVisible = true;
  408. this.getDatasetList();
  409. },
  410. refreshData() {
  411. this.checkList = [];
  412. this.selectDatasetArray = [];
  413. },
  414. gotoDataset(item) {
  415. window.open(`/${item.Repo.OwnerName}/${item.Repo.Name}/datasets`);
  416. },
  417. currentChange(page) {
  418. this.paramsPublics.page = page;
  419. this.getDatasetList();
  420. },
  421. searchName() {
  422. this.paramsPublics.q = this.search;
  423. this.paramsPublics.page = 1;
  424. this.getDatasetList();
  425. },
  426. cancelReferData(id, name, canWrite) {
  427. if (!canWrite) {
  428. return;
  429. }
  430. let url = `${this.repoLink}/datasets/reference_datasets/${id}`;
  431. this.$axios
  432. .delete(url)
  433. .then((res) => {
  434. if (res.data.Code === 0) {
  435. this.$message.success(this.i18n.cancel_link_dataset.format(name));
  436. let index = this.datasetList.findIndex((item) => {
  437. return item.ID === id;
  438. });
  439. this.datasetList.splice(index, 1);
  440. if (this.datasetList.length === 0) {
  441. this.showFlag = false;
  442. }
  443. } else {
  444. this.$message.error(res.data.Message);
  445. }
  446. })
  447. .catch((err) => {
  448. this.$message.error(this.i18n.dataset_link_failed);
  449. console.log(err);
  450. });
  451. },
  452. confirmDataset() {
  453. this.submitReferDataset();
  454. this.dialogVisible = false;
  455. },
  456. changeCheckbox(checked, item) {
  457. if (this.checkList.length > this.maxReferenceNum) {
  458. this.checkList.pop();
  459. this.$message.error(
  460. this.i18n.dataset_over_nums.format(this.maxReferenceNum)
  461. );
  462. return;
  463. }
  464. if (this.checkList.length === this.maxReferenceNum && !checked) {
  465. this.$message.error(
  466. this.i18n.dataset_over_nums.format(this.maxReferenceNum)
  467. );
  468. return;
  469. }
  470. if (checked) {
  471. this.selectDatasetArray.push({ ID: item.ID, Title: item.Title });
  472. } else {
  473. let index = this.selectDatasetArray.findIndex((element) => {
  474. return element.ID === item.ID;
  475. });
  476. this.selectDatasetArray.splice(index, 1);
  477. }
  478. },
  479. changeCheckSelected(checked, item) {
  480. if (!checked) {
  481. let index = this.selectDatasetArray.findIndex((element) => {
  482. return element.ID === item.ID;
  483. });
  484. this.selectDatasetArray.splice(index, 1);
  485. }
  486. },
  487. postStar(item, isSigned) {
  488. if (!isSigned) {
  489. return;
  490. }
  491. if (item.IsStaring) {
  492. let url = `${this.repoLink}/datasets/${item.ID}/unstar`;
  493. this.$axios.put(url).then((res) => {
  494. if (res.data.Code === 0) {
  495. this.datasetList.forEach((element, i) => {
  496. if (element.ID === item.ID) {
  497. this.datasetList[i].NumStars -= 1;
  498. this.datasetList[i].IsStaring = !this.datasetList[i].IsStaring;
  499. }
  500. });
  501. }
  502. });
  503. } else {
  504. let url = `${this.repoLink}/datasets/${item.ID}/star`;
  505. this.$axios.put(url).then((res) => {
  506. if (res.data.Code === 0) {
  507. this.datasetList.forEach((element, i) => {
  508. if (element.ID === item.ID) {
  509. this.datasetList[i].NumStars += 1;
  510. this.datasetList[i].IsStaring = !this.datasetList[i].IsStaring;
  511. }
  512. });
  513. }
  514. });
  515. }
  516. },
  517. getSelectDatasetList() {
  518. this.loadingLinkPage = true;
  519. let url = `${this.repoLink}/datasets/reference_datasets_data`;
  520. this.$axios.get(url).then((res) => {
  521. this.loadingLinkPage = false;
  522. if (!res.data) {
  523. this.showFlag = false;
  524. this.datasetList = [];
  525. return;
  526. } else {
  527. this.datasetList = res.data;
  528. this.datasetList.length
  529. ? (this.showFlag = true)
  530. : (this.showFlag = false);
  531. }
  532. });
  533. },
  534. getDatasetList() {
  535. this.loadingPublicPage = true;
  536. let url = `${this.repoLink}/datasets/reference_datasets_available`;
  537. this.$axios
  538. .get(url, {
  539. params: this.paramsPublics,
  540. })
  541. .then((res) => {
  542. this.publicDatasetList = JSON.parse(res.data.data);
  543. this.totalNum = parseInt(res.data.count);
  544. this.loadingPublicPage = false;
  545. });
  546. },
  547. submitReferDataset() {
  548. if (this.checkList.length > this.maxReferenceNum) {
  549. this.$message.error(
  550. this.i18n.dataset_over_nums.format(this.maxReferenceNum)
  551. );
  552. return;
  553. }
  554. let url = `${this.repoLink}/datasets/reference_datasets`;
  555. let data = this.qs.stringify(
  556. {
  557. _csrf: csrf,
  558. dataset_id: this.checkList,
  559. },
  560. { arrayFormat: "repeat" }
  561. );
  562. this.$axios
  563. .post(url, data)
  564. .then((res) => {
  565. if (res.data.Code === 0) {
  566. this.$message.success(this.i18n.dataset_link_success);
  567. this.getSelectDatasetList();
  568. } else {
  569. this.$message.error(res.data.Message);
  570. }
  571. })
  572. .catch((err) => {
  573. this.$message.error(this.i18n.dataset_link_failed);
  574. console.log(err);
  575. });
  576. },
  577. },
  578. filters: {
  579. transformTimestamp(timestamp) {
  580. const date = new Date(parseInt(timestamp) * 1000);
  581. const Y = date.getFullYear() + "-";
  582. const M =
  583. (date.getMonth() + 1 < 10
  584. ? "0" + (date.getMonth() + 1)
  585. : date.getMonth() + 1) + "-";
  586. const D =
  587. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  588. const dateString = Y + M + D;
  589. return dateString;
  590. },
  591. },
  592. watch: {
  593. search(val) {
  594. if (!val) {
  595. this.searchName();
  596. }
  597. },
  598. showFlag(val) {
  599. if (!val || this.isCurrentUrl) {
  600. document
  601. .getElementById("header-dataset")
  602. .setAttribute("href", this.repoLink + "/datasets");
  603. } else {
  604. document
  605. .getElementById("header-dataset")
  606. .setAttribute("href", this.repoLink + "/datasets/reference_datasets");
  607. }
  608. },
  609. },
  610. mounted() {
  611. this.getSelectDatasetList();
  612. },
  613. created() {
  614. this.repoLink = $(".reference-dataset").data("repolink") || "";
  615. this.canWrite = $(".reference-dataset").data("canwrite");
  616. this.isSigned = $(".reference-dataset").data("is-sign");
  617. this.maxReferenceNum = $(".reference-dataset").data("max-reference-num");
  618. this.isCurrentUrl = $(".reference-dataset").data("address");
  619. if (document.documentElement.attributes["lang"].nodeValue == "en-US") {
  620. this.i18n = this.$locale.US;
  621. } else {
  622. this.i18n = this.$locale.CN;
  623. }
  624. },
  625. beforeDestroy() {},
  626. };
  627. </script>
  628. <style scoped>
  629. .dataset-search-vue {
  630. z-index: 9999;
  631. position: absolute;
  632. right: 31%;
  633. height: 30px;
  634. top: 60px;
  635. }
  636. .refer-dataset-card {
  637. cursor: pointer;
  638. box-shadow: 0px 4px 4px 0px rgba(232, 232, 232, 0.6);
  639. border: 1px solid rgba(232, 232, 232, 1);
  640. }
  641. .refer-dataset-card .refer-dataset-card-content {
  642. font-size: 16px;
  643. color: #0366d6;
  644. font-family: SourceHanSansSC-medium;
  645. height: 34px;
  646. font-weight: bold;
  647. display: flex;
  648. align-items: center;
  649. justify-content: space-between;
  650. }
  651. .refer-dataset-card-title {
  652. display: flex;
  653. align-items: center;
  654. max-width: 80%;
  655. width: 100%;
  656. }
  657. .dataset-card-flavor {
  658. display: flex;
  659. align-items: center;
  660. padding: 0.3rem 0.5rem;
  661. border: #888888;
  662. border-top-right-radius: 0 !important;
  663. border-bottom-right-radius: 0 !important;
  664. margin-right: -1px;
  665. }
  666. .card-flavor-num {
  667. padding: 0.5rem;
  668. border: #888888;
  669. border-top-left-radius: 0 !important;
  670. border-bottom-left-radius: 0 !important;
  671. cursor: default !important;
  672. }
  673. .card-flavor-desc {
  674. -webkit-box-orient: vertical;
  675. -webkit-line-clamp: 2;
  676. display: -webkit-box;
  677. overflow: hidden;
  678. color: #999999;
  679. font-size: 14px;
  680. margin-top: 10px;
  681. }
  682. .select-data-wrap {
  683. padding: 1rem 0;
  684. border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  685. }
  686. .select-data-title {
  687. flex: 1;
  688. overflow: hidden;
  689. }
  690. .select-data-title .ref-data-title {
  691. font-size: 18px;
  692. color: #454545;
  693. font-weight: 700;
  694. display: flex;
  695. align-items: baseline;
  696. max-width: 100%;
  697. }
  698. .select-data-href {
  699. text-align: right;
  700. text-overflow: ellipsis;
  701. max-width: 35%;
  702. word-break: initial;
  703. margin-left: 1rem;
  704. white-space: nowrap;
  705. }
  706. /deep/ .el-checkbox-group .el-checkbox .el-checkbox__label {
  707. display: flex;
  708. max-width: 90%;
  709. }
  710. .select-data-right {
  711. overflow: hidden;
  712. vertical-align: middle;
  713. text-overflow: ellipsis;
  714. max-width: 100%;
  715. display: inline-block;
  716. }
  717. .data-multiple-wrap {
  718. -webkit-line-clamp: 3;
  719. -webkit-box-orient: vertical;
  720. display: -webkit-box;
  721. max-width: 100%;
  722. overflow: hidden;
  723. padding-top: 1rem;
  724. color: #888888;
  725. font: 12px;
  726. line-height: 20px;
  727. margin-left: 2rem;
  728. }
  729. .disabled1 {
  730. opacity: 0.45 !important;
  731. }
  732. </style>