seatManagementTable.vue 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414
  1. <template>
  2. <div class="sm">
  3. <div class="sm-box-top-tool">
  4. <div style="display: flex;align-items: center;">
  5. <span style="margin-right: 5px;font-size: 14px;">放大/缩小:</span>
  6. <div style="width: 100px;">
  7. <el-slider input-size="mini" v-model="whNum" :min="16" :max="100"></el-slider>
  8. </div>
  9. </div>
  10. <div class="sm-box-top-tool-legend">
  11. <div
  12. :key="item.id"
  13. v-for="(item,index) in seatTypeList"
  14. >
  15. <span :style="{backgroundColor: item.color}"></span>
  16. <span :style="{color: item.color}">{{ item.name }}</span>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="sm-box">
  21. <div class="sm-scroll-box">
  22. <el-table
  23. v-dragSelect="{
  24. selectClass: ['.row-item'],
  25. change: dragSelectChange,
  26. lostItem: dragLostItemChange,
  27. reSelect: reSelect
  28. }"
  29. :data="tableData"
  30. width="100%"
  31. height="100%"
  32. ref="table"
  33. row-key="id"
  34. class="exchange_table"
  35. :style="{
  36. '--row-scale': whNum/100,
  37. '--row-w': (width*(whNum/100))+'px',
  38. '--row-h': (width*(whNum/100))+'px',
  39. '--row-w-i': width+'px',
  40. '--row-h-i': height+'px',
  41. }"
  42. :data-source="ranking_goods"
  43. :cell-class-name="tableCellClassName"
  44. @cell-dblclick="cellDblclick"
  45. >
  46. <el-table-column
  47. type="index"
  48. fixed=left
  49. label="#"
  50. align="center"
  51. v-if="tableHeader.length!=0"
  52. :width="50">
  53. <template slot-scope="scope">
  54. <span>{{ scope.$index + 1 }}#</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column
  58. v-for="(item,index) in tableHeader"
  59. :prop="item.key"
  60. :label="item.title"
  61. :width="((width*(whNum/100)+7.5)*item.length)+'px'"
  62. align="center"
  63. >
  64. <template slot-scope="scope">
  65. <div class="row-item-box" :style='{display: "flex",flexWrap: "nowrap",justifyContent: item.align}'>
  66. <div
  67. class="row-item"
  68. v-for="(item1,index1) in scope.row[item.key]"
  69. :key="item1.styleCss.id"
  70. dragSelectType="div"
  71. :dragSelectId="item1.styleCss.id"
  72. :style="{backgroundColor: item1.delFlag !=0?'#ccc':item1.color}"
  73. >
  74. <div>
  75. <i style="line-height: 15px;">{{ item1.columnNo }}</i>
  76. <i style="line-height: 15px;">{{ item1.name }}</i>
  77. <i style="line-height: 15px;white-space: nowrap;">{{ item1.styleCss && item1.styleCss.sort }}</i>
  78. </div>
  79. </div>
  80. </div>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. </div>
  85. <!-- 编辑页 -->
  86. <div class="table-tool">
  87. <div class="table-tool-tab">
  88. <el-tabs
  89. v-model="activeName"
  90. @tab-click="handleClickTab">
  91. <el-tab-pane label="创建区域" name="first"></el-tab-pane>
  92. <el-tab-pane label="座位管理" name="second"></el-tab-pane>
  93. <el-tab-pane label="批量处理" name="batch"></el-tab-pane>
  94. </el-tabs>
  95. </div>
  96. <!-- 创建区域 -->
  97. <div
  98. v-if="activeName == 'first'"
  99. class="qu-first-box">
  100. <div class="qu-first-form">
  101. <el-form :model="ruleForm" size="mini" :rules="rules" ref="ruleFormRegion" label-width="110px" class="demo-ruleForm">
  102. <el-form-item label="座位总排数">
  103. <el-input v-model="rowAll">
  104. <el-button slot="append" @click="createTableList">创建排数</el-button>
  105. </el-input>
  106. </el-form-item><el-form-item label="单排最大座位数">
  107. <span>{{ colsAll }}</span>
  108. </el-form-item>
  109. <el-form-item label="区域名称" prop="name">
  110. <el-input v-model="ruleForm.name"></el-input>
  111. </el-form-item>
  112. <el-form-item label="座位排列" prop="region">
  113. <el-select v-model="ruleForm.region" placeholder="请选择座位排练">
  114. <el-option label="靠左" value="flex-start"></el-option>
  115. <el-option label="居中" value="center"></el-option>
  116. <el-option label="靠右" value="flex-end"></el-option>
  117. </el-select>
  118. </el-form-item>
  119. <el-form-item>
  120. <el-button size="mini" type="primary" @click="submitForm('ruleFormRegion')">创建区域</el-button>
  121. <el-button size="mini" @click="resetForm('ruleFormRegion')">重置</el-button>
  122. </el-form-item>
  123. </el-form>
  124. </div>
  125. <div class="qu-first-info">
  126. <div class="qu-first-info-title">
  127. <span>已创建的区域</span>
  128. <span>(注:从左至右排序如下)</span>
  129. </div>
  130. <div class="qu-first-info-list">
  131. <transition-group>
  132. <div
  133. class="qu-first-info-item"
  134. v-for="(item,index) in tableHeader"
  135. :key="index"
  136. v-dragging="{item: item, list:tableHeader}"
  137. >
  138. <span>{{ item.title }}</span>
  139. <div>
  140. <span @click="editTableHeader(item,index)">编辑</span>
  141. <span @click="delTableHeader(item,index)">删除</span>
  142. </div>
  143. </div>
  144. </transition-group>
  145. </div>
  146. </div>
  147. </div>
  148. <!-- 座位管理 -->
  149. <div v-if="activeName == 'second'" class="qu-second-box">
  150. <div class="qu-second-select">
  151. <span>当前选择的是:</span>
  152. <span v-if="currentRow">{{ currentRow }}排</span>
  153. <span v-if="currentRow">--</span>
  154. <span v-if="currentLabel">{{ currentLabel }}区</span>
  155. </div>
  156. <div class="qu-second-form">
  157. <el-form :model="ruleForm1" size="mini" :rules="rules1" ref="ruleForm1" label-width="80px" class="demo-ruleForm">
  158. <el-form-item label="创建方式" prop="resource">
  159. <el-radio-group v-model="ruleForm1.resource">
  160. <el-radio :label="1">单个</el-radio>
  161. <el-radio :label="2">批量</el-radio>
  162. </el-radio-group>
  163. </el-form-item>
  164. <el-form-item label="座位号" prop="seatParity">
  165. <el-radio-group v-model="ruleForm1.seatParity">
  166. <el-radio :label="1">奇偶列</el-radio>
  167. <el-radio :label="2">奇数列</el-radio>
  168. <el-radio :label="3">偶数列</el-radio>
  169. </el-radio-group>
  170. </el-form-item>
  171. <el-form-item label="座位类型" prop="seatTypeId">
  172. <el-select
  173. v-model="ruleForm1.seatTypeId"
  174. placeholder="请选择座位类型">
  175. <el-option
  176. v-for="(item,index) in seatTypeList"
  177. :key="item.id"
  178. :label="item.name"
  179. :value="item.id"></el-option>
  180. </el-select>
  181. </el-form-item>
  182. <el-form-item label="座位名称" prop="name">
  183. <el-input v-model="ruleForm1.name"></el-input>
  184. </el-form-item>
  185. <el-form-item style="margin-bottom: 0px" v-if="ruleForm1.resource == 2 " label="座位区间" prop="name">
  186. <div style="display: flex;">
  187. <el-form-item label="" label-width="0" prop="name">
  188. <el-input v-model="ruleForm1.colMin" placeholder="最小座位号"></el-input>
  189. </el-form-item>
  190. <span style="white-space: nowrap;">--</span>
  191. <el-form-item label="" prop="name">
  192. <el-input v-model="ruleForm1.colMax" placeholder="最大座位号"></el-input>
  193. </el-form-item>
  194. </div>
  195. </el-form-item>
  196. <el-form-item>
  197. <el-button size="mini" type="primary" @click="addSeat('ruleForm1')">创建座位</el-button>
  198. <el-button size="mini" @click="resetForm1('ruleForm1')">重置</el-button>
  199. </el-form-item>
  200. </el-form>
  201. </div>
  202. <div class="qu-second-info">
  203. <div class="qu-second-info-title">
  204. <span>该区已创建的座位</span>
  205. <span>(注:从左至右排序如下)</span>
  206. </div>
  207. <div class="qu-second-info-tool">
  208. <span>快速排序:</span>
  209. <i @click="seatSortingFun('rise')">升序</i>
  210. <i @click="seatSortingFun('fall')">降序</i>
  211. <i @click="seatSortingFun('symmetry')">奇偶对称</i>
  212. <i @click="seatSortingFun('reversal')">反转</i>
  213. </div>
  214. <div class="qu-second-info-list">
  215. <div
  216. class="qu-second-info-item"
  217. v-for="(item,index) in currentTabelList">
  218. <span>{{ item.name }}</span>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. <!-- 批量操作 -->
  224. <div v-if="activeName == 'batch'" class="qu-batch-box">
  225. <div class="qu-batch-form">
  226. <el-form :model="queryParams" ref="queryForm" size="mini" label-width="50px">
  227. <el-form-item label="排号" prop="menuName" >
  228. <el-input
  229. v-model="queryParams.menuName"
  230. placeholder="排号"
  231. clearable
  232. @keyup.enter.native="handleQuery"
  233. />
  234. </el-form-item>
  235. <el-form-item label="区域" prop="status">
  236. <div style="display: flex;">
  237. <el-select v-model="queryParams.status" placeholder="区域" clearable>
  238. <el-option
  239. v-for="item in tableHeader"
  240. :key="item.key"
  241. :label="item.title"
  242. :value="item.key"
  243. />
  244. <el-option
  245. label="未绑定"
  246. :value="-1"
  247. />
  248. </el-select>
  249. <el-button style="margin-left: 5px;" type="primary" size="mini" @click="handleQuery">搜索</el-button>
  250. <el-button size="mini" @click="resetQuery">重置</el-button>
  251. </div>
  252. </el-form-item>
  253. </el-form>
  254. </div>
  255. <div class="qu-batch-tool">
  256. <el-button type="primary" size="mini" @click="openFormDialogVisible">修改区域</el-button>
  257. <el-button type="primary" size="mini" @click="batchSetaType">座位类型</el-button>
  258. <el-button type="danger" size="mini" @click="batchDisable">批量禁用</el-button>
  259. </div>
  260. <div class="qu-batch-table">
  261. <el-table
  262. size="mini"
  263. :data="batchTableList"
  264. @selection-change="handleSelectionChange"
  265. style="width: 100%"
  266. height="100%"
  267. >
  268. <el-table-column
  269. type="selection"
  270. align="center"
  271. width="40">
  272. </el-table-column>
  273. <el-table-column
  274. prop="name"
  275. align="center"
  276. label="名称">
  277. <template slot-scope="scope">
  278. <div>
  279. <span>{{ scope.row.name ? scope.row.name : '暂未命名' }}</span>
  280. <span>({{ scope.row.rowNo}}-{{ scope.row.columnNo}})</span>
  281. </div>
  282. </template>
  283. </el-table-column>
  284. <el-table-column
  285. align="center"
  286. label="区域">
  287. <template slot-scope="scope">
  288. <span>{{ scope.row.styleCss && scope.row.styleCss.keyLabel ? scope.row.styleCss.keyLabel : '暂未分区' }}</span>
  289. </template>
  290. </el-table-column>
  291. </el-table>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. <!-- 编辑区域 -->
  297. <el-dialog
  298. :title="formDialogVisibleTitle"
  299. :visible.sync="formDialogVisible"
  300. width="30%"
  301. append-to-body
  302. >
  303. <el-form
  304. :model="formAll"
  305. :rules="formRules"
  306. ref="formAll"
  307. label-width="100px" >
  308. <div v-if="formAllType=='region'">
  309. <el-form-item label="区域名称" prop="title">
  310. <el-input v-model="formAll.title"></el-input>
  311. </el-form-item>
  312. <el-form-item label="座位排练" prop="align">
  313. <el-select v-model="formAll.align" placeholder="请选择座位排练">
  314. <el-option label="靠左" value="flex-start"></el-option>
  315. <el-option label="居中" value="center"></el-option>
  316. <el-option label="靠右" value="flex-end"></el-option>
  317. </el-select>
  318. </el-form-item>
  319. </div>
  320. <div v-if="formAllType=='bindingregion'">
  321. <el-form-item label="区域" prop="status">
  322. <div style="display: flex;">
  323. <el-select v-model="formAll.status" placeholder="区域" clearable>
  324. <el-option
  325. v-for="item in tableHeader"
  326. :key="item.key"
  327. :label="item.title"
  328. :value="item.key"
  329. />
  330. </el-select>
  331. </div>
  332. </el-form-item>
  333. </div>
  334. </el-form>
  335. <span slot="footer" class="dialog-footer">
  336. <el-button @click="formDialogVisible = false">取 消</el-button>
  337. <el-button type="primary" @click="chekeFormAll('formAll')">确 定</el-button>
  338. </span>
  339. </el-dialog>
  340. </div>
  341. </template>
  342. <script>
  343. import Sortable from "sortablejs";
  344. import dragSelect from 'ty-drag-select';
  345. import { pageList as getSeatTypeList } from '@/api/seatTypeMr/seatTypeMr'
  346. export default {
  347. name: 'sysIndex',
  348. components: {},
  349. data() {
  350. return {
  351. // 页面渲染的数据
  352. seatList: [],
  353. seatTypeList: [],
  354. tableHeader: [],
  355. tableData: [], // 全部的座位 表格形式
  356. tableDataAll: [], // 全部的座位
  357. widthAll: '100%',
  358. heightAll: '100%',
  359. width: 60,
  360. height: 60,
  361. spacing: 10,
  362. whNum: 100,
  363. sortable: null,
  364. ranking_goods: [],
  365. // tool
  366. rowAll: null,
  367. colsAll: null,
  368. activeName: 'second',
  369. // 创建区域
  370. ruleForm: {},
  371. rules: {
  372. name: [
  373. { required: true, message: '请输入活动名称', trigger: ['blur','change'] }
  374. ],
  375. region: [
  376. { required: true, message: '请选择活动区域', trigger: ['blur','change'] }
  377. ],
  378. },
  379. /** 创建座位 开始 */
  380. // 创建座位
  381. ruleForm1: {
  382. name: '${row}排${col}座'
  383. },
  384. rules1: {
  385. resource: [
  386. { required: true, message: '请选择创建方式', trigger: ['blur','change'] }
  387. ],
  388. name: [
  389. { required: true, message: '请选择座位名称', trigger: ['blur','change'] }
  390. ],
  391. seatParity: [
  392. { required: true, message: '请选择座位号', trigger: ['blur','change'] }
  393. ],
  394. seatTypeId: [
  395. { required: true, message: '请选择座位类型', trigger: ['blur','change'] }
  396. ],
  397. },
  398. currentRow: null, // 当前选择的单元格行
  399. currentRegion: null, // 当前选择的单元格列
  400. currentLabel: null, // 当前选择的单元格列 名称
  401. currentProperty: null, // 当前选择的key
  402. currentTabelList: [], // 当前单元格的座位列表
  403. /** 创建座位 结束 */
  404. /** 批量操作 */
  405. batchTableList: [],
  406. multipleSelection: [], // 批量操作选中的
  407. queryParams: {},
  408. /** 编辑区域 开始 */
  409. formDialogVisibleTitle: '',
  410. formDialogVisible: false, // 弹窗
  411. formAll: {},
  412. formRules: {},
  413. formAllType: '', // region 区域
  414. /** 编辑区域 结束 */
  415. };
  416. },
  417. mounted() {
  418. //this.initData()
  419. // this.initDataCopy()
  420. // setTimeout(() => {
  421. // let tbody = document.getElementsByClassName('exchange_table')[0].getElementsByTagName('tbody');
  422. // tbody[0] && (tbody[0].className += ' box-table');
  423. // this.initSortTable();
  424. // }, 1000)
  425. // 拖拽事件
  426. this.columnDrop()
  427. this.$dragging.$on("dragged", (result) => {
  428. // 将排序后的结果重新赋值
  429. this.tableHeader = [].concat(JSON.parse(JSON.stringify(result.value.list)))
  430. });
  431. },
  432. methods: {
  433. /** 获取座位类型 */
  434. async getSeatTypeListFun(){
  435. try {
  436. let res = await getSeatTypeList({
  437. pageNum: 1, pageSize: 999
  438. })
  439. this.seatTypeList = res.data.rows
  440. } catch (error) {
  441. }
  442. },
  443. //初始化排序
  444. initSortTable() {
  445. let that = this;
  446. this.sortable = new Sortable(document.getElementsByClassName('box-table')[0], {
  447. animation: 150,
  448. handle: '.drag-btn',
  449. onEnd: (e) => {
  450. // 获取排序之后的data数据
  451. that.ranking_goods.splice(e.newIndex, 0, that.ranking_goods.splice(e.oldIndex, 1)[0]);
  452. var newArray = that.ranking_goods.slice(0);
  453. that.ranking_goods = []
  454. that.$nextTick(function () {
  455. that.ranking_goods = newArray
  456. })
  457. }
  458. })
  459. },
  460. /** 初始化数据 */
  461. async initData(row,list,type){
  462. this.tableHeader = []
  463. this.tableData = []
  464. this.tableDataAll = []
  465. this.rowAll = null
  466. this.colsAll = null
  467. await this.getSeatTypeListFun()
  468. if(row.rows) {
  469. if(row.styleCss) {
  470. this.tableHeader = JSON.parse(row.styleCss).tableHeader
  471. }
  472. this.rowAll = row.rows
  473. let listCopy = []
  474. list.forEach((item,index) => {
  475. // if(item.styleCss) {
  476. // item.styleCss = JSON.parse(item.styleCss)
  477. // }
  478. listCopy.push({
  479. ...item,
  480. styleCss: item.styleCss ? JSON.parse(JSON.parse(item.styleCss)): {}
  481. })
  482. })
  483. this.tableDataAll = JSON.parse(JSON.stringify(listCopy))
  484. console.log("sfasdfasdfasd====",this.tableDataAll)
  485. this.dataProcess() // 数据整理
  486. }
  487. },
  488. /** 数组组装 */
  489. dataProcess(){
  490. let list = JSON.parse(JSON.stringify(this.tableDataAll))
  491. let list1 = JSON.parse(JSON.stringify(this.tableData))
  492. let obj = {}
  493. for(let i = 0;i<this.rowAll;i++) {
  494. if(this.tableHeader && this.tableHeader.length){
  495. let obj = {
  496. tableId: "row_"+i
  497. }
  498. this.tableHeader.forEach((item,index)=>{
  499. obj[item.key] = []
  500. })
  501. if(list1[i] && JSON.stringify(list1[i]) != '{}') {
  502. list1[i] = obj
  503. }else {
  504. list1.push(obj)
  505. }
  506. }else if(!list1[i]){
  507. list1.push({})
  508. }
  509. }
  510. this.tableData = JSON.parse(JSON.stringify(list1))
  511. list.forEach((item,index)=>{
  512. if(item.styleCss) {
  513. obj = typeof item.styleCss == 'string' ? JSON.parse(item.styleCss) : item.styleCss
  514. if(obj.key && list1[item.rowNo-1][obj.key]) {
  515. list1[item.rowNo-1][obj.key].push({
  516. ...item,
  517. styleCss: obj
  518. })
  519. }
  520. }
  521. })
  522. console.log("this.tableData===",this.tableData)
  523. this.tableData = JSON.parse(JSON.stringify(list1))
  524. this.countRegionW()
  525. },
  526. /** tab 切换 右侧工具 */
  527. handleClickTab(item){
  528. console.log("item====",item,this.activeName)
  529. if(this.activeName == 'batch') { // 批量操作
  530. this.batchTableList = this.tableDataAll
  531. }
  532. },
  533. /** 创建区域 开始 */
  534. submitForm(formName) {
  535. this.$refs[formName].validate((valid) => {
  536. if (valid) {
  537. let key = 'zuo_'+this.tableHeader.length
  538. this.tableHeader.push({
  539. title: this.ruleForm.name,
  540. key,
  541. align: this.ruleForm.region,
  542. length: 0,
  543. width:0,
  544. })
  545. this.resetForm(formName)
  546. if(this.rowAll) {
  547. this.createTableList()
  548. }
  549. } else {
  550. console.log('error submit!!');
  551. return false;
  552. }
  553. });
  554. },
  555. resetForm(formName) {
  556. this.$refs[formName].resetFields();
  557. },
  558. // 删除区域
  559. delTableHeader(params,index){
  560. let flog = false
  561. this.tableDataAll.forEach((item,index)=>{
  562. if(item.styleCss && item.styleCss.key == params.key) {
  563. flog = true
  564. }
  565. })
  566. if(flog){
  567. this.$message.error('区域存在座位,请将座位移到别的区域再删除!');
  568. }else{
  569. this.$confirm(`确定删除${params.title}区域`, '提示', {
  570. confirmButtonText: '确定',
  571. cancelButtonText: '取消',
  572. callback: action => {
  573. this.tableHeader.splice(index,1)
  574. }
  575. });
  576. }
  577. },
  578. // 编辑区域
  579. editTableHeader(item,index){
  580. this.formAllType = 'region'
  581. this.formDialogVisibleTitle = "编辑区域"
  582. this.formDialogVisible = true
  583. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  584. index: index,
  585. ...item
  586. })))
  587. },
  588. // 验证表单
  589. chekeFormAll(formName){
  590. this.$refs[formName].validate((valid) => {
  591. if (valid) {
  592. if(this.formAllType == 'region'){
  593. this.submitFormAll()
  594. }else if(this.formAllType == 'bindingregion'){
  595. console.log("sdfsdfsdfsdfds",this.formAll)
  596. this.batchBindingArea()
  597. }
  598. } else {
  599. console.log('error submit!!');
  600. return false;
  601. }
  602. });
  603. },
  604. //
  605. submitFormAll(){
  606. let index = this.formAll.index
  607. this.$set(this.tableHeader[index],'title',this.formAll.title)
  608. this.$set(this.tableHeader[index],'align',this.formAll.align)
  609. // let list = []
  610. // this.tableDataAll.forEach((item,index)=>{
  611. // if(item.style.key == this.formAll.key) {
  612. // list.push({
  613. // ...item,
  614. // style: {
  615. // item.sty
  616. // }
  617. // })
  618. // }else {
  619. // }
  620. // })
  621. this.formDialogVisible = false
  622. },
  623. /** 创建区域 结束 */
  624. /**
  625. * 创建排数
  626. */
  627. createTableList(){
  628. let list = JSON.parse(JSON.stringify(this.tableData))
  629. for(let i = 0;i<this.rowAll;i++) {
  630. if(this.tableHeader && this.tableHeader.length){
  631. let obj = {
  632. id: "row_"+i
  633. }
  634. this.tableHeader.forEach((item,index)=>{
  635. obj[item.key] = []
  636. })
  637. if(list[i] && JSON.stringify(list[i]) != '{}') {
  638. list[i] = Object.assign(obj,list[i])
  639. }else {
  640. list.push(obj)
  641. }
  642. }else if(!list[i]){
  643. list.push({})
  644. }
  645. }
  646. this.tableData = JSON.parse(JSON.stringify(list))
  647. console.log("this.tableData===",this.tableData)
  648. },
  649. /** 创建区域 结束 */
  650. /** 创建座位 开始 */
  651. tableCellClassName({row, column, rowIndex, columnIndex}){
  652. //注意这里是解构
  653. //利用单元格的 className 的回调方法,给行列索引赋值
  654. row.index=rowIndex;
  655. column.index=columnIndex;
  656. },
  657. /** 点击某个单元格 */
  658. cellDblclick(row, column, cell, event){
  659. this.currentRow = row.index + 1
  660. this.currentRegion = column.index
  661. this.currentLabel = column.label
  662. this.currentProperty = column.property
  663. console.log('this.tableData===', this.tableData)
  664. console.log("this.tableData111=====",this.currentRow,this.currentProperty,this.tableData[this.currentRow-1][this.currentProperty])
  665. let list = this.tableData[this.currentRow-1][this.currentProperty]
  666. this.currentTabelList = list && list.length>0 ? JSON.parse(JSON.stringify(list)) : []
  667. console.log("row, column, cell, event===",row, column, cell, event)
  668. },
  669. /** 点击 创建座位 */
  670. addSeat(formName) {
  671. this.$refs[formName].validate((valid) => {
  672. if (valid) {
  673. if(!this.currentRow){
  674. this.$message({
  675. showClose: true,
  676. message: '请先选择某个区域,左键双击选择!!!',
  677. type: 'error'
  678. });
  679. return
  680. }
  681. let color = ''
  682. let seatLabel = ''
  683. this.seatTypeList.forEach((item,index)=>{
  684. if(this.ruleForm1.seatTypeId == item.id) {
  685. color = item.color
  686. seatLabel = item.name
  687. }
  688. })
  689. if(this.ruleForm1.resource == 2){ // 批量
  690. let list = []
  691. let min = Number(this.ruleForm1.colMin)
  692. let max = Number(this.ruleForm1.colMax)
  693. if(min>max){
  694. this.$message({
  695. showClose: true,
  696. message: '座位区间输入错误,应该前数小于后数!!!',
  697. type: 'error'
  698. });
  699. return
  700. }
  701. if(!this.checkRepeatSeat(min,max)){
  702. this.$message({
  703. showClose: true,
  704. message: '座位区间出现重复!!!',
  705. type: 'error'
  706. });
  707. return
  708. }
  709. for(let i = min;i<=max;i++) {
  710. if(this.ruleForm1.seatParity == 2 && i%2 == 0) { // 排除偶数
  711. continue;
  712. }
  713. if(this.ruleForm1.seatParity == 3 && i%2 > 0) { // 排除奇数数
  714. continue;
  715. }
  716. list.push({
  717. tableId: this.currentRow+"_"+this.currentProperty+"_"+i,
  718. name: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
  719. styleCss: {
  720. key: this.currentProperty, // 所属区域的key
  721. keyLabel: this.currentLabel, // 所属区域的名称
  722. sort: 0,
  723. id: this.currentRow+"_"+this.currentProperty+"_"+i,
  724. },
  725. rowNo: this.currentRow,
  726. columnNo: i,
  727. seatTypeId: this.ruleForm1.seatTypeId,
  728. sortId: i, // 排序号码
  729. seatLabel: seatLabel,
  730. color: color,// 座位类型对应的颜色
  731. delFlag: 0, // 座位是否可用
  732. priority: 9999, // 座位出票顺序 数字越小越优先
  733. status: 0, //0-初始(该状态下不C端显示) 1-可用 2-不可用
  734. })
  735. }
  736. this.tableDataAll = this.tableDataAll.concat(JSON.parse(JSON.stringify(list)))
  737. this.$set(this.tableData[this.currentRow-1],this.currentProperty,this.tableData[this.currentRow-1][this.currentProperty].concat(list))
  738. this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
  739. }else { // 单个
  740. console.log("this.tableData=====",this.tableData)
  741. console.log("this.tableData111=====",this.currentRow,this.currentProperty,this.tableData[this.currentRow-1][this.currentProperty])
  742. let index = this.tableData[this.currentRow-1][this.currentProperty].length
  743. let obj = {
  744. tableId: this.currentRow+"_"+this.currentProperty+"_"+(index+1),
  745. name: this.ruleForm1.name,
  746. styleCss: {
  747. key: this.currentProperty, // 所属区域的key
  748. keyLabel: this.currentLabel, // 所属区域的名称
  749. sort: 0,
  750. id: this.currentRow+"_"+this.currentProperty+"_"+(index+1),
  751. },
  752. rowNo: this.currentRow,
  753. columnNo: index+1,
  754. sortId: i, // 排序号码
  755. seatTypeId: this.ruleForm1.seatTypeId,
  756. seatLabel: seatLabel,
  757. color: color,// 座位类型对应的颜色
  758. delFlag: 0, // 座位是否可用
  759. priority: 9999, // 座位出票顺序 数字越小越优先
  760. status: 0, //0-初始(该状态下不C端显示) 1-可用 2-不可用
  761. }
  762. this.tableData[this.currentRow-1][this.currentProperty].push(obj)
  763. this.tableDataAll.push(JSON.parse(JSON.stringify(obj)))
  764. this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
  765. }
  766. this.countRegionW()
  767. } else {
  768. console.log('error submit!!');
  769. return false;
  770. }
  771. });
  772. },
  773. /** 检测座位 是否存在重复 */
  774. checkRepeatSeat(min,max){
  775. let list = this.tableData[this.currentRow-1][this.currentProperty]
  776. if(!list||list.length<=0){ return true }
  777. let flog = true
  778. list.forEach((item)=>{
  779. if(item.columnNo<=max&&item.columnNo>=min) {
  780. flog = false
  781. }
  782. })
  783. return flog
  784. },
  785. /** 清除创建座位的表单 */
  786. resetForm1(formName) {
  787. this.$refs[formName].resetFields();
  788. },
  789. // 计算区域的宽度
  790. countRegionW(){
  791. let list = JSON.parse(JSON.stringify(this.tableHeader))
  792. for(let i = 0; i < list.length; i++) {
  793. list[i].length = 0
  794. for(let j = 0;j < this.tableData.length; j++) {
  795. if(this.tableData[j][list[i].key] && this.tableData[j][list[i].key].length){
  796. if(list[i].length<this.tableData[j][list[i].key].length){
  797. list[i].length = this.tableData[j][list[i].key].length
  798. }
  799. }
  800. }
  801. }
  802. console.log("list=====111",list)
  803. this.tableHeader = [].concat(list)
  804. let colsAll = 0
  805. this.tableHeader.forEach((item,index) => {
  806. if(item.length) {
  807. colsAll = colsAll + item.length
  808. }
  809. })
  810. this.colsAll = colsAll
  811. },
  812. /** 创建座位 结束 */
  813. //列拖拽
  814. columnDrop() {
  815. // 阻止默认行为
  816. document.body.addEventListener("drop", (event) => {
  817. event.preventDefault();
  818. event.stopPropagation();
  819. });
  820. const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
  821. this.sortable = Sortable.create(wrapperTr, {
  822. animation: 180,
  823. delay: 0,
  824. onEnd: (evt) => {
  825. const oldItem = this.dropCol[evt.oldIndex];
  826. this.dropCol.splice(evt.oldIndex, 1);
  827. this.dropCol.splice(evt.newIndex, 0, oldItem);
  828. },
  829. });
  830. },
  831. dragSelectChange(e){
  832. console.log("e===",e)
  833. if(e && e.div) {
  834. let list = JSON.parse(JSON.stringify(e.div))
  835. console.log("e===",new Set(list))
  836. }
  837. },
  838. dragLostItemChange(){},
  839. reSelect() {
  840. },
  841. /** 批量操作 */
  842. // 批量选择
  843. handleSelectionChange(val){
  844. console.log('this.multipleSelection====',val)
  845. this.multipleSelection = val;
  846. },
  847. // 编辑区域
  848. openFormDialogVisible(){
  849. this.formAllType = 'bindingregion'
  850. this.formDialogVisibleTitle = "批量修改区域"
  851. this.formDialogVisible = true
  852. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  853. status: null,
  854. })))
  855. },
  856. // 批量绑定区域
  857. batchBindingArea() {
  858. let list = []
  859. let currentLabel = ''
  860. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  861. this.tableHeader.forEach((item)=>{
  862. if(item.key == this.formAll.status) {
  863. currentLabel = item.title
  864. }
  865. })
  866. for(let i=0;i<this.multipleSelection.length;i++){
  867. for(let j=0;j<this.tableDataAll.length;j++){
  868. if(this.multipleSelection[i].id == this.tableDataAll[j].id){
  869. listTabel[j] = {
  870. ...this.tableDataAll[j],
  871. styleCss: {
  872. ...this.tableDataAll[j].styleCss,
  873. key: this.formAll.status, // 所属区域的key
  874. keyLabel: currentLabel, // 所属区域的名称
  875. }
  876. }
  877. break;
  878. }
  879. }
  880. }
  881. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  882. console.log("this.tableDataAll=====",this.tableDataAll)
  883. // this.batchTableList = JSON.parse(JSON.stringify(this.tableDataAll))
  884. this.formDialogVisible = false
  885. this.handleQuery()
  886. this.dataProcess()
  887. },
  888. // 批量禁用
  889. batchDisable() {
  890. },
  891. /** 批量修改座位类型 */
  892. batchSetaType() {
  893. },
  894. /** 删选 */
  895. handleQuery(){
  896. if(!this.queryParams.menuName&&!this.queryParams.status){
  897. this.batchTableList = this.tableDataAll
  898. console.log("list====",this.queryParams,this.tableDataAll)
  899. }else {
  900. let list = []
  901. this.tableDataAll.forEach((item,index)=>{
  902. if(this.queryParams.menuName&&this.queryParams.status) {
  903. if(item.rowNo==this.queryParams.menuName && item.styleCss.key == this.queryParams.status) {
  904. list.push(item)
  905. }
  906. }else if(this.queryParams.menuName){
  907. if(item.rowNo==this.queryParams.menuName) {
  908. list.push(item)
  909. }
  910. }else {
  911. if(item.styleCss.key == this.queryParams.status) {
  912. list.push(item)
  913. }
  914. }
  915. })
  916. console.log("list====",list,this.queryParams)
  917. this.batchTableList = list
  918. }
  919. },
  920. resetQuery(){
  921. this.queryParams = {}
  922. },
  923. /** 座位排序 */
  924. seatSortingFun(type){
  925. let list = JSON.parse(JSON.stringify(this.currentTabelList))
  926. if(type=='rise') { // 升序
  927. list.sort(function(x,y){
  928. let num1 = x.columnNo
  929. let num2 = y.columnNo
  930. return num1 - num2
  931. })
  932. }
  933. if(type=='fall') { // 降序
  934. list.sort(function(x,y){
  935. let num1 = x.columnNo
  936. let num2 = y.columnNo
  937. return num2 - num1
  938. })
  939. }
  940. if(type=='symmetry') { // 奇偶对称
  941. let odd = []
  942. let even = []
  943. list.forEach((item,index)=>{
  944. if(item.columnNo%2==0){
  945. even.push(item)
  946. }else {
  947. odd.push(item)
  948. }
  949. })
  950. odd.sort(function(x,y){
  951. let num1 = x.columnNo
  952. let num2 = y.columnNo
  953. return num2 - num1
  954. })
  955. even.sort(function(x,y){
  956. let num1 = x.columnNo
  957. let num2 = y.columnNo
  958. return num1 - num2
  959. })
  960. list = odd.concat(even)
  961. }
  962. if(type=='reversal'){
  963. list.reverse()
  964. }
  965. this.$set(this.tableData[this.currentRow-1],this.currentProperty,list)
  966. this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
  967. },
  968. /** 保存座位 */
  969. saveSeat() {
  970. console.log('this.tableDataAll',this.tableDataAll)
  971. let list = JSON.parse(JSON.stringify(this.tableDataAll))
  972. list.forEach((item,index)=>{
  973. if(item.styleCss) {
  974. list[index].styleCss = JSON.stringify(item.styleCss)
  975. }
  976. })
  977. let styleCss = {
  978. tableHeader: this.tableHeader
  979. }
  980. list.forEach((item,index)=>{
  981. if(item.styleCss) {
  982. list[index].styleCss = JSON.stringify(item.styleCss)
  983. }
  984. })
  985. this.$emit('saveSeat',this.rowAll,this.colsAll,list,JSON.stringify(styleCss))
  986. }
  987. }
  988. };
  989. </script>
  990. <style scoped lang="scss">
  991. .sm {
  992. width: 100%;
  993. height: 100%;
  994. box-sizing: border-box;
  995. display: flex;
  996. flex-direction: column;
  997. justify-content: center;
  998. align-items: center;
  999. --top-tool-h: 60px;
  1000. --left-tool-w: 300px
  1001. }
  1002. .sm-box-top-tool {
  1003. width: 100%;
  1004. height: var(--top-tool-h);
  1005. box-sizing: border-box;
  1006. display: flex;
  1007. .sm-box-top-tool-legend {
  1008. width: 400px;
  1009. display: flex;
  1010. >div {
  1011. display: flex;
  1012. align-items: center;
  1013. margin-left: 10px;
  1014. >span:first-child {
  1015. display: block;
  1016. width: 10px;
  1017. height: 10px;
  1018. flex-shrink: 0;
  1019. }
  1020. >span:last-child {
  1021. white-space: nowrap;
  1022. margin-left: 5px;
  1023. font-size: 12px;
  1024. }
  1025. }
  1026. }
  1027. }
  1028. .sm-box {
  1029. width: 100%;
  1030. height: calc( 100% - var(--top-tool-h) );
  1031. box-sizing: border-box;
  1032. display: flex;
  1033. justify-content: center;
  1034. --row-w: 26px;
  1035. --row-h: 26px;
  1036. --row-scale: 1;
  1037. }
  1038. .sm-scroll-box {
  1039. width: calc( 100% - var(--left-tool-w) );
  1040. height: 100%;
  1041. border: 1px solid #ccc;
  1042. box-sizing: border-box;
  1043. background-color: aqua;
  1044. .row-item-box {
  1045. border: 1px dashed #ccc;
  1046. width: 100%;
  1047. height: 100%;
  1048. align-items: center;
  1049. padding: 5px;
  1050. }
  1051. .row-item-box:hover {
  1052. background-color: rgba(64, 158, 255,0.3);
  1053. }
  1054. .row-item {
  1055. width: var(--row-w);
  1056. height: var(--row-h);
  1057. margin-left: 5px;
  1058. border: 1px solid #ccc;
  1059. display: flex;
  1060. flex-direction: column;
  1061. flex-shrink: 0;
  1062. font-size: 12px;
  1063. align-items: center;
  1064. box-sizing: border-box;
  1065. justify-content: center;
  1066. overflow: hidden;
  1067. > div {
  1068. width: var(--row-w-i);
  1069. height: var(--row-h-i);
  1070. transform: scale(var(--row-scale));
  1071. display: flex;
  1072. flex-direction: column;
  1073. }
  1074. i {
  1075. color: #fff;
  1076. }
  1077. }
  1078. .row-item:first-child {
  1079. margin-left: 0;
  1080. }
  1081. .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
  1082. border-bottom: none !important;
  1083. }
  1084. }
  1085. .table-tool {
  1086. width: var(--left-tool-w);
  1087. height: 100%;
  1088. padding: 0 10px;
  1089. box-sizing: border-box;
  1090. border: 1px solid #ccc;
  1091. }
  1092. .table-tool-tab {
  1093. height: 40px;
  1094. }
  1095. .qu-first-box {
  1096. width: 100%;
  1097. height: 100%;
  1098. .qu-first-row {
  1099. display: flex;
  1100. align-items: center;
  1101. }
  1102. .qu-first-form {
  1103. width: 100%;
  1104. height: 250px;
  1105. overflow: hidden;
  1106. padding-top: 10px;
  1107. box-sizing: border-box;
  1108. border-bottom: 1px solid #ccc;
  1109. }
  1110. .qu-first-info {
  1111. width: 100%;
  1112. height: calc( 100% - 250px );
  1113. overflow: hidden;
  1114. .qu-first-info-title {
  1115. width: 100%;
  1116. height: 25px;
  1117. display: flex;
  1118. align-items: flex-end;
  1119. padding-bottom: 5px;
  1120. span:first-child{
  1121. font-size: 16px;
  1122. }
  1123. span:last-child{
  1124. font-size: 12px;
  1125. margin-left: 10px;
  1126. }
  1127. }
  1128. .qu-first-info-list {
  1129. width: 100%;
  1130. height: calc( 100% - 30px );
  1131. box-sizing: border-box;
  1132. padding-right: 5px;
  1133. overflow: hidden;
  1134. overflow-y: auto;
  1135. .qu-first-info-item {
  1136. width: 100%;
  1137. height: 40px;
  1138. box-sizing: border-box;
  1139. border: 1px solid #ccc;
  1140. margin-bottom: 5px;
  1141. display: flex;
  1142. justify-content: space-between;
  1143. align-items: center;
  1144. font-size: 16px;
  1145. border-radius: 10px;
  1146. >span {
  1147. width: 100%;
  1148. height: 100%;
  1149. display: flex;
  1150. align-items: center;
  1151. padding: 0 20px;
  1152. font-weight: 600;
  1153. }
  1154. >div {
  1155. display: flex;
  1156. span {
  1157. display: flex;
  1158. padding: 0 10px;
  1159. height: 100%;
  1160. align-items: center;
  1161. font-size: 12px;
  1162. white-space: nowrap;
  1163. }
  1164. span:first-child {
  1165. color: #409eff;
  1166. }
  1167. span:last-child {
  1168. color: #f56c6c;
  1169. }
  1170. }
  1171. }
  1172. }
  1173. .qu-first-info-list::-webkit-scrollbar {
  1174. width: 2px;
  1175. }
  1176. .qu-first-info-list::-webkit-scrollbar-track {
  1177. background-color: #ccc;
  1178. }
  1179. }
  1180. }
  1181. .qu-second-box {
  1182. width: 100%;
  1183. height: 100%;
  1184. .qu-second-select{
  1185. width: 100%;
  1186. height: 25px;
  1187. display: flex;
  1188. align-items: flex-end;
  1189. padding-bottom: 5px;
  1190. span:nth-child(1){
  1191. font-size: 16px;
  1192. }
  1193. span:not(:first-child){
  1194. font-size: 18px;
  1195. margin-left: 10px;
  1196. font-weight: 600;
  1197. }
  1198. }
  1199. .qu-second-row {
  1200. display: flex;
  1201. align-items: center;
  1202. }
  1203. .qu-second-form {
  1204. width: 100%;
  1205. height: 300px;
  1206. overflow: hidden;
  1207. padding-top: 10px;
  1208. box-sizing: border-box;
  1209. border-bottom: 1px solid #ccc;
  1210. }
  1211. .qu-second-info {
  1212. width: 100%;
  1213. height: calc( 100% - 400px );
  1214. overflow: hidden;
  1215. .qu-second-info-title {
  1216. width: 100%;
  1217. height: 25px;
  1218. display: flex;
  1219. align-items: flex-end;
  1220. padding-bottom: 5px;
  1221. span:first-child{
  1222. font-size: 14px;
  1223. font-weight: 600;
  1224. }
  1225. span:last-child{
  1226. font-size: 12px;
  1227. margin-left: 10px;
  1228. }
  1229. }
  1230. .qu-second-info-tool {
  1231. width: 100%;
  1232. height: 25px;
  1233. display: flex;
  1234. align-items: center;
  1235. padding-bottom: 5px;
  1236. span:first-child{
  1237. font-size: 14px;
  1238. font-weight: 600;
  1239. }
  1240. i {
  1241. font-size: 12px;
  1242. margin-left: 10px;
  1243. background-color: #1890FF;
  1244. color: #fff;
  1245. padding: 5px;
  1246. transform: scale(0.9);
  1247. border-radius: 5px;
  1248. cursor: pointer;
  1249. }
  1250. }
  1251. .qu-second-info-list {
  1252. width: 100%;
  1253. height: calc( 100% - 60px );
  1254. box-sizing: border-box;
  1255. padding-right: 5px;
  1256. overflow: hidden;
  1257. overflow-y: auto;
  1258. .qu-second-info-item {
  1259. width: 100%;
  1260. height: 40px;
  1261. box-sizing: border-box;
  1262. border: 1px solid #ccc;
  1263. margin-bottom: 5px;
  1264. display: flex;
  1265. justify-content: space-between;
  1266. align-items: center;
  1267. font-size: 16px;
  1268. border-radius: 10px;
  1269. >span {
  1270. width: 100%;
  1271. height: 100%;
  1272. display: flex;
  1273. align-items: center;
  1274. padding: 0 20px;
  1275. font-weight: 600;
  1276. }
  1277. >div {
  1278. display: flex;
  1279. span {
  1280. display: flex;
  1281. padding: 0 10px;
  1282. height: 100%;
  1283. align-items: center;
  1284. font-size: 12px;
  1285. white-space: nowrap;
  1286. }
  1287. span:first-child {
  1288. color: #409eff;
  1289. }
  1290. span:last-child {
  1291. color: #f56c6c;
  1292. }
  1293. }
  1294. }
  1295. }
  1296. .qu-second-info-list::-webkit-scrollbar {
  1297. width: 2px;
  1298. }
  1299. .qu-second-info-list::-webkit-scrollbar-track {
  1300. background-color: #ccc;
  1301. }
  1302. }
  1303. }
  1304. .qu-batch-box {
  1305. width: 100%;
  1306. height: 100%;
  1307. box-sizing: border-box;
  1308. .qu-batch-form {
  1309. height: 90px;
  1310. box-sizing: border-box;
  1311. }
  1312. .qu-batch-tool {
  1313. height: 40px;
  1314. box-sizing: border-box;
  1315. }
  1316. .qu-batch-table {
  1317. height: calc( 100% - 180px );
  1318. box-sizing: border-box;
  1319. }
  1320. }
  1321. ::v-deep .exchange_table {
  1322. th {
  1323. padding: 0 !important;
  1324. height: 10px;
  1325. line-height: 10px;
  1326. }
  1327. td {
  1328. padding: 0 !important;
  1329. height: 30px;
  1330. line-height: 30px;
  1331. }
  1332. .cell {
  1333. height: 100%;
  1334. }
  1335. td.el-table__cell, th.el-table__cell.is-leaf {
  1336. border-bottom: none !important;
  1337. }
  1338. }
  1339. </style>