forked from integrated_whb/integrated_whb_vue
				
			BUG 优化
							parent
							
								
									456855000a
								
							
						
					
					
						commit
						83faf65bb4
					
				|  | @ -162,40 +162,13 @@ | |||
|               >编辑 | ||||
|             </el-button> | ||||
|             <el-button | ||||
|               v-if="expandedRows[row.INSPECTANNUALLY_ID]" | ||||
|               v-if="buttonJurisdiction.del" | ||||
|               type="danger" | ||||
|               text | ||||
|               link | ||||
|               @click="fnDelete(row.INSPECTANNUALLY_ID)" | ||||
|               >删除 | ||||
|             </el-button> | ||||
|             <el-button | ||||
|               v-if=" | ||||
|                 expandedRows[row.INSPECTANNUALLY_ID] && | ||||
|                 row.REMINDER_STATUS === '0' | ||||
|               " | ||||
|               type="primary" | ||||
|               text | ||||
|               link | ||||
|               @click="fnStatusChange(row.INSPECTANNUALLY_ID, '1')" | ||||
|               >开启</el-button | ||||
|             > | ||||
|             <el-button | ||||
|               v-if=" | ||||
|                 expandedRows[row.INSPECTANNUALLY_ID] && | ||||
|                 row.REMINDER_STATUS === '1' | ||||
|               " | ||||
|               type="primary" | ||||
|               text | ||||
|               link | ||||
|               @click="fnStatusChange(row.INSPECTANNUALLY_ID, '0')" | ||||
|               >关闭 | ||||
|             </el-button> | ||||
|             <el-button | ||||
|               type="primary" | ||||
|               @click="toggleExpand(row.INSPECTANNUALLY_ID)" | ||||
|             > | ||||
|               {{ expandedRows[row.INSPECTANNUALLY_ID] ? "收起" : "更多" }} | ||||
|               删除 | ||||
|             </el-button> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|  | @ -228,7 +201,6 @@ import useListData from "@/assets/js/useListData.js"; | |||
| import { | ||||
|   getInspectAnnuallyList, | ||||
|   setInspectAnnuallyDelete, | ||||
|   setInspectAnnuallyEdit2, | ||||
| } from "@/request/mechanical_files.js"; | ||||
| import { reactive } from "vue"; | ||||
| import { debounce } from "throttle-debounce"; | ||||
|  | @ -272,18 +244,6 @@ const fnResetPaginationTransfer = () => { | |||
|     REMINDER_STATUS: searchForm.value.REMINDER_STATUS, | ||||
|   }); | ||||
| }; | ||||
| // 使用一个对象来跟踪每一行的展开状态 | ||||
| const expandedRows = reactive({}); // 初始化一个空对象 | ||||
| 
 | ||||
| // 定义一个函数来切换展开状态 | ||||
| function toggleExpand(rowId) { | ||||
|   if (expandedRows[rowId] === undefined) { | ||||
|     expandedRows[rowId] = true; // 如果之前没有状态,默认设置为展开 | ||||
|   } else { | ||||
|     expandedRows[rowId] = !expandedRows[rowId]; // 切换状态 | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| const fnDelete = debounce( | ||||
|   1000, | ||||
|   async (INSPECTANNUALLY_ID) => { | ||||
|  | @ -294,19 +254,6 @@ const fnDelete = debounce( | |||
|   }, | ||||
|   { atBegin: true } | ||||
| ); | ||||
| const fnStatusChange = debounce( | ||||
|   1000, | ||||
|   async (INSPECTANNUALLY_ID, REMINDER_STATUS) => { | ||||
|     const msg = REMINDER_STATUS === "0" ? "关闭" : "开启"; | ||||
|     await ElMessageBox.confirm("确定要" + msg + "提醒吗?", { | ||||
|       type: "warning", | ||||
|     }); | ||||
|     await setInspectAnnuallyEdit2({ INSPECTANNUALLY_ID, REMINDER_STATUS }); | ||||
|     ElMessage.success(msg + "成功"); | ||||
|     fnResetPaginationTransfer(); | ||||
|   }, | ||||
|   { atBegin: true } | ||||
| ); | ||||
| const buttonJurisdiction = await useButtonJurisdiction("hidden"); | ||||
| 
 | ||||
| const fnImportDialogChangeShow = () => { | ||||
|  | @ -328,7 +275,6 @@ const fnSubmitImport = async (formData) => { | |||
| 
 | ||||
| const fnExport = async () => { | ||||
|   const selectionData = tableRef.value.getSelectionRows(); | ||||
|   console.log("selectionData",selectionData); | ||||
|   if (selectionData.length === 0) { | ||||
|     ElMessage.warning("请选择需要导出至excel报表的记录信息"); | ||||
|     return; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue