details.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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\performMr\dialog\AddOrEditDialog.vue
  8. * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
  9. -->
  10. <template>
  11. <el-dialog
  12. title="剧目信息"
  13. :visible.sync="open"
  14. width="700px"
  15. append-to-body
  16. :close-on-click-modal="false"
  17. @close="cancel"
  18. >
  19. <div class="dialog">
  20. <!-- 基础信息 -->
  21. <div class="title-class" style="margin-top: 0">基础信息</div>
  22. <el-row>
  23. <el-col :span="12">
  24. <div class="grid-content bg-purple item-class">剧目名称: <span>{{ form.name }}</span></div>
  25. </el-col>
  26. <el-col :span="12">
  27. <div class="grid-content bg-purple item-class">主办方: <span>{{ form.sponsorName }}</span></div>
  28. </el-col>
  29. <el-col :span="24">
  30. <div class="grid-content bg-purple item-class">是否启用: <span>{{ form.status == 1 ? '启用' : '未启用' }}</span></div>
  31. </el-col>
  32. </el-row>
  33. <!-- 演出信息 -->
  34. <div class="title-class">演出信息</div>
  35. <el-row>
  36. <el-col :span="12">
  37. <div class="grid-content bg-purple item-class">上映日期: <span>{{ form.releaseDate }}</span></div>
  38. </el-col>
  39. <el-col :span="12">
  40. <div class="grid-content bg-purple item-class">演出时长: <span>{{ form.showDuration }}分钟</span></div>
  41. </el-col>
  42. <el-col :span="12">
  43. <div class="grid-content bg-purple item-class">演出人数: <span>{{ form.peopleNum }}人</span></div>
  44. </el-col>
  45. <el-col :span="12">
  46. <div class="grid-content bg-purple item-class">演员信息: <el-button style="padding: 0" type="text" @click="performerOpen">查看</el-button></div>
  47. </el-col>
  48. <el-col :span="24">
  49. <div class="grid-content bg-purple item-class">
  50. <el-row>
  51. <el-col :span="3">
  52. <div>宣传图:</div>
  53. </el-col>
  54. <el-col :span="12">
  55. <div v-if="form.showImg">
  56. <el-image
  57. style="width: 100px; height: 100px"
  58. :src="form.showImg"
  59. fit="cover"
  60. />
  61. </div>
  62. <div v-else>--</div>
  63. </el-col>
  64. </el-row>
  65. </div>
  66. </el-col>
  67. <el-col :span="24">
  68. <div class="grid-content bg-purple item-class">
  69. <el-row>
  70. <el-col :span="3">
  71. <div>剧目海报:</div>
  72. </el-col>
  73. <el-col :span="12">
  74. <div v-if="form.photoList && form.photoList.length > 0">
  75. <el-image
  76. v-for="(item, index) in form.photoList"
  77. style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px;"
  78. :src="item.imageUrl"
  79. :key="index"
  80. fit="cover"
  81. />
  82. </div>
  83. <div v-else>--</div>
  84. </el-col>
  85. </el-row>
  86. </div>
  87. </el-col>
  88. <el-col :span="24">
  89. <div class="grid-content bg-purple item-class">
  90. <el-row>
  91. <el-col :span="3">
  92. <div>剧情介绍:</div>
  93. </el-col>
  94. <el-col :span="12">
  95. <div v-html="form.performSnapshot"></div>
  96. </el-col>
  97. </el-row>
  98. </div>
  99. </el-col>
  100. </el-row>
  101. <!-- 观影须知 -->
  102. <div class="title-class" style="margin-top: 0">观影须知</div>
  103. <el-row>
  104. <el-col :span="24">
  105. <div class="grid-content bg-purple">
  106. <el-row>
  107. <el-col :span="3">
  108. <div>观影须知:</div>
  109. </el-col>
  110. <el-col :span="12">
  111. <div v-html="form.performNotice"></div>
  112. </el-col>
  113. </el-row>
  114. </div>
  115. </el-col>
  116. </el-row>
  117. </div>
  118. <span slot="footer" class="dialog-footer">
  119. <el-button type="primary" @click="cancel">确定</el-button>
  120. </span>
  121. <el-dialog
  122. title="演员信息"
  123. :visible.sync="performerVisible"
  124. width="800px"
  125. append-to-body
  126. :destroy-on-close="true"
  127. :close-on-click-modal="false"
  128. >
  129. <div>
  130. <el-table ref="tables" :data="performerList" border>
  131. <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
  132. <el-table-column label="姓名" align="center">
  133. <template slot-scope="scope">
  134. <el-input
  135. v-model="scope.row.performerName"
  136. placeholder="姓名"
  137. disabled
  138. clearable
  139. />
  140. </template>
  141. </el-table-column>
  142. <el-table-column label="图片" align="center">
  143. <template slot-scope="scope">
  144. <div class="avatar" v-if="scope.row.performerHead">
  145. <el-image
  146. style="width: 100px; height: 100px"
  147. :src="scope.row.performerHead"
  148. fit="cover"
  149. />
  150. </div>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="角色名" align="center">
  154. <template slot-scope="scope">
  155. <el-input
  156. disabled
  157. v-model="scope.row.performerRole"
  158. placeholder="角色名"
  159. clearable
  160. />
  161. </template>
  162. </el-table-column>
  163. </el-table>
  164. </div>
  165. <div slot="footer" class="dialog-footer">
  166. <el-button type="primary" @click="performerVisible = false">确 定</el-button>
  167. </div>
  168. </el-dialog>
  169. </el-dialog>
  170. </template>
  171. <script>
  172. import { getSelectById } from "@/api/programmeMr/programmeMr";
  173. import Editor from "@/components/Editor";
  174. export default {
  175. name: "detailsDia",
  176. components: {
  177. Editor,
  178. },
  179. data() {
  180. return {
  181. title: "编辑",
  182. model: "EDIT",
  183. open: false,
  184. loading: false,
  185. form: {
  186. id: undefined,
  187. },
  188. performerVisible: false,
  189. performerList: []
  190. };
  191. },
  192. methods: {
  193. /**
  194. * 打开弹框
  195. * @date 2023-11-22
  196. * @param {any} obj
  197. * @returns {any}
  198. */
  199. openDialog(title, obj) {
  200. this.open = true;
  201. if (obj){
  202. this.getSelectByIdApi(obj)
  203. }
  204. },
  205. /** 获取详情 */
  206. getSelectByIdApi(row) {
  207. const id = row.id
  208. getSelectById(id).then(response => {
  209. this.form = response.data;
  210. });
  211. },
  212. /**
  213. * 演员弹窗打开
  214. * @date 2023-11-22
  215. */
  216. performerOpen() {
  217. if(!this.form.performerList){
  218. this.form.performerList = []
  219. }
  220. let target=[...this.form.performerList];
  221. this.performerList = JSON.parse(JSON.stringify(target));
  222. this.performerVisible = true;
  223. },
  224. /**
  225. * 关闭弹框
  226. * @date 2023-11-22
  227. * @returns {any}
  228. */
  229. cancel() {
  230. this.open = false;
  231. },
  232. },
  233. };
  234. </script>
  235. <style lang="scss" scoped>
  236. .dialog {
  237. padding: 0 30px;
  238. max-height: 65vh;
  239. overflow-y: auto;
  240. }
  241. .dialog {
  242. padding: 0 30px;
  243. .upload-btn {
  244. width: 100px;
  245. height: 100px;
  246. background-color: #fbfdff;
  247. border: dashed 1px #c0ccda;
  248. border-radius: 5px;
  249. i {
  250. font-size: 30px;
  251. margin-top: 20px;
  252. }
  253. &-text {
  254. margin-top: -10px;
  255. }
  256. }
  257. .avatar {
  258. cursor: pointer;
  259. }
  260. .title-class{
  261. font-size: 16px;
  262. font-weight: bold;
  263. color: black;
  264. margin-bottom: 20px;
  265. margin-top: 20px;
  266. }
  267. .item-class{
  268. margin-bottom: 20px;
  269. }
  270. }
  271. </style>