From 87b20fd1f861e1b2dfc3e21b17825261227907a7 Mon Sep 17 00:00:00 2001 From: song Date: Thu, 12 Aug 2021 11:13:46 +0800 Subject: [PATCH 01/11] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=B0=8F?= =?UTF-8?q?=E7=BA=A2=E7=82=B9=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- src/components/Calendar/Calendar.vue | 15 ++++++++++----- src/components/Tips/Tips.vue | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e78cb32..fcfccc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-08-11) +# 0.1.0 (2021-08-12) ### 🌟 新功能 范围|描述|commitId @@ -21,6 +21,7 @@ - | 定期任务面板骨架屏添加 | [b2698c0](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/b2698c0) 富文本插件 | 富文本插件demo测试 | [ed3d644](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/ed3d644) - | 导入wbs | [1224fcb](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/1224fcb) + - | 导入项目,更新项目 | [5e06adf](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/5e06adf) - | 导入项目后提示并打开项目详情页 | [410f527](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/410f527) - | 引入dayjs | [29b8b93](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/29b8b93) - | 提交到本地 | [9cbe411](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/9cbe411) diff --git a/src/components/Calendar/Calendar.vue b/src/components/Calendar/Calendar.vue index 8dcd9d7..a99de7d 100644 --- a/src/components/Calendar/Calendar.vue +++ b/src/components/Calendar/Calendar.vue @@ -112,9 +112,10 @@ export default { watch: { dotList: function (newvalue) { const days = this.days.slice(0); + const index = days.findIndex(day => day.show); days.forEach((day, i) => { newvalue.forEach((item, j) => { - if (i === j) { + if (i - index === j) { day.info = item; } }); @@ -224,14 +225,18 @@ export default { if (current - pre === 1 || current - pre === -2) { // 下一个月 或 下一周 this.daysNext(); - this.start = this.$t.time.add(this.start, 1, 'month').valueOf(); - this.end = this.$t.time.add(this.end, 1, 'month').valueOf(); + const arr = this.days.filter(s => s.show); + const end = `${arr[arr.length - 1].fullDate} 23:59:59`; + this.start = this.$moment(arr[0].fullDate).valueOf(); + this.end = this.$moment(end).valueOf(); this.$emit('handleFindPoint', this.start, this.end); } else { // 上一个月 或 上一周 this.daysPre(); - this.start = this.$t.time.add(this.start, -1, 'month').valueOf(); - this.end = this.$t.time.add(this.end, -1, 'month').valueOf(); + const arr = this.days.filter(s => s.show); + const end = `${arr[arr.length - 1].fullDate} 23:59:59`; + this.start = this.$moment(arr[0].fullDate).valueOf(); + this.end = this.$moment(end).valueOf(); this.$emit('handleFindPoint', this.start, this.end); } }, diff --git a/src/components/Tips/Tips.vue b/src/components/Tips/Tips.vue index 4c1aa27..36f8ac7 100644 --- a/src/components/Tips/Tips.vue +++ b/src/components/Tips/Tips.vue @@ -77,7 +77,7 @@ export default { this.$t.ui.showToast('项目结束'); } this.tip.show = false; - location.reload(); + // location.reload(); // this.$router.go(0); } catch (error) { console.error(error); From 7d3b90680134a5430bc8c66109bec55ececea8b6 Mon Sep 17 00:00:00 2001 From: song Date: Thu, 12 Aug 2021 11:25:14 +0800 Subject: [PATCH 02/11] =?UTF-8?q?fix:=20=E8=A7=92=E8=89=B2=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=8A=B6=E6=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/components/Roles/Roles.vue | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcfccc9..c78c1b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ - | 下拉加载定期任务传参,时间格式化修改 | [0b95a0e](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/0b95a0e) - | 任务开始时间延迟插件 | [992a313](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/992a313) - | 修改main | [749ae9a](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/749ae9a) + - | 修改小红点传参 | [87b20fd](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/87b20fd) - | 修改报错 | [531c14d](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/531c14d) - | 修改接口路径 | [df6acf2](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/df6acf2) - | 修改角色栏组件 | [a54c601](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/a54c601) diff --git a/src/components/Roles/Roles.vue b/src/components/Roles/Roles.vue index aebf966..40f0ff8 100644 --- a/src/components/Roles/Roles.vue +++ b/src/components/Roles/Roles.vue @@ -131,13 +131,13 @@ export default { // 设置文字颜色 setColor(mine, id) { const { roleId } = this; - if (mine === '1' && roleId === id) { + if (mine === 1 && roleId === id) { return 'default-tab-choice'; } - if (mine === '1' && roleId !== id) { + if (mine === 1 && roleId !== id) { return 'default-tab-item'; } - if (mine === '0' && roleId === id) { + if (mine === 0 && roleId === id) { return 'tab-choice'; } }, From 438d448497b95f71b12b55c5a9307769a3a6c051 Mon Sep 17 00:00:00 2001 From: wally <18603454788@163.com> Date: Thu, 12 Aug 2021 11:30:26 +0800 Subject: [PATCH 03/11] =?UTF-8?q?fix:=20=E5=88=87=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=A1=B9=E7=9B=AE=E8=A7=92=E8=89=B2=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=BF=80=E6=B4=BB=E7=8A=B6=E6=80=81=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 37 ++---------------- src/components/Roles/Roles.vue | 39 +++++++------------ .../TimeLine/component/TimeStatus.vue | 16 +++++--- src/components/Title/Title.vue | 15 ++++--- 4 files changed, 37 insertions(+), 70 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f8015e..8f8a689 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-08-11) +# 0.1.0 (2021-08-12) ### 🌟 新功能 范围|描述|commitId @@ -14,6 +14,7 @@ task status | 任务状态切换未完 | 7ffd135 - | ws storage | 21b3a06 - | 上传逻辑变化 | 3ff1dc2 + - | 任务状态时间显示 | 56f5183 - | 任务进行中状态数字 | 27b7326 - | 全局插件及默认插件位置修改 | 6c80d08 - | 向右箭头图标变化 | 8e9ca55 @@ -22,6 +23,7 @@ - | 定期任务面板骨架屏添加 | b2698c0 富文本插件 | 富文本插件demo测试 | ed3d644 - | 导入wbs | 1224fcb + - | 导入项目,更新项目 | 5e06adf - | 导入项目后提示并打开项目详情页 | 410f527 - | 引入dayjs | 29b8b93 - | 提交到本地 | 9cbe411 @@ -107,38 +109,6 @@ - | 角色栏修改 | 19228d6 - | 解决时间轴报错 | da1eece - | 骨架屏替换 | e9fdd71 - ID1000343 | 解决向下预加载查询参数时间没+1颗粒度;以及滚动加载颗粒度写死的问题 | [940603a](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/940603a), closes [#ID1000343](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/issues/ID1000343) - plugin | 插件解析机制完善 | [0f5a27d](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/0f5a27d) - project title | 项目标题修改; 切换角色移除script | [5c20017](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/5c20017) - roles | 修复默认显示不是我的角色的问题 | [b69f94f](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/b69f94f) - role | 切换角色的逻辑修正完善 | [4ae534f](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/4ae534f) - task任务逻辑完善 | 减少初始global及regular的不必要请求 | [bd4bd38](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/bd4bd38) - - | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/4090d89) - - | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/d533a01) - - | 下拉加载定期任务传参,时间格式化修改 | [0b95a0e](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/0b95a0e) - - | 任务开始时间延迟插件 | [992a313](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/992a313) - - | 修改main | [749ae9a](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/749ae9a) - - | 修改报错 | [531c14d](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/531c14d) - - | 修改接口路径 | [df6acf2](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/df6acf2) - - | 修改角色栏组件 | [a54c601](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/a54c601) - - | 切换日历时查询小红点 | [7091789](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/7091789) - - | 定期任务接口 | [aa4981c](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/aa4981c) - - | 定期任务插件 | [92b3254](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/92b3254) - - | 定期任务未加载时,显示空的时间轴并能上下滑动 | [ce38093](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/ce38093) - - | 平车演示临时去掉项目快捷方式的toast提示 | [e0b2c23](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/e0b2c23) - - | 手动展开日常任务 | [0a4a622](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/0a4a622) - - | 提示信息显示bug及日常任务收缩问题 | [f2f06c5](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/f2f06c5) - - | 插件bug解决 | [41257eb](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/41257eb) - - | 日常任务html数据查验 | [880ce5c](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/880ce5c) - - | 日常任务插件遍历时的key值修改 | [cd26285](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/cd26285) - - | 日常任务插件面板高度修改 | [249f9e4](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/249f9e4) - - | 时间轴上下滑动 | [4d0ae46](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/4d0ae46) - - | 时间轴上下滚动数据加载bug修改 | [e82ede4](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/e82ede4) - - | 时间轴插件 | [225d3cc](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/225d3cc) - - | 时间轴骨架屏修改 | [ca78d02](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/ca78d02) - - | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/19228d6) - - | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/da1eece) - - | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/ccsens_fe/TALL-MUI-3/commits/e9fdd71) ### 📝 文档 @@ -207,3 +177,4 @@ - | style:index | 978f272 - | !2 基础模板v1.1.0 | f5e61dd - | init | c0f1deb + diff --git a/src/components/Roles/Roles.vue b/src/components/Roles/Roles.vue index aebf966..a052af7 100644 --- a/src/components/Roles/Roles.vue +++ b/src/components/Roles/Roles.vue @@ -3,12 +3,14 @@ + {{ item.name }} + @@ -20,25 +22,13 @@ export default { name: 'Roles', data() { return { - tabIndex: 0, //当前访问的 index 默认为0 - tabList: [], //tab dom节点集合 - scrollLeft: 0, //scrollview需要滚动的距离 + tabIndex: 0, // 当前访问的 index 默认为0 + tabList: [], // tab dom节点集合 + scrollLeft: 0, // scrollview需要滚动的距离 loading: false, // 是否显示骨架屏组件 roles: [ - { - id: 1, - name: '项目经理', - mine: 0, - pm: 1, - sequence: 1, - }, - { - id: 2, - name: '运维', - mine: 0, - pm: 0, - sequence: 2, - }, + { id: 1, name: '项目经理', mine: 0, pm: 1, sequence: 1 }, + { id: 2, name: '运维', mine: 0, pm: 0, sequence: 2 }, ], }; }, @@ -131,15 +121,12 @@ export default { // 设置文字颜色 setColor(mine, id) { const { roleId } = this; - if (mine === '1' && roleId === id) { - return 'default-tab-choice'; - } - if (mine === '1' && roleId !== id) { - return 'default-tab-item'; - } - if (mine === '0' && roleId === id) { - return 'tab-choice'; - } + // 是 我的角色 && 当前展示 + if (+mine === 1 && roleId === id) return 'default-tab-choice'; + // 是 我的角色 && 当前不展示 + if (+mine === 1 && roleId !== id) return 'default-tab-item'; + // 不是我的 && 当前展示 + if (+mine === 0 && roleId === id) return 'tab-choice'; }, }, }; diff --git a/src/components/TimeLine/component/TimeStatus.vue b/src/components/TimeLine/component/TimeStatus.vue index c5c7fde..d38f4a7 100644 --- a/src/components/TimeLine/component/TimeStatus.vue +++ b/src/components/TimeLine/component/TimeStatus.vue @@ -2,7 +2,7 @@ 0) { num = milliseconds; time = 16; + } else { + time = null; } - this.timer = setTimeout(() => { - this.computeDurationText(); - }, time); + console.log('time', time); // DEBUG: + this.$nextTick(() => { + if (!time) return; + this.timer = setTimeout(() => { + this.computeDurationText(); + }, time); + }); + return num; } catch (error) { console.error('🚀 ~ file: TimeStatus.vue ~ line 174 ~ computeDurationText ~ error', error); diff --git a/src/components/Title/Title.vue b/src/components/Title/Title.vue index cd3075b..b29f6af 100644 --- a/src/components/Title/Title.vue +++ b/src/components/Title/Title.vue @@ -7,19 +7,22 @@ - + diff --git a/src/components/Roles/Roles.vue b/src/components/Roles/Roles.vue index a052af7..f70bf68 100644 --- a/src/components/Roles/Roles.vue +++ b/src/components/Roles/Roles.vue @@ -98,7 +98,7 @@ export default { this.setDailyTasks([]); // 到顶的标志复位 // 到底的标志复位 - this.clearEndFlag(); + // this.clearEndFlag(); }); } catch (error) { console.error('role.vue changeRole error: ', error); diff --git a/src/components/TimeLine/TimeLine.vue b/src/components/TimeLine/TimeLine.vue index 9b85f91..d754930 100644 --- a/src/components/TimeLine/TimeLine.vue +++ b/src/components/TimeLine/TimeLine.vue @@ -14,9 +14,7 @@ > - - @@ -56,32 +54,38 @@ export default { // 滚动到顶部 async handleScrollTop() { - if (this.topEnd) return; const startTime = this.tasks[0].planStart - 0; - if (this.tasks[0].plugins && this.tasks[0].plugins.length === 0 && !this.topEnd) { + if ((this.tasks[0].plugins && this.tasks[0].plugins.length === 0) || this.topEnd) { // 没有数据时 自动加载数据 - console.warn('没有数据时: '); + console.warn( + '滚动到顶部没有数据时: ', + this.$moment(+this.$t.time.add(startTime, -1, 'day').valueOf()).format('YYYY-MM-DD HH:mm:ss'), + ); const addTasks = [ { panel: {}, plugins: [], + process: 4, planStart: this.$t.time.add(startTime, -3, 'day').valueOf(), }, { panel: {}, plugins: [], + process: 4, planStart: this.$t.time.add(startTime, -2, 'day').valueOf(), }, { panel: {}, plugins: [], + process: 4, planStart: this.$t.time.add(startTime, -1, 'day').valueOf(), }, ]; + this.setUpTasks([...addTasks.concat(this.tasks)]); } else { // 有数据时 - console.warn('有数据时: '); + console.warn('滚动到顶部有数据时: '); const upQuery = { timeNode: startTime, queryType: 0, @@ -93,25 +97,34 @@ export default { // 滚动到底部 async handleScrollBottom() { - if (this.bottomEnd) return; const { tasks, timeGranularity } = this; + console.log('timeGranularity: ', timeGranularity); const startTime = tasks[tasks.length - 1].planStart - 0; - if (tasks[0].plugins && tasks[0].plugins.length === 0 && !this.topEnd) { + console.log('startTime: ', startTime); + if ((tasks[0].plugins && tasks[0].plugins.length === 0) || this.bottomEnd) { // 没有数据时 自动加载数据 + console.warn( + '滚动到底部没有数据时: ', + this.$moment(+startTime).format('YYYY-MM-DD HH:mm:ss'), + this.$moment(+this.$t.time.add(startTime, 1, timeGranularity).valueOf()).format('YYYY-MM-DD HH:mm:ss'), + ); const addTasks = [ { panel: {}, plugins: [], + process: 4, planStart: this.$t.time.add(startTime, 1, timeGranularity).valueOf(), }, { panel: {}, plugins: [], + process: 4, planStart: this.$t.time.add(startTime, 2, timeGranularity).valueOf(), }, { panel: {}, plugins: [], + process: 4, planStart: this.$t.time.add(startTime, 3, timeGranularity).valueOf(), }, ]; diff --git a/src/components/TimeLine/component/TimeBox.vue b/src/components/TimeLine/component/TimeBox.vue index 5fd049f..65f8f82 100644 --- a/src/components/TimeLine/component/TimeBox.vue +++ b/src/components/TimeLine/component/TimeBox.vue @@ -1,18 +1,18 @@