页面功能测试修改
This commit is contained in:
parent
2d616b03ab
commit
c1faa8ac90
@ -130,7 +130,7 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/ProjectMessage',
|
path: '/ProjectMessage/:id',
|
||||||
name: 'MainMessageCustom',
|
name: 'MainMessageCustom',
|
||||||
component: () => import('@/views/ProjectPage/MainMessageCustom.vue')
|
component: () => import('@/views/ProjectPage/MainMessageCustom.vue')
|
||||||
},
|
},
|
||||||
|
@ -15,9 +15,13 @@ import BasicProject from "@/views/ProjectPage/MainMessage/BasicProject.vue";
|
|||||||
import BottomMessage from "@/views/ProjectPage/MainMessage/BottomMessage.vue";
|
import BottomMessage from "@/views/ProjectPage/MainMessage/BottomMessage.vue";
|
||||||
import {onMounted, reactive, ref} from "vue";
|
import {onMounted, reactive, ref} from "vue";
|
||||||
import request from "@/js/request.js";
|
import request from "@/js/request.js";
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
const projects = ref();
|
const projects = ref();
|
||||||
const id = window.localStorage.getItem('id')
|
const route = useRoute()
|
||||||
|
const id = route.params.id
|
||||||
|
|
||||||
|
// const id = window.localStorage.getItem('id')
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
id: id,
|
id: id,
|
||||||
tags: [],
|
tags: [],
|
||||||
|
@ -31,12 +31,12 @@
|
|||||||
<div class="flex flex-wrap justify-start ">
|
<div class="flex flex-wrap justify-start ">
|
||||||
<ProjectCard
|
<ProjectCard
|
||||||
class=""
|
class=""
|
||||||
v-for="proj in projList" v-bind="proj" @click="router.push('/WorkLoad/I_Responsible/ChildSystem/'+proj.id)"></ProjectCard>
|
v-for="proj in projList" v-bind="proj" @click="RouterPath(proj.id)"></ProjectCard>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<a-float-button-group v-show="routePath === '/WorkLoad/I_Responsible'" trigger="hover" type="primary" :style="{ right: '94px' }">
|
<a-float-button-group v-show="routePath === '/WorkLoad/I_Responsible'" trigger="hover" type="primary" :style="{ right: '94px' }">
|
||||||
<!-- 菜单-->
|
<!-- 菜单-->
|
||||||
<template #icon>
|
<template #icon >
|
||||||
<!-- <CommentOutlined />-->
|
<!-- <CommentOutlined />-->
|
||||||
<EditOutlined />
|
<EditOutlined />
|
||||||
</template>
|
</template>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
<!-- <!– <a-button @click="setupProj">999</a-button> –>-->
|
<!-- <!– <a-button @click="setupProj">999</a-button> –>-->
|
||||||
|
|
||||||
|
|
||||||
<a-modal v-model:open="editModalOpen" title="删除项目" @ok="DeleteProjects" okType="danger" cancelText="取消" ok-text="删除">
|
<a-modal v-model:open="editModalOpen" title="删除项目" @ok="DeleteProjects" okType="danger" cancelText="取消" ok-text="确定">
|
||||||
<a-table bordered :data-source="projList" :columns="columns" :pagination="pagination" :row-selection="rowSelection" :rowKey="record => record.id" >
|
<a-table bordered :data-source="projList" :columns="columns" :pagination="pagination" :row-selection="rowSelection" :rowKey="record => record.id" >
|
||||||
<template #bodyCell="{ column, text, record }">
|
<template #bodyCell="{ column, text, record }">
|
||||||
<template v-if="column.dataIndex === 'name'">
|
<template v-if="column.dataIndex === 'name'">
|
||||||
@ -123,7 +123,7 @@
|
|||||||
v-model:value="addForm.isFinish"
|
v-model:value="addForm.isFinish"
|
||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
@focus="focus"
|
@focus="focus"
|
||||||
@change="handleChange"
|
|
||||||
>
|
>
|
||||||
<a-select-option value="0">未开始</a-select-option>
|
<a-select-option value="0">未开始</a-select-option>
|
||||||
<a-select-option value="2">进行中</a-select-option>
|
<a-select-option value="2">进行中</a-select-option>
|
||||||
@ -206,6 +206,7 @@ function DeleteProject ( record) {
|
|||||||
// projList.value = projList.value.filter(item => item.key !== key);
|
// projList.value = projList.value.filter(item => item.key !== key);
|
||||||
}
|
}
|
||||||
function DeleteProjects(){
|
function DeleteProjects(){
|
||||||
|
editModalOpen.value = false
|
||||||
console.log('全部删除成功')
|
console.log('全部删除成功')
|
||||||
}
|
}
|
||||||
// 复选
|
// 复选
|
||||||
@ -301,12 +302,7 @@ const handleClickAll=(checked)=>{
|
|||||||
selectTags.value.forEach((item,index)=>{
|
selectTags.value.forEach((item,index)=>{
|
||||||
selectTags.value[index]=false
|
selectTags.value[index]=false
|
||||||
})
|
})
|
||||||
// 发送获取全部数据的请求
|
selectedTags.value = []
|
||||||
// request.projectGet(token).then(res=>{
|
|
||||||
//
|
|
||||||
// console.log(res.data.data)
|
|
||||||
// })
|
|
||||||
flush()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -349,17 +345,18 @@ const handleAdd=(publish)=>{
|
|||||||
addForm.value.file='{}'
|
addForm.value.file='{}'
|
||||||
console.log("addForm",addForm.value)
|
console.log("addForm",addForm.value)
|
||||||
request.projectAdd(token,addForm.value).then(res=>{
|
request.projectAdd(token,addForm.value).then(res=>{
|
||||||
|
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
//添加成功!
|
//添加成功!
|
||||||
//新增成功
|
//新增成功
|
||||||
|
// addModalOpen.value = false
|
||||||
message.success("新增模块成功")
|
message.success("新增模块成功")
|
||||||
//清空数据
|
//清空数据
|
||||||
addForm.description = ''
|
addForm.value.description = '';
|
||||||
addForm.name = ''
|
addForm.value.name = '';
|
||||||
addForm.cycle = ''
|
addForm.value.cycle = '';
|
||||||
addForm.status = ''
|
addForm.value.status = '';
|
||||||
addForm.isFinish = ''
|
addForm.value.isFinish = '';
|
||||||
|
addForm.value.workLoad ='';
|
||||||
//刷新页面
|
//刷新页面
|
||||||
flush()
|
flush()
|
||||||
}
|
}
|
||||||
@ -372,7 +369,7 @@ watch(() => selectedTags.value.length, async (newValue, oldValue) =>{
|
|||||||
selectedTags.value.forEach((item,index)=>{
|
selectedTags.value.forEach((item,index)=>{
|
||||||
data.tags.push(item)
|
data.tags.push(item)
|
||||||
})
|
})
|
||||||
console.log(selectedTags)
|
// console.log(selectedTags)
|
||||||
flush()
|
flush()
|
||||||
})
|
})
|
||||||
watch(() =>data.isFinish, async (newValue, oldValue) =>{
|
watch(() =>data.isFinish, async (newValue, oldValue) =>{
|
||||||
@ -456,9 +453,27 @@ function flush() {
|
|||||||
else if (routePath === '/WorkLoad/PersonalProject' ){
|
else if (routePath === '/WorkLoad/PersonalProject' ){
|
||||||
request.projectWorkGet(data,token).then((res)=>{
|
request.projectWorkGet(data,token).then((res)=>{
|
||||||
projList.value = res.data.data;
|
projList.value = res.data.data;
|
||||||
console.log("成功了:",projList.value)
|
console.log("成功了:",projList.value[0].id)
|
||||||
|
for (let i = 0; i < projList.value.length; i++) {
|
||||||
|
if (projList.value[i].tags === undefined || projList.value[i].tags === '') {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
projList.value[i].tags = JSON.parse(projList.value[i].tags).tags
|
||||||
|
}
|
||||||
|
console.log('查询到的所有项目88888',projList.value)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function RouterPath (id){
|
||||||
|
|
||||||
|
if(route.path ==="/Project"){
|
||||||
|
router.push('/ProjectMessage/'+id)
|
||||||
|
}else {
|
||||||
|
router.push('/WorkLoad/I_Responsible/ChildSystem/'+id)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user