|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" :title="state.options.createBy + '的日报'" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
|
|
|
+ <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" :title="dataList[0]?.createBy + '的日报'" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
|
|
|
<template #left>
|
|
|
<view class="u-navbar__content__left__item">
|
|
|
<u-icon name="arrow-left" size="20" color="#000"></u-icon>
|
|
@@ -26,7 +26,7 @@
|
|
|
:data-theme="'theme-' + proxy.$settingStore.themeColor.name"
|
|
|
>
|
|
|
<template #default>
|
|
|
- <view class="content-area radius bg-white" v-for="(item, ind) in state.dataList" :key="ind">
|
|
|
+ <view class="content-area radius bg-white" v-for="(item,index) in dataList" :key="index">
|
|
|
<view class="content-area-header flex mb10">
|
|
|
<u-avatar
|
|
|
class="content-area-header-avatar mr10"
|
|
@@ -45,7 +45,7 @@
|
|
|
|
|
|
<view class="content-area-center mb10" v-for="child in item.workContents" :key="child">
|
|
|
<view class="content-area-center-top flex">
|
|
|
- <view class="content-area-center-top-title mr10">{{ child.projectName ? child.projectName : " " }}</view>
|
|
|
+ <view class="content-area-center-top-title mr10" style="color: #559AFF;" @click="toProjectMange(child.projectId)">{{ child.projectName ? child.projectName : " " }}</view>
|
|
|
<view class="content-area-center-top-time" :style="{ color: proxy.$settingStore.themeColor.color }">{{ child.workTime }}h</view>
|
|
|
</view>
|
|
|
<u-text :text="child.workContent" color="#000000" size="14"></u-text>
|
|
@@ -60,7 +60,7 @@
|
|
|
</view>
|
|
|
<view class="content-area-center mb10">
|
|
|
<view class="content-area-center-top">抄送人 </view>
|
|
|
- <u-text :text="item.ccTo" color="#000000" size="14"></u-text>
|
|
|
+ <u-text :text='item.ccTo ? proxy.$common.mapping("nickName", "userId", item.ccTo, userData) : "无"' color="#000000" size="14"></u-text>
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -77,6 +77,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onBackPress, onUnload, onNav
|
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
|
/*----------------------------------接口引入-----------------------------------*/
|
|
|
import { projectApi } from "@/api/business/project.js";
|
|
|
+import { dUserList } from "@/api/system/user.js";
|
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
|
/*----------------------------------store引入-----------------------------------*/
|
|
|
/*----------------------------------公共方法引入-----------------------------------*/
|
|
@@ -85,40 +86,47 @@ const { proxy } = getCurrentInstance();
|
|
|
/*----------------------------------变量声明-----------------------------------*/
|
|
|
const state = reactive({
|
|
|
loading: true,
|
|
|
- dataList: [],
|
|
|
- pageSize: 10,
|
|
|
- current: 1,
|
|
|
- total: 0,
|
|
|
-
|
|
|
- options: {
|
|
|
+ dataList: [],//日报列表
|
|
|
+ options: {//日报详情参数
|
|
|
reportId: "",
|
|
|
- createBy: "",
|
|
|
},
|
|
|
+ userData:[],//用户列表
|
|
|
});
|
|
|
|
|
|
-const { dataList, pageSize, current, total} = toRefs(state);
|
|
|
+const { dataList, userData} = toRefs(state);
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @初始化
|
|
|
*/
|
|
|
function init() {
|
|
|
- state.dataList = [];
|
|
|
+ dataList.value = [];
|
|
|
state.loading = true;
|
|
|
- projectApi()
|
|
|
- .ReportRecordDetails({
|
|
|
+ dUserList().then(res=>{
|
|
|
+ userData.value = res.data;
|
|
|
+ projectApi()
|
|
|
+ .ReportRecord({
|
|
|
reportId: state.options.reportId,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1,
|
|
|
})
|
|
|
.then((requset) => {
|
|
|
- state.options.createBy = requset.data[0].createBy;
|
|
|
- state.dataList = requset.data;
|
|
|
+ dataList.value = requset.data.records;
|
|
|
state.loading = false;
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
state.loading = false;
|
|
|
});
|
|
|
-}
|
|
|
+ })
|
|
|
|
|
|
+}
|
|
|
+/**
|
|
|
+ * 跳转项目概览
|
|
|
+ * @param id 项目id
|
|
|
+ */
|
|
|
+function toProjectMange(id) {
|
|
|
+ proxy.$tab.navigateTo(`/pages/business/common/projectMange/overview/index?id=${id}`);
|
|
|
+}
|
|
|
onReady(() => {});
|
|
|
|
|
|
onShow(() => {
|