|
@@ -5,6 +5,11 @@
|
|
|
:canExpan="false"
|
|
|
helpMessage="单位管理"
|
|
|
>
|
|
|
+ <!-- <div class="search-wrap">
|
|
|
+ <a-button type="primary" @click="handleSearch">
|
|
|
+ <span class="iconify" data-icon="bi:search"></span>
|
|
|
+ </a-button>
|
|
|
+ </div> -->
|
|
|
<BasicTable
|
|
|
ref="tableRef"
|
|
|
@register="registerTable"
|
|
@@ -12,7 +17,6 @@
|
|
|
@selectionChange="selectionChange"
|
|
|
@rowClick="rowClick"
|
|
|
@rowDbClick="handleEdit"
|
|
|
- showTableSetting
|
|
|
:canResize="true"
|
|
|
:pagination="{
|
|
|
pageSize: 10,
|
|
@@ -44,6 +48,7 @@
|
|
|
import { Modal } from 'ant-design-vue';
|
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
|
import { getFormConfig, columns } from './data';
|
|
|
+ import moment from 'moment';
|
|
|
import {
|
|
|
getUnitList,
|
|
|
addUnit,
|
|
@@ -79,6 +84,9 @@
|
|
|
const popupData = reactive<PopupData>({
|
|
|
title: '添加',
|
|
|
});
|
|
|
+ // const state = reactive({
|
|
|
+ // isSerach: false,
|
|
|
+ // });
|
|
|
const btn = reactive<Btn>({
|
|
|
disable_btn: true,
|
|
|
});
|
|
@@ -87,6 +95,11 @@
|
|
|
columns: columns,
|
|
|
api: getUnitList,
|
|
|
useSearchForm: true,
|
|
|
+ showTableSetting: true,
|
|
|
+ tableSetting: {
|
|
|
+ redo: false,
|
|
|
+ size: false,
|
|
|
+ },
|
|
|
beforeFetch: beforeFetch,
|
|
|
formConfig: getFormConfig(),
|
|
|
actionColumn: {
|
|
@@ -111,35 +124,35 @@
|
|
|
}
|
|
|
// 请求之前处理参数
|
|
|
function beforeFetch(params) {
|
|
|
- console.log('==========before========');
|
|
|
- console.log(params);
|
|
|
- console.log('==========before========');
|
|
|
-
|
|
|
for (let k in params) {
|
|
|
- if (!params[k]) {
|
|
|
- delete params[k];
|
|
|
+ if (k !== 'page' && k !== 'pageSize' && k !== 'field' && k !== 'order') {
|
|
|
+ if (params[k] === '') {
|
|
|
+ delete params[k];
|
|
|
+ } else {
|
|
|
+ if (!params.filter) {
|
|
|
+ params.filter = {};
|
|
|
+ }
|
|
|
+ if (params.foundingtime) {
|
|
|
+ params.foundingtime = moment(params.foundingtime).format('YYYY-MM-DD');
|
|
|
+ }
|
|
|
+ params.filter[k] = params[k];
|
|
|
+ delete params[k];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if (params.logintime) {
|
|
|
- params.logintime[0] = params.logintime[0].replace(
|
|
|
- /([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/g,
|
|
|
- '00:00:00'
|
|
|
- );
|
|
|
- params.logintime[1] = params.logintime[1].replace(
|
|
|
- /([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/g,
|
|
|
- '23:59:59'
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
+ params.filter = JSON.stringify(params.filter);
|
|
|
params.offset = params.page;
|
|
|
params.limit = params.pageSize;
|
|
|
delete params.page;
|
|
|
delete params.pageSize;
|
|
|
}
|
|
|
+ // function handleSearch() {
|
|
|
+ // state.isSerach = !state.isSerach;
|
|
|
+ // }
|
|
|
|
|
|
function addRole() {
|
|
|
popupData.title = '添加';
|
|
|
+ console.log('------------dddd------');
|
|
|
openPopup(true, {});
|
|
|
}
|
|
|
|
|
@@ -284,18 +297,14 @@
|
|
|
});
|
|
|
</script>
|
|
|
<style>
|
|
|
- .ant-calendar-picker {
|
|
|
- width: 100%;
|
|
|
+ .search-wrap {
|
|
|
+ display: flex;
|
|
|
+ width: 90%;
|
|
|
+ margin: 0 auto;
|
|
|
+ justify-content: flex-end;
|
|
|
}
|
|
|
- @media (max-width: 639px) {
|
|
|
- .sys-container .vben-basic-table-header__toolbar > * {
|
|
|
- padding: 6px !important;
|
|
|
- margin-right: 3px;
|
|
|
- font-size: 12px !important;
|
|
|
- }
|
|
|
|
|
|
- .sys-container .vben-basic-table .ant-table-wrapper {
|
|
|
- padding: 3px;
|
|
|
- }
|
|
|
+ .ant-calendar-picker {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
</style>
|