Browse Source

fix: 修改报错

develop
lucky 4 years ago
parent
commit
531c14d512
  1. 5
      CHANGELOG.md
  2. 14
      src/components/Globals/Globals.vue
  3. 1
      src/components/Plugin/Plugin.vue
  4. 37
      src/components/TimeLine/component/TimeStatus.vue
  5. 25
      src/pages/project/project.vue
  6. 1
      src/store/home/mutations.js

5
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-07-23) # 0.1.0 (2021-07-25)
### 🌟 新功能 ### 🌟 新功能
范围|描述|commitId 范围|描述|commitId
@ -38,6 +38,7 @@
- | 任务快捷方式图标增加 | [4aba872](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4aba872) - | 任务快捷方式图标增加 | [4aba872](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4aba872)
- | 日常任务修改 | [dfa7ee2](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/dfa7ee2) - | 日常任务修改 | [dfa7ee2](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/dfa7ee2)
- | 删除插件携带的多余文件 | [0f392bb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/0f392bb) - | 删除插件携带的多余文件 | [0f392bb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/0f392bb)
- | 删除多余字段 | [5ae3973](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/5ae3973)
- | 添加插件数据 | [2f11b42](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/2f11b42) - | 添加插件数据 | [2f11b42](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/2f11b42)
- | 图标修改 | [54bca09](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/54bca09) - | 图标修改 | [54bca09](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/54bca09)
- | 无基本变化 | [21ac4bb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/21ac4bb) - | 无基本变化 | [21ac4bb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/21ac4bb)
@ -53,6 +54,7 @@
- | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71) - | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71)
- | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6) - | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6)
- | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da1eece) - | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da1eece)
- | 日常任务插件遍历时的key值修改 | [cd26285](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/cd26285)
- | 日常任务html数据查验 | [880ce5c](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/880ce5c) - | 日常任务html数据查验 | [880ce5c](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/880ce5c)
- | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/d533a01) - | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/d533a01)
- | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89) - | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89)
@ -109,3 +111,4 @@
- | style:index | [978f272](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/978f272) - | style:index | [978f272](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/978f272)
- | !2 基础模板v1.1.0 | [f5e61dd](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f5e61dd) - | !2 基础模板v1.1.0 | [f5e61dd](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f5e61dd)
- | init | [c0f1deb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c0f1deb) - | init | [c0f1deb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c0f1deb)

14
src/components/Globals/Globals.vue

@ -4,20 +4,20 @@
<view slot="body"> <view slot="body">
<scroll-view :scrollY="true" :style="{ height: isShrink ? '40rpx' : '240rpx' }"> <scroll-view :scrollY="true" :style="{ height: isShrink ? '40rpx' : '240rpx' }">
<skeleton :banner="false" :loading="!tasks.length" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton> <skeleton :banner="false" :loading="!tasks.length" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton>
<view class="grid grid-cols-3 gap-2 h-auto"> <view class="grid gap-2">
<template v-for="item in tasks"> <template v-for="item in tasks">
<template v-if="item.plugins"> <template v-if="item.plugins">
<template v-for="(pluginArr, arrIndex) in item.plugins"> <template v-for="pluginArr in item.plugins">
<view class="p-0 u-col-between" :key="pluginArr[arrIndex].pluginTaskId"> <template class="p-0 u-col-between" v-if="pluginArr.length">
<Plugin <Plugin
:item="item"
:class="getClass(plugin.col, plugin.row)" :class="getClass(plugin.col, plugin.row)"
:item="item"
:key="plugin.pluginTaskId" :key="plugin.pluginTaskId"
:pluginId="plugin.pluginId" :pluginId="plugin.pluginId"
:styleType="plugin.styleType || 0" :styleType="plugin.styleType || 0"
v-for="plugin in pluginArr" v-for="plugin in pluginArr"
/> />
</view> </template>
</template> </template>
</template> </template>
</template> </template>
@ -43,10 +43,8 @@ export default {
}; };
}, },
// mounted() {
// setTimeout(() => (this.loading = false), 2000);
// },
computed: mapState('home', ['isShrink']), computed: mapState('home', ['isShrink']),
methods: { methods: {
getClass(col, row) { getClass(col, row) {
return [`row-span-${row}`, `col-span-${col}`]; return [`row-span-${row}`, `col-span-${col}`];

1
src/components/Plugin/Plugin.vue

@ -47,7 +47,6 @@ export default {
}, },
async created() { async created() {
console.log(this.pluginId);
await this.getPlugin(); await this.getPlugin();
let domList = Array.from(document.getElementsByTagName('script')); let domList = Array.from(document.getElementsByTagName('script'));
const index = domList.findIndex(item => item.id === `p${this.pluginContent.pluginId}`); const index = domList.findIndex(item => item.id === `p${this.pluginContent.pluginId}`);

37
src/components/TimeLine/component/TimeStatus.vue

@ -1,25 +1,34 @@
<template> <template>
<view> <view>
<view class="flex items-center justify-center text-blue-400 rounded-full h-7 w-7" v-if="status === 0" @tap="changeStatus($event, 0)"> <view @tap="changeStatus($event, 0)" class="flex items-center justify-center text-blue-400 rounded-full h-7 w-7" v-if="status === 0">
<u-circle-progress :percent="100" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="4" width="66"> <view class="circular text-center">
<u-icon color="#2979ff" name="checkmark" size="30"></u-icon>
</view>
<!-- <u-circle-progress
:percent="100"
active-color="#2979ff"
bg-color="rgba(255,255,255,0)"
borderWidth="4"
width="66"
>
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
<view class="u-progress-info"> <view class="u-progress-info">
<u-icon name="checkmark" size="30"></u-icon> <u-icon name="checkmark" size="30"></u-icon>
</view> </view>
</view> </view>
</u-circle-progress> </u-circle-progress>-->
</view> </view>
<view class="flex items-center justify-center text-black rounded-full h-7 w-7" v-if="status === 1" @tap="changeStatus($event, 1)"> <view @tap="changeStatus($event, 1)" class="flex items-center justify-center text-black rounded-full h-7 w-7" v-if="status === 1">
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> <u-circle-progress :percent="80" active-color="#2979ff" bg-color="rgba(255,255,255,0)" borderWidth="6" width="66">
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
<view class="u-progress-info">{{ time }}</view> <view class="u-progress-info">{{ time }}</view>
</view> </view>
</u-circle-progress> </u-circle-progress>
</view> </view>
<view class="flex items-center justify-center text-gray-400 rounded-full h-7 w-7" v-if="status === 2" @tap="changeStatus($event, 2)"> <view @tap="changeStatus($event, 2)" class="flex items-center justify-center text-gray-400 rounded-full h-7 w-7" v-if="status === 2">
<u-circle-progress :percent="40" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> <u-circle-progress :percent="40" active-color="#2979ff" bg-color="rgba(255,255,255,0)" borderWidth="6" width="66">
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
<view class="u-progress-info"> <view class="u-progress-info">
@ -29,11 +38,11 @@
</u-circle-progress> </u-circle-progress>
</view> </view>
<view <view
@tap="changeStatus($event, 3)"
class="flex items-center justify-center font-black text-red-800 rounded-full h-7 w-7" class="flex items-center justify-center font-black text-red-800 rounded-full h-7 w-7"
v-if="status === 3" v-if="status === 3"
@tap="changeStatus($event, 3)"
> >
<u-circle-progress :percent="80" active-color="#2979ff" bgColor="rgba(255,255,255,0)" borderWidth="6" width="66"> <u-circle-progress :percent="80" active-color="#2979ff" bg-color="rgba(255,255,255,0)" borderWidth="6" width="66">
<view class="u-progress-content"> <view class="u-progress-content">
<view class="u-progress-dot"></view> <view class="u-progress-dot"></view>
<view class="u-progress-info"> <view class="u-progress-info">
@ -96,3 +105,13 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.circular {
width: 62rpx;
height: 62rpx;
border-radius: 50%;
border: 6rpx solid #2979ff;
line-height: 56rpx;
}
</style>

25
src/pages/project/project.vue

@ -16,7 +16,7 @@ import { mapState, mapMutations, mapActions } from 'vuex';
export default { export default {
data() { data() {
return { height: '', plugins: [] }; return { height: '', plugins: [], allPlugins: [], timePlugins: [] };
}, },
computed: { computed: {
@ -34,20 +34,24 @@ export default {
* 重新根据时间和角色查询普通日常任务 * 重新根据时间和角色查询普通日常任务
* 永久日常任务不发生改变 * 永久日常任务不发生改变
*/ */
async timeNode() { async timeNode(val) {
// if (val) {
await this.getGlobal(); //
await this.getGlobal();
}
}, },
/** /**
* 当角色发生变化时 * 当角色发生变化时
* 重新查询永久日常任务和普通日常任务 * 重新查询永久日常任务和普通日常任务
*/ */
async roleId() { async roleId(val) {
this.setTimeNode(new Date().getTime()); if (val) {
// this.setTimeNode(new Date().getTime());
await this.getPermanent(); //
// await this.getPermanent();
await this.getGlobal(); //
await this.getGlobal();
}
}, },
}, },
@ -171,7 +175,6 @@ export default {
// } // }
// } // }
this.allPlugins = res; this.allPlugins = res;
console.log('allPlugins', this.allPlugins);
} catch (error) { } catch (error) {
console.log('error: ', error); console.log('error: ', error);
} }

1
src/store/home/mutations.js

@ -125,7 +125,6 @@ const mutations = {
if (!data || !data.length) { if (!data || !data.length) {
state.topEnd = true; state.topEnd = true;
} }
console.log('!state.tasks.plugins.length: ', !state.tasks[0].name);
if (!state.tasks[0].name) { if (!state.tasks[0].name) {
state.tasks = [...data]; state.tasks = [...data];
} else { } else {

Loading…
Cancel
Save