【前端】所有主界面取消a-card,使用xn-panel组件替代它

This commit is contained in:
俞宝山 2025-12-09 21:52:57 +08:00
parent de6ab3fcf2
commit fd47908733
21 changed files with 106 additions and 110 deletions

View File

@ -1,6 +1,6 @@
<template>
<analyse />
<a-card :bordered="false" :body-style="{ 'padding-top': '10px' }">
<xn-panel>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="B端会话">
<monitor-b-tab />
@ -9,7 +9,7 @@
<monitor-c-tab />
</a-tab-pane>
</a-tabs>
</a-card>
</xn-panel>
</template>
<script setup name="authMonitor">

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -57,7 +57,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
</template>
<script setup name="authThird">

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -68,7 +68,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh()" />
<xn-user-selector
ref="userSelectorRef"

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
@ -124,7 +124,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh()" />
<detail ref="detailRef" />
</template>

View File

@ -1,76 +1,72 @@
<template>
<div>
<a-card :bordered="false" style="margin-bottom: 10px">
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :span="8">
<a-form-item name="searchKey" label="用户关键词">
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入用户关键词" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-button type="primary" @click="tableRef.refresh(true)">
<template #icon><SearchOutlined /></template>
查询
</a-button>
<a-button @click="reset">
<template #icon><redo-outlined /></template>
重置
</a-button>
</a-col>
</a-row>
</a-form>
</a-card>
<a-card :bordered="false">
<s-table
ref="tableRef"
:columns="columns"
:data="loadData"
:expand-row-by-click="true"
bordered
:alert="options.alert.show"
:tool-config="toolConfig"
:row-key="(record) => record.id"
:row-selection="options.rowSelection"
:scroll="{ x: 'max-content' }"
>
<template #operator>
<a-space>
<a-button type="primary" @click="clientUserFormRef.onOpen()">
<template #icon><plus-outlined /></template>
<span>新增用户</span>
</a-button>
<xn-batch-button
buttonName="批量删除"
icon="DeleteOutlined"
buttonDanger
:selectedRowKeys="selectedRowKeys"
@batchCallBack="deleteBatchUser"
/>
</a-space>
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :span="8">
<a-form-item name="searchKey" label="用户关键词">
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入用户关键词" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-button type="primary" @click="tableRef.refresh(true)">
<template #icon><SearchOutlined /></template>
查询
</a-button>
<a-button @click="reset">
<template #icon><redo-outlined /></template>
重置
</a-button>
</a-col>
</a-row>
</a-form>
<s-table
ref="tableRef"
:columns="columns"
:data="loadData"
:expand-row-by-click="true"
bordered
:alert="options.alert.show"
:tool-config="toolConfig"
:row-key="(record) => record.id"
:row-selection="options.rowSelection"
:scroll="{ x: 'max-content' }"
>
<template #operator>
<a-space>
<a-button type="primary" @click="clientUserFormRef.onOpen()">
<template #icon><plus-outlined /></template>
<span>新增用户</span>
</a-button>
<xn-batch-button
buttonName="批量删除"
icon="DeleteOutlined"
buttonDanger
:selectedRowKeys="selectedRowKeys"
@batchCallBack="deleteBatchUser"
/>
</a-space>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'avatar'">
<a-avatar :src="record.avatar" style="margin-bottom: -5px; margin-top: -5px" />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'avatar'">
<a-avatar :src="record.avatar" style="margin-bottom: -5px; margin-top: -5px" />
</template>
<template v-if="column.dataIndex === 'gender'">
{{ $TOOL.dictTypeData('GENDER', record.gender) }}
</template>
<template v-if="column.dataIndex === 'userStatus'">
{{ $TOOL.dictTypeData('COMMON_STATUS', record.userStatus) }}
</template>
<template v-if="column.dataIndex === 'action'">
<a @click="clientUserFormRef.onOpen(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定要删除此用户吗" @confirm="removeUser(record)">
<a-button type="link" danger size="small"> 删除 </a-button>
</a-popconfirm>
</template>
<template v-if="column.dataIndex === 'gender'">
{{ $TOOL.dictTypeData('GENDER', record.gender) }}
</template>
</s-table>
</a-card>
<client-user-form ref="clientUserFormRef" @successful="tableRef.refresh()" />
</div>
<template v-if="column.dataIndex === 'userStatus'">
{{ $TOOL.dictTypeData('COMMON_STATUS', record.userStatus) }}
</template>
<template v-if="column.dataIndex === 'action'">
<a @click="clientUserFormRef.onOpen(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定要删除此用户吗" @confirm="removeUser(record)">
<a-button type="link" danger size="small"> 删除 </a-button>
</a-popconfirm>
</template>
</template>
</s-table>
</xn-panel>
<client-user-form ref="clientUserFormRef" @successful="tableRef.refresh()" />
</template>
<script setup name="clientUser">
import clientUserApi from '@/api/client/clientUserApi'

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -71,7 +71,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh(true)" />
<detail ref="detailRef" />
</template>

View File

@ -1,6 +1,6 @@
<template>
<div v-if="indexShow">
<a-card :bordered="false">
<div v-if="indexShow" style="height: 100%">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -116,7 +116,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<uploadForm ref="uploadFormRef" @successful="tableRef.refresh()" />
<detail ref="detailRef" />
</div>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
@ -102,7 +102,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh(true)" />
</template>

View File

@ -11,7 +11,7 @@
</a-card>
</a-col>
</a-row>
<a-card :bordered="false" class="mt-2">
<xn-panel class="mt-2">
<a-form ref="formRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="16" :md="4" :lg="4" :xl="4">
@ -72,7 +72,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<detail ref="detailRef" />
</template>

View File

@ -11,7 +11,7 @@
</a-card>
</a-col>
</a-row>
<a-card :bordered="false" class="mt-2">
<xn-panel class="mt-2">
<a-form ref="formRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="16" :md="4" :lg="4" :xl="4">
@ -62,7 +62,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<detail ref="detailRef" />
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -60,7 +60,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh()" />
<detail ref="detailRef" />
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -77,7 +77,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh(true)" />
<detail ref="detailRef" />
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
@ -118,7 +118,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh()" />
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -77,7 +77,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh(true)" />
<detail ref="detailRef" />
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false" v-if="indexShow">
<xn-panel v-if="indexShow" style="height: 100%">
<s-table
ref="tableRef"
:columns="columns"
@ -49,7 +49,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<steps v-else ref="stepsRef" @successful="tableRef.refresh(true)" @closed="closeConfig()" />
<genPreview ref="genPreviewRef" />
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16">
@ -103,7 +103,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh(true)" />
<changeModuleForm ref="changeModuleFormRef" @successful="tableRef.refresh(true)" />
<Button ref="button" />

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -72,7 +72,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh(true)" />
</template>

View File

@ -1,5 +1,5 @@
<template>
<a-card> 被放开的一个界面 </a-card>
<xn-panel> 被放开的一个界面 </xn-panel>
</template>
<script>

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -69,7 +69,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh()" />
<xn-user-selector
ref="userSelectorRef"

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16">
@ -133,7 +133,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="handleSuccess" />
<changeModuleForm ref="changeModuleFormRef" @successful="handleSuccess" />
<Button ref="buttonRef" />

View File

@ -1,5 +1,5 @@
<template>
<a-card :bordered="false">
<xn-panel>
<a-form ref="searchFormRef" :model="searchFormState">
<a-row :gutter="10">
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
@ -70,7 +70,7 @@
</template>
</template>
</s-table>
</a-card>
</xn-panel>
<Form ref="formRef" @successful="tableRef.refresh(true)" />
</template>