TableComponent.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. <template>
  2. <div class="mymediaLibrary">
  3. <!-- 表头搜索 -->
  4. <el-form :inline="true" :model="searchForm">
  5. <el-form-item class="formitem">
  6. <el-input
  7. v-model="searchForm.name"
  8. @change="submitClick"
  9. @keydown.enter="submitClick"
  10. :placeholder="$t('mediaLibrary.addFilePlace')"
  11. size="default"
  12. :prefix-icon="Search"
  13. ></el-input>
  14. </el-form-item>
  15. <el-form-item>
  16. <el-select
  17. style="width: 120px"
  18. v-model="searchForm.fileType"
  19. @change="submitClick"
  20. :placeholder="$t('mediaLibrary.fileType.0')"
  21. >
  22. <el-option
  23. v-for="(item, index) in [
  24. $t('mediaLibrary.fileType.0'),
  25. $t('mediaLibrary.fileType.1'),
  26. $t('mediaLibrary.fileType.2'),
  27. $t('mediaLibrary.fileType.3'),
  28. $t('mediaLibrary.fileType.4'),
  29. $t('mediaLibrary.fileType.5'),
  30. ]"
  31. :key="index"
  32. :label="item"
  33. :value="index"
  34. />
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item style="margin-right: 0px">
  38. <el-select class="groupingSelcet"
  39. v-model="searchForm.dictId"
  40. style="width: 120px"
  41. @change="submitClick"
  42. :placeholder="$t('mediaLibrary.fileType.0')"
  43. >
  44. <el-option
  45. v-for="(item, index) in [...allList,...dictIdList]"
  46. :key="index"
  47. :label="item.dictName"
  48. :value="item.id"
  49. />
  50. </el-select>
  51. <div class="grouping" @click="handleAddfz">
  52. <img :src="groupingSvg" alt="">
  53. </div>
  54. </el-form-item>
  55. <el-form-item style="float: right; margin-right: 0">
  56. <el-button @click="windowOpen({type: 'photography', library: true})">{{$t('mediaLibrary.photography')}}</el-button>
  57. <el-button @click="windowOpen({type: 'modeling', library: true})">{{$t('mediaLibrary.Modeling')}}</el-button>
  58. <!-- <el-button type="primary" @click="handleAddfz">{{$t('mediaLibrary.grouping')}}</el-button> -->
  59. <el-button type="primary" @click="handleAdd">{{$t('mediaLibrary.upload')}}</el-button>
  60. </el-form-item>
  61. </el-form>
  62. <!-- 表格 -->
  63. <el-table
  64. tooltip-effect="dark"
  65. ref="tableRef"
  66. size="large"
  67. :data="tableData"
  68. style="width: 100%"
  69. :row-class-name="tableRowClassName"
  70. >
  71. <el-table-column prop="name" :label="$t('program.case.title')" min-width="300px">
  72. <template #default="scope">
  73. <a
  74. style="color: var(--primaryColor);cursor: pointer;"
  75. v-if="scope.row.fileUrl"
  76. target="_blank"
  77. :title="scope.row.name"
  78. @click="floadileUrl(scope.row)"
  79. >
  80. {{ scope.row.name }}</a
  81. >
  82. </template>
  83. </el-table-column>
  84. <el-table-column
  85. v-for="column in columns"
  86. :key="column.prop"
  87. :prop="column.prop"
  88. show-overflow-tooltip
  89. align="center"
  90. :min-width="column.width"
  91. :label="column.label"
  92. ></el-table-column>
  93. <el-table-column align="center" :label="$t('mediaLibrary.operate')" width="150">
  94. <template #default="{ row }">
  95. <!-- <el-button type="primary" text style="color: var(--primaryColor)" size="small" @click="handleEdit(row)">
  96. 编辑
  97. </el-button> -->
  98. <span class="oper-span" style="color: var(--primaryColor)" @click="handleEdit(row)">
  99. {{$t('sys.edit')}}
  100. </span>
  101. <span
  102. class="oper-span"
  103. @click="del(row)"
  104. style="color: var(--primaryColor)"
  105. >
  106. {{$t('sys.delete')}}
  107. </span>
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. <!-- 分页 -->
  112. <el-pagination
  113. class="mt-3"
  114. background
  115. @size-change="handleSizeChange"
  116. @current-change="handleCurrentChange"
  117. :current-page="currentPage"
  118. :page-sizes="[10, 20, 30]"
  119. :page-size="pageSize"
  120. style="justify-content: end"
  121. layout="prev, pager, next"
  122. :total="total"
  123. >
  124. </el-pagination>
  125. <!-- 弹窗 -->
  126. <el-dialog v-model="dialogData.show" :title="dialogData.title" width="400">
  127. <el-form label-position="top" :model="form" label-width="110">
  128. <el-form-item
  129. v-if="dialogData.title == $t('sys.upload')"
  130. label="文件"
  131. :label-width="formLabelWidth"
  132. >
  133. <!-- <el-input v-model="addForm.name" autocomplete="off" /> -->
  134. <el-upload
  135. class="upload-demo"
  136. style="width: 100%"
  137. :multiple="false"
  138. :limit="1"
  139. :before-upload="beforeUpload"
  140. :file-list="fileList"
  141. :http-request="() => {}"
  142. :on-preview="previewFile"
  143. :accept="accept"
  144. :before-remove="removeFile"
  145. >
  146. <el-button type="primary">
  147. {{$t('sys.upload')}}
  148. </el-button>
  149. </el-upload>
  150. </el-form-item>
  151. <el-form-item
  152. :label="dialogData.title == $t('sys.upload') ? $t('mediaLibrary.dictName') : $t('mediaLibrary.setGrouping')"
  153. :label-width="formLabelWidth"
  154. >
  155. <el-select style="width: 100%" v-model="addForm.dictId" :placeholder="$t('mediaLibrary.tips.dictId')">
  156. <el-option
  157. v-for="(item, index) in dictIdList"
  158. :key="index"
  159. :label="item.dictName"
  160. :value="item.id"
  161. />
  162. </el-select>
  163. </el-form-item>
  164. <div v-if="dialogData.title == $t('sys.upload')">
  165. <div style="margin-bottom: 10px">
  166. {{$t('mediaLibrary.tips.uplooadfiletype')}}{{$t('mediaLibrary.tips.uplooadSize')}}
  167. </div>
  168. <!-- <span>注意:模型需使用zip包上传。包含贴图、模型、mtl文件,包内不得包含文件夹。</span> -->
  169. <div style="margin-bottom: 10px">
  170. <div>
  171. {{$t('mediaLibrary.tips.objtips')}}
  172. </div>
  173. <img style="width: 150px" :src="obj" alt="" />
  174. </div>
  175. <div style="margin-bottom: 10px">
  176. <div>
  177. {{$t('mediaLibrary.tips.osgbtips')}}
  178. </div>
  179. <img style="width: 150px" :src="osgb" alt="" />
  180. </div>
  181. </div>
  182. </el-form>
  183. <template #footer>
  184. <div class="dialog-footer">
  185. <el-button @click="dialogData.show = false">{{$t('sys.cancel')}}</el-button>
  186. <el-button type="primary" @click="handleuploadAdd">
  187. {{$t('sys.enter')}}
  188. </el-button>
  189. </div>
  190. </template>
  191. </el-dialog>
  192. <!-- 修改分组 -->
  193. <el-dialog v-model="dialogData.fzshow" :title="$t('mediaLibrary.grouping')" width="400">
  194. <el-form label-position="top" :model="form" label-width="50">
  195. <el-form-item :label="$t('mediaLibrary.addgrouping')" :label-width="formLabelWidth">
  196. <el-input v-model="dialogData.fzName" maxLength="100" style="width: 278px;" />
  197. <el-button style="margin-left: 20px;width: 60px" @click="handlefzAdd">{{$t('common.add')}}</el-button>
  198. </el-form-item>
  199. <div class="itemTitle">
  200. <p>{{$t('mediaLibrary.groupingList')}}</p>
  201. <div class="itemTitleList">
  202. <div class="itemTitle-list" v-for="(item, index) in dictIdList" :key="index">
  203. <span class="name">{{ item.dictName }}</span>
  204. <span class="del" @click="hanleFzDle(item)">{{$t('sys.delete')}}</span>
  205. </div>
  206. </div>
  207. </div>
  208. </el-form>
  209. <template #footer>
  210. <div class="dialog-footer">
  211. <el-button @click="dialogData.fzshow = false">{{$t('sys.cancel')}}</el-button>
  212. <el-button type="primary" @click="dialogData.fzshow = false">
  213. {{$t('sys.enter')}}
  214. </el-button>
  215. </div>
  216. </template>
  217. </el-dialog>
  218. <!-- //查看资源下载 -->
  219. <el-dialog v-model="dialogDowm.show" title="资源查看" :width="dialogDowm.type == 4?800:600">
  220. <div class="showContent">
  221. <img style="width: 100%;object-fit: cover;" :src="dialogDowm.url" alt="" v-if="dialogDowm.type == 0"/>
  222. <video controls style="width: 100%;object-fit: cover;" :style="{height:dialogDowm.type == 2?'50px':'auto'}":src="dialogDowm.url" alt="" v-else-if="dialogDowm.type == 1 || dialogDowm.type == 2"/>
  223. <iframe style="width: 100%; height: 400px" v-else :src="dialogDowm.url" frameborder="0"></iframe>
  224. </div>
  225. <template #footer>
  226. <div class="dialog-footer">
  227. <el-button @click="dialogDowm.show = false">{{$t('sys.cancel')}}</el-button>
  228. <el-button v-if="dialogDowm.type == 0" type="primary" @click="hanleDown">
  229. 下载
  230. </el-button>
  231. </div>
  232. </template>
  233. </el-dialog>
  234. </div>
  235. </template>
  236. <script setup>
  237. import { Search } from "@element-plus/icons-vue";
  238. import { ref, watch, onMounted } from "vue";
  239. import { getByKeyList, getfzdel, getdictFiledel, getaddOrUpdate, setFileaddOrUpdate, uploadFile, getUrlSrc } from "@/store/case";
  240. import dayjs from "dayjs";
  241. import obj from "@/assets/images/obj.jpg";
  242. import osgb from "@/assets/images/osgb.jpg";
  243. import { ElMessage, ElMessageBox } from "element-plus";
  244. import { ui18n } from '@/i18n'
  245. import { windowOpen } from "@/util";
  246. import { getUrlData } from "@/store/user";
  247. import groupingSvg from "@/assets/images/grouping.svg";
  248. // 定义 props
  249. const props = defineProps({
  250. columns: {
  251. type: Array,
  252. default: () => [],
  253. },
  254. searchColumns: {
  255. type: Array,
  256. default: () => [],
  257. },
  258. getData: {
  259. type: Function,
  260. required: true,
  261. },
  262. });
  263. // 定义响应式数据
  264. const searchForm = ref({
  265. name: "",
  266. fileType: 0,
  267. dictId: "0",
  268. });
  269. const addForm = ref({
  270. fileType: "",
  271. dictId: "",
  272. name: "",
  273. });
  274. const dialogDowm = ref({
  275. show: false,
  276. url: '',
  277. type: '',
  278. data: {},
  279. });
  280. const dialogData = ref({
  281. show: false,
  282. title: ui18n.t('sys.upload'),
  283. data: {},
  284. fzshow: false,
  285. fzName: '',
  286. fzList: [],
  287. });
  288. const file = ref(null);
  289. const accept = ".jpg,.png,.jpeg,.mp4,.wav,.mp3,.shp";
  290. const hanleFzDle = (item) => {
  291. ElMessageBox.confirm(ui18n.t('mediaLibrary.tips.deltext'), ui18n.t('sys.dialogTitle'), {
  292. confirmButtonText: ui18n.t('sys.enter'),
  293. cancelButtonText: ui18n.t('sys.cancel'),
  294. }).then(async () => {
  295. await getfzdel(item);
  296. dictIdList.value = dictIdList.value.filter(item1 => item1.id !== item.id)
  297. ElMessage({
  298. type: "success",
  299. message: ui18n.t('mediaLibrary.tips.del'),
  300. });
  301. });
  302. console.log("upload", file);
  303. };
  304. const { photography, modeling } = getUrlData()
  305. const previewFile = (file) => {
  306. console.log("previewFile", file);
  307. };
  308. const handleEdit = (data) => {
  309. addForm.value.dictId = data.dictId;
  310. console.log("data", data, addForm.value);
  311. dialogData.value = {
  312. show: true,
  313. title: ui18n.t('mediaLibrary.setGrouping'),
  314. data,
  315. };
  316. };
  317. const removeFile = () => {
  318. return true;
  319. };
  320. const handleAdd = () => {
  321. addForm.value.dictId = '';
  322. addForm.value.dictId = '';
  323. fileList.value = [];
  324. dialogData.value = {
  325. show: true,
  326. title: ui18n.t('sys.upload')
  327. };
  328. };
  329. const handlefzAdd = async () => {
  330. let params = {
  331. dictName: dialogData.value.fzName,
  332. };
  333. if (!params.dictName) {
  334. return ElMessage.error(ui18n.t('mediaLibrary.tips.placeholderName'));
  335. }
  336. await getaddOrUpdate(params);
  337. ElMessage({
  338. type: "success",
  339. message: ui18n.t('mediaLibrary.tips.placeholderName'),
  340. });
  341. getFzlist();
  342. dialogData.value.fzName = '';
  343. };
  344. const handleAddfz = () => {
  345. dialogData.value.fzshow = true;
  346. };
  347. const handleuploadAdd = async () => {
  348. console.log('formData', dialogData.value.title);
  349. if (dialogData.value.title != ui18n.t('sys.upload')){
  350. await setFileaddOrUpdate({
  351. id: dialogData.value.data?.id,
  352. dictId: addForm.value.dictId,
  353. })
  354. initData();
  355. dialogData.value.show = false
  356. dialogData.value.title = ''
  357. ElMessage({
  358. type: "success",
  359. message: ui18n.t('mediaLibrary.tips.operate'),
  360. });
  361. } else {
  362. const formData = new FormData();
  363. formData.append("file", fileList.value && fileList.value[0]);
  364. formData.append("dictId", addForm.value.dictId);
  365. uploadFile(formData).then((res) => {
  366. console.log(res);
  367. if (res) {
  368. initData();
  369. dialogData.value.show = false;
  370. ElMessage({
  371. type: "success",
  372. message: ui18n.t('mediaLibrary.tips.uplooadSuccess'),
  373. });
  374. }
  375. });
  376. console.log(formData);
  377. }
  378. };
  379. // 定义方法
  380. const del = (row) => {
  381. console.log(file, "file");
  382. ElMessageBox.confirm(ui18n.t('mediaLibrary.tips.deltext'), ui18n.t('sys.dialogTitle'), {
  383. confirmButtonText: ui18n.t('sys.enter'),
  384. cancelButtonText: ui18n.t('sys.cancel'),
  385. }).then(async () => {
  386. await getdictFiledel({id: row.id});
  387. initData();
  388. ElMessage({
  389. type: "success",
  390. message: ui18n.t('mediaLibrary.tips.del'),
  391. });
  392. });
  393. };
  394. const allList = ref([{ dictName: ui18n.t('mediaLibrary.fileType.0'), id: "0" }])
  395. const dictIdList = ref([]);
  396. const tableData = ref([]);
  397. const fileList = ref([]);
  398. const currentPage = ref(1);
  399. const pageSize = ref(10);
  400. const total = ref(0);
  401. onMounted(() => {
  402. // document.body.classList.toggle("dark-mode");
  403. });
  404. const getFzlist = () => {
  405. getByKeyList({}).then((res) => {
  406. console.log("getByKeyList", res);
  407. dictIdList.value = res;
  408. });
  409. };
  410. getFzlist();
  411. const submitClick = () => {
  412. console.log("submitClick", searchForm.value);
  413. currentPage.value = 1;
  414. initData();
  415. };
  416. const tableRowClassName = ({ row, rowIndex }) => {
  417. if (rowIndex === 1) {
  418. return "warning-row";
  419. } else if (rowIndex === 3) {
  420. return "success-row";
  421. }
  422. return "";
  423. };
  424. // 初始化数据
  425. const initData = async () => {
  426. const { list, totalCount } = await props.getData({
  427. ...searchForm.value,
  428. fileType:
  429. searchForm.value.fileType == 0 ? "" : searchForm.value.fileType - 1,
  430. dictId: searchForm.value.dictId == 0 ? "" : searchForm.value.dictId,
  431. pageNum: currentPage.value,
  432. pageSize: pageSize.value,
  433. });
  434. tableData.value = list.map((res) => {
  435. return {
  436. ...res,
  437. statusStr:
  438. res.status == -1 ? ui18n.t('mediaLibrary.tips.uplooadErr') : res.status == 0 ? ui18n.t('mediaLibrary.tips.uplooad') : ui18n.t('mediaLibrary.tips.uplooadSuccess'),
  439. createTime: dayjs(res.createTime).format("YYYY-MM-DD HH:mm:ss"),
  440. };
  441. });
  442. total.value = totalCount;
  443. };
  444. const floadileUrl = (record) => {
  445. dialogDowm.value.show = true;
  446. dialogDowm.value.type = record.fileType;
  447. dialogDowm.value.data = record;
  448. if (record.fileType == 3) {
  449. // let url = `/code/index.html?title=${record.fileName}&type=${record.fileFormat}&fileUrl=${record.fileUrl}#/sign-model`;
  450. dialogDowm.value.url = getUrlSrc({...record, type: 101});
  451. return windowOpen({url, library: true});
  452. } else {
  453. dialogDowm.value.url = getUrlSrc({type: 102}) +'/'+ record.fileUrl;
  454. // return windowOpen({url: record.fileUrl, library: true});
  455. }
  456. };
  457. const beforeUpload = (file) => {
  458. console.log('beforeUpload', file);
  459. const filetype = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
  460. const isExcel = ['jpg', 'jpg', 'png', 'jpeg', 'mp4', 'wav', 'mp3', 'shp', 'zip'].includes(
  461. filetype,
  462. ); // 调用上面代码
  463. if (!isExcel) {
  464. createMessage.error(ui18n.t('mediaLibrary.tips.uplooadfiletype'));
  465. fileList.value = [];
  466. return false;
  467. }
  468. const isLt10M = file.size / 1024 / 1024 < 2000;
  469. if (!isLt10M) {
  470. fileList.value = [];
  471. createMessage.error(ui18n.t('mediaLibrary.tips.uplooadSize'));
  472. return false;
  473. }
  474. fileList.value = [file];
  475. return true;
  476. };
  477. // 监听搜索表单变化
  478. watch(searchForm, () => {
  479. currentPage.value = 1;
  480. initData();
  481. });
  482. // 处理分页大小变化
  483. const handleSizeChange = (newSize) => {
  484. pageSize.value = newSize;
  485. initData();
  486. };
  487. // 处理当前页码变化
  488. const handleCurrentChange = (newPage) => {
  489. currentPage.value = newPage;
  490. initData();
  491. };
  492. // 下载资源
  493. const hanleDown = () => {
  494. const item = dialogDowm.value.data;
  495. const a = document.createElement('a');
  496. a.href = dialogDowm.value.url;
  497. a.download = `${item.name}.${item.fileFormat}`; // 下载后的文件名
  498. a.click();
  499. a.remove();
  500. }
  501. // 处理搜索按钮点击
  502. const handleSearch = () => {
  503. currentPage.value = 1;
  504. initData();
  505. };
  506. // 重置搜索表单
  507. const resetSearch = () => {
  508. Object.keys(searchForm.value).forEach((key) => {
  509. searchForm.value[key] = "";
  510. });
  511. currentPage.value = 1;
  512. initData();
  513. };
  514. // 初始化数据
  515. initData();
  516. </script>
  517. <style lang="scss">
  518. :root {
  519. // --el-bg-color: #151515;
  520. // --colorColor: #fff;
  521. }
  522. // /* 覆盖 Element Plus 的 CSS 变量 */
  523. // --el-color-primary: #1890ff;
  524. // --el-bg-color: #141414;
  525. // --el-text-color-primary: #ffffff;
  526. // /* 可以根据需要覆盖更多变量 */
  527. .mb-3 {
  528. margin-bottom: 1rem;
  529. }
  530. .mt-3 {
  531. margin-top: 1rem;
  532. }
  533. .mymediaLibrary {
  534. background-color: #292929;
  535. text-align: left;
  536. // .el-form-item{
  537. // margin-bottom: 30px;
  538. // }
  539. // .el-table th.el-table__cell{
  540. // background-color: #1d1d1d;
  541. // color: #fff;
  542. // }
  543. // width: 100%;
  544. // --el-input-bg-color: #535353;
  545. // .el-table{
  546. // background-color: #535353;
  547. // }
  548. .grouping{
  549. padding: 7px 10px;
  550. background-color: var(--el-fill-color-blank);
  551. box-shadow: 0 0 0 1px var(--el-border-color);
  552. border-radius: 0 4px 4px 0 ;
  553. opacity: 0.7;
  554. cursor: pointer;
  555. &:hover{
  556. box-shadow: 0 0 0 1px #6C6E72;
  557. opacity: 1;
  558. }
  559. }
  560. .groupingSelcet{
  561. .el-select__wrapper{
  562. border-radius:4px 0 0 4px;
  563. }
  564. }
  565. .el-form--inline .el-form-item{
  566. margin-right: 20px;
  567. }
  568. // .el-form-item, .el-select__wrapper{
  569. // background-color: #535353;
  570. // }
  571. // .el-input__wrapper, .el-select__wrapper{
  572. // background-color: #535353;
  573. // box-shadow: none;
  574. // }
  575. // .el-input__inner, .el-select__selected-item{
  576. // color: #fff;
  577. // }
  578. // /* 局部修改具有 custom-table 类名的 el-table 的背景颜色 */
  579. // .custom-table.el-table {
  580. // background-color: #535353;
  581. // }
  582. // /* 修改表头背景颜色 */
  583. // .custom-table.el-table__header-wrapper th {
  584. // background-color: #535353;
  585. // }
  586. // /* 修改表格行的背景颜色 */
  587. // .el-table tr {
  588. // background-color: #535353;
  589. // }
  590. // /* 修改表格行悬停时的背景颜色 */
  591. // .custom-table.el-table__body tr:hover>td {
  592. // background-color: #535353;
  593. // }
  594. // .el-table th.el-table__cell{
  595. // background-color: #1d1d1d
  596. // }
  597. // .el-table .el-table__cell{
  598. // border-color: #303030 !important;
  599. // }
  600. // .el-table--fit .el-table__inner-wrapper:before{
  601. // background-color: none;
  602. // }
  603. // .el-table .warning-row {
  604. // --el-table-tr-bg-color: var(--el-color-warning-light-9);
  605. // }
  606. // .el-table .success-row {
  607. // --el-table-tr-bg-color: var(--el-color-success-light-9);
  608. // }
  609. .itemTitle{
  610. width: 100%;
  611. margin: 0 0 10px 0;
  612. .itemTitleList{
  613. margin-top: 10px;
  614. background: rgba(255,255,255,0.1);
  615. border-radius: 4px 4px 4px 4px;
  616. border: 1px solid rgba(255,255,255,0.2);
  617. max-height: 240px;
  618. overflow-y: scroll;
  619. ::-webkit-scrollbar {
  620. display: none; /* Chrome Safari */
  621. }
  622. }
  623. .itemTitle-list{
  624. padding-left: 10px;
  625. line-height: 34px;
  626. display: flex;
  627. justify-content: space-between;
  628. position: relative;
  629. cursor: pointer;
  630. .name{
  631. width: 350px;
  632. overflow: hidden; //超出的文本隐藏
  633. text-overflow: ellipsis; //溢出用省略号显示
  634. white-space: nowrap; //溢出不换行
  635. }
  636. .del{
  637. color: red;
  638. width: 40px;
  639. cursor: pointer;
  640. }
  641. }
  642. }
  643. }
  644. .showContent{
  645. iframe{
  646. body:-webkit-full-page-media {
  647. background-color: none;
  648. }
  649. }
  650. }
  651. .el-pager li.is-active{
  652. border: 1px solid var(--el-color-primary);
  653. background-color: none;
  654. }
  655. </style>