获取个人项目信息
This commit is contained in:
parent
cd1819385b
commit
3b4b566f8f
|
@ -37,17 +37,17 @@
|
||||||
</template>
|
</template>
|
||||||
<div class="flex flex-col space-y-4 mb-4 ">
|
<div class="flex flex-col space-y-4 mb-4 ">
|
||||||
|
|
||||||
<span class="lg:hover:text-blue-700" @click="JumpMessage" ><MailOutlined class="mr-1.5"/>消息</span>
|
<span class="lg:hover:text-blue-700 cursor-pointer" @click="JumpMessage" ><MailOutlined class="mr-1.5"/>消息</span>
|
||||||
<span class="lg:hover:text-blue-700" @click="JumpDailyPaper"><BellOutlined class="mr-1.5"/>日报</span>
|
<span class="lg:hover:text-blue-700 cursor-pointer" @click="JumpDailyPaper"><BellOutlined class="mr-1.5"/>日报</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col space-y-4">
|
<div class="flex flex-col space-y-4">
|
||||||
<hr class="mb-2">
|
<hr class="mb-2">
|
||||||
<span class="lg:hover:text-blue-700" @click="JumpPersonalProject"><UserOutlined class="mr-1.5"/>我的项目</span>
|
<span class="lg:hover:text-blue-700 cursor-pointer" @click="JumpPersonalProject"><UserOutlined class="mr-1.5"/>我的项目</span>
|
||||||
<span class="lg:hover:text-blue-700" @click="JumpMyManage"><ToolOutlined class="mr-1.5"/>我管理的</span>
|
<span class="lg:hover:text-blue-700 cursor-pointer" @click="JumpMyManage"><ToolOutlined class="mr-1.5"/>我管理的</span>
|
||||||
<span v-if="user.role === true" class=" lg:hover:text-blue-700" @click="JumpMyResponsible" ><UserOutlined class="mr-1.5" />我负责的</span>
|
<span v-if="user.role === true" class=" lg:hover:text-blue-700 cursor-pointer" @click="JumpMyResponsible" ><UserOutlined class="mr-1.5" />我负责的</span>
|
||||||
<hr>
|
<hr>
|
||||||
<span class=" lg:hover:text-blue-700" @click="JumpPersonalInformation"><MessageOutlined class="mr-1.5" />个人信息管理</span>
|
<span class=" lg:hover:text-blue-700 cursor-pointer" @click="JumpPersonalInformation"><MessageOutlined class="mr-1.5" />个人信息管理</span>
|
||||||
|
|
||||||
<!-- <div v-if="role === true" class="flex flex-col space-y-4">-->
|
<!-- <div v-if="role === true" class="flex flex-col space-y-4">-->
|
||||||
<!-- <hr>-->
|
<!-- <hr>-->
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span @click="exitLogin" class="bg-gray-50 lg:hover:text-blue-400 text-lg bottom-2 fixed right-2">退出登录</span>
|
<span @click="exitLogin" class="bg-gray-50 lg:hover:text-blue-400 text-lg bottom-2 fixed right-2 cursor-pointer">退出登录</span>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="text-gray-900 custom-link" href="/WorkLoad/I_Responsible">
|
<a class="text-gray-900 custom-link" href="/WorkLoad/I_Responsible" v-if="user.role===true">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<svg aria-hidden="true" class="w-5 h-5 text-gray-800 dark:text-white" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
<svg aria-hidden="true" class="w-5 h-5 text-gray-800 dark:text-white" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M20 6H10m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4m16 6h-2m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4m16 6H10m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4" stroke="currentColor" stroke-linecap="round" stroke-width="2"/>
|
<path d="M20 6H10m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4m16 6h-2m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4m16 6H10m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4" stroke="currentColor" stroke-linecap="round" stroke-width="2"/>
|
||||||
|
@ -158,10 +158,10 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script setup>
|
<script setup>
|
||||||
import colors from "tailwindcss/colors.js";
|
import {onMounted, reactive, ref} from "vue";
|
||||||
import {ref} from "vue";
|
import requests from "@/js/request.js";
|
||||||
|
|
||||||
const isDropdownOpen = ref(false)
|
const isDropdownOpen = ref(false)
|
||||||
const textColor = ref('black')
|
const textColor = ref('black')
|
||||||
// function colors() {
|
// function colors() {
|
||||||
// return colors
|
// return colors
|
||||||
|
@ -173,4 +173,26 @@ const textColor = ref('black')
|
||||||
// // 当按钮被点击时,将文字颜色改为蓝色
|
// // 当按钮被点击时,将文字颜色改为蓝色
|
||||||
// textColor.value = 'blue';
|
// textColor.value = 'blue';
|
||||||
// }
|
// }
|
||||||
|
// 根据用户角色判断是否展示我负责的
|
||||||
|
const user = reactive({
|
||||||
|
role:false,
|
||||||
|
})
|
||||||
|
const token = window.localStorage.getItem('token')
|
||||||
|
onMounted(() => {
|
||||||
|
requests.userGetProfile(token).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
if (res.data.data.role === '老师') {
|
||||||
|
// 执行老师相关的逻辑
|
||||||
|
user.role =true
|
||||||
|
} else {
|
||||||
|
console.log('这不是老师');
|
||||||
|
// 执行非老师相关的逻辑
|
||||||
|
user.role= false
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -24,30 +24,33 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-9 ml-16 mt-12">
|
<div class="flex space-x-9 ml-16 mt-12">
|
||||||
<a-card class="transition-transform transform-gpu hover:scale-105 relative w-[350px] h-64 rounded-none bg-cover bg-center bg-[url('@/assert/images/img25.jpg')]" @mouseleave="LearnMore1=false" @mouseover="LearnMore1=true">
|
<template v-for="(project, index) in projects.value" :key="index">
|
||||||
<div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
|
<a-card class="transition-transform transform-gpu hover:scale-105 relative w-[24vw] h-60 mb-4 rounded-none bg-cover bg-center bg-[url('@/assert/images/img12.jpg')]" @mouseleave="showButton[index]=false" @mouseover="showButton[index]=true">
|
||||||
<p class="ml-6 mt-4 text-lg font-bold tracking-tight text-gray-900">梁溪区纪委大数据管理平台项目</p>
|
<div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
|
||||||
<div class="ml-auto mr-10">
|
<p class="ml-6 mt-4 text-lg font-bold tracking-tight text-gray-900">{{ project.name }}</p>
|
||||||
<button v-if="LearnMore1" class="mt-8 w-6 h-6 flex items-center justify-center bg-green-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105">
|
<div class="ml-auto mr-10">
|
||||||
<svg aria-hidden="true" class="rtl:rotate-180 w-4 h-4 text-white" fill="none" viewBox="0 0 14 10" xmlns="http://www.w3.org/2000/svg">
|
<button v-if="showButton[index]" class="mt-8 w-6 h-6 flex items-center justify-center bg-green-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105" @click="MainMessage(project)">
|
||||||
<path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
<svg aria-hidden="true" class="rtl:rotate-180 w-4 h-4 text-white" fill="none" viewBox="0 0 14 10" xmlns="http://www.w3.org/2000/svg">
|
||||||
</svg>
|
<path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
</button>
|
</svg>
|
||||||
</div>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</div>
|
||||||
<a-card class="transition-transform transform-gpu hover:scale-105 relative w-[350px] h-64 rounded-none bg-cover bg-center bg-[url('@/assert/images/img26.jpg')]" @mouseleave="LearnMore2=false" @mouseover="LearnMore2=true">
|
</a-card>
|
||||||
<div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
|
</template>
|
||||||
<p class="ml-6 mt-4 text-lg font-bold tracking-tight text-gray-900">梁溪区纪委大数据管理平台项目</p>
|
|
||||||
<div class="ml-auto mr-10">
|
<!-- <a-card class="transition-transform transform-gpu hover:scale-105 relative w-[350px] h-64 rounded-none bg-cover bg-center bg-[url('@/assert/images/img26.jpg')]" @mouseleave="LearnMore2=false" @mouseover="LearnMore2=true">-->
|
||||||
<button v-if="LearnMore2" class="mt-8 w-6 h-6 flex items-center justify-center bg-green-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105">
|
<!-- <div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">-->
|
||||||
<svg aria-hidden="true" class="rtl:rotate-180 w-4 h-4 text-white" fill="none" viewBox="0 0 14 10" xmlns="http://www.w3.org/2000/svg">
|
<!-- <p class="ml-6 mt-4 text-lg font-bold tracking-tight text-gray-900">梁溪区纪委大数据管理平台项目</p>-->
|
||||||
<path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
<!-- <div class="ml-auto mr-10">-->
|
||||||
</svg>
|
<!-- <button v-if="LearnMore2" class="mt-8 w-6 h-6 flex items-center justify-center bg-green-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105">-->
|
||||||
</button>
|
<!-- <svg aria-hidden="true" class="rtl:rotate-180 w-4 h-4 text-white" fill="none" viewBox="0 0 14 10" xmlns="http://www.w3.org/2000/svg">-->
|
||||||
</div>
|
<!-- <path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>-->
|
||||||
</div>
|
<!-- </svg>-->
|
||||||
</a-card>
|
<!-- </button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </a-card>-->
|
||||||
<a-card class="transition-transform transform-gpu hover:scale-105 relative w-[350px] h-64 rounded-none bg-cover bg-center bg-[url('@/assert/images/img27.jpg')]" @mouseleave="LearnMore3=false" @mouseover="LearnMore3=true">
|
<a-card class="transition-transform transform-gpu hover:scale-105 relative w-[350px] h-64 rounded-none bg-cover bg-center bg-[url('@/assert/images/img27.jpg')]" @mouseleave="LearnMore3=false" @mouseover="LearnMore3=true">
|
||||||
<div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
|
<div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
|
||||||
<p class="ml-6 mt-4 text-lg font-bold tracking-tight text-gray-900">梁溪区纪委大数据管理平台项目</p>
|
<p class="ml-6 mt-4 text-lg font-bold tracking-tight text-gray-900">梁溪区纪委大数据管理平台项目</p>
|
||||||
|
@ -73,7 +76,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted, reactive, ref} from "vue";
|
||||||
import request from '@/js/request.js'
|
import request from '@/js/request.js'
|
||||||
|
|
||||||
const LearnMore1 = ref(false)
|
const LearnMore1 = ref(false)
|
||||||
|
@ -86,22 +89,28 @@ const projStatus = ref();
|
||||||
const tagAll=ref(true)
|
const tagAll=ref(true)
|
||||||
const tagsData = ref([]);
|
const tagsData = ref([]);
|
||||||
const selectTags = ref([false, false, false, false]);
|
const selectTags = ref([false, false, false, false]);
|
||||||
|
const data =reactive({
|
||||||
|
is:1
|
||||||
|
})
|
||||||
|
const projects =ref([])
|
||||||
onMounted(
|
onMounted(
|
||||||
()=>{
|
()=>{
|
||||||
|
|
||||||
// 设置标签
|
// 设置标签
|
||||||
request.getTagsProjectList(token).then(res=>{
|
request.getTagsProjectList(token).then(res=>{
|
||||||
console.log(res.data.data)
|
// console.log(res.data.data)
|
||||||
tagsData.value=res.data.data
|
tagsData.value=res.data.data
|
||||||
})
|
})
|
||||||
// 默认获取全部数据
|
// 默认获取全部数据
|
||||||
request.projectGet(token).then(res=>{
|
getMyselfProject()
|
||||||
console.log(res)
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
function getMyselfProject(){
|
||||||
|
request.projectWorkGet(data.is,token).then((res)=>{
|
||||||
|
projects.value = res.data.data;
|
||||||
|
console.log("成功了:",projects.value)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//当选中全部时,其他的都不选中
|
//当选中全部时,其他的都不选中
|
||||||
const handleClickAll=(checked)=>{
|
const handleClickAll=(checked)=>{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user