Browse Source

fix: 切换项目存储的任务id未清空

test2
xuesinan 3 years ago
parent
commit
77fe17f9f7
  1. 1
      CHANGELOG.md
  2. 1
      components/Projects/ProjectItem.vue
  3. 2
      components/TimeLine/component/TimeBox.vue
  4. 2
      config/time.js
  5. 28
      pages/index/index.vue

1
CHANGELOG.md

@ -125,6 +125,7 @@
- | 退出登录 | [6922f24](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/6922f24)
- | 向上查向下查 | [1933e1b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1933e1b)
- | 项目列表排序 | [ad0ce75](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ad0ce75)
- | 小红点修复 | [ef33187](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ef33187)
- | 修复一些内容 | [3cdb1ce](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3cdb1ce)
- | 修复app打开详情页失败的问题 | [ecb943e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ecb943e)
- | 修复bug | [a55d08e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a55d08e)

1
components/Projects/ProjectItem.vue

@ -115,6 +115,7 @@ function toWorkbench() {
function openProject(project) {
store.commit('task/clearTasks'); //
store.commit('task/clearRealTasks'); //
store.commit('socket/setCurrLocationTaskId', '');
store.commit('task/setUpNextPage', 1);
store.commit('task/setDownNextPage', 1);
store.commit('task/setTimeLineType', 1);

2
components/TimeLine/component/TimeBox.vue

@ -8,7 +8,7 @@
<view class="flex items-center justify-between flex-1 ml-2 task-column">
<view class="relative">
<view v-if="task.process !== 4">{{ $moment(+task.planStart).format(startTimeFormat) }}</view>
<view v-else>{{ $moment(+task.planStart).format('D') }}</view>
<view v-else>{{ $moment(+task.planStart).format('M/D') }}</view>
<u-badge :is-dot="true" style="transform: translate3d(2em, -1em, 0)" v-show="task.remindNum > 0"></u-badge>
</view>

2
config/time.js

@ -5,7 +5,7 @@ export default {
{ id: 1, value: '秒', format: 'x', cycle: 'YY-M-D HH:mm:ss', granularity: 'second' },
{ id: 2, value: '分', format: 'ss', cycle: 'YY-M-D HH:mm', granularity: 'minute' },
{ id: 3, value: '时', format: 'mm', cycle: 'YY-M-D HH时', granularity: 'hour' },
{ id: 4, value: '天', format: 'D HH:mm', cycle: 'YY-M-D', granularity: 'day' },
{ id: 4, value: '天', format: 'M/D HH:mm', cycle: 'YY-M-D', granularity: 'day' },
{ id: 5, value: '周', format: 'D日 HH:mm', cycle: '', granularity: 'week' },
{ id: 6, value: '月', format: 'D日 H:m', cycle: 'YYYY年', granularity: 'month' },
{ id: 7, value: '季度', format: '', cycle: 'YYYY年', granularity: 'quarter' },

28
pages/index/index.vue

@ -12,7 +12,6 @@
<Guide v-else-if="!firstOpenApp"></Guide>
<!-- #endif -->
<!-- <view class="flex flex-col h-full bg-gray-50" @click="openAuth"> -->
<!-- #ifdef APP-PLUS -->
<theme v-if="!isOpenApp && firstOpenApp" class="relative flex flex-col h-full bg-gray-50">
<!-- #endif -->
@ -20,7 +19,6 @@
<theme class="relative flex flex-col h-full bg-gray-50">
<!-- #endif -->
<view class="relative">
<!-- <view class="relative" @touchmove="onMove"> -->
<!-- 日历 -->
<!-- <Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" /> -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" />
@ -60,7 +58,6 @@
const data = reactive({
calendar: null,
// days: [],
});
const user = uni.$storage.getStorageSync('user');
@ -108,38 +105,13 @@
//
const onUploadSuccess = () => {
uni.$ui.showToast('导入成功,即将打开新项目', 3000);
// uTips.show({
// title: '',
// type: 'success',
// duration: '3000',
// });
};
//
const onUploadError = error => {
uni.$ui.showToast('导入失败', 6000);
// uTips.show({
// title: error || '',
// type: 'error',
// duration: '6000',
// });
};
// /
// function onMove(event) {
// const y = event.changedTouches[0].pageY;
// const prevY = 0;
// if (y - prevY > 0) {
// // weekMode=true weekMode=false
// data.calendar.weekMode && (data.calendar.weekMode = false);
// } else if (y - prevY < 0) {
// // weekMode=false weekMode=true
// !data.calendar.weekMode && (data.calendar.weekMode = true);
// }
// prevY = y;
// data.calendar.initDate();
// }
async function toLogin() {
if (!userInfo.value) {
uni.navigateTo({

Loading…
Cancel
Save