up.
This commit is contained in:
parent
0a5c6edb3f
commit
d7285e8f5f
@ -8,6 +8,7 @@ use app\model\SysDictionary;
|
|||||||
use app\controller\admin\{auth,
|
use app\controller\admin\{auth,
|
||||||
GlobalController,
|
GlobalController,
|
||||||
xm\ChannelController,
|
xm\ChannelController,
|
||||||
|
xm\InstitutionController,
|
||||||
xm\MemberController,
|
xm\MemberController,
|
||||||
system\CacheController,
|
system\CacheController,
|
||||||
system\CacheDataController,
|
system\CacheDataController,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<ele-page>
|
<ele-page>
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<member-search @search="reload" />
|
<institution-search @search="reload" />
|
||||||
<ele-card :body-style="{ paddingTop: '8px' }">
|
<ele-card :body-style="{ paddingTop: '8px' }">
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</ele-pro-table>
|
</ele-pro-table>
|
||||||
</ele-card>
|
</ele-card>
|
||||||
<!-- 编辑弹窗 -->
|
<!-- 编辑弹窗 -->
|
||||||
<member-edit v-model="showEdit" :data="current" @done="reload" />
|
<institution-edit v-model="showEdit" :data="current" @done="reload" />
|
||||||
</ele-page>
|
</ele-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -40,11 +40,14 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
Columns
|
Columns
|
||||||
} from 'ele-admin-plus/es/ele-pro-table/types';
|
} from 'ele-admin-plus/es/ele-pro-table/types';
|
||||||
import MemberSearch from './components/member-search.vue';
|
import InstitutionSearch from './components/institution-search.vue';
|
||||||
import MemberEdit from './components/member-edit.vue';
|
import InstitutionEdit from './components/institution-edit.vue';
|
||||||
import { removeRoles } from '@/api/system/role';
|
import { removeRoles } from '@/api/system/role';
|
||||||
import type { Channel, ChannelParam } from '@/api/xm/channel/model';
|
import type {
|
||||||
import { pageChannels } from '@/api/xm/channel';
|
Institution,
|
||||||
|
InstitutionParam
|
||||||
|
} from '@/api/xm/institution/model';
|
||||||
|
import { pageInstitutions } from '@/api/xm/institution';
|
||||||
|
|
||||||
defineOptions({ name: 'SystemRole' });
|
defineOptions({ name: 'SystemRole' });
|
||||||
|
|
||||||
@ -67,7 +70,7 @@
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'channelId',
|
prop: 'InstitutionId',
|
||||||
label: '渠道ID',
|
label: '渠道ID',
|
||||||
width: 80
|
width: 80
|
||||||
},
|
},
|
||||||
@ -100,33 +103,33 @@
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
/** 表格选中数据 */
|
/** 表格选中数据 */
|
||||||
const selections = ref<Channel[]>([]);
|
const selections = ref<Institution[]>([]);
|
||||||
|
|
||||||
/** 当前编辑数据 */
|
/** 当前编辑数据 */
|
||||||
const current = ref<Channel | null>(null);
|
const current = ref<Institution | null>(null);
|
||||||
|
|
||||||
/** 是否显示编辑弹窗 */
|
/** 是否显示编辑弹窗 */
|
||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
|
|
||||||
/** 表格数据源 */
|
/** 表格数据源 */
|
||||||
const datasource: DatasourceFunction = ({ pages, where, orders }) => {
|
const datasource: DatasourceFunction = ({ pages, where, orders }) => {
|
||||||
return pageChannels({ ...where, ...orders, ...pages });
|
return pageInstitutions({ ...where, ...orders, ...pages });
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 搜索 */
|
/** 搜索 */
|
||||||
const reload = (where?: ChannelParam) => {
|
const reload = (where?: InstitutionParam) => {
|
||||||
selections.value = [];
|
selections.value = [];
|
||||||
tableRef.value?.reload?.({ page: 1, where });
|
tableRef.value?.reload?.({ page: 1, where });
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 打开编辑弹窗 */
|
/** 打开编辑弹窗 */
|
||||||
const openEdit = (row?: Channel) => {
|
const openEdit = (row?: Institution) => {
|
||||||
current.value = row ?? null;
|
current.value = row ?? null;
|
||||||
showEdit.value = true;
|
showEdit.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 删除单个 */
|
/** 删除单个 */
|
||||||
const remove = (row?: Channel) => {
|
const remove = (row?: Institution) => {
|
||||||
const rows = row == null ? selections.value : [row];
|
const rows = row == null ? selections.value : [row];
|
||||||
if (!rows.length) {
|
if (!rows.length) {
|
||||||
EleMessage.error({ message: '请至少选择一条数据', plain: true });
|
EleMessage.error({ message: '请至少选择一条数据', plain: true });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user