seatTemplateEdit.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  1. <!--
  2. * @Description: 新增/编辑弹框
  3. * @Author: Sugar.
  4. * @Date: 2023-11-24 13:55:00
  5. * @LastEditors: Sugar.
  6. * @LastEditTime: 22023-11-24 13:55:00
  7. * @FilePath: \cattle_webui\src\views\performanceHallMr\dialog\seatTemplateEdit.vue
  8. * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
  9. -->
  10. <template>
  11. <el-dialog
  12. :title="title"
  13. :visible.sync="open"
  14. width="1200px"
  15. append-to-body
  16. :close-on-click-modal="false"
  17. @close="cancel"
  18. >
  19. <div class="dialog">
  20. <el-row>
  21. <el-col :span="18" style="padding-right: 15px">
  22. <div class="title-class">
  23. <el-row>
  24. <el-col :span="8" style="padding-right: 15px">
  25. <el-input placeholder="请输入" v-model.number="seatMapRow">
  26. <template slot="append">行</template>
  27. </el-input>
  28. </el-col>
  29. <el-col :span="8" style="padding-left: 15px">
  30. <el-input placeholder="请输入" v-model.number="seatMapCol">
  31. <template slot="append">列</template>
  32. </el-input>
  33. </el-col>
  34. <el-col :span="8" style="padding-left: 15px">
  35. <el-button @click="setRowCol(seatMapRow, seatMapCol)" style="width: 100%;" type="primary">生成模板</el-button>
  36. </el-col>
  37. </el-row>
  38. </div>
  39. <div class="box-top-class" style="position:relative;">
  40. <div class="stage-class">舞台</div>
  41. <el-button :type="!dragStatus ? 'danger' : 'primary'" size="mini" @click="dragEven" style="position: absolute; bottom: 0; right: 0" icon="el-icon-rank">{{dragStatus ? '开始设置' : '关闭设置'}}</el-button>
  42. </div>
  43. <div class="box-class scroll-container-class"
  44. v-if="seatType"
  45. @contextmenu.prevent.stop="contextmenuEven"
  46. @wheel.prevent="wheelHandle"
  47. ref="scrollContainer"
  48. style="position: relative; overflow: hidden; padding: 0;"
  49. >
  50. <!-- 画框确定 -->
  51. <div class="draw-dialog-class" id="draw-dialog-type" v-show="drawDialogType">
  52. <div class="box-class" style="border: none; height: 240px">
  53. <el-form :model="drawForm" ref="drawForm" :rules="drawRules" label-width="100px" label-position="top">
  54. <el-form-item label="" prop="status">
  55. <el-radio v-model="drawForm.status" label="1">可售</el-radio>
  56. <el-radio v-model="drawForm.status" label="2">不可售</el-radio>
  57. </el-form-item>
  58. <el-form-item label="" prop="seatTypeId">
  59. <el-select
  60. v-model="drawForm.seatTypeId"
  61. placeholder="座位类型"
  62. clearable
  63. style="width: 100%"
  64. @change="seatTypeDrawChange"
  65. >
  66. <el-option
  67. v-for="dict in seatList"
  68. :key="dict.id"
  69. :label="dict.name"
  70. :value="dict.id"
  71. />
  72. </el-select>
  73. </el-form-item>
  74. <el-form-item label="">
  75. <el-input
  76. v-model.number="drawForm.priority"
  77. placeholder="座位自动分配优先级"
  78. clearable
  79. style="width: 100%;"
  80. />
  81. </el-form-item>
  82. <el-form-item >
  83. <el-button @click="drawDialogClen">取 消</el-button>
  84. <el-button @click="drawDialogOk" style="float: right" type="primary">确 定</el-button>
  85. </el-form-item>
  86. </el-form>
  87. </div>
  88. </div>
  89. <div style="position: relative;">
  90. <div class="box-bottom-class scroll-container" style="position: absolute; width: 100%; height: 100%" id="drawBox" v-drag :style="{ width: boxWidth ? boxWidth + 'px' : '100%', height: boxWidth ? boxWidth + 'px' : '100%'}" ref="seatBox" v-if="seatType">
  91. <div v-for="row in seatMap.row" :key="row" style="display: inline-block">
  92. <div class="seat-tag"
  93. :id="row+'_'+col"
  94. @click.stop="setSeatTemplateMap(row, col)"
  95. v-for="col in seatMap.col"
  96. :key="col"
  97. :style="{
  98. width: seatWidth + 'px',
  99. height: seatWidth + 'px',
  100. backgroundColor: colSeatMap[row+'_'+col] && colSeatMap[row+'_'+col].color ? colSeatMap[row+'_'+col].color : ''}"
  101. >
  102. <div v-if="seatWidth > 160" :style="{paddingTop: (seatWidth / 4) + 'px', width: seatWidth + 'px', height: seatWidth + 'px'}" class="seat-p-class">
  103. <p style="font-size: 16px !important;"><span v-if="colSeatMap[row+'_'+col].name">{{colSeatMap[row+'_'+col].name}}</span><span style="font-size: 14px !important;" v-if="colSeatMap[row+'_'+col].seatLabel">({{colSeatMap[row+'_'+col].seatLabel}})</span></p>
  104. <p style="font-size: 14px !important;" v-if="colSeatMap[row+'_'+col].priority">自动分配优先级 <span>({{colSeatMap[row+'_'+col].priority}})</span></p>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <div style="margin-top: 5px">
  112. 总座位数:{{ seatMap.row * seatMap.col || 0}}; 可售数量:<span style="color: #67c23a">{{ canNum.length }}</span>; 不可售数量:<span style="color: #f56c6c">{{ unCanNum.length }}</span>
  113. </div>
  114. </el-col>
  115. <el-col :span="6" style="padding-left: 15px">
  116. <div class="title-class">座位设置</div>
  117. <div class="box-class">
  118. <el-form :model="form" ref="form" label-width="100px" label-position="top">
  119. <el-form-item label="是否可售">
  120. <el-radio v-model="form.status" label="1">可售</el-radio>
  121. <el-radio v-model="form.status" label="2">不可售</el-radio>
  122. </el-form-item>
  123. <el-form-item label="座位类型">
  124. <el-select
  125. v-model="form.seatTypeId"
  126. placeholder="座位类型"
  127. clearable
  128. style="width: 100%"
  129. @change="seatTypeChange"
  130. >
  131. <el-option
  132. v-for="dict in seatList"
  133. :key="dict.id"
  134. :label="dict.name"
  135. :value="dict.id"
  136. />
  137. </el-select>
  138. </el-form-item>
  139. <el-form-item label="座位自动分配优先级">
  140. <el-input
  141. v-model.number="form.priority"
  142. placeholder="优先级"
  143. clearable
  144. style="width: 100%;"
  145. />
  146. </el-form-item>
  147. <el-form-item label="自定义座位名">
  148. <el-input
  149. v-model="form.name"
  150. placeholder="自定义座位名"
  151. clearable
  152. style="width: 100%;"
  153. />
  154. </el-form-item>
  155. <el-form-item >
  156. <el-button @click="setSeatMap" style="width: 100%; margin-top: 20px" type="primary">确 定</el-button>
  157. </el-form-item>
  158. </el-form>
  159. </div>
  160. </el-col>
  161. </el-row>
  162. </div>
  163. <span slot="footer" class="dialog-footer">
  164. <el-button @click="cancel">取消</el-button>
  165. <el-button
  166. type="primary"
  167. @click="submitForm"
  168. v-loading.fullscreen.lock="loading"
  169. element-loading-text="提交中..."
  170. element-loading-spinner="el-icon-loading"
  171. element-loading-background="rgba(0, 0, 0, 0.8)"
  172. >
  173. <span v-if="loading">提交中...</span>
  174. <span v-else>保存</span>
  175. </el-button>
  176. </span>
  177. </el-dialog>
  178. </template>
  179. <script>
  180. import { pageList } from '@/api/seatTypeMr/seatTypeMr'
  181. import { seatSaveAndEdit, saveAndEdit, getSelectById } from "@/api/performanceHallMr/performanceHallMr";
  182. import { getToken } from "@/utils/auth";
  183. export default {
  184. name: "seatTemplateEdit",
  185. that: this,
  186. data() {
  187. return {
  188. title: "编辑",
  189. model: "EDIT",
  190. activeName: '01',
  191. open: false,
  192. seatType: false,
  193. loading: false,
  194. seatWidth: null,
  195. seatMap: {
  196. row: 0,
  197. col: 0,
  198. },
  199. seatMapRow: '',
  200. seatMapCol: '',
  201. seatSetMap: {},
  202. seatTemplateMap: [],
  203. colSeatMap: {},
  204. form: {
  205. id: undefined,
  206. status: "1",
  207. content: "",
  208. },
  209. seatList: [],
  210. auditoriumId: '',
  211. zoom: 10,
  212. boxWidth: '',
  213. initWidth: '',
  214. moveStatus: false,
  215. mouseMap: {},
  216. mousemoveMap: {},
  217. scrollTop: 0,
  218. scrollLeft: 0,
  219. scrollEvenTop: 0,
  220. scrollEvenLeft: 0,
  221. dragStatus: true,
  222. canNum: [],
  223. unCanNum: [],
  224. drawForm: {},
  225. drawDialogType: false,
  226. drawRules: {
  227. status: [{ required: true, message: "请选择状态", trigger: "blur" }],
  228. seatTypeId: [{ required: true, message: "请选择座位类型", trigger: "blur" }]
  229. },
  230. };
  231. },
  232. methods: {
  233. drawDialogClen() {
  234. let drawDialog = document.getElementById("draw-dialog-type");
  235. drawDialog.style.display = "none";
  236. let drawDiv = document.getElementById("drawDiv");
  237. drawDiv.remove();
  238. this.$forceUpdate();
  239. },
  240. // 画框座位设置
  241. drawDialogOk() {
  242. console.log(this.colSeatMap)
  243. this.$refs["drawForm"].validate(async (valid) => {
  244. if (valid) {
  245. let drawDialog = document.getElementById("drawDiv");
  246. // 获取div元素的坐标点
  247. let rect = drawDialog.getBoundingClientRect();
  248. let P_div = document.getElementById("drawBox");
  249. let test_div = document.getElementById("1_12");
  250. let P_div_list = P_div.children; // 获取行子集
  251. let select_div = [];
  252. // 循环判断是否在选择框里
  253. for (let i = 0; i < P_div_list.length; i++) {
  254. if(P_div_list[i] && P_div_list[i].childNodes) {
  255. let child_div = P_div_list[i].children
  256. for (let j = 0; j <child_div.length; j++) {
  257. let rect_div = child_div[j].getBoundingClientRect();
  258. if(rect.top < (rect_div.top + rect_div.height) && rect.bottom > (rect_div.bottom - rect_div.height) &&
  259. rect.left < (rect_div.left + rect_div.width) && rect.right > (rect_div.right - rect_div.width)) {
  260. select_div.push(i+"_"+j);
  261. }
  262. }
  263. }
  264. }
  265. select_div.forEach(item => {
  266. let row_col = item.split("_");
  267. this.setSeatDrawMap(parseInt(row_col[0]) + 1, parseInt(row_col[1]) + 1);
  268. })
  269. this.drawDialogClen()
  270. }
  271. });
  272. },
  273. // 画框座位放置参数
  274. setSeatDrawMap(row, col) {
  275. let map = this.colSeatMap[row + '_' +col];
  276. map.status = this.drawForm.status;
  277. map.color = this.drawForm.seat.color;
  278. map.seatTypeId = this.drawForm.seat.seatTypeId;
  279. map.seatLabel = this.drawForm.seat.seatLabel;
  280. map.name = "";
  281. map.priority = this.drawForm.priority;
  282. if(this.drawForm.status == 2) {
  283. this.map.color = '#7d7d7e';
  284. this.map.seatTypeId = '';
  285. this.map.seatLabel = '';
  286. }
  287. this.$set(this.colSeatMap, row + '_' +col, map);
  288. this.countNum();
  289. this.$forceUpdate()
  290. },
  291. // 鼠标滚动
  292. wheelHandle(e) {
  293. if(e.wheelDelta > 0){
  294. this.seatWidth = Math.trunc(this.seatWidth + 10);
  295. } else {
  296. if(this.initWidth > this.seatWidth + 5){
  297. // this.seatWidth = this.initWidth;
  298. } else {
  299. this.seatWidth = Math.trunc(this.seatWidth -10)
  300. }
  301. }
  302. this.boxWidth = this.seatWidth * this.seatMap.col + 100;
  303. // this.seatWidth = (this.seatWidth + this.zoom);
  304. this.$forceUpdate();
  305. },
  306. contextmenuEven(e) {
  307. return false;
  308. },
  309. dragEven(){
  310. this.dragStatus = !this.dragStatus;
  311. },
  312. /**
  313. * 打开弹框
  314. * @date 2023-11-22
  315. * @param {any} obj
  316. * @returns {any}
  317. */
  318. openDialog(title, obj) {
  319. this.open = true;
  320. this.seatType = false;
  321. this.getSeatTypeList();
  322. this.colSeatMap = {}
  323. this.drawForm = {};
  324. this.boxWidth = 0;
  325. this.dragStatus = true;
  326. this.form = {
  327. status: '1'
  328. }
  329. if (obj){
  330. this.title = "座位模板";
  331. this.auditoriumId = obj.id;
  332. this.$set(this.seatMap, 'row', obj.rows);
  333. this.$set(this.seatMap, 'col', obj.cols);
  334. this.$set(this, 'seatMapRow', obj.rows);
  335. this.$set(this, 'seatMapCol', obj.cols);
  336. this.getSelectByIdApi(obj)
  337. }else{
  338. this.seatType = true;
  339. this.title = "座位模板";
  340. this.$nextTick(() => {
  341. this.$refs["form"].clearValidate();
  342. });
  343. }
  344. },
  345. /** 获取详情 */
  346. getSelectByIdApi(row) {
  347. const id = row.id
  348. getSelectById(id).then(response => {
  349. const dataList = response.data;
  350. this.$nextTick(() =>{
  351. dataList.forEach(item => {
  352. if(item.status == 2){
  353. item.color = '#7d7d7e';
  354. }
  355. this.$set(this.colSeatMap, item.rowNo + '_' + item.columnNo, item);
  356. })
  357. this.seatType = true;
  358. this.$nextTick(() =>{
  359. this.boxWidth = this.$refs.seatBox.offsetWidth;
  360. this.seatWidth = ((this.$refs.seatBox.offsetWidth - 10 - (this.seatMap.col * 2))/this.seatMap.col);
  361. this.initWidth = Math.trunc((this.$refs.seatBox.offsetWidth - 10 - (this.seatMap.col * 2))/this.seatMap.col);
  362. })
  363. this.countNum();
  364. })
  365. });
  366. },
  367. /** 设置座位模板行列 */
  368. setRowCol(row, col) {
  369. if(!row || !col){
  370. this.$message.error("请输入行和列!");
  371. return false;
  372. }
  373. if(row <= 0 || col <= 0){
  374. this.$message.error("请输入大于0的行和列!");
  375. return false;
  376. }
  377. if(this.colSeatMap) {
  378. this.$confirm('此操作将重置座位模板, 是否继续?', '提示', {
  379. confirmButtonText: '确定',
  380. cancelButtonText: '取消',
  381. type: 'warning'
  382. }).then(() => {
  383. this.seatMap.row = row;
  384. this.seatMap.col = col;
  385. this.seatType = false;
  386. this.seatType = true;
  387. this.colSeatMap = {}
  388. for (let i = 1; i < this.seatMap.row + 1; i++) {
  389. for (let j = 1; j < this.seatMap.col + 1; j++) {
  390. let rowColMap = {
  391. "auditoriumId": this.auditoriumId,
  392. "name": "",
  393. "rowNo": i,
  394. "columnNo": j,
  395. "seatTypeColor": '#fdfdfd',
  396. "seatTypeId": "",
  397. "seatLabel": "",
  398. "priority": "",
  399. "status": 2
  400. };
  401. this.$set(this.colSeatMap, i + '_' + j, rowColMap);
  402. }
  403. }
  404. this.$nextTick(() =>{
  405. this.boxWidth = this.$refs.seatBox.offsetWidth;
  406. this.seatWidth = ((this.$refs.seatBox.offsetWidth - 10 - (this.seatMap.col * 2))/this.seatMap.col);
  407. this.initWidth = Math.trunc((this.$refs.seatBox.offsetWidth - 10 - (this.seatMap.col * 2))/this.seatMap.col);
  408. })
  409. this.countNum();
  410. }).catch(() => {
  411. });
  412. }
  413. },
  414. /** 座位类型列表 */
  415. getSeatTypeList() {
  416. pageList(this.addDateRange({pageNum: 1, pageSize: 100}))
  417. .then(response => {
  418. this.seatList = response.data.rows;
  419. }
  420. );
  421. },
  422. /** 座位类型选择事件 */
  423. seatTypeChange(val) {
  424. this.$set(this.form, 'priority', '');
  425. this.$set(this.form, 'name', '');
  426. this.seatList.forEach(item => {
  427. if(val == item.id){
  428. this.form.seat = item
  429. }
  430. })
  431. },
  432. /** 画框座位类型选择事件 */
  433. seatTypeDrawChange(val) {
  434. this.$set(this.drawForm, 'priority', '');
  435. this.seatList.forEach(item => {
  436. if(val == item.id){
  437. this.drawForm.seat = item
  438. }
  439. })
  440. },
  441. /** 座位设置确认事件 */
  442. setSeatMap() {
  443. this.seatSetMap = {};
  444. this.seatSetMap.status = this.form.status;
  445. this.seatSetMap.color = this.form.seat.color;
  446. this.seatSetMap.seatTypeId = this.form.seat.id;
  447. this.seatSetMap.seatLabel = this.form.seat.name;
  448. this.seatSetMap.name = this.form.name;
  449. this.seatSetMap.priority = this.form.priority;
  450. if(this.seatSetMap.status == 2) {
  451. this.seatSetMap.color = '#7d7d7e';
  452. this.seatSetMap.seatTypeId = '';
  453. this.seatSetMap.seatLabel = '';
  454. }
  455. },
  456. // 计算可售和不可售数量
  457. countNum() {
  458. this.canNum = [];
  459. this.unCanNum = [];
  460. if(this.colSeatMap) {
  461. for (const key in this.colSeatMap) {
  462. if(this.colSeatMap[key].status == 2 || !this.colSeatMap[key].status){
  463. this.unCanNum.push(key)
  464. } else if (this.colSeatMap[key].status == 1) {
  465. this.canNum.push(key)
  466. }
  467. }
  468. }
  469. },
  470. // 点击座位放置参数
  471. setSeatTemplateMap(row, col) {
  472. if(this.dragStatus){
  473. return false
  474. }
  475. if(!this.seatSetMap.status){
  476. this.seatSetMap.color = '#7d7d7e';
  477. }
  478. let map = this.colSeatMap[row + '_' +col];
  479. map.status = this.seatSetMap.status;
  480. map.color = this.seatSetMap.color;
  481. map.seatTypeId = this.seatSetMap.seatTypeId;
  482. map.seatLabel = this.seatSetMap.seatLabel;
  483. map.name = this.seatSetMap.name;
  484. map.priority = this.seatSetMap.priority;
  485. this.$set(this.colSeatMap, row + '_' +col, map);
  486. this.countNum();
  487. this.$forceUpdate()
  488. },
  489. /**
  490. * 保存
  491. * @date 2023-11-22
  492. * @returns {any}
  493. */
  494. submitForm() {
  495. let that = this;
  496. this.$refs["form"].validate(async (valid) => {
  497. if (valid) {
  498. let postList = []
  499. for (const codeKey in this.colSeatMap) {
  500. postList.push(this.colSeatMap[codeKey])
  501. }
  502. try {
  503. this.loading = true;
  504. const { code } = await saveAndEdit({ id: this.auditoriumId, rows: this.seatMap.row, cols: this.seatMap.col });
  505. if (code === 200) {
  506. let postList = []
  507. for (const codeKey in this.colSeatMap) {
  508. postList.push(this.colSeatMap[codeKey])
  509. }
  510. const { code } = await seatSaveAndEdit(postList);
  511. if (code === 200) {
  512. that.$message.success("操作成功!");
  513. that.$emit("getList");
  514. that.cancel();
  515. }
  516. }
  517. } catch (error) {
  518. } finally {
  519. this.loading = false;
  520. }
  521. }
  522. });
  523. },
  524. /**
  525. * 重置
  526. * @date 2023-11-22
  527. * @returns {any}
  528. */
  529. reset() {
  530. this.$refs["form"].resetFields();
  531. this.form.id = undefined;
  532. },
  533. /**
  534. * 关闭弹框
  535. * @date 2023-11-22
  536. * @returns {any}
  537. */
  538. cancel() {
  539. this.reset();
  540. this.open = false;
  541. },
  542. /**
  543. * 上传成功
  544. * @date 2023-11-22
  545. * @param {any} res
  546. * @returns {any}
  547. */
  548. handleAvatarSuccess(res) {
  549. if (res.code === 200) {
  550. // this.form.mainImg = res?.data?.url;
  551. this.$set(this.form, 'mainImg', res?.data?.url)
  552. }
  553. },
  554. /**
  555. * 上传文件之前之前
  556. * @date 2023-11-22
  557. * @param {any} file
  558. * @returns {any}
  559. */
  560. beforeAvatarUpload(file) {
  561. const isJPG = file.type === "image/jpeg" || "image/png";
  562. if (!isJPG) {
  563. this.$message.error("上传头像图片只能是jpg或png格式!");
  564. }
  565. return isJPG;
  566. },
  567. },
  568. };
  569. </script>
  570. <style lang="scss" scoped>
  571. .dialog {
  572. padding: 0 30px;
  573. max-height: 75vh;
  574. overflow-y: auto;
  575. }
  576. .draw-dialog-class{
  577. border-radius: 10px;
  578. height: 240px;
  579. width: 200px;
  580. background-color: #fff;
  581. position: absolute;
  582. z-index: 55;
  583. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  584. }
  585. .dialog {
  586. padding: 0 30px;
  587. .title-class{
  588. text-align: center;
  589. color: #6e6e6e;
  590. margin: 10px auto;
  591. }
  592. .box-top-class{
  593. .stage-class{
  594. margin: 10px auto;
  595. width: 160px;
  596. height: 80px;
  597. border: 2px solid #7d7d7e;
  598. text-align: center;
  599. line-height: 80px;
  600. }
  601. }
  602. .box-class ::-webkit-scrollbar{ /*滚动条基本样式,高度*/
  603. width:10px;height:10px;
  604. }
  605. .box-class{
  606. width: 100%;
  607. height: 500px;
  608. border: 2px solid #7d7d7e;
  609. border-radius: 4px;
  610. padding: 10px;
  611. .box-bottom-class{
  612. //border: 2px solid #5656c2;
  613. //margin-top: 15px;
  614. //padding-left: 4px;
  615. .seat-tag{
  616. display: inline-block;
  617. border: 1px solid #7d7d7e;
  618. margin-right: 2px;
  619. cursor: pointer;
  620. background: url("../../../../assets/images/seat-icon.png") no-repeat;
  621. background-size: 100% 100%;
  622. position: relative;
  623. &:hover{
  624. opacity: 0.8;
  625. }
  626. }
  627. .seat-p-class{
  628. position: absolute;
  629. left: 0;
  630. top: 0;
  631. text-align: center;
  632. font-size: 18px;
  633. display: inline-block;
  634. color: white;
  635. }
  636. }
  637. }
  638. .upload-btn {
  639. width: 100px;
  640. height: 100px;
  641. background-color: #fbfdff;
  642. border: dashed 1px #c0ccda;
  643. border-radius: 5px;
  644. i {
  645. font-size: 30px;
  646. margin-top: 20px;
  647. }
  648. &-text {
  649. margin-top: -10px;
  650. }
  651. }
  652. .avatar {
  653. cursor: pointer;
  654. }
  655. }
  656. </style>