index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995
  1. <template>
  2. <div class="Modal">
  3. <Row class="colLeft">
  4. <Col :xl="6" :lg="6" :md="6" :sm="6" :xs="24" class="colLeft">
  5. <div class="Nav">
  6. <div class="input">
  7. <Input
  8. search
  9. enter-button
  10. placeholder="请输入分类名称"
  11. v-model="uploadName.name"
  12. style="width: 90%"
  13. @on-search="changePage"
  14. />
  15. </div>
  16. <div class="trees-coadd">
  17. <div class="scollhide">
  18. <div class="trees">
  19. <Tree :data="treeData" :render="renderContent" :load-data="loadData" class="treeBox" ref="tree"></Tree>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. </Col>
  25. <Col :xl="18" :lg="18" :md="18" :sm="18" :xs="24" class="colLeft">
  26. <div class="conter">
  27. <div class="bnt acea-row row-middle">
  28. <Col span="24">
  29. <Button
  30. type="primary"
  31. :disabled="checkPicList.length === 0"
  32. @click="checkPics"
  33. class="mr10"
  34. v-if="isShow !== 0"
  35. >使用选中图片</Button
  36. >
  37. <Upload
  38. :show-upload-list="false"
  39. :action="fileUrl"
  40. class="mr10 mb10"
  41. :before-upload="beforeUpload"
  42. :data="uploadData"
  43. :headers="header"
  44. :multiple="true"
  45. :format="['jpg', 'jpeg', 'png', 'gif']"
  46. :on-success="handleSuccess"
  47. style="margin-top: 1px; display: inline-block"
  48. >
  49. <Button type="primary">上传图片</Button>
  50. </Upload>
  51. <!--<Button type="success" @click.stop="add" class="mr10">添加分类</Button>-->
  52. <Button type="error" class="mr10" :disabled="checkPicList.length === 0" @click.stop="editPicList('图片')"
  53. >删除图片</Button
  54. >
  55. <i-select :value="pids" placeholder="图片移动至" style="width: 250px" class="treeSel">
  56. <i-option v-for="(item, index) of list" :value="item.value" :key="index" style="display: none">
  57. {{ item.title }}
  58. </i-option>
  59. <Tree
  60. :data="treeData2"
  61. :render="renderContentSel"
  62. ref="reference"
  63. :load-data="loadData"
  64. class="treeBox"
  65. ></Tree>
  66. </i-select>
  67. </Col>
  68. </div>
  69. <div class="pictrueList acea-row">
  70. <Row :gutter="24" class="conter">
  71. <div v-show="isShowPic" class="imagesNo">
  72. <Icon type="ios-images" size="60" color="#dbdbdb" />
  73. <span class="imagesNo_sp">图片库为空</span>
  74. </div>
  75. <div class="acea-row mb10">
  76. <div
  77. class="pictrueList_pic mr10 mb10"
  78. v-for="(item, index) in pictrueList"
  79. :key="index"
  80. @mouseenter="enterMouse(item)"
  81. @mouseleave="enterMouse(item)"
  82. >
  83. <p class="number" v-if="item.num > 0">
  84. <Badge :count="item.num" type="error" :offset="[11, 12]">
  85. <a href="#" class="demo-badge"></a>
  86. </Badge>
  87. </p>
  88. <img
  89. :class="item.isSelect ? 'on' : ''"
  90. v-lazy="item.satt_dir"
  91. @click.stop="changImage(item, index, pictrueList)"
  92. />
  93. <div
  94. style="display: flex; align-items: center; justify-content: space-between"
  95. @mouseenter="enterLeave(item)"
  96. @mouseleave="enterLeave(item)"
  97. >
  98. <p style="width: 80%" v-if="!item.isEdit">
  99. {{ item.editName }}
  100. </p>
  101. <Input
  102. size="small"
  103. style="width: 80%"
  104. type="text"
  105. v-model="item.real_name"
  106. v-else
  107. @on-blur="bindTxt(item)"
  108. />
  109. <span
  110. class="iconfont iconbianji1"
  111. @click="item.isEdit = !item.isEdit"
  112. v-if="item.isShowEdit"
  113. ></span>
  114. </div>
  115. <div class="nameStyle" v-show="item.realName && item.real_name">
  116. {{ item.real_name }}
  117. </div>
  118. </div>
  119. </div>
  120. <!--<Col class="mb20" v-bind="gridPic"-->
  121. <!--v-for="(item, index) in pictrueList" :key="index" >-->
  122. <!--<div class="pictrueList_pic">-->
  123. <!--<img :class="item.isSelect ? 'on': '' " v-lazy="item.satt_dir"-->
  124. <!--@click.stop="changImage(item, index, pictrueList)"/>-->
  125. <!--</div>-->
  126. <!--</Col>-->
  127. </Row>
  128. </div>
  129. <div class="footer acea-row row-right">
  130. <Page :total="total" show-elevator show-total @on-change="pageChange" :page-size="fileData.limit" />
  131. </div>
  132. </div>
  133. </Col>
  134. </Row>
  135. </div>
  136. </template>
  137. <script>
  138. import {
  139. getCategoryListApi,
  140. createApi,
  141. fileListApi,
  142. categoryEditApi,
  143. moveApi,
  144. fileUpdateApi,
  145. } from '@/api/uploadPictures';
  146. import Setting from '@/setting';
  147. import { getCookies } from '@/libs/util';
  148. export default {
  149. name: 'uploadPictures',
  150. // components: { editFrom },
  151. props: {
  152. isChoice: {
  153. type: String,
  154. default: '',
  155. },
  156. gridBtn: {
  157. type: Object,
  158. default: null,
  159. },
  160. gridPic: {
  161. type: Object,
  162. default: null,
  163. },
  164. isShow: {
  165. type: Number,
  166. default: 1,
  167. },
  168. pageLimit: {
  169. type: Number,
  170. default: 0,
  171. },
  172. },
  173. data() {
  174. return {
  175. spinShow: false,
  176. fileUrl: Setting.apiBaseURL + '/file/upload',
  177. modalPic: false,
  178. treeData: [],
  179. treeData2: [],
  180. pictrueList: [],
  181. uploadData: {}, // 上传参数
  182. checkPicList: [],
  183. uploadName: {
  184. name: '',
  185. },
  186. FromData: null,
  187. treeId: 0,
  188. isJudge: false,
  189. buttonProps: {
  190. type: 'default',
  191. size: 'small',
  192. },
  193. fileData: {
  194. pid: 0,
  195. page: 1,
  196. limit: this.pageLimit || 18,
  197. },
  198. total: 0,
  199. pids: 0,
  200. list: [],
  201. modalTitleSs: '',
  202. isShowPic: false,
  203. header: {},
  204. ids: [], // 选中附件的id集合
  205. };
  206. },
  207. mounted() {
  208. this.getToken();
  209. this.getList();
  210. this.getFileList();
  211. },
  212. methods: {
  213. enterMouse(item) {
  214. item.realName = !item.realName;
  215. },
  216. enterLeave(item) {
  217. item.isShowEdit = !item.isShowEdit;
  218. },
  219. // 上传头部token
  220. getToken() {
  221. this.header['Authori-zation'] = 'Bearer ' + getCookies('token');
  222. },
  223. // 树状图
  224. renderContent(h, { root, node, data }) {
  225. let operate = [];
  226. if (data.pid == 0) {
  227. operate.push(
  228. h(
  229. 'div',
  230. {
  231. class: ['ivu-dropdown-item'],
  232. on: {
  233. click: () => {
  234. this.append(root, node, data);
  235. },
  236. },
  237. },
  238. '添加分类',
  239. ),
  240. );
  241. }
  242. if (data.id !== '') {
  243. operate.push(
  244. h(
  245. 'div',
  246. {
  247. class: ['ivu-dropdown-item'],
  248. on: {
  249. click: () => {
  250. this.editPic(root, node, data);
  251. },
  252. },
  253. },
  254. '编辑分类',
  255. ),
  256. h(
  257. 'div',
  258. {
  259. class: ['ivu-dropdown-item'],
  260. on: {
  261. click: () => {
  262. this.remove(root, node, data, '分类');
  263. },
  264. },
  265. },
  266. '删除分类',
  267. ),
  268. );
  269. }
  270. return h(
  271. 'span',
  272. {
  273. class: ['ivu-span'],
  274. style: {
  275. display: 'inline-block',
  276. width: '88%',
  277. height: '32px',
  278. lineHeight: '32px',
  279. position: 'relative',
  280. color: 'rgba(0,0,0,0.6)',
  281. cursor: 'pointer',
  282. },
  283. on: {
  284. mouseenter: () => {
  285. this.onMouseOver(root, node, data);
  286. },
  287. mouseleave: () => {
  288. this.onMouseOver(root, node, data);
  289. },
  290. // click: (e) => {
  291. // this.appendBtn(root, node, data, e);
  292. // },
  293. },
  294. },
  295. [
  296. h(
  297. 'span',
  298. {
  299. on: {
  300. click: (e) => {
  301. this.appendBtn(root, node, data, e);
  302. },
  303. },
  304. },
  305. data.title,
  306. ),
  307. h(
  308. 'div',
  309. {
  310. style: {
  311. display: 'inline-block',
  312. float: 'right',
  313. },
  314. },
  315. [
  316. h('Icon', {
  317. props: {
  318. type: 'ios-more',
  319. },
  320. style: {
  321. marginRight: '8px',
  322. fontSize: '20px',
  323. display: 'inline',
  324. },
  325. on: {
  326. click: (e) => {
  327. this.onClick(root, node, data, e);
  328. },
  329. },
  330. }),
  331. h(
  332. 'div',
  333. {
  334. class: ['right-menu ivu-poptip-inner'],
  335. style: {
  336. width: '80px',
  337. position: 'absolute',
  338. zIndex: '9',
  339. top: '0',
  340. right: '0',
  341. display: data.flag2 ? 'block' : 'none',
  342. },
  343. },
  344. operate,
  345. ),
  346. ],
  347. ),
  348. ],
  349. );
  350. },
  351. // renderContent (h, { root, node, data }) {
  352. // let actionData = [];
  353. // if (data.id !== '' && data.pid == 0) {
  354. // actionData.push(h('Button', {
  355. // props: Object.assign({}, this.buttonProps, {
  356. // icon: 'ios-add'
  357. // }),
  358. // style: {
  359. // marginRight: '8px',
  360. // display: data.flag ? 'inline' : 'none'
  361. // },
  362. // on: {
  363. // click: () => { this.append(root, node, data) }
  364. //
  365. // }
  366. // }));
  367. // }
  368. // if (data.id !== '') {
  369. // actionData.push(h('Button', {
  370. // props: Object.assign({}, this.buttonProps, {
  371. // icon: 'md-create'
  372. // }),
  373. // style: {
  374. // marginRight: '8px',
  375. // display: data.flag ? 'inline' : 'none'
  376. // },
  377. // on: {
  378. // click: () => { this.editPic(root, node, data) }
  379. // }
  380. // }));
  381. // actionData.push(h('Button', {
  382. // props: Object.assign({}, this.buttonProps, {
  383. // icon: 'ios-remove'
  384. // }),
  385. // style: {
  386. // display: data.flag ? 'inline' : 'none'
  387. // },
  388. // on: {
  389. // click: () => { this.remove(root, node, data, '分类') }
  390. // }
  391. // }));
  392. // }
  393. // return h('div', {
  394. // style: {
  395. // display: 'inline-block',
  396. // width: '90%'
  397. // },
  398. // on: {
  399. // mouseenter: () => { this.onMouseOver(root, node, data) },
  400. // mouseleave: () => { this.onMouseOver(root, node, data) }
  401. // }
  402. // }, [
  403. // h('span', [
  404. // h('span', {
  405. // style: {
  406. // cursor: 'pointer'
  407. // },
  408. // class: ['ivu-tree-title'],
  409. // on: {
  410. // click: (e) => { this.appendBtn(root, node, data, e) }
  411. // }
  412. // }, data.title)
  413. // ]),
  414. // h('span', {
  415. // style: {
  416. // display: 'inline-block',
  417. // float: 'right'
  418. // }
  419. // }, actionData)
  420. // ]);
  421. // },
  422. renderContentSel(h, { root, node, data }) {
  423. return h(
  424. 'div',
  425. {
  426. style: {
  427. display: 'inline-block',
  428. width: '90%',
  429. },
  430. },
  431. [
  432. h('span', [
  433. h(
  434. 'span',
  435. {
  436. style: {
  437. cursor: 'pointer',
  438. },
  439. class: ['ivu-tree-title'],
  440. on: {
  441. click: (e) => {
  442. this.handleCheckChange(root, node, data, e);
  443. },
  444. },
  445. },
  446. data.title,
  447. ),
  448. ]),
  449. ],
  450. );
  451. },
  452. // 下拉树
  453. handleCheckChange(root, node, data, e) {
  454. this.list = [];
  455. // this.pids = 0;
  456. let value = data.id;
  457. let title = data.title;
  458. this.list.push({
  459. value,
  460. title,
  461. });
  462. if (this.ids.length) {
  463. this.pids = value;
  464. this.getMove();
  465. } else {
  466. this.$Message.warning('请先选择图片');
  467. }
  468. let selected = this.$refs.reference.$el.querySelectorAll('.ivu-tree-title-selected');
  469. for (let i = 0; i < selected.length; i++) {
  470. selected[i].className = 'ivu-tree-title';
  471. }
  472. e.path[0].className = 'ivu-tree-title ivu-tree-title-selected'; // 当前点击的元素
  473. },
  474. // 移动分类
  475. getMove() {
  476. let data = {
  477. pid: this.pids,
  478. images: this.ids.toString(),
  479. };
  480. moveApi(data)
  481. .then(async (res) => {
  482. this.$Message.success(res.msg);
  483. this.getFileList();
  484. this.pids = 0;
  485. this.checkPicList = [];
  486. this.ids = [];
  487. })
  488. .catch((res) => {
  489. this.$Message.error(res.msg);
  490. });
  491. },
  492. // 删除图片
  493. editPicList(tit) {
  494. this.tits = tit;
  495. let ids = {
  496. ids: this.ids.toString(),
  497. };
  498. let delfromData = {
  499. title: '删除选中图片',
  500. url: `file/file/delete`,
  501. method: 'POST',
  502. ids: ids,
  503. };
  504. this.$modalSure(delfromData)
  505. .then((res) => {
  506. this.$Message.success(res.msg);
  507. this.getFileList();
  508. this.checkPicList = [];
  509. })
  510. .catch((res) => {
  511. this.$Message.error(res.msg);
  512. });
  513. },
  514. // 鼠标移入 移出
  515. onMouseOver(root, node, data) {
  516. event.preventDefault();
  517. data.flag = !data.flag;
  518. if (data.flag2) {
  519. data.flag2 = false;
  520. }
  521. },
  522. onClick(root, node, data, e) {
  523. e.preventDefault();
  524. data.flag2 = !data.flag2;
  525. },
  526. // 点击树
  527. appendBtn(root, node, data, e) {
  528. e.preventDefault();
  529. this.treeId = data.id;
  530. this.fileData.page = 1;
  531. this.getFileList();
  532. let selected = this.$refs.tree.$el.querySelectorAll('.ivu-tree-title-selected');
  533. for (let i = 0; i < selected.length; i++) {
  534. selected[i].className = 'ivu-tree-title';
  535. }
  536. e.path[0].className = 'ivu-tree-title ivu-tree-title-selected'; // 当前点击的元素
  537. },
  538. // 点击添加
  539. append(root, node, data) {
  540. this.treeId = data.id;
  541. this.getFrom();
  542. },
  543. // 删除分类
  544. remove(root, node, data, tit) {
  545. this.tits = tit;
  546. let delfromData = {
  547. title: '删除 [ ' + data.title + ' ] ' + '分类',
  548. url: `file/category/${data.id}`,
  549. method: 'DELETE',
  550. ids: '',
  551. };
  552. this.$modalSure(delfromData)
  553. .then((res) => {
  554. this.$Message.success(res.msg);
  555. this.getList();
  556. this.checkPicList = [];
  557. })
  558. .catch((res) => {
  559. this.$Message.error(res.msg);
  560. });
  561. },
  562. // 确认删除树
  563. // submitModel () {
  564. // if (this.tits === '图片') {
  565. // this.getFileList();
  566. // this.checkPicList = [];
  567. // } else {
  568. // this.getList();
  569. // this.checkPicList = [];
  570. // }
  571. // },
  572. // 编辑树表单
  573. editPic(root, node, data) {
  574. this.$modalForm(categoryEditApi(data.id)).then(() => this.getList());
  575. },
  576. // 搜索分类
  577. changePage() {
  578. this.getList('search');
  579. },
  580. // 分类列表树
  581. getList(type) {
  582. let data = {
  583. title: '全部图片',
  584. id: '',
  585. pid: 0,
  586. };
  587. getCategoryListApi(this.uploadName)
  588. .then(async (res) => {
  589. this.treeData = res.data.list;
  590. this.treeData.unshift(data);
  591. if (type !== 'search') {
  592. this.treeData2 = [...this.treeData];
  593. }
  594. this.addFlag(this.treeData);
  595. })
  596. .catch((res) => {
  597. this.$Message.error(res.msg);
  598. });
  599. },
  600. loadData(item, callback) {
  601. getCategoryListApi({
  602. pid: item.id,
  603. })
  604. .then(async (res) => {
  605. const data = res.data.list;
  606. callback(data);
  607. })
  608. .catch((res) => {});
  609. },
  610. addFlag(treedata) {
  611. treedata.map((item) => {
  612. this.$set(item, 'flag', false);
  613. this.$set(item, 'flag2', false);
  614. item.children && this.addFlag(item.children);
  615. });
  616. },
  617. // 新建分类
  618. add() {
  619. this.treeId = 0;
  620. this.getFrom();
  621. },
  622. // 文件列表
  623. getFileList() {
  624. this.fileData.pid = this.treeId;
  625. fileListApi(this.fileData)
  626. .then(async (res) => {
  627. res.data.list.forEach((el) => {
  628. el.isSelect = false;
  629. el.isEdit = false;
  630. el.isShowEdit = false;
  631. el.realName = false;
  632. el.num = 0;
  633. this.editName(el);
  634. });
  635. this.pictrueList = res.data.list;
  636. if (this.pictrueList.length) {
  637. this.isShowPic = false;
  638. } else {
  639. this.isShowPic = true;
  640. }
  641. this.total = res.data.count;
  642. })
  643. .catch((res) => {
  644. this.$Message.error(res.msg);
  645. });
  646. },
  647. pageChange(index) {
  648. this.fileData.page = index;
  649. this.getFileList();
  650. this.checkPicList = [];
  651. },
  652. // 新建分类表单
  653. getFrom() {
  654. this.$modalForm(createApi({ id: this.treeId })).then((res) => {
  655. this.getList();
  656. });
  657. },
  658. // 上传之前
  659. beforeUpload(file) {
  660. // if (file.size > 2097152) {
  661. // this.$Message.error(file.name + "大小超过2M!");
  662. // } else
  663. if (!/image\/\w+/.test(file.type)) {
  664. this.$Message.error('请上传以jpg、jpeg、png等结尾的图片文件'); //FileExt.toLowerCase()
  665. return false;
  666. }
  667. this.uploadData = {
  668. pid: this.treeId,
  669. };
  670. let promise = new Promise((resolve) => {
  671. this.$nextTick(function () {
  672. resolve(true);
  673. });
  674. });
  675. return promise;
  676. },
  677. // 上传成功
  678. handleSuccess(res, file, fileList) {
  679. if (res.status === 200) {
  680. this.$Message.success(res.msg);
  681. this.fileData.page = 1;
  682. this.getFileList();
  683. } else {
  684. this.$Message.error(res.msg);
  685. }
  686. },
  687. // 关闭
  688. cancel() {
  689. this.$emit('changeCancel');
  690. },
  691. // 选中图片
  692. changImage(item, index, row) {
  693. let activeIndex = 0;
  694. if (!item.isSelect) {
  695. item.isSelect = true;
  696. this.checkPicList.push(item);
  697. } else {
  698. item.isSelect = false;
  699. this.checkPicList.map((el, index) => {
  700. if (el.att_id == item.att_id) {
  701. activeIndex = index;
  702. }
  703. });
  704. this.checkPicList.splice(activeIndex, 1);
  705. }
  706. this.ids = [];
  707. this.checkPicList.map((item, i) => {
  708. this.ids.push(item.att_id);
  709. });
  710. this.pictrueList.map((el, i) => {
  711. if (el.isSelect) {
  712. this.checkPicList.filter((el2, j) => {
  713. if (el.att_id == el2.att_id) {
  714. el.num = j + 1;
  715. }
  716. });
  717. } else {
  718. el.num = 0;
  719. }
  720. });
  721. },
  722. // 点击使用选中图片
  723. checkPics() {
  724. if (this.isChoice === '单选') {
  725. if (this.checkPicList.length > 1) return this.$Message.warning('最多只能选一张图片');
  726. this.$emit('getPic', this.checkPicList[0]);
  727. } else {
  728. let maxLength = this.$route.query.maxLength;
  729. if (maxLength != undefined && this.checkPicList.length > Number(maxLength))
  730. return this.$Message.warning('最多只能选' + maxLength + '张图片');
  731. this.$emit('getPicD', this.checkPicList);
  732. }
  733. },
  734. editName(item) {
  735. let it = item.real_name.split('.');
  736. let it1 = it[1] == undefined ? [] : it[1];
  737. let len = it[0].length + it1.length;
  738. item.editName = len < 10 ? item.real_name : item.real_name.substr(0, 2) + '...' + item.real_name.substr(-5, 5);
  739. },
  740. // 修改图片文字上传
  741. bindTxt(item) {
  742. if (item.real_name == '') {
  743. this.$Message.error('请填写内容');
  744. }
  745. fileUpdateApi(item.att_id, {
  746. real_name: item.real_name,
  747. })
  748. .then((res) => {
  749. this.editName(item);
  750. item.isEdit = false;
  751. this.$Message.success(res.msg);
  752. })
  753. .catch((error) => {
  754. this.$Message.error(error.msg);
  755. });
  756. },
  757. },
  758. };
  759. </script>
  760. <style scoped lang="stylus">
  761. .nameStyle {
  762. position: absolute;
  763. white-space: nowrap;
  764. z-index: 9;
  765. background: #eee;
  766. height: 20px;
  767. line-height: 20px;
  768. color: #555;
  769. border: 1px solid #ebebeb;
  770. padding: 0 5px;
  771. left: 56px;
  772. bottom: -18px;
  773. }
  774. .iconbianji1 {
  775. font-size: 13px;
  776. }
  777. /deep/.ivu-badge-count {
  778. margin-top: 18px !important;
  779. margin-right: 19px !important;
  780. }
  781. /deep/ivu-tree-title-selected:hover {
  782. color: unset;
  783. background-color: unset;
  784. }
  785. /deep/.ivu-tree-title {
  786. padding: 0;
  787. // width: 200px;
  788. width: 100%;
  789. }
  790. /deep/.ivu-span {
  791. padding: 0;
  792. display: flex !important;
  793. justify-content: space-between;
  794. }
  795. /deep/.ivu-tree ul li {
  796. margin: 0;
  797. }
  798. /deep/.ivu-tree-arrow {
  799. width: 17px;
  800. color: #626262;
  801. }
  802. /deep/.ivu-span:hover {
  803. background: #F5F5F5;
  804. color: rgba(0, 0, 0, 0.4) !important;
  805. }
  806. /deep/.ivu-tree-arrow i {
  807. vertical-align: bottom;
  808. }
  809. .Nav /deep/.ivu-icon-ios-arrow-forward:before {
  810. content: '\F341' !important;
  811. font-size: 20px;
  812. }
  813. /deep/.ivu-btn-icon-only.ivu-btn-small {
  814. padding: unset !important;
  815. }
  816. .selectTreeClass {
  817. background: #d5e8fc;
  818. }
  819. .treeBox {
  820. width: 100%;
  821. height: 100%;
  822. >>> .ivu-tree-title-selected, .ivu-tree-title-selected:hover {
  823. color: #2D8cF0 !important;
  824. background-color: #fff !important;
  825. }
  826. >>> .ivu-btn-icon-only {
  827. width: 20px !important;
  828. height: 20px !important;
  829. }
  830. >>> .ivu-tree-title:hover {
  831. color: #2D8cF0 !important;
  832. background-color: #fff !important;
  833. }
  834. }
  835. .pictrueList_pic {
  836. position: relative;
  837. width: 100px;
  838. cursor: pointer;
  839. img {
  840. width: 100%;
  841. height: 100px;
  842. }
  843. p {
  844. overflow: hidden;
  845. text-overflow: ellipsis;
  846. white-space: nowrap;
  847. height: 20px;
  848. text-align: center;
  849. }
  850. .number {
  851. height: 33px;
  852. }
  853. .number {
  854. position: absolute;
  855. right: 0;
  856. top: 0;
  857. }
  858. }
  859. .trees-coadd {
  860. width: 100%;
  861. border-radius: 4px;
  862. overflow: hidden;
  863. position: relative;
  864. .scollhide {
  865. overflow-x: hidden;
  866. overflow-y: scroll;
  867. padding: 10px 0 10px 0;
  868. box-sizing: border-box;
  869. .trees {
  870. width: 100%;
  871. height: 374px;
  872. }
  873. }
  874. .scollhide::-webkit-scrollbar {
  875. display: none;
  876. }
  877. }
  878. .treeSel >>>.ivu-select-dropdown-list {
  879. padding: 0 5px !important;
  880. box-sizing: border-box;
  881. width: 200px;
  882. }
  883. .imagesNo {
  884. display: flex;
  885. justify-content: center;
  886. flex-direction: column;
  887. align-items: center;
  888. margin: 65px 0;
  889. .imagesNo_sp {
  890. font-size: 13px;
  891. color: #dbdbdb;
  892. line-height: 3;
  893. }
  894. }
  895. .Modal {
  896. width: 100%;
  897. height: 100%;
  898. background: #fff !important;
  899. }
  900. .Nav {
  901. width: 100%;
  902. border-right: 1px solid #eee;
  903. }
  904. .colLeft {
  905. padding-right: 0 !important;
  906. height: 100%;
  907. }
  908. .conter {
  909. width: 100%;
  910. height: 100%;
  911. margin-left: 0 !important;
  912. }
  913. .conter .bnt {
  914. width: 100%;
  915. padding: 0 13px 10px 8px;
  916. box-sizing: border-box;
  917. }
  918. .conter .pictrueList {
  919. padding-left: 6px;
  920. width: 100%;
  921. max-width: 1200px;
  922. overflow-x: hidden;
  923. overflow-y: auto;
  924. // height: 300px;
  925. }
  926. .conter .pictrueList img {
  927. width: 100%;
  928. border: 2px solid #fff;
  929. }
  930. .conter .pictrueList img.on {
  931. border: 2px solid #5FB878;
  932. }
  933. .conter .footer {
  934. padding: 0 20px 10px 20px;
  935. }
  936. .demo-badge {
  937. width: 42px;
  938. height: 42px;
  939. background: transparent;
  940. border-radius: 6px;
  941. display: inline-block;
  942. }
  943. .bnt /deep/ .ivu-tree-children {
  944. padding: 5px 0;
  945. }
  946. .trees-coadd /deep/ .ivu-tree-children .ivu-tree-arrow {
  947. line-height: 25px;
  948. }
  949. </style>