|
|
@@ -12,10 +12,10 @@
|
|
|
</view>
|
|
|
<view class="task_time">
|
|
|
<view class="time_day">
|
|
|
- <text class="time_item">{{state?.details?.startTime}}</text>
|
|
|
+ <text class="time_item">{{formatTimeWithoutSeconds(state?.details?.startTime)}}</text>
|
|
|
<text class="time_item">至</text>
|
|
|
- <text class="time_item">{{state?.details?.endTime}}</text>
|
|
|
- <text class="time_item" v-if="state?.details?.taskStatus === 1 && remainingDays(state?.details?.endTime) > 0">剩余{{remainingDays(state?.details?.endTime)}}天</text>
|
|
|
+ <text class="time_item">{{formatTimeWithoutSeconds(state?.details?.endTime)}}</text>
|
|
|
+ <text class="time_item" v-if="state?.details?.taskStatus === 1 && remainingDays(state?.details?.endTime)">剩余{{remainingDays(state?.details?.endTime)}}</text>
|
|
|
</view>
|
|
|
<view :class="['task_status', statusClassMap[state?.details?.taskStatus]]">
|
|
|
{{taskStatusMap[state?.details?.taskStatus]}}
|
|
|
@@ -126,7 +126,7 @@
|
|
|
<view class="file_name">{{item.fileName}}</view>
|
|
|
<view class="file_size">
|
|
|
<text>{{getFileSize(item.fileSize)}}</text>
|
|
|
- <text>{{ item.createTime }}</text>
|
|
|
+ <text>{{ formatTimeWithoutSeconds(item.createTime) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="file_btn">
|
|
|
@@ -141,7 +141,7 @@
|
|
|
<view class="file_name">{{item.fileName}}</view>
|
|
|
<view class="file_size">
|
|
|
<text>{{getFileSize(item.fileSize)}}</text>
|
|
|
- <text>{{ item.createTime }}</text>
|
|
|
+ <text>{{ formatTimeWithoutSeconds(item.createTime) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="file_btn">
|
|
|
@@ -157,7 +157,7 @@
|
|
|
<view class="file_name">{{item.fileName}}</view>
|
|
|
<view class="file_size">
|
|
|
<text>{{getFileSize(item.fileSize)}}</text>
|
|
|
- <text>{{ item.createTime }}</text>
|
|
|
+ <text>{{ formatTimeWithoutSeconds(item.createTime) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="file_btn">
|
|
|
@@ -205,7 +205,7 @@
|
|
|
// #endif
|
|
|
import kexFileUploader from '@/uni_modules/kex-file-uploader/components/kex-file-uploader/kex-file-uploader.vue';
|
|
|
import navBar from '@/components/navBar.vue';
|
|
|
- import { remainingDays,getFileSize,getFileTypeBySuffix } from '@/common/common.js';
|
|
|
+ import { remainingDays,getFileSize,getFileTypeBySuffix,formatTimeWithoutSeconds } from '@/common/common.js';
|
|
|
import {getTaskTargetFileList,DeleteFileList,DelTaskTargetFileList,updateTaskTarget,uploadTaskTargetFileList} from '@/reqApi/notification.js';
|
|
|
import {onLoad} from '@dcloudio/uni-app';
|
|
|
import config from '@/config.js'; // 引入配置文件
|
|
|
@@ -265,6 +265,7 @@
|
|
|
uni.removeStorageSync('isLoadSubmitMaterialIndex');//返回是否重新更新提交材料首页
|
|
|
getApiBaseUrl();//上传接口地址
|
|
|
GetTaskTargetFileList(true);
|
|
|
+ checkTextOverflow();
|
|
|
});
|
|
|
//上传接口地址
|
|
|
const getApiBaseUrl = () => {
|
|
|
@@ -385,6 +386,42 @@
|
|
|
fileName:item.fileName
|
|
|
});
|
|
|
}
|
|
|
+ const checkTextOverflow = () => {
|
|
|
+ nextTick(() => {
|
|
|
+ const instance = getCurrentInstance();
|
|
|
+ // 安全保护
|
|
|
+ if (!instance || !instance.proxy) {
|
|
|
+ // 备用方案:全局查询(要求元素 class 唯一)
|
|
|
+ let taskDescAllHeight = 0,
|
|
|
+ taskDescHeight = 0;
|
|
|
+ const query = uni.createSelectorQuery();
|
|
|
+ query.select('.task_desc_all').boundingClientRect((rect) => {
|
|
|
+ taskDescAllHeight = rect?.height || 0;
|
|
|
+ });
|
|
|
+ query.select('.task_desc').boundingClientRect((rect) => {
|
|
|
+ taskDescHeight = rect?.height || 0;
|
|
|
+ });
|
|
|
+ query.exec(() => {
|
|
|
+ // 所有回调执行完毕后触发
|
|
|
+ state.showExpandBtn = taskDescAllHeight > taskDescHeight + 1;
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let taskDescAllHeight = 0,
|
|
|
+ taskDescHeight = 0;
|
|
|
+ const query = uni.createSelectorQuery().in(instance.proxy);
|
|
|
+ query.select('.task_desc_all').boundingClientRect((rect) => {
|
|
|
+ taskDescAllHeight = rect?.height || 0;
|
|
|
+ });
|
|
|
+ query.select('.task_desc').boundingClientRect((rect) => {
|
|
|
+ taskDescHeight = rect?.height || 0;
|
|
|
+ });
|
|
|
+ query.exec(() => {
|
|
|
+ // 所有回调执行完毕后触发
|
|
|
+ state.showExpandBtn = taskDescAllHeight > taskDescHeight + 1;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
// 展开收起切换
|
|
|
const toggleExpand = () => {
|
|
|
state.isExpand = !state.isExpand;
|
|
|
@@ -549,12 +586,16 @@
|
|
|
<style scoped lang="scss">
|
|
|
.page_body{
|
|
|
height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ min-height: auto;
|
|
|
}
|
|
|
.page_content_height{
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
width: 100%;
|
|
|
- height: calc(100% - 240rpx);
|
|
|
+ // height: calc(100% - 240rpx);
|
|
|
+ flex:1;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
.page_content {
|
|
|
@@ -838,13 +879,17 @@
|
|
|
}
|
|
|
}
|
|
|
.page_foot{
|
|
|
- position: fixed;
|
|
|
+ // position: fixed;
|
|
|
+ // display: flex;
|
|
|
+ // align-items: center;
|
|
|
+ // left: 0;
|
|
|
+ // right: 0;
|
|
|
+ // bottom: 0;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
+ width: 100%;
|
|
|
padding: 0 24rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
height: 130rpx;
|
|
|
background-color: #FFFFFF;
|
|
|
gap: 32rpx;
|