applicationDetails.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  1. <!--
  2. * @Description: 详情弹框
  3. * @Author: Sugar.
  4. * @Date: 2023-11-24 13:55:00
  5. * @LastEditors: Sugar.
  6. * @LastEditTime: 2023-11-24 13:55:00
  7. * @FilePath: \cattle_webui\src\views\team\applicationMr\applicationDetails.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="detailsType?'95%':'800px'"
  15. append-to-body
  16. :close-on-click-modal="false"
  17. @close="cancel"
  18. >
  19. <div v-loading="initLoading" class="dialog dialog-bbb" :style="{'--widdd': detailsType?'500px':'100%'}" v-if="form">
  20. <div>
  21. <!-- 基础信息 -->
  22. <div class="title-class" style="margin-top: 0">基础信息</div>
  23. <el-row>
  24. <el-col :span="12">
  25. <div class="grid-content bg-purple item-class">团队名称: <span>{{ details.teamName || ''}}</span></div>
  26. </el-col>
  27. <el-col :span="12">
  28. <div class="grid-content bg-purple item-class">团队类型: <span><dict-tag style="display: inline-block" :options="dict.type.team_type" :value="details.teamType"/></span></div>
  29. </el-col>
  30. <el-col :span="12">
  31. <div class="grid-content bg-purple item-class">预约场馆: <span>{{ details.theatreName || '' }}</span></div>
  32. </el-col>
  33. <el-col :span="12">
  34. <div class="grid-content bg-purple item-class">预约演出厅: <span>{{ details.auditoriumName || '' }}</span></div>
  35. </el-col>
  36. <el-col :span="12">
  37. <div class="grid-content bg-purple item-class">预约剧目: <span>{{ details.performName || '' }}</span></div>
  38. </el-col>
  39. <el-col :span="12">
  40. <div class="grid-content bg-purple item-class">票务名称: <span>{{ details.goodsName || '' }}</span></div>
  41. </el-col>
  42. <el-col :span="12">
  43. <div class="grid-content bg-purple item-class">座位类型: <span>{{ details.seatTypeName || '' }}</span></div>
  44. </el-col>
  45. <el-col :span="12">
  46. <div class="grid-content bg-purple item-class">团购单价: <span>¥{{ details.price || '' }}</span></div>
  47. </el-col>
  48. <el-col :span="12">
  49. <div class="grid-content bg-purple item-class">预约时间: <span>{{ details.performDate || '' }}日 {{ details.performTimeStart +' --' || '' }} {{ details.performTimeEnd || '' }}</span></div>
  50. </el-col>
  51. <el-col :span="12">
  52. <div class="grid-content bg-purple item-class">报名时间: <span>{{ details.createTime || '' }}</span></div>
  53. </el-col>
  54. <el-col :span="12">
  55. <div class="grid-content bg-purple item-class">负责人: <span>{{ details.teamContact || '' }}</span></div>
  56. </el-col>
  57. <el-col :span="12">
  58. <div class="grid-content bg-purple item-class">联系电话: <span>{{ details.teamMobile || '' }}</span></div>
  59. </el-col>
  60. <el-col :span="12" v-if="details.errReason">
  61. <div class="grid-content bg-purple item-class">驳回原因: <span style="color: red;">{{ details.errReason || '' }}</span></div>
  62. </el-col>
  63. </el-row>
  64. <!-- 观影人员信息 -->
  65. <div class="title-class">观影人员信息</div>
  66. <el-row>
  67. <el-col :span="24">
  68. <el-table size="mini" ref="tables" :data="details.viewersList" border>
  69. <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
  70. <el-table-column label="姓名" align="center" prop="name" />
  71. <el-table-column label="身份证号码" align="center" prop="cardId" />
  72. </el-table>
  73. </el-col>
  74. </el-row>
  75. </div>
  76. <div class="dialog-bbb_2" v-if="detailsType">
  77. <div class="seat-tool-box">
  78. <span class="demonstration">座位大小</span>
  79. <div class="seat-tool-box-slider">
  80. <el-slider v-model="scaleNum" :min="30" :max="100"></el-slider>
  81. </div>
  82. <div style="display: flex;margin-left: 20px;" v-if="seatMapList&&JSON.stringify(seatMapList) != '{}'">
  83. <div>座位余量:</div>
  84. <div
  85. :key="index"
  86. v-for="(item,index) in seatTypeList"
  87. style="margin-left: 10px;align-items: center;"
  88. >
  89. <span :style="{color: item.color?item.color:'none'}">{{item.name ? (item.name+'(剩余:'+ (item.num||0) +')') : '暂未命名'}}</span>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="seat-box" :style="{'--scaleNum': scaleNum/100}">
  94. <!-- 选择座位 -->
  95. <div class="seat-list-box">
  96. <!-- 座位排版 -->
  97. <div id="seatbox-me" ref="seatbox" class="dialogss">
  98. <div class="dialogss-box" :style="{width: width*(scaleNum/100) + 'px', margin: justifyContent ? 'auto' : 'unset'}">
  99. <div
  100. style="width: 100%;position: absolute;"
  101. class="seat-box-class clearfix" v-if="seatMapList"
  102. >
  103. <div
  104. class="seat-item-class-box"
  105. v-for="(item1, index1) in seatMapListKey"
  106. :key="item1.key"
  107. >
  108. <div
  109. class="seat-item-class"
  110. :class="setSeatClass(item)"
  111. v-for="(item, index) in seatMapList[item1.key]"
  112. :style="{backgroundColor: item.color ? item.color : 'none'}"
  113. @click.stop="seatClick(item)"
  114. :key="index">
  115. <p class="text-class">{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div style="margin-top: 5px; margin-left: 30px;display: flex;">
  122. <div style="flex-shrink: 0;">
  123. 已勾选:{{ seatSelectList.length }}个座位
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. <span slot="footer" class="dialog-footer" v-if="!detailsType">
  131. <el-button type="primary" @click="cancel">关闭</el-button>
  132. </span>
  133. <span slot="footer" class="dialog-footer" v-if="detailsType">
  134. <!-- <el-button type="primary" @click="passOpenEven" style="margin-right: 20px">通过</el-button> -->
  135. <el-button
  136. type="primary"
  137. @click="submitPass"
  138. :loading="loading"
  139. >
  140. <span v-if="loading">提交中...</span>
  141. <span v-else>通过</span>
  142. </el-button>
  143. <el-button type="danger" @click="setRejectOpen" >驳回</el-button>
  144. </span>
  145. <!-- 审核驳回 -->
  146. <el-dialog
  147. title="审核驳回"
  148. :visible.sync="rejectOpen"
  149. width="700px"
  150. append-to-body
  151. :close-on-click-modal="false"
  152. @close="rejectOpen = false"
  153. >
  154. <div class="dialog">
  155. <el-form :model="rejectForm" ref="refRejectForm" :rules="rejectRules" label-width="90px">
  156. <el-form-item label="驳回原因:" prop="errReason">
  157. <el-input
  158. type="textarea"
  159. placeholder="请输入驳回原因"
  160. v-model="rejectForm.errReason"
  161. maxlength="300"
  162. show-word-limit
  163. >
  164. </el-input>
  165. </el-form-item>
  166. </el-form>
  167. </div>
  168. <span slot="footer" class="dialog-footer">
  169. <el-button @click="rejectOpen = false">取消</el-button>
  170. <el-button
  171. type="primary"
  172. @click="submitForm"
  173. v-loading.fullscreen.lock="loading"
  174. element-loading-text="提交中..."
  175. element-loading-spinner="el-icon-loading"
  176. element-loading-background="rgba(0, 0, 0, 0.8)"
  177. >
  178. <span v-if="loading">提交中...</span>
  179. <span v-else>保存</span>
  180. </el-button>
  181. </span>
  182. </el-dialog>
  183. <!-- 审核通过 -->
  184. <el-dialog
  185. title="选择座位"
  186. :visible.sync="passOpen"
  187. width="910px"
  188. append-to-body
  189. :close-on-click-modal="false"
  190. @close="passOpen = false"
  191. >
  192. <!-- 座位排版 -->
  193. <div class="dialog">
  194. <div class="seat-box-class1 clearfix" v-if="seatMapList && seatMapList.length > 0">
  195. <div class="seat-item-class" :class="item.isDisabled ? 'disabled-class' : item.isSelect ? 'select-class' : ''" v-for="(item, index) in seatMapList" @click.stop="seatClick(item)" :key="index">
  196. <p class="text-class">{{item.name ? item.name : (item.rowNo + '排' + item.columnNo + '座')}}</p>
  197. </div>
  198. </div>
  199. </div>
  200. <div style="margin-top: 5px; margin-left: 30px">已勾选:{{ seatSelectList.length }}个座位</div>
  201. <span slot="footer" class="dialog-footer">
  202. <el-button @click="passOpen = false">取消</el-button>
  203. <el-button
  204. type="primary"
  205. @click="submitPass"
  206. v-loading.fullscreen.lock="passLoading"
  207. element-loading-text="提交中..."
  208. element-loading-spinner="el-icon-loading"
  209. element-loading-background="rgba(0, 0, 0, 0.8)"
  210. >
  211. <span v-if="passLoading">提交中...</span>
  212. <span v-else>保存</span>
  213. </el-button>
  214. </span>
  215. </el-dialog>
  216. </el-dialog>
  217. </template>
  218. <script>
  219. import { getSelectById, teamApplyAudit, querySeatList } from '@/api/team/applicationMr'
  220. import { updateStatus } from '@/api/team/ticketMr'
  221. import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
  222. export default {
  223. name: "applicationDetails",
  224. props: {
  225. dict: {
  226. type: Object,
  227. default: () => [],
  228. },
  229. },
  230. data() {
  231. return {
  232. title: "编辑",
  233. model: "EDIT",
  234. open: false,
  235. rejectOpen: false,
  236. passOpen: false,
  237. initLoading: false,
  238. loading: false,
  239. passLoading: false,
  240. form: {
  241. id: undefined,
  242. },
  243. details: {},
  244. performerVisible: false,
  245. performerList: [],
  246. refund: false,
  247. rejectRules: {
  248. errReason: [{ required: true, message: "请输入驳回原因", trigger: ["change","blur"] }],
  249. },
  250. dataList: [],
  251. rejectForm: {
  252. status: 2
  253. },
  254. detailsType: false,
  255. //seatMapList: [], // 座位集合
  256. applyId: '', // 申请单id
  257. applyMap: {},
  258. //setList: [],
  259. seatSelectList: [],
  260. merchantTheatreAuditoriumListS: [], // 演出厅
  261. merchantPerformTimeListS: [], // 场次
  262. querySeatListS: [], // 座位
  263. goodsPageListS: [], // 票务
  264. goodsPageListSAll: [], // 票务全部
  265. setList: [],
  266. seatMapList: {},
  267. seatMapListKey: [], // key
  268. seatSelectList: [],
  269. lockOrUnLockLoading: false,
  270. performId: '',// 剧目ID
  271. scaleNum: 30,
  272. width: 0,
  273. justifyContent: false,
  274. activeName: 'first',
  275. seatTypeList: [],
  276. };
  277. },
  278. created() {
  279. this.getSeatTypeList()
  280. },
  281. methods: {
  282. /**
  283. * 打开弹框
  284. * @date 2023-11-22
  285. * @param {any} obj
  286. * @returns {any}
  287. */
  288. openDialog(title, obj, type) {
  289. this.initLoading = true
  290. this.open = true;
  291. this.rejectOpen = false;
  292. this.passOpen = false;
  293. this.applyId = obj.id;
  294. this.applyMap = obj;
  295. this.querySeatListS = [];
  296. this.setList = [];
  297. this.seatSelectList = [];
  298. if(type) {
  299. this.detailsType = true
  300. this.title = '审核'
  301. } else {
  302. this.detailsType = false
  303. this.title = '详情'
  304. }
  305. this.getSelectByIdApi(obj);
  306. },
  307. /** 获取详情 */
  308. async getSelectByIdApi(row) {
  309. try {
  310. const id = row.id
  311. let res = await getSelectById(id)
  312. this.details = {}
  313. this.details = res.data;
  314. let res1 = await querySeatList({
  315. auditoriumId: this.applyMap.auditoriumId,
  316. //seatTypeId: this.applyMap.seatTypeId,
  317. timeId: this.applyMap.performTimeId,
  318. })
  319. this.querySeatListS = res1.data;
  320. this.setList = res1.data;
  321. if(this.setList && this.setList.length > 0) {
  322. this.setSeatMapListCopy(this.setList);
  323. }
  324. this.initLoading = false
  325. } catch (error) {
  326. this.initLoading = false
  327. }
  328. },
  329. /** 获取座位信息 */
  330. getSeatApi(row) {
  331. let map = {
  332. auditoriumId: this.applyMap.auditoriumId,
  333. seatTypeId: this.applyMap.seatTypeId,
  334. timeId: this.applyMap.performTimeId,
  335. }
  336. querySeatList(map).then(response => {
  337. this.setList = response.data;
  338. if(this.setList && this.setList.length > 0) {
  339. this.setSeatMapList(this.setList);
  340. }
  341. });
  342. },
  343. // 设置座位集合
  344. setSeatMapList(list) {
  345. if(list && list.length > 0) {
  346. let listCopy = {}
  347. list.forEach(item => {
  348. item.isDisabled = item.status!=1||((item.occupyStatus != null && (item.occupyStatus == 0 || item.occupyStatus == 1)) ? true : false); // 座位是否已被选择
  349. item.isSelect = false;
  350. if(!listCopy['key_'+item.rowNo]) {
  351. listCopy['key_'+item.rowNo] = [item]
  352. }else {
  353. listCopy['key_'+item.rowNo].push(item)
  354. }
  355. //this.seatMapList.push(item)
  356. })
  357. let listCopy2 = Object.keys(listCopy)
  358. let listCopy3 = []
  359. listCopy2.forEach((item)=>{
  360. listCopy3.push({
  361. key: item,
  362. sort: Number(item.replace('key_',''))
  363. })
  364. })
  365. listCopy3.sort((a,b)=>{
  366. return a.sort - b.sort
  367. })
  368. let listCopy1 = []
  369. listCopy3.forEach((item,index)=>{
  370. listCopy1 = listCopy1.concat(listCopy[item.key])
  371. })
  372. this.seatMapList = [].concat(listCopy1)
  373. }
  374. },
  375. // 座位点击事件
  376. seatClickCopy(row) {
  377. if(row.isDisabled){
  378. return false
  379. }
  380. if(this.seatSelectList.length >= this.details.viewersList.length ){
  381. if(row.isSelect) {
  382. let indexs = null;
  383. this.seatSelectList.forEach((item, index) =>{
  384. if(item.id == row.id){
  385. indexs = index;
  386. }
  387. })
  388. if(indexs != null) {
  389. row.isSelect = !row.isSelect;
  390. this.seatSelectList.splice(indexs, 1)
  391. }
  392. } else {
  393. this.$message.error("观影人数限制" + this.details.viewersList.length + "人!");
  394. }
  395. return false
  396. }
  397. row.isSelect = !row.isSelect
  398. this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
  399. //this.seatSelectList = this.setList.filter(item => item.isSelect);
  400. console.log("this.seatSelectList===",this.seatSelectList)
  401. this.$forceUpdate()
  402. },
  403. seatClick(row) {
  404. console.log(row)
  405. if(row.occupyStatus == 0){
  406. console.log("weqwrwerewrer")
  407. this.$confirm('此座已被锁定,请先解锁', '提示', {
  408. confirmButtonText: '关闭',
  409. cancelButtonText: '取消',
  410. type: 'warning'
  411. }).then(() => {
  412. //this.lockOrUnLockFun([row],1)
  413. }).catch((error) => {
  414. console.log("error====",error)
  415. });
  416. }else if(row.isDisabled || row.status == 2){
  417. return false
  418. }else {
  419. if(this.applyMap.seatTypeId != row.seatTypeId){
  420. this.$message.error('只能选同一类型得座位');
  421. return
  422. }
  423. if(this.seatSelectList.length >= this.details.viewersList.length ){
  424. if(row.isSelect) {
  425. let indexs = null;
  426. this.seatSelectList.forEach((item, index) =>{
  427. if(item.id == row.id){
  428. indexs = index;
  429. }
  430. })
  431. if(indexs != null) {
  432. row.isSelect = !row.isSelect;
  433. this.seatSelectList.splice(indexs, 1)
  434. }
  435. } else {
  436. this.$message.error("观影人数限制" + this.details.viewersList.length + "人!");
  437. }
  438. return false
  439. }
  440. row.isSelect = !row.isSelect
  441. this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
  442. //this.seatSelectList = this.setList.filter(item => item.isSelect);
  443. console.log("this.seatSelectList===",this.seatSelectList)
  444. this.$forceUpdate()
  445. }
  446. },
  447. // 审核通过
  448. passOpenEven() {
  449. this.passOpen = true;
  450. this.seatMapList = [];
  451. this.seatSelectList = [];
  452. this.getSeatApi();
  453. //this.setSeatMapList()
  454. },
  455. /**
  456. * 保存
  457. * @date 2023-11-22
  458. * @returns {any}
  459. */
  460. submitForm() {
  461. this.$refs["refRejectForm"].validate(async (valid) => {
  462. if (valid) {
  463. try {
  464. this.loading = true;
  465. setTimeout(() => {
  466. this.loading = false;
  467. }, 3000)
  468. this.rejectForm.applyId = this.details.id || this.applyId;
  469. const { code } = await teamApplyAudit({ ...this.rejectForm });
  470. if (code === 200) {
  471. this.loading = false;
  472. this.rejectOpen = false;
  473. this.$message.success("操作成功!");
  474. this.$emit("getList");
  475. this.cancel();
  476. }
  477. } catch (error) {
  478. this.loading = false;
  479. } finally {
  480. }
  481. }
  482. });
  483. },
  484. // 审核通过 - 座位选择保存
  485. submitPass() {
  486. try {
  487. // this.passLoading = true;
  488. //let seatList = this.setList.filter(item => item.isSelect);
  489. let seatList = this.seatSelectList
  490. if(seatList && seatList.length > 0 && this.seatSelectList.length == this.details.viewersList.length ) {
  491. this.passLoading = true;
  492. let postMap = {
  493. applyId: this.details.id || this.applyId,
  494. status: 1,
  495. seatList: seatList
  496. }
  497. teamApplyAudit(postMap).then((res) => {
  498. this.passLoading = false;
  499. if (res.code == 200) {
  500. this.$message.success("操作成功!");
  501. this.passOpen = false;
  502. this.$emit("getList");
  503. this.cancel();
  504. }
  505. });
  506. } else {
  507. this.$message.error("请选择座位!");
  508. }
  509. } catch (error) {
  510. this.passLoading = false;
  511. } finally {
  512. }
  513. },
  514. /**
  515. * 关闭弹框
  516. * @date 2023-11-22
  517. * @returns {any}
  518. */
  519. cancel() {
  520. this.open = false;
  521. },
  522. setRejectOpen() {
  523. this.rejectOpen = true
  524. this.$set(this.rejectForm,'errReason','')
  525. this.$nextTick(()=>{
  526. this.$refs.refRejectForm.clearValidate('errReason')
  527. })
  528. },
  529. // 设置座位集合
  530. setSeatMapListCopy(list) {
  531. if(list && list.length > 0) {
  532. let listCopy = {}
  533. let lisyCopy1 = {}
  534. let listNum = JSON.parse(JSON.stringify(this.seatTypeList))
  535. listNum.forEach((item,index)=>{
  536. listNum[index]['num'] = 0
  537. })
  538. list.forEach(item => {
  539. item.isDisabled = (item.occupyStatus != null && (item.occupyStatus == 0 || item.occupyStatus == 1) ? true : false); // 座位是否已被选择
  540. item.isSelect = this.setIsSelect(item);
  541. if(item.rowNo){
  542. listNum.forEach((item1,index)=>{
  543. if(item1.id == item.seatTypeId && item.status ==1 && !item.occupyStatus) {
  544. listNum[index]['num'] = listNum[index]['num'] + 1
  545. }
  546. })
  547. if(listCopy['my'+item.rowNo]){
  548. listCopy['my'+item.rowNo].push(item)
  549. }else {
  550. listCopy['my'+item.rowNo] = [item]
  551. }
  552. }
  553. })
  554. this.seatTypeList = JSON.parse(JSON.stringify(listNum))
  555. let width = 0
  556. let flog = 0
  557. let seatMapListKey = []
  558. Object.keys(listCopy).forEach((item)=>{
  559. if(listCopy[item].length>flog) {
  560. flog = listCopy[item].length
  561. }
  562. seatMapListKey.push({
  563. key: item,
  564. sort: Number(item.replace('my',''))
  565. })
  566. })
  567. seatMapListKey.sort((a,b)=>{
  568. return a.sort - b.sort
  569. })
  570. this.seatMapListKey = seatMapListKey
  571. console.log("seatMapListKey=====",seatMapListKey)
  572. this.width = 70*flog
  573. this.$nextTick(()=>{
  574. if(this.$refs.seatbox) {
  575. var ele = document.getElementById('seatbox-me');
  576. console.log(ele.getBoundingClientRect().width); // 100
  577. if(this.width<ele.getBoundingClientRect().width) {
  578. this.justifyContent = true
  579. }else {
  580. //this.justifyContent = false
  581. this.justifyContent = true
  582. }
  583. //this.$refs.seatbox.scrollTo(this.width/4,0)
  584. }
  585. })
  586. console.log("list====",listCopy)
  587. this.seatMapList = JSON.parse(JSON.stringify(listCopy))
  588. }
  589. },
  590. setIsSelect(item){
  591. if(!this.seatSelectList||this.seatSelectList.length==0){
  592. return false
  593. }
  594. let flog = false
  595. this.seatSelectList.forEach((item1,index1)=>{
  596. if(item.id == item1.id){
  597. flog = true
  598. }
  599. })
  600. return flog
  601. },
  602. /** 获取座位类型 说明 */
  603. getSeatTypeList() {
  604. getSeatType({
  605. pageNum: 1,
  606. pageSize: 999,
  607. })
  608. .then(response => {
  609. this.seatTypeList = response.data.rows;
  610. });
  611. },
  612. /** 座位状态 展示 */
  613. setSeatClass(item){
  614. let srt =
  615. item.seatTypeId != this.applyMap.seatTypeId?'disabled-class':
  616. item.occupyStatus == 0 ? 'occupy-status' :
  617. item.occupyStatus == 1 ? 'occupy-status-no' :
  618. item.isDisabled || item.status != 1 ? 'disabled-class' :
  619. item.isSelect ? 'select-class' : ''
  620. console.log("srt=====",srt)
  621. return srt
  622. }
  623. },
  624. };
  625. </script>
  626. <style lang="scss" scoped>
  627. .dialog {
  628. width: 100%;
  629. height: 70vh;
  630. }
  631. .dialog-bbb {
  632. width: 100%;
  633. display: flex;
  634. >div:first-child {
  635. width: var(--widdd);
  636. flex-shrink: 0;
  637. overflow-y: auto;
  638. padding: 0 0 10px 0;
  639. margin-right: 10px;
  640. }
  641. .dialog-bbb_2 {
  642. width: calc( 100% - var(--widdd) );
  643. height: 100%;
  644. }
  645. }
  646. .dialog {
  647. .upload-btn {
  648. width: 100px;
  649. height: 100px;
  650. background-color: #fbfdff;
  651. border: dashed 1px #c0ccda;
  652. border-radius: 5px;
  653. i {
  654. font-size: 30px;
  655. margin-top: 20px;
  656. }
  657. &-text {
  658. margin-top: -10px;
  659. }
  660. }
  661. .avatar {
  662. cursor: pointer;
  663. }
  664. .title-class{
  665. font-size: 16px;
  666. font-weight: bold;
  667. color: black;
  668. margin-bottom: 20px;
  669. margin-top: 20px;
  670. }
  671. .item-class{
  672. margin-bottom: 20px;
  673. }
  674. .seat-box-class1{
  675. width: 800px;
  676. height: auto;
  677. padding: 5px;
  678. border-radius: 10px;
  679. border: 1px solid #323333;
  680. .disabled-class{
  681. background-color: #aaabad;
  682. }
  683. .select-class{
  684. background-color: #e85353 !important;
  685. color: #eceaea !important;
  686. }
  687. .seat-item-class{
  688. display: block;
  689. float: left;
  690. width: 60px;
  691. height: 60px;
  692. margin: 5px;
  693. border: 1px solid #4c4d4d;
  694. border-radius: 3px;
  695. cursor: pointer;
  696. position: relative;
  697. &:hover{
  698. opacity: 0.6;
  699. }
  700. .text-class{
  701. font-size: 12px;
  702. padding: 5px;
  703. line-height: 16px;
  704. margin: 0;
  705. }
  706. }
  707. }
  708. }
  709. .dialog-bbb_2 {
  710. .seat-tool-box {
  711. height: 20px;
  712. box-sizing: border-box;
  713. display: flex;
  714. align-items: center;
  715. white-space: nowrap;
  716. span{
  717. flex-shrink: 0;
  718. font-size: 12px;
  719. white-space: nowrap;
  720. }
  721. .seat-tool-box-slider {
  722. width: 100px;
  723. margin-left: 10px;
  724. }
  725. }
  726. .seat-box {
  727. width: 100%;
  728. height: calc( 100% - 50px );
  729. box-sizing: border-box;
  730. display: flex;
  731. position: relative;
  732. .seat-list-box {
  733. width: 100%;
  734. height: 100%;
  735. box-sizing: border-box;
  736. position: relative;
  737. }
  738. .seat-select-box {
  739. width: 200px;
  740. height: 100%;
  741. flex-shrink: 0;
  742. box-sizing: border-box;
  743. padding: 0 5px;
  744. margin-left: 10px;
  745. border: 1px solid #ccc;
  746. border-radius: 10px;
  747. .seat-select-info {
  748. width: 100%;
  749. height: calc( 100% - 60px );
  750. overflow: hidden;
  751. overflow-y: auto;
  752. .seat-select-item {
  753. border: 1px solid #ccc;
  754. margin-bottom: 5px;
  755. padding: 5px;
  756. border-radius: 5px;
  757. display: flex;
  758. justify-content: space-between;
  759. align-items: center;
  760. font-size: 12px;
  761. >div:first-child {
  762. display: flex;
  763. flex-direction: column;
  764. span:first-child {
  765. font-weight: 600;
  766. }
  767. }
  768. >div:last-child {
  769. span:first-child {
  770. color: #f56c6c;
  771. cursor: pointer;
  772. }
  773. }
  774. }
  775. .seat-select-color-item {
  776. display: flex;
  777. align-items: center;
  778. margin-bottom: 5px;
  779. >span:first-child {
  780. width: 20px;
  781. height: 20px;
  782. flex-shrink: 0;
  783. }
  784. >span:last-child {
  785. font-size: 16px;
  786. font-weight: 600;
  787. margin-left: 10px;
  788. }
  789. }
  790. }
  791. }
  792. }
  793. .seat-list-box::before {
  794. content: "舞台";
  795. position: absolute;
  796. left: 50%;
  797. transform: translateX(-50%);
  798. width: 300px;
  799. height: 30px;
  800. background-color: rgb(204, 204, 204,0.5);
  801. font-size: 18px;
  802. font-weight: 600;
  803. display: flex;
  804. align-items: center;
  805. justify-content: center;
  806. border-radius: 0 0 20px 20px;
  807. z-index: 99;
  808. }
  809. .dialogss {
  810. padding: 30px 10px 10px;
  811. width: 100%;
  812. height: 100%;
  813. box-sizing: border-box;
  814. overflow: auto;
  815. border-radius: 10px;
  816. border: 1px solid #323333;
  817. .dialogss-box {
  818. position: relative;
  819. }
  820. .upload-btn {
  821. width: 100px;
  822. height: 100px;
  823. background-color: #fbfdff;
  824. border: dashed 1px #c0ccda;
  825. border-radius: 5px;
  826. i {
  827. font-size: 30px;
  828. margin-top: 20px;
  829. }
  830. &-text {
  831. margin-top: -10px;
  832. }
  833. }
  834. .avatar {
  835. cursor: pointer;
  836. }
  837. .title-class{
  838. font-size: 16px;
  839. font-weight: bold;
  840. color: black;
  841. margin-bottom: 20px;
  842. margin-top: 20px;
  843. }
  844. .item-class{
  845. margin-bottom: 20px;
  846. }
  847. .seat-box-class{
  848. padding: 5px;
  849. transform-origin: 50% 0;
  850. transform: scale(var(--scaleNum));
  851. box-sizing: border-box;
  852. .disabled-class{
  853. background-color: #aaabad;
  854. user-select: none;
  855. // pointer-events: none;
  856. cursor: not-allowed !important;
  857. }
  858. .select-class{
  859. //background-color: #e85353 !important;
  860. border: 5px solid #1890ff !important;
  861. // color: #eceaea !important;
  862. position: relative;
  863. }
  864. .occupy-status:after{
  865. content:"";
  866. display:block;
  867. position:absolute;
  868. top:0;
  869. left:0;
  870. width:100%;
  871. height:100%;
  872. background-color:rgba(0,0,0,0.3);
  873. z-index:-1;
  874. background-image: url('../../../../assets/jinzhi.png');
  875. background-size: 50% 50%;
  876. background-position: 50% 50%;
  877. background-repeat: no-repeat;
  878. z-index: 99;
  879. }
  880. .occupy-status {
  881. //pointer-events: none;
  882. }
  883. .occupy-status-no {
  884. background-color: #f56c6c !important;
  885. user-select: none;
  886. // pointer-events: none;
  887. cursor: not-allowed !important;
  888. }
  889. .seat-item-class-box {
  890. width: 100%;
  891. display: flex;
  892. flex-wrap: nowrap;
  893. justify-content: center;
  894. margin: auto 0;
  895. text-align: center;
  896. }
  897. .seat-item-class{
  898. flex-shrink: 0;
  899. display: block;
  900. float: left;
  901. width: 60px;
  902. height: 60px;
  903. margin: 5px;
  904. border: 1px solid #4c4d4d;
  905. border-radius: 3px;
  906. cursor: pointer;
  907. position: relative;
  908. user-select: none;
  909. // transform-origin: 50% 50%;
  910. // transform: scale(var(--scaleNum));
  911. &:hover{
  912. opacity: 0.6;
  913. }
  914. .text-class{
  915. font-size: 12px;
  916. padding: 5px;
  917. line-height: 16px;
  918. margin: 0;
  919. color: #000;
  920. }
  921. }
  922. }
  923. }
  924. }
  925. </style>