CardDetailDialog.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <el-dialog
  3. class="dialog-container"
  4. v-el-drag-dialog
  5. :visible.sync="show"
  6. top="15vh"
  7. :modal="false"
  8. width="472px"
  9. :show-close="false"
  10. >
  11. <div slot="title" class="dialog-title">
  12. <img :src="require('@/assets/imgs/logo_small.png')" alt="" />
  13. <div class="title-box">
  14. <span class="title-text">{{ info.group }}</span>
  15. <span class="title-text">{{ info.company + info.curStation }}</span>
  16. </div>
  17. </div>
  18. <div class="list-container">
  19. <div class="table-title">
  20. <span class="title-text">{{ detail.name }}</span>
  21. <span class="sub-title">{{ detail.subName }}</span>
  22. </div>
  23. <div class="table-box">
  24. <div class="list-item table-header">
  25. <div class="sort">序号</div>
  26. <div class="content">处置步骤</div>
  27. <div class="person">负责人</div>
  28. </div>
  29. <div class="list-item" v-for="item of detail.steps" :key="item.id">
  30. <div class="sort">{{ item.sort }}</div>
  31. <div class="content">{{ item.content }}</div>
  32. <div class="person">{{ item.personInCharge }}</div>
  33. </div>
  34. </div>
  35. </div>
  36. <div slot="footer" class="dialog-footer">
  37. <el-button size="mini" @click="handleClose">关 闭</el-button>
  38. </div>
  39. </el-dialog>
  40. </template>
  41. <script>
  42. import elDragDialog from "@/directive/el-drag-dialog";
  43. export default {
  44. name: "CardDetailDialog",
  45. directives: { elDragDialog },
  46. data() {
  47. return {
  48. show: false,
  49. detail: {},
  50. info: {
  51. group: "国家管网集团西南管道公司",
  52. company: "贵阳输油气分公司",
  53. curStation: "都匀作业区",
  54. },
  55. };
  56. },
  57. watch: {
  58. detail(val) {
  59. this.show = !!val.id;
  60. },
  61. },
  62. mounted() {
  63. this.info = HOME_DATA;
  64. this.$EventBus.$off("handleClickRow");
  65. this.$EventBus.$on("handleClickRow", (data) => {
  66. this.detail = data;
  67. });
  68. },
  69. methods: {
  70. handleClose() {
  71. this.detail = {};
  72. },
  73. },
  74. };
  75. </script>
  76. <style lang="less" scoped>
  77. .dialog-container {
  78. pointer-events: none;
  79. ::v-deep .el-dialog {
  80. pointer-events: auto;
  81. background: rgba(0, 58, 109, 0.9);
  82. border: 1px solid #a0f0ff;
  83. border-radius: 10px;
  84. left: 570px;
  85. .el-dialog__header {
  86. height: 88px;
  87. padding: 0;
  88. background-image: linear-gradient(
  89. 180deg,
  90. rgba(0, 70, 140, 0.8) 0%,
  91. rgba(0, 121, 215, 0.8) 100%
  92. );
  93. border-radius: 10px 10px 0 0;
  94. .dialog-title {
  95. height: 100%;
  96. display: flex;
  97. justify-content: center;
  98. align-items: center;
  99. .title-box {
  100. display: flex;
  101. flex-direction: column;
  102. justify-content: center;
  103. align-items: center;
  104. .title-text {
  105. width: 300px;
  106. // height: 40px;
  107. font-size: 18px;
  108. color: #ffffff;
  109. letter-spacing: 2px;
  110. font-weight: 700;
  111. text-align-last: justify;
  112. }
  113. }
  114. }
  115. }
  116. .el-dialog__body {
  117. padding: 0;
  118. .list-container {
  119. padding: 20px;
  120. // background: rgba(0, 85, 96, 0.5);
  121. .table-title {
  122. width: 100%;
  123. padding-bottom: 10px;
  124. display: flex;
  125. flex-direction: column;
  126. align-items: center;
  127. .title-text {
  128. font-size: 16px;
  129. color: #ffffff;
  130. letter-spacing: 1px;
  131. font-weight: 700;
  132. // text-align-last: justify;
  133. }
  134. .sub-title {
  135. font-size: 14px;
  136. color: #ffffff;
  137. letter-spacing: 1px;
  138. font-weight: 500;
  139. // text-align-last: justify;
  140. }
  141. }
  142. .table-box {
  143. min-height: 470px;
  144. border: 1px solid #a0f0ff;
  145. border-bottom: 0;
  146. display: table;
  147. border-collapse: collapse;
  148. .table-header {
  149. background: rgba(0, 156, 255, 0.3);
  150. }
  151. }
  152. .list-item {
  153. min-height: 40px;
  154. display: table-row;
  155. color: #fff;
  156. border-bottom: 1px solid #a0f0ff;
  157. text-align: center;
  158. &.table-header {
  159. display: table-header-group;
  160. height: 40px;
  161. }
  162. & > div {
  163. min-height: 40px;
  164. display: table-cell;
  165. padding: 5px 10px;
  166. vertical-align: middle;
  167. }
  168. .sort {
  169. width: 50px;
  170. }
  171. .content {
  172. width: calc(100% - 150px);
  173. border-left: 1px solid #a0f0ff;
  174. border-right: 1px solid #a0f0ff;
  175. }
  176. .person {
  177. width: 100px;
  178. }
  179. }
  180. }
  181. }
  182. .el-dialog__footer {
  183. padding: 0;
  184. height: 48px;
  185. background-image: linear-gradient(
  186. 180deg,
  187. rgba(0, 70, 140, 0.8) 0%,
  188. rgba(0, 121, 215, 0.8) 100%
  189. );
  190. border-radius: 0 0 10px 10px;
  191. .dialog-footer {
  192. height: 100%;
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. .el-button {
  197. // width: 80px;
  198. // height: 26px;
  199. // line-height: 26px;
  200. color: #fff;
  201. background: rgba(0, 20, 41, 0.5);
  202. border: 1px solid #a0f0ff;
  203. }
  204. }
  205. }
  206. }
  207. }
  208. </style>