audit-top-banner.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <a-layout ref="formLayout" :class="$style.page">
  3. <a-layout-header :class="$style.header">
  4. <div>
  5. <span>
  6. <div :class="$style.titlepoint"></div>
  7. <span :class="['toptitle', $style.toptitle]">{{ titleName }}</span>
  8. </span>
  9. <a-button type="default" :class="$style.closeBtn" @click="close">关闭</a-button>
  10. <slot name="afterbtn"></slot>
  11. </div>
  12. </a-layout-header>
  13. <a-layout style="padding:20px">
  14. <a-layout
  15. style="height: 100%;padding:20px;overflow-y: auto;background: #fff"
  16. class="sd-has-table"
  17. >
  18. <div :class="$style.formDiv"> <slot></slot> </div>
  19. </a-layout>
  20. </a-layout>
  21. </a-layout>
  22. </template>
  23. <script>
  24. import components from './_import-components/audit-top-banner-import'
  25. export default {
  26. name: 'AuditTopBanner',
  27. metaInfo: {
  28. title: 'AuditTopBanner',
  29. },
  30. components,
  31. data() {
  32. return { titleName: '' }
  33. },
  34. mounted() {
  35. this.initTitle()
  36. },
  37. methods: {
  38. close(flag) {
  39. window.close()
  40. },
  41. // initTitle
  42. // 获取父节点 metaInfo.title
  43. initTitle() {
  44. const { title } = this.$parent.$options?.metaInfo || { title: '标题' }
  45. this.titleName = title || '标题'
  46. },
  47. },
  48. }
  49. </script>
  50. <style module lang="scss">
  51. @import '@/webflow/sd-flow-form.scss';
  52. .toptitle {
  53. position: fixed;
  54. top: 9px;
  55. left: 40px;
  56. font-size: 22px;
  57. font-weight: bold;
  58. color: #404040;
  59. }
  60. .formDiv {
  61. // margin: -8px 22px 22px 22px;
  62. :global(.buttons_sd-detail-form_common) {
  63. :global(.ant-form-item-control-wrapper) {
  64. padding-top: 4%;
  65. padding-left: 24%;
  66. }
  67. }
  68. .tr_border {
  69. box-sizing: border-box;
  70. border-right: 1px solid #e8e8e8;
  71. border-left: 1px solid #e8e8e8;
  72. }
  73. :global(.title_sd-detail-form_common) {
  74. font-size: 1.5em;
  75. text-align: center;
  76. }
  77. :global(.buttons_sd-detail-form_common) {
  78. display: none;
  79. }
  80. }
  81. .close-btn,
  82. .submitBtn,
  83. .save-btn,
  84. .rollbackBtn,
  85. .publishBtn {
  86. top: 8px;
  87. float: right;
  88. margin-right: 10px;
  89. font-size: 16px;
  90. font-weight: 400;
  91. cursor: pointer;
  92. }
  93. .close-btn {
  94. margin-right: 0;
  95. }
  96. // .save-btn {
  97. // right: 80px;
  98. // }
  99. // .submitBtn {
  100. // right: 145px;
  101. // }
  102. // .rollbackBtn {
  103. // right: 210px;
  104. // }
  105. .page {
  106. height: 100%;
  107. :global(.sd-frame-main) {
  108. height: 100%;
  109. padding: 10px;
  110. overflow: auto;
  111. }
  112. }
  113. .header {
  114. height: 30px;
  115. padding: 0;
  116. line-height: 30px;
  117. // background: linear-gradient(to right, #3f9bff, #0e7df6);
  118. // background-image: linear-gradient(90deg, #1890ff 0%, #0162eb 100%);
  119. background: transparent;
  120. .header-title {
  121. display: inline-block;
  122. width: 256px;
  123. height: 100%;
  124. background: url('~@custom/images/logo.png') no-repeat center;
  125. }
  126. .titlepoint {
  127. position: fixed;
  128. top: 12px;
  129. left: 20px;
  130. width: 8px;
  131. height: 27px;
  132. background: #1890ff;
  133. border-radius: 8px;
  134. }
  135. }
  136. .header > div:last-child {
  137. width: calc(100% - 20px);
  138. }
  139. </style>