You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.4 KiB
59 lines
2.4 KiB
<template>
|
|
<view class="u-font-14" style="height: 100%">
|
|
<view @click="setStorage" class="grid gap-3">
|
|
<Render :task="task" :pluginId="pluginId" :styleType="styleType" :pluginTaskId="pluginTaskId" :param="param" />
|
|
<!-- <plugin-default /> -->
|
|
<!-- <component :task="task" :is="pluginComponent"></component> -->
|
|
<p-task-title :task="task" v-if="pluginId === '1'" />
|
|
<p-task-description :task="task" v-if="pluginId === '2'" />
|
|
<p-task-duration-delay :task="task" v-if="pluginId === '3'" />
|
|
<p-task-start-time-delay :task="task" v-if="pluginId === '4'" />
|
|
<p-upload-deliverable :task="task" v-if="pluginId === '5' && isMine" />
|
|
<p-delivery-history :task="task" v-if="pluginId === '5' && !isMine" />
|
|
<p-subtasks :task="task" v-if="pluginId === '6'" />
|
|
<p-subproject :task="task" v-if="pluginId === '7'" />
|
|
<p-task-countdown :task="task" v-if="pluginId === '8'" />
|
|
<p-manage-project :task="task" v-if="pluginId === '9'" />
|
|
<p-manage-role :task="task" v-if="pluginId === '10'" />
|
|
<p-manage-member :task="task" v-if="pluginId === '11'" />
|
|
<p-manage-task :task="task" v-if="pluginId === '12'" />
|
|
<p-wbs-import :task="task" v-if="pluginId === '13' || pluginId === '14'" />
|
|
<p-deliver-check :task="task" v-if="pluginId === '15'" />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { computed, defineProps } from 'vue';
|
|
import { useStore } from 'vuex';
|
|
|
|
const props = defineProps({
|
|
task: { default: () => {}, type: Object },
|
|
pluginId: { default: '1', type: String },
|
|
styleType: { default: 0, type: Number },
|
|
pluginTaskId: { default: '', type: String },
|
|
param: { type: String, default: '' },
|
|
});
|
|
|
|
const store = useStore();
|
|
const roleId = computed(() => store.state.role.roleId);
|
|
const token = computed(() => store.state.user.token);
|
|
const userId = computed(() => store.getters['user/userId']);
|
|
const projectId = computed(() => store.getters['project/projectId']);
|
|
const isMine = computed(() => store.getters['role/isMine']);
|
|
// 插件名称
|
|
// const pluginComponent = computed(() => {
|
|
// const target = uni.$pluginConfig.defaults.find(item => item.id === +props.pluginId);
|
|
// if (!target) return '';
|
|
// return target.component;
|
|
// });
|
|
|
|
if (props.pluginId === '5') {
|
|
store.dispatch('role/getAllMembers', { projectId: projectId.value });
|
|
}
|
|
|
|
// 点击时存储 storage
|
|
async function setStorage() {
|
|
uni.$storage.setStorageSync('roleId', roleId.value);
|
|
}
|
|
</script>
|
|
|