| | |
| | | url: `/admin/department/get_department_list`, |
| | | method: 'post', |
| | | }); |
| | | |
| | | /** |
| | | * @description 编辑部门信息 |
| | | **/ |
| | | export const update_department_info = (params) => |
| | | request({ |
| | | url: `/admin/department/update_department_info`, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | |
| | | <el-table-column label="操作" width="80" fixed="right" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <div class="space-x-3 items-center flex"> |
| | | <el-tooltip effect="dark" content="编辑" placement="top"> |
| | | <i class="ywifont ywicon-bianji !text-[15px] text-blue-400 cursor-pointer" @click="openOptDlg(scope.row)"></i> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="删除" placement="top"> |
| | | <i class="ywifont ywicon-shanchu !text-[17px] text-red-400 cursor-pointer" @click="deleteCurrentRow(scope.row)"></i> |
| | | </el-tooltip> |
| | |
| | | isEditDialog.value = false; |
| | | dialogFormValue.value = { |
| | | name: '', |
| | | parent_id: '', |
| | | parent_id: null, |
| | | }; |
| | | } |
| | | }; |
| | |
| | | const updateTime = formatDate(new Date()); |
| | | |
| | | if (isEditDialog.value) { |
| | | return; |
| | | const res = await departmentApi.updateUserInfoByPost(dialogFormValue.value); |
| | | const res = await departmentApi.update_department_info(dialogFormValue.value); |
| | | emit('update', { ...dialogFormValue.value }); |
| | | |
| | | closeDialog(); |
| | | ElMessage.success('修改部门成功'); |
| | | } else { |
| | | dialogFormValue.value.parent_id = dialogFormValue.value.parent_id || '0'; |
| | | const res = await departmentApi.add_department_info(dialogFormValue.value); |
| | | emit('insert'); |
| | | // tableData.value.push(newData); |