This commit is contained in:
qsh
2024-07-26 17:51:35 +08:00
parent b2a7fa8dc4
commit 2be616917e
13 changed files with 424 additions and 25 deletions

View File

@@ -10,7 +10,7 @@
<el-form-item label="服务类型" prop="serviceId">
<el-select v-model="formData.serviceId" placeholder="选择服务类型" filterable>
<el-option
v-for="item in appList"
v-for="item in props.appList"
:key="item.serviceId"
:label="item.serviceName"
:value="item.serviceId"
@@ -124,6 +124,10 @@ const { wsCache } = useCache()
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
const props = defineProps({
appList: Object as any
})
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中1修改时的数据加载2提交的按钮禁用
@@ -159,7 +163,6 @@ const open = async (type: string, id?: number, parentId?: number) => {
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
getOptions()
if (parentId) {
formData.value.parentId = parentId
}
@@ -177,13 +180,6 @@ const open = async (type: string, id?: number, parentId?: number) => {
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const appList = ref([])
const getOptions = () => {
MenuApi.getServiceAppList().then((data) => {
appList.value = data
})
}
/** 提交表单 */
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
const submitForm = async () => {