mirror of https://github.com/veops/cmdb.git
删除usedfc
This commit is contained in:
parent
1436ffb3b2
commit
328105ed05
|
@ -1,14 +1,13 @@
|
|||
const appConfig = {
|
||||
buildModules: ['cmdb'], // 需要编译的模块
|
||||
useMessageNotice: false, // 是否启用消息通知
|
||||
useTodoNotice: false, // 是否启用ticket通知
|
||||
useClaimNotice: false, // 是否启动ticket claim 通知
|
||||
useDagReviewNotice: false, // 是否启用dag审核通知
|
||||
redirectTo: '/cmdb', // 首页的重定向路径
|
||||
buildAclToModules: true, // 是否在各个应用下 内联权限管理
|
||||
ssoLogoutURL: '/api/sso/logout',
|
||||
useDFC: false,
|
||||
showDocs: false,
|
||||
buildModules: ['cmdb'], // 需要编译的模块
|
||||
useMessageNotice: false, // 是否启用消息通知
|
||||
useTodoNotice: false, // 是否启用ticket通知
|
||||
useClaimNotice: false, // 是否启动ticket claim 通知
|
||||
useDagReviewNotice: false, // 是否启用dag审核通知
|
||||
redirectTo: '/cmdb', // 首页的重定向路径
|
||||
buildAclToModules: true, // 是否在各个应用下 内联权限管理
|
||||
ssoLogoutURL: '/api/sso/logout',
|
||||
showDocs: false,
|
||||
}
|
||||
|
||||
export default appConfig
|
||||
|
|
|
@ -14,7 +14,6 @@ export function getOnDutyUser() {
|
|||
return axios({
|
||||
url: urlPrefix + '/users/employee',
|
||||
method: 'GET',
|
||||
// data: { 'originUrl': 'http://hr.dfc.sh/api/all_users?work_status=在职' }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -46,15 +46,13 @@
|
|||
:column-config="{ resizable: true }"
|
||||
>
|
||||
<vxe-column field="email" title="邮箱" min-width="120" fixed="left"></vxe-column>
|
||||
<vxe-column field="username" title="用户名" min-width="80" ></vxe-column>
|
||||
<vxe-column field="username" title="用户名" min-width="80"></vxe-column>
|
||||
<vxe-column field="nickname" title="姓名" min-width="80"></vxe-column>
|
||||
<vxe-column field="password" title="密码" min-width="80"></vxe-column>
|
||||
<vxe-column field="sex" title="性别" min-width="60"></vxe-column>
|
||||
<vxe-column field="mobile" title="手机号" min-width="80"></vxe-column>
|
||||
<vxe-column field="position_name" title="岗位" min-width="80"></vxe-column>
|
||||
<vxe-column field="department_name" title="部门" min-width="80"></vxe-column>
|
||||
<vxe-column field="current_company" v-if="useDFC" title="目前所属主体" min-width="120"></vxe-column>
|
||||
<vxe-column field="dfc_entry_date" v-if="useDFC" title="初始入职日期" min-width="120"></vxe-column>
|
||||
<vxe-column field="entry_date" title="目前主体入职日期" min-width="120"></vxe-column>
|
||||
<vxe-column field="is_internship" title="正式/实习生" min-width="120"></vxe-column>
|
||||
<vxe-column field="leave_date" title="离职日期" min-width="120"></vxe-column>
|
||||
|
@ -94,7 +92,6 @@
|
|||
<script>
|
||||
import { downloadExcel, excel2Array } from '@/utils/download'
|
||||
import { importEmployee } from '@/api/employee'
|
||||
import appConfig from '@/config/app'
|
||||
export default {
|
||||
name: 'BatchUpload',
|
||||
data() {
|
||||
|
@ -189,7 +186,6 @@ export default {
|
|||
has_error: false,
|
||||
allCount: 0,
|
||||
errorCount: 0,
|
||||
useDFC: appConfig.useDFC,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -215,12 +211,14 @@ export default {
|
|||
rest[key] = rest[key] + ''
|
||||
}
|
||||
})
|
||||
rest.educational_experience = [{
|
||||
'school': rest.school,
|
||||
'major': rest.major,
|
||||
'education': rest.education,
|
||||
'graduation_year': rest.graduation_year
|
||||
}]
|
||||
rest.educational_experience = [
|
||||
{
|
||||
school: rest.school,
|
||||
major: rest.major,
|
||||
education: rest.education,
|
||||
graduation_year: rest.graduation_year,
|
||||
},
|
||||
]
|
||||
delete rest.school
|
||||
delete rest.major
|
||||
delete rest.education
|
||||
|
@ -254,8 +252,7 @@ export default {
|
|||
const data = [
|
||||
[
|
||||
{
|
||||
v:
|
||||
'1、表头标“*”的红色字体为必填项\n2、邮箱、用户名不允许重复\n3、登录密码:密码由6-20位字母、数字组成\n4、部门:上下级部门间用"/"隔开,且从最上级部门开始,例如“深圳分公司/IT部/IT二部”。如出现相同的部门,则默认导入组织架构中顺序靠前的部门',
|
||||
v: '1、表头标“*”的红色字体为必填项\n2、邮箱、用户名不允许重复\n3、登录密码:密码由6-20位字母、数字组成\n4、部门:上下级部门间用"/"隔开,且从最上级部门开始,例如“深圳分公司/IT部/IT二部”。如出现相同的部门,则默认导入组织架构中顺序靠前的部门',
|
||||
t: 's',
|
||||
s: {
|
||||
alignment: {
|
||||
|
@ -420,13 +417,9 @@ export default {
|
|||
},
|
||||
],
|
||||
]
|
||||
if (this.useDFC) {
|
||||
downloadExcel(data, '员工导入模板')
|
||||
} else {
|
||||
data[1] = data[1].filter(item => item['v'] !== '目前所属主体')
|
||||
data[1] = data[1].filter(item => item['v'] !== '初始入职日期')
|
||||
downloadExcel(data, '员工导入模板')
|
||||
}
|
||||
data[1] = data[1].filter((item) => item['v'] !== '目前所属主体')
|
||||
data[1] = data[1].filter((item) => item['v'] !== '初始入职日期')
|
||||
downloadExcel(data, '员工导入模板')
|
||||
},
|
||||
customRequest(data) {
|
||||
this.fileList = [data.file]
|
||||
|
@ -435,22 +428,12 @@ export default {
|
|||
this.importData = res.slice(2).map((item) => {
|
||||
const obj = {}
|
||||
// 格式化日期字段
|
||||
if (this.useDFC) {
|
||||
item[9] = this.formatDate(item[9]) // 初始入职日期日期
|
||||
item[10] = this.formatDate(item[10]) // 目前主体入职日期
|
||||
item[12] = this.formatDate(item[12]) // 离职日期
|
||||
item[30] = this.formatDate(item[30]) // 毕业年份
|
||||
item.forEach((ele, index) => {
|
||||
obj[this.dfc_importParamsList[index]] = ele
|
||||
})
|
||||
} else {
|
||||
item[8] = this.formatDate(item[8]) // 目前主体入职日期
|
||||
item[10] = this.formatDate(item[10]) // 离职日期
|
||||
item[28] = this.formatDate(item[28]) // 毕业年份
|
||||
item[8] = this.formatDate(item[8]) // 目前主体入职日期
|
||||
item[10] = this.formatDate(item[10]) // 离职日期
|
||||
item[28] = this.formatDate(item[28]) // 毕业年份
|
||||
item.forEach((ele, index) => {
|
||||
obj[this.common_importParamsList[index]] = ele
|
||||
})
|
||||
}
|
||||
return obj
|
||||
})
|
||||
this.currentStep = 2
|
||||
|
@ -474,17 +457,17 @@ export default {
|
|||
month = month > 9 ? month : `0${month}`
|
||||
day = day > 9 ? day : `0${day}`
|
||||
const hash = {
|
||||
'Y': year,
|
||||
'm': month,
|
||||
'd': day,
|
||||
Y: year,
|
||||
m: month,
|
||||
d: day,
|
||||
}
|
||||
return format.replace(/\w/g, o => {
|
||||
return format.replace(/\w/g, (o) => {
|
||||
return hash[o]
|
||||
})
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -137,29 +137,6 @@
|
|||
:formatter="(value) => `${value} 天`"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
v-if="useDFC && attributes.findIndex((v) => v == 'current_company') !== -1"
|
||||
ref="current_company"
|
||||
label="目前所属主体"
|
||||
prop="current_company"
|
||||
:style="formModalItemStyle"
|
||||
>
|
||||
<a-input v-model="employeeFormData.current_company" placeholder="请输入目前所属主体" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
v-if="useDFC && attributes.findIndex((v) => v == 'dfc_entry_date') !== -1"
|
||||
ref="dfc_entry_date"
|
||||
label="初始入职日期"
|
||||
prop="dfc_entry_date"
|
||||
:style="formModalItemStyle"
|
||||
>
|
||||
<a-date-picker
|
||||
placeholder="请选择初始入职日期"
|
||||
v-model="employeeFormData.dfc_entry_date"
|
||||
:style="{ width: '100%' }"
|
||||
@change="onChange($event, 'dfc_entry_date')"
|
||||
></a-date-picker>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
ref="entry_date"
|
||||
label="目前主体入职日期"
|
||||
|
@ -405,9 +382,9 @@
|
|||
:style="{ display: 'inline-block', width: '98%', margin: '0 7px 24px' }"
|
||||
v-if="
|
||||
attributes.findIndex((v) => v == 'bank_card_number') !== -1 ||
|
||||
attributes.findIndex((v) => v == 'bank_card_name') !== -1 ||
|
||||
attributes.findIndex((v) => v == 'opening_bank') !== -1 ||
|
||||
attributes.findIndex((v) => v == 'account_opening_location') !== -1
|
||||
attributes.findIndex((v) => v == 'bank_card_name') !== -1 ||
|
||||
attributes.findIndex((v) => v == 'opening_bank') !== -1 ||
|
||||
attributes.findIndex((v) => v == 'account_opening_location') !== -1
|
||||
"
|
||||
>
|
||||
<a-row :gutter="[8, { xs: 8 }]">
|
||||
|
@ -439,7 +416,6 @@ import { postEmployee, putEmployee } from '@/api/employee'
|
|||
import Bus from './eventBus/bus'
|
||||
import EmployeeTreeSelect from '../components/employeeTreeSelect.vue'
|
||||
import DepartmentTreeSelect from '../components/departmentTreeSelect.vue'
|
||||
import appConfig from '@/config/app'
|
||||
import moment from 'moment'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
export default {
|
||||
|
@ -477,7 +453,6 @@ export default {
|
|||
],
|
||||
},
|
||||
type: 'add',
|
||||
useDFC: appConfig.useDFC,
|
||||
educational_experience: [],
|
||||
children_information: [],
|
||||
file_is_show: true,
|
||||
|
|
Loading…
Reference in New Issue