2 Commits d90f4b0137 ... 0f5fea069d

Author SHA1 Message Date
  Sunny ma 0f5fea069d Merge branch 'master' of http://114.55.67.98:8070/Natural_p1/zjugis_OA 1 year ago
  Sunny ma 6f419f3fb4 fix: 员工档案列表返回接口字段修改,我的档案字典对应修改 1 year ago

+ 12 - 7
client/src/views/OaSystem/mineCenter/components/leftInfo.vue

@@ -38,7 +38,10 @@
             </div>
             <div class="textBox">
               <p>{{ item.name }}</p>
-              <p>{{ data?.[item.value] }}</p>
+              <p v-if="item.type === 'time'">{{
+                dateFormatter2(null, null, data?.[item.value])
+              }}</p>
+              <p v-else>{{ data?.[item.value] }}</p>
             </div>
           </li>
         </ul>
@@ -59,6 +62,7 @@ import { uploadAvatar } from '@/api/system/user/profile'
 import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 import { useQuery } from '@tanstack/vue-query'
 import { getRecordsDetail } from '@/api/oa/staffRecords'
+import { dateFormatter2 } from '@/utils/formatTime'
 
 const { wsCache } = useCache()
 const user = wsCache.get(CACHE_KEY.USER)
@@ -84,24 +88,25 @@ const contentList = ref([
     value: 'drzw'
   },
   {
-    icon: 'ssbm',
+    icon: 'deptName',
     name: '所属部门',
-    value: 'ssbm'
+    value: 'deptName'
   },
   {
-    icon: 'synj',
+    icon: 'nj',
     name: '剩余年假',
-    value: 'synj'
+    value: 'nj'
   },
   {
     icon: 'rzsj',
     name: '入职时间',
-    value: 'rgssj'
+    value: 'rgssj',
+    type: 'time'
   },
   {
     icon: 'qdgs',
     name: '签订公司',
-    value: '浙江万维空间信息技术有限公司'
+    value: 'qdgs'
   }
 ])
 //更换头像点击事件

+ 158 - 0
client/src/views/OaSystem/mineCenter/rightChild/index.ts

@@ -0,0 +1,158 @@
+export const formConfigList = [
+  {
+    title: '基本信息',
+    children: [
+      {
+        name: 'birthday',
+        title: '出生日期',
+        type: 'time'
+      },
+      {
+        name: 'hkxz',
+        title: '户口性质',
+        type: 'select',
+        options: [
+          {
+            value: 1,
+            label: '城镇'
+          },
+          {
+            value: 2,
+            label: '农村'
+          }
+        ]
+      },
+
+      {
+        name: 'hyzk',
+        title: '婚姻状况',
+        type: 'select',
+        options: [
+          {
+            value: 1,
+            label: '已婚'
+          },
+          {
+            value: 2,
+            label: '未婚'
+          },
+          {
+            value: 3,
+            label: '未知'
+          }
+        ]
+      },
+      {
+        name: 'nation',
+        title: '民族'
+      },
+      {
+        name: 'cjgzsj',
+        title: '参加工作时间',
+        type: 'time'
+      },
+      {
+        name: 'zzmm',
+        title: '政治面貌',
+        type: 'select',
+        options: [
+          {
+            value: 1,
+            label: '群众'
+          },
+          {
+            value: 2,
+            label: '团员'
+          },
+          {
+            value: 3,
+            label: '党员'
+          }
+        ]
+      },
+      {
+        name: 'xjzdz',
+        title: '现居住地址'
+      },
+      {
+        name: 'hkszd',
+        title: '户口所在地'
+      }
+    ]
+  },
+  {
+    title: '工资卡信息',
+    children: [
+      {
+        name: 'khyh',
+        title: '开户行'
+      },
+      {
+        name: 'yhzh',
+        title: '银行卡号'
+      }
+    ]
+  },
+  {
+    title: '教育信息',
+    children: [
+      {
+        name: 'byxx',
+        title: '毕业院校'
+      },
+      {
+        name: 'bysj',
+        title: '毕业时间',
+        type: 'time'
+      },
+      {
+        name: 'zgxl',
+        title: '最高学历',
+        type: 'select',
+        options: [
+          {
+            value: 1,
+            label: '高中'
+          },
+          {
+            value: 2,
+            label: '中专'
+          },
+          {
+            value: 3,
+            label: '大专'
+          },
+          {
+            value: 4,
+            label: '本科'
+          },
+          {
+            value: 5,
+            label: '硕士'
+          },
+          {
+            value: 6,
+            label: '博士'
+          }
+        ]
+      },
+      {
+        name: 'major',
+        title: '专业'
+      }
+    ]
+  },
+  {
+    title: '紧急联系人信息',
+    children: [
+      {
+        name: 'jjlxrxm',
+        title: '紧急联系人姓名'
+      },
+      {
+        name: 'jjlxrhm',
+        title: '紧急联系人电话'
+      }
+    ]
+  }
+]

+ 97 - 111
client/src/views/OaSystem/mineCenter/rightChild/wdda.vue

@@ -2,14 +2,13 @@
 import { useQuery } from '@tanstack/vue-query'
 import { getRecordsDetail } from '@/api/oa/staffRecords'
 import { useUserStore } from '@/store/modules/user'
+import { formConfigList } from './index'
 
 const userId = useUserStore().getUser.id // 当前登录的编号
 
 const { data } = useQuery(['fetch-staff-detail', userId], async () => {
   return await getRecordsDetail({ userId })
 })
-/** 初始化 **/
-onMounted(() => {})
 
 const tableData = [
   // {
@@ -27,125 +26,81 @@ const tableData = [
 ]
 </script>
 <template>
-  <div class="my-portrait">
-    <!-- <ElResult  title="加载中">
-    </ElResult> -->
-    <div>
-      <div class="my-portrait-item">
+  <div class="my-portrait form-unable-edit">
+    <el-form ref="formRef" :model="data" label-width="150px" :disabled="true">
+      <div class="my-portrait-item" v-for="(item, index) in formConfigList" :key="index">
         <div class="title">
           <i></i>
-          <span>基本信息</span>
-        </div>
-        <div class="my-portrait-card">
-          <ul>
-            <li>
-              <span>出生日期</span>
-              <span>{{ data?.birthday }}</span>
-            </li>
-            <li>
-              <span>户口性质</span>
-              <span>{{ data?.hkxz }}</span>
-            </li>
-            <li>
-              <span>婚姻状况</span>
-              <span>{{ data?.hyzk }}</span>
-            </li>
-            <li>
-              <span>民族</span>
-              <span>{{ data?.nation }}</span>
-            </li>
-            <li>
-              <span>参加工作时间</span>
-              <span>{{ data?.cjgzsj }}</span>
-            </li>
-            <li>
-              <span>政治面貌</span>
-              <span>{{ data?.zzmm }}</span>
-            </li>
-            <li>
-              <span>现居住地址</span>
-              <span>{{ data?.xjzdz }}</span>
-            </li>
-            <li>
-              <span>户口所在地</span>
-              <span>{{ data?.hkszd }}</span>
-            </li>
-          </ul>
-        </div>
-      </div>
-      <div class="my-portrait-item">
-        <div class="title">
-          <i></i>
-          <span>教育信息</span>
+          <span>{{ item.title }}</span>
         </div>
+
         <div class="my-portrait-card">
           <ul>
-            <li>
-              <span>毕业院校</span>
-              <span>{{ data?.byxx }}</span>
-            </li>
-            <li>
-              <span>毕业时间</span>
-              <span>{{ data?.bysj }}</span>
-            </li>
-            <li>
-              <span>最高学历</span>
-              <span>{{ data?.zgxl }}</span>
-            </li>
-            <li>
-              <span>专业</span>
-              <span>{{ data?.major }}</span>
+            <li v-for="(child, c) in item.children" :key="c">
+              <el-form-item :label="`${child.title}`" :prop="child.name">
+                <el-date-picker
+                  v-if="child.type === 'time'"
+                  v-model="data[child?.name]"
+                  style="width: 100%"
+                  placeholder=""
+                  type="date"
+                />
+
+                <el-select
+                  v-if="child.type === 'select'"
+                  v-model="data[child?.name]"
+                  style="width: 100%"
+                  placeholder="-"
+                >
+                  <el-option
+                    v-for="opt in child.options"
+                    :key="opt.value"
+                    :label="opt.label"
+                    :value="opt.value"
+                  />
+                </el-select>
+
+                <el-input
+                  v-if="child?.type === undefined"
+                  v-model="data[child?.name]"
+                  placeholder=""
+                />
+              </el-form-item>
             </li>
+            <li></li>
           </ul>
         </div>
       </div>
-      <div class="my-portrait-item">
-        <div class="title">
-          <i></i>
-          <span>紧急联系人信息</span>
-        </div>
-        <div class="my-portrait-card">
-          <ul>
-            <li>
-              <span>紧急联系人姓名</span>
-              <span>{{ data?.jjlxrxm }}</span>
-            </li>
-            <li>
-              <span>紧急联系人电话</span>
-              <span>{{ data?.jjlxrhm }}</span>
-            </li>
-          </ul>
-        </div>
+    </el-form>
+
+    <div class="my-portrait-item" style="height: 200px">
+      <div class="title">
+        <i></i>
+        <span>技能证书</span>
       </div>
-      <div class="my-portrait-item" style="height: 200px">
-        <div class="title">
-          <i></i>
-          <span>技能证书</span>
-        </div>
 
-        <div>
-          <el-table
-            :header-cell-style="{
-              background: '#F2F4F8',
-              color: '#2D333C',
-              height: '46px'
-            }"
-            style="width: 100%; height: 100%"
-            :data="tableData"
-            height="150px"
-          >
-            <el-table-column type="index" width="50" />
-            <el-table-column prop="name" label="证书名称" />
-            <el-table-column prop="level" label="证书等级" />
-            <el-table-column prop="date" label="获得时间" />
-            <el-table-column prop="organization" label="发证机构" />
-            <el-table-column fixed="right" label="操作" width="120">
-              <template #default>
-                <el-button link type="primary" size="small">查看</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
+      <div>
+        <el-table
+          :header-cell-style="{
+            background: '#F2F4F8',
+            color: '#2D333C',
+            height: '46px'
+          }"
+          style="width: 100%; height: 100%"
+          :data="tableData"
+          height="150px"
+        >
+          <el-table-column type="index" width="50" />
+          <el-table-column prop="name" label="证书名称" />
+          <el-table-column prop="level" label="证书等级" />
+          <el-table-column prop="date" label="获得时间" />
+          <el-table-column prop="organization" label="发证机构" />
+          <el-table-column fixed="right" label="操作" width="120">
+            <template #default>
+              <el-button link type="primary" size="small">查看</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
       </div>
     </div>
   </div>
@@ -192,7 +147,6 @@ const tableData = [
 
       li {
         width: 50%;
-        margin: 10px 0;
 
         span {
           display: inline-block;
@@ -211,5 +165,37 @@ const tableData = [
       }
     }
   }
+
+  :deep(.el-form) {
+    .el-input.is-disabled .el-input__wrapper {
+      background-color: unset;
+      box-shadow: none;
+    }
+
+    .el-input.is-disabled .el-input__inner {
+      color: #2d333c;
+      -webkit-text-fill-color: #2d333c;
+    }
+
+    .el-form-item__label {
+      font-size: 16px;
+      color: #455773;
+    }
+
+    .el-form-item--default {
+      margin-bottom: 10px;
+    }
+
+    .el-input__inner {
+      font-family: 'Microsoft YaHei';
+      font-size: 16px;
+      font-weight: 500;
+      color: #2d333c;
+    }
+
+    .el-input__suffix {
+      display: none;
+    }
+  }
 }
 </style>

+ 11 - 73
client/src/views/OaSystem/personnelManagement/ygdaPage/index.ts

@@ -61,7 +61,7 @@ export const formConfigList = [
         title: '员工工号'
       },
       {
-        name: 'ssbm',
+        name: 'deptName',
         title: '所属部门'
       },
       {
@@ -77,6 +77,7 @@ export const formConfigList = [
       {
         name: 'hyzk',
         title: '婚姻状况',
+        type: 'select',
         options: [
           {
             value: 1,
@@ -222,6 +223,7 @@ export const formConfigList = [
       {
         name: 'jjlxrgx',
         title: '紧急联系人关系',
+        type: 'select',
         options: [
           {
             value: 1,
@@ -255,9 +257,10 @@ export const formRules = {
 
 export const tableColumnConfigList = [
   {
-    name: 'ssbm',
+    name: 'deptName',
     title: '所属部门'
   },
+
   {
     name: 'state',
     title: '状态',
@@ -379,40 +382,6 @@ export const tableColumnConfigList = [
     name: 'zdsj',
     title: '转正时间',
     type: 'time'
-  },
-  {
-    name: 'pyxs',
-    title: '聘用形式',
-    type: 'select',
-    options: [
-      {
-        value: 1,
-        label: '劳动合同'
-      },
-      {
-        value: 2,
-        label: '劳务合同'
-      },
-      {
-        value: 3,
-        label: '临时合同'
-      }
-    ]
-  },
-  {
-    name: 'sfytd',
-    title: '是否已调档',
-    type: 'select',
-    options: [
-      {
-        value: 1,
-        label: '是'
-      },
-      {
-        value: 2,
-        label: '否'
-      }
-    ]
   }
 ]
 
@@ -423,10 +392,13 @@ export const searchConfigList = [
     name: 'nickname',
     title: '员工名称'
   },
+  // {
+  //   name: 'loginName',
+  //   title: '员工工号'
+  // },
   {
-    name: 'ssbm',
-    title: '所属部门',
-    type: 'select'
+    name: 'deptName',
+    title: '所属部门'
   },
   {
     name: 'state',
@@ -516,39 +488,5 @@ export const searchConfigList = [
         label: '博士'
       }
     ]
-  },
-  {
-    name: 'pyxs',
-    title: '聘用形式',
-    type: 'select',
-    options: [
-      {
-        value: 1,
-        label: '劳动合同'
-      },
-      {
-        value: 2,
-        label: '劳务合同'
-      },
-      {
-        value: 3,
-        label: '临时合同'
-      }
-    ]
-  },
-  {
-    name: 'sfytd',
-    title: '是否调档',
-    type: 'select',
-    options: [
-      {
-        value: 1,
-        label: '是'
-      },
-      {
-        value: 2,
-        label: '否'
-      }
-    ]
   }
 ]

+ 6 - 6
client/src/views/OaSystem/personnelManagement/ygdaPage/index.vue

@@ -22,7 +22,7 @@
           placeholder=""
         />
       </div>
-      <div class="from">
+      <div class="from" style="margin: 5px 0">
         <div class="btnBox">
           <el-button type="primary" style="background: #3485ff" @click="handleQuery">
             <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
@@ -74,7 +74,7 @@
               :formatter="
                 (row, column, cellValue) => {
                   return item.options?.find((e) => {
-                    return e.value === cellValue
+                    return e.value == cellValue
                   })?.label
                 }
               "
@@ -150,7 +150,7 @@ const getList = async () => {
   loading.value = true
   try {
     const data = await StaffRecordsApi.getRecordsPage(queryParams)
-    list.value = data.list
+    list.value = data.records
     total.value = data.total
   } finally {
     loading.value = false
@@ -189,9 +189,9 @@ onMounted(() => {
   width: 160px;
 }
 
-:deep(.el-table) {
-  tr {
-    height: 50px;
+:deep(.el-table--default) {
+  .el-table__cell {
+    padding: 14px 0;
   }
 }
 </style>

+ 1 - 1
client/src/views/OaSystem/personnelManagement/ygdaPage/staffDetail.vue

@@ -97,7 +97,7 @@ const isEdit = computed(() => {
                     style="width: 100%"
                     :placeholder="isEdit ? child.title : ''"
                     type="date"
-                    value-format="YYYY-MM-DD"
+                    value-format="x"
                   />
 
                   <el-select