From 52bebd6e42bc7daa6f7118656be6de95b36b8576 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A6=96=E5=A7=90?= <2981176548@qq.com>
Date: Sun, 17 Mar 2024 01:34:55 +0800
Subject: [PATCH] edit
---
src/js/request.js | 17 +++
src/router/index.js | 9 +-
src/views/WorkLoadPage/IChildModule.vue | 107 ++++++++++++++++++
.../WorkLoadPage/I_Manage_ChildSystem.vue | 93 ++++++++-------
src/views/WorkLoadPage/PersonalProject.vue | 2 +-
5 files changed, 178 insertions(+), 50 deletions(-)
create mode 100644 src/views/WorkLoadPage/IChildModule.vue
diff --git a/src/js/request.js b/src/js/request.js
index c58bda8..b7c7746 100644
--- a/src/js/request.js
+++ b/src/js/request.js
@@ -718,6 +718,22 @@ const moduleGetBySysId = (sysId, token) => {
}
})
}*/
+
+
+const moduleDelete = (id ,token) =>{
+ return axios({
+ url: api + "/module/delete/{id}",
+ method: "delete",
+ params: {
+ id: id
+ },
+ headers: {
+ 'Authorization':'Bearer '+token,
+ 'Content-Type': 'application/json;charset=utf-8',
+ 'Timestamp': getCurrentTimestamp()
+ }
+ })
+}
export default {
login,
@@ -762,6 +778,7 @@ export default {
moduleGetByProjectId,
moduleGetBySysId,
+ moduleDelete,
messageGet,
diff --git a/src/router/index.js b/src/router/index.js
index c540c1f..60bb859 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -70,6 +70,11 @@ const router = createRouter({
name: 'WorkLoad/I_Manage/ChildModule',
component: () => import('@/views/WorkLoadPage/ChildModule.vue')
},
+ {
+ path: '/WorkLoad/I_Manage/IChildModule',
+ name: 'Workload/IChildModule',
+ component: () => import('@/views/WorkLoadPage/IChildModule.vue')
+ },
{
path: '/WorkLoad/I_Manage/UserManageModule',
name: 'WorkLoadI_ManageUserManageModule',
@@ -86,8 +91,8 @@ const router = createRouter({
component: () => import('@/views/WorkLoadPage/AuthorityManageModule.vue')
},
{
- path: '/WorkLoad/I_Manage/ChildSystem',
- name: 'WorkLoad/I_Manage/ChildSystem',
+ path: '/WorkLoad/I_Manage/I_Manage_ChildSystem',
+ name: 'WorkLoad/I_Manage/IChildSystem',
component: () => import('@/views/WorkLoadPage/I_Manage_ChildSystem.vue')
},
{
diff --git a/src/views/WorkLoadPage/IChildModule.vue b/src/views/WorkLoadPage/IChildModule.vue
new file mode 100644
index 0000000..1ea0a19
--- /dev/null
+++ b/src/views/WorkLoadPage/IChildModule.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
子系统名称:后台管理系统
+
子系统周期:10天
+
项目开始时间:
+
项目完成时间:
+
+
+
+
+
+
+
{{ChildModule.name}}
+
负责人: 无
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 进行中
+ 未开始
+ 已完成
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/WorkLoadPage/I_Manage_ChildSystem.vue b/src/views/WorkLoadPage/I_Manage_ChildSystem.vue
index 0b2fcd9..602845a 100644
--- a/src/views/WorkLoadPage/I_Manage_ChildSystem.vue
+++ b/src/views/WorkLoadPage/I_Manage_ChildSystem.vue
@@ -1,11 +1,11 @@
- 我管理的项目
+ 我的项目
子系统
-
+
@@ -28,11 +28,18 @@
{{ChildSystem.name}}
-
@@ -63,45 +70,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
@@ -115,6 +92,7 @@
import {onMounted, reactive, ref, watch} from "vue";
import request from "@/js/request.js";
import router from "@/router/index.js";
+import {CloseOutlined} from '@ant-design/icons-vue';
const showButton = reactive([]);
const AddModule = ref(false)
@@ -135,12 +113,15 @@ const ChildProjects = reactive({
principalUser: ''
}]
}); // 使用ref创建响应式数据
-const ChildSystems = ref([]);
+const ChildSystems = ref([
+
+]);
const data =reactive({
is:1,
id:null,
tags:[],
- isFinish:[0,1,2,-1]
+ isFinish:[0,1,2,-1],
+ editing:true
})
onMounted(() => {
@@ -161,7 +142,7 @@ onMounted(() => {
function EnterChildModule(ChildSystem){
console.log(ChildSystem.id)
window.localStorage.setItem('id',ChildSystem.id)
- router.push('/workLoad/I_Manage/ChildModule')
+ router.push("/WorkLoad/IChildModule")
}
// 打开add窗口
watch(() => AddModule.value, () => {
@@ -184,14 +165,6 @@ const formData = reactive({
projectId: '',
// pid: ''
});
-// const dataToSend = {
-// name: formData.value.name,
-// status: formData.value.status,
-// cycle: formData.value.cycle,
-// workLoad: formData.value.workLoad,
-// responsiblePerson: formData.value.responsiblePerson,
-// description: formData.value.description,
-// };
const handleAdd = () => {
// 获取表单数据
@@ -205,4 +178,30 @@ const handleAdd = () => {
// 关闭模态框
AddModule.value = false;
};
+
+
+
+// 编辑
+
+// const editing =ref(false) // 添加editing属性,默认为false
+function toggleEditing(index) {
+ // ChildSystems[index].editing = !ChildSystems[index].editing;
+ // console.log(editing.value)
+ console.log(6666666666)
+ data.editing =false
+
+ console.log(editing.value)
+}
+const openDelete = ref(false)
+function deleteCard(index) {
+
+ openDelete.value = true;
+ ChildSystems.splice(index, 1);
+}
+function DeleteOk() {
+ request.moduleDelete(id, token).then((res) => {
+ console.log("childModules:", res)
+ })
+ openDelete.value = false;
+}
\ No newline at end of file
diff --git a/src/views/WorkLoadPage/PersonalProject.vue b/src/views/WorkLoadPage/PersonalProject.vue
index 06d0650..63a4e69 100644
--- a/src/views/WorkLoadPage/PersonalProject.vue
+++ b/src/views/WorkLoadPage/PersonalProject.vue
@@ -175,7 +175,7 @@ function getMyselfProject(){
function MainMessage(project) {
console.log(project.id)
window.localStorage.setItem('id',project.id)
- router.push('/WorkLoad/I_Manage/ChildSystem')
+ router.push('/WorkLoad/I_Manage/I_Manage_ChildSystem')
}