This commit is contained in:
Pengxiansen
2025-02-19 14:03:57 +08:00
parent 44b5722e44
commit 9af14d3396
6 changed files with 140 additions and 83 deletions

View File

@@ -146,7 +146,7 @@
<script>
import { reactive, toRefs, watch, ref } from "vue";
import { getGrowStudentDetail } from "@/api/growthpath";
import { getGrowStudentDetail, markComplete } from "@/api/growthpath";
import { message } from "ant-design-vue";
import { TASK_TYPE } from "@/utils/constGrown";
import { checkGrowthPer } from "@/utils/utils";
@@ -233,10 +233,15 @@ export default {
slots: { customRender: "action" },
},
]);
const formData = ref()
const openDrawer = (row) => {
state.seevisible = true;
formData.value = row
getData();
};
const getData = () => {
state.loading = true;
getGrowStudentDetail({ id: row.id })
getGrowStudentDetail({ id: formData.value.id })
.then((res) => {
state.loading = false;
state.info = res.data.data;
@@ -250,11 +255,20 @@ export default {
state.seevisible = false;
};
const setPermissions = (row) => {
markComplete({ id: row.id }).then((res) => {
getData();
message.success("操作成功");
});
};
return {
...toRefs(state),
closeDrawer,
openDrawer,
setPermissions,
columns,
getData,
formData,
checkGrowthPer,
};
},