| | |
| | | data() { |
| | | return { |
| | | authorization: {}, |
| | | uploadUrl: "/api/blade-cps/employee/import-employee", |
| | | exportUrl: "/api/blade-cps/employee/export-template", |
| | | uploadUrl: "/api/smis/employee/import-employee", |
| | | exportUrl: "/api/smis/employee/export-template", |
| | | titleList: [], |
| | | delPersonModel: false, |
| | | searchIcon: "el-icon-search", |
| | |
| | | avatarDel(index) { |
| | | var obj = this.tableData[index]; |
| | | obj.avatar = ""; |
| | | this.$HTTP.post(`/api/blade-cps/employee/submit`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/smis/employee/submit`,obj).then(res=> { |
| | | this.searchPerson(); |
| | | }) |
| | | }, |
| | | handleAvatarSuccess(file,index) { |
| | | var obj = this.tableData[index]; |
| | | obj.avatar = file.data.link; |
| | | this.$HTTP.post(`/api/blade-cps/employee/submit`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/smis/employee/submit`,obj).then(res=> { |
| | | this.searchPerson(); |
| | | }) |
| | | }, |
| | |
| | | return isJPG; |
| | | }, |
| | | getExport() { |
| | | this.$HTTP.get(`/api/blade-cps/employee/export-employee?` + this.$TOOL.qsStringify(this.searchData)).then(res => { |
| | | this.$HTTP.get(`/api/smis/employee/export-employee?` + this.$TOOL.qsStringify(this.searchData)).then(res => { |
| | | if (res.code == 200) { |
| | | window.open(res.data.link); |
| | | } |
| | |
| | | this.searchPerson(); |
| | | }, |
| | | getOrganizationList() { //部门 |
| | | this.$HTTP.get(`/api/blade-cps/organization/tree?groupType=group_organization&groupCategory=1`).then(res => { |
| | | this.$HTTP.get(`/api/smis/organization/tree?groupType=group_organization&groupCategory=1`).then(res => { |
| | | if (res.code == 200) { |
| | | this.titleList = res.data; |
| | | this.titleList[0].active = true; |
| | |
| | | }) |
| | | }, |
| | | delData(type) { |
| | | this.$HTTP.post(`/api/blade-cps/employee/remove?ids=${this.selectId}&type=${type}`).then(res => { |
| | | this.$HTTP.post(`/api/smis/employee/remove?ids=${this.selectId}&type=${type}`).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success("操作成功"); |
| | | this.delPersonModel = false; |
| | |
| | | this.searchPerson(); |
| | | }, |
| | | searchPerson() { |
| | | this.$HTTP.get(`/api/blade-cps/employee/list?` + this.$TOOL.qsStringify(this.searchData)).then(res => { |
| | | this.$HTTP.get(`/api/smis/employee/list?` + this.$TOOL.qsStringify(this.searchData)).then(res => { |
| | | if (res.code == 200) { |
| | | res.data.records.forEach(item => { |
| | | if (item.dictValue == "在职") { |
| | |
| | | }) |
| | | this.$refs.dialogForm.validate(async (valid) => { |
| | | if (valid) { |
| | | this.$HTTP.put(`/api/blade-cps/employee/change-organization?organizationId=${this.departmentFrom.parentId}&employeeIds=${employeeIds.join(",")}`).then(res => { |
| | | this.$HTTP.put(`/api/smis/employee/change-organization?organizationId=${this.departmentFrom.parentId}&employeeIds=${employeeIds.join(",")}`).then(res => { |
| | | if (res.code == 200) { |
| | | this.searchPerson(); |
| | | this.departmentVisible = false; //部门调整 |