添加了添加/修改/删除的成功失败提示框,删除了无用的import和语句

This commit is contained in:
MiLla 2024-07-06 14:27:22 +08:00
parent 8035ea0767
commit 10e6d1025e

View File

@ -101,7 +101,6 @@
<script lang="ts"> <script lang="ts">
import {ref, onMounted, defineComponent} from 'vue'; import {ref, onMounted, defineComponent} from 'vue';
import organizationService from '../../services/organizationService'; import organizationService from '../../services/organizationService';
import {useStore} from 'vuex';
import {ElMessage, ElMessageBox} from "element-plus"; import {ElMessage, ElMessageBox} from "element-plus";
@ -120,7 +119,6 @@ interface Organization {
export default defineComponent({ export default defineComponent({
setup() { setup() {
const store = useStore();
const showTable = ref(true); const showTable = ref(true);
const show = ref(false); const show = ref(false);
const showDialogAdd = ref(false); const showDialogAdd = ref(false);
@ -138,9 +136,6 @@ export default defineComponent({
organizationStatus: true, organizationStatus: true,
} }
); );
const dialogFormPerson = ref({
});
const originTableData = ref<Organization[]>([]); const originTableData = ref<Organization[]>([]);
const tableData = ref<Organization[]>([]); const tableData = ref<Organization[]>([]);
@ -211,7 +206,7 @@ export default defineComponent({
organizationService.addOrganization(dialogFormAdd.value); organizationService.addOrganization(dialogFormAdd.value);
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: `添加成功`, message: `成功`,
}) })
showDialogAdd.value = false; showDialogAdd.value = false;
@ -251,7 +246,7 @@ export default defineComponent({
.catch(() => { .catch(() => {
ElMessage({ ElMessage({
type: 'info', type: 'info',
message: 'Delete canceled', message: '取消删除',
}) })
}) })
@ -282,7 +277,6 @@ export default defineComponent({
}) })
const handleSearch = () => { const handleSearch = () => {
console.log('搜索', search.value); console.log('搜索', search.value);
// if(search.value.name != ''){
tableData.value = noChildrenData.value.filter( tableData.value = noChildrenData.value.filter(
(data) => { (data) => {
const isNameValid = search.value && search.value.name; const isNameValid = search.value && search.value.name;