删除usedfc

This commit is contained in:
wang-liang0615 2023-07-14 15:20:36 +08:00
parent 1436ffb3b2
commit 328105ed05
4 changed files with 33 additions and 77 deletions

View File

@ -1,14 +1,13 @@
const appConfig = { const appConfig = {
buildModules: ['cmdb'], // 需要编译的模块 buildModules: ['cmdb'], // 需要编译的模块
useMessageNotice: false, // 是否启用消息通知 useMessageNotice: false, // 是否启用消息通知
useTodoNotice: false, // 是否启用ticket通知 useTodoNotice: false, // 是否启用ticket通知
useClaimNotice: false, // 是否启动ticket claim 通知 useClaimNotice: false, // 是否启动ticket claim 通知
useDagReviewNotice: false, // 是否启用dag审核通知 useDagReviewNotice: false, // 是否启用dag审核通知
redirectTo: '/cmdb', // 首页的重定向路径 redirectTo: '/cmdb', // 首页的重定向路径
buildAclToModules: true, // 是否在各个应用下 内联权限管理 buildAclToModules: true, // 是否在各个应用下 内联权限管理
ssoLogoutURL: '/api/sso/logout', ssoLogoutURL: '/api/sso/logout',
useDFC: false, showDocs: false,
showDocs: false,
} }
export default appConfig export default appConfig

View File

@ -14,7 +14,6 @@ export function getOnDutyUser() {
return axios({ return axios({
url: urlPrefix + '/users/employee', url: urlPrefix + '/users/employee',
method: 'GET', method: 'GET',
// data: { 'originUrl': 'http://hr.dfc.sh/api/all_users?work_status=在职' }
}) })
} }

View File

@ -46,15 +46,13 @@
:column-config="{ resizable: true }" :column-config="{ resizable: true }"
> >
<vxe-column field="email" title="邮箱" min-width="120" fixed="left"></vxe-column> <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="nickname" title="姓名" min-width="80"></vxe-column>
<vxe-column field="password" 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="sex" title="性别" min-width="60"></vxe-column>
<vxe-column field="mobile" title="手机号" min-width="80"></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="position_name" title="岗位" min-width="80"></vxe-column>
<vxe-column field="department_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="entry_date" title="目前主体入职日期" min-width="120"></vxe-column>
<vxe-column field="is_internship" 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> <vxe-column field="leave_date" title="离职日期" min-width="120"></vxe-column>
@ -94,7 +92,6 @@
<script> <script>
import { downloadExcel, excel2Array } from '@/utils/download' import { downloadExcel, excel2Array } from '@/utils/download'
import { importEmployee } from '@/api/employee' import { importEmployee } from '@/api/employee'
import appConfig from '@/config/app'
export default { export default {
name: 'BatchUpload', name: 'BatchUpload',
data() { data() {
@ -189,7 +186,6 @@ export default {
has_error: false, has_error: false,
allCount: 0, allCount: 0,
errorCount: 0, errorCount: 0,
useDFC: appConfig.useDFC,
} }
}, },
methods: { methods: {
@ -215,12 +211,14 @@ export default {
rest[key] = rest[key] + '' rest[key] = rest[key] + ''
} }
}) })
rest.educational_experience = [{ rest.educational_experience = [
'school': rest.school, {
'major': rest.major, school: rest.school,
'education': rest.education, major: rest.major,
'graduation_year': rest.graduation_year education: rest.education,
}] graduation_year: rest.graduation_year,
},
]
delete rest.school delete rest.school
delete rest.major delete rest.major
delete rest.education delete rest.education
@ -254,8 +252,7 @@ export default {
const data = [ const data = [
[ [
{ {
v: v: '1、表头标“*”的红色字体为必填项\n2、邮箱、用户名不允许重复\n3、登录密码密码由6-20位字母、数字组成\n4、部门上下级部门间用"/"隔开,且从最上级部门开始,例如“深圳分公司/IT部/IT二部”。如出现相同的部门则默认导入组织架构中顺序靠前的部门',
'1、表头标“*”的红色字体为必填项\n2、邮箱、用户名不允许重复\n3、登录密码密码由6-20位字母、数字组成\n4、部门上下级部门间用"/"隔开,且从最上级部门开始,例如“深圳分公司/IT部/IT二部”。如出现相同的部门则默认导入组织架构中顺序靠前的部门',
t: 's', t: 's',
s: { s: {
alignment: { alignment: {
@ -420,13 +417,9 @@ export default {
}, },
], ],
] ]
if (this.useDFC) { data[1] = data[1].filter((item) => item['v'] !== '目前所属主体')
downloadExcel(data, '员工导入模板') data[1] = data[1].filter((item) => item['v'] !== '初始入职日期')
} else { downloadExcel(data, '员工导入模板')
data[1] = data[1].filter(item => item['v'] !== '目前所属主体')
data[1] = data[1].filter(item => item['v'] !== '初始入职日期')
downloadExcel(data, '员工导入模板')
}
}, },
customRequest(data) { customRequest(data) {
this.fileList = [data.file] this.fileList = [data.file]
@ -435,22 +428,12 @@ export default {
this.importData = res.slice(2).map((item) => { this.importData = res.slice(2).map((item) => {
const obj = {} const obj = {}
// //
if (this.useDFC) { item[8] = this.formatDate(item[8]) //
item[9] = this.formatDate(item[9]) // item[10] = this.formatDate(item[10]) //
item[10] = this.formatDate(item[10]) // item[28] = this.formatDate(item[28]) //
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.forEach((ele, index) => { item.forEach((ele, index) => {
obj[this.common_importParamsList[index]] = ele obj[this.common_importParamsList[index]] = ele
}) })
}
return obj return obj
}) })
this.currentStep = 2 this.currentStep = 2
@ -474,17 +457,17 @@ export default {
month = month > 9 ? month : `0${month}` month = month > 9 ? month : `0${month}`
day = day > 9 ? day : `0${day}` day = day > 9 ? day : `0${day}`
const hash = { const hash = {
'Y': year, Y: year,
'm': month, m: month,
'd': day, d: day,
} }
return format.replace(/\w/g, o => { return format.replace(/\w/g, (o) => {
return hash[o] return hash[o]
}) })
} else { } else {
return null return null
} }
} },
}, },
} }
</script> </script>

View File

@ -137,29 +137,6 @@
:formatter="(value) => `${value} 天`" :formatter="(value) => `${value} 天`"
/> />
</a-form-model-item> </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 <a-form-model-item
ref="entry_date" ref="entry_date"
label="目前主体入职日期" label="目前主体入职日期"
@ -405,9 +382,9 @@
:style="{ display: 'inline-block', width: '98%', margin: '0 7px 24px' }" :style="{ display: 'inline-block', width: '98%', margin: '0 7px 24px' }"
v-if=" v-if="
attributes.findIndex((v) => v == 'bank_card_number') !== -1 || attributes.findIndex((v) => v == 'bank_card_number') !== -1 ||
attributes.findIndex((v) => v == 'bank_card_name') !== -1 || attributes.findIndex((v) => v == 'bank_card_name') !== -1 ||
attributes.findIndex((v) => v == 'opening_bank') !== -1 || attributes.findIndex((v) => v == 'opening_bank') !== -1 ||
attributes.findIndex((v) => v == 'account_opening_location') !== -1 attributes.findIndex((v) => v == 'account_opening_location') !== -1
" "
> >
<a-row :gutter="[8, { xs: 8 }]"> <a-row :gutter="[8, { xs: 8 }]">
@ -439,7 +416,6 @@ import { postEmployee, putEmployee } from '@/api/employee'
import Bus from './eventBus/bus' import Bus from './eventBus/bus'
import EmployeeTreeSelect from '../components/employeeTreeSelect.vue' import EmployeeTreeSelect from '../components/employeeTreeSelect.vue'
import DepartmentTreeSelect from '../components/departmentTreeSelect.vue' import DepartmentTreeSelect from '../components/departmentTreeSelect.vue'
import appConfig from '@/config/app'
import moment from 'moment' import moment from 'moment'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
export default { export default {
@ -477,7 +453,6 @@ export default {
], ],
}, },
type: 'add', type: 'add',
useDFC: appConfig.useDFC,
educational_experience: [], educational_experience: [],
children_information: [], children_information: [],
file_is_show: true, file_is_show: true,