多租户商城-商户端
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.

936 lines
26 KiB

  1. <template>
  2. <div>
  3. <el-dialog :close-on-click-modal="false" :title="title" :type="type" :visible.sync="isVisible"
  4. :modal-append-to-body="false" :center="true" width="80%" top="50px" class="dialog-wrap">
  5. <el-form ref="ruleForm" :model="params" class="canvas">
  6. <div class="mainContentWarp">
  7. <div class="mainContent">
  8. <div class="canvasContent" ref="canvasContent" :style="{ width: `${canvasWidth}px`, height: `${canvasHeight}px` }"
  9. @dragover.prevent @mousedown="laryerMouseDown" @mousemove="laryerMouseMove" @mouseup="laryerMouseUp"
  10. @drop="handleDrap" v-if="params.interactionDiagramImage">
  11. <img class="img-bg" ref="canvasBgContent" :src="params.interactionDiagramImage" />
  12. <div class="drap-container-item" v-for="(point, index) in pointList" :key="index"
  13. :style="{ top: `${canvasHeight * point.pointY}px`, left: `${canvasWidth * point.pointX}px` }"
  14. @mousedown.stop="handleMouseDown($event, point, index)" @click="handleClick(point, index)">
  15. <div :class="showPoint == point ? 'point_source_active' : 'point_source'" />
  16. <!-- :class="[point.pointX < 0.2 ? 'product-detail-right' : (point.pointX > 0.8 ? 'product-detail-left' : 'product-detail-centerv'),
  17. point.pointY > 0.8 ? 'product-detail-top' : 'product-detail-bottom']" -->
  18. <div class="product-detail"
  19. v-if="showPoint == point && (point.product && point.product.productName)">
  20. <div class="product-name">{{ (point.product && point.product.productName) ? point.product.productName : '' }}</div>
  21. <div class="product-price">{{ (point.product && point.product.price) ? point.product.price : '' }}</div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="RightBox">
  28. <div slot="footer" class="btn-wrap">
  29. <el-button type="primary" @click="onSubmit">{{ $t('common.save') }}</el-button>
  30. <!-- <el-button @click="isVisible = false">{{ $t('common.cancel') }}</el-button> -->
  31. </div>
  32. <el-form-item label="平台类型" hidden>
  33. <el-radio-group v-model="params.terminal">
  34. <el-radio :disabled="isDisabled" :label="1">小程序</el-radio>
  35. <el-radio :disabled="isDisabled" :label="2">H5</el-radio>
  36. <el-radio :disabled="isDisabled" :label="3">APP</el-radio>
  37. <el-radio :disabled="isDisabled" :label="4">PC</el-radio>
  38. </el-radio-group>
  39. </el-form-item>
  40. <el-form-item label="互动图名称">
  41. <el-input v-model="params.interactionDiagramName" maxlength="20" :readonly="isDisabled"
  42. onblur="value=value.replace(/(^\s*)|(\s*$)/g, '')" />
  43. </el-form-item>
  44. <el-form-item style="margin-bottom: 5px;margin-top:5px" label="互动图背景">
  45. </el-form-item>
  46. <div class="span-wrap">
  47. <el-upload list-type="picture-card" :show-file-list="false" :on-remove="handleRemove" :headers="headers"
  48. :data="dataObj" :multiple="false" :on-success="handleImageSuccess" :action="action" :auto-upload="true"
  49. :before-upload="beforeUpload">
  50. <i v-if="!params.interactionDiagramImage" slot="trigger" class="el-icon-plus" />
  51. <div v-else class="attr-value-img">
  52. <img class="attr-thumbnail" :src="params.interactionDiagramImage">
  53. </div>
  54. </el-upload>
  55. <div v-if="params.interactionDiagramImage" class="attr-actions">
  56. <span class="attr-delete" @click="handleRemove()">
  57. <i class="el-icon-delete" />
  58. </span>
  59. </div>
  60. </div>
  61. <!-- <el-button type="primary" @click="onSubmit">拖动添加互动点</el-button> -->
  62. <el-form-item style="margin-bottom: 5px;margin-top:5px" label="拖动添加互动点">
  63. </el-form-item>
  64. <div class="point_source" @dragstart="handleDrapEvList($event, newPoint)" @dragover.prevent draggable="true"/>
  65. <el-form-item style="margin-bottom: 5px;margin-top:5px" label="互动点信息">
  66. </el-form-item>
  67. <div class="product-list">
  68. <div class="list-group-item" v-for="(point, index) in pointList" :key="index">
  69. <div class="item-index">
  70. {{ (index + 1) }}.
  71. </div>
  72. <div class="item-right">
  73. <div class="item-btns">
  74. <div class="item-btn-item" @click="selectProduct(point, index)">
  75. 设置商品
  76. </div>
  77. <div class="item-btn-item" @click="delComponent(point, index)">
  78. 删除
  79. </div>
  80. </div>
  81. <div class="item-product">
  82. {{ (point.product && point.product.productName) ? point.product.productName : '未设置商品' }}
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </el-form>
  89. </el-dialog>
  90. <el-dialog title="选择商品" :visible.sync="productVisible" width="70%" top="50px">
  91. <product-select ref="productSelect"></product-select>
  92. <span slot="footer" class="dialog-footer">
  93. <el-button @click="productVisible = false">{{ $t('common.cancel') }}</el-button>
  94. <el-button type="primary" @click="productChanged">{{ $t('common.sure') }}</el-button>
  95. </span>
  96. </el-dialog>
  97. </div>
  98. </template>
  99. <script>
  100. import { interactionDiagramGetById, interactionDiagramAdd, interactionDiagramUpdate } from '@/api/image'
  101. import { uploadUrl } from '@/utils/request'
  102. import { getToken } from '@/utils/auth'
  103. import ProductSelect from '@/components/Product/product-select'
  104. import draggable from 'vuedraggable'
  105. export default {
  106. components: {
  107. draggable,
  108. ProductSelect
  109. },
  110. props: {
  111. dialogVisible: {
  112. type: Boolean,
  113. default: false
  114. },
  115. type: {
  116. type: String,
  117. default: 'add'
  118. }
  119. },
  120. data() {
  121. return {
  122. params: {
  123. interactionDiagramId: 0,
  124. interactionDiagramName: '',
  125. interactionDiagramImage: '',
  126. imageWidth: 0,
  127. imageHeight: 0,//新增的都是采购入库单
  128. pointData: '',
  129. terminal: 1
  130. },
  131. newPoint: {
  132. type: 1,
  133. data: '',
  134. pointX: 0,
  135. pointY: 0,
  136. },
  137. dropPoint: {},
  138. showPoint: {},
  139. selectPoint: null,
  140. //上次点击点位置
  141. lastClickPoint: {},
  142. interactionDiagramId: null,
  143. pointList: [],
  144. canvasWidth: 0,
  145. canvasHeight: 0,
  146. productVisible : false,
  147. action: uploadUrl,
  148. headers: {
  149. 'Authorization-business': getToken()
  150. },
  151. dataObj: {
  152. folderId: 1
  153. }
  154. }
  155. },
  156. computed: {
  157. isVisible: {
  158. get() {
  159. return this.dialogVisible
  160. },
  161. set() {
  162. this.close()
  163. this.reset()
  164. }
  165. },
  166. isDisabled() {
  167. return this.type === 'check'
  168. },
  169. title() {
  170. const titleMap = {
  171. add: '新建互动图',
  172. check: '查看互动图',
  173. edit: '修改互动图'
  174. }
  175. return titleMap[this.type]
  176. }
  177. },
  178. mounted() {
  179. // this.getStorehouseList();
  180. },
  181. methods: {
  182. // 获取仓库
  183. // async getStorehouseList() {
  184. // const res = await storehouseGetList({})
  185. // this.storehouseList = res.data
  186. // if(this.storehouseList && this.storehouseList.length > 0){
  187. // this.params.storehouseId = this.storehouseList[0].storehouseId
  188. // this.params.storehouseName = this.storehouseList[0].storehouseName
  189. // this.getProductList();
  190. // }
  191. // },
  192. // // 获取商品
  193. // async getProductList() {
  194. // const res = await getClassifyGetList({ storehouseId: this.params.storehouseId})
  195. // this.productList = res.data
  196. // if(this.productList && this.productList.length > 0){
  197. // this.params.productId = this.productList[0].productId
  198. // this.params.productName = this.productList[0].productName
  199. // this.getSkuList();
  200. // }
  201. // },
  202. // async getSkuList() {
  203. // const res = await getClassifyGetById({ productId: this.params.productId})
  204. // this.skuList = res.data.skus
  205. // if(this.skuList && this.skuList.length > 0){
  206. // this.params.skuId = this.skuList[0].skuId
  207. // this.params.skuName = this.skuList[0].skuName
  208. // if(this.skuList[0].skuAttrCodeDTOList.length > 0){
  209. // //多款式
  210. // this.isSkuVisible = 1
  211. // }else{
  212. // this.isSkuVisible = 0
  213. // }
  214. // }
  215. // },
  216. // async changeStorehouseValue(){
  217. // this.getProductList();
  218. // },
  219. // async changeProductValue(){
  220. // this.getSkuList();
  221. // },
  222. handleImageSuccess(response, file, fileList) {
  223. console.log('handleImageSuccess')
  224. this.params.interactionDiagramImage = response.data.url
  225. this.pointList = []
  226. this.params.pointData = ''
  227. },
  228. handleRemove(file) {
  229. this.params.interactionDiagramImage = ''
  230. },
  231. beforeUpload(file) {
  232. if (file) {
  233. function getFileData(file) {
  234. return new Promise(function (resolve, reject) {
  235. let reader = new FileReader()
  236. reader.readAsDataURL(file);
  237. reader.onload = function (event) {
  238. resolve(reader.result)
  239. }
  240. })
  241. }
  242. function getImage(result) {
  243. return new Promise(function (resolve, reject) {
  244. let img = new Image();
  245. img.src = result;
  246. img.onload = function () { //注意只有onload以后才可以拿到图片信息
  247. resolve({
  248. width: img.width,
  249. height: img.height
  250. })
  251. }
  252. })
  253. }
  254. return getFileData(file).then(res => {
  255. getImage(res).then(r => {
  256. this.params.imageWidth = r.width
  257. this.params.imageHeight = r.height
  258. console.log(this.params.imageHeight, this.params.imageWidth, 'afterFileWidth')
  259. //控件宽高
  260. // const canvasContent = this.$refs.canvasContent;
  261. // const position = canvasContent.getBoundingClientRect();
  262. const position = {
  263. height: 650,
  264. width: 900
  265. }
  266. // 图片的原始宽度
  267. var naturalWidth = this.params.imageWidth;
  268. var naturalHeight = this.params.imageHeight;
  269. //计算图片显示宽高
  270. var showHeight = position.height;
  271. var showWidth = naturalWidth * showHeight / naturalHeight;
  272. if (showWidth > position.width) {
  273. showWidth = position.width;
  274. showHeight = naturalHeight * showWidth / naturalWidth;
  275. }
  276. this.canvasWidth = showWidth;
  277. this.canvasHeight = showHeight;
  278. })
  279. })
  280. }
  281. },
  282. // 点击画布的时候, 取消选择组件
  283. laryerMouseDown(ev) {
  284. console.log("laryerMouseDown");
  285. // this.curControl = null;
  286. },
  287. // 给画布绑定的mousemove事件
  288. laryerMouseMove(ev) {
  289. console.log("laryerMouseMove");
  290. // 判断是需要移动的类型
  291. // if (this.flag == "move") {
  292. // // 用当前移动的距离减去点击的位置
  293. // let dx = ev.pageX - this.containerMoveObj.x,
  294. // dy = ev.pageY - this.containerMoveObj.y;
  295. // // 上次旧的位置加上 处理完的距离就得到当前位置
  296. // this.curControl.pointX = this.curControl.pointX + dx / this.canvasWidth,
  297. // this.curControl.pointY = this.curControl.pointY + dy / this.canvasHeight;
  298. // // 记录下当前点击的位置
  299. // this.containerMoveObj.x = ev.pageX;
  300. // this.containerMoveObj.y = ev.pageY;
  301. // }
  302. },
  303. // 给画布绑定的mouseup事件
  304. laryerMouseUp(ev) {
  305. console.log("laryerMouseUp");
  306. //在鼠标抬起的时候判断是否
  307. // if (this.flag == "") {
  308. // return false;
  309. // }
  310. // 用当前移动的距离减去点击的位置
  311. // let dx = ev.pageX - this.containerMoveObj.x,
  312. // dy = ev.pageY - this.containerMoveObj.y;
  313. // // 上次旧的位置加上 处理完的距离就得到当前位置
  314. // this.curControl.pointX = this.curControl.pointX + dx / this.canvasWidth,
  315. // this.curControl.pointY = this.curControl.pointY + dy / this.canvasHeight;
  316. // // 记录下当前点击的位置
  317. // this.containerMoveObj.x = ev.pageX;
  318. // this.containerMoveObj.y = ev.pageY;
  319. // this.flag = "";
  320. },
  321. // 点击元素获取组件配置
  322. handleClick(row, index) {
  323. console.log("handleClick");
  324. if(this.showPoint == row){
  325. this.showPoint = null
  326. }else{
  327. this.showPoint = row
  328. }
  329. },
  330. // 移动元素
  331. handleMouseDown(e, row, index) {
  332. console.log("handleMouseDown");
  333. e = e || window.event;
  334. this.dropPoint = row;
  335. // 记录下当前点击的位置
  336. this.lastClickPoint.pointX = e.offsetX;
  337. this.lastClickPoint.pointY = e.offsetY;
  338. },
  339. handleDrapEvList(e, pointData) {
  340. console.log("handleDrapEvList")
  341. this.lastClickPoint.pointX = e.offsetX;
  342. this.lastClickPoint.pointY = e.offsetY;
  343. },
  344. // 监听拖拽元素结束
  345. handleDrap(event) {
  346. console.log("handleDrap")
  347. event.preventDefault();
  348. event = event || window.event;
  349. // console.log("event.offsetX:" + event.offsetX)
  350. // console.log("event.offsetY:" + event.offsetY)
  351. // console.log("event.pageX:" + event.pageX)
  352. // console.log("event.pageY:" + event.pageY)
  353. const canvasContent = this.$refs.canvasContent;
  354. const position = canvasContent.getBoundingClientRect();
  355. // console.log('canvasContent')
  356. // 获取绑定到拖拽元素身上的 drapData属性
  357. if (this.lastClickPoint.pointX != null) {
  358. var showX = event.pageX - position.left - this.lastClickPoint.pointX;
  359. var showY = event.pageY - position.top - this.lastClickPoint.pointY;
  360. var pointX = showX / this.canvasWidth;
  361. var pointY = showY / this.canvasHeight;
  362. if (this.dropPoint != null) {
  363. this.dropPoint.pointX = pointX
  364. this.dropPoint.pointY = pointY
  365. this.dropPoint = null
  366. } else {
  367. var point = {
  368. type: 1,
  369. data: '',
  370. pointX: pointX,
  371. pointY: pointY
  372. }
  373. this.pointList.push(point);
  374. }
  375. }
  376. },
  377. close() {
  378. this.$emit('close')
  379. },
  380. async reset() {
  381. this.params = {
  382. interactionDiagramId: 0,
  383. interactionDiagramName: '',
  384. interactionDiagramImage: '',
  385. imageWidth: 0,
  386. imageHeight: 0,//新增的都是采购入库单
  387. pointData: '',
  388. terminal: 1
  389. }
  390. this.pointList = []
  391. // if(this.storehouseList && this.storehouseList.length > 0){
  392. // this.params.storehouseId = this.storehouseList[0].storehouseId
  393. // this.params.storehouseName = this.storehouseList[0].storehouseName
  394. // this.getProductList();
  395. // }
  396. },
  397. // 查看详情
  398. async getDetails() {
  399. const res = await interactionDiagramGetById({ interactionDiagramId: this.interactionDiagramId })
  400. if (res.code === '') {
  401. this.params = res.data
  402. // //控件宽高
  403. // const canvasContent = this.$refs.canvasContent;
  404. // console.log('canvasContent')
  405. // const position = canvasContent.getBoundingClientRect();
  406. const position = {
  407. height: 650,
  408. width: 900
  409. }
  410. // 图片的原始宽度
  411. var naturalWidth = this.params.imageWidth;
  412. var naturalHeight = this.params.imageHeight;
  413. //计算图片显示宽高
  414. var showHeight = position.height;
  415. var showWidth = naturalWidth * showHeight / naturalHeight;
  416. if (showWidth > position.width) {
  417. showWidth = position.width;
  418. showHeight = naturalHeight * showWidth / naturalWidth;
  419. }
  420. this.canvasWidth = showWidth;
  421. this.canvasHeight = showHeight;
  422. if (this.params.pointData) {
  423. this.pointList = JSON.parse(this.params.pointData);
  424. }
  425. }
  426. },
  427. async onSubmit() {
  428. if (this.params.interactionDiagramName === '') {
  429. this.$message.error('请输入互动图名称')
  430. } else if (this.type === 'add') {
  431. this.params.pointData = JSON.stringify(this.pointList)
  432. this.add()
  433. } else if (this.type === 'edit') {
  434. this.params.pointData = JSON.stringify(this.pointList)
  435. this.update()
  436. } else {
  437. this.isVisible = false
  438. }
  439. },
  440. async add() {
  441. const res = await interactionDiagramAdd(this.params)
  442. if (res.code === '' || res.code === '200') {
  443. this.isVisible = false
  444. this.$message({
  445. message: this.$t('common.addsuccessful'),
  446. type: 'success'
  447. })
  448. this.$emit('success')
  449. }
  450. },
  451. async update() {
  452. const res = await interactionDiagramUpdate(this.params)
  453. if (res.code === '' || res.code === '200') {
  454. this.isVisible = false
  455. this.$message({
  456. message: this.$t('common.successful'),
  457. type: 'success'
  458. });
  459. this.$emit('success')
  460. }
  461. },
  462. setParams(val = {}) {
  463. if (val['params']) {
  464. this.params = val['params']
  465. this.interactionDiagramId = this.params.interactionDiagramId
  466. this.getDetails()
  467. } else if (val['interactionDiagramId']) {
  468. this.interactionDiagramId = val['interactionDiagramId']
  469. this.getDetails()
  470. }
  471. },
  472. selectProduct(row, index){
  473. this.selectPoint = row
  474. if(this.$refs.productSelect){
  475. this.$refs.productSelect.reset()
  476. }
  477. this.productVisible = true
  478. },
  479. productChanged () {
  480. console.log(this.$refs.productSelect)
  481. var data = this.$refs.productSelect.tableRadio
  482. this.productVisible = false
  483. if(this.selectPoint != null){
  484. this.selectPoint.product = data
  485. this.selectPoint = null
  486. }
  487. },
  488. }
  489. }
  490. </script>
  491. <style lang="scss" scoped>
  492. .el-form-item {
  493. margin-bottom: 0px !important;
  494. }
  495. ::v-deep .el-form-item__label{
  496. line-height: 30px !important;
  497. }
  498. .point_source_active{
  499. align-items: center;
  500. background: hsla(0,0%,47%,.5);
  501. border: 2px solid transparent;
  502. border-radius: 50%;
  503. display: flex;
  504. height: 32px;
  505. justify-content: center;
  506. opacity: 1;
  507. padding: 0;
  508. transition: border-color .25s ease-in-out,opacity .25s ease-in-out,visibility .25s ease-in-out;
  509. width: 32px;
  510. &:after {
  511. background: #fff;
  512. border-radius: 50%;
  513. box-shadow: 0 1px 4px #0000008c;
  514. content: "";
  515. display: block;
  516. height: 12px;
  517. position: relative;
  518. transition: transform .25s ease-in-out;
  519. width: 12px;
  520. transform: scale(.667);
  521. }
  522. }
  523. .point_source {
  524. align-items: center;
  525. background: hsla(0,0%,47%,.5);
  526. border: 2px solid transparent;
  527. border-radius: 50%;
  528. display: flex;
  529. height: 32px;
  530. justify-content: center;
  531. opacity: 1;
  532. padding: 0;
  533. transition: border-color .25s ease-in-out,opacity .25s ease-in-out,visibility .25s ease-in-out;
  534. width: 32px;
  535. &:after {
  536. background: #fff;
  537. border-radius: 50%;
  538. box-shadow: 0 1px 4px #0000008c;
  539. content: "";
  540. display: block;
  541. height: 12px;
  542. position: relative;
  543. transition: transform .25s ease-in-out;
  544. width: 12px;
  545. }
  546. }
  547. .span-wrap {
  548. position: relative;
  549. display: inline-block;
  550. .attr-actions {
  551. line-height: 120px;
  552. position: absolute;
  553. width: 100%;
  554. height: 100%;
  555. left: 0;
  556. top: 0;
  557. cursor: default;
  558. text-align: center;
  559. color: #fff;
  560. opacity: 0;
  561. font-size: 20px;
  562. background-color: rgba(0, 0, 0, 0.5);
  563. -webkit-transition: opacity 0.3s;
  564. transition: opacity 0.3s;
  565. z-index: 1;
  566. &:hover {
  567. opacity: 1;
  568. .attr-preview {
  569. display: inline-block;
  570. }
  571. i {
  572. color: #fff;
  573. font-size: 20px;
  574. }
  575. }
  576. }
  577. .attr-preview {
  578. display: none;
  579. cursor: pointer;
  580. font-size: 20px;
  581. color: #fff;
  582. }
  583. .attr-delete {
  584. margin-left: 15px;
  585. color: #fff;
  586. }
  587. .attr-value-img {
  588. width: 100%;
  589. height: 100%;
  590. img {
  591. width: 100%;
  592. height: 100%;
  593. object-fit: contain;
  594. }
  595. }
  596. }
  597. .dialog-wrap {
  598. ::v-deep .el-dialog {
  599. display: flex;
  600. flex-direction: column;
  601. height: 90vh;
  602. max-width: 1400px;
  603. overflow: hidden;
  604. .el-dialog__body {
  605. flex: 1;
  606. overflow: auto;
  607. }
  608. }
  609. .dialog-from {
  610. width: 90%;
  611. margin: auto;
  612. }
  613. .btn-wrap {
  614. margin: 0px auto 10px;
  615. text-align: right;
  616. }
  617. .canvas {
  618. display: flex;
  619. flex-direction: row;
  620. flex-wrap: nowrap;
  621. align-content: flex-start;
  622. justify-content: center;
  623. align-items: flex-start;
  624. .mainContentWarp {
  625. background-color: #F0F3F4;
  626. height: 100%;
  627. flex: 1;
  628. .mainContent {
  629. margin: 0 auto;
  630. width: 900px;
  631. height: 650px;
  632. display: flex;
  633. flex-direction: row;
  634. flex-wrap: nowrap;
  635. align-content: center;
  636. justify-content: center;
  637. align-items: center;
  638. .canvasContent {
  639. width: 100%;
  640. height: 100%;
  641. position: relative;
  642. .img-bg {
  643. width: 100%;
  644. height: 100%;
  645. object-fit: contain;
  646. }
  647. .drap-container-item {
  648. -webkit-user-select: none;
  649. -moz-user-select: none;
  650. -o-user-select: none;
  651. user-select: none;
  652. position: absolute;
  653. user-select: none;
  654. cursor: pointer;
  655. border: 1px solid transparent;
  656. .drap-item-img {
  657. width: 40px;
  658. height: 40px;
  659. object-fit: contain;
  660. }
  661. .drap-item-name {
  662. text-align: center;
  663. }
  664. .product-detail-top{
  665. position: relative;
  666. top: -100px;
  667. }
  668. .product-detail-bottom{
  669. }
  670. .product-detail-left{
  671. position: relative;
  672. left: -100px;
  673. }
  674. .product-detail-right{
  675. }
  676. .product-detail-centerv{
  677. margin-top: -25%;
  678. margin-bottom: 25%;
  679. }
  680. .product-detail-centerh{
  681. margin-left: -25%;
  682. margin-right: 25%;
  683. }
  684. .product-detail{
  685. display: flex;
  686. flex-direction: column;
  687. flex-wrap: nowrap;
  688. align-content: flex-start;
  689. justify-content: center;
  690. align-items: flex-start;
  691. background: white;
  692. padding-left: 10px;
  693. padding-right: 10px;
  694. padding-top: 8px;
  695. padding-bottom: 8px;
  696. border-radius: 4px;
  697. margin-left: -25%;
  698. margin-right: 25%;
  699. .product-name{
  700. width: 100%;
  701. height: auto;
  702. font-size: 16px;
  703. font-family: Source Han Sans CN;
  704. font-weight: bold;
  705. color: #252744;
  706. display: block;
  707. overflow: hidden;
  708. text-overflow: ellipsis;
  709. white-space: nowrap;
  710. line-height: 20px;
  711. text-align: left;
  712. }
  713. .product-price{
  714. width: auto;
  715. height: 20px;
  716. line-height: 20px;
  717. font-size: 14px;
  718. font-family: Source Han Sans CN;
  719. font-weight: bold;
  720. color: #252744;
  721. }
  722. }
  723. }
  724. .drap-container-item-active {
  725. border: 1px solid skyblue;
  726. }
  727. }
  728. }
  729. }
  730. .RightBox {
  731. background-color: #FFFFFF;
  732. height: 100%;
  733. overflow: auto;
  734. margin-left: 20px;
  735. .noChoose {
  736. width: 320px;
  737. display: flex;
  738. height: 100%;
  739. -webkit-box-align: center;
  740. align-items: center;
  741. -webkit-box-pack: center;
  742. justify-content: center;
  743. color: #999;
  744. text-align: center;
  745. font-size: 16px;
  746. line-height: 1.8;
  747. .iconfont {
  748. font-size: 100px;
  749. color: $mainColor;
  750. }
  751. }
  752. }
  753. }
  754. .form-item-row {
  755. // padding-top: 40px;
  756. ::v-deep .el-input {
  757. width: 80px;
  758. margin: 0 5px;
  759. }
  760. }
  761. }
  762. .product-list {
  763. height: 280px;
  764. overflow-y: auto;
  765. &::-webkit-scrollbar-track-piece {
  766. background: #d3dce6;
  767. }
  768. &::-webkit-scrollbar {
  769. width: 6px;
  770. }
  771. &::-webkit-scrollbar-thumb {
  772. background: #99a9bf;
  773. border-radius: 20px;
  774. }
  775. .list-group-item {
  776. display: flex;
  777. -webkit-box-orient: horizontal;
  778. -webkit-box-direction: normal;
  779. -ms-flex-direction: row;
  780. flex-direction: row;
  781. -ms-flex-wrap: nowrap;
  782. flex-wrap: nowrap;
  783. -ms-flex-line-pack: center;
  784. align-content: flex-start;
  785. -webkit-box-pack: start;
  786. -ms-flex-pack: start;
  787. justify-content: flex-start;
  788. -webkit-box-align: center;
  789. -ms-flex-align: center;
  790. align-items: flex-start;
  791. margin-bottom: 15px;
  792. .item-index {
  793. margin-right: 8px;
  794. margin-top: 8px;
  795. font-size: 16px;
  796. }
  797. .item-right {
  798. display: flex;
  799. flex-direction: column;
  800. flex-wrap: nowrap;
  801. align-content: center;
  802. justify-content: flex-start;
  803. align-items: flex-start;
  804. .item-btns {
  805. display: flex;
  806. flex-direction: row;
  807. flex-wrap: nowrap;
  808. align-content: center;
  809. justify-content: center;
  810. align-items: center;
  811. .item-btn-item {
  812. border-radius: 4px;
  813. background: $mainColor;
  814. text-align: center;
  815. height: 36px;
  816. color: #ffffff;
  817. font-size: 14px;
  818. display: flex;
  819. align-items: center;
  820. justify-content: center;
  821. cursor: pointer;
  822. margin-bottom: 10px;
  823. margin-left: 2px;
  824. margin-right: 2px;
  825. padding-left: 8px;
  826. padding-right: 8px;
  827. span {
  828. font-size: 18px;
  829. color: #ffffff;
  830. margin-right: 5px;
  831. }
  832. }
  833. }
  834. .item-product {}
  835. }
  836. }
  837. }
  838. </style>