子系统新增
This commit is contained in:
parent
b49493c795
commit
2af8bdb875
@ -506,7 +506,7 @@ const infoEditSettingHeaderImage = (showType, token) => {
|
|||||||
*/
|
*/
|
||||||
const projectGet =(token,url) => {
|
const projectGet =(token,url) => {
|
||||||
return axios({
|
return axios({
|
||||||
url:api+ "/project/get",
|
url:api+ "/project/get"+url,
|
||||||
method: "get",
|
method: "get",
|
||||||
headers:{
|
headers:{
|
||||||
'Authorization':'Bearer '+token,
|
'Authorization':'Bearer '+token,
|
||||||
@ -625,7 +625,7 @@ const projectWorkGet = (data,token) =>{
|
|||||||
const queryTags = `tags=${encodedTags.join('&tags=')}`;
|
const queryTags = `tags=${encodedTags.join('&tags=')}`;
|
||||||
const queryIsFinish = `isFinish=${encodedIsFinish.join('&isFinish=')}`;
|
const queryIsFinish = `isFinish=${encodedIsFinish.join('&isFinish=')}`;
|
||||||
return axios({
|
return axios({
|
||||||
url:`${api}/project/work/get?${queryTags}&${queryIsFinish}&is=1`,
|
url:`${api}/project/work/get?${queryTags}&${queryIsFinish}`,
|
||||||
method: "get",
|
method: "get",
|
||||||
headers:{
|
headers:{
|
||||||
'content-type': 'application/json;charset=utf-8',
|
'content-type': 'application/json;charset=utf-8',
|
||||||
@ -675,24 +675,18 @@ const moduleGetByProjectId = (projectId, token) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/*const moduleGetByProjectId = (projectId, token) => {
|
||||||
* 根据子系统id获取子模块信息
|
return axios ({
|
||||||
* @param sysId
|
url:api + "/module/get",
|
||||||
* @param token
|
methods:"get",
|
||||||
*/
|
params:projectId,
|
||||||
const moduleGetBySysId = (sysId, token) => {
|
headers:{
|
||||||
return axios({
|
|
||||||
url: api + "/module/get/min?sysId=" + sysId,
|
|
||||||
method:"get",
|
|
||||||
headers: {
|
|
||||||
'Authorization':'Bearer '+token,
|
'Authorization':'Bearer '+token,
|
||||||
'Content-Type': 'application/json;charset=utf-8',
|
'content-type': 'application/json;charset=utf-8',
|
||||||
'Timestamp': getCurrentTimestamp()
|
'Timestamp': getCurrentTimestamp()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
login,
|
login,
|
||||||
@ -736,7 +730,7 @@ export default {
|
|||||||
projectWorkGet,
|
projectWorkGet,
|
||||||
|
|
||||||
moduleGetByProjectId,
|
moduleGetByProjectId,
|
||||||
moduleGetBySysId,
|
|
||||||
|
|
||||||
messageGet,
|
messageGet,
|
||||||
|
|
||||||
|
@ -114,8 +114,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<template >
|
<template >
|
||||||
<a-tag v-for="(project, index) in projects" :color="color[index]">
|
<a-tag v-for="(tag, index) in project.tags" :color="color[index]">
|
||||||
{{ project.tag }}
|
{{ tag }}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
<a-button type="text" shape="circle" :icon="ArrowRightOutlined"></a-button>
|
<a-button type="text" shape="circle" :icon="ArrowRightOutlined"></a-button>
|
||||||
</template>
|
</template>
|
||||||
@ -145,7 +145,10 @@ import {
|
|||||||
|
|
||||||
const color = ['pink','red','green','orange','cyan','blue','purple']
|
const color = ['pink','red','green','orange','cyan','blue','purple']
|
||||||
const showButton = reactive([]);
|
const showButton = reactive([]);
|
||||||
const projects = ref([]);
|
const projects = ref([
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
const id =ref(1)
|
const id =ref(1)
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
id:'',
|
id:'',
|
||||||
@ -168,6 +171,7 @@ function getAllProject(){
|
|||||||
request.projectGetCustom(data).then((res)=>{
|
request.projectGetCustom(data).then((res)=>{
|
||||||
projects.value = res.data.data;
|
projects.value = res.data.data;
|
||||||
console.log('查询到的所有项目',projects.value)
|
console.log('查询到的所有项目',projects.value)
|
||||||
|
|
||||||
})
|
})
|
||||||
// loading.value = true;
|
// loading.value = true;
|
||||||
// console.log('zmhuisss',loading.value)
|
// console.log('zmhuisss',loading.value)
|
||||||
|
@ -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-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>
|
<button class="rounded-lg bg-red-500 hover:bg-red-600 p-1.5 text-white" @click="showAddModal">新增子系统</button>
|
||||||
</div>
|
</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">
|
<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>项目周期:3个月</p>
|
||||||
<p>项目开始时间:</p>
|
<p>项目开始时间:</p>
|
||||||
<p>项目完成时间:</p>
|
<p>项目完成时间:</p>
|
||||||
@ -21,22 +21,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row justify-start space-x-5 container">
|
<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">
|
<div v-for="(ChildSystem, index) in ChildSystems" :key="index" class="flex flex-row justify-start space-x-5">
|
||||||
<a-card
|
<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">
|
||||||
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 absolute left-0 bottom-0 min-h-[30%] w-full bg-white">
|
||||||
<div class="flex flex-col">
|
<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-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>
|
||||||
<div class="ml-auto mr-10">
|
<div class="ml-auto mr-10">
|
||||||
<button v-if="showButton[index]"
|
<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)" >
|
||||||
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"
|
<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">
|
||||||
@click="EnterChildModule(ChildSystem)">
|
<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">
|
|
||||||
<path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round"
|
|
||||||
stroke-linejoin="round" stroke-width="2"/>
|
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -47,13 +41,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--新增子系统对话框-->
|
<!--新增子系统对话框-->
|
||||||
<a-modal v-model:open="AddModule" :okButtonProps="{ style: { backgroundColor: '#347def',color: 'white'} }"
|
<a-modal v-model:open="AddModule" :okButtonProps="{ style: { backgroundColor: '#347def',color: 'white'} }" cancel-text="取消" ok-text="确定" title="新增子系统">
|
||||||
cancel-text="取消" ok-text="确定" title="新增子系统">
|
|
||||||
<a-form>
|
<a-form>
|
||||||
<div class="flex space-x-5">
|
<div class="flex space-x-5">
|
||||||
<a-form-item class="my-4" label="子系统名称:">
|
<a-form-item class="my-4" label="子系统名称:"><a-input class="h-8 w-36 border-gray-300 rounded-md"/></a-form-item>
|
||||||
<a-input class="h-8 w-36 border-gray-300 rounded-md"/>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item class="my-4" label="状态:">
|
<a-form-item class="my-4" label="状态:">
|
||||||
<a-select
|
<a-select
|
||||||
ref="select"
|
ref="select"
|
||||||
@ -67,24 +58,18 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-5">
|
<div class="flex space-x-5">
|
||||||
<a-form-item class="my-4" label="周期:">
|
<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-input class="ml-[43px] h-8 w-36 border-gray-300 rounded-md"/>
|
<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>
|
|
||||||
<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>
|
||||||
<div class="flex space-x-5">
|
<div class="flex space-x-5">
|
||||||
<a-form-item class="my-4" label="负责人:">
|
<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-input class="ml-[30px] h-8 w-36 border-gray-300 rounded-md"/>
|
<a-form-item class="my-4" label="系统描述:">
|
||||||
</a-form-item>
|
<a-textarea :rows="1" class="w-36 h-8" />
|
||||||
<a-form-item class="my-4" label="系统描述:">
|
|
||||||
<a-textarea :rows="1" class="w-36 h-8"/>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-modal>
|
</a-modal >
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {onMounted, reactive, ref} from "vue";
|
import {onMounted, reactive, ref} from "vue";
|
||||||
@ -94,26 +79,32 @@ import router from "@/router/index.js";
|
|||||||
const showButton = reactive([]);
|
const showButton = reactive([]);
|
||||||
const AddModule = ref(false)
|
const AddModule = ref(false)
|
||||||
const token = window.localStorage.getItem('token')
|
const token = window.localStorage.getItem('token')
|
||||||
|
const id = window.localStorage.getItem('id')
|
||||||
function showAddModal() {
|
function showAddModal(){
|
||||||
AddModule.value = true;
|
AddModule.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
const ChildProjects = ref([]); // 使用ref创建响应式数据
|
||||||
const getId = params.get('id');
|
|
||||||
|
|
||||||
const ChildSystems = ref([]);
|
const ChildSystems = ref([]);
|
||||||
|
const data =reactive({
|
||||||
|
tags:[],
|
||||||
|
isFinish:[0,1,2,-1]
|
||||||
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
request.moduleGetByProjectId(getId, token).then((res) => {
|
request.projectWorkGet(data, token).then((res) => {
|
||||||
console.log("childSystems:", res)
|
ChildProjects.value = res.data.data;
|
||||||
|
})
|
||||||
|
request.moduleGetByProjectId(id, token).then((res) => {
|
||||||
|
console.log("childModules:", res)
|
||||||
ChildSystems.value = res.data.data
|
ChildSystems.value = res.data.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function EnterChildModule(ChildSystem) {
|
function EnterChildModule(ChildSystem){
|
||||||
console.log(ChildSystem.id)
|
console.log(ChildSystem.id)
|
||||||
router.push('/WorkLoad/I_Manage/ChildModule?id=' + ChildSystem.id)
|
window.localStorage.setItem('id',ChildSystem.id)
|
||||||
|
router.push('/WorkLoad/I_Manage/ChildModule')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user