与后端接口进行首次联调
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { FormInstance,FormItemRule } from 'element-plus'
|
||||
import { ProTableInstance } from '@/components/ProTable/interface'
|
||||
import { ref,computed } from 'vue'
|
||||
import { Role } from '@/api/role/interface'
|
||||
import {dialogSmall} from '@/utils/elementBind'
|
||||
@@ -51,10 +52,11 @@
|
||||
} from '@/api/role/role'
|
||||
|
||||
const dictStore = useDictStore()
|
||||
const {dialogVisible,title,data,openType} = defineProps<{
|
||||
const {dialogVisible,title,data,openType,getTableList} = defineProps<{
|
||||
dialogVisible:boolean;
|
||||
title:string;
|
||||
openType:string;
|
||||
getTableList:Function;
|
||||
data:{
|
||||
id?: string; //角色类型ID
|
||||
name: string; //角色类型名称
|
||||
@@ -81,11 +83,9 @@
|
||||
}
|
||||
|
||||
const handleOK = () => {
|
||||
|
||||
console.log(data,11111)
|
||||
ElMessage.info('角色数据提交')
|
||||
try {
|
||||
formRuleRef.value?.validate((valid: boolean) => {
|
||||
try {
|
||||
formRuleRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
// 将表单数据转为json,发送到后端
|
||||
// let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
||||
@@ -96,7 +96,7 @@
|
||||
if(res.code === "200")
|
||||
{
|
||||
ElMessage.success(res.message)
|
||||
updataList()
|
||||
getTableList()
|
||||
}
|
||||
else
|
||||
ElMessage.error(res.message)
|
||||
@@ -109,7 +109,7 @@
|
||||
if(res.code === "200")
|
||||
{
|
||||
ElMessage.success(res.message)
|
||||
updataList()
|
||||
getTableList()
|
||||
}
|
||||
else
|
||||
ElMessage.error(res.message)
|
||||
|
||||
Reference in New Issue
Block a user