Browse Source

完成我的薪资,侧边栏动画,以及动态侧边栏

@sun-chaoqun 2 years ago
parent
commit
b7284dfbb5

+ 1 - 1
.env

@@ -1,5 +1,5 @@
 VITE_BZD_ERP_APP_TITLE = 'ERP宝智达'
 
-VITE_BZD_ERP_APP_API = 'http://erp.baozhida.cn'
+VITE_BZD_ERP_APP_API = 'https://erp.baozhida.cn'
 
 VITE_DROP_CONSOLE = true    

+ 4 - 0
README.md

@@ -9,3 +9,7 @@
 薪资管理 http://erp.baozhida.cn/salary
 
 考勤管理 http://erp.baozhida.cn/ams
+
+### 原型
+
+https://58ftdz.axshare.com

+ 1 - 1
auto-imports.d.ts

@@ -4,5 +4,5 @@
 // Generated by unplugin-auto-import
 export {}
 declare global {
-  const ElMessage: typeof import('element-plus/es')['ElMessage']
+
 }

+ 2 - 1
components.d.ts

@@ -14,6 +14,8 @@ declare module '@vue/runtime-core' {
     Drawer: typeof import('./src/components/Drawer/index.vue')['default']
     ElAside: typeof import('element-plus/es')['ElAside']
     ElAvatar: typeof import('element-plus/es')['ElAvatar']
+    ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
+    ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElCard: typeof import('element-plus/es')['ElCard']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
@@ -49,7 +51,6 @@ declare module '@vue/runtime-core' {
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
     ElTag: typeof import('element-plus/es')['ElTag']
-    HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
     Loading: typeof import('./src/components/Loading/index.vue')['default']
     Pagination: typeof import('./src/components/TableBase/components/Pagination.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']

+ 10 - 8
src/api/index.ts

@@ -2,10 +2,10 @@ import axios from 'axios'
 import type { AxiosInstance, AxiosError, AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse } from 'axios'
 import { ElMessage, ElLoading } from 'element-plus'
 import { ResultEnum, ResultData, ContentType } from './interface/index'
-// import { GlobalStore } from '@/stores/index'
+import { GlobalStore } from '@/stores/index'
 import { useRouter } from 'vue-router'
 const router = useRouter()
-// const globalStore = GlobalStore()
+
 type LoadingType = {
   close?: () => void
 }
@@ -58,19 +58,21 @@ class RequestHttp {
     this.service.interceptors.response.use(
       (response: AxiosResponse) => {
         const { data } = response
+        const globalStore = GlobalStore()
 
         // * 在请求结束后,并关闭请求 loading
         loadingInstance.close && loadingInstance.close()
-        // * 登陆失效(code == 401)
-        if (data.code == ResultEnum.OVERDUE) {
-          ElMessage.error(data.msg)
-          // globalStore.SET_User_Tokey('')
+        // * 登陆失效(code == 201)
+        if (data.Code == ResultEnum.OVERDUE) {
+          ElMessage.error(data.Msg)
+          globalStore.SET_User_Tokey('')
+          localStorage.clear()
           router.replace('/login')
           return Promise.reject(data)
         }
         // * 全局错误信息拦截(防止下载文件得时候返回数据流,没有code,直接报错)
-        if (data.code && data.code !== ResultEnum.SUCCESS) {
-          ElMessage.error(data.msg)
+        if (data.Code && data.Code !== ResultEnum.SUCCESS) {
+          ElMessage.error(data.Msg)
           return Promise.reject(data)
         }
         // * 成功请求(在页面上除非特殊情况,否则不用在页面处理失败逻辑)

+ 1 - 1
src/api/interface/index.ts

@@ -5,7 +5,7 @@
 export enum ResultEnum {
   SUCCESS = 200,
   ERROR = 500,
-  OVERDUE = 401,
+  OVERDUE = 201,
   TIMEOUT = 10000,
   TYPE = 'success'
 }

+ 18 - 0
src/layouts/Header/Breadcrumb.vue

@@ -0,0 +1,18 @@
+<script setup lang="ts">
+import { ArrowRight } from '@element-plus/icons-vue'
+import { GlobalStore } from '@/stores/index'
+const globalStore = GlobalStore()
+</script>
+
+<template>
+  <div>
+    <el-breadcrumb :separator-icon="ArrowRight">
+      <el-breadcrumb-item v-for="(item, index) in globalStore.GET_Breadcrumb" :key="index">{{
+        item
+      }}</el-breadcrumb-item>
+      <!-- <el-breadcrumb-item>promotion management</el-breadcrumb-item> -->
+    </el-breadcrumb>
+  </div>
+</template>
+
+<style scoped></style>

+ 21 - 7
src/layouts/Header/index.vue

@@ -1,6 +1,8 @@
 <script setup lang="ts">
 import { useRouter } from 'vue-router'
 import { GlobalStore } from '@/stores/index'
+import Breadcrumb from './Breadcrumb.vue'
+import { Expand, Fold } from '@element-plus/icons-vue'
 const globalStore = GlobalStore()
 const router = useRouter()
 const logOut = () => {
@@ -13,11 +15,17 @@ const logOut = () => {
 <template>
   <div class="header">
     <el-row>
-      <el-col :span="12"
-        ><div class="grid-content ep-bg-purple" />
-        123</el-col
-      >
-      <el-col :span="4" :offset="8">
+      <el-col :span="20" class="d-flex">
+        <el-button
+          class="isCollapse"
+          type="primary"
+          :icon="globalStore.GET_isCollapse ? Expand : Fold"
+          link
+          @click="globalStore.SET_isCollapse"
+        ></el-button>
+        <Breadcrumb></Breadcrumb>
+      </el-col>
+      <el-col :span="4">
         <el-dropdown>
           <el-button type="primary">
             退出登录<el-icon class="el-icon--right"><arrow-down /></el-icon>
@@ -25,8 +33,6 @@ const logOut = () => {
           <template #dropdown>
             <el-dropdown-menu>
               <el-dropdown-item @click="logOut">退出登录</el-dropdown-item>
-              <el-dropdown-item>Action 2</el-dropdown-item>
-              <el-dropdown-item>Action 3</el-dropdown-item>
             </el-dropdown-menu>
           </template>
         </el-dropdown>
@@ -38,5 +44,13 @@ const logOut = () => {
 <style scoped lang="scss">
 .header {
   width: 100%;
+  .d-flex {
+    display: flex;
+    align-items: center;
+    .isCollapse {
+      margin-right: 1rem;
+      font-size: 1.35rem;
+    }
+  }
 }
 </style>

+ 4 - 3
src/layouts/Main/index.vue

@@ -16,9 +16,10 @@ const keepAliveStore = KeepAliveStore()
   <el-main>
     <!-- <transition appear name="fade-transform" mode="out-in"></transition> -->
     <router-view v-slot="{ Component, route }">
-      <keep-alive>
-        <component :is="Component" :key="route.path" />
-      </keep-alive>
+      <component :is="Component" :key="route.path" />
+      <!-- <keep-alive>
+       
+      </keep-alive> -->
     </router-view>
   </el-main>
 </template>

+ 11 - 3
src/layouts/Menu/SubMenu.vue

@@ -5,16 +5,24 @@ defineProps<{ menuList: Menu.MenuOptions[] }>()
 const handleClickMenu = (route: Menu.MenuOptions) => {
   router.push(route.path)
 }
+// const reg = /^[\u4e00-\u9fa5]+$/
+const reg = /^\\{1}/
+const isUnicode = (val: string | undefined) => {
+  if (!val) return
+  console.log(val)
+  return reg.test(val)
+}
+console.log(isUnicode('\ue663'))
 </script>
 
 <template>
-  <div v-for="subItem in menuList" :key="subItem.path">
+  <template v-for="subItem in menuList" :key="subItem.path">
     <el-sub-menu v-if="subItem.children && subItem.children.length > 0" :index="subItem.path">
       <template #title>
         <el-icon v-if="subItem.meta.icon">
           <component :is="subItem.meta.icon"></component>
         </el-icon>
-        <i v-else class="iconfont">{{ subItem.meta.unicode }}</i>
+        <i v-else class="iconfont">{{ subItem.meta.icon }}</i>
         <span>{{ subItem.meta.title }}</span>
       </template>
       <SubMenu :menuList="subItem.children" />
@@ -28,7 +36,7 @@ const handleClickMenu = (route: Menu.MenuOptions) => {
         <span>{{ subItem.meta.title }}</span>
       </template>
     </el-menu-item>
-  </div>
+  </template>
 </template>
 
 <style scoped>

+ 1 - 1
src/main.ts

@@ -23,4 +23,4 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
   app.component(key, component)
 }
 
-app.use(router).use(store).mount('#app')
+app.use(store).use(router).mount('#app')

+ 1 - 1
src/router/modules/staticRouter.ts

@@ -63,7 +63,7 @@ export const staticRouter: RouteRecordRaw[] = [
       {
         path: '/records',
         name: 'Records',
-        component: () => import('@/views/workAttendance/Records.vue'),
+        component: () => import('@/views/workAttendance/records/Records.vue'),
         meta: {
           title: '统筹管理'
         }

+ 14 - 1
src/stores/index.ts

@@ -5,13 +5,17 @@ export const GlobalStore = defineStore({
   id: 'GlobalState',
   state: (): GlobalState => ({
     loading: false,
+    isCollapse: false,
+    breadcrumb: [],
     UserDeptList: [],
     UserPostList: [],
     User_tokey: localStorage.getItem('User_tokey') || ''
   }),
   getters: {
     GET_User_tokey: state => state.User_tokey,
-    GET_Dept_List: state => state.UserDeptList
+    GET_Dept_List: state => state.UserDeptList,
+    GET_isCollapse: state => state.isCollapse,
+    GET_Breadcrumb: state => state.breadcrumb
   },
   actions: {
     SET_User_Tokey(payload: string) {
@@ -19,6 +23,15 @@ export const GlobalStore = defineStore({
         this.User_tokey = payload
       }
     },
+    SET_isCollapse() {
+      this.isCollapse = !this.isCollapse
+    },
+    SET_Breadcrumb(payload: string[]) {
+      let map = payload.map(item => {
+        return item.replace('/', '')
+      })
+      this.breadcrumb = map
+    },
     async SET_User_Dept_List() {
       const res: any = await User_Dept_List()
       this.UserDeptList = res.Data

+ 2 - 0
src/stores/interface/index.ts

@@ -1,6 +1,8 @@
 /* GlobalState */
 export interface GlobalState {
   loading: boolean
+  breadcrumb: string[]
+  isCollapse: boolean
   User_tokey: string
   userInfo?: any
   language?: string

+ 15 - 0
src/style.scss

@@ -70,4 +70,19 @@ body,
   background-color: #999;
 }
 
+.picker-date {
+  .el-date-picker__header {
+    display: none;
+    span:nth-child(2) {
+      display: none;
+    }
+    button:nth-child(1) {
+      display: none;
+    }
+    button:nth-child(5) {
+      display: none;
+    }
+  }
+}
+
 @import '@/assets/iconfont.css';

+ 50 - 37
src/views/Index.vue

@@ -25,10 +25,10 @@ const routerList = [
     }
   },
   {
-    path: '/account',
+    path: 'account',
     name: 'Account',
     meta: {
-      icon: 'HomeFilled',
+      icon: 'Memo',
       title: '账户管理',
       isKeepAlive: true
     },
@@ -59,15 +59,15 @@ const routerList = [
     iocn: '',
     meta: {
       icon: 'HomeFilled',
-      title: '首页',
+      title: '仓库管理',
       isKeepAlive: true
     }
   },
   {
-    path: '/salary',
+    path: 'salary',
     name: '薪资管理',
     meta: {
-      unicode: '\ue663',
+      icon: '\\ue663',
       title: '薪资管理',
       isKeepAlive: true
     },
@@ -103,10 +103,10 @@ const routerList = [
   },
   {
     path: 'mangage',
-    name: '薪资管理',
+    name: '考勤管理',
     meta: {
       unicode: '\ue619',
-      title: '薪资管理',
+      title: '考勤管理',
       isKeepAlive: true
     },
     children: [
@@ -114,7 +114,7 @@ const routerList = [
         path: '/records',
         name: '统筹管理',
         meta: {
-          icon: 'Memo',
+          icon: 'DocumentCopy',
           title: '统筹管理',
           isKeepAlive: true
         }
@@ -174,25 +174,39 @@ onMounted(() => {
 
 const route = useRoute()
 const defaultActive = ref<string>(route.path)
+
+const handleOpen = (key: string, keyPath: string[]) => {
+  console.log(key, keyPath)
+  // keyPath.push(defaultActive.value)
+  globalStore.SET_Breadcrumb(keyPath)
+}
+const handleClose = (key: string, keyPath: string[]) => {
+  console.log(key, keyPath)
+}
 </script>
 
 <template>
   <el-container class="home-container">
-    <el-aside width="210px">
+    <el-aside>
       <!-- <h1 style="color: #fff; text-align: center; margin: 20px; font-size: 32px">ERP系统</h1> -->
-      <el-scrollbar class="scrollbar">
-        <!-- text-color="#303133" -->
-        <el-menu
-          :default-active="defaultActive"
-          :unique-opened="true"
-          :collapse-transition="false"
-          active-text-color="#ffd04b"
-          text-color="#fff"
-          background-color="#091215"
-        >
-          <SubMenu :menu-list="routerList"></SubMenu>
-        </el-menu>
-      </el-scrollbar>
+      <!-- text-color="#303133" -->
+      <div class="menu" :style="{ width: globalStore.GET_isCollapse ? '65px' : '210px' }">
+        <el-scrollbar>
+          <el-menu
+            :default-active="defaultActive"
+            :collapse="globalStore.GET_isCollapse"
+            :collapse-transition="false"
+            :unique-opened="true"
+            active-text-color="#ffd04b"
+            text-color="#fff"
+            background-color="#091215"
+            @open="handleOpen"
+            @close="handleClose"
+          >
+            <SubMenu :menu-list="routerList"></SubMenu>
+          </el-menu>
+        </el-scrollbar>
+      </div>
     </el-aside>
     <el-container>
       <el-header>
@@ -213,7 +227,21 @@ const defaultActive = ref<string>(route.path)
     }
   }
   .el-aside {
+    width: auto;
+    overflow: inherit;
     background-color: #091215;
+    border-right: 1px solid var(--el-border-color);
+    transition: all 0.3s ease;
+    .menu {
+      display: flex;
+      flex-direction: column;
+      height: 100%;
+      transition: all 0.3s ease;
+      .el-menu {
+        overflow-x: hidden;
+        border-right: none;
+      }
+    }
   }
   .el-header {
     display: flex;
@@ -221,19 +249,4 @@ const defaultActive = ref<string>(route.path)
     border-bottom: solid 1px var(--el-menu-border-color);
   }
 }
-/* fade-transform */
-.fade-transform-leave-active,
-.fade-transform-enter-active {
-  transition: all 0.2s;
-}
-.fade-transform-enter-from {
-  opacity: 0;
-  transition: all 0.2s;
-  transform: translateX(-30px);
-}
-.fade-transform-leave-to {
-  opacity: 0;
-  transition: all 0.2s;
-  transform: translateX(30px);
-}
 </style>

+ 3 - 4
src/views/Login.vue

@@ -34,16 +34,15 @@ const submitForm = (formEl: FormInstance | undefined) => {
     if (valid) {
       let res: any = {}
       res = await Login_verification({ bzd_username: ruleForm.username, bzd_password: ruleForm.password })
-      console.log(res)
       if (res.Code === 200) {
+        localStorage.setItem('User_tokey', res.Data)
+        globalStore.SET_User_Tokey(res.Data)
+        router.replace('/')
         ElNotification.success({
           title: '登录成功',
           message: '欢迎进入宝智达ERP系统!',
           position: 'bottom-right'
         })
-        localStorage.setItem('User_tokey', res.Data)
-        globalStore.SET_User_Tokey(res.Data)
-        router.replace('/')
       }
     } else {
       console.log('error submit!')

+ 8 - 1
src/views/account/users/components/DrawerFrom.vue

@@ -51,7 +51,8 @@ let form = ref({
   T_remark: '',
   T_positive_time: '',
   T_spouse_phone: '',
-  T_expire: ''
+  T_expire: '',
+  T_dept_leader: ''
 })
 const rules = reactive<FormRules>(reuls_validator)
 type Fn = () => void
@@ -137,6 +138,12 @@ defineExpose({
       <el-form-item label="名称:" :label-width="formLabelWidth" prop="T_name">
         <el-input v-model="form.T_name" autocomplete="off" placeholder="名称" />
       </el-form-item>
+      <el-form-item label="负责人:" :label-width="formLabelWidth" prop="T_dept_leader">
+        <el-radio-group v-model="form.T_dept_leader">
+          <el-radio :label="0">否</el-radio>
+          <el-radio :label="1">是</el-radio>
+        </el-radio-group>
+      </el-form-item>
       <el-form-item label="账号:" :label-width="formLabelWidth" prop="T_user">
         <el-input v-model="form.T_user" autocomplete="off" placeholder="账号" />
       </el-form-item>

+ 2 - 1
src/views/account/users/components/relus.ts

@@ -54,7 +54,8 @@ export const reuls_validator: FormRules = {
   T_contract_start_time: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
   T_contract_end_time: [{ required: true, message: '请选择结束时间', trigger: 'blur' }],
   T_expire: [{ required: true, message: '请选择是否到期', trigger: 'change' }],
-  T_spouse_phone: [{ required: true, validator: validate_T_spouse_phone, trigger: 'blur' }]
+  T_spouse_phone: [{ required: true, validator: validate_T_spouse_phone, trigger: 'blur' }],
+  T_dept_leader: [{ required: true, message: '是否为部门负责人', trigger: 'change' }]
 }
 
 export const getEntry_type = (val: number) => {

+ 7 - 2
src/views/salary/SalaryCount.vue

@@ -82,7 +82,10 @@ const getSalary_List = async () => {
 getSalary_List()
 
 const exportSalaryExcel = async () => {
-  await Salary_Excel()
+  const res: any = await Salary_Excel()
+  if (res.Code === 200) {
+    window.open(res.Data)
+  }
 }
 const publishSalary = async () => {
   // Salary_Send
@@ -122,6 +125,8 @@ const tableData = ref<User[]>([])
           <el-date-picker
             v-model="salaryFromData.month"
             style="width: 100px"
+            popper-class="picker-date"
+            format="MM"
             value-format="MM"
             type="month"
             placeholder="请选择月"
@@ -186,7 +191,7 @@ const tableData = ref<User[]>([])
 }
 .d-flex {
   display: flex;
-  justify-content: center;
+  justify-content: start;
   align-items: center;
   flex-wrap: nowrap;
 }

+ 43 - 66
src/views/salary/SalaryMy.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { reactive, ref } from 'vue'
+import { reactive } from 'vue'
 import { Salary_User_Get } from '@/api/salary/index'
 let date = new Date()
 const year = date.getFullYear()
@@ -9,31 +9,43 @@ const salaryFromData = reactive({
   month: (month < 10 ? '0' : '') + month,
   T_uuid: ''
 })
-
-const MySalary = ref({
-  T_base: '',
-  T_post: '',
-  T_seniority: '',
-  T_Perf: '',
-  T_Perf_score: '',
-  T_back_payment: '',
-  T_tax: '',
-  T_attendance: '',
-  T_cut_payment: '',
-  T_pension_insurance: '',
-  T_unemployment_insurance: '',
-  T_medical_insurance: '',
-  T_Large_medical_insurance: '',
-  T_housing_fund: ''
-})
-
+const salaryData = reactive([
+  { name: '姓名', field: 'T_user_name', salary: '' },
+  { name: '部门', field: 'T_user_dept', salary: '' },
+  { name: '岗位', field: 'T_user_post', salary: '' },
+  { name: '基础工资', field: 'T_base', salary: '' },
+  { name: '岗位工资', field: 'T_post', salary: '' },
+  { name: '工龄工资:', field: 'T_seniority', salary: '' },
+  { name: '绩效金额:', field: 'T_perf', salary: '' },
+  { name: '绩效得分:', field: 'T_perf_score', salary: '' },
+  { name: '实发绩效', field: 'T_actual_Perf', salary: '' },
+  { name: '其他补款:', field: 'T_back_payment', salary: '' },
+  { name: '需缴个人所得税:', field: 'T_tax', salary: '' },
+  { name: '考勤扣款:', field: 'T_attendance', salary: '' },
+  { name: '其他扣款', field: 'T_cut_payment', salary: '' },
+  { name: '应发合计', field: 'T_laballot', salary: '' },
+  { name: '需缴养老保险:', field: 'T_pension_insurance', salary: '' },
+  { name: '需缴医疗保险:', field: 'T_unemployment_insurance', salary: '' },
+  { name: '需缴住房公积金:', field: 'T_medical_insurance', salary: '' },
+  { name: '需缴纳失业保险:', field: 'T_large_medical_insurance', salary: '' },
+  { name: '需缴大额医疗保险:', field: 'T_housing_fund', salary: '' },
+  { name: '个税扣款', field: 'T_tax', salary: '' },
+  { name: '扣款合计', field: 'T_laborage', salary: '' },
+  { name: '实发合计', field: 'T_total', salary: '' }
+])
 const getMySalary = async () => {
-  let T_date = year + '-' + (month < 10 ? '0' : '') + month
+  let T_date = salaryFromData.year + '-' + salaryFromData.month
   const res: any = await Salary_User_Get({ T_date })
   if (res.Code) {
-    MySalary.value = { ...res.Data }
+    for (let item of salaryData) {
+      item.salary = res.Data[item.field]
+    }
   }
 }
+
+const searchSalary = () => {
+  getMySalary()
+}
 getMySalary()
 </script>
 
@@ -54,70 +66,35 @@ getMySalary()
         <el-col :span="5">
           <span class="demonstration">月:</span>
           <el-date-picker
+            popper-class="picker-date"
             v-model="salaryFromData.month"
             style="width: 100px"
+            format="MM"
             value-format="MM"
             type="month"
             placeholder="请选择月"
           />
         </el-col>
         <el-col :span="5">
-          <el-button type="primary">查询</el-button>
+          <el-button type="primary" @click="searchSalary">查询</el-button>
         </el-col>
       </el-row>
     </el-card>
     <el-card>
-      <el-descriptions class="margin-top" title="我的薪资" :column="3" border>
-        <el-descriptions-item>
-          <template #label>
-            <div class="cell-item">
-              <i class="iconfont">{{ '\ue663' }}</i>
-              基础工资
-            </div>
-          </template>
-          kooriookami
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template #label>
-            <div class="cell-item">
-              <i class="iconfont">{{ '\ue663' }}</i>
-              岗位工资
-            </div>
-          </template>
-          18100000000
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template #label>
-            <div class="cell-item">
-              <i class="iconfont">{{ '\ue7cd' }}</i>
-              工龄工资
-            </div>
-          </template>
-          Suzhou
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template #label>
-            <div class="cell-item">
-              <i class="iconfont">{{ '\ue663' }}</i>
-              绩效金额
-            </div>
-          </template>
-          <el-tag size="small">School</el-tag>
-        </el-descriptions-item>
-        <el-descriptions-item>
+      <el-descriptions title="我的薪资" :column="3" border>
+        <el-descriptions-item v-for="item in salaryData" :key="item.field">
           <template #label>
             <div class="cell-item">
-              <el-icon :style="iconStyle">
-                <office-building />
-              </el-icon>
-              Address
+              <i class="iconfont">{{ '\ue7d1' }}</i>
+              {{ item.name }}
             </div>
           </template>
-          No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
+          <el-tag type="danger">{{ item.salary }}</el-tag>
+          <!-- <span style="color: #ffd04b">{{ item.salary }}</span> -->
         </el-descriptions-item>
       </el-descriptions>
     </el-card>
   </div>
 </template>
 
-<style scoped></style>
+<style lang="scss"></style>

+ 8 - 1
src/views/salary/salary/Salary.vue

@@ -111,7 +111,14 @@ const userInfo = reactive({
           </el-col>
           <el-col :span="10" class="d-flex">
             <span class="demonstration">月:</span>
-            <el-date-picker v-model="salaryFromData.month" value-format="MM" type="month" placeholder="请选择月" />
+            <el-date-picker
+              v-model="salaryFromData.month"
+              popper-class="picker-date"
+              value-format="MM"
+              format="MM"
+              type="month"
+              placeholder="请选择月"
+            />
           </el-col>
         </el-row>
       </el-card>

+ 0 - 7
src/views/workAttendance/Records.vue

@@ -1,7 +0,0 @@
-<template>
-  <div>统筹管理</div>
-</template>
-
-<script setup lang="ts"></script>
-
-<style scoped></style>

+ 60 - 0
src/views/workAttendance/records/Records.vue

@@ -0,0 +1,60 @@
+<script setup lang="ts">
+import { reactive } from 'vue'
+import { ColumnProps } from '@/components/TableBase/interface/index'
+import { User_List } from '@/api/user/index'
+import { GlobalStore } from '@/stores/index'
+const globalStore = GlobalStore()
+const columns: ColumnProps[] = [{ prop: 'T_name', label: '姓名', name: 'T_name' }]
+
+const initParam = {
+  User_tokey: globalStore.GET_User_tokey,
+  T_name: '',
+  T_dept: ''
+}
+const userInfo = reactive({
+  squareUrl: 'https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png',
+  name: '',
+  T_dept: '',
+  T_post: ''
+})
+</script>
+
+<template>
+  <el-row :gutter="20" class="h-100">
+    <el-col :span="8" class="padding-right-0 h-100">
+      <TableBase
+        ref="TableRef"
+        :columns="columns"
+        :requestApi="User_List"
+        :initParam="initParam"
+        layout="prev, pager, next"
+      >
+        <template #table-header> 待处理 </template>
+        <template #T_name="{ row }">
+          <el-button type="primary" text>{{ row.T_name }}</el-button>
+        </template>
+      </TableBase></el-col
+    >
+    <el-col :span="16" class="h-100" style="overflow: hidden">
+      <el-card class="m-b-3">
+        <h3 class="title m-b-5">员工基本信息</h3>
+        <div class="info-content">
+          <el-avatar shape="square" size="large" :src="userInfo.squareUrl" />
+          <div class="info-name">
+            <h4 class="m-b-3">名字:{{ userInfo.name }}</h4>
+            <h4>
+              <span>部门:{{ userInfo.T_dept }}</span>
+              <span>岗位:{{ userInfo.T_post }}</span>
+            </h4>
+          </div>
+        </div>
+      </el-card>
+      <el-card class="m-b-3"> </el-card>
+      <el-card class="m-b-3"> </el-card>
+      <el-card class="m-b-3"> </el-card>
+      <!-- <SalaryFrom v-bind="salaryFromData"></SalaryFrom> -->
+    </el-col>
+  </el-row>
+</template>
+
+<style scoped></style>

+ 3 - 5
vite.config.ts

@@ -23,19 +23,17 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
       host: '0.0.0.0',
       proxy: {
         '/api': {
-          target: 'http://erp.baozhida.cn',
-          changeOrigin: true,
-          rewrite: path => path.replace(/^\/api/, '')
+          target: 'https://erp.baozhida.cn',
+          changeOrigin: true
+          // rewrite: path => path.replace(/^\/api/, '')
         },
         '/salary': {
           target: 'http://erp.baozhida.cn',
           changeOrigin: true
-          // rewrite: path => path.replace(/^\/salary/, '')
         },
         '/ams': {
           target: 'http://erp.baozhida.cn',
           changeOrigin: true
-          // rewrite: path => path.replace(/^\/ams/, '')
         }
       }
     },