fix: 组件更换、首页跳转完善

This commit is contained in:
easy 2023-03-14 16:56:20 +08:00
parent 73bb4bbc5f
commit 5352ef782a
12 changed files with 100 additions and 72 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 285 KiB

View File

@ -6,7 +6,7 @@
<!-- 已登录-绑定三方账号 --> <!-- 已登录-绑定三方账号 -->
<template v-if="!token"> <template v-if="!token">
<div class="info"> <div class="info">
<a-card style="width: 280px"> <j-card style="width: 280px">
<template #title> <template #title>
<div class="info-head"> <div class="info-head">
<img :src="getImage('/bind/Rectangle.png')" /> <img :src="getImage('/bind/Rectangle.png')" />
@ -18,9 +18,9 @@
<p>账号admin</p> <p>账号admin</p>
<p>用户名超级管理员</p> <p>用户名超级管理员</p>
</div> </div>
</a-card> </j-card>
<img :src="getImage('/bind/Vector.png')" /> <img :src="getImage('/bind/Vector.png')" />
<a-card style="width: 280px"> <j-card style="width: 280px">
<template #title> <template #title>
<div class="info-head"> <div class="info-head">
<img :src="getImage('/bind/Rectangle.png')" /> <img :src="getImage('/bind/Rectangle.png')" />
@ -37,11 +37,11 @@
<p>用户名-</p> <p>用户名-</p>
<p>名称{{ accountInfo?.name || '-' }}</p> <p>名称{{ accountInfo?.name || '-' }}</p>
</div> </div>
</a-card> </j-card>
</div> </div>
<div class="btn"> <div class="btn">
<a-button type="primary" @click="handleBind" <j-button type="primary" @click="handleBind"
>立即绑定</a-button >立即绑定</j-button
> >
</div> </div>
</template> </template>
@ -60,30 +60,30 @@
你已通过微信授权,完善以下登录信息即可以完成绑定 你已通过微信授权,完善以下登录信息即可以完成绑定
</div> </div>
<div class="login-form"> <div class="login-form">
<a-form layout="vertical"> <j-form layout="vertical">
<a-form-item <j-form-item
label="账户" label="账户"
v-bind="validateInfos.username" v-bind="validateInfos.username"
> >
<a-input <j-input
v-model:value="formData.username" v-model:value="formData.username"
placeholder="请输入账户" placeholder="请输入账户"
/> />
</a-form-item> </j-form-item>
<a-form-item <j-form-item
label="密码" label="密码"
v-bind="validateInfos.password" v-bind="validateInfos.password"
> >
<a-input-password <j-input-password
v-model:value="formData.password" v-model:value="formData.password"
placeholder="请输入密码" placeholder="请输入密码"
/> />
</a-form-item> </j-form-item>
<a-form-item <j-form-item
label="验证码" label="验证码"
v-bind="validateInfos.verifyCode" v-bind="validateInfos.verifyCode"
> >
<a-input <j-input
v-model:value="formData.verifyCode" v-model:value="formData.verifyCode"
placeholder="请输入验证码" placeholder="请输入验证码"
> >
@ -94,18 +94,18 @@
style="cursor: pointer" style="cursor: pointer"
/> />
</template> </template>
</a-input> </j-input>
</a-form-item> </j-form-item>
<a-form-item> <j-form-item>
<a-button <j-button
type="primary" type="primary"
@click="handleLoginBind" @click="handleLoginBind"
style="width: 100%" style="width: 100%"
> >
登录并绑定账户 登录并绑定账户
</a-button> </j-button>
</a-form-item> </j-form-item>
</a-form> </j-form>
</div> </div>
</div> </div>
</template> </template>

View File

@ -1,8 +1,6 @@
<template> <template>
<a-card class="boot-card-container" :bordered="false"> <div class="boot-card-container">
<template #title> <h5 class="title">{{ cardTitle }}</h5>
<h5 class="title">{{ cardTitle }}</h5>
</template>
<div class="box"> <div class="box">
<div <div
class="box-item" class="box-item"
@ -23,7 +21,7 @@
</div> </div>
</div> </div>
</div> </div>
</a-card> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -46,9 +44,8 @@ const jumpPage = (item: bootConfig) => {
<style lang="less" scoped> <style lang="less" scoped>
.boot-card-container { .boot-card-container {
:deep(.ant-card-body) { background-color: #fff;
padding-top: 0; padding: 24px 12px;
}
.title { .title {
position: relative; position: relative;
z-index: 2; z-index: 2;

View File

@ -13,8 +13,8 @@
<j-row :gutter="24"> <j-row :gutter="24">
<j-col :span="12"><DeviceCountCard /></j-col> <j-col :span="12"><DeviceCountCard /></j-col>
<j-col :span="12"><BasicCountCard /></j-col> <j-col :span="12"><BasicCountCard /></j-col>
<j-col :span="24" style="margin-top: 24px"> <j-col :span="24" style="margin-top: 24px;">
<PlatformPicCard image="/images/home/content1.png" /> <PlatformPicCard image="/images/home/content1.svg" />
</j-col> </j-col>
</j-row> </j-row>
</j-col> </j-col>
@ -41,7 +41,7 @@
<DeviceChooseDialog <DeviceChooseDialog
v-if="deviceDialogVisible" v-if="deviceDialogVisible"
v-model:visible="deviceDialogVisible" v-model:visible="deviceDialogVisible"
@confirm="(id:string)=>jumpPage('device/Instance/Detail', { id })" @confirm="(id:string)=>jumpPage('device/Instance/Detail', { id, tab: 'Diagnose' })"
/> />
</div> </div>
</div> </div>
@ -157,7 +157,7 @@ const deviceStepDetails: recommendList[] = [
linkUrl: 'device/Instance', linkUrl: 'device/Instance',
auth: devicePermission('import'), auth: devicePermission('import'),
params: { params: {
import: true, type: 'import'
}, },
}, },
]; ];
@ -175,7 +175,7 @@ const opsBootConfig: bootConfig[] = [
label: '日志排查', label: '日志排查',
link: 'Log', link: 'Log',
params: { params: {
key: 'system', tab: 'system',
}, },
image: '/images/home/guide-home5.png', image: '/images/home/guide-home5.png',
}, },
@ -220,7 +220,7 @@ const opsStepDetails: recommendList[] = [
iconUrl: '/images/home/bottom-5.png', iconUrl: '/images/home/bottom-5.png',
linkUrl: 'Log', linkUrl: 'Log',
params: { params: {
key: 'system', tab: 'system',
}, },
}, },
]; ];

View File

@ -39,7 +39,7 @@ const opsBootConfig: bootConfig[] = [
label: '日志排查', label: '日志排查',
link: 'Log', link: 'Log',
params: { params: {
key: 'system', tab: 'system',
}, },
}, },
{ {
@ -83,7 +83,7 @@ const opsStepDetails: recommendList[] = [
iconUrl: '/images/home/bottom-5.png', iconUrl: '/images/home/bottom-5.png',
linkUrl: 'Log', linkUrl: 'Log',
params: { params: {
key: 'system', tab: 'system',
}, },
}, },
]; ];

View File

@ -28,7 +28,7 @@
<DeviceChooseDialog <DeviceChooseDialog
v-if="deviceDialogVisible" v-if="deviceDialogVisible"
v-model:visible="deviceDialogVisible" v-model:visible="deviceDialogVisible"
@confirm="(id:string)=>jumpPage('device/Instance/Detail', { id })" @confirm="(id:string)=>jumpPage('device/Instance/Detail', { id, tab: 'Diagnose' })"
/> />
</div> </div>
</div> </div>

View File

@ -25,10 +25,11 @@ const props = defineProps({
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #2f54eb; border-bottom: 1px solid #2f54eb;
height: 458px;
.bj { .bj {
display: block; display: block;
width: 100%; width: 100%;
height: 100%;
} }
.title { .title {

View File

@ -1,5 +1,5 @@
<template> <template>
<a-modal <j-modal
class="add-device-or-product-dialog-container" class="add-device-or-product-dialog-container"
title="绑定" title="绑定"
width="1440px" width="1440px"
@ -15,7 +15,7 @@
<div class="row"> <div class="row">
<span style="margin-right: 8px">批量配置</span> <span style="margin-right: 8px">批量配置</span>
<a-switch <j-switch
v-model:checked="bulkBool" v-model:checked="bulkBool"
checked-children="开" checked-children="开"
un-checked-children="关" un-checked-children="关"
@ -23,7 +23,7 @@
/> />
</div> </div>
<div v-show="bulkBool"> <div v-show="bulkBool">
<a-checkbox-group v-model:value="bulkList" :options="options" /> <j-checkbox-group v-model:value="bulkList" :options="options" />
</div> </div>
<pro-search <pro-search
@ -72,8 +72,8 @@
<h3 class="card-item-content-title"> <h3 class="card-item-content-title">
{{ slotProps.name }} {{ slotProps.name }}
</h3> </h3>
<a-row> <j-row>
<a-col :span="12"> <j-col :span="12">
<div class="card-item-content-text">ID</div> <div class="card-item-content-text">ID</div>
<div <div
style="cursor: pointer" style="cursor: pointer"
@ -81,8 +81,8 @@
> >
{{ slotProps.id }} {{ slotProps.id }}
</div> </div>
</a-col> </j-col>
<a-col :span="12"> <j-col :span="12">
<div class="card-item-content-text"> <div class="card-item-content-text">
资产权限 资产权限
</div> </div>
@ -91,15 +91,15 @@
class="card-item-content-value" class="card-item-content-value"
@click="(e) => e.stopPropagation()" @click="(e) => e.stopPropagation()"
> >
<a-checkbox-group <j-checkbox-group
v-model:value=" v-model:value="
slotProps.selectPermissions slotProps.selectPermissions
" "
:options="slotProps.permissionList" :options="slotProps.permissionList"
/> />
</div> </div>
</a-col> </j-col>
</a-row> </j-row>
</template> </template>
</CardBox> </CardBox>
</template> </template>
@ -110,7 +110,7 @@
class="card-item-content-value" class="card-item-content-value"
@click="(e) => e.stopPropagation()" @click="(e) => e.stopPropagation()"
> >
<a-checkbox-group <j-checkbox-group
v-model:value="slotProps.selectPermissions" v-model:value="slotProps.selectPermissions"
:options="slotProps.permissionList" :options="slotProps.permissionList"
/> />
@ -128,7 +128,7 @@
></BadgeStatus> ></BadgeStatus>
</template> </template>
</j-pro-table> </j-pro-table>
</a-modal> </j-modal>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@ -12,7 +12,7 @@
> >
<j-form ref="formRef" :model="form.data" layout="vertical"> <j-form ref="formRef" :model="form.data" layout="vertical">
<j-form-item name="parentId" label="上级组织"> <j-form-item name="parentId" label="上级组织">
<a-tree-select <j-tree-select
v-model:value="form.data.parentId" v-model:value="form.data.parentId"
style="width: 100%" style="width: 100%"
placeholder="请选择上级组织" placeholder="请选择上级组织"
@ -20,7 +20,7 @@
:field-names="{ value: 'id' }" :field-names="{ value: 'id' }"
> >
<template #title="{ name }"> {{ name }} </template> <template #title="{ name }"> {{ name }} </template>
</a-tree-select> </j-tree-select>
</j-form-item> </j-form-item>
<j-form-item <j-form-item
name="name" name="name"

View File

@ -21,7 +21,7 @@
</PermissionButton> </PermissionButton>
</div> </div>
<a-tree <jTree
:tree-data="treeData" :tree-data="treeData"
v-model:selected-keys="selectedKeys" v-model:selected-keys="selectedKeys"
:fieldNames="{ key: 'id' }" :fieldNames="{ key: 'id' }"
@ -69,7 +69,7 @@
</PermissionButton> </PermissionButton>
</span> </span>
</template> </template>
</a-tree> </jTree>
<!-- 编辑弹窗 --> <!-- 编辑弹窗 -->
<EditDepartmentDialog <EditDepartmentDialog

View File

@ -154,7 +154,7 @@
></BadgeStatus> ></BadgeStatus>
</template> </template>
<template #action="slotProps"> <template #action="slotProps">
<a-space :size="16"> <j-space :size="16">
<PermissionButton <PermissionButton
v-for="i in table.getActions(slotProps, 'table')" v-for="i in table.getActions(slotProps, 'table')"
:uhasPermission="i.permission" :uhasPermission="i.permission"
@ -166,7 +166,7 @@
> >
<AIcon :type="i.icon" /> <AIcon :type="i.icon" />
</PermissionButton> </PermissionButton>
</a-space> </j-space>
</template> </template>
</j-pro-table> </j-pro-table>

View File

@ -114,35 +114,35 @@
</j-row> </j-row>
</template> </template>
<template #actions="item"> <template #actions="item">
<a-tooltip <j-tooltip
v-bind="item.tooltip" v-bind="item.tooltip"
:title="item.disabled && item.tooltip.title" :title="item.disabled && item.tooltip.title"
> >
<a-dropdown <j-dropdown
placement="bottomRight" placement="bottomRight"
v-if="item.key === 'others'" v-if="item.key === 'others'"
> >
<a-button> <j-button>
<AIcon :type="item.icon" /> <AIcon :type="item.icon" />
<span>{{ item.text }}</span> <span>{{ item.text }}</span>
</a-button> </j-button>
<template #overlay> <template #overlay>
<a-menu> <j-menu>
<a-menu-item <j-menu-item
v-for="(o, i) in item.children" v-for="(o, i) in item.children"
:key="i" :key="i"
> >
<a-button <j-button
type="link" type="link"
@click="o.onClick" @click="o.onClick"
> >
<AIcon :type="o.icon" /> <AIcon :type="o.icon" />
<span>{{ o.text }}</span> <span>{{ o.text }}</span>
</a-button> </j-button>
</a-menu-item> </j-menu-item>
</a-menu> </j-menu>
</template> </template>
</a-dropdown> </j-dropdown>
<PermissionButton <PermissionButton
v-else v-else
:hasPermission="item.permission" :hasPermission="item.permission"
@ -156,7 +156,7 @@
item.text item.text
}}</span> }}</span>
</PermissionButton> </PermissionButton>
</a-tooltip> </j-tooltip>
</template> </template>
</CardBox> </CardBox>
</template> </template>
@ -179,7 +179,7 @@
></BadgeStatus> ></BadgeStatus>
</template> </template>
<template #action="slotProps"> <template #action="slotProps">
<a-space :size="16"> <j-space :size="16">
<PermissionButton <PermissionButton
v-for="i in table.getActions(slotProps, 'table')" v-for="i in table.getActions(slotProps, 'table')"
:hasPermission="i.permission" :hasPermission="i.permission"
@ -191,7 +191,7 @@
> >
<AIcon :type="i.icon" /> <AIcon :type="i.icon" />
</PermissionButton> </PermissionButton>
</a-space> </j-space>
</template> </template>
</j-pro-table> </j-pro-table>