From a63dfa472d7fd87fec5e3170936a7cc1cf746606 Mon Sep 17 00:00:00 2001
From: xuesinan <1404152492@qq.com>
Date: Wed, 2 Mar 2022 18:08:36 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A1=B6=E9=83=A8=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=E6=A0=8F=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.md | 1 +
components/Projects/ProjectItem.vue | 2 +-
components/Roles/Roles.vue | 4 +++-
components/Upload/Upload.vue | 33 +++++++++++++++++------------
hooks/project/useGetTasks.js | 2 +-
pages.json | 3 +--
pages/business/business.vue | 16 ++++++++++----
pages/index/index.vue | 1 +
utils/cacheAndRequest.js | 1 -
9 files changed, 39 insertions(+), 24 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d0e161..c95178d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -89,6 +89,7 @@
- | 更新代码 | [aa6093a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/aa6093a)
- | 交付物相关细节调整 | [87ae00d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/87ae00d)
- | 删除打印 | [3e75576](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3e75576)
+ - | 添加注释 | [42b31a7](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/42b31a7)
- | 细节调整 | [a43fa83](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a43fa83)
- | 细节调整 | [ebf678f](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf678f)
- | 细节调整 | [759ef52](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/759ef52)
diff --git a/components/Projects/ProjectItem.vue b/components/Projects/ProjectItem.vue
index a247614..00bc609 100644
--- a/components/Projects/ProjectItem.vue
+++ b/components/Projects/ProjectItem.vue
@@ -19,7 +19,7 @@
工作台
-
+
{{ item.remindNum > 99 ? '99+' : item.remindNum }}
diff --git a/components/Roles/Roles.vue b/components/Roles/Roles.vue
index 6f42a9d..354622e 100644
--- a/components/Roles/Roles.vue
+++ b/components/Roles/Roles.vue
@@ -103,9 +103,11 @@ function scroll(e) {
// 设置滚动位置
function setCurrentRole(index) {
const query = uni.createSelectorQuery().in(this);
+ console.log('ppppppp', query);
query
.selectAll('.tab-children')
.boundingClientRect(res => {
+ console.log('oooooooooo', res);
res.forEach(item => {
data.tabList.push({ width: item.width });
});
@@ -154,7 +156,7 @@ function changeRole(id, index) {
data.firstClickTime = new Date().getTime();
// 清除多余的script
- clearPluginScript();
+ // clearPluginScript();
nextTick(() => {
store.commit('role/setRoleId', id);
store.commit('role/setRoleIndex', index);
diff --git a/components/Upload/Upload.vue b/components/Upload/Upload.vue
index fe42345..4e65fbd 100644
--- a/components/Upload/Upload.vue
+++ b/components/Upload/Upload.vue
@@ -1,8 +1,8 @@
-
@@ -14,11 +14,16 @@
import { useStore } from 'vuex';
import Config from '@/common/js/config.js';
- const emit = defineEmits(['success', 'error']);
-
const store = useStore();
- const userId = computed(() => store.getters['user/userId']);
- const list = ref([]);
+ const list = ref([]);
+ const emit = defineEmits(['success', 'error']);
+ const user = computed(() => store.state.user.user);
+ const userJson = uni.$storage.getStorageSync('user');
+
+ if (userJson) {
+ const user = JSON.parse(userJson);
+ store.commit('user/setUser', user);
+ }
getList();
@@ -41,13 +46,13 @@
const res = await uni.$u.api.import();
// 导入WBS成功后
// 直接打开导入的项目
- // emit('success');
- // const { apiUrl } = Config;
- // const defaultwbs = `${apiUrl}/defaultwbs`;
- // res.url && (defaultwbs = res.url);
- // setTimeout(() => {
- // uni.navigateTo({ url: `/pages/project/project?u=${userId.value}&p=${res.id}&pname=${res.pname}&url=${res.url}` });
- // }, 2000);
+ emit('success');
+ const { apiUrl } = Config;
+ const defaultwbs = `${apiUrl}/defaultwbs`;
+ res.url && (defaultwbs = res.url);
+ setTimeout(() => {
+ uni.navigateTo({ url: `/pages/project/project?u=${user.value.id}&p=${res.id}&pname=${res.name}&url=${encodeURIComponent(res.url)}` });
+ }, 2000);
} catch (error) {
console.error('error: ', error);
emit('error', error);
diff --git a/hooks/project/useGetTasks.js b/hooks/project/useGetTasks.js
index 63dc04c..dd4b386 100644
--- a/hooks/project/useGetTasks.js
+++ b/hooks/project/useGetTasks.js
@@ -79,7 +79,7 @@ export default function useGetTasks() {
arr[index].realTasks = [...realTasks.value];
store.commit('task/setAllTasks', arr);
store.commit('task/setCurrRoleRealTasks', arr[index].realTasks); // 设置当前角色的真实任务数据
-
+
// 如果第一次渲染但没有空数据则加载空数据
if (!tasks.value || !tasks.value.length && timeLineType.value === 1) {
setNextPlaceholderTasks(params);
diff --git a/pages.json b/pages.json
index 313cecc..bfd8636 100644
--- a/pages.json
+++ b/pages.json
@@ -21,8 +21,7 @@
{
"path": "pages/project/project",
"style": {
- "navigationStyle": "custom",
- "navigationBarTextStyle": "white"
+ "navigationStyle": "custom"
}
},
{
diff --git a/pages/business/business.vue b/pages/business/business.vue
index 6d07907..25cf3de 100644
--- a/pages/business/business.vue
+++ b/pages/business/business.vue
@@ -22,9 +22,19 @@