diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b30bb8..40f54fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - | 模拟接口测试 | [69e7931](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/69e7931) - | 配置默认插件接口 | [f0c177d](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/f0c177d) - | 全局插件及默认插件位置修改 | [6c80d08](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/6c80d08) + - | 日常任务插件调整 | [c1881f9](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c1881f9) - | 时间基准线,默认插件 | [a33ba1e](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/a33ba1e) - | 时间轴界面 | [33927e9](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/33927e9) - | 时间轴修改状态时提示框增加 | [e841392](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e841392) @@ -52,6 +53,7 @@ - | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71) - | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6) - | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da1eece) + - | 日常任务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) - | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89) - | 时间轴插件 | [225d3cc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/225d3cc) @@ -107,4 +109,3 @@ - | 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) - | init | [c0f1deb](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/c0f1deb) - diff --git a/src/components/Globals/Globals.vue b/src/components/Globals/Globals.vue index a71929d..4a081c3 100644 --- a/src/components/Globals/Globals.vue +++ b/src/components/Globals/Globals.vue @@ -3,17 +3,24 @@ - - - - - + + + @@ -28,12 +35,10 @@ import Skeleton from '@/components/Skeleton/Skeleton'; export default { name: 'Global', components: { Skeleton }, - props: { plugins: { type: Array, default: () => [] } }, + props: { tasks: { type: Array, default: () => [] } }, data() { return { // loading: true, - pluginId: 0, - styleType: 0, task: null, }; }, diff --git a/src/components/Plugin/Plugin.vue b/src/components/Plugin/Plugin.vue index d600a3e..a896a88 100644 --- a/src/components/Plugin/Plugin.vue +++ b/src/components/Plugin/Plugin.vue @@ -29,13 +29,17 @@ export default { type: Object, }, pluginId: { - default: '0', + default: '1', type: String, }, styleType: { default: 0, type: Number, }, + pluginTaskId: { + default: '0', + type: String, + }, }, data() { @@ -43,8 +47,11 @@ export default { }, async created() { + console.log(this.pluginId); await this.getPlugin(); - if (this.pluginContent.js) { + let domList = Array.from(document.getElementsByTagName('script')); + const index = domList.findIndex(item => item.id === `p${this.pluginContent.pluginId}`); + if (this.pluginContent.js && index === -1) { var scriptDom = document.createElement('script'); scriptDom.id = `p${this.pluginContent.pluginId}`; scriptDom.innerHTML = this.pluginContent.js; diff --git a/src/components/TimeLine/component/TimeBox.vue b/src/components/TimeLine/component/TimeBox.vue index f88727b..7051946 100644 --- a/src/components/TimeLine/component/TimeBox.vue +++ b/src/components/TimeLine/component/TimeBox.vue @@ -36,7 +36,7 @@ - - - + @@ -167,10 +165,13 @@ export default { try { this.allPlugins = []; const res = await this.$u.api.getPermanent({ roleId: this.roleId }); - for (let item of res) { - this.allPlugins = this.allPlugins.concat(item.plugins); - } - console.log('res', res); + // for (let item of res) { + // if (item.plugins) { + // this.allPlugins = this.allPlugins.concat(item.plugins); + // } + // } + this.allPlugins = res; + console.log('allPlugins', this.allPlugins); } catch (error) { console.log('error: ', error); } @@ -188,11 +189,12 @@ export default { const { roleId, timeNode, timeUnit } = this; const params = { roleId, timeNode, timeUnit }; const res = await this.$u.api.getGlobal(params); - for (let task of res) { - for (let item of task.plugins) { - this.timePlugins.push(...item); - } - } + // for (let task of res) { + // for (let item of task.plugins) { + // this.timePlugins.push(...item); + // } + // } + this.timePlugins = res; this.setDailyTasks(res); } catch (error) { console.log('error: ', error);