seatManagementTable.vue 86 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012
  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,border: '1px solid #000'}"></span>
  16. <span :style="{color: item.color}">{{ item.name }}</span>
  17. </div>
  18. <div>
  19. <span :style="{backgroundColor: '#ccc',border: '1px solid #000'}"></span>
  20. <span :style="{color: '#ccc'}">{{ "不可用" }}</span>
  21. </div>
  22. <div>
  23. <span :style="{backgroundColor: '#fff',border: '1px solid #000',color: '#000'}"></span>
  24. <span :style="{color: '#ccc'}">{{ "未设置座位类型" }}</span>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="sm-box"
  29. >
  30. <!--
  31. v-dragSelect="{
  32. selectClass: ['.row-item'],
  33. change: dragSelectChange,
  34. lostItem: dragLostItemChange,
  35. reSelect: reSelect,
  36. }"
  37. -->
  38. <!-- @mousedown="mousedownFun"
  39. @mousemove="mousemoveFun"
  40. @mouseup="mouseupFun"
  41. @mouseleave="mouseleaveFun" -->
  42. <div
  43. class="sm-scroll-box"
  44. id="sm-scroll-box"
  45. @mousedown="mousedownFun"
  46. @mousemove="mousemoveFun"
  47. @mouseup="mouseupFun"
  48. @mouseleave="mouseleaveFun"
  49. >
  50. <el-table
  51. :data="tableData"
  52. width="100%"
  53. height="100%"
  54. ref="table"
  55. row-key="tableId"
  56. class="exchange_table"
  57. :style="{
  58. '--row-scale': whNum/100,
  59. '--row-w': (width*(whNum/100))+'px',
  60. '--row-h': (width*(whNum/100))+'px',
  61. '--row-w-i': width+'px',
  62. '--row-h-i': height+'px',
  63. }"
  64. :data-source="ranking_goods"
  65. :cell-class-name="tableCellClassName"
  66. @cell-dblclick="cellDblclick"
  67. >
  68. <el-table-column
  69. type="index"
  70. fixed=left
  71. label="#"
  72. align="center"
  73. v-if="tableHeader.length!=0"
  74. :width="50">
  75. <template slot-scope="scope">
  76. <span style="width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;cursor: pointer;">{{ scope.$index + 1 }}#</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column
  80. v-for="(item,index) in tableHeader"
  81. :prop="item.key"
  82. :label="item.title"
  83. :width="((width*(whNum/100)+7.5)*item.length)+'px'"
  84. align="center"
  85. >
  86. <!-- 自定义头部 -->
  87. <template slot="header" slot-scope="scope">
  88. <div
  89. class="table-header"
  90. :width="((width*(whNum/100)+7.5)*item.length)+'px'"
  91. >
  92. <div
  93. class="table-header-item"
  94. :key="index"
  95. v-for="(item,index) in colsAll"
  96. >{{ index + 1 }}</div>
  97. </div>
  98. </template>
  99. <template slot-scope="scope">
  100. <div
  101. class="row-item-box"
  102. :style='{display: "flex",flexWrap: "nowrap",justifyContent: item.align}'>
  103. <div
  104. :class="['row-item',selectList.includes(item1.styleCss.id) ? 'row-item-select': '']"
  105. v-for="(item1,index1) in scope.row[item.key]"
  106. :key="item1.styleCss.id"
  107. dragSelectType="div"
  108. :dragSelectId="item1.styleCss.id"
  109. :dragSelectIndex="scope.$index"
  110. :dragSelectKey="item.key"
  111. :dragSelectCurrent="index1"
  112. :style="{
  113. backgroundColor: item1.status == 1 ? item1.color?item1.color: '#fff': '#ccc',
  114. }"
  115. @contextmenu="(e)=>{e.preventDefault();openFormDialogVisible('singleEdit',item1)}"
  116. >
  117. <div
  118. style="user-select: none;"
  119. :dragSelectId="item1.styleCss.id"
  120. :dragSelectIndex="scope.$index"
  121. :dragSelectKey="item.key"
  122. :dragSelectCurrent="index1"
  123. >
  124. <i
  125. style="line-height: 15px;"
  126. :dragSelectId="item1.styleCss.id"
  127. :dragSelectIndex="scope.$index"
  128. :dragSelectKey="item.key"
  129. :dragSelectCurrent="index1"
  130. ></i>
  131. <i
  132. style="line-height: 15px;"
  133. :dragSelectId="item1.styleCss.id"
  134. :dragSelectIndex="scope.$index"
  135. :dragSelectKey="item.key"
  136. :dragSelectCurrent="index1"
  137. >{{ item1.name ? item1.name : '未命名' }}</i>
  138. <i
  139. style="line-height: 15px;white-space: nowrap;"
  140. :dragSelectId="item1.styleCss.id"
  141. :dragSelectIndex="scope.$index"
  142. :dragSelectKey="item.key"
  143. :dragSelectCurrent="index1"
  144. >{{ item1.rowNo+ '-' +item1.columnNo }} ({{ item1.priority ? item1.priority : '-' }})</i>
  145. </div>
  146. </div>
  147. </div>
  148. </template>
  149. </el-table-column>
  150. </el-table>
  151. <!-- 鼠标拖拽出的遮罩 (定位为 position:absolute)-->
  152. <!-- 遮罩最好是在绑定了mouseover事件的元素内部,并且不要阻止遮罩的冒泡事件。这样鼠标移到了遮罩上面,依然可以利用冒泡执行父元素的mouseover事件,就不会出现遮罩只能扩大,不能缩小的情况了(亲自试过) -->
  153. <div id="moveSelected"></div>
  154. </div>
  155. <!-- 编辑页 -->
  156. <div class="table-tool">
  157. <div class="table-tool-tab">
  158. <el-tabs
  159. v-model="activeName"
  160. @tab-click="handleClickTab">
  161. <!-- <el-tab-pane label="创建区域" name="first"></el-tab-pane> -->
  162. <el-tab-pane label="座位管理" name="second">
  163. <!-- 座位管理 -->
  164. <div class="qu-second-box">
  165. <div class="qu-second-form">
  166. <el-form :model="ruleForm1" size="mini" :rules="rules1" ref="ruleForm1" label-width="80px" class="demo-ruleForm">
  167. <div v-if="!rowAll" style="display: flex;">
  168. <el-form-item label-width="0px" label=" ">
  169. <el-input placeholder="行数" v-model="ruleForm1.rowAll"></el-input>
  170. </el-form-item>
  171. <span style="margin-top: 10px;">—</span>
  172. <el-form-item label-width="0px" label=" ">
  173. <el-input placeholder="列数" v-model="ruleForm1.colsAll"></el-input>
  174. </el-form-item>
  175. <el-button style="height: 28px;margin-top: 7px;margin-left: 5px;" size="mini" type="primary" @click="createTemplate('ruleForm1')">创建模板</el-button>
  176. </div>
  177. <div v-else style="display: flex;">
  178. <el-button style="height: 28px;margin-top: 7px;" size="mini" type="primary" @click="addRanks('row')">增加一排</el-button>
  179. <el-button style="height: 28px;margin-top: 7px;margin-left: 5px;" size="mini" type="primary" @click="addRanks('cols')">增加一列</el-button>
  180. <el-button v-if="modeEdit == 'add'" style="height: 28px;margin-top: 7px;margin-left: 5px;" size="mini" type="primary" @click="initData">清除模板</el-button>
  181. </div>
  182. </el-form>
  183. </div>
  184. <div class="qu-second-info">
  185. <div class="qu-second-select">
  186. <span>当前选择的是:</span>
  187. <span v-if="currentRow">{{ currentRow }}排</span>
  188. <span v-if="currentRow">(注:从左至右排序如下)</span>
  189. </div>
  190. <div class="qu-second-info-tool">
  191. <span>快速排序:</span>
  192. <i @click="seatSortingFun('rise')">升序</i>
  193. <i @click="seatSortingFun('fall')">降序</i>
  194. <i @click="seatSortingFun('symmetry')">奇偶对称</i>
  195. <i @click="seatSortingFun('reversal')">反转</i>
  196. </div>
  197. <!-- <div class="qu-second-info-tool">
  198. <span>批量操作:</span>
  199. <i @click="seatSortingFun('rise')">修改名称</i>
  200. </div> -->
  201. <div class="qu-second-info-list">
  202. <transition-group>
  203. <div
  204. class="qu-second-info-item"
  205. :key="index"
  206. v-for="(item,index) in currentTabelList"
  207. v-dragging="{item: item, list:currentTabelList}"
  208. >
  209. <div >
  210. <span>名称:{{ item.name ? item.name :'未命名' }}</span>
  211. <span>优先级:{{ item.priority ? item.priority : '-' }}</span>
  212. </div>
  213. <el-button type="primary" size="mini" @click="openFormDialogVisible('singleEdit',item)">编辑</el-button>
  214. </div>
  215. </transition-group>
  216. </div>
  217. </div>
  218. </div>
  219. </el-tab-pane>
  220. <el-tab-pane label="批量处理" name="batch">
  221. <!-- 批量操作 -->
  222. <div class="qu-batch-box">
  223. <div class="qu-batch-form">
  224. <el-form :model="queryParams" ref="queryForm" size="mini" label-width="40px">
  225. <el-form-item style="margin-bottom: 5px;" label="坐标" >
  226. <div style="display: flex;">
  227. <el-input
  228. v-model="queryParams.row"
  229. placeholder="行数"
  230. clearable
  231. @keyup.enter.native="handleQuery"
  232. />
  233. <span>—</span>
  234. <el-input
  235. v-model="queryParams.cols"
  236. placeholder="列数"
  237. clearable
  238. @keyup.enter.native="handleQuery"
  239. />
  240. </div>
  241. </el-form-item>
  242. <el-form-item style="margin-bottom: 5px;" label="类型">
  243. <el-select v-model="queryParams.seatTypeId" placeholder="座位类型" clearable>
  244. <el-option
  245. v-for="(item,index) in seatTypeList"
  246. :key="item.id"
  247. :label="item.name"
  248. :value="item.id">
  249. </el-option>
  250. <el-option
  251. label="未绑定"
  252. :value="-1"
  253. />
  254. </el-select>
  255. </el-form-item>
  256. <el-form-item style="margin-bottom: 5px;" label="名称" >
  257. <div style="display: flex;">
  258. <el-input
  259. v-model="queryParams.name"
  260. placeholder="座位名称"
  261. clearable
  262. @keyup.enter.native="handleQuery"
  263. />
  264. <el-button style="margin-left: 5px;" type="primary" size="mini" @click="handleQuery">搜索</el-button>
  265. <el-button size="mini" @click="resetQuery">重置</el-button>
  266. </div>
  267. </el-form-item>
  268. </el-form>
  269. </div>
  270. <div class="qu-batch-tool">
  271. <div>
  272. <el-button type="primary" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('batchSetaName')">座位名称</el-button>
  273. <el-button type="primary" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('batchSetaType')">座位类型</el-button>
  274. </div>
  275. <div>
  276. <el-button type="primary" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('batchSetaPriority')">优先级</el-button>
  277. <el-button type="danger" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('batchSetaDisable')">座位状态</el-button>
  278. <el-button type="primary" :disabled="multipleSelection.length==0" size="mini" @click="openFormDialogVisible('ticketingSequence')">出票顺序</el-button>
  279. </div>
  280. </div>
  281. <div class="qu-batch-table">
  282. <el-table
  283. size="mini"
  284. :data="batchTableList"
  285. @selection-change="handleSelectionChange"
  286. style="width: 100%"
  287. height="100%"
  288. row-key="styleCss.id"
  289. >
  290. <el-table-column
  291. type="selection"
  292. align="center"
  293. width="40">
  294. </el-table-column>
  295. <el-table-column
  296. prop="name"
  297. align="center"
  298. label="名称">
  299. <template slot-scope="scope">
  300. <div>
  301. <span>{{ scope.row.name ? scope.row.name : '暂未命名' }}</span>
  302. <span>({{ scope.row.rowNo}}-{{ scope.row.columnNo}})</span>
  303. </div>
  304. </template>
  305. </el-table-column>
  306. <el-table-column
  307. align="center"
  308. label="优先级">
  309. <template slot-scope="scope">
  310. <span>{{ scope.row.priority }}</span>
  311. </template>
  312. </el-table-column>
  313. <el-table-column
  314. align="center"
  315. label="出票顺序">
  316. <template slot-scope="scope">
  317. <span>{{ scope.row.printSortId == '-9999' ? '按优先级出票' : scope.row.printSortId }}</span>
  318. </template>
  319. </el-table-column>
  320. </el-table>
  321. </div>
  322. </div>
  323. </el-tab-pane>
  324. <el-tab-pane label="当前选择" name="select">
  325. <!-- 当前选择 -->
  326. <div class="qu-select-box">
  327. <div class="qu-select-select">
  328. <span>提示:</span>
  329. <span>鼠标左键按下拖动可进行多选</span>
  330. </div>
  331. <div class="qu-select-tool">
  332. <div>
  333. <el-button type="primary" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectBatchSetaName')">座位名称</el-button>
  334. <el-button type="primary" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectBatchSetaType')">座位类型</el-button>
  335. <el-button type="primary" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectBatchSetaPriority')">优先级</el-button>
  336. </div>
  337. <div>
  338. <el-button type="danger" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectBatchSetaDisable')">座位状态</el-button>
  339. <el-button type="danger" :disabled="selectTabelList.length==0" size="mini" @click="openFormDialogVisible('selectTicketingSequence')">出票顺序</el-button>
  340. <el-button type="info" :disabled="selectTabelList.length==0" size="mini" @click="delSelectTabelList">清除选择</el-button>
  341. </div>
  342. </div>
  343. <div class="qu-select-table">
  344. <el-table
  345. size="mini"
  346. :data="selectTabelList"
  347. style="width: 100%"
  348. height="100%"
  349. row-key="styleCss.id"
  350. >
  351. <el-table-column
  352. prop="name"
  353. align="center"
  354. label="名称">
  355. <template slot-scope="scope">
  356. <div>
  357. <span>{{ scope.row.name ? scope.row.name : '暂未命名' }}</span>
  358. <span>({{ scope.row.rowNo}}-{{ scope.row.columnNo}})</span>
  359. </div>
  360. </template>
  361. </el-table-column>
  362. <el-table-column
  363. align="center"
  364. label="优先级">
  365. <template slot-scope="scope">
  366. <span>{{ scope.row.priority }}</span>
  367. </template>
  368. </el-table-column>
  369. <el-table-column
  370. align="center"
  371. label="出票顺序">
  372. <template slot-scope="scope">
  373. <span>{{ scope.row.printSortId == '-9999' ? '按优先级出票' : scope.row.printSortId }}</span>
  374. </template>
  375. </el-table-column>
  376. </el-table>
  377. </div>
  378. </div>
  379. </el-tab-pane>
  380. </el-tabs>
  381. </div>
  382. </div>
  383. </div>
  384. <div class="sm-box-tig">
  385. <span>座位总数: {{ tableDataAll && tableDataAll.length }}</span>
  386. <span style="margin-left: 10px;">可用座位总数: {{ availableSeat }}</span>
  387. </div>
  388. <!-- 批量操作 -->
  389. <el-dialog
  390. :title="formDialogVisibleTitle"
  391. :visible.sync="formDialogVisible"
  392. width="30%"
  393. append-to-body
  394. >
  395. <el-form
  396. :model="formAll"
  397. :rules="formRules"
  398. ref="formAll"
  399. label-width="120px" >
  400. <div v-if="['batchSetaName','selectBatchSetaName'].indexOf(formAllType) !=-1">
  401. <el-form-item label="创建方式" prop="seatWay">
  402. <el-radio-group v-model="formAll.seatWay">
  403. <el-radio :label="1">相同</el-radio>
  404. <el-radio :label="2">使用行列号</el-radio>
  405. </el-radio-group>
  406. </el-form-item>
  407. <el-form-item v-if="formAll.seatWay == 2" label="座位名称" prop="name">
  408. <div style="display: flex;">
  409. <el-input v-model="formAll.name1"></el-input>
  410. <span style="white-space: nowrap;">+行号+</span>
  411. <el-input v-model="formAll.name"></el-input>
  412. <span style="white-space: nowrap;">+列号+</span>
  413. <el-input v-model="formAll.name2"></el-input>
  414. </div>
  415. </el-form-item>
  416. <el-form-item v-else label="座位名称" prop="name">
  417. <el-input v-model="formAll.name"></el-input>
  418. </el-form-item>
  419. </div>
  420. <div v-if="['batchSetaType','selectBatchSetaType'].indexOf(formAllType) !=-1">
  421. <el-form-item label="座位类型" prop="seatTypeId">
  422. <el-select
  423. v-model="formAll.seatTypeId"
  424. placeholder="请选择座位类型">
  425. <el-option
  426. v-for="(item,index) in seatTypeList"
  427. :key="item.id"
  428. :label="item.name"
  429. :value="item.id"></el-option>
  430. </el-select>
  431. </el-form-item>
  432. </div>
  433. <div v-if="['batchSetaPriority','selectBatchSetaPriority'].indexOf(formAllType) !=-1">
  434. <el-form-item label="设置方式" prop="seatPriorityWay">
  435. <el-radio-group v-model="formAll.seatPriorityWay">
  436. <el-radio :label="1">同一级</el-radio>
  437. <el-radio :label="2">递增</el-radio>
  438. <el-radio :label="3">递减</el-radio>
  439. </el-radio-group>
  440. </el-form-item>
  441. <el-form-item label="开始位置" prop="seatPriorityPosition">
  442. <el-radio-group v-model="formAll.seatPriorityPosition">
  443. <el-radio :label="1">列表上到下</el-radio>
  444. <el-radio :label="2">列表下到上</el-radio>
  445. </el-radio-group>
  446. </el-form-item>
  447. <el-form-item label="等级数" prop="setaPriorityNum">
  448. <el-input v-model="formAll.setaPriorityNum" placeholder="等级数"></el-input>
  449. </el-form-item>
  450. </div>
  451. <div v-if="['batchSetaDisable','selectBatchSetaDisable'].indexOf(formAllType) !=-1">
  452. <el-form-item label="座位状态" prop="status">
  453. <el-radio-group v-model="formAll.status">
  454. <!-- <el-radio :label="0">初始(该状态下不C端显示)</el-radio> -->
  455. <el-radio :label="1">可用</el-radio>
  456. <el-radio :label="2">不可用</el-radio>
  457. </el-radio-group>
  458. </el-form-item>
  459. </div>
  460. <!-- 单个编辑 -->
  461. <div v-if="['singleEdit'].indexOf(formAllType) !=-1">
  462. <el-form-item label="座位名称" prop="name">
  463. <el-input v-model="formAll.name" placeholder="座位名称"></el-input>
  464. </el-form-item>
  465. <el-form-item label="优先级" prop="priority">
  466. <el-input v-model="formAll.priority" placeholder="优先级"></el-input>
  467. </el-form-item>
  468. <el-form-item label="座位类型" prop="seatTypeId">
  469. <el-select
  470. v-model="formAll.seatTypeId"
  471. placeholder="请选择座位类型">
  472. <el-option
  473. v-for="(item,index) in seatTypeList"
  474. :key="item.id"
  475. :label="item.name"
  476. :value="item.id"></el-option>
  477. </el-select>
  478. </el-form-item>
  479. <el-form-item label="座位状态" prop="status">
  480. <el-radio-group v-model="formAll.status">
  481. <!-- <el-radio :label="0">初始(该状态下不C端显示)</el-radio> -->
  482. <el-radio :label="1">可用</el-radio>
  483. <el-radio :label="2">不可用</el-radio>
  484. </el-radio-group>
  485. </el-form-item>
  486. <el-form-item label="出票顺序" prop="printSortId">
  487. <el-input v-model="formAll.printSortId" placeholder="请输入出票顺序"></el-input>
  488. </el-form-item>
  489. <!-- <el-form-item label="是否禁用" prop="delFlag">
  490. <el-radio-group v-model="formAll.delFlag">
  491. <el-radio :label="0">禁用</el-radio>
  492. <el-radio :label="1">启用</el-radio>
  493. </el-radio-group>
  494. </el-form-item> -->
  495. </div>
  496. <!-- 出票顺序设置 -->
  497. <div v-if="['ticketingSequence','selectTicketingSequence'].indexOf(formAllType) !=-1">
  498. <el-form-item label="出票顺序" prop="printSortIdType">
  499. <el-radio-group v-model="formAll.printSortIdType">
  500. <el-radio :label="1">按照优先级出票</el-radio>
  501. <el-radio :label="2">自定义</el-radio>
  502. </el-radio-group>
  503. </el-form-item>
  504. <div v-if="formAll.printSortIdType == 2">
  505. <el-form-item label="设置方式" prop="seatPriorityWay">
  506. <el-radio-group v-model="formAll.seatPriorityWay">
  507. <el-radio :label="1">同一级</el-radio>
  508. <el-radio :label="2">递增</el-radio>
  509. <el-radio :label="3">递减</el-radio>
  510. </el-radio-group>
  511. </el-form-item>
  512. <el-form-item label="开始位置" prop="seatPriorityPosition">
  513. <el-radio-group v-model="formAll.seatPriorityPosition">
  514. <el-radio :label="1">列表上到下</el-radio>
  515. <el-radio :label="2">列表下到上</el-radio>
  516. </el-radio-group>
  517. </el-form-item>
  518. <el-form-item label="等级数" prop="setaPriorityNum">
  519. <el-input v-model="formAll.setaPriorityNum" placeholder="等级数"></el-input>
  520. </el-form-item>
  521. </div>
  522. </div>
  523. </el-form>
  524. <span slot="footer" class="dialog-footer">
  525. <el-button @click="formDialogVisible = false">取 消</el-button>
  526. <el-button type="primary" @click="chekeFormAll('formAll')">确 定</el-button>
  527. </span>
  528. </el-dialog>
  529. </div>
  530. </template>
  531. <script>
  532. import Sortable from "sortablejs"; // 拖动排序
  533. import { pageList as getSeatTypeList } from '@/api/seatTypeMr/seatTypeMr'
  534. import selectListMixin from "../mixins/selectList"
  535. export default {
  536. name: 'sysIndex',
  537. mixins: [selectListMixin],
  538. components: {},
  539. data() {
  540. return {
  541. modeEdit: '',
  542. // 页面渲染的数据
  543. seatList: [],
  544. seatTypeList: [],
  545. tableHeader: [{key: 'A',title: '舞台',length: 0,align: 'center'}],
  546. tableData: [], // 全部的座位 表格形式
  547. tableDataAll: [], // 全部的座位
  548. widthAll: '100%',
  549. heightAll: '100%',
  550. width: 65,
  551. height: 65,
  552. spacing: 10,
  553. whNum: 43,
  554. sortable: null,
  555. ranking_goods: [],
  556. // tool
  557. rowAll: null,
  558. colsAll: null,
  559. activeName: 'second',
  560. // 创建区域
  561. ruleForm: {},
  562. rules: {
  563. name: [
  564. { required: true, message: '请输入活动名称', trigger: ['blur','change'] }
  565. ],
  566. region: [
  567. { required: true, message: '请选择活动区域', trigger: ['blur','change'] }
  568. ],
  569. },
  570. /** 创建座位 开始 */
  571. // 创建座位
  572. ruleForm1: {
  573. name: '${row}排${col}座'
  574. },
  575. rules1: {
  576. resource: [
  577. { required: true, message: '请选择创建方式', trigger: ['blur','change'] }
  578. ],
  579. name: [
  580. { required: true, message: '请选择座位名称', trigger: ['blur','change'] }
  581. ],
  582. seatParity: [
  583. { required: true, message: '请选择座位号', trigger: ['blur','change'] }
  584. ],
  585. seatTypeId: [
  586. { required: true, message: '请选择座位类型', trigger: ['blur','change'] }
  587. ],
  588. },
  589. currentRow: null, // 当前选择的单元格行
  590. currentRegion: null, // 当前选择的单元格列
  591. currentLabel: null, // 当前选择的单元格列 名称
  592. currentProperty: null, // 当前选择的key
  593. currentTabelList: [], // 当前单元格的座位列表
  594. /** 创建座位 结束 */
  595. /** 批量操作 */
  596. batchTableList: [],
  597. multipleSelection: [], // 批量操作选中的
  598. queryParams: {},
  599. /** 编辑区域 开始 */
  600. formDialogVisibleTitle: '',
  601. formDialogVisible: false, // 弹窗
  602. formAll: {},
  603. formRules: {
  604. /** 修改名称 开始 */
  605. seatWay: [
  606. { required: true, message: '请选择创建方式', trigger: ['blur','change'] }
  607. ],
  608. seatParity: [
  609. { required: true, message: '请选择座号规律', trigger: ['blur','change'] }
  610. ],
  611. seatWell: [
  612. { required: true, message: '请选择座号顺序', trigger: ['blur','change'] }
  613. ],
  614. colMin: [
  615. { required: true, message: '请输入最小座位号', trigger: ['blur','change'] }
  616. ],
  617. colMax: [
  618. { required: true, message: '请输入最大座位号', trigger: ['blur','change'] }
  619. ],
  620. name: [
  621. { required: true, message: '请输入座位名称', trigger: ['blur','change'] }
  622. ],
  623. seatTypeId: [
  624. { required: true, message: '请输入座位类型', trigger: ['blur','change'] }
  625. ],
  626. seatPriorityWay: [
  627. { required: true, message: '请输入创建方式', trigger: ['blur','change'] }
  628. ],
  629. seatPriorityPosition: [
  630. { required: true, message: '请输入开始位置', trigger: ['blur','change'] }
  631. ],
  632. setaPriorityNum: [
  633. { required: true, message: '请输入等级数', trigger: ['blur','change'] }
  634. ],
  635. printSortId: [
  636. { required: false, message: '请输入出票顺序', trigger: ['blur','change'] }
  637. ],
  638. printSortIdType: [
  639. { required: true, message: '请输入出票顺序类型', trigger: ['blur','change'] }
  640. ],
  641. /** 修改名称 结束 */
  642. },
  643. formAllType: '', // region 区域
  644. /** 编辑区域 结束 */
  645. dragSelectObjTime: null,
  646. dragSelectObj: {
  647. selectClass: ['.row-item'],
  648. change: this.dragSelectChange,
  649. lostItem: this.dragLostItemChange,
  650. reSelect: this.reSelect,
  651. syncData:{switch:false}
  652. },
  653. availableSeat: 0, // 可用座位总数
  654. };
  655. },
  656. mounted() {
  657. // 拖拽事件
  658. //this.columnDrop()
  659. this.$dragging.$on("dragged", (result) => {
  660. // 将排序后的结果重新赋值
  661. //this.tableHeader = [].concat(JSON.parse(JSON.stringify(result.value.list)))
  662. this.draggingSeatSort()
  663. });
  664. },
  665. methods: {
  666. /** 获取座位类型 */
  667. async getSeatTypeListFun(){
  668. try {
  669. let res = await getSeatTypeList({
  670. pageNum: 1, pageSize: 999
  671. })
  672. this.seatTypeList = res.data.rows
  673. } catch (error) {
  674. }
  675. },
  676. /** 重置所有的数据 */
  677. resetDataAll(){
  678. this.modeEdit = null
  679. this.tableData = []
  680. this.tableDataAll = []
  681. this.rowAll = null
  682. this.colsAll = null
  683. this.selectList = []
  684. this.selectTabelList = []
  685. this.activeName = "second"
  686. this.currentRow = null // 当前选择的单元格行
  687. this.currentRegion = null // 当前选择的单元格列
  688. this.currentLabel = null // 当前选择的单元格列 名称
  689. this.currentProperty = null // 当前选择的key
  690. this.currentTabelList = [] // 当前单元格的座位列表
  691. this.batchTableList = []
  692. this.multipleSelection = [] // 批量操作选中的
  693. this.queryParams = {}
  694. this.selectList = []
  695. this.selectTabelList = []
  696. this.multipleSelection_1 = []
  697. this.availableSeat = 0
  698. this.flag = false//是搜开启拖拽的标志
  699. this.oldLeft = 0//鼠标按下时的lefttop
  700. this.oldTop = 0
  701. this.selectedList = []//拖拽多选选中的块集合
  702. this.isToLeft = true
  703. this.isToTop = true
  704. },
  705. /** 初始化数据 */
  706. async initData(row,list,type){
  707. this.resetDataAll()
  708. await this.getSeatTypeListFun()
  709. if(row.rows) {
  710. this.modeEdit = 'edit'
  711. this.rowAll = row.rows
  712. this.colsAll = row.cols
  713. let listCopy = []
  714. list.forEach((item,index) => {
  715. listCopy.push({
  716. ...item,
  717. tableId: this.tableHeader[0].key + "_"+item.rowNo+"_"+item.columnNo,
  718. styleCss: item.styleCss ? {
  719. ...JSON.parse(JSON.parse(item.styleCss)),
  720. id: this.tableHeader[0].key + "_"+item.rowNo+"_"+item.columnNo,
  721. }: {
  722. key: 'A',
  723. keyLabel: '舞台',
  724. id: this.tableHeader[0].key + "_"+item.rowNo+"_"+item.columnNo,
  725. }
  726. })
  727. })
  728. this.tableDataAll = JSON.parse(JSON.stringify(listCopy))
  729. console.log("sfasdfasdfasd111====",list)
  730. console.log("sfasdfasdfasd====",this.tableDataAll)
  731. this.dataProcess() // 数据整理
  732. }else {
  733. this.modeEdit = 'add'
  734. }
  735. },
  736. /** 数组组装 */
  737. dataProcess(){
  738. let list = JSON.parse(JSON.stringify(this.tableDataAll))
  739. let list1 = JSON.parse(JSON.stringify(this.tableData))
  740. for(let i = 0;i<this.rowAll;i++) {
  741. list1[i] = {
  742. tableId: 'A_'+(i+1), // this.tableHeader[0].key + "_"+i+"_"+j
  743. A: []
  744. }
  745. for(let j = 0; j<list.length;j++) {
  746. if(i == (list[j].rowNo - 1) ) {
  747. list1[i].A.push({
  748. ...list[j],
  749. styleCss: {
  750. key: 'A',
  751. keyLabel: '舞台',
  752. id: this.tableHeader[0].key + "_"+list[j].rowNo+"_"+list[j].columnNo,
  753. }
  754. })
  755. }
  756. }
  757. }
  758. // 排序
  759. for(let j = 0; j < list1.length ; j++) {
  760. for(let i = 0;i<this.tableHeader.length;i++) {
  761. list1[j][this.tableHeader[i].key].sort(this.sortFun)
  762. }
  763. }
  764. // 可用座位 计数
  765. let availableSeat = 0
  766. for(let j = 0; j < list.length ; j++) {
  767. if(list[j].status == 1) {
  768. availableSeat = availableSeat + 1
  769. }
  770. }
  771. this.availableSeat = availableSeat
  772. this.tableData = JSON.parse(JSON.stringify(list1))
  773. console.log("this.tableData===",this.tableData)
  774. this.countRegionW()
  775. },
  776. /** sort 排序函数 */
  777. sortFun(a,b){
  778. return a.sortId - b.sortId;
  779. },
  780. /** tab 切换 右侧工具 */
  781. handleClickTab(item){
  782. console.log("item====",item,this.activeName)
  783. if(this.activeName == 'batch') { // 批量操作
  784. // this.batchTableList = this.tableDataAll
  785. this.resetQuery()
  786. }else if(this.activeName=='select'){
  787. this.addSelectTabelList()
  788. }else if(this.activeName=='second'){
  789. if(this.currentRow){
  790. let list = this.tableData[this.currentRow-1][this.currentProperty]
  791. this.currentTabelList = list && list.length>0 ? JSON.parse(JSON.stringify(list)) : []
  792. }else {
  793. this.currentTabelList = []
  794. }
  795. }
  796. },
  797. /** 创建区域 结束 */
  798. // 创建模板
  799. createTemplate(formName){
  800. this.$refs[formName].validate((valid) => {
  801. if (valid) {
  802. let list = []
  803. for(let i = 1; i <= this.ruleForm1.rowAll;i++){
  804. for(let j = 1; j <= this.ruleForm1.colsAll;j++){
  805. list.push({
  806. tableId: this.tableHeader[0].key + "_"+i+"_"+j,
  807. name: i + '排' + j + '座',
  808. styleCss: {
  809. key: this.tableHeader[0].key, // 所属区域的key
  810. keyLabel: this.tableHeader[0].title, // 所属区域的名称
  811. sort: j,
  812. id: this.tableHeader[0].key + "_"+i+"_"+j,
  813. },
  814. rowNo: i,
  815. columnNo: j,
  816. seatTypeId: null,
  817. seatLabel: null,
  818. sortId: j, // 排序号码
  819. color: '',// 座位类型对应的颜色
  820. //delFlag: 0, // 座位是否可用
  821. priority: '', // 座位出票顺序 数字越小越优先
  822. status: 1, //0-初始(该状态下不C端显示) 1-可用 2-不可用
  823. printSortId: '', // 座位出票顺序 数字越小越优先 (打印)
  824. })
  825. }
  826. }
  827. this.tableDataAll = JSON.parse(JSON.stringify(list))
  828. this.rowAll = this.ruleForm1.rowAll
  829. this.colsAll = this.ruleForm1.colsAll
  830. this.dataProcess() // 数据整理
  831. }else {
  832. console.log('error submit!!');
  833. return false;
  834. }
  835. })
  836. },
  837. // 增加行/列
  838. addRanks(type){
  839. if(type == 'row'){
  840. this.rowAll = Number(this.rowAll) + 1
  841. this.rowAll = this.rowAll
  842. let list = []
  843. for(let j = 1; j <= this.colsAll;j++){
  844. list.push({
  845. tableId: this.tableHeader[0].key + "_"+this.rowAll+"_"+j,
  846. name: this.rowAll + '排' + j + '座',
  847. styleCss: {
  848. key: this.tableHeader[0].key, // 所属区域的key
  849. keyLabel: this.tableHeader[0].title, // 所属区域的名称
  850. sort: j,
  851. id: this.tableHeader[0].key + "_"+this.rowAll+"_"+j,
  852. },
  853. rowNo: this.rowAll,
  854. columnNo: j,
  855. seatTypeId: null,
  856. seatLabel: null,
  857. sortId: j, // 排序号码
  858. color: '',// 座位类型对应的颜色
  859. //delFlag: 0, // 座位是否可用
  860. priority: '', // 座位出票顺序 数字越小越优先
  861. printSortId: '', // 座位出票顺序 数字越小越优先 (打印)
  862. status: 1, //0-初始(该状态下不C端显示) 1-可用 2-不可用
  863. })
  864. }
  865. this.tableDataAll = this.tableDataAll.concat(list)
  866. console.log("list======",list)
  867. }else if(type == 'cols') {
  868. this.colsAll = Number(this.colsAll) + 1
  869. let list = []
  870. for(let i = 1; i <= this.rowAll;i++){
  871. list.push({
  872. tableId: this.tableHeader[0].key + "_"+i+"_"+ this.colsAll,
  873. name: i + '排' + this.colsAll + '座',
  874. styleCss: {
  875. key: this.tableHeader[0].key, // 所属区域的key
  876. keyLabel: this.tableHeader[0].title, // 所属区域的名称
  877. sort: this.colsAll,
  878. id: this.tableHeader[0].key + "_"+i+"_"+this.colsAll,
  879. },
  880. rowNo: i,
  881. columnNo: this.colsAll,
  882. seatTypeId: null,
  883. seatLabel: null,
  884. sortId: this.colsAll, // 排序号码
  885. color: '',// 座位类型对应的颜色
  886. //delFlag: 0, // 座位是否可用
  887. priority: '', // 座位出票顺序 数字越小越优先
  888. printSortId: '', // 座位出票顺序 数字越小越优先 (打印)
  889. status: 1, //0-初始(该状态下不C端显示) 1-可用 2-不可用
  890. })
  891. }
  892. this.tableDataAll = this.tableDataAll.concat(list)
  893. }
  894. this.dataProcess() // 数据整理
  895. },
  896. /**
  897. * 创建排数
  898. */
  899. createTableList(){
  900. let list = JSON.parse(JSON.stringify(this.tableData))
  901. for(let i = 0;i<this.rowAll;i++) {
  902. if(this.tableHeader && this.tableHeader.length){
  903. let obj = {
  904. id: "row_"+i
  905. }
  906. this.tableHeader.forEach((item,index)=>{
  907. obj[item.key] = []
  908. })
  909. if(list[i] && JSON.stringify(list[i]) != '{}') {
  910. list[i] = Object.assign(obj,list[i])
  911. }else {
  912. list.push(obj)
  913. }
  914. }else if(!list[i]){
  915. list.push({})
  916. }
  917. }
  918. this.tableData = JSON.parse(JSON.stringify(list))
  919. console.log("this.tableData===",this.tableData)
  920. },
  921. /** 创建区域 结束 */
  922. /** 创建座位 开始 */
  923. tableCellClassName({row, column, rowIndex, columnIndex}){
  924. //注意这里是解构
  925. //利用单元格的 className 的回调方法,给行列索引赋值
  926. row.index=rowIndex;
  927. column.index=columnIndex;
  928. },
  929. /** 点击某个单元格 */
  930. cellDblclick(row, column, cell, event){
  931. console.log("row, column, cell, event===",row, column, cell, event)
  932. this.currentRow = row.index + 1
  933. this.currentRegion = column.index
  934. this.currentLabel = this.tableHeader[0].title //column.label
  935. this.currentProperty = this.tableHeader[0].key //column.property
  936. console.log('this.tableData===', this.tableData)
  937. console.log("this.tableData111=====",this.currentRow,this.currentProperty,this.tableData[this.currentRow-1][this.currentProperty])
  938. let list = this.tableData[this.currentRow-1][this.currentProperty]
  939. this.currentTabelList = list && list.length>0 ? JSON.parse(JSON.stringify(list)) : []
  940. console.log("row, column, cell, event===",row, column, cell, event)
  941. },
  942. // 计算区域的宽度
  943. countRegionW(){
  944. let list = JSON.parse(JSON.stringify(this.tableHeader))
  945. for(let i = 0; i < list.length; i++) {
  946. list[i].length = 0
  947. for(let j = 0;j < this.tableData.length; j++) {
  948. if(this.tableData[j][list[i].key] && this.tableData[j][list[i].key].length){
  949. if(list[i].length<this.tableData[j][list[i].key].length){
  950. list[i].length = this.tableData[j][list[i].key].length
  951. }
  952. }
  953. }
  954. }
  955. console.log("list=====111",list)
  956. this.tableHeader = [].concat(list)
  957. let colsAll = 0
  958. this.tableHeader.forEach((item,index) => {
  959. if(item.length) {
  960. colsAll = colsAll + item.length
  961. }
  962. })
  963. this.colsAll = colsAll
  964. },
  965. /** 创建座位 结束 */
  966. //列拖拽
  967. columnDrop() {
  968. // 阻止默认行为
  969. document.body.addEventListener("drop", (event) => {
  970. event.preventDefault();
  971. event.stopPropagation();
  972. });
  973. const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
  974. this.sortable = Sortable.create(wrapperTr, {
  975. animation: 180,
  976. delay: 0,
  977. onEnd: (evt) => {
  978. const oldItem = this.dropCol[evt.oldIndex];
  979. this.dropCol.splice(evt.oldIndex, 1);
  980. this.dropCol.splice(evt.newIndex, 0, oldItem);
  981. },
  982. });
  983. },
  984. /** 批量操作 */
  985. // 批量选择
  986. handleSelectionChange(val){
  987. console.log('this.multipleSelection====',val)
  988. this.multipleSelection = val;
  989. },
  990. // 批量操作 打开弹窗编辑
  991. openFormDialogVisible(type,data){
  992. if(type == 'batchSetaName') { // 座位名称
  993. this.formAllType = 'batchSetaName'
  994. this.formDialogVisibleTitle = "批量修改座位名称"
  995. this.formDialogVisible = true
  996. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  997. seatWay: null,
  998. seatLaw: null,
  999. seatWell: null,
  1000. colMin: null,
  1001. colMax: null,
  1002. name: null,
  1003. name1: null,
  1004. name2: null,
  1005. })))
  1006. }
  1007. if(type == 'batchSetaType') { // 座位类型
  1008. this.formAllType = 'batchSetaType'
  1009. this.formDialogVisibleTitle = "批量修改座位类型"
  1010. this.formDialogVisible = true
  1011. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1012. seatTypeId: null,
  1013. })))
  1014. }
  1015. if(type == 'batchSetaPriority') { // 优先级
  1016. this.formAllType = 'batchSetaPriority'
  1017. this.formDialogVisibleTitle = "批量修改优先级"
  1018. this.formDialogVisible = true
  1019. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1020. seatPriorityWay: null,
  1021. setaPriorityNum: null,
  1022. seatPriorityPosition: null
  1023. })))
  1024. }
  1025. if(type == 'batchSetaDisable') { // 座位状态
  1026. this.formAllType = 'batchSetaDisable'
  1027. this.formDialogVisibleTitle = "批量修改座位状态"
  1028. this.formDialogVisible = true
  1029. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1030. status: null,
  1031. })))
  1032. }
  1033. if(type == 'selectBatchSetaName') { // 座位名称
  1034. this.formAllType = 'selectBatchSetaName'
  1035. this.formDialogVisibleTitle = "批量修改座位名称"
  1036. this.formDialogVisible = true
  1037. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1038. seatWay: null,
  1039. seatLaw: null,
  1040. seatWell: null,
  1041. colMin: null,
  1042. colMax: null,
  1043. name: null,
  1044. name1: null,
  1045. name2: null,
  1046. })))
  1047. }
  1048. if(type == 'selectBatchSetaType') { // 座位类型
  1049. this.formAllType = 'selectBatchSetaType'
  1050. this.formDialogVisibleTitle = "批量修改座位类型"
  1051. this.formDialogVisible = true
  1052. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1053. seatTypeId: null,
  1054. })))
  1055. }
  1056. if(type == 'selectBatchSetaPriority') { // 优先级
  1057. this.formAllType = 'selectBatchSetaPriority'
  1058. this.formDialogVisibleTitle = "批量修改优先级"
  1059. this.formDialogVisible = true
  1060. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1061. seatPriorityWay: null,
  1062. setaPriorityNum: null,
  1063. seatPriorityPosition: null
  1064. })))
  1065. }
  1066. if(type == 'selectBatchSetaDisable') { // 座位状态
  1067. this.formAllType = 'selectBatchSetaDisable'
  1068. this.formDialogVisibleTitle = "批量修改座位状态"
  1069. this.formDialogVisible = true
  1070. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1071. status: null,
  1072. })))
  1073. }
  1074. if(type == 'singleEdit') { // 单个编辑
  1075. console.log("data===",data)
  1076. this.formAllType = 'singleEdit'
  1077. this.formDialogVisibleTitle = "修改" + data.name
  1078. this.formDialogVisible = true
  1079. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1080. ...data
  1081. })))
  1082. }
  1083. if(type == 'ticketingSequence') { // 出票顺序
  1084. this.formAllType = 'ticketingSequence'
  1085. this.formDialogVisibleTitle = "出票顺序设置"
  1086. this.formDialogVisible = true
  1087. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1088. printSortIdType: null,
  1089. seatPriorityWay: null,
  1090. setaPriorityNum: null,
  1091. seatPriorityPosition: null
  1092. })))
  1093. }
  1094. if(type == 'selectTicketingSequence') { // 出票顺序
  1095. this.formAllType = 'selectTicketingSequence'
  1096. this.formDialogVisibleTitle = "出票顺序设置"
  1097. this.formDialogVisible = true
  1098. this.$set(this,'formAll',JSON.parse(JSON.stringify({
  1099. printSortIdType: null,
  1100. seatPriorityWay: null,
  1101. setaPriorityNum: null,
  1102. seatPriorityPosition: null
  1103. })))
  1104. }
  1105. this.$nextTick(()=>{
  1106. this.$refs['formAll'].clearValidate()
  1107. })
  1108. },
  1109. // 批量操作 表单验证
  1110. chekeFormAll(formName){
  1111. this.$refs[formName].validate((valid) => {
  1112. if (valid) {
  1113. if(this.formAllType == 'batchSetaType') {
  1114. this.batchSetaTypeFun()
  1115. }else if(this.formAllType == 'batchSetaName') {
  1116. this.batchSetaNameFun()
  1117. }else if(this.formAllType == 'batchSetaPriority') {
  1118. this.batchSetaPriorityFun()
  1119. }else if(this.formAllType == 'selectBatchSetaType') {
  1120. this.selectBatchSetaTypeFun()
  1121. }else if(this.formAllType == 'selectBatchSetaName') {
  1122. this.selectBatchSetaNameFun()
  1123. }else if(this.formAllType == 'selectBatchSetaPriority') {
  1124. this.selectBatchSetaPriorityFun()
  1125. }else if(this.formAllType == 'singleEdit') {
  1126. this.singleEditFun()
  1127. }else if(this.formAllType == 'batchSetaDisable') {
  1128. this.batchSetaDisableFun()
  1129. }else if(this.formAllType == 'selectBatchSetaDisable') {
  1130. this.selectBatchSetaDisableFun()
  1131. }else if(this.formAllType == 'ticketingSequence') {
  1132. this.ticketingSequenceFun()
  1133. }else if(this.formAllType == 'selectTicketingSequence') {
  1134. this.selectTicketingSequenceFun()
  1135. }
  1136. } else {
  1137. console.log('error submit!!');
  1138. return false;
  1139. }
  1140. });
  1141. },
  1142. // 修改单个
  1143. singleEditFun(){
  1144. let color = ''
  1145. let seatLabel = ''
  1146. this.seatTypeList.forEach((item,index)=>{
  1147. if(this.formAll.seatTypeId == item.id) {
  1148. color = item.color
  1149. seatLabel = item.name
  1150. }
  1151. })
  1152. for(let j=0;j<this.tableDataAll.length;j++){
  1153. if(this.formAll.styleCss.id == this.tableDataAll[j].styleCss.id){
  1154. this.tableDataAll[j] = {
  1155. ...this.tableDataAll[j],
  1156. name: this.formAll.name,
  1157. priority: this.formAll.priority,
  1158. seatTypeId: this.formAll.seatTypeId,
  1159. seatLabel: seatLabel,
  1160. color: color,// 座位类型对应的颜色
  1161. status: this.formAll.status,
  1162. //delFlag: this.formAll.delFlag,
  1163. printSortId: this.formAll.printSortId
  1164. }
  1165. break;
  1166. }
  1167. }
  1168. this.formDialogVisible = false
  1169. this.dataProcess()
  1170. },
  1171. // 座位状态
  1172. batchSetaDisableFun() {
  1173. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1174. for(let i=0;i<this.multipleSelection.length;i++){
  1175. for(let j=0;j<this.tableDataAll.length;j++){
  1176. if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1177. listTabel[j] = {
  1178. ...this.tableDataAll[j],
  1179. status: this.formAll.status,
  1180. }
  1181. break;
  1182. }
  1183. }
  1184. }
  1185. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1186. console.log("this.tableDataAll=====",this.tableDataAll)
  1187. // this.batchTableList = JSON.parse(JSON.stringify(this.tableDataAll))
  1188. this.formDialogVisible = false
  1189. this.handleQuery()
  1190. this.dataProcess()
  1191. },
  1192. //批量修改座位类型
  1193. batchSetaTypeFun() {
  1194. let color = ''
  1195. let seatLabel = ''
  1196. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1197. this.seatTypeList.forEach((item,index)=>{
  1198. if(this.formAll.seatTypeId == item.id) {
  1199. color = item.color
  1200. seatLabel = item.name
  1201. }
  1202. })
  1203. for(let i=0;i<this.multipleSelection.length;i++){
  1204. for(let j=0;j<this.tableDataAll.length;j++){
  1205. if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1206. listTabel[j] = {
  1207. ...this.tableDataAll[j],
  1208. seatLabel: seatLabel,
  1209. color: color,// 座位类型对应的颜色
  1210. seatTypeId: this.formAll.seatTypeId,
  1211. }
  1212. break;
  1213. }
  1214. }
  1215. }
  1216. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1217. console.log("this.tableDataAll=====",this.tableDataAll)
  1218. // this.batchTableList = JSON.parse(JSON.stringify(this.tableDataAll))
  1219. this.formDialogVisible = false
  1220. this.handleQuery()
  1221. this.dataProcess()
  1222. },
  1223. // 批量修改名称
  1224. batchSetaNameFun() {
  1225. if(this.formAll.seatWay == 1){ // 相同的
  1226. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1227. for(let i=0;i<this.multipleSelection.length;i++){
  1228. for(let j=0;j<this.tableDataAll.length;j++){
  1229. if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1230. listTabel[j] = {
  1231. ...this.tableDataAll[j],
  1232. name: this.formAll.name
  1233. }
  1234. break;
  1235. }
  1236. }
  1237. }
  1238. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1239. }else if(this.formAll.seatWay == 2){
  1240. let name = (this.formAll.name1?this.formAll.name1:'') + '${row}' + (this.formAll.name?this.formAll.name:'') + '${col}' + (this.formAll.name2?this.formAll.name2:'')
  1241. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1242. for(let i=0;i<this.multipleSelection.length;i++){
  1243. for(let j=0;j<this.tableDataAll.length;j++){
  1244. if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1245. listTabel[j] = {
  1246. ...this.tableDataAll[j],
  1247. name: name.replace('${row}',this.tableDataAll[j].rowNo).replace('${col}',this.tableDataAll[j].columnNo)
  1248. }
  1249. break;
  1250. }
  1251. }
  1252. }
  1253. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1254. }
  1255. this.formDialogVisible = false
  1256. this.handleQuery()
  1257. this.dataProcess()
  1258. },
  1259. // 批量修改优先级
  1260. batchSetaPriorityFun(){
  1261. if(this.formAll.seatPriorityWay == 1){
  1262. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1263. for(let i=0;i<this.multipleSelection.length;i++){
  1264. for(let j=0;j<this.tableDataAll.length;j++){
  1265. if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1266. listTabel[j] = {
  1267. ...this.tableDataAll[j],
  1268. priority: this.formAll.setaPriorityNum
  1269. }
  1270. break;
  1271. }
  1272. }
  1273. }
  1274. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1275. }else{
  1276. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1277. let listSelect = JSON.parse(JSON.stringify(this.multipleSelection))
  1278. if(this.formAll.seatPriorityPosition == 2) {
  1279. listSelect.reverse()
  1280. }
  1281. let num = Number(this.formAll.setaPriorityNum)
  1282. for(let i=0;i<listSelect.length;i++){
  1283. for(let j=0;j<this.tableDataAll.length;j++){
  1284. if(listSelect[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1285. listTabel[j] = {
  1286. ...this.tableDataAll[j],
  1287. priority: num
  1288. }
  1289. if(this.formAll.seatPriorityWay == 2){
  1290. num = num + 1
  1291. }else if(this.formAll.seatPriorityWay == 3){
  1292. num = num - 1
  1293. }
  1294. break;
  1295. }
  1296. }
  1297. }
  1298. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1299. }
  1300. this.formDialogVisible = false
  1301. this.handleQuery()
  1302. this.dataProcess()
  1303. },
  1304. // 批量修改优先级
  1305. ticketingSequenceFun(){
  1306. if(this.formAll.printSortIdType == 1) {
  1307. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1308. for(let i=0;i<this.multipleSelection.length;i++){
  1309. for(let j=0;j<this.tableDataAll.length;j++){
  1310. if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1311. listTabel[j] = {
  1312. ...this.tableDataAll[j],
  1313. printSortId: -9999
  1314. }
  1315. break;
  1316. }
  1317. }
  1318. }
  1319. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1320. }else if(this.formAll.seatPriorityWay == 1){
  1321. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1322. for(let i=0;i<this.multipleSelection.length;i++){
  1323. for(let j=0;j<this.tableDataAll.length;j++){
  1324. if(this.multipleSelection[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1325. listTabel[j] = {
  1326. ...this.tableDataAll[j],
  1327. printSortId: this.formAll.setaPriorityNum
  1328. }
  1329. break;
  1330. }
  1331. }
  1332. }
  1333. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1334. }else{
  1335. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1336. let listSelect = JSON.parse(JSON.stringify(this.multipleSelection))
  1337. if(this.formAll.seatPriorityPosition == 2) {
  1338. listSelect.reverse()
  1339. }
  1340. let num = Number(this.formAll.setaPriorityNum)
  1341. for(let i=0;i<listSelect.length;i++){
  1342. for(let j=0;j<this.tableDataAll.length;j++){
  1343. if(listSelect[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1344. listTabel[j] = {
  1345. ...this.tableDataAll[j],
  1346. printSortId: num
  1347. }
  1348. if(this.formAll.seatPriorityWay == 2){
  1349. num = num + 1
  1350. }else if(this.formAll.seatPriorityWay == 3){
  1351. num = num - 1
  1352. }
  1353. break;
  1354. }
  1355. }
  1356. }
  1357. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1358. }
  1359. this.formDialogVisible = false
  1360. this.handleQuery()
  1361. this.dataProcess()
  1362. },
  1363. /** 批量操作 结束 */
  1364. /** 筛选 */
  1365. handleQuery(){
  1366. let list = []
  1367. list = JSON.parse(JSON.stringify(this.tableDataAll))
  1368. if(this.queryParams.row){
  1369. list = list.filter((item)=>{
  1370. return item.rowNo == this.queryParams.row
  1371. })
  1372. }
  1373. if(this.queryParams.cols){
  1374. list = list.filter((item)=>{
  1375. return item.columnNo == this.queryParams.cols
  1376. })
  1377. }
  1378. if(this.queryParams.name){
  1379. list = list.filter((item)=>{
  1380. return item.name == this.queryParams.name
  1381. })
  1382. }
  1383. if(this.queryParams.seatTypeId){
  1384. list = list.filter((item)=>{
  1385. if(this.queryParams.seatTypeId == -1) {
  1386. return !item.seatTypeId
  1387. }else {
  1388. return item.seatTypeId == this.queryParams.seatTypeId
  1389. }
  1390. })
  1391. }
  1392. this.batchTableList = list
  1393. },
  1394. /** 重置 */
  1395. resetQuery(){
  1396. this.queryParams = {}
  1397. this.handleQuery()
  1398. },
  1399. /** 点击座位排序 座位排序 */
  1400. seatSortingFun(type){
  1401. let list = JSON.parse(JSON.stringify(this.currentTabelList))
  1402. if(type=='rise') { // 升序
  1403. list.sort(function(x,y){
  1404. let num1 = x.columnNo
  1405. let num2 = y.columnNo
  1406. return num1 - num2
  1407. })
  1408. }
  1409. if(type=='fall') { // 降序
  1410. list.sort(function(x,y){
  1411. let num1 = x.columnNo
  1412. let num2 = y.columnNo
  1413. return num2 - num1
  1414. })
  1415. }
  1416. if(type=='symmetry') { // 奇偶对称
  1417. let odd = []
  1418. let even = []
  1419. list.forEach((item,index)=>{
  1420. if(item.columnNo%2==0){
  1421. even.push(item)
  1422. }else {
  1423. odd.push(item)
  1424. }
  1425. })
  1426. odd.sort(function(x,y){
  1427. let num1 = x.columnNo
  1428. let num2 = y.columnNo
  1429. return num2 - num1
  1430. })
  1431. even.sort(function(x,y){
  1432. let num1 = x.columnNo
  1433. let num2 = y.columnNo
  1434. return num1 - num2
  1435. })
  1436. list = odd.concat(even)
  1437. }
  1438. if(type=='reversal'){
  1439. list.reverse()
  1440. }
  1441. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1442. for(let i=0;i<list.length;i++){
  1443. for(let j=0;j<this.tableDataAll.length;j++){
  1444. if(list[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1445. listTabel[j] = {
  1446. ...this.tableDataAll[j],
  1447. sortId: i,
  1448. styleCss: {
  1449. ...this.tableDataAll[j].styleCss,
  1450. sort: i,
  1451. }
  1452. }
  1453. break;
  1454. }
  1455. }
  1456. }
  1457. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1458. console.log("this.tableDataAll=====",this.tableDataAll)
  1459. this.formDialogVisible = false
  1460. this.handleQuery()
  1461. this.dataProcess()
  1462. this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
  1463. },
  1464. // 拖动排序
  1465. draggingSeatSort(){
  1466. let list = JSON.parse(JSON.stringify(this.currentTabelList))
  1467. let listTabel = JSON.parse(JSON.stringify(this.tableDataAll))
  1468. for(let i=0;i<list.length;i++){
  1469. for(let j=0;j<this.tableDataAll.length;j++){
  1470. if(list[i].styleCss.id == this.tableDataAll[j].styleCss.id){
  1471. listTabel[j] = {
  1472. ...this.tableDataAll[j],
  1473. sortId: i,
  1474. styleCss: {
  1475. ...this.tableDataAll[j].styleCss,
  1476. sort: i,
  1477. }
  1478. }
  1479. break;
  1480. }
  1481. }
  1482. }
  1483. this.tableDataAll = JSON.parse(JSON.stringify(listTabel))
  1484. console.log("this.tableDataAll=====",this.tableDataAll)
  1485. console.log("list======",list)
  1486. this.formDialogVisible = false
  1487. this.dataProcess()
  1488. // this.currentTabelList = JSON.parse(JSON.stringify(this.tableData[this.currentRow-1][this.currentProperty]))
  1489. },
  1490. /** 座位升序 赋值 */
  1491. setSetaSote(){
  1492. let list = []
  1493. for(let j = 0;j<this.tableData.length;j++) {
  1494. list[j] = []
  1495. for(let i = 0;i<this.tableHeader.length;i++) {
  1496. list[j] = list[j].concat(this.tableData[j][this.tableHeader[i].key])
  1497. }
  1498. }
  1499. let listCopy = []
  1500. list.forEach((item,index)=>{
  1501. item.forEach((item1,index1)=>{
  1502. list[index][index1].sortId = index1+1
  1503. list[index][index1].styleCss.sort = index1+1
  1504. listCopy.push(list[index][index1])
  1505. })
  1506. })
  1507. console.log("list======",list)
  1508. this.tableDataAll = JSON.parse(JSON.stringify(listCopy))
  1509. },
  1510. /** 保存座位 */
  1511. saveSeat() {
  1512. this.setSetaSote()
  1513. console.log('this.tableDataAll',this.tableDataAll)
  1514. let list = JSON.parse(JSON.stringify(this.tableDataAll))
  1515. list.forEach((item,index)=>{
  1516. if(item.styleCss) {
  1517. list[index].styleCss = JSON.stringify(item.styleCss)
  1518. }
  1519. })
  1520. let styleCss = {
  1521. tableHeader: this.tableHeader
  1522. }
  1523. list.forEach((item,index)=>{
  1524. if(item.styleCss) {
  1525. list[index].styleCss = JSON.stringify(item.styleCss)
  1526. }
  1527. })
  1528. this.$emit('saveSeat',this.rowAll,this.colsAll,list,JSON.stringify(styleCss))
  1529. }
  1530. }
  1531. };
  1532. </script>
  1533. <style scoped lang="scss">
  1534. .sm {
  1535. width: 100%;
  1536. height: 100%;
  1537. box-sizing: border-box;
  1538. display: flex;
  1539. flex-direction: column;
  1540. justify-content: center;
  1541. align-items: center;
  1542. --top-tool-h: 60px;
  1543. --left-tool-w: 350px
  1544. }
  1545. .sm-box-top-tool {
  1546. width: 100%;
  1547. height: var(--top-tool-h);
  1548. box-sizing: border-box;
  1549. display: flex;
  1550. .sm-box-top-tool-legend {
  1551. width: 400px;
  1552. display: flex;
  1553. >div {
  1554. display: flex;
  1555. align-items: center;
  1556. margin-left: 10px;
  1557. >span:first-child {
  1558. display: block;
  1559. width: 10px;
  1560. height: 10px;
  1561. flex-shrink: 0;
  1562. }
  1563. >span:last-child {
  1564. white-space: nowrap;
  1565. margin-left: 5px;
  1566. font-size: 12px;
  1567. }
  1568. }
  1569. }
  1570. }
  1571. .sm-box {
  1572. width: 100%;
  1573. height: calc( 100% - var(--top-tool-h) );
  1574. box-sizing: border-box;
  1575. display: flex;
  1576. justify-content: center;
  1577. --row-w: 26px;
  1578. --row-h: 26px;
  1579. --row-scale: 1;
  1580. }
  1581. .sm-box-tig {
  1582. padding: 10px;
  1583. }
  1584. .sm-scroll-box {
  1585. width: calc( 100% - var(--left-tool-w) );
  1586. height: 100%;
  1587. border: 1px solid #ccc;
  1588. box-sizing: border-box;
  1589. background-color: aqua;
  1590. position: relative;
  1591. .row-item-box {
  1592. border: 1px dashed #ccc;
  1593. width: 100%;
  1594. height: 100%;
  1595. align-items: center;
  1596. padding: 5px;
  1597. }
  1598. .row-item-box:hover {
  1599. background-color: rgba(64, 158, 255,0.3);
  1600. }
  1601. .table-header {
  1602. display: flex;
  1603. padding: 0 20px;
  1604. align-items: center;
  1605. justify-content: center;
  1606. }
  1607. .table-header-item {
  1608. width: var(--row-w);
  1609. height: var(--row-h);
  1610. margin-left: 5px;
  1611. //border: 1px solid #ccc;
  1612. display: flex;
  1613. flex-direction: column;
  1614. flex-shrink: 0;
  1615. font-size: 12px;
  1616. align-items: center;
  1617. box-sizing: border-box;
  1618. justify-content: center;
  1619. overflow: hidden;
  1620. > div {
  1621. width: var(--row-w-i);
  1622. height: var(--row-h-i);
  1623. transform: scale(var(--row-scale));
  1624. display: flex;
  1625. flex-direction: column;
  1626. }
  1627. i {
  1628. color: #fff;
  1629. }
  1630. }
  1631. .table-header-item:first-child {
  1632. margin-left: 0;
  1633. }
  1634. .row-item {
  1635. position: relative;
  1636. width: var(--row-w);
  1637. height: var(--row-h);
  1638. margin-left: 5px;
  1639. border: 1px solid rgba(0,0,0,0.5);
  1640. border-radius: 2px;
  1641. display: flex;
  1642. flex-direction: column;
  1643. flex-shrink: 0;
  1644. font-size: 12px;
  1645. align-items: center;
  1646. box-sizing: border-box;
  1647. justify-content: center;
  1648. overflow: hidden;
  1649. > div {
  1650. width: var(--row-w-i);
  1651. height: var(--row-h-i);
  1652. transform: scale(var(--row-scale));
  1653. display: flex;
  1654. flex-direction: column;
  1655. padding: 5px;
  1656. }
  1657. i {
  1658. color: #000;
  1659. }
  1660. }
  1661. .row-item:first-child {
  1662. margin-left: 0;
  1663. }
  1664. .row-item-no::after {
  1665. content:"";
  1666. display:block;
  1667. position:absolute;
  1668. top:0;
  1669. left:0;
  1670. width: 100%;
  1671. height: 100%;
  1672. background-color:rgba(255,255,255,0.1);
  1673. z-index:-1;
  1674. background-image: url('../../../../assets/nos.png');
  1675. background-size: 50% 50%;
  1676. background-position: 50% 50%;
  1677. background-repeat: no-repeat;
  1678. z-index: 1;
  1679. }
  1680. .row-item-select {
  1681. border: 5px solid #1890ff;
  1682. }
  1683. // .row-item-select::after {
  1684. // content:"";
  1685. // display:block;
  1686. // position:absolute;
  1687. // top:0;
  1688. // left:0;
  1689. // width: 100%;
  1690. // height: 100%;
  1691. // border: 5px solid #1890ff;
  1692. // z-index: 1;
  1693. // padding: 5px;
  1694. // }
  1695. .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
  1696. border-bottom: none !important;
  1697. }
  1698. }
  1699. .table-tool {
  1700. width: var(--left-tool-w);
  1701. height: 100%;
  1702. padding: 0 10px;
  1703. box-sizing: border-box;
  1704. border: 1px solid #ccc;
  1705. }
  1706. .table-tool-tab {
  1707. width: 100%;
  1708. height: 100%;
  1709. ::v-deep .el-tabs {
  1710. width: 100%;
  1711. height: 100%
  1712. }
  1713. ::v-deep .el-tabs__content {
  1714. width: 100%;
  1715. height: calc( 100% - 60px );
  1716. }
  1717. ::v-deep .el-tab-pane {
  1718. width: 100%;
  1719. height: 100%;
  1720. box-sizing: border-box;
  1721. }
  1722. }
  1723. .qu-second-box {
  1724. width: 100%;
  1725. height: 100%;
  1726. .qu-second-row {
  1727. display: flex;
  1728. align-items: center;
  1729. }
  1730. .qu-second-form {
  1731. width: 100%;
  1732. height: 50px;
  1733. overflow: hidden;
  1734. padding-top: 5px;
  1735. box-sizing: border-box;
  1736. border-bottom: 1px solid #ccc;
  1737. }
  1738. .qu-second-info {
  1739. width: 100%;
  1740. height: calc( 100% - 60px );
  1741. overflow: hidden;
  1742. .qu-second-select{
  1743. width: 100%;
  1744. height: 30px;
  1745. display: flex;
  1746. align-items: flex-end;
  1747. padding-bottom: 5px;
  1748. span{
  1749. font-size: 16px;
  1750. font-weight: 600;
  1751. white-space: nowrap;
  1752. }
  1753. span:nth-child(2){
  1754. font-size: 15px;
  1755. }
  1756. span:nth-child(3){
  1757. font-size: 12px;
  1758. margin-left: 5px;
  1759. font-weight: 400;
  1760. }
  1761. }
  1762. .qu-second-info-title {
  1763. width: 100%;
  1764. height: 25px;
  1765. display: flex;
  1766. align-items: flex-end;
  1767. padding-bottom: 5px;
  1768. span:first-child{
  1769. font-size: 14px;
  1770. font-weight: 600;
  1771. }
  1772. span:last-child{
  1773. font-size: 12px;
  1774. margin-left: 10px;
  1775. }
  1776. }
  1777. .qu-second-info-tool {
  1778. width: 100%;
  1779. height: 30px;
  1780. display: flex;
  1781. align-items: center;
  1782. padding-bottom: 5px;
  1783. span:first-child{
  1784. font-size: 14px;
  1785. font-weight: 600;
  1786. }
  1787. i {
  1788. font-size: 12px;
  1789. margin-left: 10px;
  1790. background-color: #1890FF;
  1791. color: #fff;
  1792. padding: 5px;
  1793. transform: scale(0.9);
  1794. border-radius: 5px;
  1795. cursor: pointer;
  1796. }
  1797. }
  1798. .qu-second-info-list {
  1799. width: 100%;
  1800. height: calc( 100% - 70px );
  1801. box-sizing: border-box;
  1802. padding-right: 5px;
  1803. overflow: hidden;
  1804. overflow-y: auto;
  1805. .qu-second-info-item {
  1806. width: 100%;
  1807. height: 40px;
  1808. box-sizing: border-box;
  1809. border: 1px solid #ccc;
  1810. margin-bottom: 5px;
  1811. display: flex;
  1812. justify-content: space-between;
  1813. align-items: center;
  1814. font-size: 16px;
  1815. border-radius: 10px;
  1816. padding: 0 10px;
  1817. >span {
  1818. width: 100%;
  1819. height: 100%;
  1820. display: flex;
  1821. align-items: center;
  1822. padding: 0 20px;
  1823. font-weight: 600;
  1824. }
  1825. >div {
  1826. display: flex;
  1827. flex-direction: column;
  1828. span {
  1829. display: flex;
  1830. padding: 0 10px;
  1831. height: 100%;
  1832. align-items: center;
  1833. font-size: 12px;
  1834. white-space: nowrap;
  1835. }
  1836. span:first-child {
  1837. color: #409eff;
  1838. }
  1839. span:last-child {
  1840. color: #f56c6c;
  1841. }
  1842. }
  1843. }
  1844. }
  1845. .qu-second-info-list::-webkit-scrollbar {
  1846. width: 2px;
  1847. }
  1848. .qu-second-info-list::-webkit-scrollbar-track {
  1849. background-color: #ccc;
  1850. }
  1851. }
  1852. }
  1853. .qu-batch-box {
  1854. width: 100%;
  1855. height: 100%;
  1856. box-sizing: border-box;
  1857. .qu-batch-form {
  1858. height: 120px;
  1859. box-sizing: border-box;
  1860. padding-top: 5px;
  1861. }
  1862. .qu-batch-tool {
  1863. border-top: 1px solid #ccc;
  1864. padding-top: 5px;
  1865. height: 80px;
  1866. box-sizing: border-box;
  1867. >div {
  1868. height: 50%;
  1869. display: flex;
  1870. align-items: center;
  1871. box-sizing: border-box;
  1872. }
  1873. }
  1874. .qu-batch-table {
  1875. height: calc( 100% - 210px );
  1876. box-sizing: border-box;
  1877. }
  1878. }
  1879. .qu-select-box {
  1880. width: 100%;
  1881. height: 100%;
  1882. box-sizing: border-box;
  1883. .qu-select-select {
  1884. height: 30px;
  1885. box-sizing: border-box;
  1886. font-size: 12px;
  1887. display: flex;
  1888. align-items: flex-end;
  1889. }
  1890. .qu-select-tool {
  1891. border-top: 1px solid #ccc;
  1892. padding-top: 5px;
  1893. height: 80px;
  1894. box-sizing: border-box;
  1895. >div {
  1896. height: 50%;
  1897. display: flex;
  1898. align-items: center;
  1899. box-sizing: border-box;
  1900. }
  1901. }
  1902. .qu-select-table {
  1903. height: calc( 100% - 120px );
  1904. box-sizing: border-box;
  1905. }
  1906. }
  1907. ::v-deep .exchange_table {
  1908. th {
  1909. padding: 0 !important;
  1910. height: 10px;
  1911. line-height: 10px;
  1912. }
  1913. td {
  1914. padding: 0 !important;
  1915. height: 30px;
  1916. line-height: 30px;
  1917. }
  1918. .cell {
  1919. height: 100%;
  1920. }
  1921. td.el-table__cell, th.el-table__cell.is-leaf {
  1922. border-bottom: none !important;
  1923. }
  1924. }
  1925. #moveSelected{
  1926. position:absolute;
  1927. background-color: blue;
  1928. opacity:0.3;
  1929. border:1px dashed #d9d9d9;
  1930. top:0;
  1931. left:0;
  1932. }
  1933. </style>