update: 个人中心模块a-组件替换为j-

This commit is contained in:
easy 2023-03-04 10:45:05 +08:00
parent eb2430fb8d
commit 0c515e849e
10 changed files with 140 additions and 141 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="notice-container">
<a-dropdown :trigger="['click']" @visible-change="visibleChange">
<j-dropdown :trigger="['click']" @visible-change="visibleChange">
<div class="icon-content">
<AIcon
type="BellOutlined"
@ -14,7 +14,7 @@
<NoticeInfo :data="list" @on-action="getList" />
</div>
</template>
</a-dropdown>
</j-dropdown>
</div>
</template>

View File

@ -1,7 +1,7 @@
<template>
<div class="notice-info-container">
<a-tabs :activeKey="'default'">
<a-tab-pane key="default" tab="未读消息">
<j-tabs :activeKey="'default'">
<j-tab-pane key="default" tab="未读消息">
<div class="no-data" v-if="props.data.length === 0">
<img src="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg" alt="" />
</div>
@ -24,8 +24,8 @@
>
</div>
</div>
</a-tab-pane>
</a-tabs>
</j-tab-pane>
</j-tabs>
</div>
</template>

View File

@ -1,6 +1,6 @@
<template>
<div>
<a-dropdown placement="bottomRight">
<j-dropdown placement="bottomRight">
<div style="cursor: pointer;height: 100%;">
<img
:src="userInfo.avatar"
@ -10,18 +10,18 @@
<span>{{ userInfo.name }}</span>
</div>
<template #overlay>
<a-menu>
<a-menu-item @click="push('/account/center')" style="width: 160px;">
<j-menu>
<j-menu-item @click="push('/account/center')" style="width: 160px;">
<AIcon type="UserOutlined" style="margin-right: 8px;" />
<span>个人中心</span>
</a-menu-item>
<a-menu-item @click="logOut">
</j-menu-item>
<j-menu-item @click="logOut">
<AIcon type="LogoutOutlined" style="margin-right: 8px;" />
<span>退出登录</span>
</a-menu-item>
</a-menu>
</j-menu-item>
</j-menu>
</template>
</a-dropdown>
</j-dropdown>
</div>
</template>

View File

@ -1,79 +1,79 @@
<template>
<a-modal
<j-modal
visible
title="编辑"
@ok="handleOk"
width="770px"
@cancel="emits('update:visible', false)"
>
<a-form :model="form" layout="vertical" ref="formRef">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item
<j-form :model="form" layout="vertical" ref="formRef">
<j-row :gutter="24">
<j-col :span="12">
<j-form-item
label="姓名"
name="name"
:rules="[{ required: true, message: '姓名必填' }]"
>
<a-input
<j-input
v-model:value="form.name"
placeholder="请输入姓名"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="用户名">
<a-input
</j-form-item>
</j-col>
<j-col :span="12">
<j-form-item label="用户名">
<j-input
v-model:value="form.username"
placeholder="请输入用户名"
disabled
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="角色">
<a-input
</j-form-item>
</j-col>
</j-row>
<j-row :gutter="24">
<j-col :span="12">
<j-form-item label="角色">
<j-input
:value="
form.roleList.map((item) => item.name).join(',')
"
placeholder="请输入角色"
disabled
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="组织">
<a-input
</j-form-item>
</j-col>
<j-col :span="12">
<j-form-item label="组织">
<j-input
:value="
form.orgList.map((item) => item.name).join(',')
"
placeholder="请输入组织"
disabled
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="手机号">
<a-input
</j-form-item>
</j-col>
</j-row>
<j-row :gutter="24">
<j-col :span="12">
<j-form-item label="手机号">
<j-input
v-model:value="form.telephone"
placeholder="请输入手机号"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="邮箱">
<a-input
</j-form-item>
</j-col>
<j-col :span="12">
<j-form-item label="邮箱">
<j-input
v-model:value="form.email"
placeholder="请输入邮箱"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</j-form-item>
</j-col>
</j-row>
</j-form>
</j-modal>
</template>
<script setup lang="ts">

View File

@ -1,13 +1,13 @@
<template>
<a-modal
<j-modal
visible
title="重置密码"
@ok="handleOk"
width="520px"
@cancel="emits('update:visible', false)"
>
<a-form :model="form" layout="vertical" ref="formRef">
<a-form-item
<j-form :model="form" layout="vertical" ref="formRef">
<j-form-item
label="旧密码"
name="oldPassword"
:rules="[
@ -15,12 +15,12 @@
{ validator: checkMothods.old, trigger: 'blur' },
]"
>
<a-input
<j-input
v-model:value="form.oldPassword"
placeholder="请输入旧密码"
/>
</a-form-item>
<a-form-item
</j-form-item>
<j-form-item
label="密码"
name="newPassword"
:rules="[
@ -28,12 +28,12 @@
{ validator: checkMothods.new, trigger: 'blur' },
]"
>
<a-input-password
<j-input-password
v-model:value="form.newPassword"
placeholder="请输入姓名"
/>
</a-form-item>
<a-form-item
</j-form-item>
<j-form-item
label="确认密码"
name="confirmPassword"
:rules="[
@ -41,13 +41,13 @@
{ validator: checkMothods.confirm, trigger: 'blur' },
]"
>
<a-input-password
<j-input-password
v-model:value="form.confirmPassword"
placeholder="请输入姓名"
/>
</a-form-item>
</a-form>
</a-modal>
</j-form-item>
</j-form>
</j-modal>
</template>
<script setup lang="ts">

View File

@ -30,10 +30,10 @@
:action="`${BASE_API_PATH}/file/static`"
@change="upload.changeBackUpload"
>
<a-button>
<j-button>
<AIcon type="UploadOutlined" />
更换头像
</a-button>
</j-button>
</a-upload>
</div>
</div>
@ -145,18 +145,18 @@
</div>
<div v-else>{{ item.name }}未绑定</div>
</Ellipsis>
<a-popconfirm
<j-popconfirm
v-if="item.bound"
title="确认解除绑定嘛?"
@confirm="() => unBind(item.id)"
>
<a-button>解除绑定</a-button>
</a-popconfirm>
<a-button
<j-button>解除绑定</j-button>
</j-popconfirm>
<j-button
v-else
type="primary"
@click="clickBind(item.id)"
>立即绑定</a-button
>立即绑定</j-button
>
</div>
</div>
@ -165,24 +165,24 @@
<div class="card" v-if="!isApiUser">
<h3>首页视图</h3>
<div class="choose-view">
<a-row class="view-content" :gutter="24">
<a-col
<j-row class="view-content" :gutter="24">
<j-col
:span="6"
class="select-item"
:class="{ selected: currentView === 'device' }"
@click="currentView = 'device'"
>
<img :src="getImage('/home/device.png')" alt="" />
</a-col>
<a-col
</j-col>
<j-col
:span="6"
class="select-item"
:class="{ selected: currentView === 'ops' }"
@click="currentView = 'ops'"
>
<img :src="getImage('/home/ops.png')" alt="" />
</a-col>
<a-col
</j-col>
<j-col
:span="6"
class="select-item"
:class="{
@ -194,10 +194,10 @@
:src="getImage('/home/comprehensive.png')"
alt=""
/>
</a-col>
</a-row>
<a-button type="primary" class="btn" @click="confirm"
>确定</a-button
</j-col>
</j-row>
<j-button type="primary" class="btn" @click="confirm"
>确定</j-button
>
</div>
</div>
@ -205,7 +205,7 @@
<EditInfoDialog
v-if="editInfoVisible"
v-model:visible="editInfoVisible"
:data="userInfo"
:data="{...userInfo}"
@ok="getUserInfo"
/>
<EditPasswordDialog

View File

@ -1,5 +1,5 @@
<template>
<a-modal
<j-modal
visible
title="详情"
width="1000px"
@ -7,48 +7,48 @@
@cancel="emits('update:visible', false)"
class="view-dialog-container"
>
<a-row v-if="data?.targetType === 'device'">
<a-col :span="4" class="label">告警设备</a-col>
<a-col :span="8" class="value">
<j-row v-if="data?.targetType === 'device'">
<j-col :span="4" class="label">告警设备</j-col>
<j-col :span="8" class="value">
{{ data?.targetName || '' }}
</a-col>
<a-col :span="4" class="label">设备ID</a-col>
<a-col :span="8" class="value">
</j-col>
<j-col :span="4" class="label">设备ID</j-col>
<j-col :span="8" class="value">
{{ data?.targetId || '' }}
</a-col>
</a-row>
<a-row>
<a-col :span="4" class="label">告警名称</a-col>
<a-col :span="8" class="value">
</j-col>
</j-row>
<j-row>
<j-col :span="4" class="label">告警名称</j-col>
<j-col :span="8" class="value">
{{ data?.alarmName || data?.alarmConfigName || '' }}
</a-col>
<a-col :span="4" class="label">告警时间</a-col>
<a-col :span="8" class="value">
</j-col>
<j-col :span="4" class="label">告警时间</j-col>
<j-col :span="8" class="value">
{{ moment(data?.alarmTime).format('YYYY-MM-DD HH:mm:ss') }}
</a-col>
</j-col>
<a-col :span="4" class="label">告警级别</a-col>
<a-col :span="8" class="value">
<j-col :span="4" class="label">告警级别</j-col>
<j-col :span="8" class="value">
{{ (levelList.length > 0 && getLevelLabel(data.level)) || '' }}
</a-col>
<a-col :span="4" class="label">告警说明</a-col>
<a-col :span="8" class="value">{{ data?.description || '' }}</a-col>
</j-col>
<j-col :span="4" class="label">告警说明</j-col>
<j-col :span="8" class="value">{{ data?.description || '' }}</j-col>
<a-col
<j-col
:span="4"
class="label"
style="display: flex; height: 440px; align-items: center"
>告警流水</a-col
>告警流水</j-col
>
<a-col
<j-col
:span="20"
class="value"
style="max-height: 440px; overflow: auto"
>
<JsonViewer :value="JSON.parse(data?.alarmInfo || '{}')" />
</a-col>
</a-row>
</a-modal>
</j-col>
</j-row>
</j-modal>
</template>
<script setup lang="ts">

View File

@ -35,7 +35,7 @@
></BadgeStatus>
</template>
<template #action="slotProps">
<a-space :size="16">
<j-space :size="16">
<PermissionButton
type="link"
:popConfirm="{
@ -52,7 +52,7 @@
? '标为未读'
: '标为已读',
}"
>
>1
<AIcon type="ReadIconOutlined" />
</PermissionButton>
<PermissionButton
@ -64,7 +64,7 @@
>
<AIcon type="SearchOutlined" />
</PermissionButton>
</a-space>
</j-space>
</template>
</j-pro-table>
@ -89,7 +89,6 @@ import { optionItem } from '@/views/rule-engine/Scene/typings';
import { dictItemType } from '@/views/system/DataSource/typing';
import moment from 'moment';
import { message } from 'ant-design-vue';
import NoticeCp from '@/components/Layout/components/Notice.vue';
import { useUserInfo } from '@/store/userInfo';
const { updateAlarm } = useUserInfo();

View File

@ -1,13 +1,13 @@
<template>
<a-modal
<j-modal
visible
:title="props.data.id ? '编辑' : '新增'"
width="865px"
@ok="confirm"
@cancel="emits('update:visible', false)"
>
<a-form :model="form" layout="vertical" ref="formRef">
<a-form-item
<j-form :model="form" layout="vertical" ref="formRef">
<j-form-item
label="名称"
name="subscribeName"
:rules="[
@ -18,48 +18,48 @@
},
]"
>
<a-input
<j-input
v-model:value="form.subscribeName"
placeholder="请输入名称"
/>
</a-form-item>
</j-form-item>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item
<j-row :gutter="24">
<j-col :span="12">
<j-form-item
label="类型"
name="topicProvider"
:rules="[{ required: true, message: '请选择类型' }]"
>
<a-select
<j-select
v-model:value="form.topicProvider"
placeholder="请选择类型"
:options="typeList"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
</j-form-item>
</j-col>
<j-col :span="12">
<j-form-item
label="告警规则"
:name="['topicConfig', 'alarmConfigId']"
:rules="[{ required: true, message: '请选择告警规则' }]"
>
<a-select
<j-select
:value="form.topicConfig.alarmConfigId?.split(',')"
:options="alarmList"
placeholder="请选择告警规则"
mode="multiple"
@change="onSelect"
></a-select>
</a-form-item>
</a-col>
</a-row>
<a-form-item
></j-select>
</j-form-item>
</j-col>
</j-row>
<j-form-item
name="notice"
label="通知方式"
:rules="[{ required: true, message: '请选择通知方式' }]"
>
<a-checkbox-group
<j-checkbox-group
v-model:value="form.notice"
name="checkboxgroup"
:options="[
@ -69,9 +69,9 @@
},
]"
/>
</a-form-item>
</a-form>
</a-modal>
</j-form-item>
</j-form>
</j-modal>
</template>
<script setup lang="ts">

View File

@ -33,7 +33,7 @@
</template>
<template #action="slotProps">
<a-space :size="16">
<j-space :size="16">
<PermissionButton
type="link"
:tooltip="{
@ -85,7 +85,7 @@
>
<AIcon type="DeleteOutlined" />
</PermissionButton>
</a-space>
</j-space>
</template>
</j-pro-table>