fix: 优化物联布局

This commit is contained in:
xieyonghong 2023-03-30 16:33:41 +08:00
parent f878cffe82
commit 683751af53
6 changed files with 112 additions and 102 deletions

View File

@ -6,6 +6,7 @@
target="iot-card-management-search" target="iot-card-management-search"
@search="handleSearch" @search="handleSearch"
/> />
<FullPage>
<j-pro-table <j-pro-table
:scroll="{ x: 1366 }" :scroll="{ x: 1366 }"
ref="cardManageRef" ref="cardManageRef"
@ -372,6 +373,7 @@
</j-space> </j-space>
</template> </template>
</j-pro-table> </j-pro-table>
</FullPage>
<!-- 批量导入 --> <!-- 批量导入 -->
<Import v-if="importVisible" @close="importVisible = false" @save="importSave"/> <Import v-if="importVisible" @close="importVisible = false" @save="importSave"/>
<!-- 批量导出 --> <!-- 批量导出 -->

View File

@ -100,10 +100,11 @@
@change="getTopRang" @change="getTopRang"
/></template> /></template>
</Guide> </Guide>
<FullPage v-if="topList.length !== 0">
<div <div
v-if="topList.length !== 0" v-if="topList.length !== 0"
class="rankingList" class="rankingList"
style="min-height: 490px"
> >
<div <div
v-for="(item, index) in topList" v-for="(item, index) in topList"
@ -135,6 +136,7 @@
</div> </div>
</div> </div>
</div> </div>
</FullPage>
<div class="empty-body" v-else> <div class="empty-body" v-else>
<j-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" /> <j-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" />
</div> </div>

View File

@ -2,83 +2,85 @@
<template> <template>
<page-container> <page-container>
<pro-search :columns="columns" target="platform-search" @search="handleSearch" /> <pro-search :columns="columns" target="platform-search" @search="handleSearch" />
<j-pro-table ref="platformRef" :columns="columns" :request="queryList" <FullPage>
:defaultParams="{ sorts: [{ name: 'createTime', order: 'desc' }] }" :params="params" :gridColumn="3"> <j-pro-table ref="platformRef" :columns="columns" :request="queryList"
<template #headerTitle> :defaultParams="{ sorts: [{ name: 'createTime', order: 'desc' }] }" :params="params" :gridColumn="3">
<j-space> <template #headerTitle>
<!-- <j-button type="primary" @click="handleAdd"> <j-space>
<AIcon type="PlusOutlined" />新增 <!-- <j-button type="primary" @click="handleAdd">
</j-button> --> <AIcon type="PlusOutlined" />新增
<PermissionButton @click="handleAdd" :hasPermission="'iot-card/Platform:add'" type="primary"> </j-button> -->
<AIcon type="PlusOutlined" />新增 <PermissionButton @click="handleAdd" :hasPermission="'iot-card/Platform:add'" type="primary">
</PermissionButton> <AIcon type="PlusOutlined" />新增
</j-space> </PermissionButton>
</template> </j-space>
<template #card="slotProps"> </template>
<CardBox :value="slotProps" :actions="getActions(slotProps, 'card')" v-bind="slotProps" <template #card="slotProps">
:status="slotProps.state.value" :statusText="slotProps.state.text" :statusNames="{ <CardBox :value="slotProps" :actions="getActions(slotProps, 'card')" v-bind="slotProps"
enabled: 'success', :status="slotProps.state.value" :statusText="slotProps.state.text" :statusNames="{
disabled: 'error', enabled: 'processing',
}"> disabled: 'error',
<template #img> }">
<slot name="img"> <template #img>
<img :src="getImage('/iot-card/iot-card-bg.png')" /> <slot name="img">
</slot> <img :src="getImage('/iot-card/iot-card-bg.png')" />
</template> </slot>
<template #content> </template>
<h3 style='font-size: 16px;width: calc(100% - 90px)'> <template #content>
<Ellipsis> <h3 style='font-size: 16px;width: calc(100% - 90px)'>
{{ slotProps.name }} <Ellipsis>
</Ellipsis> {{ slotProps.name }}
</h3> </Ellipsis>
<j-row> </h3>
<j-col :span="12"> <j-row>
<div class="card-item-content-text"> <j-col :span="12">
平台类型 <div class="card-item-content-text">
</div> 平台类型
<div>{{ slotProps.operatorName }}</div> </div>
</j-col> <div>{{ slotProps.operatorName }}</div>
<j-col :span="12"> </j-col>
<div class="card-item-content-text">说明</div> <j-col :span="12">
<Ellipsis>{{ slotProps.explain }}</Ellipsis> <div class="card-item-content-text">说明</div>
</j-col> <Ellipsis>{{ slotProps.explain }}</Ellipsis>
</j-row> </j-col>
</template> </j-row>
<template #actions="item"> </template>
<PermissionButton :disabled="item.disabled" :popConfirm="item.popConfirm" :tooltip="{ <template #actions="item">
...item.tooltip, <PermissionButton :disabled="item.disabled" :popConfirm="item.popConfirm" :tooltip="{
}" @click="item.onClick" :hasPermission="'iot-card/Platform:' + item.key"> ...item.tooltip,
<AIcon type="DeleteOutlined" v-if="item.key === 'delete'" /> }" @click="item.onClick" :hasPermission="'iot-card/Platform:' + item.key">
<template v-else> <AIcon type="DeleteOutlined" v-if="item.key === 'delete'" />
<AIcon :type="item.icon" /> <template v-else>
<span>{{ item?.text }}</span> <AIcon :type="item.icon" />
</template> <span>{{ item?.text }}</span>
</PermissionButton> </template>
</template> </PermissionButton>
</CardBox> </template>
</template> </CardBox>
<template #state="slotProps"> </template>
<j-badge :text="slotProps.state.text" :status=" <template #state="slotProps">
slotProps.state.value === 'disabled' <j-badge :text="slotProps.state.text" :status="
? 'error' slotProps.state.value === 'disabled'
: 'success' ? 'error'
" /> : 'success'
</template> " />
<template #action="slotProps"> </template>
<j-space :size="16"> <template #action="slotProps">
<template v-for="i in getActions(slotProps, 'table')" :key="i.key"> <j-space :size="16">
<PermissionButton :disabled="i.disabled" :popConfirm="i.popConfirm" :tooltip="{ <template v-for="i in getActions(slotProps, 'table')" :key="i.key">
...i.tooltip, <PermissionButton :disabled="i.disabled" :popConfirm="i.popConfirm" :tooltip="{
}" @click="i.onClick" type="link" style="padding: 0px" ...i.tooltip,
:hasPermission="'iot-card/Platform:' + i.key"> }" @click="i.onClick" type="link" style="padding: 0px"
<template #icon> :hasPermission="'iot-card/Platform:' + i.key">
<AIcon :type="i.icon" /> <template #icon>
</template> <AIcon :type="i.icon" />
</PermissionButton> </template>
</template> </PermissionButton>
</j-space> </template>
</template> </j-space>
</j-pro-table> </template>
</j-pro-table>
</FullPage>
</page-container> </page-container>
</template> </template>

View File

@ -2,6 +2,7 @@
<template> <template>
<page-container> <page-container>
<pro-search :columns="columns" target="recharge-search" @search="handleSearch" /> <pro-search :columns="columns" target="recharge-search" @search="handleSearch" />
<FullPage>
<j-pro-table <j-pro-table
ref="rechargeRef" ref="rechargeRef"
:columns="columns" :columns="columns"
@ -62,6 +63,7 @@
</j-space> </j-space>
</template> </template>
</j-pro-table> </j-pro-table>
</FullPage>
<!-- 充值 --> <!-- 充值 -->
<Save v-if="visible" @change="saveChange" /> <Save v-if="visible" @change="saveChange" />
<Detail v-if="detailVisible" :data="current" @close="close" /> <Detail v-if="detailVisible" :data="current" @close="close" />

View File

@ -6,29 +6,31 @@
target="record-search" target="record-search"
@search="handleSearch" @search="handleSearch"
/> />
<j-pro-table <FullPage>
ref="RecordRef" <j-pro-table
:columns="columns" ref="RecordRef"
:request="queryList" :columns="columns"
:defaultParams="{ :request="queryList"
pageSize: 10, :defaultParams="{
sorts: [{ name: 'time', order: 'desc' }], pageSize: 10,
}" sorts: [{ name: 'time', order: 'desc' }],
:pagination="{ }"
showSizeChanger: true, :pagination="{
pageSizeOptions: ['10', '20', '50', '100'], showSizeChanger: true,
}" pageSizeOptions: ['10', '20', '50', '100'],
:params="params" }"
:model="'TABLE'" :params="params"
> :model="'TABLE'"
<template #time="slotProps"> >
{{ <template #time="slotProps">
slotProps.time {{
? moment(slotProps.time).format('YYYY-MM-DD HH:mm:ss') slotProps.time
: '' ? moment(slotProps.time).format('YYYY-MM-DD HH:mm:ss')
}} : ''
</template> }}
</j-pro-table> </template>
</j-pro-table>
</FullPage>
</page-container> </page-container>
</template> </template>

View File

@ -38,7 +38,7 @@
保存 保存
</PermissionButton> </PermissionButton>
</div> </div>
<FullPage> </FullPage>
</page-container> </page-container>
</template> </template>