addAndEdit.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710
  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\team\applicationMr\addAndEdit.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="700px"
  15. append-to-body
  16. :close-on-click-modal="false"
  17. @close="cancel"
  18. >
  19. <div
  20. class="dialog"
  21. v-loading="loading1"
  22. element-loading-text="拼命加载中..."
  23. element-loading-spinner="el-icon-loading"
  24. element-loading-background="rgba(0, 0, 0, 0.8)"
  25. >
  26. <el-form :model="form" ref="form" size="mini" :rules="rules" label-width="120px">
  27. <el-form-item label="选择团队:" prop="teamId">
  28. <el-select
  29. v-model="form.teamId"
  30. placeholder="请输入关键词搜索再选择"
  31. clearable
  32. filterable
  33. remote
  34. reserve-keyword
  35. :remote-method="teamPageListApi"
  36. @change="teamChange"
  37. :loading="teamIdLoading"
  38. style="width: 100%;"
  39. >
  40. <el-option
  41. v-for="dict in teamList"
  42. :key="dict.id"
  43. :label="dict.name"
  44. :value="dict.id"
  45. />
  46. </el-select>
  47. </el-form-item>
  48. <el-form-item label="选择场馆:" prop="theatreId">
  49. <el-select
  50. v-model="form.theatreId"
  51. placeholder="选择场馆"
  52. clearable
  53. @change="changeTheatre"
  54. style="width: 100%;"
  55. >
  56. <el-option
  57. v-for="dict in theatreList"
  58. :key="dict.id"
  59. :label="dict.name"
  60. :value="dict.id"
  61. />
  62. </el-select>
  63. </el-form-item>
  64. <el-form-item label="选择演出厅:" prop="auditoriumId">
  65. <el-select
  66. v-model="form.auditoriumId"
  67. placeholder="选择演出厅"
  68. @change="auditoriumChange"
  69. clearable
  70. style="width: 100%;"
  71. >
  72. <el-option
  73. v-for="dict in merchantList"
  74. :key="dict.id"
  75. :label="dict.name"
  76. :value="dict.id"
  77. />
  78. </el-select>
  79. </el-form-item>
  80. <el-form-item label="选择剧目:" prop="performId">
  81. <el-select
  82. v-model="form.performId"
  83. placeholder="选择剧目"
  84. clearable
  85. @change="performChangeEven"
  86. style="width: 100%;"
  87. >
  88. <el-option
  89. v-for="dict in goodsList"
  90. :key="dict.id"
  91. :label="dict.name"
  92. :value="dict.id"
  93. />
  94. </el-select>
  95. </el-form-item>
  96. <el-form-item label="选择日期" prop="performDate">
  97. <el-date-picker
  98. v-model="form.performDate"
  99. type="date"
  100. @change="performDateEven"
  101. value-format="yyyy-MM-dd"
  102. placeholder="选择日期">
  103. </el-date-picker>
  104. </el-form-item>
  105. <el-form-item label="预约场次:" prop="performTimeId">
  106. <el-select
  107. v-model="form.performTimeId"
  108. placeholder="预约场次"
  109. clearable
  110. style="width: 100%;"
  111. @change="performTimeIdEven"
  112. >
  113. <el-option
  114. v-for="dict in performTimeList"
  115. :key="dict.id"
  116. :label="dict.timeSnapshot + '场次: ' + dict.performDate + ' 开始时间' + dict.performTimeStart + ', 结束时间' + dict.performTimeEnd"
  117. :value="dict.id"
  118. />
  119. </el-select>
  120. </el-form-item>
  121. <el-form-item label="票务管理:" prop="goodsId">
  122. <el-select
  123. v-model="form.goodsId"
  124. placeholder="票务管理"
  125. clearable
  126. @change="goodsChangeEven"
  127. style="width: 100%;"
  128. >
  129. <el-option
  130. v-for="dict in ticketList"
  131. :key="dict.id"
  132. :label="dict.goodsName"
  133. :value="dict.id"
  134. />
  135. </el-select>
  136. </el-form-item>
  137. <el-form-item label="座位类型:" prop="seatTypeId">
  138. <el-select
  139. v-model="form.seatTypeId"
  140. placeholder="座位类型"
  141. clearable
  142. @change="seatChangeEven"
  143. style="width: 100%;"
  144. >
  145. <el-option
  146. v-for="dict in seatList"
  147. :key="dict.seatTypeId"
  148. :label="dict.seatTypeName"
  149. :value="dict.seatTypeId"
  150. />
  151. </el-select>
  152. </el-form-item>
  153. <el-form-item label="团购单价:" prop="price">
  154. <el-input
  155. type="number"
  156. disabled
  157. v-model="form.price"
  158. placeholder=""
  159. clearable
  160. @change="changePriceAmount('salePrice')"
  161. style="width: 260px;"
  162. >
  163. <template slot="append">元/人</template>
  164. </el-input>
  165. </el-form-item>
  166. <el-form-item label="观影人员:" prop="viewerList">
  167. <el-upload
  168. class="upload-demo"
  169. :action="uploadObj.url"
  170. :headers="uploadObj.headers"
  171. :auto-upload="false"
  172. :disabled="uploadLoading"
  173. :show-file-list="false"
  174. :on-change="beforeAvatarUpload"
  175. :file-list="form.fileList">
  176. <el-button size="small" type="primary" :loading="uploadLoading">{{form.viewerList && form.viewerList.length == 0 ? '导入excel' : '重新导入excel'}}</el-button>
  177. <div slot="tip" class="el-upload__tip">
  178. 上传excel文件,导入模板表头序号、姓名、身份证号码
  179. <i @click="handleExport" style="color: #1890ff;cursor: pointer;">下载模板</i>
  180. </div>
  181. </el-upload>
  182. <div v-if="form.viewerList && form.viewerList.length > 0">
  183. <el-table :data="form.viewerList" style="width: 100%" border>
  184. <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
  185. <el-table-column prop="name" label="姓名" align="center" ></el-table-column>
  186. <el-table-column prop="cardId" label="身份证号码" align="center"> </el-table-column>
  187. </el-table>
  188. </div>
  189. </el-form-item>
  190. </el-form>
  191. </div>
  192. <span slot="footer" class="dialog-footer">
  193. <el-button @click="cancel">取消</el-button>
  194. <el-button
  195. type="primary"
  196. @click="submitForm"
  197. v-loading="loading"
  198. element-loading-text="拼命加载中..."
  199. element-loading-spinner="el-icon-loading"
  200. element-loading-background="rgba(0, 0, 0, 0.8)"
  201. >
  202. <span v-if="loading">提交中...</span>
  203. <span v-else>保存</span>
  204. </el-button>
  205. </span>
  206. </el-dialog>
  207. </template>
  208. <script>
  209. import { saveAndEdit, getSelectById, uploadExcel, queryPrice,downloadModel,selectRegionApi } from "@/api/team/applicationMr";
  210. import { pagePerformTimeList } from '@/api/schedulingMr/schedulingMr'
  211. import Editor from "@/components/Editor";
  212. import { getToken } from "@/utils/auth";
  213. import { goodsPageList } from '@/api/programmeMr/programmeMr'
  214. import { seatPricePageList } from '@/api/distribution/ticketMr'
  215. import { merchantPageList } from '@/api/performanceHallMr/performanceHallMr'
  216. import { pageList } from "@/api/venueMr/venueMr";
  217. import { teamPageList } from '@/api/team/teamMr'
  218. export default {
  219. name: "addAndEdit",
  220. props: {
  221. dict: {
  222. type: Object,
  223. default: () => [],
  224. },
  225. },
  226. components: {
  227. Editor,
  228. },
  229. data() {
  230. return {
  231. title: "编辑",
  232. model: "EDIT",
  233. activeName: '01',
  234. open: false,
  235. loading: false,
  236. loading1: false,
  237. uploadLoading: false,
  238. form: {
  239. id: undefined,
  240. },
  241. rules: {
  242. teamId: [{ required: true, message: "请选择团队", trigger: ["change","blur"] }],
  243. theatreId: [{ required: true, message: "请选择场馆", trigger: ["change","blur"] }],
  244. auditoriumId: [{ required: true, message: "请选择演出厅", trigger: ["change","blur"] }],
  245. performId: [{ required: true, message: "请选择选择剧目", trigger: ["change","blur"] }],
  246. goodsId: [{ required: true, message: "请选择票务", trigger: ["change","blur"] }],
  247. seatTypeId: [{ required: true, message: "请选择座位类型", trigger: ["change","blur"] }],
  248. price: [{ required: true, message: "请输入团购单价", trigger: ["change","blur"] }],
  249. teamPersonNum: [{ required: true, message: "请输入人数", trigger: ["change","blur"] }],
  250. performTimeId: [{ required: true, message: "请选择预约场次", trigger: ["change","blur"] }],
  251. viewerList: [{ required: true, message: "请上传观影人员excel", trigger: ["change","blur"] }],
  252. performDate: [{ required: true, message: "请选择日期", trigger: ["change","blur"] }]
  253. },
  254. uploadObj: {
  255. url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
  256. Headers: { Authorization: "Bearer " + getToken() },
  257. },
  258. goodsList: [],
  259. ticketList: [],
  260. seatList: [],
  261. merchantList: [],
  262. theatreList: [],
  263. teamList: [],
  264. sessionList: [],
  265. performTimeList: [],
  266. teamIdLoading: false,
  267. };
  268. },
  269. methods: {
  270. /**
  271. * 打开弹框
  272. * @date 2023-11-22
  273. * @param {any} obj
  274. * @returns {any}
  275. */
  276. openDialog(title, obj) {
  277. this.open = true;
  278. this.teamPageListApi();
  279. this.getList();
  280. this.goodsPageList();
  281. this.reset();
  282. if (obj){
  283. this.title = "编辑报名";
  284. this.getSelectByIdApi(obj);
  285. }else{
  286. this.title = "添加报名";
  287. this.$nextTick(() => {
  288. this.$refs["form"].clearValidate();
  289. });
  290. }
  291. },
  292. /** 获取详情 */
  293. async getSelectByIdApi(row) {
  294. try {
  295. const id = row.id
  296. this.loading1 = true
  297. let response = await getSelectById(id)
  298. let obj = response.data;
  299. this.$set(this,'form',{
  300. ...obj,
  301. viewerList: obj.viewersList,
  302. applyId: obj.id?obj.id:null
  303. })
  304. //this.ticketListApi();
  305. //this.getSeatTypeList({goodsId: this.form.goodsId, performId: this.form.performId});
  306. await this.merchantPageList(this.form.theatreId) // 获取演出厅
  307. await this.selectRegionFun() // 获取票务管理
  308. await this.getPerformTimeList() // 预约场次列表
  309. this.setGoodsChangeEven(this.form.goodsId) // 座位类型
  310. this.loading1 = false
  311. } catch (error) {
  312. console.error("error====",error)
  313. this.loading1 = false
  314. this.open = false
  315. }
  316. },
  317. /** 团队列表查询 */
  318. teamPageListApi(key) {
  319. this.teamIdLoading = true
  320. teamPageList(this.addDateRange({pageNum: 1, pageSize: 900,name:key}))
  321. .then(response => {
  322. this.teamList = response.data.rows;
  323. this.teamIdLoading = false
  324. }).catch(()=>{
  325. this.teamIdLoading = true
  326. })
  327. },
  328. /** 场馆列表查询 */
  329. getList(name) {
  330. pageList(this.addDateRange({pageNum: 1, pageSize: 100}))
  331. .then(response => {
  332. this.theatreList = response.data.rows;
  333. });
  334. },
  335. /** 团队选择 */
  336. teamChange(val) {
  337. this.teamList.forEach(item => {
  338. if(val == item.id){
  339. this.$set(this.form, 'teamName', item.name)
  340. }
  341. })
  342. this.$set(this.form, 'goodsId', '')
  343. this.$set(this.form, 'goodsName', '')
  344. this.$set(this.form, 'seatTypeId', '')
  345. this.$set(this.form, 'price', '')
  346. this.selectRegionFun()
  347. },
  348. /** 场馆选择 */
  349. changeTheatre(id) {
  350. this.theatreList.forEach(item => {
  351. if(id == item.id){
  352. this.$set(this.form, 'theatreName', item.name)
  353. }
  354. })
  355. this.$set(this.form, 'auditoriumId', '')
  356. this.$set(this.form, 'performId', '')
  357. this.$set(this.form, 'goodsId', '')
  358. this.$set(this.form, 'goodsName', '')
  359. this.$set(this.form, 'seatTypeId', '')
  360. this.$set(this.form, 'price', '')
  361. this.$set(this.form, 'performDate', '');
  362. this.$set(this.form, 'performTimeId', '');
  363. this.merchantList = [] // 演出厅
  364. //this.goodsList = [] // 剧目
  365. this.performTimeList = [] // 场次
  366. this.ticketList = [] // 票务
  367. this.seatList = [] // 座位类型
  368. this.merchantPageList(id) // 获取演出厅
  369. },
  370. /** 演出厅选择 */
  371. auditoriumChange(id) {
  372. this.$set(this.form, 'performDate', '');
  373. this.$set(this.form, 'performTimeId', '');
  374. this.$set(this.form, 'performId', '');
  375. this.$set(this.form, 'goodsId', '')
  376. this.$set(this.form, 'seatTypeId', '')
  377. this.$set(this.form, 'price', '')
  378. this.merchantList.forEach(item => {
  379. if(id == item.id){
  380. this.$set(this.form, 'auditoriumName', item.name)
  381. }
  382. })
  383. // this.goodsList = [] // 剧目
  384. this.performTimeList = [] // 场次
  385. this.ticketList = [] // 票务
  386. this.seatList = [] // 座位类型
  387. //this.getPerformTimeList();
  388. },
  389. /** 演出厅列表查询 */
  390. merchantPageList(id) {
  391. merchantPageList(this.addDateRange({theatreId: id, pageNum: 1, pageSize: 100}))
  392. .then(response => {
  393. this.merchantList = response.data.rows;
  394. });
  395. },
  396. /** 剧目列表查询 */
  397. goodsPageList() {
  398. goodsPageList(this.addDateRange({pageNum: 1, pageSize: 100, status: 1}))
  399. .then(response => {
  400. this.goodsList = response.data.rows;
  401. });
  402. },
  403. /** 票务列表查询 */
  404. ticketListApi(performId) {
  405. this.ticketList = []
  406. seatPricePageList(this.addDateRange({pageNum: 1, pageSize: 100, performId: performId}))
  407. .then(response => {
  408. let ticketList = []
  409. response.data.rows.forEach(item => {
  410. if(ticketList.indexOf(item.goodsId) == -1){
  411. this.ticketList.push(item);
  412. ticketList.push(item.goodsId);
  413. }
  414. })
  415. });
  416. },
  417. /** 座位类型列表 */
  418. getSeatTypeList(obj) {
  419. seatPricePageList({pageNum: 1, pageSize: 100, goodsId: obj.goodsId, performId: obj.performId})
  420. .then(response => {
  421. let ticketList = []
  422. response.data.rows.forEach(item => {
  423. if(ticketList.indexOf(item.seatTypeId) == -1){
  424. this.seatList.push(item);
  425. ticketList.push(item.seatTypeId);
  426. }
  427. })
  428. });
  429. },
  430. /** 团购价格查询 */
  431. queryPriceApi() {
  432. let postMap = {
  433. teamId: this.form.teamId,
  434. goodsId: this.form.goodsId,
  435. performId: this.form.performId,
  436. seatTypeId: this.form.seatTypeId,
  437. }
  438. queryPrice(postMap)
  439. .then(response => {
  440. if(response.data){
  441. let data = response.data;
  442. this.$set(this.form, 'price', data.salePrice);
  443. }
  444. });
  445. },
  446. /** 预约场次列表 */
  447. getPerformTimeList() {
  448. if(this.form.performDate && this.form.performDate == '') {
  449. this.$message.error("请选择日期!");
  450. return false
  451. }
  452. pagePerformTimeList(this.addDateRange(
  453. {pageNum: 1, pageSize: 100, performDate: this.form.performDate, performId: this.form.performId, auditoriumId: this.form.auditoriumId, status: 1}
  454. ))
  455. .then(response => {
  456. this.performTimeList = response.data.rows;
  457. });
  458. },
  459. /** 价格输入事件 */
  460. changePriceAmount(key) {
  461. if(this.form[key] * 1 < 0){
  462. this.$message.error("输入需大于或等于0!");
  463. this.$set(this.form, key, '');
  464. return false
  465. }
  466. },
  467. /** 剧目改变事件 */
  468. performChangeEven(val) {
  469. this.seatList = [];
  470. this.ticketList = [];
  471. this.$set(this.form, 'performDate', '');
  472. this.$set(this.form, 'performTimeId', '');
  473. this.$set(this.form, 'goodsId', '');
  474. this.$set(this.form, 'seatTypeId', '');
  475. this.$set(this.form, 'price', '')
  476. this.goodsList.forEach(item => {
  477. if(item.id == val){
  478. this.$set(this.form, 'performName', item.name)
  479. }
  480. })
  481. // this.ticketListApi(val); // 获取票务
  482. // this.getPerformTimeList(); // 场次
  483. },
  484. // 预约时间
  485. performDateEven() {
  486. console.log("获取场次====")
  487. this.$set(this.form, 'performTimeId', '')
  488. this.$set(this.form, 'goodsId', '');
  489. this.$set(this.form, 'seatTypeId', '');
  490. this.$set(this.form, 'price', '')
  491. this.performTimeList = [] // 场次
  492. this.ticketList = [] // 票务
  493. this.seatList = [] // 座位类型
  494. this.getPerformTimeList(); // 获取场次
  495. },
  496. /** 选择场次 */
  497. performTimeIdEven(val){
  498. this.$set(this.form, 'goodsId', '');
  499. this.$set(this.form, 'goodsName', '')
  500. this.$set(this.form, 'seatTypeId', '');
  501. this.$set(this.form, 'price', '')
  502. this.ticketList = [] // 票务
  503. this.seatList = [] // 座位类型
  504. this.selectRegionFun() // 获取票务管理
  505. },
  506. // 票务改变事件
  507. goodsChangeEven(id) {
  508. let list = []
  509. this.ticketList.forEach(item => {
  510. if(item.id == id){ // item.goodsId == id
  511. this.$set(this.form, 'goodsName', item.goodsName)
  512. list = item.regionList
  513. }
  514. })
  515. this.$set(this.form, 'price', '');
  516. this.$set(this.form, 'seatTypeId', '');
  517. this.seatList = [];
  518. console.log("ffffffffff=====",list)
  519. //let selectMap = {goodsId: this.form.goodsId, performId: this.form.performId}
  520. //this.getSeatTypeList(selectMap); 获取走位
  521. this.seatList = [].concat(list)
  522. },
  523. // 座位类型改变事件
  524. seatChangeEven(val) {
  525. this.seatList.forEach(item =>{
  526. if(item.seatTypeId == val){
  527. this.$set(this.form, 'seatTypeName', item.seatTypeName);
  528. this.$set(this.form, 'price', item.salePrice);
  529. }
  530. })
  531. //this.queryPriceApi();
  532. },
  533. setGoodsChangeEven(id) {
  534. let list = []
  535. this.ticketList.forEach(item => {
  536. if(item.id == id){
  537. list = item.regionList
  538. }
  539. })
  540. this.seatList = [];
  541. this.seatList = [].concat(list)
  542. },
  543. /**
  544. * 保存
  545. * @date 2023-11-22
  546. * @returns {any}
  547. */
  548. submitForm() {
  549. this.$refs["form"].validate(async (valid) => {
  550. if (valid) {
  551. try {
  552. this.loading = true;
  553. let params = JSON.parse(JSON.stringify(this.form))
  554. delete params.viewersList
  555. const { code } = await saveAndEdit({ ...params });
  556. if (code === 200) {
  557. this.$message.success("操作成功!");
  558. this.$emit("getList");
  559. this.cancel();
  560. }
  561. } catch (error) {
  562. } finally {
  563. this.loading = false;
  564. }
  565. }
  566. });
  567. },
  568. /**
  569. * 重置
  570. * @date 2023-11-22
  571. * @returns {any}
  572. */
  573. reset() {
  574. this.$set(this.form, 'id', '');
  575. this.$set(this.form, 'teamId', '');
  576. this.$set(this.form, 'teamName', '');
  577. this.$set(this.form, 'theatreId', '');
  578. this.$set(this.form, 'theatreName', '');
  579. this.$set(this.form, 'auditoriumId', '');
  580. this.$set(this.form, 'auditoriumName', '');
  581. this.$set(this.form, 'performId', '');
  582. this.$set(this.form, 'performName', '');
  583. this.$set(this.form, 'seatTypeId', '');
  584. this.$set(this.form, 'seatTypeName', '');
  585. this.$set(this.form, 'goodsId', '');
  586. this.$set(this.form, 'goodsName', '');
  587. this.$set(this.form, 'performTimeId', '');
  588. this.$set(this.form, 'performDate', '');
  589. this.$set(this.form, 'price', '');
  590. this.$set(this.form, 'viewerList', []);
  591. },
  592. /**
  593. * 关闭弹框
  594. * @date 2023-11-22
  595. * @returns {any}
  596. */
  597. cancel() {
  598. this.reset();
  599. this.open = false;
  600. },
  601. /**
  602. * 上传文件之前之前
  603. * @date 2023-11-22
  604. * @param {any} file
  605. * @returns {any}
  606. */
  607. beforeAvatarUpload(file) {
  608. this.uploadExcelApi(file.raw);
  609. },
  610. // 上传
  611. uploadExcelApi(file) {
  612. try {
  613. let formData = new FormData();
  614. formData.append("file", file);
  615. this.uploadLoading = true;
  616. uploadExcel(formData).then(response => {
  617. this.$message.success("上传成功!");
  618. this.$set(this.form, 'viewerList', response.data)
  619. });
  620. } catch (e) {
  621. } finally {
  622. this.uploadLoading = false;
  623. }
  624. },
  625. /** 导出按钮操作 */
  626. async handleExport() {
  627. //this.downloadGet('member/marketTeamApply/downTeamApplyTemplate', {}, `观影人员上传模板_${new Date().getTime()}.xlsx`)
  628. try {
  629. let res = await downloadModel()
  630. let fileName = `观影人员上传模板_${new Date().getTime()}.xlsx`
  631. let blob=new Blob([res])
  632. let href=window.URL.createObjectURL(blob)
  633. // 创建下载按钮a标签进行自动点击下载,下载完后移除按钮a标签
  634. let downloadDom=document.createElement('a')
  635. downloadDom.href=href
  636. downloadDom.download=fileName //--不是必须 若需要【前端重命名文件夹】的话这句代码就需要
  637. document.body.appendChild(downloadDom)
  638. downloadDom.click()
  639. document.body.removeChild(downloadDom)
  640. window.URL.revokeObjectURL(href)
  641. } catch (error) {
  642. }
  643. },
  644. // 获取票务管理
  645. async selectRegionFun(){
  646. try {
  647. if(!this.form.teamId||!this.form.auditoriumId||!this.form.performId||!this.form.performTimeId){
  648. return
  649. }
  650. let res = await selectRegionApi({
  651. "teamId": this.form.teamId,
  652. "auditoriumId": this.form.auditoriumId,
  653. "performId": this.form.performId,
  654. "performTimeId": this.form.performTimeId,
  655. })
  656. if( res.code == 200 ) {
  657. this.ticketList = res.data.goodsList
  658. }
  659. } catch (error) {
  660. }
  661. }
  662. },
  663. };
  664. </script>
  665. <style lang="scss" scoped>
  666. .dialog {
  667. padding: 0 30px;
  668. max-height: 65vh;
  669. overflow-y: auto;
  670. }
  671. .dialog {
  672. padding: 0 30px;
  673. .upload-btn {
  674. width: 100px;
  675. height: 100px;
  676. background-color: #fbfdff;
  677. border: dashed 1px #c0ccda;
  678. border-radius: 5px;
  679. i {
  680. font-size: 30px;
  681. margin-top: 20px;
  682. }
  683. &-text {
  684. margin-top: -10px;
  685. }
  686. }
  687. .avatar {
  688. cursor: pointer;
  689. }
  690. }
  691. </style>