Commit 178e593d1598e2e389a9bd52280ebdffba9b06cf

Authored by ww
1 parent 7f682d5e

fix: 任务中心隐藏列控制选项

@@ -215,7 +215,7 @@ @@ -215,7 +215,7 @@
215 <span class="mr-2">最近执行</span> 215 <span class="mr-2">最近执行</span>
216 <span>{{ 216 <span>{{
217 getLastExecuteTime.value 217 getLastExecuteTime.value
218 - ? `${getLastExecuteTime.value}${getLastExecuteTime.unitName}前 ${Date.now()}` 218 + ? `${getLastExecuteTime.value}${getLastExecuteTime.unitName}前`
219 : '刚刚' 219 : '刚刚'
220 }}</span> 220 }}</span>
221 </div> 221 </div>
@@ -19,7 +19,6 @@ @@ -19,7 +19,6 @@
19 import { RunTaskModal } from './components/RunTaskModal'; 19 import { RunTaskModal } from './components/RunTaskModal';
20 import { DetailDrawer } from './components/DetailDrawer'; 20 import { DetailDrawer } from './components/DetailDrawer';
21 import { useDrawer } from '/@/components/Drawer'; 21 import { useDrawer } from '/@/components/Drawer';
22 - import { CardLayoutButton } from '/@/components/Widget';  
23 22
24 const [registerModal, { openModal }] = useModal(); 23 const [registerModal, { openModal }] = useModal();
25 const [registerDrawer, { openDrawer }] = useDrawer(); 24 const [registerDrawer, { openDrawer }] = useDrawer();
@@ -42,12 +41,10 @@ @@ -42,12 +41,10 @@
42 getDataSource(); 41 getDataSource();
43 }; 42 };
44 43
45 - const colNumber = ref(5);  
46 const pagination = reactive({ 44 const pagination = reactive({
47 current: 1, 45 current: 1,
48 total: 0, 46 total: 0,
49 - pageSize: unref(colNumber) * 2,  
50 - showQuickJumper: true, 47 + pageSize: 10,
51 size: 'small', 48 size: 'small',
52 showSizeChanger: false, 49 showSizeChanger: false,
53 showTotal: (total: number) => `共 ${total} 条数据`, 50 showTotal: (total: number) => `共 ${total} 条数据`,
@@ -61,15 +58,13 @@ @@ -61,15 +58,13 @@
61 try { 58 try {
62 loading.value = true; 59 loading.value = true;
63 const params = getFieldsValue(); 60 const params = getFieldsValue();
64 - const pageSize = unref(colNumber) * 2;  
65 const { items, total } = await getTaskCenterList({ 61 const { items, total } = await getTaskCenterList({
66 page: pagination.current, 62 page: pagination.current,
67 - pageSize, 63 + pageSize: pagination.pageSize,
68 ...params, 64 ...params,
69 }); 65 });
70 dataSource.value = items; 66 dataSource.value = items;
71 pagination.total = total; 67 pagination.total = total;
72 - pagination.pageSize = pageSize;  
73 } catch (error) { 68 } catch (error) {
74 throw error; 69 throw error;
75 } finally { 70 } finally {
@@ -145,7 +140,7 @@ @@ -145,7 +140,7 @@
145 ref="listElRef" 140 ref="listElRef"
146 :dataSource="dataSource" 141 :dataSource="dataSource"
147 :pagination="pagination" 142 :pagination="pagination"
148 - :grid="{ gutter: 16, xs: 1, sm: 1, md: 2, lg: 3, xl: 3, xxl: 4, column: colNumber }" 143 + :grid="{ gutter: 16, xs: 1, sm: 1, md: 2, lg: 3, xl: 3, xxl: 4, column: 4 }"
149 :loading="loading" 144 :loading="loading"
150 > 145 >
151 <template #header> 146 <template #header>
@@ -154,7 +149,7 @@ @@ -154,7 +149,7 @@
154 <span class="text-lg font-medium">任务列表</span> 149 <span class="text-lg font-medium">任务列表</span>
155 </div> 150 </div>
156 <Space> 151 <Space>
157 - <CardLayoutButton v-model:value="colNumber" :max="4" :min="1" @change="reload" /> 152 + <!-- <CardLayoutButton v-model:value="colNumber" :max="4" :min="1" @change="reload" /> -->
158 <Tooltip v-if="dataSource.length" title="刷新"> 153 <Tooltip v-if="dataSource.length" title="刷新">
159 <Button type="primary" @click="getDataSource"> 154 <Button type="primary" @click="getDataSource">
160 <ReloadOutlined :spin="loading" /> 155 <ReloadOutlined :spin="loading" />