对tenantManagement页面进行微调
This commit is contained in:
parent
5a52a58c0c
commit
bb6dc0999f
@ -67,9 +67,8 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import tenantService from "../../services/tenantService.js";
|
import tenantService from "../../services/tenantService.js";
|
||||||
import { onMounted, ref, defineComponent } from 'vue';
|
import {defineComponent, onMounted, ref} from 'vue';
|
||||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import type { Action } from 'element-plus'
|
|
||||||
|
|
||||||
interface Tenant {
|
interface Tenant {
|
||||||
symbol: string;
|
symbol: string;
|
||||||
@ -104,8 +103,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const data = await tenantService.getAll();
|
tableData.value = await tenantService.getAll();
|
||||||
tableData.value = data;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching organization:", error);
|
console.error("Error fetching organization:", error);
|
||||||
}
|
}
|
||||||
@ -129,11 +127,11 @@ export default defineComponent({
|
|||||||
const editFinished = async () => {
|
const editFinished = async () => {
|
||||||
try {
|
try {
|
||||||
await tenantService.update(formData.value);
|
await tenantService.update(formData.value);
|
||||||
ElMessageBox.alert('删除成功', '提示', {
|
await ElMessageBox.alert('删除成功', '提示', {
|
||||||
// if you want to disable its autofocus
|
// if you want to disable its autofocus
|
||||||
// autofocus: false,
|
// autofocus: false,
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
callback: (action: Action) => {
|
callback: (action) => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: `action: ${action}`,
|
message: `action: ${action}`,
|
||||||
@ -156,18 +154,18 @@ export default defineComponent({
|
|||||||
const handleDelete = async () => {
|
const handleDelete = async () => {
|
||||||
try{
|
try{
|
||||||
await tenantService.delete(formData.value);
|
await tenantService.delete(formData.value);
|
||||||
ElMessageBox.alert('删除成功', '提示', {
|
await ElMessageBox.alert('删除成功', '提示', {
|
||||||
// if you want to disable its autofocus
|
// if you want to disable its autofocus
|
||||||
// autofocus: false,
|
// autofocus: false,
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
callback: (action: Action) => {
|
callback: (action) => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: `action: ${action}`,
|
message: `action: ${action}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
fetchData();
|
await fetchData();
|
||||||
}catch(error){
|
}catch(error){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user