获取子模块

This commit is contained in:
GUjiYN 2024-03-16 16:56:40 +08:00
parent eaa3039faf
commit b49493c795
6 changed files with 287 additions and 303 deletions

View File

@ -506,7 +506,7 @@ const infoEditSettingHeaderImage = (showType, token) => {
*/
const projectGet =(token,url) => {
return axios({
url:api+ "/project/get"+url,
url:api+ "/project/get",
method: "get",
headers:{
'Authorization':'Bearer '+token,
@ -625,7 +625,7 @@ const projectWorkGet = (data,token) =>{
const queryTags = `tags=${encodedTags.join('&tags=')}`;
const queryIsFinish = `isFinish=${encodedIsFinish.join('&isFinish=')}`;
return axios({
url:`${api}/project/work/get?${queryTags}&${queryIsFinish}`,
url:`${api}/project/work/get?${queryTags}&${queryIsFinish}&is=1`,
method: "get",
headers:{
'content-type': 'application/json;charset=utf-8',
@ -675,18 +675,24 @@ const moduleGetByProjectId = (projectId, token) => {
}
/*const moduleGetByProjectId = (projectId, token) => {
return axios ({
url:api + "/module/get",
methods:"get",
params:projectId,
headers:{
/**
* 根据子系统id获取子模块信息
* @param sysId
* @param token
*/
const moduleGetBySysId = (sysId, token) => {
return axios({
url: api + "/module/get/min?sysId=" + sysId,
method:"get",
headers: {
'Authorization':'Bearer '+token,
'content-type': 'application/json;charset=utf-8',
'Content-Type': 'application/json;charset=utf-8',
'Timestamp': getCurrentTimestamp()
}
})
}*/
}
export default {
login,
@ -730,7 +736,7 @@ export default {
projectWorkGet,
moduleGetByProjectId,
moduleGetBySysId,
messageGet,

View File

@ -1,183 +1,184 @@
import {createRouter, createWebHistory} from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path:'/',
name:'app',
component:()=>import('../views/HomePage/IndexView.vue'),
children:[
{
path: "/",
component:() => import ('../views/HomePage/Main.vue')
},{
path:'/Project',
name:'Project',
component:()=>import('@/views/ProjectPage/ProjectList.vue')
},
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path:'/WorkLoad',
name:'WorkLoad',
component:()=>import('@/views/WorkLoadPage/WorkLoad.vue'),
children:[
{
path: '/WorkLoad/PersonalInformation',
name:'WorkLoadPersonalInformation',
component:() =>import('@/views/WorkLoadPage/PersonalInformation.vue')
},
{
path: '/WorkLoad/PersonalProject',
name:'WorkLoadPersonalProject',
component:()=>import('@/views/WorkLoadPage/PersonalProject.vue')
},
{
path: '/WorkLoad/PersonalBelongings',
name:'WorkLoadPersonalBelongings',
component:()=>import('@/views/WorkLoadPage/PersonalBelongings.vue')
},
{
path: '/WorkLoad/Message',
name:'WorkLoadMessage',
component:()=>import('@/views/WorkLoadPage/Message.vue')
},
{
path: '/WorkLoad/DailyPaper',
name:'WorkLoadDailyPaper',
component:() =>import('@/views/WorkLoadPage/DailyPaper.vue')
},
{
path:'/WorkLoad/I_Manage',
name:'WordLoadI_Manage',
component:()=>import('@/views/WorkLoadPage/I_Manage.vue'),
},
{
path: '/WorkLoad/I_Responsible',
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: '/',
name: 'app',
component: () => import('../views/HomePage/IndexView.vue'),
children: [
{
path: "/",
component: () => import ('../views/HomePage/Main.vue')
},
{
path: '/Project',
name: 'Project',
component: () => import('@/views/ProjectPage/ProjectList.vue')
},
{
path: '/WorkLoad',
name: 'WorkLoad',
component: () => import('@/views/WorkLoadPage/WorkLoad.vue'),
children: [
{
path: '/WorkLoad/PersonalInformation',
name: 'WorkLoadPersonalInformation',
component: () => import('@/views/WorkLoadPage/PersonalInformation.vue')
},
{
path: '/WorkLoad/PersonalProject',
name: 'WorkLoadPersonalProject',
component: () => import('@/views/WorkLoadPage/PersonalProject.vue')
},
{
path: '/WorkLoad/PersonalBelongings',
name: 'WorkLoadPersonalBelongings',
component: () => import('@/views/WorkLoadPage/PersonalBelongings.vue')
},
{
path: '/WorkLoad/Message',
name: 'WorkLoadMessage',
component: () => import('@/views/WorkLoadPage/Message.vue')
},
{
path: '/WorkLoad/DailyPaper',
name: 'WorkLoadDailyPaper',
component: () => import('@/views/WorkLoadPage/DailyPaper.vue')
},
{
path: '/WorkLoad/I_Manage',
name: 'WordLoadI_Manage',
component: () => import('@/views/WorkLoadPage/I_Manage.vue'),
},
{
path: '/WorkLoad/I_Responsible',
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',
name:'WorkLoad/I_Manage/ChildModule',
component:()=>import('@/views/WorkLoadPage/ChildModule.vue')
},
{
path:'/WorkLoad/I_Manage/UserManageModule',
name:'WorkLoadI_ManageUserManageModule',
component:()=>import('@/views/WorkLoadPage/UserManageModule.vue')
},
{
path:'/WorkLoad/I_Manage/LoginRegisterModule',
name:'WorkLoadI_ManageLoginRegisterModule',
component:()=>import('@/views/WorkLoadPage/LoginRegisterModule.vue')
},
{
path:'/WorkLoad/I_Manage/AuthorityManageModule',
name:'WorkLoadI_ManageAuthorityManageModule',
component:()=>import('@/views/WorkLoadPage/AuthorityManageModule.vue')
},
{
path:'/WorkLoad/I_Manage/ChildSystem',
name:'WorkLoad/I_Manage/ChildSystem',
component:() => import('@/views/WorkLoadPage/I_Manage_ChildSystem.vue')
}
]
{
path: '/WorkLoad/I_Manage/ChildModule',
name: 'WorkLoad/I_Manage/ChildModule',
component: () => import('@/views/WorkLoadPage/ChildModule.vue')
},
{
path: '/WorkLoad/I_Manage/UserManageModule',
name: 'WorkLoadI_ManageUserManageModule',
component: () => import('@/views/WorkLoadPage/UserManageModule.vue')
},
{
path: '/WorkLoad/I_Manage/LoginRegisterModule',
name: 'WorkLoadI_ManageLoginRegisterModule',
component: () => import('@/views/WorkLoadPage/LoginRegisterModule.vue')
},
{
path: '/WorkLoad/I_Manage/AuthorityManageModule',
name: 'WorkLoadI_ManageAuthorityManageModule',
component: () => import('@/views/WorkLoadPage/AuthorityManageModule.vue')
},
{
path: '/WorkLoad/I_Manage/ChildSystem',
name: 'WorkLoad/I_Manage/ChildSystem',
component: () => import('@/views/WorkLoadPage/I_Manage_ChildSystem.vue')
}
]
},
{
path: '/ProjectMessage',
name: 'MainMessageCustom',
component: () => import('@/views/ProjectPage/MainMessageCustom.vue')
},
]
},
{
path: '/login',
name: 'login',
component: () => import('@/views/AuthPage/Login.vue')
},
{
path: '/register',
name: 'register',
component: () => import('../views/AuthPage/Register.vue')
},
{
path: '/LoginRegister/Login',
name: 'Login',
component: () => import('@/views/AuthPage/Login.vue')
},
{
path:'/ProjectMessage',
name:'MainMessageCustom',
component:()=>import('@/views/ProjectPage/MainMessageCustom.vue')
},
]
},
{
path:'/login',
name:'login',
component:()=>import('@/views/AuthPage/Login.vue')
},
{
path:'/register',
name:'register',
component:()=>import('../views/AuthPage/Register.vue')
},
{
path:'/LoginRegister/Login',
name:'Login',
component:() =>import('@/views/AuthPage/Login.vue')
},
{
path:'/Manager',
name:'Manager',
component:()=>import('@/views/ManagePage/Manager.vue'),
children:[
{
path:'/Manager/Main',
component:() =>import('@/views/ManagePage/Main.vue')
},
{
path:'/Manager/User',
component:() =>import('@/views/ManagePage/User.vue')
},
{
path:'/Manager/Role',
component:() =>import('@/views/ManagePage/Role.vue')
},
{
path:'/Manager/Authority',
component:() =>import('@/views/ManagePage/Authority.vue')
},
{
path:'/Manager/Log',
component:() =>import('@/views/ManagePage/Log.vue')
},
{
path:'/Manager/Daily',
component:() =>import('@/views/ManagePage/Daily.vue')
},
{
path:'/Manager/Message',
component:() =>import('@/views/ManagePage/Message.vue')
},
{
path:'/Manager/Carousel',
component:() =>import('@/views/ManagePage/Carousel.vue')
} ,{
path:'/Manager/TeamProfile',
component:() =>import('@/views/ManagePage/TeamProfile.vue')
},{
path:'/Manager/ProjectRecommend',
component:() =>import('@/views/ManagePage/ProjectRecommend.vue')
},{
path:'/Manager/NewsDisplay',
component:() =>import('@/views/ManagePage/NewsDisplay.vue')
},{
path:'/Manager/UserRecommend',
component:() =>import('@/views/ManagePage/UserRecommend.vue')
},{
path:'/Manager/ProjectInformation',
component:() =>import('@/views/ManagePage/ProjectInformation.vue')
},{
path:'/Manager/TeamInformation',
component:() =>import('@/views/ManagePage/TeamInformation.vue')
},{
path:'/Manager/NewsInformation',
component:() =>import('@/views/ManagePage/NewsInformation.vue')
path: '/Manager',
name: 'Manager',
component: () => import('@/views/ManagePage/Manager.vue'),
children: [
{
path: '/Manager/Main',
component: () => import('@/views/ManagePage/Main.vue')
},
{
path: '/Manager/User',
component: () => import('@/views/ManagePage/User.vue')
},
{
path: '/Manager/Role',
component: () => import('@/views/ManagePage/Role.vue')
},
{
path: '/Manager/Authority',
component: () => import('@/views/ManagePage/Authority.vue')
},
{
path: '/Manager/Log',
component: () => import('@/views/ManagePage/Log.vue')
},
{
path: '/Manager/Daily',
component: () => import('@/views/ManagePage/Daily.vue')
},
{
path: '/Manager/Message',
component: () => import('@/views/ManagePage/Message.vue')
},
{
path: '/Manager/Carousel',
component: () => import('@/views/ManagePage/Carousel.vue')
}, {
path: '/Manager/TeamProfile',
component: () => import('@/views/ManagePage/TeamProfile.vue')
}, {
path: '/Manager/ProjectRecommend',
component: () => import('@/views/ManagePage/ProjectRecommend.vue')
}, {
path: '/Manager/NewsDisplay',
component: () => import('@/views/ManagePage/NewsDisplay.vue')
}, {
path: '/Manager/UserRecommend',
component: () => import('@/views/ManagePage/UserRecommend.vue')
}, {
path: '/Manager/ProjectInformation',
component: () => import('@/views/ManagePage/ProjectInformation.vue')
}, {
path: '/Manager/TeamInformation',
component: () => import('@/views/ManagePage/TeamInformation.vue')
}, {
path: '/Manager/NewsInformation',
component: () => import('@/views/ManagePage/NewsInformation.vue')
}
]
}
]
}
,
,
]
]
})
export default router

View File

@ -8,7 +8,7 @@
<a-form-item
:rules="[{ required: true, message: '请输入您的用户名!' }]"
label="用户名"
name="username"
name="user"
style="margin-top: 20px; margin-left: 1vw"
>
<a-input v-model:value="formState.user" class="h-10 w-64 border-gray-300 rounded-md" type="text"/>

View File

@ -22,10 +22,10 @@
</div>
</div>
<div class="flex space-x-9">
<div v-for="(ChildModule, index) in ChildModules" :key="index" class="flex space-x-9">
<a-card class="relative bg-blue-400 w-72 h-36 text-white rounded-xl">
<div class="flex space-x-9">
<p class="absolute left-4 top-4">登录注册模块</p>
<p class="absolute left-4 top-4">{{ChildModule.name}}</p>
<p class="absolute right-4 top-4">负责人: </p>
</div>
<div class="flex flex-col mt-8">
@ -48,56 +48,6 @@
</button>
</div>
</a-card>
<a-card class="relative bg-teal-400 w-72 h-36 text-white rounded-xl">
<div class="flex space-x-9">
<p class="absolute left-4 top-4">用户管理模块</p>
<p class="absolute right-4 top-4">负责人: </p>
</div>
<div class="flex flex-col mt-8">
<p class="text-green-100">剩余 5 </p>
<CaretUpOutlined class="absolute bottom-[32%] ml-2"/>
</div>
<div class="left-0 absolute bottom-0 h-[35%] w-full bg-white flex justify-center items-center space-x-3">
<div class="text-teal-300 flex absolute left-5">
<CheckOutlined class="mt-1"/>
<p >进行中</p>
</div>
<div class="flex absolute right-16">
<p class="text-teal-300 font-bold text-2xl">2</p>
<p class="text-teal-300 mt-2">/</p>
</div>
<button class="absolute right-8 w-6 h-6 flex items-center justify-center bg-teal-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105" @click="$router.push('/WorkLoad/I_Manage/UserManageModule')">
<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>
</a-card>
<a-card class="relative bg-rose-400 w-72 h-36 text-white rounded-xl">
<div class="flex space-x-9">
<p class="absolute left-4 top-4">权限管理模块</p>
<p class="absolute right-4 top-4">负责人: </p>
</div>
<div class="flex flex-col mt-8">
<p class="text-green-100">剩余 1 </p>
<CaretUpOutlined class="absolute bottom-[32%] ml-2"/>
</div>
<div class="left-0 absolute bottom-0 h-[35%] w-full bg-white flex justify-center items-center space-x-3">
<div class="text-rose-400 flex absolute left-5">
<CheckOutlined class="mt-1"/>
<p >进行中</p>
</div>
<div class="flex absolute right-16">
<p class="text-rose-400 font-bold text-2xl">2</p>
<p class="text-rose-400 mt-2">/</p>
</div>
<button class="absolute right-8 w-6 h-6 flex items-center justify-center bg-rose-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105" @click="$router.push('/WorkLoad/I_Manage/AuthorityManageModule')">
<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>
</a-card>
</div>
</div>
<!--新增子模块对话框-->
@ -133,10 +83,26 @@
</template>
<script setup>
import {CaretUpOutlined, CheckOutlined} from '@ant-design/icons-vue';
import {ref} from 'vue';
import {onMounted, ref} from 'vue';
import request from "@/js/request.js";
const AddModule = ref(false)
function showAddModal(){
AddModule.value = true;
}
//id
const token = window.localStorage.getItem('token')
const ChildModules = ref([]);
const params = new URLSearchParams(window.location.search);
const sysId = params.get('id');
onMounted(() => {
request.moduleGetBySysId(sysId, token).then((res) => {
console.log("ChildModules:", res)
ChildModules.value = res.data.data
})
})
</script>

View File

@ -23,23 +23,29 @@
</a-checkable-tag>
</div>
<div>
<a-checkbox-group v-model:value="data.isFinish" :options="options" />
<a-checkbox-group v-model:value="data.isFinish" :options="options"/>
</div>
</div>
</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-[450px] 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>
<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">
<p class="ml-14 text-lg">剩余</p>
<p class="text-xl text-green-400 font-bold">10</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/ChildSystem')">
<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"/>
<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/ChildSystem?id=' + ChildProject.id)">
<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>
@ -47,7 +53,7 @@
</a-card>
</div>
</div>
</div>
</div>
</template>
@ -59,12 +65,13 @@ const showButton = reactive([]);
const token = window.localStorage.getItem('token')
const ChildProjects = ref([]); // 使ref
const id = ref(2);
const tagAll=ref(true)
const tagAll = ref(true)
const tagsData = ref([]);
const selectTags = ref([false, false, false, false]);
const data =reactive({
tags:[],
isFinish:[0,1,2,-1]
const data = reactive({
tags: [],
isFinish: [0, 1, 2, -1],
is: 1
})
@ -86,30 +93,30 @@ const options = [
value: -1,
},
]
watch(() =>data.isFinish, async (newValue, oldValue) =>{
watch(() => data.isFinish, async (newValue, oldValue) => {
console.log("data.isFinish", data.isFinish)
GetManageProject()
})
onMounted(() =>{
onMounted(() => {
GetManageProject();
})
function GetManageProject(){
function GetManageProject() {
request.projectWorkGet(data, token).then((res) => {
ChildProjects.value = res.data.data;
})
}
const handleClickAll=(checked)=>{
if(checked){
selectTags.value.forEach((item,index)=>{
selectTags.value[index]=false
const handleClickAll = (checked) => {
if (checked) {
selectTags.value.forEach((item, index) => {
selectTags.value[index] = false
})
//
request.projectGet(token).then(res=>{
request.projectGet(token).then(res => {
console.log(res.data.data)
})
}
@ -117,45 +124,40 @@ const handleClickAll=(checked)=>{
}
//
const handleChange = (tag, checked) => {
if(checked){
tagAll.value=false
}
else{
let flag=true
selectTags.value.forEach((item,index)=>{
if(item){
flag=false
if (checked) {
tagAll.value = false
} else {
let flag = true
selectTags.value.forEach((item, index) => {
if (item) {
flag = false
}
})
if(flag){
tagAll.value=true
if (flag) {
tagAll.value = true
}
}
};
//
const handleAdd=()=>{
const handleAdd = () => {
console.log('新增')
}
// tag
onMounted(
()=>{
() => {
//
request.getTagsProjectList(token).then(res=>{
request.getTagsProjectList(token).then(res => {
console.log(res.data.data)
tagsData.value=res.data.data
tagsData.value = res.data.data
})
//
request.projectGet(token).then(res=>{
request.projectGet(token).then(res => {
console.log(res)
})

View File

@ -8,9 +8,9 @@
<button class="rounded-lg bg-green-400 hover:bg-green-500 p-1.5 text-white">编辑</button>
<button class="rounded-lg bg-red-500 hover:bg-red-600 p-1.5 text-white" @click="showAddModal">新增子系统</button>
</div>
<div class="mt-12 ml-8 flex space-x-16 h-full" >
<div class="mt-12 ml-8 flex space-x-16 h-full">
<div class="flex flex-col space-y-6 border-r border-gray-200 w-80 h-full p-8">
<p class="text-lg">项目名称梁溪区纪委大数据管理平台{{ChildSystems.name}}</p>
<p class="text-lg">项目名称梁溪区纪委大数据管理平台{{ ChildSystems.name }}</p>
<p>项目周期3个月</p>
<p>项目开始时间</p>
<p>项目完成时间</p>
@ -21,16 +21,22 @@
</div>
<div class="flex flex-row justify-start space-x-5 container">
<div v-for="(ChildSystem, index) in ChildSystems" :key="index" class="flex flex-row justify-start 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">
<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">{{ChildSystem.name}}</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="EnterChildModule(ChildSystem)" >
<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"/>
<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="EnterChildModule(ChildSystem)">
<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>
@ -41,10 +47,13 @@
</div>
</div>
<!--新增子系统对话框-->
<a-modal v-model:open="AddModule" :okButtonProps="{ style: { backgroundColor: '#347def',color: 'white'} }" cancel-text="取消" ok-text="确定" title="新增子系统">
<a-modal v-model:open="AddModule" :okButtonProps="{ style: { backgroundColor: '#347def',color: 'white'} }"
cancel-text="取消" ok-text="确定" title="新增子系统">
<a-form>
<div class="flex space-x-5">
<a-form-item class="my-4" label="子系统名称:"><a-input class="h-8 w-36 border-gray-300 rounded-md"/></a-form-item>
<a-form-item class="my-4" label="子系统名称:">
<a-input class="h-8 w-36 border-gray-300 rounded-md"/>
</a-form-item>
<a-form-item class="my-4" label="状态:">
<a-select
ref="select"
@ -58,18 +67,24 @@
</a-form-item>
</div>
<div class="flex space-x-5">
<a-form-item class="my-4" label="周期:"><a-input class="ml-[43px] h-8 w-36 border-gray-300 rounded-md"/></a-form-item>
<a-form-item class="my-4" label="工作量:"><a-input class="ml-[15px] h-8 w-36 border-gray-300 rounded-md"/></a-form-item>
<a-form-item class="my-4" label="周期:">
<a-input class="ml-[43px] h-8 w-36 border-gray-300 rounded-md"/>
</a-form-item>
<a-form-item class="my-4" label="工作量:">
<a-input class="ml-[15px] h-8 w-36 border-gray-300 rounded-md"/>
</a-form-item>
</div>
<div class="flex space-x-5">
<a-form-item class="my-4" label="负责人:"><a-input class="ml-[30px] h-8 w-36 border-gray-300 rounded-md"/></a-form-item>
<a-form-item class="my-4" label="系统描述:">
<a-textarea :rows="1" class="w-36 h-8" />
<a-form-item class="my-4" label="负责人:">
<a-input class="ml-[30px] h-8 w-36 border-gray-300 rounded-md"/>
</a-form-item>
<a-form-item class="my-4" label="系统描述:">
<a-textarea :rows="1" class="w-36 h-8"/>
</a-form-item>
</div>
</a-form>
</a-modal >
</a-modal>
</template>
<script setup>
import {onMounted, reactive, ref} from "vue";
@ -79,32 +94,26 @@ import router from "@/router/index.js";
const showButton = reactive([]);
const AddModule = ref(false)
const token = window.localStorage.getItem('token')
const id = window.localStorage.getItem('id')
function showAddModal(){
function showAddModal() {
AddModule.value = true;
}
const ChildProjects = ref([]); // 使ref
const params = new URLSearchParams(window.location.search);
const getId = params.get('id');
const ChildSystems = ref([]);
const data =reactive({
tags:[],
isFinish:[0,1,2,-1]
})
onMounted(() => {
request.projectWorkGet(data, token).then((res) => {
ChildProjects.value = res.data.data;
})
request.moduleGetByProjectId(id, token).then((res) => {
console.log("childModules:", res)
request.moduleGetByProjectId(getId, token).then((res) => {
console.log("childSystems:", res)
ChildSystems.value = res.data.data
})
})
function EnterChildModule(ChildSystem){
console.log(ChildSystem.id)
window.localStorage.setItem('id',ChildSystem.id)
router.push('/WorkLoad/I_Manage/ChildModule')
function EnterChildModule(ChildSystem) {
console.log(ChildSystem.id)
router.push('/WorkLoad/I_Manage/ChildModule?id=' + ChildSystem.id)
}
</script>