From a8bbc107d0b507a8764523bc7c1860e5abbcdd0e Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Mon, 27 Feb 2023 20:09:29 +0800 Subject: [PATCH] =?UTF-8?q?:rocket:=20=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../push/pushApplication/application.data.ts | 37 ++++++++++++++----- .../push/pushCustomType/customType.data.ts | 21 ++++++++--- 2 files changed, 44 insertions(+), 14 deletions(-) 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' + }, }, ];