diff --git a/src/views/common/push/pushApplication/application.data.ts b/src/views/common/push/pushApplication/application.data.ts index 14252d9..ddca0c3 100644 --- a/src/views/common/push/pushApplication/application.data.ts +++ b/src/views/common/push/pushApplication/application.data.ts @@ -2,6 +2,12 @@ import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; import { h } from 'vue'; import { Tag } from 'ant-design-vue'; +import { listPushFile } from '/@/api/platform/common/controller/pushFile'; +import { useUserStore } from '/@/store/modules/user'; +import { listPushCustomType } from '/@/api/platform/common/controller/pushCustomType'; + +const userStore = useUserStore(); +const userInfoStore = userStore.getUserInfo; /** 表格列配置 */ export const columns: BasicColumn[] = [ @@ -156,20 +162,33 @@ export const sendFormSchema: FormSchema[] = [ } }, { - label: '自定义播放文件名称', field: 'customPlayFileName', - component: 'Input', - colProps: { - span: 24 - } + label: '播放文件名称', + component: 'ApiSelect', + componentProps: { + api: listPushFile, + params: { + size: 99, + createById: userInfoStore.id + }, + labelField: 'original', + valueField: 'original', + resultField: 'data' + }, }, { field: 'customTypeId', label: '自定义推送类型ID', - component: 'Input', - colProps: { - span: 12 - } + component: 'ApiSelect', + componentProps: { + api: listPushCustomType, + params: { + size: 99 + }, + labelField: 'name', + valueField: 'id', + resultField: 'data' + }, }, { field: 'playVibrate', diff --git a/src/views/common/push/pushCustomType/customType.data.ts b/src/views/common/push/pushCustomType/customType.data.ts index c14bd6e..0975e1c 100644 --- a/src/views/common/push/pushCustomType/customType.data.ts +++ b/src/views/common/push/pushCustomType/customType.data.ts @@ -1,5 +1,10 @@ import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; +import { listPushFile } from '/@/api/platform/common/controller/pushFile'; +import {useUserStore} from '/@/store/modules/user'; + +const userStore = useUserStore(); +const userInfoStore = userStore.getUserInfo; /** 表格列配置 */ export const columns: BasicColumn[] = [ @@ -124,10 +129,16 @@ export const formSchema: FormSchema[] = [ { field: 'customPlayFileName', label: '播放文件名称', - component: 'Input', - required: true, - colProps: { - span: 24 - } + component: 'ApiSelect', + componentProps: { + api: listPushFile, + params: { + size: 99, + createById: userInfoStore.id + }, + labelField: 'original', + valueField: 'original', + resultField: 'data' + }, }, ];