|
|
@ -1,16 +1,22 @@ |
|
|
|
<template> |
|
|
|
<view style="height: 100%" v-if="pluginContent && pluginContent.html"> |
|
|
|
<view v-if="item && item.name"> |
|
|
|
<p-task-title :item="item" v-if="pluginId === '1'" /> |
|
|
|
<p-task-description :item="item" v-if="pluginId === '2'" /> |
|
|
|
<p-task-duration-delay :item="item" v-if="pluginId === '3'" /> |
|
|
|
<p-task-start-time-delay :item="item" v-if="pluginId === '4'" /> |
|
|
|
<p-deliverable :item="item" v-if="pluginId === '5'" /> |
|
|
|
<p-subtasks :item="item" v-if="pluginId === '6'" /> |
|
|
|
<p-subproject :item="item" v-if="pluginId === '7'" /> |
|
|
|
<p-task-countdown :item="item" v-if="pluginId === '8'" /> |
|
|
|
<view> |
|
|
|
<view style="height: 100%" v-if="pluginContent"> |
|
|
|
<view v-if="pluginContent.html"> |
|
|
|
<view style="height: 100%" v-html="pluginContent.html"></view> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<view v-if="item && item.name"> |
|
|
|
<p-task-title :item="item" v-if="pluginId === '1'" /> |
|
|
|
<p-task-description :item="item" v-if="pluginId === '2'" /> |
|
|
|
<p-task-duration-delay :item="item" v-if="pluginId === '3'" /> |
|
|
|
<p-task-start-time-delay :item="item" v-if="pluginId === '4'" /> |
|
|
|
<p-deliverable :item="item" v-if="pluginId === '5'" /> |
|
|
|
<p-subtasks :item="item" v-if="pluginId === '6'" /> |
|
|
|
<p-subproject :item="item" v-if="pluginId === '7'" /> |
|
|
|
<p-task-countdown :item="item" v-if="pluginId === '8'" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="height: 100%" v-html="pluginContent.html"></view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -36,7 +42,6 @@ export default { |
|
|
|
}, |
|
|
|
async created() { |
|
|
|
await this.getPlugin(); |
|
|
|
console.log(this.pluginContent.js); |
|
|
|
if (this.pluginContent.js) { |
|
|
|
var scriptDom = document.createElement('script'); |
|
|
|
scriptDom.id = `p${this.pluginContent.pluginId}`; |
|
|
@ -51,6 +56,7 @@ export default { |
|
|
|
pluginId, |
|
|
|
styleType, |
|
|
|
}); |
|
|
|
this.$emit('changeLoading', false); |
|
|
|
this.pluginContent = res; |
|
|
|
console.log(this.pluginContent); |
|
|
|
}, |
|
|
|