Browse Source

fix: 请求到任务时,自动滚动功能修改

carbasic
aBin 4 years ago
parent
commit
a1e074269e
  1. 3
      CHANGELOG.md
  2. 6
      src/components/Experience/Experience.vue
  3. 1
      src/components/TimeLine/TimeLine.vue
  4. 17
      src/pages/project/project.vue

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-10-10) # 0.1.0 (2021-10-12)
### 🌟 新功能 ### 🌟 新功能
范围|描述|commitId 范围|描述|commitId
@ -105,6 +105,7 @@
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | 1.时间轴数据渲染 2.时间基准线 | [d643af2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d643af2) - | 1.时间轴数据渲染 2.时间基准线 | [d643af2](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/d643af2)
- | 暴风眼相关修改 | [6e35490](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6e35490)
- | 插件bug解决 | [41257eb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/41257eb) - | 插件bug解决 | [41257eb](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/41257eb)
- | 初始展示角色修改 | [2ac4053](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/2ac4053) - | 初始展示角色修改 | [2ac4053](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/2ac4053)
- | 调查问卷未读数计算修改 | [69677ce](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/69677ce) - | 调查问卷未读数计算修改 | [69677ce](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/69677ce)

6
src/components/Experience/Experience.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="role-box"> <view class="role-box">
<img class="role-img" src="https://www.tall.wiki/staticrec/img/qcp-role.png" alt="" /> <img class="role-img" src="https://www.tall.wiki/staticrec/img/qcp-role.png" alt="" />
<view class="w-full change-role-btn flex flex-nowrap justify-between"> <view class="change-role-btn flex flex-row flex-nowrap">
<view <view
v-for="(item, index) in roles" v-for="(item, index) in roles"
:key="index" :key="index"
@ -105,12 +105,15 @@ export default {
position: relative; position: relative;
} }
.change-role-btn { .change-role-btn {
width: 100%;
position: absolute; position: absolute;
overflow-x: auto;
bottom: 12px; bottom: 12px;
left: 0; left: 0;
padding: 0 12px; padding: 0 12px;
} }
.role-btn { .role-btn {
flex-shrink: 0;
border: 1px solid #fff; border: 1px solid #fff;
height: 32px; height: 32px;
text-align: center; text-align: center;
@ -118,6 +121,7 @@ export default {
font-size: 12px; font-size: 12px;
color: #709dff; color: #709dff;
padding: 0 8px; padding: 0 8px;
margin: 0 8px;
border-radius: 12px; border-radius: 12px;
} }
.avtive-btn { .avtive-btn {

1
src/components/TimeLine/TimeLine.vue

@ -110,6 +110,7 @@ export default {
this.$t.storage.setStorageSync('taskId', ''); // this.$t.storage.setStorageSync('taskId', ''); //
} else { } else {
const item = this.tasks.find(task => task.detailId); const item = this.tasks.find(task => task.detailId);
console.log(this.tasks);
if (item) { if (item) {
this.setScrollToTaskId(`a${item.id}`); this.setScrollToTaskId(`a${item.id}`);
} else { } else {

17
src/pages/project/project.vue

@ -79,6 +79,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
console.log('this.$route.query: ', this.$route);
if (options.share && options.share === '1') { if (options.share && options.share === '1') {
this.shareInit(options); this.shareInit(options);
} else { } else {
@ -177,13 +178,13 @@ export default {
await this.getInitTasks(); // await this.getInitTasks(); //
// //
let timer = null; // let timer = null;
timer = setInterval(() => { // timer = setInterval(() => {
if (this.showScrollTo) { // if (this.showScrollTo) {
clearInterval(timer); // clearInterval(timer);
this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); // this.$nextTick(() => this.$refs.timeLine.setScrollPosition());
} // }
}, 500); // }, 1000);
}, },
// || // ||
@ -197,6 +198,7 @@ export default {
arr.push(task); arr.push(task);
} }
}); });
that.$nextTick(() => that.$refs.timeLine.setScrollPosition());
if (detailId !== -1) { if (detailId !== -1) {
// 1 // 1
const { pageCount } = that.$t.task; const { pageCount } = that.$t.task;
@ -349,6 +351,7 @@ export default {
* @param {object | null} options * @param {object | null} options
*/ */
init(options) { init(options) {
console.log('options: ', options);
if (!this.token) { if (!this.token) {
// tokenuserIdtoken // tokenuserIdtoken
// token userId // token userId

Loading…
Cancel
Save