picture-store.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <template>
  2. <div class="elx-imgbox">
  3. <div class="elx-imgbox-dialog">
  4. <div
  5. class="pick-block"
  6. >
  7. <div class="elx-img-list-loading" v-if="isLoading">
  8. <div class="el-icon-loading"></div>
  9. </div>
  10. <div class="search-bar">
  11. <el-form :inline="true" :model="dataForm">
  12. <el-form-item>
  13. <el-input
  14. v-model="fileName"
  15. size="small"
  16. :placeholder="this.$i18n.t('pictureManager.picName')"
  17. @keypress.native.enter="searchImg(true)"
  18. clearable
  19. ></el-input>
  20. </el-form-item>
  21. <el-form-item>
  22. <div
  23. @click="searchImg(true)"
  24. class="primary-btn default-btn"
  25. >{{$t("pictureManager.query")}}</div>
  26. <div
  27. class="primary-btn default-btn"
  28. :disabled="disabled"
  29. @click="createGroup"
  30. >{{$t("resource.newGroup")}}</div>
  31. </el-form-item>
  32. <!-- <el-form-item>
  33. <el-button type="primary" @click="clean">清空</el-button>
  34. </el-form-item>-->
  35. </el-form>
  36. </div>
  37. <div class="operation-bar">
  38. <div
  39. class="default-btn primary-btn"
  40. @click="uploadDialog"
  41. >{{$t("pictureManager.uploadPic")}}</div>
  42. </div>
  43. <div class="box">
  44. <div class="group-box" style="overflow: auto">
  45. <div class="group">
  46. <div class="group-item active-title">
  47. <span class="group-name">{{$t("resource.groupName")}}</span>
  48. <span class="sidebar-operate">{{$t("crud.menu")}}</span>
  49. </div>
  50. <div :class="['group-item',groupId === 0 ?'active': '']" @click="clickGroup(0)">
  51. <span class="group-name">{{$t("pictureManager.allPictures")}}</span>
  52. </div>
  53. <div :class="['group-item',groupId === item.attachFileGroupId ?'active': '']" v-for="(item) in groupList" :key="item.attachFileGroupId">
  54. <el-input ref="updateGroupName" v-model="createGroupName" maxlength="6" v-if="isUploadGroup && updateGroupId === item.attachFileGroupId" size="small" style="width: 210px">
  55. <div slot="append" @click="submitGroup">
  56. <div style="width: 100%">{{$t('chat.confirm')}}</div>
  57. </div>
  58. </el-input>
  59. <span v-else class="group-name" @click="clickGroup(item.attachFileGroupId)">{{ item.name }}</span>
  60. <span class="sidebar-operate">
  61. <div class="default-btn text-btn" @click="updateGroup(item.attachFileGroupId,item.name)" >{{$t("resource.update")}}</div>
  62. <div class="default-btn text-btn" @click="deleteGroup(item.attachFileGroupId)" >{{$t("resource.Delete")}}</div>
  63. </span>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="img-list">
  68. <div class="elx-main elx-img-list">
  69. <div class="elx-head">
  70. <span class="text"><el-checkbox v-model="selectAll" :indeterminate="isIndeterminate" @change="selectAllEvent">{{$t("resource.selectAll")}}</el-checkbox></span>
  71. <span class="text" @click="delectImgs">{{$t("resource.Delete")}}</span>
  72. <span class="text" @click="batchMove">{{$t("resource.Move")}}</span>
  73. </div>
  74. <div class="img-item-con">
  75. <div class="img-item" v-for="(img, itemIndex) in imgRes.records" :key="itemIndex">
  76. <div class="thumb-wp" @click="onClickListImage(img)">
  77. <img :src="resourcesUrl + img.filePath" />
  78. </div>
  79. <input
  80. type="text"
  81. @blur="isUpdateFileName = false"
  82. v-if="isUpdateFileName && updateFileId === img.fileId"
  83. v-model="updateFileName"
  84. autofocus
  85. ref="updateName"
  86. @keyup.enter="submitImgName"
  87. style="width: 100px;outline: none;">
  88. <div class="title" v-else @click="handleFileName(img)">{{img.fileName}}</div>
  89. <!-- <div class="label" v-if="img.label">{{img.label}}</div> -->
  90. <span class="selected" v-if="img.selected" @click="onClickListImage(img)">
  91. <span class="icon el-icon-check"></span>
  92. </span>
  93. </div>
  94. </div>
  95. </div>
  96. <!-- <div class="data-tips" v-if="!imgRes.records.length">{{$t("order.noData")}}</div>-->
  97. <el-pagination
  98. layout="total, prev, pager, next, jumper"
  99. :current-page="imgRes.current"
  100. :page-size="imgRes.size"
  101. :total="imgRes.total"
  102. class="pagination"
  103. @current-change="onPageNumChange"
  104. ></el-pagination>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <!-- 批量移动分组 -->
  110. <el-dialog
  111. :title="$t('resource.mobileGroup')"
  112. :close-on-click-modal="false"
  113. :visible.sync="showBatchMove"
  114. top="200px"
  115. :append-to-body="showBatchMove"
  116. width="500px"
  117. >
  118. <el-form ref="groupForm" label-width="80px">
  119. <el-form-item :label="$t('resource.group')">
  120. <el-select size="small" v-model="selectGroup" :placeholder="$t('resource.selectGroup')">
  121. <el-option
  122. v-for="item in groupList"
  123. :key="item.attachFileGroupId"
  124. :label="item.name"
  125. :value="item.attachFileGroupId">
  126. </el-option>
  127. </el-select>
  128. </el-form-item>
  129. </el-form>
  130. <span slot="footer" class="dialog-footer">
  131. <div class="default-btn" @click="showBatchMove = false">{{$t("resource.cancel")}}</div>
  132. <div class="primary-btn default-btn" @click="submitBatchMove()">{{$t("resource.confirm")}}</div>
  133. </span>
  134. </el-dialog>
  135. <!-- /批量移动分组 -->
  136. <upload-pic ref="uploadPic" v-if="uploadDialogVisible" @getImgListData="loadListImage(1)" @handleDialogClose="handleDialogClose" @getGroupData="getGroupList" />
  137. <group-add-or-update ref="groupAddOrUpdate" v-if="groupVisible" @getGroupData="getGroupList" />
  138. </div>
  139. </template>
  140. <script type="text/babel">
  141. import uploadPic from './upload-pic.vue'
  142. import groupAddOrUpdate from '../components/group-add-or-update.vue'
  143. import { Debounce } from '@/utils/debounce'
  144. export default {
  145. name: 'ElxImgbox',
  146. components: {
  147. uploadPic,
  148. groupAddOrUpdate
  149. },
  150. data () {
  151. return {
  152. theData: null, // 保存上次点击查询的请求条件
  153. images: [], // 已选图片
  154. fileIds: [], // 已选图片的fileId
  155. dataForm: {},
  156. uploadFileNum: 0,
  157. createGroupName: '', // 新建分组名
  158. groupVisible: false,
  159. showBatchMove: false,
  160. options: {
  161. multiple: true, // 是否支持选取多个图片
  162. limit: 20, // 最多可选择图片数量
  163. maxSize: 10, // 最大尺寸(M)
  164. activeTab: 'pick',
  165. enableUpload: true, // 是否启用图片上传
  166. callback: null
  167. },
  168. groupList: [], // 分组列表
  169. selectGroup: '',
  170. errShow: false,
  171. picNum: 0,
  172. resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
  173. type: 2,
  174. fileName: '',
  175. listType: 'picture',
  176. isLoading: true,
  177. visible: false,
  178. disabled: false,
  179. notImg: false,
  180. uploadSuccessCount: 0,
  181. imgRes: {
  182. current: 1
  183. },
  184. selectAll: false,
  185. uploadFlag: 0,
  186. groupId: 0, // 点击分组
  187. updateGroupId: 0, // 修改分组的id
  188. uploadDialogVisible: false,
  189. isUploadGroup: false,
  190. isUpdateFileName: false,
  191. updateFileName: '',
  192. updateFileId: '',
  193. isIndeterminate: false
  194. }
  195. },
  196. methods: {
  197. handleFileName (img) {
  198. this.selectGroup = img.attachFileGroupId
  199. this.updateFileId = img.fileId
  200. this.updateFileName = img.fileName
  201. this.isUpdateFileName = true
  202. this.$nextTick(() => { // 2. 弹框显示DOM更新完成后 获取refs.ref1 设置焦点
  203. this.$refs.updateName[0].focus() // 设置焦点
  204. })
  205. },
  206. uploadDialog () {
  207. this.uploadDialogVisible = true
  208. this.$nextTick(() => {
  209. this.$refs.uploadPic.show()
  210. })
  211. },
  212. onConfirm () {
  213. if (this.type) {
  214. this.$emit('refreshPic', this.images[0].filePath)
  215. } else {
  216. let imgPaths = this.images.map(file => {
  217. return file.filePath
  218. }).join(',')
  219. this.$emit('refreshPic', imgPaths)
  220. }
  221. this.visible = false
  222. },
  223. /**
  224. * 提交修改后的图片名称
  225. */
  226. submitImgName () {
  227. this.$http({
  228. url: this.$http.adornUrl('/admin/file/updateFile'),
  229. method: 'put',
  230. data: this.$http.adornData({
  231. fileId: this.updateFileId,
  232. fileName: this.updateFileName,
  233. attachFileGroupId: this.selectGroup,
  234. type: 1
  235. })
  236. }).then(({ data }) => {
  237. this.$message({
  238. type: 'success',
  239. message: this.$i18n.t('resource.updateSuccess')
  240. })
  241. this.updateFileName = ''
  242. this.selectGroup = ''
  243. this.isUpdateFileName = false
  244. this.loadListImage(this.imgRes.current)
  245. }).catch(({ e }) => {
  246. })
  247. },
  248. /**
  249. * 批量删除图片
  250. */
  251. delectImgs () {
  252. if (!this.fileIds.length) {
  253. this.$message({
  254. message: this.$i18n.t('pictureManager.tips1'),
  255. type: 'error',
  256. duration: 1000
  257. })
  258. return
  259. }
  260. this.$confirm(this.$i18n.t('pictureManager.tips3'), this.$i18n.t('resource.tips'), {
  261. confirmButtonText: this.$i18n.t('resource.confirm'),
  262. cancelButtonText: this.$i18n.t('resource.cancel'),
  263. type: 'warning'
  264. }).then(() => {
  265. this.$http({
  266. url: this.$http.adornUrl('/admin/file/deleteByIds'),
  267. method: 'delete',
  268. data: this.fileIds
  269. }).then(({ data }) => {
  270. this.images = []
  271. this.fileIds = []
  272. this.selectAll = false
  273. this.selectAllEvent()
  274. this.loadListImage()
  275. })
  276. })
  277. },
  278. /**
  279. * 批量移动分组
  280. */
  281. batchMove () {
  282. if (!this.fileIds.length) {
  283. this.$message({
  284. message: this.$i18n.t('pictureManager.tips1'),
  285. type: 'error',
  286. duration: 1000
  287. })
  288. return
  289. }
  290. this.showBatchMove = true
  291. // console.log(this.fileIds)
  292. },
  293. submitBatchMove () {
  294. this.$http({
  295. url: this.$http.adornUrl('/admin/file/batchMove'),
  296. method: 'put',
  297. data: this.fileIds,
  298. params: {
  299. groupId: this.selectGroup
  300. }
  301. }).then(({ data }) => {
  302. this.images = []
  303. this.fileIds = []
  304. this.showBatchMove = false
  305. this.selectAll = false
  306. this.$message({
  307. message: this.$i18n.t('publics.operation'),
  308. type: 'success',
  309. duration: 1000,
  310. onClose: () => {
  311. this.loadListImage()
  312. }
  313. })
  314. })
  315. },
  316. /**
  317. * 点击图片时选中或取消选中图片
  318. * @param img object
  319. */
  320. onClickListImage (img) {
  321. // if(!this.uploadNumberLimit()) {
  322. // return this.onUploadExceedTip()
  323. // }
  324. // 多选图片-如果已选中则取消选中
  325. var imgIndex = this.selectedImageIndex(img)
  326. if (img.selected) {
  327. // 取消图片已选状态
  328. img.selected = false
  329. this.images.splice(imgIndex, 1)
  330. this.fileIds.splice(imgIndex, 1)
  331. if (this.images.length !== this.imgRes.records.length) {
  332. this.selectAll = false
  333. } else {
  334. this.selectAll = true
  335. }
  336. if (this.images.length) {
  337. this.isIndeterminate = true
  338. } else {
  339. this.isIndeterminate = false
  340. }
  341. this.$forceUpdate()
  342. return
  343. }
  344. img.selected = true
  345. this.images.push(JSON.parse(JSON.stringify(img)))
  346. this.fileIds.push(img.fileId)
  347. if (this.images.length !== this.imgRes.records.length) {
  348. this.selectAll = false
  349. } else {
  350. this.selectAll = true
  351. }
  352. if (this.images.length) {
  353. this.isIndeterminate = true
  354. } else {
  355. this.isIndeterminate = false
  356. }
  357. this.$forceUpdate()
  358. },
  359. /**
  360. * 清除所有已点击图片样式
  361. */
  362. clearListSelected () {
  363. if (this.type) {
  364. let list = this.imgRes.records
  365. list.forEach(element => {
  366. element.selected = false
  367. })
  368. }
  369. },
  370. /**
  371. * 按图片名称搜索图片
  372. */
  373. searchImg (newData = false) {
  374. console.log('111')
  375. this.loadListImage(1, newData)
  376. },
  377. /**
  378. * 加载图片列表数据
  379. * @param page
  380. */
  381. loadListImage (current, newData = false) {
  382. this.isLoading = true
  383. if (newData || !this.theData) {
  384. this.theData = {
  385. current: current,
  386. size: 30,
  387. fileName: this.fileName ? this.fileName : null,
  388. attachFileGroupId: this.groupId,
  389. type: 1
  390. }
  391. } else {
  392. this.theData = {fileName: this.theData.fileName,
  393. ...{
  394. current: current,
  395. size: 30,
  396. attachFileGroupId: this.groupId,
  397. type: 1
  398. } }
  399. }
  400. this.$http({
  401. url: this.$http.adornUrl('/admin/file/attachFilePage'),
  402. method: 'get',
  403. params: this.$http.adornParams(this.theData)
  404. }).then(({ data }) => {
  405. this.imgRes = data
  406. this.imgRes.records.forEach(img => {
  407. if (!this.isExist(img)) {
  408. img.selected = false
  409. } else {
  410. img.selected = true
  411. }
  412. })
  413. // console.log(this.images)
  414. // console.log(this.fileIds)
  415. // this.fileIds = []
  416. this.isLoading = false
  417. this.selectAll = false
  418. this.isUploadGroup = false
  419. })
  420. },
  421. isExist (img) {
  422. for (let i = 0; i < this.images.length; i++) {
  423. if (img.fileId === this.images[i].fileId) {
  424. return true
  425. }
  426. }
  427. return false
  428. },
  429. /**
  430. * 图片已选则返回下标,未选则返回-1
  431. */
  432. selectedImageIndex (img) {
  433. for (let i = 0; i < this.images.length; i++) {
  434. var selectedImg = this.images[i]
  435. if (selectedImg.fileId === img.fileId) {
  436. return i
  437. }
  438. }
  439. return -1
  440. },
  441. /**
  442. * 分页页面变化时刷新数据
  443. * @param page
  444. */
  445. onPageNumChange (page) {
  446. this.loadListImage(page)
  447. },
  448. /**
  449. * 获取分组列表
  450. */
  451. getGroupList () {
  452. this.$http({
  453. url: this.$http.adornUrl('/admin/fileGroup/list'),
  454. method: 'get',
  455. params: {
  456. type: 1 // 1、图片 2、视频 3、文件
  457. }
  458. }).then(res => {
  459. this.groupList = res.data
  460. })
  461. },
  462. /**
  463. * 点击分组
  464. */
  465. clickGroup (id) {
  466. this.groupId = id
  467. this.loadListImage()
  468. },
  469. updateGroup (id, name) {
  470. this.updateGroupId = id
  471. this.createGroupName = name
  472. this.isUploadGroup = true
  473. this.$nextTick(() => { // 2. 弹框显示DOM更新完成后 获取refs.ref1 设置焦点
  474. this.$refs.updateGroupName[0].focus() // 设置焦点
  475. })
  476. },
  477. createGroup () {
  478. this.groupVisible = true
  479. this.$nextTick(() => {
  480. this.$refs.groupAddOrUpdate.show(1)
  481. })
  482. },
  483. updateBlur () {
  484. this.isUploadGroup = false
  485. },
  486. /**
  487. * 新建分组
  488. */
  489. submitGroup: Debounce(function () {
  490. if (!this.createGroupName.trim()) {
  491. return this.$message.error(this.$i18n.t('resource.CannotBeEmpty'))
  492. }
  493. const method = 'put'
  494. const param = {
  495. name: this.createGroupName,
  496. type: 1 // 1、图片 2、视频 3、文件
  497. }
  498. param.attachFileGroupId = this.updateGroupId
  499. this.$http({
  500. url: this.$http.adornUrl('/admin/fileGroup'),
  501. method,
  502. data: param
  503. }).then(res => {
  504. this.$message({
  505. message: this.$i18n.t('resource.successTips1'),
  506. type: 'success',
  507. duration: 1000,
  508. onClose: res => {
  509. this.isUploadGroup = false
  510. this.getGroupList()
  511. }
  512. })
  513. })
  514. }),
  515. deleteGroup (id) {
  516. this.$confirm(this.$i18n.t('pictureManager.tips2'), this.$i18n.t('resource.tips'), {
  517. confirmButtonText: this.$i18n.t('resource.confirm'),
  518. cancelButtonText: this.$i18n.t('resource.cancel'),
  519. type: 'warning'
  520. }).then(() => {
  521. this.$http({
  522. url: this.$http.adornUrl('/admin/fileGroup'),
  523. method: 'delete',
  524. params: {
  525. attachFileGroupId: id
  526. }
  527. }).then(res => {
  528. this.getGroupList()
  529. })
  530. })
  531. },
  532. message (msg, isInfo) {
  533. var type = 'error'
  534. if (isInfo) {
  535. type = 'info'
  536. }
  537. this.$message({
  538. message: msg,
  539. type: type,
  540. duration: 1500
  541. })
  542. },
  543. /**
  544. * tab切换事件
  545. */
  546. tabClick (tab) {
  547. this.fileName = ''
  548. if (tab.name === 'pick') {
  549. this.loadListImage(1)
  550. }
  551. },
  552. /**
  553. * 全选图片事件
  554. */
  555. selectAllEvent () {
  556. // console.log(this.selectAll)
  557. // console.log(this.imgRes.records)
  558. if (this.selectAll) {
  559. this.imgRes.records.forEach(img => {
  560. this.images.push(JSON.parse(JSON.stringify(img)))
  561. this.fileIds.push(img.fileId)
  562. img.selected = true
  563. })
  564. this.isIndeterminate = true
  565. } else {
  566. this.imgRes.records.forEach(img => {
  567. img.selected = false
  568. this.isIndeterminate = false
  569. this.fileIds = []
  570. this.images = []
  571. })
  572. }
  573. },
  574. /**
  575. * 关闭回调
  576. */
  577. handleDialogClose () {
  578. this.fileName = ''
  579. this.uploadDialogVisible = false
  580. }
  581. },
  582. mounted () {
  583. this.getGroupList()
  584. this.loadListImage()
  585. },
  586. computed: {
  587. }
  588. }
  589. </script>
  590. <style lang="scss">
  591. .elx-images {
  592. .el-upload-list__item,
  593. .el-upload--picture-card {
  594. width: 78px;
  595. height: 78px;
  596. line-height: 82px;
  597. border-radius: 5px;
  598. }
  599. }
  600. .elx-head {
  601. background: #F7F7F7;
  602. height: 40px;
  603. width: 100%;
  604. line-height: 40px;
  605. .text {
  606. color: #606266;
  607. font-size: 14px;
  608. margin-left: 7px;
  609. cursor:pointer;
  610. }
  611. }
  612. </style>
  613. <style lang="scss" scoped>
  614. div ::v-deep .el-input-group__append, .el-input-group__prepend {
  615. background: #155BD4 !important;
  616. color: #FFFFFF;
  617. border: none;
  618. }
  619. .search-bar {
  620. padding-bottom: 0px;
  621. }
  622. .box {
  623. display: flex;
  624. justify-content: flex-start;
  625. .group {
  626. min-width: 200px;
  627. .group-item {
  628. height: 44px;
  629. line-height: 44px;
  630. padding: 0 10px;
  631. display: flex;
  632. justify-content: space-between;
  633. align-items: center;
  634. cursor:pointer;
  635. .group-name {
  636. width: 200px;
  637. }
  638. .sidebar-operate {
  639. .default-btn + .default-btn {
  640. margin-left: 12px;
  641. }
  642. }
  643. }
  644. .group-item:hover{
  645. background: #F2F7FF;
  646. }
  647. .active {
  648. background: #F2F7FF;
  649. }
  650. .active-title {
  651. height: 40px;
  652. line-height: 40px;
  653. background: #f7f8fa !important;
  654. cursor: auto;
  655. }
  656. }
  657. }
  658. .group-box {
  659. height: 530px;
  660. min-width: 380px;
  661. margin-right: 25px;
  662. border: 1px solid #E8E9EC;
  663. }
  664. .select-group-box {
  665. padding: 20px 0 0 20px;
  666. display: flex;
  667. justify-content: flex-start;
  668. align-items: center;
  669. .select-group-box-item {
  670. margin-right: 10px;
  671. }
  672. }
  673. .pick-block {
  674. $bg: #f6f6f6;
  675. position: relative;
  676. .elx-img-list-loading {
  677. position: absolute;
  678. top: 60px;
  679. z-index: 9;
  680. left: 0;
  681. right: 0;
  682. width: 100%;
  683. height: 520px;
  684. // 加载层高度
  685. background: #fff;
  686. text-align: center;
  687. .el-icon-loading {
  688. font-size: 50px;
  689. color: #409eff;
  690. line-height: 460px;
  691. }
  692. }
  693. .elx-img-list {
  694. min-height: 530px;
  695. width: 100%;
  696. border: 1px solid #E8E9EC;
  697. // 图片列表高度
  698. .img-item-con {
  699. padding-top: 15px;
  700. }
  701. .img-item {
  702. $imgSize: 98px;
  703. $size: 98px;
  704. float: left;
  705. width: $imgSize;
  706. cursor: pointer;
  707. position: relative;
  708. font-size: 12px;
  709. margin: 0 10px 20px;
  710. img {
  711. width: $imgSize;
  712. height: $imgSize;
  713. display: block;
  714. object-fit: contain
  715. }
  716. .title {
  717. line-height: 24px;
  718. height: 24px;
  719. display: block;
  720. overflow: hidden;
  721. background: $bg;
  722. padding: 0 5px;
  723. cursor: text;
  724. word-break: break-word;
  725. text-overflow: ellipsis;
  726. display: -webkit-box;
  727. -webkit-line-clamp: 1;
  728. /* autoprefixer: ignore next */
  729. -webkit-box-orient: vertical;
  730. line-height: 20px;
  731. }
  732. .operate {
  733. line-height: 24px;
  734. height: 24px;
  735. display: block;
  736. overflow: hidden;
  737. // background: $bg;
  738. margin-top: 2px;
  739. padding: 0 5px;
  740. .edit {
  741. float: left;
  742. padding-left: 5px;
  743. }
  744. .del {
  745. float: right;
  746. padding-right: 5px;
  747. }
  748. }
  749. .label {
  750. position: absolute;
  751. z-index: 9;
  752. left: 0;
  753. bottom: 24px;
  754. width: 100%;
  755. height: 21px;
  756. line-height: 21px;
  757. text-align: center;
  758. color: #fff;
  759. &:after {
  760. content: " ";
  761. position: absolute;
  762. left: 0;
  763. bottom: 0;
  764. width: 100%;
  765. height: 21px;
  766. background: #000;
  767. opacity: 0.3;
  768. z-index: -1;
  769. }
  770. }
  771. .selected {
  772. position: absolute;
  773. right: 0;
  774. top: 0;
  775. width: $size;
  776. height: 122px;
  777. border: 1px solid #155BD4;
  778. text-align: right;
  779. .icon {
  780. background: #155BD4;
  781. text-align: center;
  782. height: 18px;
  783. width: 18px;
  784. line-height: 18px;
  785. display: inline-block;
  786. font-size: 16px;
  787. color: #fff;
  788. border-radius: 0 0 0 3px;
  789. position: absolute;
  790. right: 0;
  791. top: 0;
  792. }
  793. }
  794. }
  795. &::after {
  796. content: " ";
  797. display: table;
  798. height: 0;
  799. clear: both;
  800. visibility: hidden;
  801. }
  802. }
  803. }
  804. div ::v-deep .el-tabs__header{
  805. display: none !important;
  806. }
  807. .operation-bar {
  808. margin: 20px 0;
  809. }
  810. .img-list {
  811. width: 100%;
  812. position: relative;
  813. .data-tips {
  814. position: absolute;
  815. top: 30%;
  816. left: 38%;
  817. }
  818. }
  819. .pagination {
  820. margin-top: 30px;
  821. padding-right:30px;
  822. width:100%
  823. }
  824. </style>