VideoPage.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. <template>
  2. <el-row v-if="!permissionDenied" class="movie-list">
  3. <el-row v-if="video !== null">
  4. <el-col :md="15">
  5. <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
  6. <el-card class="box-card">
  7. <div slot="header" class="clearfix">
  8. <el-row>
  9. <h3 v-html="video.title" />
  10. </el-row>
  11. <el-row style="color: #999;font-size: 16px;padding-top: 0px;">
  12. <span><i class="el-icon-video-play">{{ video.view }}</i></span>
  13. <span v-html="'&nbsp;&nbsp;&nbsp;&nbsp;'" />
  14. <span><i class="el-icon-s-comment">{{ video.comment }}</i></span>
  15. <span v-html="'&nbsp;&nbsp;&nbsp;&nbsp;'" />
  16. <span><i class="el-icon-watch">{{ video.pubDate }}</i></span>
  17. <span v-html="'&nbsp;&nbsp;&nbsp;&nbsp;'" />
  18. <span v-if="videoId !== null && videoId.includes('BV')"><i class="el-icon-apple">
  19. <a target="_blank" :href="`https://bilibili.com/` + videoId">bili</a>
  20. </i></span>
  21. </el-row>
  22. </div>
  23. <div class="text item">
  24. <video-player :video-prop="video" />
  25. </div>
  26. </el-card>
  27. </el-row>
  28. <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
  29. <el-card class="box-card">
  30. <div slot="header" class="clearfix">
  31. <div class="tag">
  32. <el-button
  33. type="success"
  34. size="mini"
  35. icon="el-icon-plus"
  36. :disabled="isCollected"
  37. class="tag"
  38. @click="collection(video.videoId)"
  39. >
  40. <span>收藏 {{ video.favorite }}</span>
  41. </el-button>
  42. <el-button
  43. type="success"
  44. size="mini"
  45. icon="el-icon-thumb"
  46. :disabled="isCollected"
  47. class="tag"
  48. @click="likeVideo(video)"
  49. >
  50. <span>喜欢 {{ video.thumbUp }}</span>
  51. </el-button>
  52. <el-button
  53. type="success"
  54. size="mini"
  55. icon="el-icon-thumb"
  56. class="tag"
  57. @click="dislikeVideoWrapper(video)"
  58. >
  59. <span>不喜欢 {{ video.thumbUp }}</span>
  60. </el-button>
  61. <el-button
  62. type="success"
  63. size="mini"
  64. icon="el-icon-share"
  65. :disabled="isCollected"
  66. class="tag"
  67. @click="getShareUrl(video.videoId)"
  68. >
  69. <span>分享 {{ video.share }}</span>
  70. </el-button>
  71. <el-button
  72. type="success"
  73. size="mini"
  74. icon="el-icon-download"
  75. class="tag"
  76. @click="getDownloadUrl(video.videoId)"
  77. >
  78. <span>下载</span>
  79. </el-button>
  80. <el-button
  81. type="danger"
  82. size="mini"
  83. icon="el-icon-delete"
  84. class="tag"
  85. @click="deleteVideo(video)"
  86. >
  87. <span>删除</span>
  88. </el-button>
  89. <el-button
  90. type="warning"
  91. size="mini"
  92. icon="el-icon-help"
  93. class="tag"
  94. @click="displayErrorReportDialog"
  95. >
  96. <span>报错</span>
  97. </el-button>
  98. </div>
  99. </div>
  100. <div class="text item">
  101. <!--视频描述行-->
  102. <span>
  103. <p v-html="video.description" style="white-space:pre-wrap" />
  104. </span>
  105. <el-divider />
  106. <!--视频标签行-->
  107. <div>
  108. <el-tag
  109. v-for="(tag,index) in video.tags"
  110. :key="index"
  111. class="tag"
  112. size="medium"
  113. effect="plain"
  114. >
  115. <router-link style="text-decoration-line: none" target="_blank" :to="`/video/tag/` + tag">
  116. {{ tag }}
  117. </router-link>
  118. </el-tag>
  119. </div>
  120. </div>
  121. </el-card>
  122. </el-row>
  123. <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
  124. <el-card class="box-card">
  125. <div slot="header" class="clearfix">
  126. <el-row>
  127. <h3>视频评论</h3>
  128. </el-row>
  129. </div>
  130. <div class="text item">
  131. <div ref="comment" :style="wrapStyle" class="comment-wrap">
  132. <comment
  133. v-model="dataList"
  134. :user="currentUser"
  135. :props="props"
  136. :before-submit="submit"
  137. :before-like="like"
  138. :before-delete="deleteComment"
  139. :upload-img="uploadImg"
  140. />
  141. <el-pagination
  142. :small="screenWidth <= 768"
  143. hide-on-single-page
  144. layout="prev, pager, next"
  145. :page-size="pageSize"
  146. :current-page="currentPage"
  147. :total="totalSize"
  148. @current-change="handleCurrentChange"
  149. />
  150. </div>
  151. </div>
  152. </el-card>
  153. </el-row>
  154. </el-col>
  155. <el-col :md="9">
  156. <el-row>
  157. <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
  158. <user-avatar-card v-if="user !== null" :user-avatar="user" />
  159. </el-row>
  160. </el-row>
  161. <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
  162. <el-card class="box-card">
  163. <div slot="header" class="clearfix">
  164. <el-row>
  165. <h3>接下来播放</h3>
  166. </el-row>
  167. <el-row>
  168. <span>自动播放 <el-switch v-model="autoPlay" /></span>
  169. </el-row>
  170. </div>
  171. </el-card>
  172. </el-row>
  173. <el-row v-for="(item,index) in similarVideos" :key="index" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
  174. <side-video-card :video="item" />
  175. </el-row>
  176. </el-col>
  177. <!-- 添加到播放列表对话框 -->
  178. <el-dialog
  179. append-to-body
  180. :visible.sync="showPlaylistDialog"
  181. center
  182. >
  183. <el-card class="box-card">
  184. <div slot="header" class="clearfix">
  185. <span>添加到收藏夹</span>
  186. <el-button style="float: right; padding: 3px 0" type="text" @click="addToPlaylist">确定</el-button>
  187. </div>
  188. <div class="text item">
  189. <el-table
  190. ref="multipleTable"
  191. :show-header="false"
  192. :data="playlist"
  193. border
  194. style="width: 100%"
  195. @selection-change="handleSelectionChange"
  196. >
  197. <el-table-column type="selection" />
  198. <el-table-column
  199. prop="albumName"
  200. />
  201. <el-table-column
  202. prop="total"
  203. />
  204. <el-table-column
  205. prop="total"
  206. />
  207. </el-table>
  208. <br>
  209. <div style="margin-top: 15px;">
  210. <el-input
  211. v-model="albumForm.albumName"
  212. placeholder="请输入标题(最多可输入20个字)"
  213. maxlength="20"
  214. clearable
  215. >
  216. <el-button slot="append" icon="el-icon-plus" @click="onCreateAlbum">新建收藏夹</el-button>
  217. </el-input>
  218. </div>
  219. </div>
  220. </el-card>
  221. </el-dialog>
  222. <!-- 视频报错对话框 -->
  223. <el-dialog
  224. append-to-body
  225. :visible.sync="showErrorReportDialog"
  226. center
  227. >
  228. <el-card class="box-card">
  229. <div slot="header" class="clearfix">
  230. <span>视频报错</span>
  231. <el-button style="float: right; padding: 3px 0" type="text" @click="submitErrorReport">提交错误</el-button>
  232. </div>
  233. <div class="text item">
  234. <el-form ref="form" :model="errorReportForm" label-width="80px">
  235. <el-form-item label="错误类型">
  236. <el-select v-model="errorReportForm.errorCode" placeholder="选择视频错误类型">
  237. <el-option label="视频无封面" value="1" />
  238. <el-option label="视频无声音" value="2" />
  239. <el-option label="视频无画面" value="3" />
  240. <el-option label="视频无资源" value="4" />
  241. <el-option label="视频有广告" value="5" />
  242. </el-select>
  243. </el-form-item>
  244. </el-form>
  245. </div>
  246. </el-card>
  247. </el-dialog>
  248. </el-row>
  249. </el-row>
  250. <el-row v-else>
  251. <permission-denied-card :text-object="textObject" />
  252. </el-row>
  253. </template>
  254. <script>
  255. import PermissionDeniedCard from '@/components/card/PermissionDeniedCard'
  256. import VideoPlayer from 'components/VideoPlayer'
  257. import SideVideoCard from 'components/card/SideVideoCard'
  258. import UserAvatarCard from '@/components/card/UserAvatarCard'
  259. import comment from '@/components/comment'
  260. import { similarVideo, videoInfo, videoErrorReport, downloadVideo, getShortUrl, videoErrorDelete } from '@/api/video'
  261. import { collectItem, createAlbum, getUserPlaylist } from '@/api/collect'
  262. import { getUserInfo } from '@/api/user'
  263. import { publishComment, getComment } from '@/api/comment'
  264. import { getAuthedUser } from '@/utils/auth'
  265. import { dislikeVideo } from '@/api/content'
  266. export default {
  267. name: 'VideoPage',
  268. components: { SideVideoCard, VideoPlayer, UserAvatarCard, PermissionDeniedCard, comment },
  269. data() {
  270. return {
  271. // 屏幕宽度, 为了控制分页条的大小
  272. screenWidth: document.body.clientWidth,
  273. currentPage: 1,
  274. pageSize: 20,
  275. totalSize: 0,
  276. dataList: [],
  277. // ********************************************************************/
  278. wrapStyle: '',
  279. videoComments: [
  280. {
  281. commentId: 114511,
  282. content: 'this is comment content',
  283. imageUrl: '',
  284. children: [],
  285. likes: 0,
  286. liked: false,
  287. reply: null,
  288. createAt: 1700271326393,
  289. user: {
  290. userId: 1,
  291. name: '西瓜',
  292. avatar: ''
  293. }
  294. }
  295. ],
  296. currentUser: {
  297. userId: 9999,
  298. name: '芒果',
  299. avatar: '//picx.zhimg.com/v2-a2c89378a6332cbfed3e28b5ab84feb7.jpg',
  300. author: true
  301. },
  302. // 自定义组件中 comment 对象的字段名
  303. props: {
  304. id: 'commentId',
  305. content: 'content',
  306. imgSrc: 'imageUrl',
  307. children: 'children',
  308. likes: 'likes',
  309. liked: 'liked',
  310. reply: 'reply',
  311. createAt: 'createAt',
  312. total: 'total',
  313. user: 'user'
  314. },
  315. // ********************************************************************/
  316. videoId: null,
  317. video: null,
  318. user: null,
  319. similarVideos: [],
  320. isCollected: false,
  321. showPlaylistDialog: false,
  322. playlist: [],
  323. showErrorReportDialog: false,
  324. errorReportForm: {
  325. videoId: null,
  326. errorCode: null
  327. },
  328. permissionDenied: false,
  329. textObject: {
  330. content: '视频',
  331. route: '/video'
  332. },
  333. autoPlay: false,
  334. albumForm: {
  335. albumName: null
  336. },
  337. multipleSelection: []
  338. }
  339. },
  340. watch: {
  341. // 地址栏 url 发生变化时重新加载本页面
  342. $route() {
  343. this.$router.go()
  344. }
  345. },
  346. created() {
  347. const loginUser = getAuthedUser()
  348. if (loginUser != null) {
  349. this.currentUser = {
  350. userId: loginUser.userId,
  351. name: loginUser.screenName,
  352. avatar: loginUser.avatarUrl,
  353. author: true
  354. }
  355. }
  356. this.videoId = this.$route.params.id
  357. this.getVideoInfo(this.videoId)
  358. this.getSimilarVideos(this.videoId)
  359. this.getCommentWrapper(this.currentPage)
  360. },
  361. mounted() {
  362. const header = this.$refs.header
  363. if (header !== undefined && header !== null) {
  364. this.wrapStyle = `height: calc(100vh - ${header.clientHeight + 20}px)`
  365. }
  366. },
  367. methods: {
  368. handleSelectionChange(val) {
  369. this.multipleSelection = val
  370. },
  371. addToPlaylist() {
  372. if (this.multipleSelection.length === 0) {
  373. this.$message.info('请选择收藏夹')
  374. return
  375. }
  376. const jsonData = {}
  377. jsonData.albumId = []
  378. for (const item of this.multipleSelection) {
  379. jsonData.albumId.push(item.albumId)
  380. }
  381. jsonData.postId = this.videoId
  382. jsonData.action = 1
  383. collectItem(jsonData).then(resp => {
  384. if (resp.code === 0) {
  385. this.$notify.success({
  386. title: '视频已收藏',
  387. type: 'success',
  388. duration: 3000
  389. })
  390. } else {
  391. this.$notify.warning({
  392. title: '视频收藏失败',
  393. type: 'warning',
  394. duration: 3000
  395. })
  396. }
  397. }).catch(error => {
  398. this.$message.error(error)
  399. }).finally(() => {
  400. this.showPlaylistDialog = false
  401. })
  402. },
  403. // ****************************************************************************************************************
  404. handleCurrentChange(currentPage) {
  405. this.currentPage = currentPage
  406. this.getCommentWrapper(currentPage)
  407. // 回到顶部
  408. scrollTo(0, 0)
  409. },
  410. getCommentWrapper(pageNumber) {
  411. getComment(this.videoId, pageNumber).then(resp => {
  412. if (resp.code === 0) {
  413. const respData = resp.data
  414. this.dataList = respData.list
  415. this.totalSize = respData.totalSize
  416. } else {
  417. this.$notify({
  418. title: '提示',
  419. message: resp.msg,
  420. type: 'error',
  421. duration: 3000
  422. })
  423. }
  424. }).catch(error => {
  425. this.$notify({
  426. title: '提示',
  427. message: error.message,
  428. type: 'warning',
  429. duration: 3000
  430. })
  431. })
  432. },
  433. // ****************************************************************************************************************
  434. // 获取视频的详细信息
  435. getVideoInfo(videoId) {
  436. videoInfo(videoId).then(resp => {
  437. if (resp.code === 0) {
  438. this.video = resp.data
  439. document.title = resp.data.title
  440. this.userId = resp.data.userId
  441. getUserInfo(this.userId).then(resp => {
  442. if (resp.code === 0) {
  443. this.user = resp.data
  444. } else {
  445. this.$notify.error({
  446. message: '用户数据获取失败',
  447. type: 'warning',
  448. duration: 3000
  449. })
  450. }
  451. })
  452. } else if (resp.code === 2) {
  453. this.$router.push('/404')
  454. } else {
  455. this.permissionDenied = true
  456. }
  457. }).catch(error => {
  458. this.$notify.error({
  459. message: error.message,
  460. type: 'warning',
  461. duration: 3000
  462. })
  463. })
  464. },
  465. // 获取和当前视频类似的其他视频
  466. getSimilarVideos(videoId) {
  467. similarVideo(videoId).then(resp => {
  468. if (resp.code === 0) {
  469. this.similarVideos = resp.data
  470. } else {
  471. this.$notify.error({
  472. message: '推荐视频数据获取失败',
  473. type: 'warning',
  474. duration: 3000
  475. })
  476. }
  477. }).catch(error => {
  478. this.$notify.error({
  479. message: error.message,
  480. type: 'warning',
  481. duration: 3000
  482. })
  483. })
  484. },
  485. // 换一换
  486. refreshSimilar() {
  487. console.log('刷新相关推荐')
  488. },
  489. // 用户点击收藏
  490. collection(video) {
  491. if (video.collected) {
  492. this.$message.info('取消收藏')
  493. return
  494. }
  495. this.showPlaylistDialog = true
  496. const queryInfo = {
  497. pn: 1,
  498. userId: this.currentUser.userId
  499. }
  500. getUserPlaylist(queryInfo).then(resp => {
  501. if (resp.code === 0) {
  502. this.playlist = resp.data.list
  503. }
  504. })
  505. },
  506. likeVideo(video) {
  507. const videoId = video.videoId
  508. this.$message.info('喜欢 ' + videoId)
  509. },
  510. dislikeVideoWrapper(video) {
  511. const payload = {
  512. videoId: video.videoId
  513. }
  514. dislikeVideo(payload).then(resp => {
  515. if (resp.code === 0) {
  516. this.$message.info('数据已提交')
  517. }
  518. })
  519. },
  520. getShareUrl(videoId) {
  521. getShortUrl(videoId).then(resp => {
  522. if (resp.code === 0) {
  523. console.log(resp.data)
  524. this.video.share += 1
  525. }
  526. })
  527. },
  528. getDownloadUrl(videoId) {
  529. // let filename
  530. downloadVideo(videoId).then(resp => {
  531. if (resp.code === 0) {
  532. const downloadUrl = resp.data.url
  533. window.open(downloadUrl, '_blank')
  534. /* fetch(downloadUrl.url, {
  535. headers: {
  536. Authorization: 'Bearer ' + downloadUrl.token
  537. },
  538. method: 'GET',
  539. credentials: 'include'
  540. }).then(resp => {
  541. /!*
  542. 遍历 formdata
  543. for (const key of resp.headers.keys()) {
  544. console.log(key + ' : ' + resp.headers.get(key))
  545. }*!/
  546. const header = resp.headers.get('Content-Disposition')
  547. const parts = header.split(';')
  548. const encodeFilename = parts[1].split('=')[1]
  549. filename = decodeURI(encodeFilename)
  550. return resp.blob()
  551. }).then(data => {
  552. const blobUrl = window.URL.createObjectURL(data)
  553. const a = document.createElement('a')
  554. a.download = filename
  555. a.href = blobUrl
  556. a.click()
  557. }).catch(e => {
  558. this.$notify({
  559. title: '提示',
  560. message: '视频下载失败',
  561. type: 'warning',
  562. duration: 3000
  563. })
  564. })*/
  565. } else {
  566. this.$notify({
  567. title: '提示',
  568. message: resp.msg,
  569. type: 'warning',
  570. duration: 3000
  571. })
  572. }
  573. }).catch(error => {
  574. this.$notify({
  575. title: '提示',
  576. message: error.message,
  577. type: 'error',
  578. duration: 3000
  579. })
  580. })
  581. },
  582. onCreateAlbum() {
  583. createAlbum(this.albumForm).then(resp => {
  584. if (resp.code === 0) {
  585. this.playlist.push(resp.data)
  586. }
  587. })
  588. this.albumForm.albumName = null
  589. },
  590. deleteVideo(video) {
  591. this.$confirm('确定要删除 ' + video.title + '?', '提示', {
  592. confirmButtonText: '确定',
  593. cancelButtonText: '取消',
  594. type: 'warning',
  595. customClass: 'msgbox'
  596. }).then(() => {
  597. const videoId = video.videoId
  598. const errorReportForm = {
  599. videoId: videoId,
  600. errorCode: 4
  601. }
  602. videoErrorDelete(errorReportForm).then(resp => {
  603. if (resp.code === 0) {
  604. this.errorReportForm.errorCode = null
  605. this.$notify({
  606. title: '提示',
  607. message: '视频错误已提交',
  608. type: 'warning',
  609. duration: 3000
  610. })
  611. } else {
  612. this.$notify({
  613. title: '提示',
  614. message: resp.msg,
  615. type: 'warning',
  616. duration: 3000
  617. })
  618. }
  619. }).catch(error => {
  620. this.$notify({
  621. title: '提示',
  622. message: error.message,
  623. type: 'warning',
  624. duration: 3000
  625. })
  626. })
  627. }).catch(() => {
  628. this.$message({
  629. type: 'info',
  630. message: '已取消'
  631. })
  632. })
  633. },
  634. displayErrorReportDialog() {
  635. this.errorReportForm.videoId = this.video.videoId
  636. this.showErrorReportDialog = true
  637. },
  638. submitErrorReport() {
  639. this.showErrorReportDialog = false
  640. videoErrorReport(this.errorReportForm).then(resp => {
  641. if (resp.code === 0) {
  642. this.errorReportForm.errorCode = null
  643. this.$notify({
  644. title: '提示',
  645. message: '视频错误已提交',
  646. type: 'warning',
  647. duration: 3000
  648. })
  649. } else {
  650. this.$notify({
  651. title: '提示',
  652. message: resp.msg,
  653. type: 'warning',
  654. duration: 3000
  655. })
  656. }
  657. }).catch(error => {
  658. this.$notify({
  659. title: '提示',
  660. message: error.message,
  661. type: 'warning',
  662. duration: 3000
  663. })
  664. })
  665. },
  666. // ****************************************************************************************************************
  667. // 评论
  668. async submit(newComment, parent, add) {
  669. const res = await new Promise((resolve) => {
  670. setTimeout(() => {
  671. resolve({ newComment, parent })
  672. }, 300)
  673. })
  674. add(Object.assign(res.newComment, { postId: this.video.videoId }))
  675. if (res.parent !== null) {
  676. // console.log('parent: ', res.parent)
  677. } else {
  678. this.totalSize += 1
  679. }
  680. // console.log('addComment: ', res)
  681. publishComment(res).then(resp => {
  682. if (resp.code === 0) {
  683. this.$notify.success({
  684. message: '评论已发布',
  685. duration: 3000
  686. })
  687. } else {
  688. this.$notify.warning({
  689. message: '评论发布失败',
  690. duration: 3000
  691. })
  692. }
  693. })
  694. },
  695. async like(comment) {
  696. const res = await new Promise((resolve) => {
  697. setTimeout(() => {
  698. resolve(comment)
  699. }, 0)
  700. })
  701. console.log('likeComment: ', res)
  702. },
  703. async uploadImg({ file, callback }) {
  704. const res = await new Promise((resolve, reject) => {
  705. const reader = new FileReader()
  706. reader.readAsDataURL(file)
  707. reader.onload = () => {
  708. resolve(reader.result)
  709. }
  710. reader.onerror = () => {
  711. reject(reader.error)
  712. }
  713. })
  714. callback(res)
  715. console.log('uploadImg: ', res)
  716. },
  717. async deleteComment(comment, parent) {
  718. const res = await new Promise((resolve) => {
  719. setTimeout(() => {
  720. resolve({ comment, parent })
  721. }, 300)
  722. })
  723. console.log('deleteComment: ', res)
  724. }
  725. // ****************************************************************************************************************
  726. }
  727. }
  728. </script>
  729. <style scoped>
  730. /*处于手机屏幕时*/
  731. @media screen and (max-width: 768px) {
  732. .movie-list {
  733. padding-top: 8px;
  734. padding-left: 0.5%;
  735. padding-right: 0.5%;
  736. }
  737. /* 或者使用这种更具体的选择器 */
  738. .el-dialog__wrapper .maintenance-dialog {
  739. width: 100% !important;
  740. margin-top: 5vh !important;
  741. }
  742. /* 表单布局优化 */
  743. .maintenance-dialog .el-form-item {
  744. margin-bottom: 15px;
  745. }
  746. .maintenance-dialog .el-form-item__label {
  747. float: none !important;
  748. display: block !important;
  749. text-align: left !important;
  750. padding: 0 0 8px !important;
  751. width: 100% !important;
  752. }
  753. .maintenance-dialog .el-form-item__content {
  754. margin-left: 0 !important;
  755. }
  756. /* 确保所有输入控件宽度100% */
  757. .maintenance-dialog .el-input,
  758. .maintenance-dialog .el-select,
  759. .maintenance-dialog .el-date-picker,
  760. .maintenance-dialog .el-input-number {
  761. width: 100% !important;
  762. }
  763. /* 调整按钮组间距 */
  764. .maintenance-dialog .dialog-footer {
  765. text-align: center;
  766. }
  767. .maintenance-dialog .dialog-footer .el-button {
  768. margin: 0 5px;
  769. }
  770. }
  771. .movie-list {
  772. padding-top: 5px;
  773. padding-bottom: 5px;
  774. padding-left: 5px;
  775. padding-right: 5px;
  776. }
  777. .clearfix:before,
  778. .clearfix:after {
  779. display: table;
  780. content: "";
  781. }
  782. .clearfix:after {
  783. clear: both;
  784. }
  785. .tag{
  786. padding-top: 1px;
  787. padding-bottom: 1px;
  788. margin-left: 3px;
  789. margin-right: 3px;
  790. }
  791. </style>