45 changed files with 760 additions and 977 deletions
@ -1,25 +0,0 @@ |
|||||||
/** |
|
||||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import type { PushBlacklist, PushBlacklistParams, PushBlacklistResult } from '/@/api/platform/common/entity/pushBlacklist'; |
|
||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
|
|
||||||
enum Api { |
|
||||||
list = '/common_proxy/common/pushCertification/list', |
|
||||||
add = '/common_proxy/common/pushCertification/save', |
|
||||||
get = '/common_proxy/common/pushCertification', |
|
||||||
edit = '/common_proxy/common/pushCertification/update', |
|
||||||
del = '/common_proxy/common/pushCertification/remove', |
|
||||||
} |
|
||||||
|
|
||||||
export const listPushBlacklist = (params?: Partial<PushBlacklistParams>) => defHttp.get<PushBlacklistResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
|
||||||
|
|
||||||
export const addPushBlacklist = (params: Partial<PushBlacklist>) => defHttp.post({ url: Api.add, data: params }); |
|
||||||
|
|
||||||
export const editPushBlacklist = (params: Partial<PushBlacklist>) => defHttp.put({ url: Api.edit, data: params }); |
|
||||||
|
|
||||||
export const getPushBlacklist = (id: string) => defHttp.get<PushBlacklist>({ url: `${Api.get}/${id}` }); |
|
||||||
|
|
||||||
export const delPushBlacklist = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
|
@ -1,25 +0,0 @@ |
|||||||
/** |
|
||||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import type { PushCertification, PushCertificationParams, PushCertificationResult } from '/@/api/platform/common/entity/pushCertification'; |
|
||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
|
|
||||||
enum Api { |
|
||||||
list = '/common_proxy/common/pushCertification/list', |
|
||||||
add = '/common_proxy/common/pushCertification/save', |
|
||||||
get = '/common_proxy/common/pushCertification', |
|
||||||
edit = '/common_proxy/common/pushCertification/update', |
|
||||||
del = '/common_proxy/common/pushCertification/remove', |
|
||||||
} |
|
||||||
|
|
||||||
export const listPushCertification = (params?: Partial<PushCertificationParams>) => defHttp.get<PushCertificationResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
|
||||||
|
|
||||||
export const addPushCertification = (params: Partial<PushCertification>) => defHttp.post({ url: Api.add, data: params }); |
|
||||||
|
|
||||||
export const editPushCertification = (params: Partial<PushCertification>) => defHttp.put({ url: Api.edit, data: params }); |
|
||||||
|
|
||||||
export const getPushCertification = (id: string) => defHttp.get<PushCertification>({ url: `${Api.get}/${id}` }); |
|
||||||
|
|
||||||
export const delPushCertification = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
|
@ -0,0 +1,25 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import type { PushCustomType, PushCustomTypeParams, PushCustomTypeResult } from '/@/api/platform/common/entity/pushCustomType'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/common_proxy/common/pushCustomType/list', |
||||||
|
add = '/common_proxy/common/pushCustomType/save', |
||||||
|
get = '/common_proxy/common/pushCustomType', |
||||||
|
edit = '/common_proxy/common/pushCustomType/update', |
||||||
|
del = '/common_proxy/common/pushCustomType/remove', |
||||||
|
} |
||||||
|
|
||||||
|
export const listPushCustomType = (params?: Partial<PushCustomTypeParams>) => defHttp.get<PushCustomTypeResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
export const addPushCustomType = (params: Partial<PushCustomType>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
export const editPushCustomType = (params: Partial<PushCustomType>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
export const getPushCustomType = (id: string) => defHttp.get<PushCustomType>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
export const delPushCustomType = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -1,25 +0,0 @@ |
|||||||
/** |
|
||||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import type { PushManage, PushManageParams } from '/@/api/platform/common/entity/pushManage'; |
|
||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
|
|
||||||
enum Api { |
|
||||||
list = '/common_proxy/common/pushManage/list', |
|
||||||
add = '/common_proxy/common/pushManage/save', |
|
||||||
get = '/common_proxy/common/pushManage', |
|
||||||
edit = '/common_proxy/common/pushManage/update', |
|
||||||
del = '/common_proxy/common/pushManage/remove', |
|
||||||
} |
|
||||||
|
|
||||||
export const listPushManage = (params?: Partial<PushManageParams>) => defHttp.get({ url: Api.list, params }); |
|
||||||
|
|
||||||
export const addPushManage = (params: Partial<PushManage>) => defHttp.post({ url: Api.add, data: params }); |
|
||||||
|
|
||||||
export const editPushManage = (params: Partial<PushManage>) => defHttp.put({ url: Api.edit, data: params }); |
|
||||||
|
|
||||||
export const getPushManage = (id: string) => defHttp.get<PushManage>({ url: `${Api.get}/${id}` }); |
|
||||||
|
|
||||||
export const delPushManage = (id: string) => defHttp.delete({ url: `${Api.del}/${id}` }); |
|
@ -0,0 +1,25 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import type { PushPassList, PushPassListParams, PushPassListResult } from '/@/api/platform/common/entity/pushPassList'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/common_proxy/common/pushPassList/list', |
||||||
|
add = '/common_proxy/common/pushPassList/save', |
||||||
|
get = '/common_proxy/common/pushPassList', |
||||||
|
edit = '/common_proxy/common/pushPassList/update', |
||||||
|
del = '/common_proxy/common/pushPassList/remove', |
||||||
|
} |
||||||
|
|
||||||
|
export const listPushPassList = (params?: Partial<PushPassListParams>) => defHttp.get<PushPassListResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
export const addPushPassList = (params: Partial<PushPassList>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
export const editPushPassList = (params: Partial<PushPassList>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
export const getPushPassList = (id: string) => defHttp.get<PushPassList>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
export const delPushPassList = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,25 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import type { PushThirdParty, PushThirdPartyParams, PushThirdPartyResult } from '/@/api/platform/common/entity/pushThirdParty'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/common_proxy/common/pushThirdParty/list', |
||||||
|
add = '/common_proxy/common/pushThirdParty/save', |
||||||
|
get = '/common_proxy/common/pushThirdParty', |
||||||
|
edit = '/common_proxy/common/pushThirdParty/update', |
||||||
|
del = '/common_proxy/common/pushThirdParty/remove', |
||||||
|
} |
||||||
|
|
||||||
|
export const listPushThirdParty = (params?: Partial<PushThirdPartyParams>) => defHttp.get<PushThirdPartyResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
export const addPushThirdParty = (params: Partial<PushThirdParty>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
export const editPushThirdParty = (params: Partial<PushThirdParty>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
export const getPushThirdParty = (id: string) => defHttp.get<PushThirdParty>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
export const delPushThirdParty = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,25 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import type { PushThirdPartyManage, PushThirdPartyManageParams, PushThirdPartyManageResult } from '/@/api/platform/common/entity/pushThirdPartyManage'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/common_proxy/common/pushThirdPartyManage/list', |
||||||
|
add = '/common_proxy/common/pushThirdPartyManage/save', |
||||||
|
get = '/common_proxy/common/pushThirdPartyManage', |
||||||
|
edit = '/common_proxy/common/pushThirdPartyManage/update', |
||||||
|
del = '/common_proxy/common/pushThirdPartyManage/remove', |
||||||
|
} |
||||||
|
|
||||||
|
export const listPushThirdPartyManage = (params?: Partial<PushThirdPartyManageParams>) => defHttp.get<PushThirdPartyManageResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
export const addPushThirdPartyManage = (params: Partial<PushThirdPartyManage>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
export const editPushThirdPartyManage = (params: Partial<PushThirdPartyManage>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
export const getPushThirdPartyManage = (id: string) => defHttp.get<PushThirdPartyManage>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
export const delPushThirdPartyManage = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -1,25 +0,0 @@ |
|||||||
/** |
|
||||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import type { PushTodoAuth, PushTodoAuthParams, PushTodoAuthResult } from '/@/api/platform/common/entity/pushTodoAuth'; |
|
||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
|
|
||||||
enum Api { |
|
||||||
list = '/common_proxy/common/pushTodoAuth/list', |
|
||||||
add = '/common_proxy/common/pushTodoAuth/save', |
|
||||||
get = '/common_proxy/common/pushTodoAuth', |
|
||||||
edit = '/common_proxy/common/pushTodoAuth/update', |
|
||||||
del = '/common_proxy/common/pushTodoAuth/remove', |
|
||||||
} |
|
||||||
|
|
||||||
export const listPushTodoAuth = (params?: Partial<PushTodoAuthParams>) => defHttp.get<PushTodoAuthResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
|
||||||
|
|
||||||
export const addPushTodoAuth = (params: Partial<PushTodoAuth>) => defHttp.post({ url: Api.add, data: params }); |
|
||||||
|
|
||||||
export const editPushTodoAuth = (params: Partial<PushTodoAuth>) => defHttp.put({ url: Api.edit, data: params }); |
|
||||||
|
|
||||||
export const getPushTodoAuth = (id: string) => defHttp.get<PushTodoAuth>({ url: `${Api.get}/${id}` }); |
|
||||||
|
|
||||||
export const delPushTodoAuth = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
|
@ -1,25 +0,0 @@ |
|||||||
/** |
|
||||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import type { PushType, PushTypeParams, PushTypeResult } from '/@/api/platform/common/entity/pushType'; |
|
||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
|
|
||||||
enum Api { |
|
||||||
list = '/common_proxy/common/pushType/list', |
|
||||||
add = '/common_proxy/common/pushType/save', |
|
||||||
get = '/common_proxy/common/pushType', |
|
||||||
edit = '/common_proxy/common/pushType/update', |
|
||||||
del = '/common_proxy/common/pushType/remove', |
|
||||||
} |
|
||||||
|
|
||||||
export const listPushType= (params?: Partial<PushTypeParams>) => defHttp.get<PushTypeResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
|
||||||
|
|
||||||
export const addPushType = (params: Partial<PushType>) => defHttp.post({ url: Api.add, data: params }); |
|
||||||
|
|
||||||
export const editPushType = (params: Partial<PushType>) => defHttp.put({ url: Api.edit, data: params }); |
|
||||||
|
|
||||||
export const getPushType = (id: string) => defHttp.get<PushType>({ url: `${Api.get}/${id}` }); |
|
||||||
|
|
||||||
export const delPushType = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
|
@ -0,0 +1,25 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import type { PushUserManage, PushUserManageParams, PushUserManageResult } from '/@/api/platform/common/entity/pushUserManage'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/common_proxy/common/pushUserManage/list', |
||||||
|
add = '/common_proxy/common/pushUserManage/save', |
||||||
|
get = '/common_proxy/common/pushUserManage', |
||||||
|
edit = '/common_proxy/common/pushUserManage/update', |
||||||
|
del = '/common_proxy/common/pushUserManage/remove', |
||||||
|
} |
||||||
|
|
||||||
|
export const listPushUserManage = (params?: Partial<PushUserManageParams>) => defHttp.get<PushUserManageResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
export const addPushUserManage = (params: Partial<PushUserManage>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
export const editPushUserManage = (params: Partial<PushUserManage>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
export const getPushUserManage = (id: string) => defHttp.get<PushUserManage>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
export const delPushUserManage = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -1,25 +0,0 @@ |
|||||||
/** |
|
||||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import type { PushWhitelist, PushWhitelistParams, PushWhitelistResult } from '/@/api/platform/common/entity/pushWhitelist'; |
|
||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
|
|
||||||
enum Api { |
|
||||||
list = '/common_proxy/common/pushWhitelist/list', |
|
||||||
add = '/common_proxy/common/pushWhitelist/save', |
|
||||||
get = '/common_proxy/common/pushWhitelist', |
|
||||||
edit = '/common_proxy/common/pushWhitelist/update', |
|
||||||
del = '/common_proxy/common/pushWhitelist/remove', |
|
||||||
} |
|
||||||
|
|
||||||
export const listPushWhitelist = (params?: Partial<PushWhitelistParams>) => defHttp.get<PushWhitelistResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
|
||||||
|
|
||||||
export const addPushWhitelist = (params: Partial<PushWhitelist>) => defHttp.post({ url: Api.add, data: params }); |
|
||||||
|
|
||||||
export const editPushWhitelist = (params: Partial<PushWhitelist>) => defHttp.put({ url: Api.edit, data: params }); |
|
||||||
|
|
||||||
export const getPushWhitelist = (id: string) => defHttp.get<PushWhitelist>({ url: `${Api.get}/${id}` }); |
|
||||||
|
|
||||||
export const delPushWhitelist = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
|
@ -1,11 +0,0 @@ |
|||||||
import type { R } from '/#/axios'; |
|
||||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
|
||||||
|
|
||||||
export type PushBlacklistParams = Page & PushBlacklist; |
|
||||||
|
|
||||||
export interface PushBlacklist extends CommonEntity { |
|
||||||
id: string; |
|
||||||
pushId: string; |
|
||||||
} |
|
||||||
|
|
||||||
export type PushBlacklistResult = R<PushBlacklist[]>; |
|
@ -1,21 +0,0 @@ |
|||||||
import type { R } from '/#/axios'; |
|
||||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
|
||||||
|
|
||||||
export type PushCertificationParams = Page & PushCertification; |
|
||||||
|
|
||||||
export interface PushCertification extends CommonEntity { |
|
||||||
id: string; |
|
||||||
name: string; |
|
||||||
license: string; |
|
||||||
phone: string; |
|
||||||
idCard: string; |
|
||||||
contact: string; |
|
||||||
creditCode: string; |
|
||||||
type: string; |
|
||||||
fileId: string; |
|
||||||
status: string; |
|
||||||
corpName: string; |
|
||||||
detailedAddress: string; |
|
||||||
} |
|
||||||
|
|
||||||
export type PushCertificationResult = R<PushCertification[]>; |
|
@ -0,0 +1,15 @@ |
|||||||
|
import type { R } from '/#/axios'; |
||||||
|
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
export type PushCustomTypeParams = Page & PushCustomType; |
||||||
|
|
||||||
|
export interface PushCustomType extends CommonEntity { |
||||||
|
id: string; |
||||||
|
name: string; |
||||||
|
level: string; |
||||||
|
isVibration: string; |
||||||
|
isSound: string; |
||||||
|
customSound: string; |
||||||
|
} |
||||||
|
|
||||||
|
export type PushCustomTypeResult = R<PushCustomType[]>; |
@ -1,14 +0,0 @@ |
|||||||
import type { R } from '/#/axios'; |
|
||||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
|
||||||
import {TreeEntity} from "/@/api/common/data/entity"; |
|
||||||
|
|
||||||
export type PushManageParams = Page & PushManage; |
|
||||||
|
|
||||||
export interface PushManage extends TreeEntity { |
|
||||||
isVibration: string; |
|
||||||
isSound: string; |
|
||||||
appKey: number; |
|
||||||
customSound: number; |
|
||||||
} |
|
||||||
|
|
||||||
export type PushManageResult = R<PushManage[]>; |
|
@ -0,0 +1,13 @@ |
|||||||
|
import type { R } from '/#/axios'; |
||||||
|
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
export type PushPassListParams = Page & PushPassList; |
||||||
|
|
||||||
|
export interface PushPassList extends CommonEntity { |
||||||
|
id: string; |
||||||
|
pushManageId: string; |
||||||
|
name: string; |
||||||
|
type: string; |
||||||
|
} |
||||||
|
|
||||||
|
export type PushPassListResult = R<PushPassList[]>; |
@ -0,0 +1,19 @@ |
|||||||
|
import type { R } from '/#/axios'; |
||||||
|
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
export type PushThirdPartyParams = Page & PushThirdParty; |
||||||
|
|
||||||
|
export interface PushThirdParty extends CommonEntity { |
||||||
|
id: string; |
||||||
|
statutoryRepName: string; |
||||||
|
idCard: string; |
||||||
|
enterpName: string; |
||||||
|
licenseFileId: string; |
||||||
|
phone: string; |
||||||
|
creditCode: string; |
||||||
|
userId: string; |
||||||
|
detailedAddress: string; |
||||||
|
status: string; |
||||||
|
} |
||||||
|
|
||||||
|
export type PushThirdPartyResult = R<PushThirdParty[]>; |
@ -0,0 +1,16 @@ |
|||||||
|
import type { R } from '/#/axios'; |
||||||
|
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
export type PushThirdPartyManageParams = Page & PushThirdPartyManage; |
||||||
|
|
||||||
|
export interface PushThirdPartyManage extends CommonEntity { |
||||||
|
id: string; |
||||||
|
thirdPartyId: string; |
||||||
|
enterpName: string; |
||||||
|
pushTypeId: string; |
||||||
|
isVibration: string; |
||||||
|
isSound: string; |
||||||
|
customSound: string; |
||||||
|
} |
||||||
|
|
||||||
|
export type PushThirdPartyManageResult = R<PushThirdPartyManage[]>; |
@ -1,13 +0,0 @@ |
|||||||
import type { R } from '/#/axios'; |
|
||||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
|
||||||
|
|
||||||
export type PushTodoAuthParams = Page & PushTodoAuth; |
|
||||||
|
|
||||||
export interface PushTodoAuth extends CommonEntity { |
|
||||||
id: string; |
|
||||||
name: string; |
|
||||||
certificationId: string; |
|
||||||
status: string; |
|
||||||
} |
|
||||||
|
|
||||||
export type PushTodoAuthResult = R<PushTodoAuth[]>; |
|
@ -1,12 +0,0 @@ |
|||||||
import type { R } from '/#/axios'; |
|
||||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
|
||||||
|
|
||||||
export type PushTypeParams = Page & PushType; |
|
||||||
|
|
||||||
export interface PushType extends CommonEntity { |
|
||||||
id: string; |
|
||||||
name: string; |
|
||||||
level: string; |
|
||||||
} |
|
||||||
|
|
||||||
export type PushTypeResult = R<PushType[]>; |
|
@ -0,0 +1,18 @@ |
|||||||
|
import type { R } from '/#/axios'; |
||||||
|
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
export type PushUserManageParams = Page & PushUserManage; |
||||||
|
|
||||||
|
export interface PushUserManage extends CommonEntity { |
||||||
|
id: string; |
||||||
|
userId: string; |
||||||
|
nickName: string; |
||||||
|
sex: string; |
||||||
|
avatar: string; |
||||||
|
pushTypeId: string; |
||||||
|
isVibration: string; |
||||||
|
isSound: string; |
||||||
|
customSound: string; |
||||||
|
} |
||||||
|
|
||||||
|
export type PushUserManageResult = R<PushUserManage[]>; |
@ -1,11 +0,0 @@ |
|||||||
import type { R } from '/#/axios'; |
|
||||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
|
||||||
|
|
||||||
export type PushWhitelistParams = Page & PushWhitelist; |
|
||||||
|
|
||||||
export interface PushWhitelist extends CommonEntity { |
|
||||||
id: string; |
|
||||||
pushId: string; |
|
||||||
} |
|
||||||
|
|
||||||
export type PushWhitelistResult = R<PushWhitelist[]>; |
|
@ -1,53 +0,0 @@ |
|||||||
import { BasicColumn } from '/@/components/Table'; |
|
||||||
import { FormSchema } from '/@/components/Table'; |
|
||||||
import { h } from 'vue'; |
|
||||||
import { Tag } from 'ant-design-vue'; |
|
||||||
|
|
||||||
/** 表格列配置 */ |
|
||||||
export const columns: BasicColumn[] = [ |
|
||||||
{ |
|
||||||
title: '推送ID', |
|
||||||
dataIndex: 'pushId' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建人', |
|
||||||
dataIndex: 'createByName' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建时间', |
|
||||||
dataIndex: 'createTime', |
|
||||||
width: 200 |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
/** 搜索表单配置 */ |
|
||||||
export const searchFormSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'createByName', |
|
||||||
label: '创建人', |
|
||||||
component: 'Input', |
|
||||||
componentProps: { |
|
||||||
placeholder: '请输入创建人', |
|
||||||
}, |
|
||||||
colProps: { span: 8 } |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
/** 表单配置 */ |
|
||||||
export const formSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'id', |
|
||||||
label: 'ID', |
|
||||||
component: 'Input', |
|
||||||
show: false |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'pushId', |
|
||||||
label: '推送ID', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 24 |
|
||||||
} |
|
||||||
} |
|
||||||
]; |
|
@ -1,89 +0,0 @@ |
|||||||
<template> |
|
||||||
<BasicModal v-bind="$attrs" |
|
||||||
width="720px" |
|
||||||
@ok="handleSubmit" |
|
||||||
@register="registerModal" |
|
||||||
> |
|
||||||
<BasicForm @register="registerForm"/> |
|
||||||
</BasicModal> |
|
||||||
</template> |
|
||||||
<script lang="ts" setup> |
|
||||||
/** |
|
||||||
* 提供模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* 采用vben-动态表格表单封装组件编写,采用 setup 写法 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import { ref, unref } from 'vue'; |
|
||||||
import { BasicForm, useForm } from '/@/components/Form/index'; |
|
||||||
import { formSchema } from './pushManage.data'; |
|
||||||
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal'; |
|
||||||
import { listPushManage, addPushManage, editPushManage, getPushManage } from '/@/api/platform/common/controller/pushManage'; |
|
||||||
import { listToTree } from '/@/utils/helper/treeHelper'; |
|
||||||
|
|
||||||
/** 通用变量统一声明区域 */ |
|
||||||
const tag = ref<Nullable<string>>(''); |
|
||||||
/** https://v3.cn.vuejs.org/api/options-data.html#emits */ |
|
||||||
const emit = defineEmits(['success', 'register']); |
|
||||||
const [registerForm, { resetFields, setFieldsValue, updateSchema, validate, clearValidate }] = useForm({ |
|
||||||
labelWidth: 100, |
|
||||||
schemas: formSchema, |
|
||||||
showActionButtonGroup: false, |
|
||||||
baseColProps: { span: 24 } |
|
||||||
}); |
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data: WindowInnerData = { _tag: '' }) => { |
|
||||||
// 处理清除脏数据 |
|
||||||
await resetFields(); |
|
||||||
await clearValidate(); |
|
||||||
// 处理设置数据 |
|
||||||
tag.value = data._tag; |
|
||||||
const topTree = { deptId: '0', name: '顶级推送', children: [] }; |
|
||||||
topTree.children = listToTree(await listPushManage()); |
|
||||||
await updateSchema({ |
|
||||||
field: 'parentId', |
|
||||||
componentProps: { |
|
||||||
treeData: [topTree] |
|
||||||
} |
|
||||||
}); |
|
||||||
const refId = data.record?.id; |
|
||||||
const props: Partial<ModalProps> = { confirmLoading: false }; |
|
||||||
// 采用tag标签区分操作 |
|
||||||
switch (unref(tag)) { |
|
||||||
case 'add': |
|
||||||
props.title = '新增推送'; |
|
||||||
refId && await setFieldsValue({ parentId: refId }); |
|
||||||
break; |
|
||||||
case 'edit': |
|
||||||
props.title = '编辑推送'; |
|
||||||
await setFieldsValue(await getPushManage(refId)); |
|
||||||
break; |
|
||||||
} |
|
||||||
// 尾部:设置处理后的最终配置数据 |
|
||||||
setModalProps(props); |
|
||||||
}); |
|
||||||
|
|
||||||
/** 处理弹出框提交 */ |
|
||||||
async function handleSubmit() { |
|
||||||
try { |
|
||||||
// 提取验证数据 |
|
||||||
const formData = await validate(); |
|
||||||
// 处理提交之前逻辑 |
|
||||||
setModalProps({ confirmLoading: true }); |
|
||||||
// 采用tag标签区分操作 |
|
||||||
switch (unref(tag)) { |
|
||||||
case 'add': |
|
||||||
await addPushManage(formData); |
|
||||||
break; |
|
||||||
case 'edit': |
|
||||||
await editPushManage(formData); |
|
||||||
break; |
|
||||||
} |
|
||||||
// 处理提交完成之后逻辑 |
|
||||||
closeModal(); |
|
||||||
emit('success'); |
|
||||||
} finally { |
|
||||||
setModalProps({ confirmLoading: false }); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
</script> |
|
@ -1,106 +0,0 @@ |
|||||||
<template> |
|
||||||
<div> |
|
||||||
<BasicTable @register="registerTable"> |
|
||||||
<template #toolbar> |
|
||||||
<a-button type="primary" @click="handleAdd()">新增推送</a-button> |
|
||||||
<a-button type="default" @click="expandAll">展开全部</a-button> |
|
||||||
<a-button type="default" @click="collapseAll">折叠全部</a-button> |
|
||||||
</template> |
|
||||||
<template #action="{ record }"> |
|
||||||
<TableAction |
|
||||||
:actions="[ |
|
||||||
{ |
|
||||||
label: '编辑', |
|
||||||
icon: 'fa6-regular:pen-to-square', |
|
||||||
onClick: handleEdit.bind(null, record) |
|
||||||
}, |
|
||||||
{ |
|
||||||
label: '新增', |
|
||||||
icon: 'ant-design:plus-circle-outlined', |
|
||||||
onClick: handleAdd.bind(null, record) |
|
||||||
}, |
|
||||||
{ |
|
||||||
label: '删除', |
|
||||||
icon: 'ant-design:delete-outlined', |
|
||||||
color: 'error', |
|
||||||
popConfirm: { |
|
||||||
title: '是否确认删除', |
|
||||||
confirm: handleDel.bind(null, record) |
|
||||||
} |
|
||||||
} |
|
||||||
]" |
|
||||||
/> |
|
||||||
</template> |
|
||||||
</BasicTable> |
|
||||||
<PushManageModal @register="registerModal" @success="handleRefreshTable"/> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script lang="ts" setup> |
|
||||||
/** |
|
||||||
* 提供模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* 采用vben-动态表格表单封装组件编写,采用 setup 写法 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
|
||||||
import { useModal } from '/@/components/Modal'; |
|
||||||
import PushManageModal from './PushManageModal.vue'; |
|
||||||
import { columns, searchFormSchema } from './pushManage.data'; |
|
||||||
import { delPushManage, listPushManage } from '/@/api/platform/common/controller/pushManage'; |
|
||||||
import { useMessage } from '/@/hooks/web/useMessage'; |
|
||||||
import { listToTree } from '/@/utils/helper/treeHelper'; |
|
||||||
|
|
||||||
/** 通用变量统一声明区域 */ |
|
||||||
const { createMessage } = useMessage(); |
|
||||||
const [registerModal, { openModal }] = useModal(); |
|
||||||
const [registerTable, { reload, expandAll, collapseAll, getDataSource }] = useTable({ |
|
||||||
title: '推送列表', |
|
||||||
api: listPushManage, |
|
||||||
rowKey: 'deptId', |
|
||||||
columns, |
|
||||||
formConfig: { |
|
||||||
labelWidth: 120, |
|
||||||
schemas: searchFormSchema, |
|
||||||
autoSubmitOnEnter: true, |
|
||||||
fieldMapToTime: [['dateRange', ['beginTime', 'endTime'], 'YYYY-MM-DD']] |
|
||||||
}, |
|
||||||
isTreeTable: true, |
|
||||||
pagination: false, |
|
||||||
striped: false, |
|
||||||
useSearchForm: true, |
|
||||||
showTableSetting: true, |
|
||||||
bordered: true, |
|
||||||
showIndexColumn: false, |
|
||||||
canResize: false, |
|
||||||
actionColumn: { |
|
||||||
width: 250, |
|
||||||
title: '操作', |
|
||||||
dataIndex: 'action', |
|
||||||
slots: { customRender: 'action' }, |
|
||||||
fixed: false |
|
||||||
}, |
|
||||||
afterFetch: result => listToTree(result, { id: 'deptId' }), |
|
||||||
}); |
|
||||||
|
|
||||||
/** 新增按钮操作,行内新增与工具栏局域新增通用 */ |
|
||||||
function handleAdd(record?: Recordable) { |
|
||||||
openModal(true, { _tag: 'add', record }); |
|
||||||
} |
|
||||||
|
|
||||||
/** 编辑按钮操作,行内编辑 */ |
|
||||||
function handleEdit(record: Recordable) { |
|
||||||
openModal(true, { _tag: 'edit', record }); |
|
||||||
} |
|
||||||
|
|
||||||
/** 删除按钮操作,行内删除 */ |
|
||||||
async function handleDel(record: Recordable) { |
|
||||||
await delPushManage(record.deptId); |
|
||||||
createMessage.success('删除成功!'); |
|
||||||
handleRefreshTable(); |
|
||||||
} |
|
||||||
|
|
||||||
/** 处理表格刷新 */ |
|
||||||
function handleRefreshTable() { |
|
||||||
reload(); |
|
||||||
} |
|
||||||
</script> |
|
@ -0,0 +1,135 @@ |
|||||||
|
<template> |
||||||
|
<div> |
||||||
|
<BasicTable @register="registerTable" |
||||||
|
@selection-change="handleSelectionChange" |
||||||
|
> |
||||||
|
<template #toolbar> |
||||||
|
<a-button type="primary" |
||||||
|
@click="handleAdd()" |
||||||
|
>新增第三方推送</a-button> |
||||||
|
<a-button type="primary" |
||||||
|
:disabled="state.single" |
||||||
|
@click="handleEdit()" |
||||||
|
>修改第三方推送</a-button> |
||||||
|
<a-button type="primary" |
||||||
|
:disabled="state.multiple" |
||||||
|
@click="handleDel()" |
||||||
|
>删除第三方推送</a-button> |
||||||
|
</template> |
||||||
|
<template #action="{ record }"> |
||||||
|
<TableAction :actions="[ |
||||||
|
{ |
||||||
|
label: '编辑', |
||||||
|
icon: 'fa6-regular:pen-to-square', |
||||||
|
onClick: handleEdit.bind(null, record) |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '删除', |
||||||
|
icon: 'ant-design:delete-outlined', |
||||||
|
color: 'error', |
||||||
|
onClick: handleDel.bind(null, record) |
||||||
|
}]" |
||||||
|
/> |
||||||
|
</template> |
||||||
|
</BasicTable> |
||||||
|
<!--弹出窗体区域--> |
||||||
|
<ThirdPartyManageModal @register="registerModal" @success="handleRefreshTable"/> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script lang="ts" setup> |
||||||
|
/** |
||||||
|
* 提供模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* 采用vben-动态表格表单封装组件编写,采用 setup 写法 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import { reactive, toRaw } from 'vue'; |
||||||
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
||||||
|
import { listPushThirdPartyManage, delPushThirdPartyManage } from '/@/api/platform/common/controller/pushThirdPartyManage'; |
||||||
|
import { useModal } from '/@/components/Modal'; |
||||||
|
import ThirdPartyManageModal from './ThirdPartyManageModal.vue'; |
||||||
|
import { columns, searchFormSchema } from './thirdPartyManage.data'; |
||||||
|
import { useMessage } from '/@/hooks/web/useMessage'; |
||||||
|
|
||||||
|
/** 类型规范统一声明定义区域 */ |
||||||
|
interface TableState { |
||||||
|
single: boolean; |
||||||
|
multiple: boolean; |
||||||
|
} |
||||||
|
|
||||||
|
/** 通用变量统一声明区域 */ |
||||||
|
const state = reactive<TableState>({ |
||||||
|
// 非单个禁用 |
||||||
|
single: true, |
||||||
|
// 非多个禁用 |
||||||
|
multiple: true |
||||||
|
}); |
||||||
|
const { createConfirm, createMessage } = useMessage(); |
||||||
|
const [registerModal, { openModal }] = useModal(); |
||||||
|
const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({ |
||||||
|
title: '第三方推送列表', |
||||||
|
api: listPushThirdPartyManage, |
||||||
|
rowKey: 'id', |
||||||
|
columns, |
||||||
|
formConfig: { |
||||||
|
labelWidth: 120, |
||||||
|
schemas: searchFormSchema, |
||||||
|
autoSubmitOnEnter: true |
||||||
|
}, |
||||||
|
rowSelection: { type: 'checkbox' }, |
||||||
|
useSearchForm: true, |
||||||
|
showTableSetting: true, |
||||||
|
bordered: true, |
||||||
|
clickToRowSelect: false, |
||||||
|
showIndexColumn: false, |
||||||
|
actionColumn: { |
||||||
|
width: 220, |
||||||
|
title: '操作', |
||||||
|
dataIndex: 'action', |
||||||
|
slots: { customRender: 'action' }, |
||||||
|
fixed: false |
||||||
|
}, |
||||||
|
handleSearchInfoFn: () => clearSelectedRowKeys() |
||||||
|
}); |
||||||
|
|
||||||
|
/** 处理多选框选中数据 */ |
||||||
|
function handleSelectionChange(selection?: Recordable) { |
||||||
|
const rowSelection = toRaw(selection?.keys) || []; |
||||||
|
state.single = rowSelection.length != 1; |
||||||
|
state.multiple = !rowSelection.length; |
||||||
|
} |
||||||
|
|
||||||
|
/** 新增按钮操作,行内新增与工具栏局域新增通用 */ |
||||||
|
function handleAdd() { |
||||||
|
openModal(true,{ _tag: 'add' }); |
||||||
|
} |
||||||
|
|
||||||
|
/** 编辑按钮操作,行内编辑 */ |
||||||
|
function handleEdit(record?: Recordable) { |
||||||
|
record = record || { id: getSelectRowKeys() }; |
||||||
|
openModal(true, { _tag: 'edit', record }); |
||||||
|
} |
||||||
|
|
||||||
|
/** 删除按钮操作,行内删除 */ |
||||||
|
async function handleDel(record?: Recordable) { |
||||||
|
const ids = record?.id || getSelectRowKeys(); |
||||||
|
createConfirm({ |
||||||
|
iconType: 'warning', |
||||||
|
title: '警告', |
||||||
|
content: `是否确认删除编号为${ids}的数据?`, |
||||||
|
onOk: async () => { |
||||||
|
await delPushThirdPartyManage(ids); |
||||||
|
createMessage.success('删除成功!'); |
||||||
|
handleRefreshTable(); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** 处理表格刷新 */ |
||||||
|
function handleRefreshTable() { |
||||||
|
clearSelectedRowKeys(); |
||||||
|
reload(); |
||||||
|
} |
||||||
|
|
||||||
|
</script> |
@ -0,0 +1,126 @@ |
|||||||
|
import { BasicColumn } from '/@/components/Table'; |
||||||
|
import { FormSchema } from '/@/components/Table'; |
||||||
|
|
||||||
|
/** 表格列配置 */ |
||||||
|
export const columns: BasicColumn[] = [ |
||||||
|
{ |
||||||
|
title: '企业名称', |
||||||
|
dataIndex: 'enterpName' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '是否震动', |
||||||
|
dataIndex: 'isVibration', |
||||||
|
customRender: ({record}) => { |
||||||
|
return ~~record?.isVibration === 0 ? '是' : '否'; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '是否响铃', |
||||||
|
dataIndex: 'isSound', |
||||||
|
customRender: ({record}) => { |
||||||
|
return ~~record?.isSound === 0 ? '是' : '否'; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '自定义响铃', |
||||||
|
dataIndex: 'customSound', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '创建人', |
||||||
|
dataIndex: 'createByName', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '创建时间', |
||||||
|
dataIndex: 'createTime', |
||||||
|
width: 200 |
||||||
|
} |
||||||
|
]; |
||||||
|
|
||||||
|
/** 搜索表单配置 */ |
||||||
|
export const searchFormSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
field: 'enterpName', |
||||||
|
label: '企业名称', |
||||||
|
component: 'Input', |
||||||
|
componentProps: { |
||||||
|
placeholder: '请输入企业名称', |
||||||
|
}, |
||||||
|
colProps: { span: 6 } |
||||||
|
} |
||||||
|
]; |
||||||
|
|
||||||
|
/** 表单配置 */ |
||||||
|
export const formSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
field: 'id', |
||||||
|
label: 'ID', |
||||||
|
component: 'Input', |
||||||
|
show: false |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'enterpName', |
||||||
|
label: '企业名称', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 24 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'thirdPartyId', |
||||||
|
label: '第三方ID', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'pushTypeId', |
||||||
|
label: '推送类型ID', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'isVibration', |
||||||
|
label: '是否震动', |
||||||
|
component: 'RadioGroup', |
||||||
|
defaultValue: '0', |
||||||
|
componentProps: { |
||||||
|
options: [ |
||||||
|
{ label: '是', value: '0' }, |
||||||
|
{ label: '否', value: '1' } |
||||||
|
] |
||||||
|
}, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'isSound', |
||||||
|
label: '是否响铃', |
||||||
|
component: 'RadioGroup', |
||||||
|
defaultValue: '0', |
||||||
|
componentProps: { |
||||||
|
options: [ |
||||||
|
{ label: '是', value: '0' }, |
||||||
|
{ label: '否', value: '1' } |
||||||
|
] |
||||||
|
}, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'customSound', |
||||||
|
label: '自定义响铃', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 24 |
||||||
|
} |
||||||
|
}, |
||||||
|
]; |
@ -0,0 +1,148 @@ |
|||||||
|
import { BasicColumn } from '/@/components/Table'; |
||||||
|
import { FormSchema } from '/@/components/Table'; |
||||||
|
|
||||||
|
/** 表格列配置 */ |
||||||
|
export const columns: BasicColumn[] = [ |
||||||
|
{ |
||||||
|
title: '用户昵称', |
||||||
|
dataIndex: 'nickName' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '性别', |
||||||
|
dataIndex: 'sex', |
||||||
|
customRender: ({record}) => { |
||||||
|
return ~~record?.isVibration === 0 ? '男' : '女'; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '是否震动', |
||||||
|
dataIndex: 'isVibration', |
||||||
|
customRender: ({record}) => { |
||||||
|
return ~~record?.isVibration === 0 ? '是' : '否'; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '是否响铃', |
||||||
|
dataIndex: 'isSound', |
||||||
|
customRender: ({record}) => { |
||||||
|
return ~~record?.isSound === 0 ? '是' : '否'; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '自定义响铃', |
||||||
|
dataIndex: 'customSound', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '创建人', |
||||||
|
dataIndex: 'createByName' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '创建时间', |
||||||
|
dataIndex: 'createTime', |
||||||
|
width: 200 |
||||||
|
} |
||||||
|
]; |
||||||
|
|
||||||
|
/** 搜索表单配置 */ |
||||||
|
export const searchFormSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
field: 'nickName', |
||||||
|
label: '用户昵称', |
||||||
|
component: 'Input', |
||||||
|
componentProps: { |
||||||
|
placeholder: '请输入用户昵称', |
||||||
|
}, |
||||||
|
colProps: { span: 6 } |
||||||
|
} |
||||||
|
]; |
||||||
|
|
||||||
|
/** 表单配置 */ |
||||||
|
export const formSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
field: 'id', |
||||||
|
label: 'ID', |
||||||
|
component: 'Input', |
||||||
|
show: false |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'nickName', |
||||||
|
label: '用户昵称', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'sex', |
||||||
|
label: '性别', |
||||||
|
component: 'Select', |
||||||
|
required: true, |
||||||
|
componentProps: { |
||||||
|
options: [ |
||||||
|
{ label: '男', value: '0' }, |
||||||
|
{ label: '女', value: '1' } |
||||||
|
] |
||||||
|
}, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'userId', |
||||||
|
label: '用户ID', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'pushTypeId', |
||||||
|
label: '推送类型ID', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'isVibration', |
||||||
|
label: '是否震动', |
||||||
|
component: 'RadioGroup', |
||||||
|
defaultValue: '0', |
||||||
|
componentProps: { |
||||||
|
options: [ |
||||||
|
{ label: '是', value: '0' }, |
||||||
|
{ label: '否', value: '1' } |
||||||
|
] |
||||||
|
}, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'isSound', |
||||||
|
label: '是否响铃', |
||||||
|
component: 'RadioGroup', |
||||||
|
defaultValue: '0', |
||||||
|
componentProps: { |
||||||
|
options: [ |
||||||
|
{ label: '是', value: '0' }, |
||||||
|
{ label: '否', value: '1' } |
||||||
|
] |
||||||
|
}, |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'customSound', |
||||||
|
label: '自定义响铃', |
||||||
|
component: 'Input', |
||||||
|
required: true, |
||||||
|
colProps: { |
||||||
|
span: 24 |
||||||
|
} |
||||||
|
}, |
||||||
|
]; |
@ -1,89 +0,0 @@ |
|||||||
import { BasicColumn } from '/@/components/Table'; |
|
||||||
import { FormSchema } from '/@/components/Table'; |
|
||||||
import { h } from 'vue'; |
|
||||||
import { Tag } from 'ant-design-vue'; |
|
||||||
|
|
||||||
/** 表格列配置 */ |
|
||||||
export const columns: BasicColumn[] = [ |
|
||||||
{ |
|
||||||
title: '申请名称', |
|
||||||
dataIndex: 'name' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '认证ID', |
|
||||||
dataIndex: 'certificationId' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建人', |
|
||||||
dataIndex: 'createByName' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建时间', |
|
||||||
dataIndex: 'createTime', |
|
||||||
width: 200 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '状态', |
|
||||||
dataIndex: 'status', |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '备注', |
|
||||||
dataIndex: 'remarks', |
|
||||||
width: 200, |
|
||||||
customRender: ({record}) => { |
|
||||||
return record.remarks || h(Tag, { color: 'red' }, () => '暂无数据'); |
|
||||||
} |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
/** 搜索表单配置 */ |
|
||||||
export const searchFormSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'name', |
|
||||||
label: '申请名称', |
|
||||||
component: 'Input', |
|
||||||
componentProps: { |
|
||||||
placeholder: '请输入申请名称', |
|
||||||
}, |
|
||||||
colProps: { span: 8 } |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
/** 表单配置 */ |
|
||||||
export const formSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'id', |
|
||||||
label: 'ID', |
|
||||||
component: 'Input', |
|
||||||
show: false |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'name', |
|
||||||
label: '申请名称', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 24 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'status', |
|
||||||
label: '状态', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 24 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
label: '备注', |
|
||||||
field: 'remarks', |
|
||||||
component: 'InputTextArea', |
|
||||||
componentProps: { |
|
||||||
rows: 6 |
|
||||||
}, |
|
||||||
colProps: { |
|
||||||
span: 24 |
|
||||||
} |
|
||||||
} |
|
||||||
]; |
|
@ -1,135 +0,0 @@ |
|||||||
<template> |
|
||||||
<div> |
|
||||||
<BasicTable @register="registerTable" |
|
||||||
@selection-change="handleSelectionChange" |
|
||||||
> |
|
||||||
<template #toolbar> |
|
||||||
<a-button type="primary" |
|
||||||
@click="handleAdd()" |
|
||||||
>新增白名单</a-button> |
|
||||||
<a-button type="primary" |
|
||||||
:disabled="state.single" |
|
||||||
@click="handleEdit()" |
|
||||||
>修改白名单</a-button> |
|
||||||
<a-button type="primary" |
|
||||||
:disabled="state.multiple" |
|
||||||
@click="handleDel()" |
|
||||||
>删除白名单</a-button> |
|
||||||
</template> |
|
||||||
<template #action="{ record }"> |
|
||||||
<TableAction :actions="[ |
|
||||||
{ |
|
||||||
label: '编辑', |
|
||||||
icon: 'fa6-regular:pen-to-square', |
|
||||||
onClick: handleEdit.bind(null, record) |
|
||||||
}, |
|
||||||
{ |
|
||||||
label: '删除', |
|
||||||
icon: 'ant-design:delete-outlined', |
|
||||||
color: 'error', |
|
||||||
onClick: handleDel.bind(null, record) |
|
||||||
}]" |
|
||||||
/> |
|
||||||
</template> |
|
||||||
</BasicTable> |
|
||||||
<!--弹出窗体区域--> |
|
||||||
<WhitelistModal @register="registerModal" @success="handleRefreshTable"/> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script lang="ts" setup> |
|
||||||
/** |
|
||||||
* 提供模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
||||||
* 采用vben-动态表格表单封装组件编写,采用 setup 写法 |
|
||||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
||||||
* author entfrm开发团队-王翔 |
|
||||||
*/ |
|
||||||
import { reactive, toRaw } from 'vue'; |
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
|
||||||
import { listPushWhitelist, delPushWhitelist } from '/@/api/platform/common/controller/pushWhitelist'; |
|
||||||
import { useModal } from '/@/components/Modal'; |
|
||||||
import WhitelistModal from './WhitelistModal.vue'; |
|
||||||
import { columns, searchFormSchema } from './whitelist.data'; |
|
||||||
import { useMessage } from '/@/hooks/web/useMessage'; |
|
||||||
|
|
||||||
/** 类型规范统一声明定义区域 */ |
|
||||||
interface TableState { |
|
||||||
single: boolean; |
|
||||||
multiple: boolean; |
|
||||||
} |
|
||||||
|
|
||||||
/** 通用变量统一声明区域 */ |
|
||||||
const state = reactive<TableState>({ |
|
||||||
// 非单个禁用 |
|
||||||
single: true, |
|
||||||
// 非多个禁用 |
|
||||||
multiple: true |
|
||||||
}); |
|
||||||
const { createConfirm, createMessage } = useMessage(); |
|
||||||
const [registerModal, { openModal }] = useModal(); |
|
||||||
const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({ |
|
||||||
title: '白名单列表', |
|
||||||
api: listPushWhitelist, |
|
||||||
rowKey: 'id', |
|
||||||
columns, |
|
||||||
formConfig: { |
|
||||||
labelWidth: 120, |
|
||||||
schemas: searchFormSchema, |
|
||||||
autoSubmitOnEnter: true |
|
||||||
}, |
|
||||||
rowSelection: { type: 'checkbox' }, |
|
||||||
useSearchForm: true, |
|
||||||
showTableSetting: true, |
|
||||||
bordered: true, |
|
||||||
clickToRowSelect: false, |
|
||||||
showIndexColumn: false, |
|
||||||
actionColumn: { |
|
||||||
width: 220, |
|
||||||
title: '操作', |
|
||||||
dataIndex: 'action', |
|
||||||
slots: { customRender: 'action' }, |
|
||||||
fixed: false |
|
||||||
}, |
|
||||||
handleSearchInfoFn: () => clearSelectedRowKeys() |
|
||||||
}); |
|
||||||
|
|
||||||
/** 处理多选框选中数据 */ |
|
||||||
function handleSelectionChange(selection?: Recordable) { |
|
||||||
const rowSelection = toRaw(selection?.keys) || []; |
|
||||||
state.single = rowSelection.length != 1; |
|
||||||
state.multiple = !rowSelection.length; |
|
||||||
} |
|
||||||
|
|
||||||
/** 新增按钮操作,行内新增与工具栏局域新增通用 */ |
|
||||||
function handleAdd() { |
|
||||||
openModal(true,{ _tag: 'add' }); |
|
||||||
} |
|
||||||
|
|
||||||
/** 编辑按钮操作,行内编辑 */ |
|
||||||
function handleEdit(record?: Recordable) { |
|
||||||
record = record || { id: getSelectRowKeys() }; |
|
||||||
openModal(true, { _tag: 'edit', record }); |
|
||||||
} |
|
||||||
|
|
||||||
/** 删除按钮操作,行内删除 */ |
|
||||||
async function handleDel(record?: Recordable) { |
|
||||||
const ids = record?.id || getSelectRowKeys(); |
|
||||||
createConfirm({ |
|
||||||
iconType: 'warning', |
|
||||||
title: '警告', |
|
||||||
content: `是否确认删除编号为${ids}的数据?`, |
|
||||||
onOk: async () => { |
|
||||||
await delPushWhitelist(ids); |
|
||||||
createMessage.success('删除成功!'); |
|
||||||
handleRefreshTable(); |
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
/** 处理表格刷新 */ |
|
||||||
function handleRefreshTable() { |
|
||||||
clearSelectedRowKeys(); |
|
||||||
reload(); |
|
||||||
} |
|
||||||
|
|
||||||
</script> |
|
@ -1,53 +0,0 @@ |
|||||||
import { BasicColumn } from '/@/components/Table'; |
|
||||||
import { FormSchema } from '/@/components/Table'; |
|
||||||
import { h } from 'vue'; |
|
||||||
import { Tag } from 'ant-design-vue'; |
|
||||||
|
|
||||||
/** 表格列配置 */ |
|
||||||
export const columns: BasicColumn[] = [ |
|
||||||
{ |
|
||||||
title: '推送ID', |
|
||||||
dataIndex: 'pushId' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建人', |
|
||||||
dataIndex: 'createByName' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建时间', |
|
||||||
dataIndex: 'createTime', |
|
||||||
width: 200 |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
/** 搜索表单配置 */ |
|
||||||
export const searchFormSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'createByName', |
|
||||||
label: '创建人', |
|
||||||
component: 'Input', |
|
||||||
componentProps: { |
|
||||||
placeholder: '请输入创建人', |
|
||||||
}, |
|
||||||
colProps: { span: 8 } |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
/** 表单配置 */ |
|
||||||
export const formSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'id', |
|
||||||
label: 'ID', |
|
||||||
component: 'Input', |
|
||||||
show: false |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'pushId', |
|
||||||
label: '推送ID', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 24 |
|
||||||
} |
|
||||||
} |
|
||||||
]; |
|
Loading…
Reference in new issue