我管理的界面bug修复

This commit is contained in:
GUjiYN 2024-03-15 20:48:51 +08:00
parent 4f2bee76bd
commit 61101abd13
4 changed files with 39 additions and 8 deletions

View File

@ -654,6 +654,18 @@ const moduleGetByProjectId = (projectId, token) => {
}
/*const moduleGetByProjectId = (projectId, token) => {
return axios ({
url:api + "/module/get",
methods:"get",
params:projectId,
headers:{
'Authorization':'Bearer '+token,
'content-type': 'application/json;charset=utf-8',
'Timestamp': getCurrentTimestamp()
}
})
}*/
export default {
login,
@ -700,4 +712,5 @@ export default {
messageGet,
}

View File

@ -56,12 +56,12 @@ const router = createRouter({
name:'WorkLoadI_Responsible',
component:() =>import('@/views/WorkLoadPage/I_Responsible.vue')
},
{
/*{
path:'/WorkLoad/I_Responsible/:projId',
name:'WorkLoadI_ResponsibleProject',
component:() =>import('@/views/WorkLoadPage/I_ResponsibleChild.vue')
},
*/
{
path:'/WorkLoad/I_Manage/ChildModule',

View File

@ -29,7 +29,7 @@
</div>
<div class="mt-12 ml-12 flex space-x-16 h-full">
<div class="flex space-x-9">
<a-card v-for="(ChildProject, index) in ChildProjects" :key="index" class="transition-transform transform-gpu hover:scale-105 relative w-96 h-64 rounded-none bg-cover bg-center bg-[url('@/assert/images/img23.jpg')]" @mouseleave="showButton[index]=false" @mouseover="showButton[index]=true">
<a-card v-for="(ChildProject, index) in ChildProjects" :key="index" class="transition-transform transform-gpu hover:scale-105 relative w-[450px] h-64 rounded-none bg-cover bg-center bg-[url('@/assert/images/img23.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-2xl font-bold tracking-tight text-gray-900">{{ChildProject.name}}</p>
<div class="flex mt-7 space-x-3">
@ -59,12 +59,18 @@ const showButton = reactive([]);
const token = window.localStorage.getItem('token')
const ChildProjects = ref([]); // 使ref
const id = ref(2);
const tagAll=ref(true)
const tagsData = ref([]);
const selectTags = ref([false, false, false, false]);
const data =reactive({
is:1,
id:null,
tags:[],
isFinish:[0,1,2,-1]
})
onMounted(() =>{
request.projectWorkGet(id, token).then((res) => {
request.projectWorkGet(data, token).then((res) => {
ChildProjects.value = res.data.data;
})
})

View File

@ -20,12 +20,12 @@
</div>
</div>
<div class="container">
<div class="flex space-x-5">
<div v-for="(ChildSystem, index) in ChildSystems" :key="index" class="flex space-x-5">
<a-card class="transition-transform transform-gpu hover:scale-105 relative w-[260px] h-[300px] bg-cover bg-center bg-[url('@/assert/images/img44.jpg')]" @mouseleave="showButton[index]=false" @mouseover="showButton[index]=true">
<div class="flex absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
<div class="flex flex-col">
<p class="ml-6 mt-4 text-3xl font-bold tracking-tight text-gray-900">01</p>
<p class="ml-3 text-xl">子系统名称</p>
<p class="ml-3 text-xl">{{ChildSystem.name}}</p>
</div>
<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="$router.push('/WorkLoad/I_Manage/ChildModule')" >
@ -72,11 +72,23 @@
</a-modal >
</template>
<script setup>
import {reactive, ref} from "vue";
import {onMounted, reactive, ref} from "vue";
import request from "@/js/request.js";
const showButton = reactive([]);
const AddModule = ref(false)
function showAddModal(){
AddModule.value = true;
}
const ChildSystems = ref([]);
onMounted(() => {
request.moduleGetByProjectId(1, token).then((res) => {
console.log("childModules:", res)
ChildSystems.value = res.data.data
})
})
</script>