接口修改projectwork

This commit is contained in:
妖姐 2024-03-15 19:00:10 +08:00
parent 0bcd257a00
commit 025c80a1f4
4 changed files with 45 additions and 31 deletions

View File

@ -602,22 +602,38 @@ const getTagsProjectList = () =>{
* @param token
* 获取项目的所有子系统
*/
const projectWorkGet = (data,token) => {
// const projectWorkGet = (data,token) => {
// return axios({
// url:api + "/project/work/get",
// method:"get",
// data:data,
// headers:{
// 'Authorization':'Bearer '+token,
// 'content-type': 'application/json;charset=utf-8',
// 'Timestamp': getCurrentTimestamp()
// }
// })
// }
const projectWorkGet = (data,token) =>{
const tags = data.tags
const isFinish = data.isFinish
const encodedTags = tags.map(tag => encodeURIComponent(tag));
const encodedIsFinish = isFinish.map(is => encodeURIComponent(is))
const queryTags = `tags=${encodedTags.join('&tags=')}`;
const queryIsFinish = `isFinish=${encodedIsFinish.join('&isFinish=')}`;
return axios({
url:api + "/project/work/get",
method:"get",
data:data,
url:`${api}/project/work/get?${queryTags}&${queryIsFinish}`,
method: "get",
headers:{
'Authorization':'Bearer '+token,
'content-type': 'application/json;charset=utf-8',
'Authorization':'Bearer '+token,
'Timestamp': getCurrentTimestamp()
}
})
}
export default {
login,

View File

@ -28,7 +28,7 @@ const project = reactive({
})
onMounted(()=>{
console.log('id的值',id)
request.projectGetCustom(data).then((res)=>{
// console.log(res)
// Project.data= res.data.data.data
@ -38,7 +38,7 @@ onMounted(()=>{
// console.log("projects.value:",projects.value)
// console.log("projects.value[0].id:",projects.value[0].id)
project.data = projects.value[0];
console.log("project.data:",project.data)
console.log("project.data:00000",project.data)
})
})

View File

@ -1,6 +1,6 @@
<template>
<a-spin :spinning="false" tip="Loading..." >
<div class="relative h-full bg-gray-50 flex w-full overflow-x-hidden">
<div class="relative bg-gray-50 flex w-full overflow-x-hidden">
<div class="mt-0">
<div class="flex flex-row justify-between">
<div class="ml-3">
@ -32,9 +32,9 @@
</div>
</template>
<template v-else>
<div class="flex flex-wrap justify-between mt-5 w-full">
<div class="flex flex-wrap justify-start mt-5 w-full">
<template v-for="(project, index) in projects" :key="index">
<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">
<a-card class=" mr-2.5 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">
<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">{{ project.name }}</p>
<div class="ml-auto mr-10">

View File

@ -1,5 +1,5 @@
<template>
<div class="relative h-full bg-gray-50 flex flex-col ">
<div class="relative bg-gray-50 flex flex-col ">
<a-breadcrumb class="ml-[3vw]">
<a-breadcrumb-item>我的项目</a-breadcrumb-item>
</a-breadcrumb>
@ -27,24 +27,22 @@
<a-checkbox-group v-model:value="data.isFinish" :options="options" class="mr-3" />
</div>
</div>
<div class="flex space-x-9 ml-16 mt-12">
<template v-for="(project, index) in projects" :key="index">
<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/img26.jpg')]" @mouseleave="showButton[index]=false" @mouseover="showButton[index]=true">
<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">{{ project.name }}</p>
<div class="ml-auto mr-10">
<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)">
<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">
<path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</svg>
</button>
</div>
</div>
</a-card>
</template>
</div>
<div class="flex flex-wrap justify-start mt-5 w-full">
<template v-for="(project, index) in projects" :key="index">
<a-card class=" mr-2.5 transition-transform transform-gpu hover:scale-105 relative w-[24vw] h-60 mb-4 rounded-none bg-cover bg-center bg-[url('@/assert/images/img26.jpg')]" @mouseleave="showButton[index]=false" @mouseover="showButton[index]=true">
<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">{{ project.name }}</p>
<div class="ml-auto mr-10">
<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)">
<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">
<path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</svg>
</button>
</div>
</div>
</a-card>
</template>
</div>
</div>
</div>