应该解决了结项不刷新的问题

main
wuyize 2022-07-14 11:33:23 +08:00
parent dabacedb76
commit 1c06677a21
1 changed files with 22 additions and 21 deletions

View File

@ -67,6 +67,7 @@
import {getCurrentInstance, onMounted, ref, watch} from "vue";
import {useRouter} from 'vue-router'
import request from "../utils/request";
import {ElMessage} from "element-plus";
const tableRef = ref(null);
// table
@ -164,6 +165,26 @@ watch(
{immediate: true}
)
const onCloseProject = (row) => {
request({
url: 'project/complete',
method: 'post',
data: {
projectId: row.projectId,
}
}).then(response => {
if (response.data.code === 200) {
//console.log(response.data.data.records)
ElMessage({
message: '结项成功',
type: 'success',
})
getProjects();
}
}).catch(function (error) {
console.log(error)
})
},
</script>
<script>
import {ElMessage} from "element-plus";
@ -211,27 +232,7 @@ export default {
this.dialogFormVisible = true
},
onCloseProject(row) {
const that = this
request({
url: 'project/complete',
method: 'post',
data: {
projectId: row.projectId,
}
}).then(response => {
if (response.data.code === 200) {
//console.log(response.data.data.records)
ElMessage({
message: '结项成功',
type: 'success',
})
that.getProjects();
}
}).catch(function (error) {
console.log(error)
})
},
getProjectClass() {