|
@@ -25,10 +25,10 @@
|
|
|
:isSticky="true"
|
|
|
:customStyle="{
|
|
|
//#ifdef APP-PLUS || MP-WEIXIN
|
|
|
- height: 'calc(100vh - 132px)',
|
|
|
+ height: `calc(100vh - (138px + ${proxy.$settingStore.StatusBarHeight}))`,
|
|
|
//#endif
|
|
|
//#ifdef H5
|
|
|
- height: 'calc(100vh - 132px)',
|
|
|
+ height: `calc(100vh - (138px))`,
|
|
|
//#endif
|
|
|
}"
|
|
|
:refresherLoad="true"
|
|
@@ -42,27 +42,25 @@
|
|
|
:data-theme="'theme-' + proxy.$settingStore.themeColor.name"
|
|
|
>
|
|
|
<template #default>
|
|
|
+ <view v-if="timedList.length > 0" @click="goTimingPage()" class="list-cell list-cell-arrow" style="margin: 20px 0; color: rgb(20, 158, 255); background-color: rgba(20, 158, 255, 0.1)">
|
|
|
+ <view style="width: calc(100% - 51px); display: flex; padding-right: 10px">
|
|
|
+ <u-icon name="info-circle" color="#2979ff" size="18" style="margin-right: 5px"></u-icon>
|
|
|
+ <view v-if="timedList.length == 1">您有1条定时日志将于{{ timedList[0].timingTime.slice(0, 16) }}发布</view>
|
|
|
|
|
|
- <view v-if="timedList.length>0" @click="goTimingPage()" class="list-cell list-cell-arrow" style="margin:20px 0;color:rgb(20, 158, 255);background-color: rgba(20, 158, 255,.1)" >
|
|
|
- <view style="width: calc(100% - 51px); display: flex; ; padding-right: 10px" >
|
|
|
- <u-icon name="info-circle" color="#2979ff" size="18" style="margin-right: 5px"></u-icon>
|
|
|
- <view v-if="timedList.length==1">您有1条定时日志将于{{timedList[0].timingTime.slice(0,16)}}发布</view>
|
|
|
-
|
|
|
- <view v-else >您有{{timedList.length}}条定时日志将于指定时间发布</view>
|
|
|
- </view>
|
|
|
+ <view v-else>您有{{ timedList.length }}条定时日志将于指定时间发布</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
<u-loading-page :loading="state.loading" fontSize="16" style="z-index: 99"></u-loading-page>
|
|
|
<view class="content-area" v-for="(group, date) in proxy.$common.groupedItems(state.dataList, 'submitDate')" :key="date">
|
|
|
<view class="content-area-time font14">{{ proxy.$time.jktTimes(date, "否") }}</view>
|
|
|
<view class="content-area-center bg-white" v-for="(el, ind) in group" :key="ind">
|
|
|
- <view class="content-area-top menu-item" style="float:right;padding:10px 0px">
|
|
|
+ <view class="content-area-top menu-item" style="float: right; padding: 10px 0px">
|
|
|
<view class="content-area-top-time"> </view>
|
|
|
<u-icon class="content-area-top-icon" name="more-dot-fill" size="20" color="#000" @click="moreClick(el)"></u-icon>
|
|
|
</view>
|
|
|
<view class="flex mb10" @click="goContentDetails(el)">
|
|
|
- <img :src="el.avatar" class="content-area-center-avatarImg mr10" v-if="el.avatar"/>
|
|
|
+ <img :src="el.avatar" class="content-area-center-avatarImg mr10" v-if="el.avatar" />
|
|
|
<u-avatar
|
|
|
v-if="!el.avatar"
|
|
|
class="content-area-center-avatar mr10"
|
|
@@ -101,9 +99,8 @@
|
|
|
overflow: 'hidden',
|
|
|
}"
|
|
|
>
|
|
|
-
|
|
|
<u-button
|
|
|
- v-if="state.tabsCurrent ==1"
|
|
|
+ v-if="state.tabsCurrent == 1"
|
|
|
class="custom-style"
|
|
|
type="info"
|
|
|
size="normal"
|
|
@@ -132,7 +129,7 @@
|
|
|
@click="handleSubmit('copy', eventList)"
|
|
|
></u-button>
|
|
|
<u-button
|
|
|
- v-if="state.tabsCurrent ==1"
|
|
|
+ v-if="state.tabsCurrent == 1"
|
|
|
class="custom-style"
|
|
|
type="info"
|
|
|
size="normal"
|
|
@@ -162,13 +159,8 @@
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<uni-popup ref="alertDialog" type="dialog">
|
|
|
- <uni-popup-dialog :type="state.tip.type" cancelText="取消" confirmText="确定" title="操作提醒" :content="state.tip.content" @confirm="dialogConfirm"
|
|
|
- @close="dialogClose"></uni-popup-dialog>
|
|
|
+ <uni-popup-dialog :type="state.tip.type" cancelText="取消" confirmText="确定" title="操作提醒" :content="state.tip.content" @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
|
|
|
</uni-popup>
|
|
|
|
|
|
<u-modal
|
|
@@ -181,7 +173,6 @@
|
|
|
@cancel="modal.show = false"
|
|
|
@close="modal.show = false"
|
|
|
></u-modal>
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
@@ -189,7 +180,7 @@
|
|
|
import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
|
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
|
/*----------------------------------接口引入-----------------------------------*/
|
|
|
-import { projectApi} from "@/api/business/project.js";
|
|
|
+import { projectApi } from "@/api/business/project.js";
|
|
|
/*----------------------------------组件引入-----------------------------------*/
|
|
|
/*----------------------------------store引入-----------------------------------*/
|
|
|
import { useStores, commonStores } from "@/store/modules/index";
|
|
@@ -226,19 +217,18 @@ const state = reactive({
|
|
|
},
|
|
|
eventList: {}, //数据存储
|
|
|
|
|
|
-
|
|
|
- reportData:{},
|
|
|
- tip:{
|
|
|
- type:undefined,//弹框类型
|
|
|
- content:"",//提示信息
|
|
|
- data:{},//带入数据
|
|
|
- operation:undefined,//操作类型
|
|
|
+ reportData: {},
|
|
|
+ tip: {
|
|
|
+ type: undefined, //弹框类型
|
|
|
+ content: "", //提示信息
|
|
|
+ data: {}, //带入数据
|
|
|
+ operation: undefined, //操作类型
|
|
|
},
|
|
|
- timedList:[],
|
|
|
- tree:[]
|
|
|
+ timedList: [],
|
|
|
+ tree: [],
|
|
|
});
|
|
|
|
|
|
-const { tabsList, tabsCurrent, dataList, pageSize, current, total,popup,eventList,modal,timedList,tree} = toRefs(state);
|
|
|
+const { tabsList, tabsCurrent, dataList, pageSize, current, total, popup, eventList, modal, timedList, tree } = toRefs(state);
|
|
|
/**
|
|
|
* 操作弹框提醒
|
|
|
* @param type 弹框类型
|
|
@@ -246,23 +236,23 @@ const { tabsList, tabsCurrent, dataList, pageSize, current, total,popup,eventLis
|
|
|
* @param item 带入数据
|
|
|
* @param operation 操作类型
|
|
|
*/
|
|
|
- function tips(type,content,item,operation){
|
|
|
- state.tip.type=type
|
|
|
- state.tip.content=content
|
|
|
- state.tip.data=item
|
|
|
- state.tip.operation=operation
|
|
|
- proxy.$refs.alertDialog.open()
|
|
|
+function tips(type, content, item, operation) {
|
|
|
+ state.tip.type = type;
|
|
|
+ state.tip.content = content;
|
|
|
+ state.tip.data = item;
|
|
|
+ state.tip.operation = operation;
|
|
|
+ proxy.$refs.alertDialog.open();
|
|
|
}
|
|
|
/**弹框确定操作 */
|
|
|
-function dialogConfirm(){
|
|
|
- if(state.tip.operation =='delete'){
|
|
|
- handleSubmit('delete',state.tip.data)
|
|
|
+function dialogConfirm() {
|
|
|
+ if (state.tip.operation == "delete") {
|
|
|
+ handleSubmit("delete", state.tip.data);
|
|
|
}
|
|
|
- if(state.tip.operation=='exit'){
|
|
|
- handleSubmit('exit',state.tip.data)
|
|
|
+ if (state.tip.operation == "exit") {
|
|
|
+ handleSubmit("exit", state.tip.data);
|
|
|
}
|
|
|
- if(state.tip.operation=='copy'){
|
|
|
- handleSubmit('copy',state.tip.data)
|
|
|
+ if (state.tip.operation == "copy") {
|
|
|
+ handleSubmit("copy", state.tip.data);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
@@ -288,36 +278,34 @@ function init() {
|
|
|
state.total = requset.data.total;
|
|
|
state.loading = false;
|
|
|
|
|
|
- console.log(state.dataList )
|
|
|
+ console.log(state.dataList);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
state.loading = false;
|
|
|
});
|
|
|
- projectApi()
|
|
|
- .TimedReports({
|
|
|
- }).then((requset) => {
|
|
|
+ projectApi()
|
|
|
+ .TimedReports({})
|
|
|
+ .then((requset) => {
|
|
|
state.timedList = requset.data;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
-
|
|
|
})
|
|
|
-
|
|
|
- }
|
|
|
+ .catch((err) => {});
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* @跳转详情
|
|
|
*/
|
|
|
function goContentDetails(e) {
|
|
|
- if(state.tabsCurrent==0&&e.readFlag!=1){
|
|
|
- projectApi().ReportRecordReadFlag({ reportId: e.id }).then((res) => {
|
|
|
- if (res.status == "SUCCESS") {
|
|
|
- proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.id}`);
|
|
|
- } else {
|
|
|
- proxy.$modal.msgError("读取异常");
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- }else{
|
|
|
+ if (state.tabsCurrent == 0 && e.readFlag != 1) {
|
|
|
+ projectApi()
|
|
|
+ .ReportRecordReadFlag({ reportId: e.id })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status == "SUCCESS") {
|
|
|
+ proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.id}`);
|
|
|
+ } else {
|
|
|
+ proxy.$modal.msgError("读取异常");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.id}`);
|
|
|
}
|
|
|
}
|
|
@@ -346,9 +334,8 @@ function tabsClick(e) {
|
|
|
init();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 定时日志页面
|
|
|
-function goTimingPage(){
|
|
|
+function goTimingPage() {
|
|
|
proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/timingLog`);
|
|
|
|
|
|
// proxy.$tab.navigateTo(`/pages/business/common/projectMange/report/timingLog`);
|
|
@@ -359,7 +346,6 @@ function moreClick(event) {
|
|
|
state.eventList = event;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
function handleModal(type, content) {
|
|
|
state.modal.show = true;
|
|
|
state.modal.type = type;
|
|
@@ -367,28 +353,26 @@ function handleModal(type, content) {
|
|
|
}
|
|
|
|
|
|
/** 编辑、删除日报*/
|
|
|
-function handleSubmit(type,item) {
|
|
|
+function handleSubmit(type, item) {
|
|
|
if (type === "update") {
|
|
|
proxy.$tab.navigateTo(`/pages/business/common/projectMange/write/insert?templateId=1&id=${item.id}`);
|
|
|
state.modal.show = false;
|
|
|
- }else if (type === "copy") {
|
|
|
- var workLongString=''
|
|
|
+ } else if (type === "copy") {
|
|
|
+ var workLongString = "";
|
|
|
item.workContents.forEach((item) => {
|
|
|
- workLongString+=item.projectName+':'+item.workTime+ "h\n"+item.workContent+ "\n"
|
|
|
- })
|
|
|
+ workLongString += item.projectName + ":" + item.workTime + "h\n" + item.workContent + "\n";
|
|
|
+ });
|
|
|
item.ccTo1 = item.ccTo.split(",").map(function (value, index) {
|
|
|
return Number(value);
|
|
|
});
|
|
|
|
|
|
- /** 查询树结构用户列表 回显抄送人*/
|
|
|
+ /** 查询树结构用户列表 回显抄送人*/
|
|
|
|
|
|
- item.tomorrowPlan=item.tomorrowPlan?item.tomorrowPlan:'-';
|
|
|
- item.coordinateWork=item.coordinateWork?item.coordinateWork:'-'
|
|
|
+ item.tomorrowPlan = item.tomorrowPlan ? item.tomorrowPlan : "-";
|
|
|
+ item.coordinateWork = item.coordinateWork ? item.coordinateWork : "-";
|
|
|
// 触发方法
|
|
|
- proxy.$common.uniCopy({
|
|
|
- content: workLongString+ "\n" +
|
|
|
- "明日计划:\n" + item.tomorrowPlan + "\n" +
|
|
|
- "工作协调:\n" + item.coordinateWork,
|
|
|
+ proxy.$common.uniCopy({
|
|
|
+ content: workLongString + "\n" + "明日计划:\n" + item.tomorrowPlan + "\n" + "工作协调:\n" + item.coordinateWork,
|
|
|
success: (res) => {
|
|
|
uni.showToast({
|
|
|
title: res,
|
|
@@ -404,8 +388,6 @@ function handleSubmit(type,item) {
|
|
|
},
|
|
|
});
|
|
|
state.popup.show = false;
|
|
|
-
|
|
|
-
|
|
|
} else if (type === "delete") {
|
|
|
projectApi()
|
|
|
.ReportDelete(item.id)
|
|
@@ -418,7 +400,7 @@ function handleSubmit(type,item) {
|
|
|
.catch((errors) => {
|
|
|
proxy.$modal.msg(errors);
|
|
|
});
|
|
|
- }
|
|
|
+ }
|
|
|
state.modalShow = false;
|
|
|
}
|
|
|
|
|
@@ -465,8 +447,8 @@ onUnload(() => {
|
|
|
margin: auto 0;
|
|
|
}
|
|
|
&-avatarImg {
|
|
|
- width:35px;
|
|
|
- height:35px;
|
|
|
+ width: 35px;
|
|
|
+ height: 35px;
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
|
|
@@ -478,12 +460,12 @@ onUnload(() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.pp{
|
|
|
+.pp {
|
|
|
text-align: left;
|
|
|
}
|
|
|
</style>
|
|
|
<style>
|
|
|
-.pp .u-modal__content{
|
|
|
- justify-content: left !important
|
|
|
+.pp .u-modal__content {
|
|
|
+ justify-content: left !important;
|
|
|
}
|
|
|
</style>
|