Commit 301f26068f52c3b7018f756877d8876d21e871ea

Authored by xp.Huang
2 parents 83c318b8 7247118c

Merge branch 'f-dev' into 'main'

fix:修复Teambition上的问题

See merge request huang/yun-teng-iot-front!285
@@ -54,7 +54,7 @@ export const columns: BasicColumn[] = [ @@ -54,7 +54,7 @@ export const columns: BasicColumn[] = [
54 title: '配置状态', 54 title: '配置状态',
55 dataIndex: 'status', 55 dataIndex: 'status',
56 width: 120, 56 width: 120,
57 - slots: { customRender: 'status' }, 57 + slots: { customRender: 'configStatus' },
58 }, 58 },
59 { 59 {
60 title: '执行方式', 60 title: '执行方式',
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 ]" 54 ]"
55 /> 55 />
56 </template> 56 </template>
57 - <template #status="{ record }"> 57 + <template #configStatus="{ record }">
58 <Switch 58 <Switch
59 :disabled="disabledSwitch" 59 :disabled="disabledSwitch"
60 :checked="record.status === 1" 60 :checked="record.status === 1"
@@ -92,7 +92,7 @@ @@ -92,7 +92,7 @@
92 const searchInfo = reactive<Recordable>({}); 92 const searchInfo = reactive<Recordable>({});
93 const disabledSwitch = ref(false); 93 const disabledSwitch = ref(false);
94 94
95 - const [registerTable, { reload, setProps }] = useTable({ 95 + const [registerTable, { reload, setProps, setSelectedRowKeys }] = useTable({
96 title: '报表列表', 96 title: '报表列表',
97 api: reportPage, 97 api: reportPage,
98 columns, 98 columns,
@@ -125,11 +125,8 @@ @@ -125,11 +125,8 @@
125 reload(); 125 reload();
126 }; 126 };
127 127
128 - const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete(  
129 - deleteReportManage,  
130 - handleSuccess,  
131 - setProps  
132 - ); 128 + const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } =
  129 + useBatchDelete(deleteReportManage, handleSuccess, setProps);
133 selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => { 130 selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => {
134 // Demo:status为1的选择框禁用 131 // Demo:status为1的选择框禁用
135 if (record.status === 1) { 132 if (record.status === 1) {
@@ -181,6 +178,8 @@ @@ -181,6 +178,8 @@
181 setProps({ 178 setProps({
182 loading: true, 179 loading: true,
183 }); 180 });
  181 + setSelectedRowKeys([]);
  182 + resetSelectedRowKeys();
184 disabledSwitch.value = true; 183 disabledSwitch.value = true;
185 const newStatus = checked ? 1 : 0; 184 const newStatus = checked ? 1 : 0;
186 const res = await putReportByidAndStatusManage(record.id, newStatus); 185 const res = await putReportByidAndStatusManage(record.id, newStatus);
@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
107 107
108 const disabledSwitch = ref(false); 108 const disabledSwitch = ref(false);
109 const { createMessage } = useMessage(); 109 const { createMessage } = useMessage();
110 - const [registerTable, { setProps, reload }] = useTable({ 110 + const [registerTable, { setProps, reload, setSelectedRowKeys }] = useTable({
111 title: '定时任务列表', 111 title: '定时任务列表',
112 api: scheduePage, 112 api: scheduePage,
113 columns: columnSchedue, 113 columns: columnSchedue,
@@ -134,11 +134,8 @@ @@ -134,11 +134,8 @@
134 const handleSuccess = () => { 134 const handleSuccess = () => {
135 reload(); 135 reload();
136 }; 136 };
137 - const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete(  
138 - deleteSchedueManage,  
139 - handleSuccess,  
140 - setProps  
141 - ); 137 + const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } =
  138 + useBatchDelete(deleteSchedueManage, handleSuccess, setProps);
142 selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => { 139 selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => {
143 // Demo:status为1的选择框禁用 140 // Demo:status为1的选择框禁用
144 if (record.status === 1) { 141 if (record.status === 1) {
@@ -187,6 +184,8 @@ @@ -187,6 +184,8 @@
187 setProps({ 184 setProps({
188 loading: true, 185 loading: true,
189 }); 186 });
  187 + setSelectedRowKeys([]);
  188 + resetSelectedRowKeys();
190 disabledSwitch.value = true; 189 disabledSwitch.value = true;
191 const newStatus = checked ? 1 : 0; 190 const newStatus = checked ? 1 : 0;
192 const res = await putSchedueByidAndStatusManage(record.id, newStatus); 191 const res = await putSchedueByidAndStatusManage(record.id, newStatus);