h5
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.
 
 
 
 

103 lines
4.1 KiB

<template>
<template v-if="pluginId != '26'">
<view class="u-font-14 rounded-md bg-white relative shadow-lg" style="height: 100%" @click="setStorage">
<u-badge :is-dot="true" :offset="[0, 0]" v-show="pluginInfo && pluginInfo.remindNum > 0"></u-badge>
<!-- <plugin-default /> -->
<!-- <component :task="task" :is="pluginComponent"></component> -->
<p-task-title :task="task" v-if="pluginId === '1'" class="p-2" />
<!-- <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 v-else-if="pluginId === '15'" /> -->
<p-deliver-second v-else-if="pluginId === '15'" />
<p-source-manage v-else-if="pluginId === '16'" class="p-2" />
<p-finance-audit v-else-if="pluginId === '17'" class="p-2" />
<p-finance v-else-if="pluginId === '18'" class="p-2" />
<!-- 个人和终端按钮-->
<!-- <p-account-management /> -->
<p-account-management v-else-if="pluginId === '19'" class="p-2" />
<p-domain-source-manage v-else-if="pluginId === '20'" class="p-2" />
<p-project-version-management v-else-if="pluginId === '21'" class="p-2" />
<!-- 任务名和跳转详情页箭头 -->
<p-task-to-detail :task="task" v-else-if="pluginId === '24'" class="p-2"></p-task-to-detail>
<!-- 考勤插件 -->
<p-check-work :task="task" v-else-if="pluginId === '1485171846022434817'"></p-check-work>
<!-- 考勤统计插件 -->
<p-check-work-summary :task="task" v-else-if="pluginId === '25'"></p-check-work-summary>
<!-- 工资条插件 -->
<p-salary :task="task" v-else-if="pluginId === '1541239500222763008'"></p-salary>
<!-- 工资汇总插件 -->
<p-salary-manage :task="task" v-else-if="pluginId === '1541234829630377984'"></p-salary-manage>
<Render
v-else
:task="task"
:pluginId="pluginId"
:styleType="styleType"
:pluginTaskId="pluginTaskId"
:businessPluginId="businessPluginId"
:param="param"
/>
</view>
</template>
</template>
<script setup>
import { computed, provide } 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 },
businessPluginId: { default: '', type: String },
param: { type: String, default: '' },
pluginInfo: { default: () => {}, type: Object }
});
provide('task', props.task);
provide('pluginInfo', props.pluginInfo);
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>