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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  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. >{{ item.Repo.OwnerName }}/{{ item.Repo.Alias }}</a
  285. >
  286. </div>
  287. <div class="data-multiple-wrap" :title="item.Description">
  288. {{ item.Description }}
  289. </div>
  290. </div>
  291. </el-checkbox-group>
  292. </el-row>
  293. <div
  294. class="ui container"
  295. style="margin-top: 25px; text-align: center"
  296. >
  297. <el-pagination
  298. background
  299. @current-change="currentChange"
  300. :current-page="currentPage"
  301. :page-size="5"
  302. layout="total, prev, pager, next"
  303. :total="totalNum"
  304. >
  305. </el-pagination>
  306. </div>
  307. </el-tab-pane>
  308. </el-tabs>
  309. </el-col>
  310. <el-col
  311. :span="7"
  312. style="
  313. display: flex;
  314. flex-direction: column;
  315. height: 100%;
  316. right: 0;
  317. position: absolute;
  318. padding: 0 1.5rem;
  319. "
  320. >
  321. <div
  322. style="
  323. font-size: 14px;
  324. height: 40px;
  325. text-align: left;
  326. color: #0066ff;
  327. line-height: 40px;
  328. "
  329. >
  330. {{ i18n.selected_data_file }}
  331. </div>
  332. <div
  333. style="
  334. flex: 1;
  335. margin-top: 1.5rem;
  336. margin-bottom: 1rem;
  337. overflow-y: auto;
  338. "
  339. >
  340. <el-checkbox-group v-model="checkList">
  341. <el-checkbox
  342. v-for="(item, index) in selectDatasetArray"
  343. :key="index"
  344. :label="item.ID"
  345. :title="item.Title"
  346. @change="(checked) => changeCheckSelected(checked, item)"
  347. style="display: flex; margin: 0.5rem 0"
  348. ><span class="select-data-right">{{
  349. item.Title
  350. }}</span></el-checkbox
  351. >
  352. </el-checkbox-group>
  353. </div>
  354. <div style="text-align: end">
  355. <el-button
  356. @click.native="confirmDataset"
  357. size="small"
  358. style="
  359. background: #389e0d;
  360. color: #fff;
  361. border: 1px solid #389e0d;
  362. "
  363. >{{ i18n.sure }}</el-button
  364. >
  365. </div>
  366. </el-col>
  367. </el-row>
  368. </el-dialog>
  369. </div>
  370. </template>
  371. <script>
  372. const { _AppSubUrl, _StaticUrlPrefix, csrf } = window.config;
  373. export default {
  374. components: {},
  375. data() {
  376. return {
  377. dialogWidth: "65%",
  378. dialogVisible: false,
  379. activeName: "first",
  380. repoLink: "",
  381. datasetList: [],
  382. test: false,
  383. checkList: [],
  384. publicDatasetList: [],
  385. showFlag: true,
  386. search: "",
  387. selectDatasetArray: [],
  388. paramsPublics: { page: 1, q: "" },
  389. i18n: {},
  390. totalNum: 0,
  391. currentPage: 1,
  392. loadingLinkPage: false,
  393. loadingPublicPage: false,
  394. canWrite: true,
  395. isSigned: false,
  396. maxReferenceNum: 20,
  397. isCurrentUrl: true,
  398. };
  399. },
  400. methods: {
  401. openDataset() {
  402. this.checkList = this.datasetList.map((item) => {
  403. this.selectDatasetArray.push({ ID: item.ID, Title: item.Title });
  404. return item.ID;
  405. });
  406. this.dialogVisible = true;
  407. this.getDatasetList();
  408. },
  409. refreshData() {
  410. this.checkList = [];
  411. this.selectDatasetArray = [];
  412. },
  413. gotoDataset(item) {
  414. window.open(`/${item.Repo.OwnerName}/${item.Repo.Name}/datasets`);
  415. },
  416. currentChange(page) {
  417. this.paramsPublics.page = page;
  418. this.getDatasetList();
  419. },
  420. searchName() {
  421. this.paramsPublics.q = this.search;
  422. this.paramsPublics.page = 1;
  423. this.getDatasetList();
  424. },
  425. cancelReferData(id, name, canWrite) {
  426. if (!canWrite) {
  427. return;
  428. }
  429. let url = `${this.repoLink}/datasets/reference_datasets/${id}`;
  430. this.$axios
  431. .delete(url)
  432. .then((res) => {
  433. if (res.data.Code === 0) {
  434. this.$message.success(this.i18n.cancel_link_dataset.format(name));
  435. let index = this.datasetList.findIndex((item) => {
  436. return item.ID === id;
  437. });
  438. this.datasetList.splice(index, 1);
  439. if (this.datasetList.length === 0) {
  440. this.showFlag = false;
  441. }
  442. } else {
  443. this.$message.error(res.data.Message);
  444. }
  445. })
  446. .catch((err) => {
  447. this.$message.error(this.i18n.dataset_link_failed);
  448. console.log(err);
  449. });
  450. },
  451. confirmDataset() {
  452. this.submitReferDataset();
  453. this.dialogVisible = false;
  454. },
  455. changeCheckbox(checked, item) {
  456. if (this.checkList.length > this.maxReferenceNum) {
  457. this.checkList.pop();
  458. this.$message.error(
  459. this.i18n.dataset_over_nums.format(this.maxReferenceNum)
  460. );
  461. return;
  462. }
  463. if (this.checkList.length === this.maxReferenceNum && !checked) {
  464. this.$message.error(
  465. this.i18n.dataset_over_nums.format(this.maxReferenceNum)
  466. );
  467. return;
  468. }
  469. if (checked) {
  470. this.selectDatasetArray.push({ ID: item.ID, Title: item.Title });
  471. } else {
  472. let index = this.selectDatasetArray.findIndex((element) => {
  473. return element.ID === item.ID;
  474. });
  475. this.selectDatasetArray.splice(index, 1);
  476. }
  477. },
  478. changeCheckSelected(checked, item) {
  479. let index = this.selectDatasetArray.findIndex((element) => {
  480. return element.ID === item.ID;
  481. });
  482. this.selectDatasetArray.splice(index, 1);
  483. },
  484. postStar(item, isSigned) {
  485. if (!isSigned) {
  486. return;
  487. }
  488. if (item.IsStaring) {
  489. let url = `${this.repoLink}/datasets/${item.ID}/unstar`;
  490. this.$axios.put(url).then((res) => {
  491. if (res.data.Code === 0) {
  492. this.datasetList.forEach((element, i) => {
  493. if (element.ID === item.ID) {
  494. this.datasetList[i].NumStars -= 1;
  495. this.datasetList[i].IsStaring = !this.datasetList[i].IsStaring;
  496. }
  497. });
  498. }
  499. });
  500. } else {
  501. let url = `${this.repoLink}/datasets/${item.ID}/star`;
  502. this.$axios.put(url).then((res) => {
  503. if (res.data.Code === 0) {
  504. this.datasetList.forEach((element, i) => {
  505. if (element.ID === item.ID) {
  506. this.datasetList[i].NumStars += 1;
  507. this.datasetList[i].IsStaring = !this.datasetList[i].IsStaring;
  508. }
  509. });
  510. }
  511. });
  512. }
  513. },
  514. getSelectDatasetList() {
  515. this.loadingLinkPage = true;
  516. let url = `${this.repoLink}/datasets/reference_datasets_data`;
  517. this.$axios.get(url).then((res) => {
  518. this.loadingLinkPage = false;
  519. if (!res.data) {
  520. this.showFlag = false;
  521. this.datasetList = [];
  522. return;
  523. } else {
  524. this.datasetList = res.data;
  525. this.datasetList.length
  526. ? (this.showFlag = true)
  527. : (this.showFlag = false);
  528. }
  529. });
  530. },
  531. getDatasetList() {
  532. this.loadingPublicPage = true;
  533. let url = `${this.repoLink}/datasets/reference_datasets_available`;
  534. this.$axios
  535. .get(url, {
  536. params: this.paramsPublics,
  537. })
  538. .then((res) => {
  539. this.publicDatasetList = JSON.parse(res.data.data);
  540. this.totalNum = parseInt(res.data.count);
  541. this.loadingPublicPage = false;
  542. });
  543. },
  544. submitReferDataset() {
  545. if (this.checkList.length > this.maxReferenceNum) {
  546. this.$message.error(
  547. this.i18n.dataset_over_nums.format(this.maxReferenceNum)
  548. );
  549. return;
  550. }
  551. let url = `${this.repoLink}/datasets/reference_datasets`;
  552. let data = this.qs.stringify(
  553. {
  554. _csrf: csrf,
  555. dataset_id: this.checkList,
  556. },
  557. { arrayFormat: "repeat" }
  558. );
  559. this.$axios
  560. .post(url, data)
  561. .then((res) => {
  562. if (res.data.Code === 0) {
  563. this.$message.success(this.i18n.dataset_link_success);
  564. this.getSelectDatasetList();
  565. } else {
  566. this.$message.error(res.data.Message);
  567. }
  568. })
  569. .catch((err) => {
  570. this.$message.error(this.i18n.dataset_link_failed);
  571. console.log(err);
  572. });
  573. },
  574. },
  575. filters: {
  576. transformTimestamp(timestamp) {
  577. const date = new Date(parseInt(timestamp) * 1000);
  578. const Y = date.getFullYear() + "-";
  579. const M =
  580. (date.getMonth() + 1 < 10
  581. ? "0" + (date.getMonth() + 1)
  582. : date.getMonth() + 1) + "-";
  583. const D =
  584. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  585. const dateString = Y + M + D;
  586. return dateString;
  587. },
  588. },
  589. watch: {
  590. search(val) {
  591. if (!val) {
  592. this.searchName();
  593. }
  594. },
  595. showFlag(val) {
  596. if (!val || this.isCurrentUrl) {
  597. document
  598. .getElementById("header-dataset")
  599. .setAttribute("href", this.repoLink + "/datasets");
  600. } else {
  601. document
  602. .getElementById("header-dataset")
  603. .setAttribute("href", this.repoLink + "/datasets/reference_datasets");
  604. }
  605. },
  606. },
  607. mounted() {
  608. this.getSelectDatasetList();
  609. },
  610. created() {
  611. this.repoLink = $(".reference-dataset").data("repolink") || "";
  612. this.canWrite = $(".reference-dataset").data("canwrite");
  613. this.isSigned = $(".reference-dataset").data("is-sign");
  614. this.maxReferenceNum = $(".reference-dataset").data("max-reference-num");
  615. this.isCurrentUrl = $(".reference-dataset").data("address");
  616. if (document.documentElement.attributes["lang"].nodeValue == "en-US") {
  617. this.i18n = this.$locale.US;
  618. } else {
  619. this.i18n = this.$locale.CN;
  620. }
  621. },
  622. beforeDestroy() {},
  623. };
  624. </script>
  625. <style scoped>
  626. .dataset-search-vue {
  627. z-index: 9999;
  628. position: absolute;
  629. right: 31%;
  630. height: 30px;
  631. top: 60px;
  632. }
  633. .refer-dataset-card {
  634. cursor: pointer;
  635. box-shadow: 0px 4px 4px 0px rgba(232, 232, 232, 0.6);
  636. border: 1px solid rgba(232, 232, 232, 1);
  637. }
  638. .refer-dataset-card .refer-dataset-card-content {
  639. font-size: 16px;
  640. color: #0366d6;
  641. font-family: SourceHanSansSC-medium;
  642. height: 34px;
  643. font-weight: bold;
  644. display: flex;
  645. align-items: center;
  646. justify-content: space-between;
  647. }
  648. .refer-dataset-card-title {
  649. display: flex;
  650. align-items: center;
  651. max-width: 80%;
  652. width: 100%;
  653. }
  654. .dataset-card-flavor {
  655. display: flex;
  656. align-items: center;
  657. padding: 0.3rem 0.5rem;
  658. border: #888888;
  659. border-top-right-radius: 0 !important;
  660. border-bottom-right-radius: 0 !important;
  661. margin-right: -1px;
  662. }
  663. .card-flavor-num {
  664. padding: 0.5rem;
  665. border: #888888;
  666. border-top-left-radius: 0 !important;
  667. border-bottom-left-radius: 0 !important;
  668. cursor: default !important;
  669. }
  670. .card-flavor-desc {
  671. -webkit-box-orient: vertical;
  672. -webkit-line-clamp: 2;
  673. display: -webkit-box;
  674. overflow: hidden;
  675. color: #999999;
  676. font-size: 14px;
  677. margin-top: 10px;
  678. }
  679. .select-data-wrap {
  680. padding: 1rem 0;
  681. border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  682. }
  683. .select-data-title {
  684. flex: 1;
  685. overflow: hidden;
  686. }
  687. .select-data-title .ref-data-title {
  688. font-size: 18px;
  689. color: #454545;
  690. font-weight: 700;
  691. display: flex;
  692. align-items: baseline;
  693. max-width: 100%;
  694. }
  695. .select-data-href {
  696. text-align: right;
  697. text-overflow: ellipsis;
  698. max-width: 35%;
  699. word-break: initial;
  700. margin-left: 1rem;
  701. white-space: nowrap;
  702. }
  703. /deep/ .el-checkbox-group .el-checkbox .el-checkbox__label {
  704. display: flex;
  705. max-width: 90%;
  706. }
  707. .select-data-right {
  708. overflow: hidden;
  709. vertical-align: middle;
  710. text-overflow: ellipsis;
  711. max-width: 100%;
  712. display: inline-block;
  713. }
  714. .data-multiple-wrap {
  715. -webkit-line-clamp: 3;
  716. -webkit-box-orient: vertical;
  717. display: -webkit-box;
  718. max-width: 100%;
  719. overflow: hidden;
  720. padding-top: 1rem;
  721. color: #888888;
  722. font: 12px;
  723. line-height: 20px;
  724. margin-left: 2rem;
  725. }
  726. .disabled1 {
  727. opacity: 0.45 !important;
  728. }
  729. </style>