Add delete model to worker dms
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
e88194eb88
commit
39af4278a6
|
@ -28,6 +28,10 @@ const $props = defineProps({
|
|||
type: String,
|
||||
default: null,
|
||||
},
|
||||
deleteModel: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
downloadModel: {
|
||||
type: String,
|
||||
required: false,
|
||||
|
@ -240,7 +244,7 @@ function deleteDms(dmsFk) {
|
|||
},
|
||||
})
|
||||
.onOk(async () => {
|
||||
await axios.post(`${$props.model}/${dmsFk}/removeFile`);
|
||||
await axios.post($props.deleteModel ?? `${$props.model}/${dmsFk}/removeFile`);
|
||||
const index = rows.value.findIndex((row) => row.id == dmsFk);
|
||||
rows.value.splice(index, 1);
|
||||
});
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<script setup>
|
||||
import VnDmsList from 'src/components/common/VnDmsList.vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
const route = useRoute();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnDmsList
|
||||
model="WorkerDms"
|
||||
:model="`WorkerDms/${route.params.id}/filter`"
|
||||
update-model="Workers"
|
||||
:delete-model="`WorkerDms/${route.params.id}/removeFile`"
|
||||
download-model="WorkerDms"
|
||||
default-dms-code="hhrrData"
|
||||
filter="worker"
|
||||
|
|
Loading…
Reference in New Issue