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

View File

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

View File

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

View File

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

View File

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

View File

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