123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <template>
- <div class="handler-history-table">
- <BasicTable @register="registerTable" />
- </div>
- </template>
- <script lang="ts" name="system-user" setup>
- //ts语法
- import { watch } from 'vue';
- import { BasicTable } from '/@/components/Table';
- import { useListPage } from '/@/hooks/system/useListPage';
- import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
- import { defHttp } from '/@/utils/http/axios';
- const list = (params) => defHttp.get({ url: '/safety/ventanalyDevicesetLog/list', params });
- const props = defineProps({
- columnsType: {
- type: String,
- required: true,
- },
- deviceType: {
- type: String,
- required: true,
- },
- deviceListApi: {
- type: Function,
- required: true,
- },
- designScope: {
- type: String,
- },
- scroll: {
- type: Object,
- default: () => {}
- }
- });
-
- const columns = getTableHeaderColumns(props.columnsType);
- // 列表页面公共参数、方法
- const { tableContext } = useListPage({
- tableProps: {
- api: list,
- columns: columns,
- canResize: true,
- showTableSetting: false,
- showActionColumn: false,
- bordered: false,
- size: 'small',
- scroll: props.scroll,
- formConfig: {
- labelAlign: 'left',
- showAdvancedButton: false,
- schemas: [
- {
- label: '时间范围',
- field: 'createTime',
- component: 'RangePicker',
- componentProps: {
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- },
- },
- {
- label: '查询设备',
- field: 'gdeviceid',
- component: 'ApiSelect',
- componentProps: {
- api: props.deviceListApi,
- resultField: 'records',
- labelField: 'strname',
- valueField: 'id',
- },
- },
- ],
- fieldMapToTime: [['createTime', ['createTime_begin', 'createTime_end'], '']],
- },
- fetchSetting: {
- listField: 'records',
- },
- pagination: {
- current: 1,
- pageSize: 10,
- pageSizeOptions: ['5', '10', '20'],
- },
- beforeFetch(params) {
- params.gdevicetype = props.deviceType + '*';
- },
- },
- });
- //注册table数据
- const [registerTable, { reload }] = tableContext;
-
- </script>
- <style scoped lang="less">
- @ventSpace: zxm;
- // :deep(.@{ventSpace}-table-body) {
- // height: auto !important;
- // }
- :deep(.zxm-picker){
- height: 30px !important;
- }
- .handler-history-table {
- width: 100%;
- :deep(.jeecg-basic-table-form-container) {
- .@{ventSpace}-form {
- padding: 0 !important;
- border: none !important;
- margin-bottom: 0 !important;
- .@{ventSpace}-picker,
- .@{ventSpace}-select-selector {
- width: 100% !important;
- height: 100%;
- background: #00000017;
- border: 1px solid #b7b7b7;
- input,
- .@{ventSpace}-select-selection-item,
- .@{ventSpace}-picker-suffix {
- color: #fff;
- }
- .@{ventSpace}-select-selection-placeholder {
- color: #ffffffaa;
- }
- }
- }
- .@{ventSpace}-table-title {
- min-height: 0 !important;
- }
- }
- }
- </style>
|