seatManagementTable.vue 54 KB

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