2 Commits 678cd774f3 ... 5db9fdd509

Author SHA1 Message Date
  qiny 5db9fdd509 Merge branch 'master' of http://114.55.67.98:8070/Natural_p1/zjugis_OA 11 months ago
  qiny e6bb4fd8c6 fix: 员工档案和档案详情显示问题,我收到的周日报增加人员查询等 11 months ago

+ 2 - 2
client/src/views/OaSystem/marketCenter/contractSubOut/applyIndex.vue

@@ -128,8 +128,8 @@
               scope.row.contractSubFlowStatus != 90 && isSignType[scope.row.isSign] === '是'
                 ? '未签'
                 : scope.row.contractAmount - (scope.row.payAmount ?? 0) === 0
-                ? '已付清'
-                : '未付清'
+                  ? '已付清'
+                  : '未付清'
             }}</template>
           </el-table-column>
           <el-table-column label="操作" fixed="right" align="center" width="200">

+ 3 - 2
client/src/views/OaSystem/mineCenter/rightChild/index.ts

@@ -228,14 +228,15 @@ const getDictList = () => {
 export const getConfigDict = () => {
   const dictList = getDictList()
   const configList = cloneDeep(formConfigList)
-  const numberType = ['sex', 'state', 'hyzk', 'hkxz', 'zzmm', 'zgxl', 'jjlxrgx']
+  // const numberType = ['sex', 'state', 'hyzk', 'hkxz', 'zzmm', 'zgxl', 'jjlxrgx']
   configList.forEach((item) => {
     item.children.forEach((child: any) => {
       if (child.type == 'select' && dictList[child.name]) {
         const options = dictList[child.name].map((item) => {
           return {
             label: item.label,
-            value: numberType.includes(child.name) ? Number(item.value) : item.value
+            value: item.value
+            // value: numberType.includes(child.name) ? Number(item.value) : item.value
           }
         })
         child.options = options

+ 14 - 8
client/src/views/OaSystem/mineCenter/rightChild/wdda.vue

@@ -23,12 +23,23 @@ useQuery(
   },
   {
     onSuccess: (res) => {
-      console.log('res', res)
-      data.value = res
+      data.value = handleTimeData(res)
     }
   }
 )
 
+// 处理 [2001, 1, 1] 格式的时间数据
+const handleTimeData = (dataSource) => {
+  const keyList = ['birthday', 'bysj', 'cjgzsj', 'yshtqssj', 'htdqs', 'htqdsj', 'rgssj', 'zzsj']
+  Object.keys(dataSource).forEach((key) => {
+    if (keyList.includes(key) && Array.isArray(dataSource[key])) {
+      dataSource[key] = dataSource[key].join('-')
+    }
+  })
+  // console.log('dataSource', dataSource)
+  return dataSource
+}
+
 const router = useRouter()
 const editDetail = () => {
   router.push({
@@ -64,7 +75,6 @@ const editDetail = () => {
                   v-if="child.type === 'select'"
                   v-model="data[child?.name]"
                   style="width: 100%"
-                  placeholder="-"
                 >
                   <el-option
                     v-for="opt in child.options"
@@ -74,11 +84,7 @@ const editDetail = () => {
                   />
                 </el-select>
 
-                <el-input
-                  v-if="child?.type === undefined"
-                  v-model="data[child?.name]"
-                  placeholder=""
-                />
+                <el-input v-if="child?.type === undefined" v-model="data[child?.name]" />
               </el-form-item>
             </li>
             <li></li>

+ 13 - 5
client/src/views/OaSystem/personnelManagement/myReceiveLog/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="dailyStatisticBox">
-    <h4 class="title">我收到的日志</h4>
+    <h4 class="title">我收到的周日报</h4>
     <div class="searchBox">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="日志类型:">
@@ -10,6 +10,9 @@
             <el-option label="全部" value="" />
           </el-select>
         </el-form-item>
+        <el-form-item label="发送人:">
+          <UserOrgTree v-model="reportUser" placeholder="请选择发送人" />
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" :icon="Search" @click="onSearchHandle">查询</el-button>
         </el-form-item>
@@ -19,7 +22,7 @@
       <div v-for="(item, index) in tableData" :key="index" class="log-box">
         <div class="box-title">
           <div class="user-name">
-            <el-avatar :size="40" :src="userInfo.avatar" />
+            <el-avatar :size="34" :icon="UserFilled" />
             <span class="name">{{ item.userNickname ?? '匿名' }}</span>
           </div>
           <div v-if="item.reportType == 'daily'" class="log-time">{{
@@ -63,9 +66,10 @@
 
 <script setup lang="ts">
 import request from '@/config/axios'
-import { Search } from '@element-plus/icons-vue'
+import { Search, UserFilled } from '@element-plus/icons-vue'
 import moment from 'moment'
-import { getUserInfo } from '@/utils/tool'
+// import { getUserInfo } from '@/utils/tool'
+import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
 
 defineOptions({ name: 'MyReceiveLog' })
 
@@ -115,9 +119,10 @@ onMounted(() => {
   getDailyStatisticData()
 })
 
-const userInfo = getUserInfo()
+// const userInfo = getUserInfo()
 const tableData = ref<any[]>([])
 const reportType = ref<'daily' | 'weekly' | ''>('')
+const reportUser = ref<string | number>('')
 const pageSize = ref<number>(20)
 const pageNo = ref<number>(1)
 const total = ref<number>(0)
@@ -131,6 +136,9 @@ const getDailyStatisticData = async (): Promise<void> => {
   if (reportType.value !== '') {
     params.reportType = reportType.value
   }
+  if (reportUser.value !== '') {
+    params.userIds = reportUser.value
+  }
   const { list = [], total: resTotal = 0 } = await request.get({
     url: '/adm/report/page/me',
     params

+ 29 - 20
client/src/views/OaSystem/personnelManagement/ygdaPage/SchoolTable.vue

@@ -41,15 +41,27 @@
     </el-table-column>
     <el-table-column prop="xl" label="学历">
       <template #default="scope">
-        <el-input v-model="scope.row.xl" v-if="scope.row.isEdit" />
-        <span v-else>{{ scope.row.xl }}</span>
+        <el-select
+          v-if="scope.row.isEdit"
+          v-model="scope.row.xl"
+          style="width: 100%"
+          placeholder="请选择学历水平"
+        >
+          <el-option
+            v-for="opt in selectOptions"
+            :key="opt.value"
+            :label="opt.label"
+            :value="opt.value"
+          />
+        </el-select>
+        <span v-else>{{ degreeShowValue(scope.row.xl) }}</span>
       </template>
     </el-table-column>
-    <el-table-column prop="filePath" label="附件">
+    <el-table-column prop="filePath" label="附件" width="400px">
       <template #default="scope">
         <!-- <el-input v-model="scope.row.filePath" v-if="scope.row.isEdit" /> -->
         <!-- <span v-else>{{ scope.row.filePath }}</span> -->
-        <UploadImg :modelValue="scope.row.filePath" height="55px" />
+        <UploadImgs :modelValue="scope.row.filePath" :updateUrl="updateUrl" height="55px" />
       </template>
     </el-table-column>
     <el-table-column fixed="right" label="操作" width="140">
@@ -66,22 +78,10 @@
         <el-button link type="primary" size="small" @click="onEditItem(scope.$index)" v-else>
           编辑
         </el-button>
-        <el-button
-          v-if="tableData.length > 1"
-          link
-          type="primary"
-          size="small"
-          @click="deleteRow(scope.$index)"
-        >
+        <el-button link type="primary" size="small" @click="deleteRow(scope.$index)">
           删除
         </el-button>
-        <el-button
-          v-if="scope.$index < 4 && tableData.length < 5"
-          link
-          type="primary"
-          size="small"
-          @click="onAddItem(scope.$index)"
-        >
+        <el-button link type="primary" size="small" @click="onAddItem(scope.$index)">
           新增
         </el-button>
       </template>
@@ -93,7 +93,17 @@
  * @description 学习经历
  */
 
-import { UploadImg } from '@/components/UploadFile'
+import { UploadImgs } from '@/components/UploadFile'
+import { getDictList } from './index'
+
+// 学历字典
+const formConfigList = getDictList()
+const selectOptions = formConfigList['zgxl']
+const degreeShowValue = (value) => selectOptions.find((item) => item.value == value)?.label ?? ''
+
+// 上传路径
+const updateUrl =
+  import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + import.meta.env.VITE_UPLOAD_URL
 
 interface ITable {
   id?: string
@@ -147,7 +157,6 @@ const onSaveItem = (index: number) => {
     delete item.isEdit
     return item
   })
-  // console.log('changeData', changeData)
   $emit('onSave', changeData)
 }
 

+ 2 - 14
client/src/views/OaSystem/personnelManagement/ygdaPage/WorkTable.vue

@@ -82,22 +82,10 @@
         <el-button link type="primary" size="small" @click="onEditItem(scope.$index)" v-else>
           编辑
         </el-button>
-        <el-button
-          v-if="tableData.length > 1"
-          link
-          type="primary"
-          size="small"
-          @click="deleteRow(scope.$index)"
-        >
+        <el-button link type="primary" size="small" @click="deleteRow(scope.$index)">
           删除
         </el-button>
-        <el-button
-          v-if="scope.$index < 4 && tableData.length < 5"
-          link
-          type="primary"
-          size="small"
-          @click="onAddItem(scope.$index)"
-        >
+        <el-button link type="primary" size="small" @click="onAddItem(scope.$index)">
           新增
         </el-button>
       </template>

+ 2 - 14
client/src/views/OaSystem/personnelManagement/ygdaPage/familyTable.vue

@@ -66,22 +66,10 @@
         <el-button link type="primary" size="small" @click="onEditItem(scope.$index)" v-else>
           编辑
         </el-button>
-        <el-button
-          v-if="tableData.length > 1"
-          link
-          type="primary"
-          size="small"
-          @click="deleteRow(scope.$index)"
-        >
+        <el-button link type="primary" size="small" @click="deleteRow(scope.$index)">
           删除
         </el-button>
-        <el-button
-          v-if="scope.$index < 4 && tableData.length < 5"
-          link
-          type="primary"
-          size="small"
-          @click="onAddItem(scope.$index)"
-        >
+        <el-button link type="primary" size="small" @click="onAddItem(scope.$index)">
           新增
         </el-button>
       </template>

+ 4 - 3
client/src/views/OaSystem/personnelManagement/ygdaPage/index.ts

@@ -1,6 +1,6 @@
 import { getDictOptions } from '@/utils/dict'
 import { cloneDeep } from 'lodash-es'
-const getDictList = () => {
+export const getDictList = () => {
   const dictOptionsObj: any = {}
   // 性别
   // const sex = getDictOptions('system_user_sex')
@@ -374,14 +374,15 @@ export const formConfigList = [
 export const getConfigDict = () => {
   const dictList = getDictList()
   const configList = cloneDeep(formConfigList)
-  const numberType = ['sex', 'state', 'hyzk', 'hkxz', 'zzmm', 'zgxl', 'jjlxrgx']
+  // const numberType = ['sex', 'state', 'hyzk', 'hkxz', 'zzmm', 'zgxl', 'jjlxrgx']
   configList.forEach((item) => {
     item.children.forEach((child: any) => {
       if (child.type == 'select' && dictList[child.name]) {
         const options = dictList[child.name].map((item) => {
           return {
             label: item.label,
-            value: numberType.includes(child.name) ? Number(item.value) : item.value
+            // value: numberType.includes(child.name) ? Number(item.value) : item.value
+            value: item.value
           }
         })
         child.options = options

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

@@ -33,7 +33,7 @@ useQuery(
   },
   {
     onSuccess: (res) => {
-      formData.value = res
+      formData.value = handleTimeData(res)
       // if (Array.isArray(formData.value['bysj'])) {
       //   formData.value['bysj'] = res.bysj.join('-')
       // }
@@ -42,6 +42,18 @@ useQuery(
   }
 )
 
+// 处理 [2001, 1, 1] 格式的时间数据
+const handleTimeData = (dataSource) => {
+  const keyList = ['birthday', 'bysj', 'cjgzsj', 'yshtqssj', 'htdqs', 'htqdsj', 'rgssj', 'zzsj']
+  Object.keys(dataSource).forEach((key) => {
+    if (keyList.includes(key) && Array.isArray(dataSource[key])) {
+      dataSource[key] = dataSource[key].join('-')
+    }
+  })
+  // console.log('dataSource', dataSource)
+  return dataSource
+}
+
 /**编辑员工档案详情 */
 const { mutate: addUserMutate } = useMutation({
   mutationFn: async (values: any) => {

+ 4 - 4
client/src/views/OaSystem/projectCenter/projectDetail/projectDetail.vue

@@ -289,10 +289,10 @@ const { mutate: startProjectStatusAndProcess } = useMutation(projectStatusAndPro
       sfysType.value === 'ys'
         ? '验收'
         : sfysType.value === 'jx'
-        ? '结项'
-        : sfysType.value === 'zz'
-        ? '中止'
-        : ''
+          ? '结项'
+          : sfysType.value === 'zz'
+            ? '中止'
+            : ''
     openFlow(router, data, `项目${subTitle}`)
   }
 })