zqHistoryExport.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <div class="history-export">
  3. <SvgIcon v-if="!isShowIcon" class="icon-style-back" size="32" name="modal-back" @click="handleBack"></SvgIcon>
  4. <div class="nav-box">
  5. <div class="nav-search">
  6. <div class="search-item">
  7. <span>时间:</span>
  8. <a-range-picker style="width:300px" v-model:value="searchData.timer" :show-time="{ format: 'HH:mm' }"
  9. format="YYYY-MM-DD HH:mm" :placeholder="['开始时间', '结束时间']" @change="onRangeChange" />
  10. </div>
  11. </div>
  12. <div class="nav-btn" @click="handleHisExport">
  13. <div class="nav-text">
  14. <SvgIcon class="icon-style" size="18" name="gas-export"></SvgIcon>
  15. <span>数据导出</span>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="main-content">
  20. <a-table size="small" :dataSource="dataSource" :columns="tableColumn" :scroll="{ y: 455 }"
  21. :pagination="pagination">
  22. <template #action="{ record }">
  23. <!-- <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a> -->
  24. </template>
  25. </a-table>
  26. </div>
  27. </div>
  28. </template>
  29. <script setup lang="ts">
  30. import { reactive, ref } from 'vue'
  31. import { SvgIcon } from '/@/components/Icon';
  32. let props = defineProps({
  33. //是否显示返回按钮
  34. isShowIcon: {
  35. type: Boolean
  36. },
  37. tableColumn: {
  38. type: Array
  39. }
  40. })
  41. let searchData = reactive({
  42. timer: '',
  43. })
  44. let dataSource = ref<any[]>([
  45. { fileName: '测试' },
  46. { fileName: '测试' },
  47. { fileName: '测试' },
  48. { fileName: '测试' },
  49. { fileName: '测试' },
  50. { fileName: '测试' },
  51. { fileName: '测试' },
  52. { fileName: '测试' },
  53. { fileName: '测试' },
  54. { fileName: '测试' },
  55. { fileName: '测试' },
  56. { fileName: '测试' },
  57. { fileName: '测试' },
  58. ])
  59. //分页参数配置
  60. let pagination = reactive({
  61. current: 1, // 当前页码
  62. pageSize: 15, // 每页显示条数
  63. total: 0, // 总条目数,后端返回
  64. // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
  65. showSizeChanger: true, // 是否可改变每页显示条数
  66. pageSizeOptions: ['15', '20', '25', '30', '50'], // 可选的每页显示条数
  67. });
  68. let $emit = defineEmits(['handleBack'])
  69. //返回上一级
  70. function handleBack() {
  71. $emit('handleBack')
  72. }
  73. //导出历史数据
  74. function handleHisExport() { }
  75. //日期切换
  76. function onRangeChange() { }
  77. </script>
  78. <style lang="less" scoped>
  79. @import '/@/design/theme.less';
  80. @{theme-deepblue} {
  81. .history-export {
  82. --image-inject_zq_monitor: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/9-3.png');
  83. }
  84. }
  85. .history-export {
  86. --image-inject_zq_monitor: url('@/assets/images/gasInjection/9-3.png');
  87. position: relative;
  88. width: 100%;
  89. height: 100%;
  90. .icon-style-back {
  91. position: absolute;
  92. left: 6px;
  93. top: -44px;
  94. cursor: pointer;
  95. }
  96. .nav-box {
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. width: 100%;
  101. height: 39px;
  102. padding: 0px 20px;
  103. margin-bottom: 15px;
  104. background: var(--image-inject_zq_monitor) no-repeat;
  105. background-size: 100% 100%;
  106. }
  107. .nav-search {
  108. display: flex;
  109. align-items: center;
  110. height: 100%;
  111. color: #fff;
  112. }
  113. .search-item {
  114. margin-right: 40px;
  115. }
  116. .nav-btn {
  117. width: 100px;
  118. height: 78%;
  119. padding: 2px;
  120. border: 1px solid #1081d7;
  121. cursor: pointer;
  122. color: #fff;
  123. }
  124. .nav-text {
  125. width: 100%;
  126. height: 100%;
  127. display: flex;
  128. justify-content: center;
  129. align-items: center;
  130. background-color: #1081d7;
  131. }
  132. .icon-style {
  133. margin-right: 5px;
  134. }
  135. .main-content {
  136. display: flex;
  137. justify-content: space-between;
  138. width: 100%;
  139. height: calc(100% - 54px);
  140. }
  141. }
  142. :deep(.zxm-picker) {
  143. background: #0b223f !important;
  144. border: 1px solid #1081d7 !important;
  145. border-radius: 4px;
  146. margin-left: 10px;
  147. }
  148. :deep(.zxm-picker-input > input) {
  149. color: #fff;
  150. }
  151. :deep(.zxm-picker-separator) {
  152. color: #fff;
  153. }
  154. :deep(.zxm-select) {
  155. color: #fff !important;
  156. }
  157. :deep(.zxm-select-selector) {
  158. background: #0b223f !important;
  159. border: 1px solid #1081d7 !important;
  160. border-radius: 4px;
  161. margin-left: 10px;
  162. }
  163. :deep(.zxm-table-header) {
  164. border-left: 1px solid #2896ca !important;
  165. border-right: 1px solid #2896ca !important;
  166. }
  167. :deep(.zxm-table-thead > tr > th:last-child) {
  168. border-right: 1px solid #2896ca !important;
  169. }
  170. :deep(.zxm-table-tbody > tr) {
  171. &:nth-child(odd) {
  172. td {
  173. background-color: #0d2c50 !important;
  174. }
  175. }
  176. &:nth-child(even) {
  177. td {
  178. background-color: #0d233f !important;
  179. }
  180. }
  181. }
  182. :deep(.zxm-table-tbody > tr > td) {
  183. border-color: transparent !important;
  184. background: #0a2140 !important;
  185. }
  186. </style>