|
@@ -54,29 +54,52 @@
|
|
|
</view>
|
|
|
<view class="content-area-center mb10">
|
|
|
<view class="content-area-center-top"> 明日计划 </view>
|
|
|
- <u-text :text="item.tomorrowPlan" color="#000000" size="14"></u-text>
|
|
|
+ <u-text :text="item.tomorrowPlan?item.tomorrowPlan:'无'" color="#000000" size="14"></u-text>
|
|
|
</view>
|
|
|
<view class="content-area-center mb10">
|
|
|
<view class="content-area-center-top"> 工作协调 </view>
|
|
|
- <u-text :text="item.coordinateWork" color="#000000" size="14"></u-text>
|
|
|
+ <u-text :text="item.coordinateWork?item.coordinateWork:'无'" color="#000000" size="14"></u-text>
|
|
|
</view>
|
|
|
<view class="content-area-center mb10">
|
|
|
<view class="content-area-center-top">图片 </view>
|
|
|
<view class="imageBox" v-if="item.reportImage">
|
|
|
<image class="image" style="width:50px;margin:5px" mode="widthFix" v-for="(a,index) in JSON.parse(item.reportImage)" :key="index" :src="a.url" @click="previewImage(index)" />
|
|
|
</view>
|
|
|
+ <view class="imageBox" >无</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="content-area-center mb10">
|
|
|
<view class="content-area-center-top">附件 </view>
|
|
|
- <view v-for="(file, index) in JSON.parse(item.reportFile)" :key="index" style="font-size:12px">
|
|
|
+ <view v-if="item.reportFile" v-for="(file, index) in JSON.parse(item.reportFile)" :key="index" style="font-size:12px">
|
|
|
<uni-link :href="file.url" text="file.url" style="color:rgba(0,0,0,.7)">{{file.name}}</uni-link>
|
|
|
</view>
|
|
|
-
|
|
|
+ <view v-else>无</view>
|
|
|
</view>
|
|
|
<view class="content-area-center mb10">
|
|
|
- <view class="content-area-center-top">抄送人 </view>
|
|
|
- <u-text :text='item.ccTo ? proxy.$common.mapping("nickName", "userId", item.ccTo, userData) : "无"' color="#000000" size="14"></u-text>
|
|
|
+ <!-- <view class="content-area-center-top">抄送人 </view> -->
|
|
|
+ <u-tabs
|
|
|
+ :list="tabsList"
|
|
|
+ :current="tabsCurrent"
|
|
|
+ @click="tabsClick"
|
|
|
+ lineColor="#333"
|
|
|
+ :activeStyle="{ color: '#333', fontSize: '14px' }"
|
|
|
+ :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
|
|
|
+ :scrollable="false"
|
|
|
+ ></u-tabs>
|
|
|
+ <view class="content-area-header mt20 mb10 mr5" style="display:inline-block;text-align:center" v-for="(item, index) in reportDetailData.treeSelectNodes" :key="index">
|
|
|
+ <img :src="item.avatar" class="content-area-header-avatarImg mr10" v-if="item.avatar" style="display:block;width:40px;height:40px"/>
|
|
|
+ <u-avatar
|
|
|
+ v-if="!item.avatar"
|
|
|
+ class="content-area-header-avatar mr10"
|
|
|
+ :text="item.nickName.length > 2 ? item.nickName.slice(1, 3) : item.nickName"
|
|
|
+ shape="square"
|
|
|
+ size="40"
|
|
|
+ fontSize="12"
|
|
|
+ color="#ffffff"
|
|
|
+ :bgColor="proxy.$settingStore.themeColor.color"
|
|
|
+ ></u-avatar>
|
|
|
+ <u-text :text='item.nickName' color="#000000" size="14"></u-text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -94,12 +117,20 @@ import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue
|
|
|
/*----------------------------------接口引入-----------------------------------*/
|
|
|
import { projectApi } from "@/api/business/project.js";
|
|
|
import { dUserList } from "@/api/system/user.js";
|
|
|
+import { deptUserTreeSelect } from "@/api/system/user.js";
|
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
|
/*----------------------------------store引入-----------------------------------*/
|
|
|
/*----------------------------------公共方法引入-----------------------------------*/
|
|
|
/*----------------------------------公共变量-----------------------------------*/
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
/*----------------------------------变量声明-----------------------------------*/
|
|
|
+const tree = ref({
|
|
|
+ value: "tree_root",
|
|
|
+ label: "Root",
|
|
|
+ children: [],
|
|
|
+});
|
|
|
+const reportDetailData = ref([]);
|
|
|
+const pmReportReaders =ref([]) //已读未读集合
|
|
|
const state = reactive({
|
|
|
loading: true,
|
|
|
dataList: [],//日报列表
|
|
@@ -109,10 +140,23 @@ const state = reactive({
|
|
|
userData:[],//用户列表
|
|
|
images:[],//图片列表
|
|
|
files:[],//附件列表
|
|
|
+ tabsList: [
|
|
|
+ { name: "已读", value: 0 },
|
|
|
+ { name: "未读", value: 1 },
|
|
|
+ ],
|
|
|
+ tabsCurrent: 0,
|
|
|
+
|
|
|
});
|
|
|
|
|
|
-const { dataList, userData} = toRefs(state);
|
|
|
+const { dataList, userData,tabsList,tabsCurrent} = toRefs(state);
|
|
|
|
|
|
+/**
|
|
|
+ * @tabs点击事件
|
|
|
+ */
|
|
|
+ function tabsClick(e) {
|
|
|
+ state.tabsCurrent = e.index;
|
|
|
+ reportDetailData.value.treeSelectNodes = proxy.$common.findTreeNodes(tree.value, state.tabsCurrent==0?pmReportReaders.value.readAlready:pmReportReaders.value.readNotAlready);
|
|
|
+}
|
|
|
function previewImage(index){
|
|
|
uni.previewImage({
|
|
|
current: index, // 当前显示图片索引
|
|
@@ -127,8 +171,9 @@ function previewImage(index){
|
|
|
function init() {
|
|
|
dataList.value = [];
|
|
|
state.loading = true;
|
|
|
- dUserList().then(res=>{
|
|
|
- userData.value = res.data;
|
|
|
+ /** 查询树结构用户列表 回显抄送人*/
|
|
|
+ deptUserTreeSelect({ pageNum: "1", pageSize: "1000" }).then((res) => {
|
|
|
+ tree.value = res.data;
|
|
|
projectApi()
|
|
|
.ReportRecord({
|
|
|
reportId: state.options.reportId,
|
|
@@ -138,9 +183,10 @@ function init() {
|
|
|
.then((requset) => {
|
|
|
dataList.value = requset.data.records;
|
|
|
state.loading = false;
|
|
|
+ pmReportReaders.value = requset.data.records[0].pmReportReaders;
|
|
|
+ reportDetailData.value.treeSelectNodes = proxy.$common.findTreeNodes(tree.value, tabsCurrent.value==0?pmReportReaders.value.readAlready:pmReportReaders.value.readNotAlready);
|
|
|
var imgs = JSON.parse(dataList.value[0].reportImage);
|
|
|
var files= JSON.parse(dataList.value[0].reportFile);
|
|
|
- console.log(dataList.value[0].reportImage)
|
|
|
imgs.forEach(function(item){
|
|
|
state.images.push(item.url);
|
|
|
})
|
|
@@ -151,8 +197,7 @@ function init() {
|
|
|
.catch((err) => {
|
|
|
state.loading = false;
|
|
|
});
|
|
|
- })
|
|
|
-
|
|
|
+ });
|
|
|
}
|
|
|
/**
|
|
|
* 跳转项目概览
|