details.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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.posterImg">
  56. <el-image
  57. style="width: 100px; height: 100px"
  58. :src="form.posterImg"
  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.showImg">
  75. <el-image
  76. style="width: 100px; height: 100px"
  77. :src="form.showImg"
  78. fit="cover"
  79. />
  80. </div>
  81. <div v-else>--</div>
  82. </el-col>
  83. </el-row>
  84. </div>
  85. </el-col>
  86. <el-col :span="24">
  87. <div class="grid-content bg-purple item-class">
  88. <el-row>
  89. <el-col :span="3">
  90. <div>剧目海报:</div>
  91. </el-col>
  92. <el-col :span="12">
  93. <div v-if="form.photoList && form.photoList.length > 0">
  94. <el-image
  95. v-for="(item, index) in form.photoList"
  96. style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px;"
  97. :src="item.imageUrl"
  98. :key="index"
  99. fit="cover"
  100. />
  101. </div>
  102. <div v-else>--</div>
  103. </el-col>
  104. </el-row>
  105. </div>
  106. </el-col>
  107. <el-col :span="24">
  108. <div class="grid-content bg-purple item-class">
  109. <el-row>
  110. <el-col :span="3">
  111. <div>剧情介绍:</div>
  112. </el-col>
  113. <el-col :span="12">
  114. <div v-html="form.performSnapshot"></div>
  115. </el-col>
  116. </el-row>
  117. </div>
  118. </el-col>
  119. </el-row>
  120. <!-- 观影须知 -->
  121. <div class="title-class" style="margin-top: 0">观影须知</div>
  122. <el-row>
  123. <el-col :span="24">
  124. <div class="grid-content bg-purple">
  125. <el-row>
  126. <el-col :span="3">
  127. <div>观影须知:</div>
  128. </el-col>
  129. <el-col :span="12">
  130. <div v-html="form.performNotice"></div>
  131. </el-col>
  132. </el-row>
  133. </div>
  134. </el-col>
  135. </el-row>
  136. </div>
  137. <span slot="footer" class="dialog-footer">
  138. <el-button type="primary" @click="cancel">确定</el-button>
  139. </span>
  140. <el-dialog
  141. title="演员信息"
  142. :visible.sync="performerVisible"
  143. width="800px"
  144. append-to-body
  145. :destroy-on-close="true"
  146. :close-on-click-modal="false"
  147. >
  148. <div>
  149. <el-table ref="tables" :data="performerList" border>
  150. <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
  151. <el-table-column label="姓名" align="center">
  152. <template slot-scope="scope">
  153. <el-input
  154. v-model="scope.row.performerName"
  155. placeholder="姓名"
  156. disabled
  157. clearable
  158. />
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="图片" align="center">
  162. <template slot-scope="scope">
  163. <div class="avatar" v-if="scope.row.performerHead">
  164. <el-image
  165. style="width: 100px; height: 100px"
  166. :src="scope.row.performerHead"
  167. fit="cover"
  168. />
  169. </div>
  170. </template>
  171. </el-table-column>
  172. <el-table-column label="角色名" align="center">
  173. <template slot-scope="scope">
  174. <el-input
  175. disabled
  176. v-model="scope.row.performerRole"
  177. placeholder="角色名"
  178. clearable
  179. />
  180. </template>
  181. </el-table-column>
  182. <el-table-column label="演员简介" width="200" align="center">
  183. <template slot-scope="scope">
  184. <el-input
  185. type="textarea"
  186. disabled
  187. :rows="4"
  188. maxlength="500"
  189. show-word-limit
  190. v-model="scope.row.performerSnapshot"
  191. placeholder="演员简介"
  192. clearable
  193. />
  194. </template>
  195. </el-table-column>
  196. </el-table>
  197. </div>
  198. <div slot="footer" class="dialog-footer">
  199. <el-button type="primary" @click="performerVisible = false">确 定</el-button>
  200. </div>
  201. </el-dialog>
  202. </el-dialog>
  203. </template>
  204. <script>
  205. import { getSelectById } from "@/api/programmeMr/programmeMr";
  206. import Editor from "@/components/Editor";
  207. export default {
  208. name: "detailsDia",
  209. components: {
  210. Editor,
  211. },
  212. data() {
  213. return {
  214. title: "编辑",
  215. model: "EDIT",
  216. open: false,
  217. loading: false,
  218. form: {
  219. id: undefined,
  220. },
  221. performerVisible: false,
  222. performerList: []
  223. };
  224. },
  225. methods: {
  226. /**
  227. * 打开弹框
  228. * @date 2023-11-22
  229. * @param {any} obj
  230. * @returns {any}
  231. */
  232. openDialog(title, obj) {
  233. this.open = true;
  234. if (obj){
  235. this.getSelectByIdApi(obj)
  236. }
  237. },
  238. /** 获取详情 */
  239. getSelectByIdApi(row) {
  240. const id = row.id
  241. getSelectById(id).then(response => {
  242. this.form = response.data;
  243. });
  244. },
  245. /**
  246. * 演员弹窗打开
  247. * @date 2023-11-22
  248. */
  249. performerOpen() {
  250. if(!this.form.performerList){
  251. this.form.performerList = []
  252. }
  253. let target=[...this.form.performerList];
  254. this.performerList = JSON.parse(JSON.stringify(target));
  255. this.performerVisible = true;
  256. },
  257. /**
  258. * 关闭弹框
  259. * @date 2023-11-22
  260. * @returns {any}
  261. */
  262. cancel() {
  263. this.open = false;
  264. },
  265. },
  266. };
  267. </script>
  268. <style lang="scss" scoped>
  269. .dialog {
  270. padding: 0 30px;
  271. max-height: 65vh;
  272. overflow-y: auto;
  273. }
  274. .dialog {
  275. padding: 0 30px;
  276. .upload-btn {
  277. width: 100px;
  278. height: 100px;
  279. background-color: #fbfdff;
  280. border: dashed 1px #c0ccda;
  281. border-radius: 5px;
  282. i {
  283. font-size: 30px;
  284. margin-top: 20px;
  285. }
  286. &-text {
  287. margin-top: -10px;
  288. }
  289. }
  290. .avatar {
  291. cursor: pointer;
  292. }
  293. .title-class{
  294. font-size: 16px;
  295. font-weight: bold;
  296. color: black;
  297. margin-bottom: 20px;
  298. margin-top: 20px;
  299. }
  300. .item-class{
  301. margin-bottom: 20px;
  302. }
  303. }
  304. </style>