Browse Source

feat: mp

main
xingyu 2 years ago
parent
commit
2d09a7850d
  1. 1
      src/components/Table/src/hooks/useTableForm.ts
  2. 3
      src/views/mp/account/account.data.ts
  3. 4
      src/views/mp/user/index.vue
  4. 4
      src/views/mp/user/mpuser.data.ts

1
src/components/Table/src/hooks/useTableForm.ts

@ -36,7 +36,6 @@ export function useTableForm(
if (handleSearchInfoFn && isFunction(handleSearchInfoFn)) {
info = handleSearchInfoFn(info) || info
}
console.info(info)
fetch({ searchInfo: info, page: 1 })
}

3
src/views/mp/account/account.data.ts

@ -2,8 +2,9 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table'
export const columns: BasicColumn[] = [
{
title: '岗位编号',
title: '编号',
dataIndex: 'id',
defaultHidden: true,
width: 100
},
{

4
src/views/mp/user/index.vue

@ -6,10 +6,10 @@
{{ t('action.sync') }}
</a-button>
</template>
<template #bodyCell="{ column }">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'mp:user:update', onClick: handleEdit.bind(null) }]"
:actions="[{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'mp:user:update', onClick: handleEdit.bind(null, record) }]"
/>
</template>
</template>

4
src/views/mp/user/mpuser.data.ts

@ -4,7 +4,7 @@ import { BasicColumn, FormSchema, useRender } from '@/components/Table'
export const columns: BasicColumn[] = [
{
title: '岗位编号',
title: '编号',
dataIndex: 'id',
width: 100
},
@ -54,6 +54,7 @@ export const searchFormSchema: FormSchema[] = [
label: '公众号',
field: 'accountId',
component: 'ApiSelect',
defaultValue: 0,
componentProps: {
api: () => getSimpleAccounts(),
labelField: 'name',
@ -99,6 +100,7 @@ export const formSchema: FormSchema[] = [
field: 'tagIds',
helpMessage: '在微信公众平台(mp.weixin.qq.com)的菜单 [设置与开发 - 公众号设置 - 基本设置] 中能找到「开发者ID(AppID)」',
required: true,
defaultValue: [],
component: 'ApiSelect',
componentProps: {
api: () => getSimpleTags(),