提交 783b4493 authored 作者: 刘旭's avatar 刘旭

调整样式

上级 53de5a7a
......@@ -22,7 +22,6 @@
"unplugin-icons": "^0.18.2",
"unplugin-vue-components": "^0.26.0",
"vue": "^3.3.11",
"vue-clipboard3": "^2.0.0",
"vue-router": "^4.2.5"
},
"devDependencies": {
......
......@@ -32,9 +32,6 @@ dependencies:
vue:
specifier: ^3.3.11
version: 3.4.15(typescript@5.3.3)
vue-clipboard3:
specifier: ^2.0.0
version: 2.0.0
vue-router:
specifier: ^4.2.5
version: 4.2.5(vue@3.4.15)
......@@ -1128,14 +1125,6 @@ packages:
fsevents: 2.3.3
dev: false
/clipboard@2.0.11:
resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==}
dependencies:
good-listener: 1.2.2
select: 1.1.2
tiny-emitter: 2.1.0
dev: false
/color-convert@1.9.3:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
dependencies:
......@@ -1217,10 +1206,6 @@ packages:
engines: {node: '>=0.4.0'}
dev: false
/delegate@3.2.0:
resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==}
dev: false
/dir-glob@3.0.1:
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
engines: {node: '>=8'}
......@@ -1650,12 +1635,6 @@ packages:
slash: 3.0.0
dev: true
/good-listener@1.2.2:
resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==}
dependencies:
delegate: 3.2.0
dev: false
/graphemer@1.4.0:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
dev: true
......@@ -2290,10 +2269,6 @@ packages:
resolution: {integrity: sha512-CRCmi5zHQnSoeCik9565PONMg0kfkvYmcSqrbOJY4txFfy1wvVULV4FDaiXhUblUgahdqz3F2NwHZ8i4eBTwUw==}
dev: false
/select@1.1.2:
resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==}
dev: false
/semver@7.5.4:
resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==}
engines: {node: '>=10'}
......@@ -2415,10 +2390,6 @@ packages:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
dev: true
/tiny-emitter@2.1.0:
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
dev: false
/to-fast-properties@2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'}
......@@ -2643,12 +2614,6 @@ packages:
fsevents: 2.3.3
dev: true
/vue-clipboard3@2.0.0:
resolution: {integrity: sha512-Q9S7dzWGax7LN5iiSPcu/K1GGm2gcBBlYwmMsUc5/16N6w90cbKow3FnPmPs95sungns4yvd9/+JhbAznECS2A==}
dependencies:
clipboard: 2.0.11
dev: false
/vue-demi@0.14.6(vue@3.4.15):
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
engines: {node: '>=12'}
......
......@@ -9,18 +9,15 @@ declare module 'vue' {
export interface GlobalComponents {
ElAside: typeof import('element-plus/es')['ElAside']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput']
ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
......
......@@ -2,9 +2,7 @@
<div class="lic-container" v-loading="state.loading">
<div style="display: flex; justify-content: space-between">
<div style="margin-bottom: 20px; display: flex; flex-direction: row; align-items: center">
<el-button type="primary" size="mini" @click="onStart" style="margin-left: 20px"
>启动
</el-button>
<el-button type="primary" size="mini" @click="onStart">启动 </el-button>
<el-button type="primary" size="mini" @click="onRestartOne" style="margin-left: 20px"
>重启
</el-button>
......@@ -14,21 +12,10 @@
<el-button type="primary" size="mini" @click="onClean" style="margin-left: 20px"
>清理
</el-button>
<!-- <el-button type="primary" size="mini" @click="onMac" style="margin-left: 20px"
>MAC
</el-button> -->
<el-button type="primary" size="mini" @click="onMessages" style="margin-left: 20px"
>刷新
</el-button>
</div>
<!-- <el-select v-model="tenantId.value" @change="selectChange" placeholder="请选择租户">
<el-option
v-for="item in state.listTenant"
:key="item.tenantId"
:label="item.tenantName"
:value="item.tenantId"
/>
</el-select> -->
</div>
<el-table
:data="tableData"
......@@ -50,17 +37,6 @@
>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="255">
<template #default="scope">
<el-link type="primary" :underline="false" @click="onStartOne(scope.row)">启动</el-link>
<el-divider direction="vertical" />
<el-link type="primary" :underline="false" @click="onRestartOne(scope.row)">重启</el-link>
<el-divider direction="vertical" />
<el-link type="primary" :underline="false" @click="onUpdateOne(scope.row)">更新</el-link>
<el-divider direction="vertical" />
<el-link type="error" :underline="false" @click="onCleanOne(scope.row)">清除</el-link>
</template>
</el-table-column> -->
</el-table>
<div v-show="state.messages.length" class="timeline" v-loading="state.messageLoading">
<el-icon size="28" color="#409EFC" class="RefreshRight" @click="initMessage"
......@@ -76,21 +52,8 @@
</template>
<script setup lang="ts">
import {
getListAll,
getMessage,
cleanAll,
getMac,
startOne,
updateOne,
restartOne,
cleanOne,
startBatch,
updateBatch,
cleanBatch
} from '@/api'
import { getListAll, getMessage, restartOne, startBatch, updateBatch, cleanBatch } from '@/api'
import { useTenantStore } from '@/stores/modules/tenant'
import clipboard3 from 'vue-clipboard3'
const tenantStore = useTenantStore()
const tenantId = computed(() => tenantStore.getTenantId)
......@@ -164,29 +127,6 @@ const onClean = () => {
})
}
const onMac = async () => {
const res: any = await getMac()
if (res.code === 200) {
if (res.data.macAddress)
ElMessageBox.confirm(`mac地址:${res.data.macAddress}`, '提示', {
confirmButtonText: '复制',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const { toClipboard } = clipboard3()
try {
await toClipboard(res.data.macAddress)
ElMessage.success('mac: ' + res.data.macAddress + ' 复制成功!!')
} catch (error) {
ElMessage.warning('复制失败!!')
}
})
else {
ElMessage.warning('mac地址为空')
}
} else ElMessage.error(res.msg)
}
const onMessages = async () => {
state.loading = true
await initListAll()
......@@ -195,30 +135,6 @@ const onMessages = async () => {
})
}
const onStartOne = (row: any) => {
ElMessageBox.confirm(`确认启动 ${row.name}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const res: any = await startOne({ name: row.name, tenantId: tenantId.value })
if (res.code === 200) ElMessage.success('启动成功')
else ElMessage.error(res.msg)
})
}
const onUpdateOne = (row: any) => {
ElMessageBox.confirm(`确认更新 ${row.name}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const res: any = await updateOne({ name: row.name, tenantId: tenantId.value })
if (res.code === 200) ElMessage.success('更新成功')
else ElMessage.error(res.msg)
})
}
const onRestartOne = () => {
if (!state.selectRows.length) return ElMessage.warning('请先选择数据')
if (state.selectRows.length > 1) return ElMessage.warning('一次只能重启一条数据')
......@@ -240,18 +156,6 @@ const onRestartOne = () => {
})
}
const onCleanOne = (row: any) => {
ElMessageBox.confirm(`确认清除 ${row.name}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const res: any = await cleanOne({ name: row.name, tenantId: tenantId.value })
if (res.code === 200) ElMessage.success('清除成功')
else ElMessage.error(res.msg)
})
}
const tenantChange = (tenantId: any) => {
state.loading = true
initListAll(tenantId).then(() => {
......
<template>
<div id="login">
<el-card>
<div class="container">
<form action="#" class="login-form">
<el-form class="login-container" label-position="left" label-width="0px">
<h2 class="login_title">系统登录</h2>
<el-form-item>
......@@ -20,12 +20,11 @@
placeholder="密码"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" style="width: 120px" @click="login">登录</el-button>
</el-form-item>
</el-form>
</el-card>
</form>
</div>
</template>
......@@ -46,22 +45,81 @@ const login = () => {
</script>
<style scoped>
#login {
background: url('@/assets/login-background.jpg') no-repeat;
background-position: center;
height: 100%;
width: 100%;
background-size: cover;
position: fixed;
.container {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #0000001f;
}
.login-form {
width: 240px;
height: 220px;
display: flex;
flex-direction: column;
padding: 40px;
text-align: center;
position: relative;
z-index: 100;
background: inherit;
border-radius: 18px;
overflow: hidden; /* 隐藏多余的模糊效果*/
}
.el-card {
.login-form::before {
content: '';
width: calc(100% + 20px);
height: calc(100% + 20px);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 400px;
border-radius: 15px;
top: -10px;
left: -10px;
overflow: hidden;
background: inherit;
box-shadow: inset 0 0 0 200px rgba(255, 255, 255, 0.25);
filter: blur(6px);
z-index: -1;
}
.login-form h2 {
font-size: 18px;
font-weight: 400;
color: #3d5245;
}
.login-form input,
.login-form button {
margin: 6px 0;
height: 36px;
border: none;
background-color: rgba(255, 255, 255, 0.3);
border-radius: 4px;
padding: 0 14px;
color: #3d5245;
}
.login-form input::placeholder {
color: #3d5245;
}
.login-form button:focus,
.login-form input:focus {
outline: 0;
}
.login-form button {
margin-top: 24px;
background-color: rgba(57, 88, 69, 0.4);
color: white;
position: relative;
overflow: hidden;
cursor: pointer;
transition: 0.4s;
}
.login-form button:hover {
background-color: rgba(12, 80, 38, 0.67);
}
.el-form {
......@@ -71,8 +129,6 @@ const login = () => {
}
h2 {
font-size: 20px;
font-weight: bolder;
margin: 10px 0 20px 0;
}
......
<template>
<div v-loading="loading">
<el-upload :action="action" :show-file-list="false" :on-success="onUpload">
<el-upload
:action="action"
:show-file-list="false"
:on-success="onUpload"
style="margin-bottom: 20px"
>
<el-button type="primary" size="mini">新增租户</el-button>
</el-upload>
<el-table :data="tableData" stripe border>
......@@ -21,12 +26,13 @@ const tableData = ref()
const loading = ref(true)
const action = '/admin/api/lic/info/file/import'
const onUpload = (res: any) => {
const onUpload = async (res: any) => {
try {
if (res.code === 200) ElMessage.success('导入成功')
else ElMessage.error(res.msg)
} finally {
init()
await tenantStore.initTenantList()
await init()
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论