|
@@ -259,7 +259,7 @@ import { UploadRequestOptions, dayjs } from 'element-plus'
|
|
|
import { Search, CirclePlusFilled, Edit, CirclePlus, Delete } from '@element-plus/icons-vue'
|
|
|
import { FormInstance, FormRules, ElMessageBox } from 'element-plus'
|
|
|
import { useStore } from '@/store/index'
|
|
|
-import { GET_DATA_LIST, DETELE_DEPT, MOD, GET_USERINFO, GET_ROUTELIST, DEACTIVEUSER, SETACTIVE, GET_DEPTLIST, BACTHSERROLE, GET_USERLIST, GET_ADDDEPT, ADD_USER, SETRESETPWD, EXPOERTUSER } from './api'
|
|
|
+import { GET_DATA_LIST, DETELE_DEPT, MOD, GET_USERINFO, GET_ROUTELIST, DEACTIVEUSER, SETACTIVE, GET_DEPTLIST, BACTHSERROLE, GET_USERLIST, GET_ADDDEPT, ADD_USER, SETRESETPWD, EXPOERTUSER, EDIT_ADDDEPT } from './api'
|
|
|
import { post, uploadFile } from "@/utils/request";
|
|
|
import { getFromValue, updateDepTreeData, resetFromValue, confirmAction, downloadFile } from '@/utils/tools'
|
|
|
|
|
@@ -464,7 +464,7 @@ async function personnelModalConfirm(data: any, modelType: string) {
|
|
|
globalPopup?.showSuccess('添加成功')
|
|
|
getTableData()
|
|
|
}).catch(_err => {
|
|
|
- dialogFrom[modelType] = false
|
|
|
+ dialogFrom[modelType] = false
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -472,14 +472,15 @@ function createDepartment(formEl: FormInstance | undefined) {
|
|
|
if (!formEl) return
|
|
|
let data = getFromValue(deptForm)
|
|
|
loadingFrom.deptDialogVisibleLoading = true
|
|
|
- post(GET_ADDDEPT, { ...deptForm, otherManagerIds: data.otherManagerIds && data.otherManagerIds.join(',') }).then(res => {
|
|
|
+ EDIT_ADDDEPT
|
|
|
+ post(data.id ? EDIT_ADDDEPT : GET_ADDDEPT, { ...deptForm, otherManagerIds: data.otherManagerIds && data.otherManagerIds.join(',') }).then(res => {
|
|
|
if (res.code != 'ok') {
|
|
|
loadingFrom.deptDialogVisibleLoading = false
|
|
|
globalPopup?.showError(res.msg)
|
|
|
return
|
|
|
}
|
|
|
loadingFrom.deptDialogVisibleLoading = false
|
|
|
- globalPopup?.showSuccess('创建成功')
|
|
|
+ globalPopup?.showSuccess(data.id ? '修改成功' : '创建成功')
|
|
|
getDeptList()
|
|
|
dialogFrom.addDeptDialogVisible = false
|
|
|
}).catch(_err => {
|