Xiao_123 10 hónapja
szülő
commit
147ebe0c0e

+ 8 - 0
src/api/recruit/enterprise/system/group/index.js

@@ -0,0 +1,8 @@
+import request from '@/config/axios'
+
+// 企业树形
+export const getEnterpriseTree = async () => {
+  return await request.get({
+    url: '/app-admin-api/menduner/system/enterprise/get/tree'
+  })
+}

+ 1 - 1
src/layout/company/navBar.vue

@@ -16,7 +16,7 @@
           <!-- <a target="_blank" href="/recruit/enterprise/purchasePackage" class="cursor-pointer mr-5" style="font-size: 15px;color: #FB8C00;line-height: 40px;">{{ $t('vipPackage.purchasePackage') }}</a> -->
           <div class="d-flex align-center cursor-pointer" @click="handleEnterpriseClick">
             <v-img @click="enterpriseClick(2)" rounded width="40" height="40" :src="baseInfo?.logoUrl || 'https://minio.citupro.com/dev/menduner/7.png'" ></v-img>
-            <span @click="enterpriseClick(1)" class="ml-3">{{ baseInfo?.enterpriseName || $t('sys.tourist') }}</span>
+            <span @click="enterpriseClick(1)" class="ml-3">{{ baseInfo?.enterpriseAnotherName || $t('sys.tourist') }}</span>
           </div>
           <div class="line"></div>
           <div class="d-flex align-center ml-6">

+ 3 - 1
src/plugins/vuetify.js

@@ -10,6 +10,7 @@ import 'vuetify/styles'
 // import * as components from 'vuetify/components'
 import * as directives from 'vuetify/directives'
 import { VDateInput } from 'vuetify/labs/VDateInput'
+import { VTreeview } from 'vuetify/labs/VTreeview'
 
 // Composables
 import { createVuetify } from 'vuetify'
@@ -30,7 +31,8 @@ const myCustomLightTheme = {
 // https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
 export default createVuetify({
   components: {
-    VDateInput
+    VDateInput,
+    VTreeview
   },
   directives,
   theme: {

+ 8 - 0
src/router/modules/components/recruit/enterprise.js

@@ -227,6 +227,14 @@ const enterprise = [
       isAdmin: true // 企业管理员菜单
     },
     children: [
+      {
+        path: '/recruit/enterprise/systemManagement/groupAccount',
+        meta: {
+          title: '集团账户',
+          enName: 'Group Account '
+        },
+        component: () => import('@/views/recruit/enterprise/systemManagement/groupAccount/index.vue')
+      },
       {
         path: '/recruit/enterprise/systemManagement/userManagement',
         meta: {

+ 112 - 0
src/views/recruit/enterprise/systemManagement/groupAccount/index.vue

@@ -0,0 +1,112 @@
+<template>
+  <v-card class="card-box d-flex pa-3" height="80vh">
+    <v-row no-gutters justify="space-between">
+      <v-col cols="3">
+        <v-treeview
+          :items="items"
+          activatable
+          color="primary"
+          item-value="id"
+          mandatory
+          item-title="anotherName"
+          open-strategy="single"
+          @update:activated="handleClick"
+          @update:opened="handleClick"
+        ></v-treeview>
+      </v-col>
+      <v-divider vertical></v-divider>
+      <v-col class="ml-10">
+        <TextInput v-model="query.name" :item="textItem" @change="getUserList"></TextInput>
+        <v-data-table
+          :loading="loading"
+          color="#00897B"
+          :items="tableData"
+          :headers="headers"
+        >
+          <template #bottom>
+            <CtPagination
+              v-if="total > 0"
+              :total="total"
+              :page="query.pageNo"
+              :limit="query.pageSize"
+              @handleChange="handleChangePage"
+            ></CtPagination>
+          </template>
+        </v-data-table>
+      </v-col>
+    </v-row>
+  </v-card>
+</template>
+
+<script setup>
+defineOptions({ name: 'group-account'})
+import { ref } from 'vue'
+import { useI18n } from '@/hooks/web/useI18n'
+import { getEnterpriseUserList } from '@/api/recruit/enterprise/system/user'
+import { getEnterpriseTree } from '@/api/recruit/enterprise/system/group'
+
+const { t } = useI18n()
+const total = ref(0)
+const loading = ref(false)
+const query = ref({
+  pageSize: 10,
+  pageNo: 1,
+  enterpriseId: '',
+  name: null
+})
+const tableData = ref([])
+const items = ref([])
+const headers = [
+  { title: t('login.username'), key: 'name', sortable: false },
+  { title: t('enterprise.userManagement.affiliatedEnterprise'), key: 'enterpriseAnotherName', sortable: false },
+  { title: t('enterprise.userManagement.post'), key: 'post.nameCn', sortable: false },
+  { title: t('enterprise.userManagement.phone'), key: 'phone', sortable: false }
+]
+const textItem = ref({
+  type: 'text',
+  value: null,
+  width: 250,
+  clearable: true,
+  label: '请输入用户名称搜索'
+})
+
+// 获取用户列表
+const getUserList = async () => {
+  loading.value = true
+  try {
+    const { list, total: number } = await getEnterpriseUserList(query.value)
+    tableData.value = list
+    total.value = number
+  } finally {
+    loading.value = false
+  }
+}
+
+// 获取树形列表
+const getTreeData = async () => {
+  const data = await getEnterpriseTree()
+  if (!data) return
+  items.value = [data]
+  query.value.enterpriseId = data.id
+  // 获取用户列表
+  getUserList()
+}
+getTreeData()
+
+// 分页
+const handleChangePage = (e) => {
+  query.value.pageNo = e
+  getUserList()
+}
+
+// 树形click
+const handleClick = (e) => {
+  if (!e.length) return
+  query.value.enterpriseId = e[0]
+  getUserList()
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 2 - 5
src/views/recruit/enterprise/systemManagement/userManagement/index.vue

@@ -14,9 +14,6 @@
       item-value="id"
     >
       <template #bottom></template>
-      <template v-slot:item.postId="{ item }">
-        {{ postList.length ? postList.find(e => e.id === item.postId)?.nameCn : '' }}
-      </template>
       <template v-slot:item.actions="{ item }">
         <v-btn color="primary" variant="text" @click="handleBinding(item)">{{ $t('enterprise.userManagement.jobBinding') }}</v-btn>
         <v-btn v-if="item.status === '1' && item.userType !== '1'" color="primary" variant="text" @click="handleAction('', 0, item)">{{ $t('enterprise.userManagement.enable') }}</v-btn>
@@ -60,8 +57,8 @@ const query = ref({
 const postList = ref([])
 const headers = [
   { title: t('login.username'), key: 'name' },
-  { title: t('enterprise.userManagement.affiliatedEnterprise'), key: 'enterpriseName' },
-  { title: t('enterprise.userManagement.post'), key: 'postId' },
+  { title: t('enterprise.userManagement.affiliatedEnterprise'), key: 'enterpriseAnotherName' },
+  { title: t('enterprise.userManagement.post'), key: 'post.nameCn' },
   { title: t('enterprise.userManagement.phone'), key: 'phone' },
   { title: t('enterprise.userManagement.email'), key: 'email' },
   { title: t('enterprise.userManagement.accountType'), key: 'userType', value: item => item.userType === '1' ? t('enterprise.userManagement.administrators') : t('enterprise.userManagement.regularUser'), sortable: false },

+ 1 - 0
src/views/recruit/personal/shareJob/components/handleDeliveryCom.vue

@@ -92,6 +92,7 @@ const inspectionProcess = async () => {
     const keyArr = ['name', 'phone', 'jobStatus', 'expType', 'eduType'] // 必填人才信息
     const baseInfoReady = keyArr.every(e => info[e] && info[e] !== 0) // 校验必填人才信息
     if (!baseInfoReady) {
+      Snackbar.warning('请先完善个人基本信息')
       nextTick(() => { baseInfoCompleteDialog.value = true })
       return
     }