fix: 拆分商户新增和编辑权限
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { useDictStore } from '@/store/modules/dict';
|
||||
import { Edit, View } from '@/api/imTenant';
|
||||
import { Add, Edit, View } from '@/api/imTenant';
|
||||
import { newState, rules, State } from './model';
|
||||
import { useProjectSettingStore } from '@/store/modules/projectSetting';
|
||||
import { useMessage } from 'naive-ui';
|
||||
@@ -152,7 +152,8 @@
|
||||
formRef.value.validate((errors) => {
|
||||
if (!errors) {
|
||||
formBtnLoading.value = true;
|
||||
Edit(formValue.value)
|
||||
const submit = formValue.value.id > 0 ? Edit : Add;
|
||||
submit(formValue.value)
|
||||
.then((_res) => {
|
||||
message.success('操作成功');
|
||||
closeForm();
|
||||
|
||||
Reference in New Issue
Block a user