多租户商城-商户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1071 lines
31 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="customTool" :class="'terminal' + terminal">
  3. <h3 class="toolTit">自定义</h3>
  4. <div class="toolBox">
  5. <div class="selectBox">
  6. <div class="selectLayTit">选择模板<span>{{selectTemplateName}}</span></div>
  7. <div class="layoutList">
  8. <span class="item iconfont" :class="{active: activeComponent.componentContent.layoutType === item.type}" @click="selectLayout(item, index)" v-for="(item, index) of layoutList" :key="item.id" v-html="item.Icon"></span>
  9. </div>
  10. </div>
  11. <div class="itemBox flexStyle">
  12. <label>图片间隙</label>
  13. <div class="block">
  14. <el-slider
  15. :show-input-controls=false
  16. input-size="mini"
  17. v-model="activeComponent.componentContent.imgClearance"
  18. show-input>
  19. </el-slider>
  20. </div>
  21. </div>
  22. <div class="itemBox flexStyle">
  23. <label>页面间距</label>
  24. <div class="block">
  25. <el-slider
  26. :show-input-controls=false
  27. input-size="mini"
  28. v-model="activeComponent.componentContent.pageSpacing"
  29. show-input>
  30. </el-slider>
  31. </div>
  32. </div>
  33. <div class="itemBox">
  34. <div v-if="activeComponent.componentContent.layoutType !== 'average'">
  35. <div class="textTit">布局</div>
  36. <p>选定布局区域在下方添加图片建议添加比例一致的图片</p>
  37. <div class="layoutBox"
  38. :class="activeComponent.componentContent.layoutType"
  39. >
  40. <div class="item" :class="{active: activeComponent.componentContent.imgBoxActive === index-1}" @click="changeLayout(index-1)" v-for="index of activeComponent.componentContent.elementNum" :key="index">
  41. <!--<span>宽度375px</span>-->
  42. <img class="img" :src="activeComponent.componentContent.imgData[index-1].src" v-show="activeComponent.componentContent.imgData[index-1].src">
  43. </div>
  44. </div>
  45. </div>
  46. <div v-else>
  47. <dl class="densityLiist">
  48. <dt>密度</dt>
  49. <dd>
  50. <el-select v-model="activeComponent.componentContent.density" placeholder="" @change="densityChange">
  51. <el-option label="4*4" value="4"></el-option>
  52. <el-option label="5*5" value="5"></el-option>
  53. <el-option label="6*6" value="6"></el-option>
  54. <el-option label="7*7" value="7"></el-option>
  55. <el-option label="10*10" value="10"></el-option>
  56. </el-select>
  57. </dd>
  58. </dl>
  59. <div class="textTit">布局</div>
  60. <p>移动鼠标选定布局区域大小</p>
  61. <div class="averageBoxWarp">
  62. <div class="averageBox" @mouseleave="averageBoxLeave">
  63. <ul v-for="i of parseInt(activeComponent.componentContent.density)" :key="'y'+i" :class="'col'+activeComponent.componentContent.density">
  64. <li v-for="j of parseInt(activeComponent.componentContent.density)" :key="'x'+j" :class="{'on':activeComponent.componentContent.averageBoxData[i-1][j-1].hover}" @click="averageBoxClick(i-1,j-1)" @mouseover="averageBoxMouseover(i-1,j-1)"></li>
  65. </ul>
  66. </div>
  67. <div class="selectedCube">
  68. <ul>
  69. <li v-for="(item,index) of activeComponent.componentContent.imgData" :class="{active: activeComponent.componentContent.imgBoxActive === index}" :key="index" :style="{'width':getItemValue(item.width) + '%','height':getItemValue(item.height) + '%','left':getItemValue(item.left) + '%','top':getItemValue(item.top) + '%'}">
  70. <div class="box" @click="changeLayout(index)">
  71. <span>
  72. {{parseInt(getItemValue(item.width) * 12)}}x{{parseInt(getItemValue(item.height) * 12)}}
  73. </span>
  74. <img class="img" :src="activeComponent.componentContent.imgData[index].src" v-if="activeComponent.componentContent.imgData[index].src">
  75. </div>
  76. <a class="btn-close" @click="delsSlectedCube(item,index)"><i class="icon iconfont icon-close"></i></a>
  77. </li>
  78. </ul>
  79. </div>
  80. </div>
  81. </div>
  82. <div v-if="activeComponent.componentContent.imgData.length !== 0">
  83. <div class="addImgTit">请添加图片</div>
  84. <div class="addImgBox">
  85. <div class="addImgBoxInner">
  86. <div class="addImg">
  87. <el-upload
  88. drag
  89. :headers="headers"
  90. :action="fileUploadApi.fileUpload"
  91. :on-success="handleAvatarSuccess"
  92. :before-upload="beforeAvatarUpload"
  93. :show-file-list="false"
  94. >
  95. <img v-if="activeComponent.componentContent.imgData[activeComponent.componentContent.imgBoxActive].src" :src="activeComponent.componentContent.imgData[activeComponent.componentContent.imgBoxActive].src" class="avatar">
  96. <div v-if="activeComponent.componentContent.imgData[activeComponent.componentContent.imgBoxActive].src" class="tips">更换图片</div>
  97. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  98. <span>添加图片</span>
  99. </el-upload>
  100. </div>
  101. <div class="addLink">
  102. <tool-select-link :linkObj.sync='activeComponent.componentContent.imgData[activeComponent.componentContent.imgBoxActive].linkObj' title="链接"></tool-select-link>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </template>
  111. <script>
  112. import { mapGetters } from 'vuex'
  113. import {toolMixin} from '@@/config/mixin'
  114. import ToolSelectLink from '../toolModule/tool-select-link'
  115. import api from '@@/components/canvasShow/config/api'
  116. import { getToken } from '@/utils/auth'
  117. export default {
  118. name: 'customTool',
  119. mixins: [toolMixin],
  120. components: {
  121. ToolSelectLink
  122. },
  123. data () {
  124. return {
  125. title: '', // 标题内容
  126. // imgClearance: 0, // 图片间隙
  127. // pageSpacing: 0, // 页面间距
  128. imgBoxActive: 0,
  129. imageUrl: '', // 图片地址
  130. linkValue: '', // 链接地址
  131. linkOptions: [
  132. {
  133. value: '/index',
  134. label: '首页'
  135. },
  136. {
  137. value: '/list',
  138. label: '列表页'
  139. },
  140. {
  141. value: '/detail',
  142. label: '详情页'
  143. },
  144. {
  145. value: '/about',
  146. label: '关于我们'
  147. }
  148. ],
  149. layoutList: [
  150. {
  151. id: 0,
  152. type: 'L1',
  153. name: '单图',
  154. number: 1, // 显示格子数
  155. Icon: '&#xe607;'
  156. },
  157. {
  158. id: 1,
  159. type: 'L2',
  160. name: '一行二个',
  161. number: 2, // 显示格子数
  162. Icon: '&#xe643;'
  163. },
  164. {
  165. id: 2,
  166. type: 'L3',
  167. name: '一行三个',
  168. number: 3,
  169. Icon: '&#xe644;'
  170. },
  171. {
  172. id: 3,
  173. type: 'L4',
  174. name: '一行四个',
  175. number: 4,
  176. Icon: '&#xe645;'
  177. },
  178. {
  179. id: 4,
  180. type: 'T2B2',
  181. name: '二左二右',
  182. number: 4,
  183. Icon: '&#xe647;'
  184. },
  185. {
  186. id: 5,
  187. type: 'L1R2',
  188. name: '一左二右',
  189. number: 3,
  190. Icon: '&#xe646;'
  191. },
  192. {
  193. id: 6,
  194. type: 'T1B2',
  195. name: '一上二下',
  196. number: 3,
  197. Icon: '&#xe648;'
  198. },
  199. {
  200. id: 7,
  201. type: 'L1T1B2',
  202. name: '一左三右',
  203. number: 4,
  204. Icon: '&#xe646;'
  205. },
  206. {
  207. id: 8,
  208. type: 'average',
  209. name: '自定义',
  210. number: 0,
  211. Icon: '&#xe642;'
  212. }
  213. ],
  214. activeLay: 0,
  215. elementNum: 2, // 生成格子数量
  216. // layoutType: 'L2',
  217. // density: '4',
  218. // averageBoxData: [], // 记录格子的激活状态
  219. beginAverageBox: [], // 记录开始点击的格子
  220. endAverageBox: [], // 记录结束点击的格子
  221. imgData: [], // 图片数据
  222. fileUploadApi: {
  223. fileUpload: ''
  224. },
  225. headers: {
  226. 'Authorization-business': getToken()
  227. },
  228. }
  229. },
  230. computed: {
  231. ...mapGetters([
  232. 'terminal'
  233. ]),
  234. selectTemplateName () {
  235. for (let i = 0; i < this.layoutList.length; i++) {
  236. if (this.layoutList[i].type === this.activeComponent.componentContent.layoutType) {
  237. return this.layoutList[i].name
  238. }
  239. }
  240. }
  241. },
  242. mounted () {
  243. this.fileUploadApi = api
  244. },
  245. methods: {
  246. handleAvatarSuccess (res, file) {
  247. this.activeComponent.componentContent.imgData[this.activeComponent.componentContent.imgBoxActive].src = res.data.url
  248. },
  249. beforeAvatarUpload (file) {
  250. const isLt1M = file.size / 1024 / 1024 < 1
  251. if (!isLt1M) {
  252. this.$message.error('上传图片大小不能超过 1MB!')
  253. }
  254. return isLt1M
  255. },
  256. // 计算生成格子百分比
  257. getItemValue (val) {
  258. const density = parseInt(this.activeComponent.componentContent.density)
  259. if (val === 0 || density === 0) {
  260. return 0
  261. }
  262. return (val / density * 10000 / 100.00)// 小数点后两位百分比
  263. },
  264. // 选择布局
  265. selectLayout (item, index) {
  266. this.activeComponent.componentContent.imgBoxActive = 0
  267. this.activeComponent.componentContent.maxH = 0
  268. this.activeLay = index
  269. this.activeComponent.componentContent.elementNum = item.number
  270. this.activeComponent.componentContent.layoutType = item.type
  271. if (item.type === 'average') {
  272. this.densityChange(this.activeComponent.componentContent.density)
  273. } else {
  274. this.activeComponent.componentContent.imgData = []
  275. let obj = {
  276. src: '',
  277. linkObj: {
  278. selsectValue: '',
  279. selectName: '',
  280. typeText: '',
  281. url: ''
  282. }
  283. }
  284. for (let i = 0; i < item.number; i++) {
  285. this.activeComponent.componentContent.imgData.push(JSON.parse(JSON.stringify(obj)))
  286. }
  287. }
  288. },
  289. // 选择格子
  290. changeLayout (index) {
  291. this.activeComponent.componentContent.imgBoxActive = index
  292. },
  293. // 添加图片
  294. imgChange (file, fileList) {
  295. this.activeComponent.componentContent.imgData[this.activeComponent.componentContent.imgBoxActive].src = URL.createObjectURL(file.raw)
  296. },
  297. // 切换密度
  298. densityChange (val) {
  299. this.activeComponent.componentContent.imgBoxActive = 0
  300. const densityVal = parseInt(val)
  301. this.activeComponent.componentContent.averageBoxData = []
  302. for (let i = 0; i < densityVal; i++) {
  303. this.activeComponent.componentContent.averageBoxData[i] = []
  304. for (let j = 0; j < densityVal; j++) {
  305. this.activeComponent.componentContent.averageBoxData[i].push({
  306. hover: false, // 判断经过激活的位置
  307. takeUp: false // 判断占击占用的位置
  308. })
  309. }
  310. }
  311. this.activeComponent.componentContent.maxH = 0
  312. this.activeComponent.componentContent.imgData = []
  313. },
  314. // 自定义格子点击
  315. averageBoxClick (x, y) {
  316. if (this.beginAverageBox.length === 0) {
  317. this.beginAverageBox = [x, y]
  318. this.endAverageBox = [x, y]
  319. this.activeComponent.componentContent.averageBoxData[x][y].hover = true
  320. this.activeComponent.componentContent.averageBoxData = this.activeComponent.componentContent.averageBoxData.concat([]) // 触发视图更新
  321. } else {
  322. const bx = this.beginAverageBox[0] // 起点X
  323. const by = this.beginAverageBox[1] // 起点Y
  324. // 使用最后一次合理经过的位置
  325. x = this.endAverageBox[0]
  326. y = this.endAverageBox[1]
  327. // 计算占用位置
  328. if (x >= bx) {
  329. for (let i = bx; i <= x; i++) {
  330. if (y >= by) {
  331. for (let j = by; j <= y; j++) {
  332. this.activeComponent.componentContent.averageBoxData[i][j].takeUp = true
  333. }
  334. } else {
  335. for (let j = y; j <= by; j++) {
  336. this.activeComponent.componentContent.averageBoxData[i][j].takeUp = true
  337. }
  338. }
  339. }
  340. } else {
  341. for (let i = x; i <= bx; i++) {
  342. if (y >= by) {
  343. for (let j = by; j <= y; j++) {
  344. this.activeComponent.componentContent.averageBoxData[i][j].takeUp = true
  345. }
  346. } else {
  347. for (let j = y; j <= by; j++) {
  348. this.activeComponent.componentContent.averageBoxData[i][j].takeUp = true
  349. }
  350. }
  351. }
  352. }
  353. // 生成图片框
  354. var obj = {
  355. src: '',
  356. linkObj: {
  357. selsectValue: '',
  358. selectName: '',
  359. typeText: '',
  360. url: ''
  361. }
  362. }
  363. if (x >= bx) {
  364. obj.width = x - bx + 1
  365. obj.left = bx
  366. } else {
  367. obj.width = bx - x + 1
  368. obj.left = x
  369. }
  370. const maxH = this.activeComponent.componentContent.maxH
  371. if (y >= by) {
  372. obj.height = y - by + 1
  373. obj.top = by
  374. if (y + 1 > maxH) {
  375. this.activeComponent.componentContent.maxH = y + 1
  376. }
  377. } else {
  378. obj.height = by - y + 1
  379. obj.top = y
  380. if (by + 1 > maxH) {
  381. this.activeComponent.componentContent.maxH = by + 1
  382. }
  383. }
  384. this.activeComponent.componentContent.imgData.push(JSON.parse(JSON.stringify(obj)))
  385. this.beginAverageBox = []
  386. }
  387. },
  388. // 自定义格子经过
  389. averageBoxMouseover (x, y) {
  390. if (this.beginAverageBox.length !== 0) {
  391. // 计算有没有经过有占用的位置
  392. let flag = this.isBoxTakeUp(x, y)
  393. if (!flag) {
  394. return false
  395. }
  396. // 每次经过洗白格子
  397. const bx = this.beginAverageBox[0] // 起点X
  398. const by = this.beginAverageBox[1] // 起点Y
  399. const densityVal = parseInt(this.activeComponent.componentContent.density)
  400. for (let i = 0; i < densityVal; i++) {
  401. for (let j = 0; j < densityVal; j++) {
  402. this.activeComponent.componentContent.averageBoxData[i][j].hover = false
  403. }
  404. }
  405. this.activeComponent.componentContent.averageBoxData[x][y].hover = true
  406. // 起终点中间位置激活
  407. if (x >= bx) {
  408. for (let i = bx; i <= x; i++) {
  409. if (y >= by) {
  410. for (let j = by; j <= y; j++) {
  411. this.activeComponent.componentContent.averageBoxData[i][j].hover = true
  412. }
  413. } else {
  414. for (let j = y; j <= by; j++) {
  415. this.activeComponent.componentContent.averageBoxData[i][j].hover = true
  416. }
  417. }
  418. }
  419. } else {
  420. for (let i = x; i <= bx; i++) {
  421. if (y >= by) {
  422. for (let j = by; j <= y; j++) {
  423. this.activeComponent.componentContent.averageBoxData[i][j].hover = true
  424. }
  425. } else {
  426. for (let j = y; j <= by; j++) {
  427. this.activeComponent.componentContent.averageBoxData[i][j].hover = true
  428. }
  429. }
  430. }
  431. }
  432. this.endAverageBox = [x, y] // 记录结束位置
  433. this.activeComponent.componentContent.averageBoxData = this.activeComponent.componentContent.averageBoxData.concat([]) // 触发视图更新
  434. }
  435. },
  436. // 计算有没有经过有占用的位置
  437. isBoxTakeUp (x, y) {
  438. if (this.beginAverageBox.length !== 0) {
  439. const bx = this.beginAverageBox[0] // 起点X
  440. const by = this.beginAverageBox[1] // 起点Y
  441. let flag = true
  442. if (x >= bx) {
  443. for (let i = bx; i <= x; i++) {
  444. if (y >= by) {
  445. for (let j = by; j <= y; j++) {
  446. if (this.activeComponent.componentContent.averageBoxData[i][j].takeUp) {
  447. flag = false
  448. break
  449. }
  450. }
  451. } else {
  452. for (let j = y; j <= by; j++) {
  453. if (this.activeComponent.componentContent.averageBoxData[i][j].takeUp) {
  454. flag = false
  455. break
  456. }
  457. }
  458. }
  459. }
  460. } else {
  461. for (let i = x; i <= bx; i++) {
  462. if (y >= by) {
  463. for (let j = by; j <= y; j++) {
  464. if (this.activeComponent.componentContent.averageBoxData[i][j].takeUp) {
  465. flag = false
  466. break
  467. }
  468. }
  469. } else {
  470. for (let j = y; j <= by; j++) {
  471. if (this.activeComponent.componentContent.averageBoxData[i][j].takeUp) {
  472. flag = false
  473. break
  474. }
  475. }
  476. }
  477. }
  478. }
  479. return flag
  480. }
  481. },
  482. // 移出盒子清空
  483. averageBoxLeave () {
  484. this.beginAverageBox = []
  485. this.endAverageBox = []
  486. const densityVal = parseInt(this.activeComponent.componentContent.density)
  487. for (let i = 0; i < densityVal; i++) {
  488. for (let j = 0; j < densityVal; j++) {
  489. this.activeComponent.componentContent.averageBoxData[i][j].hover = false
  490. }
  491. }
  492. },
  493. // 删除选中格子
  494. delsSlectedCube (item, index) {
  495. // 清除占用位置
  496. let bx = item.left
  497. let by = item.top
  498. let xl = item.width
  499. let yl = item.height
  500. for (let i = bx; i < bx + xl; i++) {
  501. for (let j = by; j < by + yl; j++) {
  502. this.activeComponent.componentContent.averageBoxData[i][j].takeUp = false
  503. }
  504. }
  505. this.activeComponent.componentContent.imgBoxActive = 0
  506. this.activeComponent.componentContent.imgData.splice(index, 1)
  507. // 重新计算最大高度
  508. const imgData = this.activeComponent.componentContent.imgData
  509. let maxH = 0
  510. for (let i = 0; i < imgData.length; i++) {
  511. if (imgData[i].top + imgData[i].height > maxH) {
  512. maxH = imgData[i].top + imgData[i].height
  513. }
  514. }
  515. this.activeComponent.componentContent.maxH = maxH
  516. }
  517. }
  518. }
  519. </script>
  520. <style lang="scss" scoped>
  521. .customTool {
  522. padding: 20px 20px 0 20px;
  523. h3 {
  524. font-size: 18px;
  525. font-weight: 500;
  526. height: 35px;
  527. line-height: 35px;
  528. color: #333333;
  529. margin-bottom: 20px;
  530. }
  531. .toolBox {
  532. .selectLayTit {
  533. margin-bottom: 20px;
  534. font-size: 14px;
  535. color: #333333;
  536. span {
  537. font-size: 14px;
  538. color: $mainColor;
  539. margin-left: 20px;
  540. }
  541. }
  542. .layoutList {
  543. display: flex;
  544. flex-direction: row;
  545. flex-wrap: wrap;
  546. margin-bottom: 30px;
  547. span {
  548. margin: -1px 0 0 -1px;
  549. flex: 0 0 15.9%;
  550. display: flex;
  551. align-items: center;
  552. justify-content: center;
  553. border: 1px solid #E8EAEC;
  554. color: #999999;
  555. font-size: 18px;
  556. text-align: center;
  557. height: 28px;
  558. cursor: pointer;
  559. position: relative;
  560. &.active,&:hover {
  561. color: $mainColor;
  562. &:after{
  563. content: '';
  564. width: 100%;
  565. height: 100%;
  566. border: 1px solid $mainColor;
  567. position: absolute;
  568. left: 0;
  569. top: 0;
  570. z-index: 2;
  571. }
  572. }
  573. }
  574. }
  575. padding-bottom: 10px;
  576. .flexStyle {
  577. display: flex;
  578. label {
  579. margin-right: 20px;
  580. }
  581. .block {
  582. flex: 1;
  583. }
  584. ::v-deep .el-slider__input {
  585. width: 50px;
  586. }
  587. ::v-deep .el-slider__runway {
  588. height: 4px;
  589. margin: 18px 65px 18px 0;
  590. }
  591. ::v-deep .el-slider__bar {
  592. height: 4px;
  593. }
  594. ::v-deep .el-slider__button-wrapper {
  595. top: -17px;
  596. }
  597. ::v-deep .el-slider__button {
  598. width: 12px;
  599. height: 12px;
  600. }
  601. ::v-deep .el-input-number.is-without-controls .el-input__inner {
  602. padding: 10px;
  603. }
  604. }
  605. .itemBox {
  606. width: 100%;
  607. label {
  608. font-size: 14px;
  609. color: #666666;
  610. height: 40px;
  611. line-height: 40px;
  612. }
  613. margin-bottom: 15px;
  614. p {
  615. font-size: 12px;
  616. color: #666666;
  617. }
  618. .layoutBox {
  619. margin-top: 20px;
  620. display: flex;
  621. .item {
  622. margin: -1px 0 0 -1px;
  623. flex: 0 0 50%;
  624. height: 125px;
  625. border: 1px solid #E8EAEC;
  626. box-sizing: border-box;
  627. display: flex;
  628. align-items: center;
  629. justify-content: center;
  630. cursor: pointer;
  631. position: relative;
  632. &:before {
  633. content: '600px';
  634. font-size: 12px;
  635. color: #666666;
  636. padding: 0 10px;
  637. text-align: center;
  638. }
  639. .img{
  640. position: absolute;
  641. width: 100%;
  642. height: 100%;
  643. left: 0;
  644. top: 0;
  645. }
  646. &.active {
  647. background: #FBF9F8;
  648. &:before {
  649. color: $mainColor;
  650. }
  651. &:after{
  652. content: '';
  653. width: 100%;
  654. height: 100%;
  655. border: 1px solid $mainColor;
  656. position: absolute;
  657. left: 0;
  658. top: 0;
  659. z-index: 2;
  660. }
  661. }
  662. }
  663. }
  664. .L1 {
  665. .item {
  666. flex: 0 0 100%;
  667. height: 93px;
  668. &:before {
  669. content: '1200px';
  670. }
  671. }
  672. }
  673. .L3 {
  674. .item {
  675. flex: 0 0 33.3%;
  676. height: 93px;
  677. &:before {
  678. content: '400px';
  679. }
  680. }
  681. }
  682. .L4 {
  683. .item {
  684. flex:0 0 25%;
  685. height: 71px;
  686. &:before {
  687. content: '300px';
  688. }
  689. }
  690. }
  691. .T2B2 {
  692. flex-wrap: wrap;
  693. .item {
  694. flex: 0 0 50%;
  695. height: 142px;
  696. &:before {
  697. content: '600x600px';
  698. }
  699. }
  700. }
  701. .L1R2 {
  702. flex-wrap: wrap;
  703. .item{
  704. &:before {
  705. content: '600x600px';
  706. }
  707. }
  708. .item:nth-child(1) {
  709. height: 284px;
  710. &:before {
  711. content: '600x1200px';
  712. }
  713. }
  714. .item:nth-child(3) {
  715. margin-left: 138px;
  716. margin-top: -143px;
  717. }
  718. }
  719. .T1B2 {
  720. flex-wrap: wrap;
  721. .item{
  722. &:before {
  723. content: '600x500px';
  724. }
  725. }
  726. .item:nth-child(1) {
  727. flex: 0 0 100%;
  728. &:before {
  729. content: '1200x500px';
  730. }
  731. }
  732. }
  733. .L1T1B2 {
  734. flex-wrap: wrap;
  735. .item{
  736. &:before {
  737. content: '300x300px';
  738. }
  739. }
  740. .item:nth-child(1) {
  741. &:before {
  742. content: '600x600px';
  743. }
  744. }
  745. .item:nth-child(2) {
  746. height: 72px;
  747. &:before {
  748. content: '600x300px';
  749. }
  750. }
  751. .item:nth-child(3) {
  752. flex: 0 0 25%;
  753. height: 72px;
  754. margin: -71px 0 0 138px;
  755. }
  756. .item:nth-child(4) {
  757. margin-top: -71px;
  758. flex: 0 0 25%;
  759. height: 72px;
  760. }
  761. }
  762. .average {
  763. flex-wrap: wrap;
  764. .item {
  765. flex: 0 0 33.33%;
  766. height: 93px;
  767. }
  768. }
  769. .addImgTit {
  770. margin-top: 20px;
  771. color: #FF3737;
  772. font-size: 12px;
  773. }
  774. .addImgBox {
  775. width: 100%;
  776. margin-top: 10px;
  777. box-sizing: border-box;
  778. position: relative;
  779. padding-bottom: 50px;
  780. .addImgBoxInner{
  781. background: #F6F7F9;
  782. display: flex;
  783. }
  784. .addImg {
  785. width: 60px;
  786. height: 60px;
  787. margin-right: 10px;
  788. ::v-deep .el-upload-dragger {
  789. width: 60px;
  790. height: 60px;
  791. text-align: center;
  792. .avatar{
  793. width: 100%;
  794. height: 100%;
  795. }
  796. i {
  797. margin-top: 10px;
  798. }
  799. .el-icon-plus:before {
  800. color: $mainColor;
  801. }
  802. span {
  803. display: block;
  804. font-size: 12px;
  805. color: $mainColor;
  806. }
  807. .tips{
  808. }
  809. }
  810. }
  811. .addLink {
  812. flex:1;
  813. ::v-deep .link-select{
  814. margin-bottom: 0;
  815. line-height: 60px;
  816. width: 100%;
  817. &__warp{
  818. display: flex;
  819. }
  820. .module-box__title{
  821. font-size: 12px;
  822. color: #333333;
  823. margin-bottom: 0;
  824. .module-box__label{
  825. line-height: 60px;
  826. }
  827. }
  828. &__select{
  829. flex: 1;
  830. .el-input__inner {
  831. border: none;
  832. background: none;
  833. font-size: 12px;
  834. color: $mainColor;
  835. }
  836. .el-input__inner::placeholder {
  837. color: $mainColor;
  838. }
  839. .el-icon-arrow-up:before {
  840. color: $mainColor;
  841. }
  842. }
  843. &__confirm{
  844. position: absolute;
  845. bottom: 0;
  846. left: 0;
  847. width: 100%;
  848. }
  849. }
  850. }
  851. }
  852. .averageBoxWarp{
  853. position: relative;
  854. }
  855. .averageBox{
  856. margin-top: 20px;
  857. display: flex;
  858. flex-wrap: wrap;
  859. ul{
  860. li{
  861. margin: -1px 0 0 -1px;
  862. border: 1px solid #E8EAEC;
  863. background-color: #f8f8f8;
  864. &.on{
  865. background-color: #fbbe73;
  866. }
  867. }
  868. &.col4{
  869. flex: 0 0 25%;
  870. li{
  871. height: 70px;
  872. }
  873. }
  874. &.col5{
  875. flex: 0 0 20%;
  876. li{
  877. height: 56px;
  878. }
  879. }
  880. &.col6{
  881. flex: 0 0 16.6%;
  882. li{
  883. height: 46px;
  884. }
  885. }
  886. &.col7{
  887. flex: 0 0 14.2%;
  888. li{
  889. height: 40px;
  890. }
  891. }
  892. &.col10{
  893. flex: 0 0 10%;
  894. li{
  895. height: 29px;
  896. }
  897. }
  898. }
  899. }
  900. .selectedCube{
  901. li{
  902. position: absolute;
  903. font-size: 12px;
  904. border: 1px solid #E8EAEC;
  905. background-color: #fff;
  906. z-index: 2;
  907. margin: -1px 0 0 -1px;
  908. box-sizing: content-box;
  909. .box{
  910. width: 100%;
  911. height: 100%;
  912. display: flex;
  913. justify-content: center;
  914. align-items: center;
  915. cursor: pointer;
  916. }
  917. span{
  918. /*transform: scale(0.9);*/
  919. /*white-space: nowrap;*/
  920. /*text-align: center;*/
  921. }
  922. .img{
  923. position: absolute;
  924. width: 100%;
  925. height: 100%;
  926. left: 0;
  927. top: 0;
  928. }
  929. .btn-close{
  930. position: absolute;
  931. top: -10px;
  932. right: -10px;
  933. z-index: 4;
  934. cursor: pointer;
  935. opacity: 0.6;
  936. font-size: 20px;
  937. display: none;
  938. }
  939. &.active {
  940. z-index: 3;
  941. background: #FBF9F8;
  942. &:hover{
  943. .btn-close{
  944. display: block;
  945. }
  946. }
  947. span {
  948. color: $mainColor;
  949. }
  950. &:after{
  951. content: '';
  952. width: 100%;
  953. height: 100%;
  954. border: 1px solid $mainColor;
  955. position: absolute;
  956. left: 0;
  957. top: 0;
  958. z-index: 2;
  959. }
  960. }
  961. }
  962. }
  963. }
  964. .textTit {
  965. height: 35px;
  966. line-height: 35px;
  967. font-size: 16px;
  968. color: #333333;
  969. margin-top: 30px;
  970. font-weight: bold;
  971. }
  972. }
  973. .densityLiist{
  974. display: flex;
  975. justify-content: space-between;
  976. dt{
  977. line-height: 40px;
  978. }
  979. }
  980. }
  981. .terminal1,.terminal2,.terminal3{
  982. &.customTool {
  983. .toolBox {
  984. .itemBox {
  985. .layoutBox {
  986. .item {
  987. &:before {
  988. content: '360px';
  989. }
  990. }
  991. }
  992. .L1 {
  993. .item {
  994. &:before {
  995. content: '720px';
  996. }
  997. }
  998. }
  999. .L3 {
  1000. .item {
  1001. &:before {
  1002. content: '240px';
  1003. }
  1004. }
  1005. }
  1006. .L4 {
  1007. .item {
  1008. &:before {
  1009. content: '180px';
  1010. }
  1011. }
  1012. }
  1013. .T2B2 {
  1014. .item {
  1015. &:before {
  1016. content: '360x360px';
  1017. }
  1018. }
  1019. }
  1020. .L1R2 {
  1021. .item{
  1022. &:before {
  1023. content: '360x360px';
  1024. }
  1025. }
  1026. .item:nth-child(1) {
  1027. &:before {
  1028. content: '360x720px';
  1029. }
  1030. }
  1031. }
  1032. .T1B2 {
  1033. .item{
  1034. &:before {
  1035. content: '360x360px';
  1036. }
  1037. }
  1038. .item:nth-child(1) {
  1039. &:before {
  1040. content: '720x360px';
  1041. }
  1042. }
  1043. }
  1044. .L1T1B2 {
  1045. .item{
  1046. &:before {
  1047. content: '180x180px';
  1048. }
  1049. }
  1050. .item:nth-child(1) {
  1051. &:before {
  1052. content: '360x360px';
  1053. }
  1054. }
  1055. .item:nth-child(2) {
  1056. &:before {
  1057. content: '360x180px';
  1058. }
  1059. }
  1060. }
  1061. }
  1062. }
  1063. }
  1064. }
  1065. </style>