页面功能测试修改
This commit is contained in:
parent
2d616b03ab
commit
c1faa8ac90
@ -130,7 +130,7 @@ const router = createRouter({
|
||||
},
|
||||
|
||||
{
|
||||
path: '/ProjectMessage',
|
||||
path: '/ProjectMessage/:id',
|
||||
name: 'MainMessageCustom',
|
||||
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 {onMounted, reactive, ref} from "vue";
|
||||
import request from "@/js/request.js";
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
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({
|
||||
id: id,
|
||||
tags: [],
|
||||
|
@ -31,12 +31,12 @@
|
||||
<div class="flex flex-wrap justify-start ">
|
||||
<ProjectCard
|
||||
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>
|
||||
<a-float-button-group v-show="routePath === '/WorkLoad/I_Responsible'" trigger="hover" type="primary" :style="{ right: '94px' }">
|
||||
<!-- 菜单-->
|
||||
<template #icon>
|
||||
<template #icon >
|
||||
<!-- <CommentOutlined />-->
|
||||
<EditOutlined />
|
||||
</template>
|
||||
@ -71,7 +71,7 @@
|
||||
<!-- <!– <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" >
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'name'">
|
||||
@ -123,7 +123,7 @@
|
||||
v-model:value="addForm.isFinish"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="handleChange"
|
||||
|
||||
>
|
||||
<a-select-option value="0">未开始</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);
|
||||
}
|
||||
function DeleteProjects(){
|
||||
editModalOpen.value = false
|
||||
console.log('全部删除成功')
|
||||
}
|
||||
// 复选
|
||||
@ -301,12 +302,7 @@ const handleClickAll=(checked)=>{
|
||||
selectTags.value.forEach((item,index)=>{
|
||||
selectTags.value[index]=false
|
||||
})
|
||||
// 发送获取全部数据的请求
|
||||
// request.projectGet(token).then(res=>{
|
||||
//
|
||||
// console.log(res.data.data)
|
||||
// })
|
||||
flush()
|
||||
selectedTags.value = []
|
||||
}
|
||||
|
||||
}
|
||||
@ -349,17 +345,18 @@ const handleAdd=(publish)=>{
|
||||
addForm.value.file='{}'
|
||||
console.log("addForm",addForm.value)
|
||||
request.projectAdd(token,addForm.value).then(res=>{
|
||||
|
||||
if (res.data.code === 200) {
|
||||
//添加成功!
|
||||
//新增成功
|
||||
// addModalOpen.value = false
|
||||
message.success("新增模块成功")
|
||||
//清空数据
|
||||
addForm.description = ''
|
||||
addForm.name = ''
|
||||
addForm.cycle = ''
|
||||
addForm.status = ''
|
||||
addForm.isFinish = ''
|
||||
addForm.value.description = '';
|
||||
addForm.value.name = '';
|
||||
addForm.value.cycle = '';
|
||||
addForm.value.status = '';
|
||||
addForm.value.isFinish = '';
|
||||
addForm.value.workLoad ='';
|
||||
//刷新页面
|
||||
flush()
|
||||
}
|
||||
@ -372,7 +369,7 @@ watch(() => selectedTags.value.length, async (newValue, oldValue) =>{
|
||||
selectedTags.value.forEach((item,index)=>{
|
||||
data.tags.push(item)
|
||||
})
|
||||
console.log(selectedTags)
|
||||
// console.log(selectedTags)
|
||||
flush()
|
||||
})
|
||||
watch(() =>data.isFinish, async (newValue, oldValue) =>{
|
||||
@ -456,9 +453,27 @@ function flush() {
|
||||
else if (routePath === '/WorkLoad/PersonalProject' ){
|
||||
request.projectWorkGet(data,token).then((res)=>{
|
||||
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>
|
Loading…
x
Reference in New Issue
Block a user