From 8b1de8b87d81cb5c4b3c207e10195f392ed330cc Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 13 十二月 2024 17:56:02 +0800
Subject: [PATCH] 任务驳回功能基础实现
---
src/views/projectManage/plan/planInfo.vue | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/views/projectManage/plan/planInfo.vue b/src/views/projectManage/plan/planInfo.vue
index 0644e12..b8451ad 100644
--- a/src/views/projectManage/plan/planInfo.vue
+++ b/src/views/projectManage/plan/planInfo.vue
@@ -7,7 +7,6 @@
<el-card shadow="hover">
<el-row :gutter="20">
<el-col :span="24" class="mb-4">
- <el-button type="primary" size="small" @click="handlePlanRecord" style="float: right; margin-bottom: 10px; margin-left: 10px">杩斿洖</el-button>
<el-button type="primary" size="small" @click="handleAdd" style="float: right; margin-bottom: 10px">鏂板</el-button>
<el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px">
<el-table-column prop="index" label="搴忓彿" width="50" align="center">
@@ -77,7 +76,7 @@
import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index";
export default {
- name: "PlanInfo",
+ name: "planInfo",
data() {
return {
loading: true,
@@ -101,7 +100,9 @@
}
}
},
-
+ created() {
+ this.getProjectInfoData();
+ },
methods: {
// 椤甸潰鍔犺浇
search() {
@@ -110,8 +111,8 @@
// 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
getProjectInfoData() {
// 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
- this.projectInfoData = this.$route.query.projectInfoData
- this.planInfoData = this.$route.query.data
+ this.projectInfoData = JSON.parse(this.$route.query.projectInfoData)
+ this.planInfoData = JSON.parse(this.$route.query.data)
this.search();
},
// 鑾峰彇椤圭洰璁″垝椤�
@@ -166,8 +167,8 @@
// 淇濆瓨褰撳墠琛屾暟鎹�
handleSave(index) {
this.tableData[index].projectPlanRecordId = this.projectInfoData.id;
- savePlanInfo(this.tableData[index]).then(response => {
- this.search();
+ console.log(this.tableData[index])
+ savePlanInfo(this.tableData[index], this.planInfoData.id).then(response => {
this.$message.success('淇濆瓨鎴愬姛');
});
},
@@ -176,13 +177,10 @@
this.$router.push({
path: '/projectManage/planRecord',
query: {
- data: this.projectInfoData
+ data: JSON.stringify(this.projectInfoData)
}
})
}
- },
- created() {
- this.getProjectInfoData();
},
};
</script>
--
Gitblit v1.8.0