From c5bd659eda2a25c0a336a79521c9a044b7ed443c Mon Sep 17 00:00:00 2001 From: song Date: Fri, 19 Nov 2021 14:40:47 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=A7=A3=E5=86=B3error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +- .../Evaluated/components/EvaluatedDetail.vue | 13 +- .../Evaluated/components/ProcessRestore.vue | 9 + .../Evaluated/components/ResultLevel.vue | 26 +- src/components/TimeLine/TimeLine.vue | 14 +- src/components/TimeLine/component/TimeBox.vue | 113 +++-- src/components/UCharts/UCharts.vue | 6 +- src/pagesProject/project/project copy.vue | 439 ------------------ src/pagesProject/project/project.vue | 30 +- src/store/task/mutations.js | 2 +- 10 files changed, 126 insertions(+), 529 deletions(-) create mode 100644 src/components/Evaluated/components/ProcessRestore.vue delete mode 100644 src/pagesProject/project/project copy.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b60933..7d69f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-11-18) +# 0.1.0 (2021-11-19) ### 🌟 新功能 范围|描述|commitId @@ -60,6 +60,7 @@ - | 添加引导页 | [4293f5a](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/4293f5a) - | 添加时间轴上下滚动 | [2b81bbc](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/2b81bbc) - | 添加药物使用记录界面 | [425cb63](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/425cb63) + - | 添加训练计划详情 | [49f64ca](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/49f64ca) - | 添加设置界面 | [7ca0c59](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/7ca0c59) - | 添加输入工具码界面 | [8c120bc](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/8c120bc) - | 添加项目排序 | [a0b491b](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/a0b491b) diff --git a/src/components/Evaluated/components/EvaluatedDetail.vue b/src/components/Evaluated/components/EvaluatedDetail.vue index ad3049e..63516d0 100644 --- a/src/components/Evaluated/components/EvaluatedDetail.vue +++ b/src/components/Evaluated/components/EvaluatedDetail.vue @@ -29,8 +29,14 @@ - - 过程记录 + + 训练结果 + + + + 过程还原 + + @@ -38,9 +44,10 @@ diff --git a/src/components/Evaluated/components/ProcessRestore.vue b/src/components/Evaluated/components/ProcessRestore.vue new file mode 100644 index 0000000..2c78a38 --- /dev/null +++ b/src/components/Evaluated/components/ProcessRestore.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/components/Evaluated/components/ResultLevel.vue b/src/components/Evaluated/components/ResultLevel.vue index d706746..d75bff6 100644 --- a/src/components/Evaluated/components/ResultLevel.vue +++ b/src/components/Evaluated/components/ResultLevel.vue @@ -1,6 +1,6 @@ @@ -31,10 +31,6 @@ export default { data() { return { - // trains: { - // finishResult: 3, - // finishTime: 15, - // }, levels: [ { value: 0.5, @@ -74,8 +70,10 @@ export default { query .selectAll('.box') .boundingClientRect(data => { - this.width = data[0].width; - this.setLevel(); + if (data && data.length) { + this.width = data[0].width; + this.setLevel(); + } }) .exec(); }); @@ -160,10 +158,10 @@ export default { } .num { - width: 40rpx; - height: 40rpx; + width: 30rpx; + height: 30rpx; text-align: center; - line-height: 40rpx; + line-height: 30rpx; border-radius: 50%; border: 1px solid $uni-bg-color-blue; color: $uni-bg-color-blue; diff --git a/src/components/TimeLine/TimeLine.vue b/src/components/TimeLine/TimeLine.vue index 9fef7ed..328c0d1 100644 --- a/src/components/TimeLine/TimeLine.vue +++ b/src/components/TimeLine/TimeLine.vue @@ -45,6 +45,7 @@ export default { // 滚动 scroll(e) { + console.log('e: ', e); this.top = e.detail.scrollTop; this.setShrink(this.top > this.scrollTop); this.setScrollTop(this.top); @@ -55,7 +56,7 @@ export default { if (!this.tasks || !this.tasks.length || this.showSkeleton) return; let startTime = null; if (this.tasks[0].length) { - startTime = this.tasks[0][0].planStart - 0; + startTime = this.tasks[0].array[0].planStart - 0; } else { startTime = this.tasks[0].planStart - 0; } @@ -77,7 +78,7 @@ export default { let index = null; let itemIndex = null; for (let i = 0; i < this.tasks.length; i++) { - const task = this.tasks[i]; + const task = this.tasks[i].array; if (task && task.length) { index = i; itemIndex = task.findIndex(item => item.detailId); @@ -86,7 +87,7 @@ export default { } } } - timeNode = this.tasks[index][itemIndex].planStart - 0; + timeNode = this.tasks[index].array[itemIndex].planStart - 0; } const upQuery = { timeNode, @@ -102,8 +103,8 @@ export default { if (!this.tasks || !this.tasks.length || this.showSkeleton) return; const { tasks, timeGranularity } = this; let startTime = null; - if (tasks[tasks.length - 1].length) { - startTime = tasks[tasks.length - 1][0].planStart - 0; + if (tasks[tasks.length - 1].array && tasks[tasks.length - 1].array.length) { + startTime = tasks[tasks.length - 1].array[0].planStart - 0; } else { startTime = tasks[tasks.length - 1].planStart - 0; } @@ -157,7 +158,7 @@ export default { // 没有本地记录的taskId // 找到当前时间基准线的任务id 记录 并滚动到当前时间基准线 for (let i = 0; i < this.tasks.length; i++) { - const task = this.tasks[i]; + const task = this.tasks[i].array; if (task && task.length) { item = task.find(item => this.$moment(+item.planStart).isSame(this.timeNode, this.timeGranularity)); if (item) { @@ -165,6 +166,7 @@ export default { } } } + console.log('跳转: ', `a${item.id}`); item && this.setScrollToTaskId(`a${item.id}`); // 有这个task 就记录他的id // const task = this.tasks.find(item => this.$moment(+item.planStart).isSame(this.timeNode, this.timeGranularity)); // task && this.setScrollToTaskId(`a${task.id}`); // 有这个task 就记录他的id diff --git a/src/components/TimeLine/component/TimeBox.vue b/src/components/TimeLine/component/TimeBox.vue index 9fd93e9..91f2416 100644 --- a/src/components/TimeLine/component/TimeBox.vue +++ b/src/components/TimeLine/component/TimeBox.vue @@ -3,12 +3,65 @@ + AAA + + + + + + {{ $moment(+task.array[0].planStart).format(startTimeFormat) }} + {{ $moment(+task.array[0].planStart).format('D日') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - {{ $moment(+task.planStart).format(startTimeFormat) }} + {{ $moment(+task.planStart).format(startTimeFormat) }} {{ $moment(+task.planStart).format('D日') }} @@ -53,58 +106,6 @@ - - - - - - {{ $moment(+task[0].planStart).format(startTimeFormat) }} - {{ $moment(+task[0].planStart).format('D日') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -131,11 +132,9 @@ export default { }; }, - watch: {}, - computed: { ...mapState('role', ['roleId']), - ...mapState('task', ['timeUnit', 'tasks', 'taskLoading', 'showSkeleton', 'isEvaluated']), + ...mapState('task', ['timeUnit', 'tasks', 'taskLoading', 'showSkeleton', 'isEvaluated', 'scrollToTaskId']), ...mapGetters('task', ['startTimeFormat']), }, diff --git a/src/components/UCharts/UCharts.vue b/src/components/UCharts/UCharts.vue index ef96e64..ff90657 100644 --- a/src/components/UCharts/UCharts.vue +++ b/src/components/UCharts/UCharts.vue @@ -101,8 +101,8 @@ export default { }, touchStart(e) { canvases[this.canvasId].showToolTip(e, { - format: function (item, category) { - return category + ' ' + item.name + ':' + item.data; + format: function (item) { + return item.data; }, }); canvases[this.canvasId].scrollStart(e); @@ -114,7 +114,7 @@ export default { canvases[this.canvasId].scrollEnd(e); }, error(e) { - console.log(e); + console.log('e: ', e); }, }, }; diff --git a/src/pagesProject/project/project copy.vue b/src/pagesProject/project/project copy.vue deleted file mode 100644 index 26f75b7..0000000 --- a/src/pagesProject/project/project copy.vue +++ /dev/null @@ -1,439 +0,0 @@ -