From 0dfb4050bc52f8c5e502f20ba5af249c84b1f5ce Mon Sep 17 00:00:00 2001 From: Jason <5340635+wen-jason@user.noreply.gitee.com> Date: Fri, 16 Sep 2022 16:31:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/api/channel/wx_oa.ts | 64 ++++++------- admin/src/api/setting/search.ts | 12 +-- admin/src/api/setting/user.ts | 21 ++-- .../views/channel/wx_oa/menu_com/oa-attr.vue | 50 +++------- .../wx_oa/menu_com/oa-menu-form-edit.vue | 52 +++++----- .../channel/wx_oa/menu_com/oa-menu-form.vue | 96 ++++++++----------- .../views/channel/wx_oa/menu_com/oa-phone.vue | 25 ++--- .../views/channel/wx_oa/menu_com/useMenuOa.ts | 83 ++++++++-------- 8 files changed, 175 insertions(+), 228 deletions(-) diff --git a/admin/src/api/channel/wx_oa.ts b/admin/src/api/channel/wx_oa.ts index df72f05b..4546a4bc 100644 --- a/admin/src/api/channel/wx_oa.ts +++ b/admin/src/api/channel/wx_oa.ts @@ -10,36 +10,35 @@ export function getOaConfig() { return request.get({ url: '/channel/oa/detail' }) } - export interface Menu { - name: string, - menuType?: number, - visitType?: string, - url?: string, + name: string + menuType?: number + visitType?: string + url?: string appId?: string - pagePath?: string, + pagePath?: string subButtons: Menu[] | any } /** - * @return { Promise } + * @return { Promise } * @description 获取菜单 */ - export function getOaMenu() { +export function getOaMenu() { return request.get({ url: '/channel/oaMenu/detail' }) } /** - * @return { Promise } + * @return { Promise } * @param { Menu } Menu * @description 菜单保存 */ - export function setOaMenuSave(params: Menu | any) { +export function setOaMenuSave(params: Menu | any) { return request.post({ url: '/channel/oaMenu/save', params }) } /** - * @return { Promise } + * @return { Promise } * @param { Menu } Menu * @description 菜单发布 */ @@ -48,64 +47,63 @@ export function setOaMenuPublish(params: Menu | any) { } /** - * @return { Promise } + * @return { Promise } * @param { string } type * @description 获取回复列表 */ - export function getOaReplyList(params: { type: string } ) { +export function getOaReplyList(params: { type: string }) { return request.get({ url: '/channel/oaReply/list', params }) } /** - * @return { Promise } + * @return { Promise } * @param { number } id * @description 回复列表删除 */ - export function oaReplyDel(params: { id: number }) { +export function oaReplyDel(params: { id: number }) { return request.post({ url: '/channel/oaReply/del', params }) } /** - * @return { Promise } + * @return { Promise } * @param { number } id * @description 回复状态修改 */ - export function changeOaReplyStatus(params: { id: number } ) { +export function changeOaReplyStatus(params: { id: number }) { return request.post({ url: '/channel/oaReply/status', params }) } - export interface Reply { - content: string; // 内容 - contentType: number; // 内容类型: 1=文本 - keyword?: string; // 关键词 - matchingType?: number; // 匹配方式: [1=全匹配, 2=模糊匹配] - name: string; // 规则名称 - status: number; // 状态: 1=开启, 0=关闭 - type: string; // 类型: follow=关注, keyword=关键词, default=默认 - sort: number // 排序 + content: string // 内容 + contentType: number // 内容类型: 1=文本 + keyword?: string // 关键词 + matchingType?: number // 匹配方式: [1=全匹配, 2=模糊匹配] + name: string // 规则名称 + status: number // 状态: 1=开启, 0=关闭 + type: string // 类型: follow=关注, keyword=关键词, default=默认 + sort: number // 排序 } /** - * @return { Promise } + * @return { Promise } * @description 回复添加 */ - export function oaReplyAdd(params: Reply ) { +export function oaReplyAdd(params: Reply) { return request.post({ url: '/channel/oaReply/add', params }) } /** - * @return { Promise } + * @return { Promise } * @description 回复编辑 */ - export function oaReplyEdit(params: Reply ) { +export function oaReplyEdit(params: Reply) { return request.post({ url: '/channel/oaReply/edit', params }) } /** - * @return { Promise } + * @return { Promise } * @param { string } type * @description 获取回复详情 */ - export function getOaReplyDetail(params: { id: number } ) { +export function getOaReplyDetail(params: { id: number }) { return request.get({ url: '/channel/oaReply/detail', params }) -} \ No newline at end of file +} diff --git a/admin/src/api/setting/search.ts b/admin/src/api/setting/search.ts index eba0c814..715402d3 100644 --- a/admin/src/api/setting/search.ts +++ b/admin/src/api/setting/search.ts @@ -1,7 +1,7 @@ import request from '@/utils/request' /** - * @return { Promise } + * @return { Promise } * @description 获取热门搜索数据 */ export function getSearch() { @@ -9,21 +9,19 @@ export function getSearch() { } export interface List { - name: string // 搜索关键字 - sort: number // 热门搜索排序 + name: string // 搜索关键字 + sort: number // 热门搜索排序 } export interface Search { - isHotSearch: number // 是否开启搜索0/1 + isHotSearch: number // 是否开启搜索0/1 list: List[] } /** - * @return { Promise } + * @return { Promise } * @param { Search } Search * @description 设置热门搜索 */ export function setSearch(params: Search) { return request.post({ url: '/setting/search/save', params }) } - - diff --git a/admin/src/api/setting/user.ts b/admin/src/api/setting/user.ts index 4b14570e..946f4b0f 100644 --- a/admin/src/api/setting/user.ts +++ b/admin/src/api/setting/user.ts @@ -1,7 +1,7 @@ import request from '@/utils/request' /** - * @return { Promise } + * @return { Promise } * @description 获取用户设置 */ export function getUserSetup() { @@ -9,7 +9,7 @@ export function getUserSetup() { } /** - * @return { Promise } + * @return { Promise } * @param { string } defaultAvatar 默认用户头像 * @description 设置用户设置 */ @@ -18,28 +18,25 @@ export function setUserSetup(params: { defaultAvatar: string }) { } /** - * @return { Promise } + * @return { Promise } * @description 设置登录注册规则 */ export function getLogin() { return request.get({ url: '/setting/login/detail' }) } - export interface LoginSetup { - loginWay: number[] | any // 登录方式, 逗号隔开 - forceBindMobile: number // 强制绑定手机 0/1 - openAgreement: number // 是否开启协议 0/1 - openOtherAuth: number // 第三方登录 0/1 - autoLoginAuth: number[] | any // 第三方自动登录 逗号隔开 + loginWay: number[] | any // 登录方式, 逗号隔开 + forceBindMobile: number // 强制绑定手机 0/1 + openAgreement: number // 是否开启协议 0/1 + openOtherAuth: number // 第三方登录 0/1 + autoLoginAuth: number[] | any // 第三方自动登录 逗号隔开 } /** - * @return { Promise } + * @return { Promise } * @param { LoginSetup } LoginSetup * @description 设置登录注册规则 */ export function setLogin(params: LoginSetup) { return request.post({ url: '/setting/login/save', params }) } - - diff --git a/admin/src/views/channel/wx_oa/menu_com/oa-attr.vue b/admin/src/views/channel/wx_oa/menu_com/oa-attr.vue index 627942b7..663fd859 100644 --- a/admin/src/views/channel/wx_oa/menu_com/oa-attr.vue +++ b/admin/src/views/channel/wx_oa/menu_com/oa-attr.vue @@ -1,9 +1,9 @@