From 928149f2a0f7ab993eefe4395f70e31136ec0488 Mon Sep 17 00:00:00 2001 From: wang-liang0615 Date: Thu, 27 Jul 2023 15:47:13 +0800 Subject: [PATCH] common-setting --- .../views/setting/companyStructure/index.vue | 6 +- .../setting/components/employeeTable.vue | 958 +++++------------- 2 files changed, 272 insertions(+), 692 deletions(-) diff --git a/cmdb-ui/src/views/setting/companyStructure/index.vue b/cmdb-ui/src/views/setting/companyStructure/index.vue index 63e1578..7620d25 100644 --- a/cmdb-ui/src/views/setting/companyStructure/index.vue +++ b/cmdb-ui/src/views/setting/companyStructure/index.vue @@ -534,7 +534,7 @@ export default { }) }, getAllFlatEmployees() { - getEmployeeList({ block_status: 0, page_size: 99999 }).then((res) => { + getEmployeeList({ block_status: -1, page_size: 99999 }).then((res) => { this.allFlatEmployees = res.data_list }) }, @@ -721,7 +721,7 @@ export default { this.loading = false }, updateAll() { - this.expression = [] + // this.expression = [] this.updateCount() this.updateTableDataByFilter() }, @@ -774,7 +774,7 @@ export default { }, reset() { this.filterName = '' - this.$refs.filterComp.expression = '' + this.$refs.filterComp.expression = [] this.updateTableDataByFilter() }, handleSearch(expression) { diff --git a/cmdb-ui/src/views/setting/components/employeeTable.vue b/cmdb-ui/src/views/setting/components/employeeTable.vue index 979b25d..652ea12 100644 --- a/cmdb-ui/src/views/setting/components/employeeTable.vue +++ b/cmdb-ui/src/views/setting/components/employeeTable.vue @@ -57,23 +57,7 @@ > @@ -88,23 +72,7 @@ > @@ -120,23 +88,7 @@ > @@ -151,57 +103,25 @@ > @@ -217,29 +137,13 @@ sortable v-if=" checkedCols.findIndex((v) => v == 'position_name') !== -1 && - attributes.findIndex((v) => v == 'position_name') !== -1 + attributes.findIndex((v) => v == 'position_name') !== -1 " key="position_name" > @@ -251,29 +155,13 @@ sortable v-if=" checkedCols.findIndex((v) => v == 'direct_supervisor_id') !== -1 && - attributes.findIndex((v) => v == 'direct_supervisor_id') !== -1 + attributes.findIndex((v) => v == 'direct_supervisor_id') !== -1 " key="direct_supervisor_id" > @@ -290,30 +178,14 @@ min-width="80" v-if=" checkedCols.findIndex((v) => v == 'annual_leave') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'annual_leave') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'annual_leave') !== -1 " key="annual_leave" > @@ -325,30 +197,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'virtual_annual_leave') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'virtual_annual_leave') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'virtual_annual_leave') !== -1 " key="virtual_annual_leave" > @@ -360,34 +216,58 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'parenting_leave') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'parenting_leave') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'parenting_leave') !== -1 " key="parenting_leave" > + + + + + + @@ -431,30 +295,14 @@ v-bind="tableType === 'structure' ? { filters: internOptions, 'filter-multiple': false } : {}" v-if=" checkedCols.findIndex((v) => v == 'is_internship') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'is_internship') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'is_internship') !== -1 " key="is_internship" > @@ -469,30 +317,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'leave_date') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'leave_date') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'leave_date') !== -1 " key="leave_date" > @@ -504,30 +336,14 @@ min-width="120" v-if=" checkedCols.findIndex((v) => v == 'id_card') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'id_card') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'id_card') !== -1 " key="id_card" > @@ -539,30 +355,14 @@ min-width="80" v-if=" checkedCols.findIndex((v) => v == 'nation') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'nation') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'nation') !== -1 " key="nation" > @@ -574,30 +374,14 @@ min-width="120" v-if=" checkedCols.findIndex((v) => v == 'id_place') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'id_place') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'id_place') !== -1 " key="id_place" > @@ -609,30 +393,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'party') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'party') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'party') !== -1 " key="party" > @@ -644,30 +412,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'household_registration_type') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'household_registration_type') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'household_registration_type') !== -1 " key="household_registration_type" > @@ -679,30 +431,14 @@ min-width="120" v-if=" checkedCols.findIndex((v) => v == 'hometown') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'hometown') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'hometown') !== -1 " key="hometown" > @@ -714,30 +450,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'marry') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'marry') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'marry') !== -1 " key="marry" > @@ -749,30 +469,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'max_degree') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'max_degree') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'max_degree') !== -1 " key="max_degree" > @@ -784,30 +488,14 @@ min-width="110" v-if=" checkedCols.findIndex((v) => v == 'emergency_person') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'emergency_person') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'emergency_person') !== -1 " key="emergency_person" > @@ -819,30 +507,14 @@ min-width="120" v-if=" checkedCols.findIndex((v) => v == 'emergency_phone') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'emergency_phone') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'emergency_phone') !== -1 " key="emergency_phone" > @@ -854,30 +526,14 @@ min-width="120" v-if=" checkedCols.findIndex((v) => v == 'bank_card_number') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'bank_card_number') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'bank_card_number') !== -1 " key="bank_card_number" > @@ -889,30 +545,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'bank_card_name') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'bank_card_name') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'bank_card_name') !== -1 " key="bank_card_name" > @@ -924,30 +564,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'opening_bank') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'opening_bank') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'opening_bank') !== -1 " key="opening_bank" > @@ -959,30 +583,14 @@ min-width="120" v-if=" checkedCols.findIndex((v) => v == 'account_opening_location') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'account_opening_location') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'account_opening_location') !== -1 " key="account_opening_location" > @@ -993,30 +601,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'school') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'school') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'school') !== -1 " key="school" > @@ -1027,30 +619,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'major') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'major') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'major') !== -1 " key="major" > @@ -1061,30 +637,14 @@ min-width="80" v-if=" checkedCols.findIndex((v) => v == 'education') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'education') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'education') !== -1 " key="education" > @@ -1095,30 +655,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'graduation_year') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'graduation_year') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'graduation_year') !== -1 " key="graduation_year" > @@ -1129,30 +673,14 @@ min-width="80" v-if=" checkedCols.findIndex((v) => v == 'name') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'name') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'name') !== -1 " key="name" > @@ -1163,30 +691,14 @@ min-width="80" v-if=" checkedCols.findIndex((v) => v == 'gender') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'gender') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'gender') !== -1 " key="gender" > @@ -1197,30 +709,14 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'birthday') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'birthday') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'birthday') !== -1 " key="birthday" > @@ -1231,34 +727,51 @@ min-width="100" v-if=" checkedCols.findIndex((v) => v == 'parental_leave_left') !== -1 && - tableType == 'structure' && - attributes.findIndex((v) => v == 'parental_leave_left') !== -1 + tableType == 'structure' && + attributes.findIndex((v) => v == 'parental_leave_left') !== -1 " key="parental_leave_left" > + + + + @@ -1317,7 +814,7 @@ > - +