Quellcode durchsuchen

fix: 修改了一些东西

qiny vor 1 Jahr
Ursprung
Commit
b0479dac8c

+ 1 - 3
client/src/views/OaSystem/home/components/daily/index.vue

@@ -36,9 +36,7 @@
 </template>
 <script lang="ts" setup>
 /**
- * @description 首页周报列表
- * 先获取到最近三个月的工作日列表详情,对工作日进行周数划分
- * 再获取近三个月的周报列表,对周报填报情况进行判断
+ * @description 首页日志概况
  */
 import moment from 'moment'
 import { http } from '../weekly/service'

+ 2 - 1
client/src/views/OaSystem/home/homeStaff.vue

@@ -38,7 +38,8 @@
       <div class="handle-events"> <HandleEvents /> </div>
     </div>
     <div class="card-item-common card-flex-col">
-      <CardTitle title="日志情况" showMore @moreClick="moreClick" />
+      <CardTitle title="日报统计" showMore @moreClick="moreClick" />
+      <!-- <CardTitle title="周报统计" showMore @moreClick="moreClick" /> -->
       <!-- <div>
         <el-input style="width: calc(100% - 60px); color: #f7f7f7" placeholder="输入关键字搜索" />
       </div> -->

+ 7 - 3
client/src/views/OaSystem/personnelManagement/CompletionRate/index.vue

@@ -79,7 +79,7 @@ const getRateData = async () => {
       }
     })
     .then((res) => {
-      ElMessage.success(`${moment(searchDate).format('YYYY-MM')} 数据查询成功`)
+      ElMessage.success(`${moment(searchDate).format('YYYY年M月')} 数据查询成功`)
       const rateTree = handleTree(res, 'deptId')
       dataSource.value = setRateData(rateTree)
       loading.value = false
@@ -198,9 +198,13 @@ const { push } = useRouter()
 const handleView = (row) => {
   // 还需判断是跳转周报还是日报
   if (row.reportType == 'weekly') {
-    push(`/oaSystem/DeptCenter/weeklyStatistic?deptId=${row.deptId}`)
+    push(
+      `/oaSystem/DeptCenter/weeklyStatistic?deptId=${row.deptId}&date=${moment(selectDate.value).format('YYYY-MM')}`
+    )
   } else {
-    push(`/oaSystem/DeptCenter/dailyStatistic?deptId=${row.deptId}`)
+    push(
+      `/oaSystem/DeptCenter/dailyStatistic?deptId=${row.deptId}&date=${moment(selectDate.value).format('YYYY-MM')}`
+    )
   }
 }
 </script>

+ 1 - 0
client/src/views/OaSystem/personnelManagement/ProjectStatistics/projectForm.vue

@@ -83,6 +83,7 @@ onMounted(() => {
 
 // 导出头部
 const tableHead = [['人员', '项目名称', '项目编号', '项目工时(小时)']]
+// const newTableHead = [['公司', '月份', '部门', '人员', '项目编号', '合同编码', '工时']]
 // 列宽设置
 const colsWidth = ref([{ wch: 8 }, { wch: 100 }, { wch: 18 }, { wch: 15 }])
 const exportData = ref(tableHead)

+ 2 - 1
client/src/views/OaSystem/personnelManagement/ProjectStatistics/projectTable.vue

@@ -16,7 +16,8 @@
         <el-table-column label="序号" width="60" align="center">
           <template #default="scope">{{ scope.$index + 1 }}</template>
         </el-table-column>
-        <el-table-column :show-overflow-tooltip="true" prop="nickName" label="人员" width="120" />
+        <el-table-column prop="nickName" label="人员" width="120" />
+        <el-table-column :show-overflow-tooltip="true" prop="deptName" label="部门" width="200" />
         <el-table-column :show-overflow-tooltip="true" prop="xmmc" label="项目名称" />
         <el-table-column prop="xmbh" label="项目编号" width="250" />
         <el-table-column prop="workTime" label="项目工时(小时)" width="180" align="center" />

+ 8 - 1
client/src/views/OaSystem/personnelManagement/dailyStatistic/index.vue

@@ -85,6 +85,13 @@ const getDefaultDept = () => {
   return urlDeptId ?? userInfo.deptId
 }
 
+// 获取查询日期
+const getDefaultDate = () => {
+  // 如果有,从url中获取查询日期
+  const date: any = currentRoute.value.query.date
+  return date ? moment(date) : moment()
+}
+
 // 条件查询
 const onSearchHandle = (): void => {
   getDailyStatisticData()
@@ -118,7 +125,7 @@ onMounted(() => {
 })
 
 // const userInfo = getUserInfo()
-const reportYearAndMonth = ref(moment())
+const reportYearAndMonth = ref(getDefaultDate())
 // const userId = ref(userInfo.id ?? '')
 const userId = ref('')
 // const deptId = ref(userInfo.deptId ?? '')

+ 8 - 1
client/src/views/OaSystem/personnelManagement/weeklyStatistic/index.vue

@@ -85,6 +85,13 @@ const getDefaultDept = () => {
   return urlDeptId ?? userInfo.deptId
 }
 
+// 获取查询日期
+const getDefaultDate = () => {
+  // 如果有,从url中获取查询日期
+  const date: any = currentRoute.value.query.date
+  return date ? moment(date) : moment()
+}
+
 // 条件查询
 const onSearchHandle = (): void => {
   getWeeklyStatisticData()
@@ -118,7 +125,7 @@ onMounted(() => {
 })
 
 // const userInfo = getUserInfo()
-const reportYearAndMonth = ref(moment())
+const reportYearAndMonth = ref(getDefaultDate())
 // const userId = ref(userInfo.id ?? '')
 const userId = ref('')
 // const deptId = ref(userInfo.deptId ?? '')