兰宝车间质量管理系统-前端
LiuHao
2023-06-06 6af68085ff6615e1ec3a5dd18c761250800d6fca
src/views/system/tenant/index.vue
@@ -145,8 +145,6 @@
import { selectTenantPackage } from '@/api/system/tenantPackage';
import { TenantForm, TenantQuery, TenantVO } from '@/api/system/tenant/types';
import { TenantPkgVO } from '@/api/system/tenantPackage/types';
import { ComponentInternalInstance } from 'vue';
import { ElForm } from 'element-plus';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -160,8 +158,8 @@
const multiple = ref(true);
const total = ref(0);
const queryFormRef = ref(ElForm);
const tenantFormRef = ref(ElForm);
const queryFormRef = ref<ElFormInstance>();
const tenantFormRef = ref<ElFormInstance>();
const dialog = reactive<DialogOption>({
    visible: false,
@@ -253,7 +251,7 @@
// 表单重置
const reset = () => {
    form.value = {...initFormData};
    tenantFormRef.value.resetFields();
    tenantFormRef.value?.resetFields();
}
/** 搜索按钮操作 */
@@ -264,7 +262,7 @@
/** 重置按钮操作 */
const resetQuery = () => {
    queryFormRef.value.resetFields();
    queryFormRef.value?.resetFields();
    handleQuery();
}
@@ -292,7 +290,7 @@
    dialog.title = "修改租户";
    nextTick(async () => {
        reset();
        getTenantPackage();
        await getTenantPackage();
        const _id = row?.id || ids.value[0];
        const res = await getTenant(_id);
        loading.value = false;
@@ -302,7 +300,7 @@
/** 提交按钮 */
const submitForm = () => {
    tenantFormRef.value.validate(async (valid: boolean) => {
    tenantFormRef.value?.validate(async (valid: boolean) => {
        if (valid) {
            buttonLoading.value = true;
            if (form.value.id) {
@@ -323,7 +321,7 @@
    await proxy?.$modal.confirm('是否确认删除租户编号为"' + _ids + '"的数据项?')
    loading.value = true;
    await delTenant(_ids).finally(() => loading.value = false);
    getList();
    await getList();
    proxy?.$modal.msgSuccess("删除成功");
@@ -335,7 +333,7 @@
        await proxy?.$modal.confirm('是否确认同步租户套餐租户编号为"' + row.tenantId + '"的数据项?');
        loading.value = true;
        await syncTenantPackage(row.tenantId, row.packageId);
        getList();
        await getList();
        proxy?.$modal.msgSuccess("同步成功");
    } catch {return} finally {
        loading.value = false;