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

调整样式

上级 53de5a7a
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
"unplugin-icons": "^0.18.2", "unplugin-icons": "^0.18.2",
"unplugin-vue-components": "^0.26.0", "unplugin-vue-components": "^0.26.0",
"vue": "^3.3.11", "vue": "^3.3.11",
"vue-clipboard3": "^2.0.0",
"vue-router": "^4.2.5" "vue-router": "^4.2.5"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -32,9 +32,6 @@ dependencies: ...@@ -32,9 +32,6 @@ dependencies:
vue: vue:
specifier: ^3.3.11 specifier: ^3.3.11
version: 3.4.15(typescript@5.3.3) version: 3.4.15(typescript@5.3.3)
vue-clipboard3:
specifier: ^2.0.0
version: 2.0.0
vue-router: vue-router:
specifier: ^4.2.5 specifier: ^4.2.5
version: 4.2.5(vue@3.4.15) version: 4.2.5(vue@3.4.15)
...@@ -1128,14 +1125,6 @@ packages: ...@@ -1128,14 +1125,6 @@ packages:
fsevents: 2.3.3 fsevents: 2.3.3
dev: false 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: /color-convert@1.9.3:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
dependencies: dependencies:
...@@ -1217,10 +1206,6 @@ packages: ...@@ -1217,10 +1206,6 @@ packages:
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
dev: false dev: false
/delegate@3.2.0:
resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==}
dev: false
/dir-glob@3.0.1: /dir-glob@3.0.1:
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
engines: {node: '>=8'} engines: {node: '>=8'}
...@@ -1650,12 +1635,6 @@ packages: ...@@ -1650,12 +1635,6 @@ packages:
slash: 3.0.0 slash: 3.0.0
dev: true 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: /graphemer@1.4.0:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
dev: true dev: true
...@@ -2290,10 +2269,6 @@ packages: ...@@ -2290,10 +2269,6 @@ packages:
resolution: {integrity: sha512-CRCmi5zHQnSoeCik9565PONMg0kfkvYmcSqrbOJY4txFfy1wvVULV4FDaiXhUblUgahdqz3F2NwHZ8i4eBTwUw==} resolution: {integrity: sha512-CRCmi5zHQnSoeCik9565PONMg0kfkvYmcSqrbOJY4txFfy1wvVULV4FDaiXhUblUgahdqz3F2NwHZ8i4eBTwUw==}
dev: false dev: false
/select@1.1.2:
resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==}
dev: false
/semver@7.5.4: /semver@7.5.4:
resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==}
engines: {node: '>=10'} engines: {node: '>=10'}
...@@ -2415,10 +2390,6 @@ packages: ...@@ -2415,10 +2390,6 @@ packages:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
dev: true dev: true
/tiny-emitter@2.1.0:
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
dev: false
/to-fast-properties@2.0.0: /to-fast-properties@2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'} engines: {node: '>=4'}
...@@ -2643,12 +2614,6 @@ packages: ...@@ -2643,12 +2614,6 @@ packages:
fsevents: 2.3.3 fsevents: 2.3.3
dev: true 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): /vue-demi@0.14.6(vue@3.4.15):
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
engines: {node: '>=12'} engines: {node: '>=12'}
......
...@@ -9,18 +9,15 @@ declare module 'vue' { ...@@ -9,18 +9,15 @@ declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
ElAside: typeof import('element-plus/es')['ElAside'] ElAside: typeof import('element-plus/es')['ElAside']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElContainer: typeof import('element-plus/es')['ElContainer'] ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader'] ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain'] ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<div class="lic-container" v-loading="state.loading"> <div class="lic-container" v-loading="state.loading">
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div style="margin-bottom: 20px; display: flex; flex-direction: row; align-items: center"> <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 type="primary" size="mini" @click="onStart">启动 </el-button>
>启动
</el-button>
<el-button type="primary" size="mini" @click="onRestartOne" style="margin-left: 20px" <el-button type="primary" size="mini" @click="onRestartOne" style="margin-left: 20px"
>重启 >重启
</el-button> </el-button>
...@@ -14,21 +12,10 @@ ...@@ -14,21 +12,10 @@
<el-button type="primary" size="mini" @click="onClean" style="margin-left: 20px" <el-button type="primary" size="mini" @click="onClean" style="margin-left: 20px"
>清理 >清理
</el-button> </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 type="primary" size="mini" @click="onMessages" style="margin-left: 20px"
>刷新 >刷新
</el-button> </el-button>
</div> </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> </div>
<el-table <el-table
:data="tableData" :data="tableData"
...@@ -50,17 +37,6 @@ ...@@ -50,17 +37,6 @@
> >
</template> </template>
</el-table-column> </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> </el-table>
<div v-show="state.messages.length" class="timeline" v-loading="state.messageLoading"> <div v-show="state.messages.length" class="timeline" v-loading="state.messageLoading">
<el-icon size="28" color="#409EFC" class="RefreshRight" @click="initMessage" <el-icon size="28" color="#409EFC" class="RefreshRight" @click="initMessage"
...@@ -76,21 +52,8 @@ ...@@ -76,21 +52,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { import { getListAll, getMessage, restartOne, startBatch, updateBatch, cleanBatch } from '@/api'
getListAll,
getMessage,
cleanAll,
getMac,
startOne,
updateOne,
restartOne,
cleanOne,
startBatch,
updateBatch,
cleanBatch
} from '@/api'
import { useTenantStore } from '@/stores/modules/tenant' import { useTenantStore } from '@/stores/modules/tenant'
import clipboard3 from 'vue-clipboard3'
const tenantStore = useTenantStore() const tenantStore = useTenantStore()
const tenantId = computed(() => tenantStore.getTenantId) const tenantId = computed(() => tenantStore.getTenantId)
...@@ -164,29 +127,6 @@ const onClean = () => { ...@@ -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 () => { const onMessages = async () => {
state.loading = true state.loading = true
await initListAll() await initListAll()
...@@ -195,30 +135,6 @@ const onMessages = async () => { ...@@ -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 = () => { const onRestartOne = () => {
if (!state.selectRows.length) return ElMessage.warning('请先选择数据') if (!state.selectRows.length) return ElMessage.warning('请先选择数据')
if (state.selectRows.length > 1) return ElMessage.warning('一次只能重启一条数据') if (state.selectRows.length > 1) return ElMessage.warning('一次只能重启一条数据')
...@@ -240,18 +156,6 @@ const onRestartOne = () => { ...@@ -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) => { const tenantChange = (tenantId: any) => {
state.loading = true state.loading = true
initListAll(tenantId).then(() => { initListAll(tenantId).then(() => {
......
<template> <template>
<div id="login"> <div class="container">
<el-card> <form action="#" class="login-form">
<el-form class="login-container" label-position="left" label-width="0px"> <el-form class="login-container" label-position="left" label-width="0px">
<h2 class="login_title">系统登录</h2> <h2 class="login_title">系统登录</h2>
<el-form-item> <el-form-item>
...@@ -20,12 +20,11 @@ ...@@ -20,12 +20,11 @@
placeholder="密码" placeholder="密码"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" style="width: 120px" @click="login">登录</el-button> <el-button type="primary" style="width: 120px" @click="login">登录</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </form>
</div> </div>
</template> </template>
...@@ -46,22 +45,81 @@ const login = () => { ...@@ -46,22 +45,81 @@ const login = () => {
</script> </script>
<style scoped> <style scoped>
#login { .container {
background: url('@/assets/login-background.jpg') no-repeat; width: 100vw;
background-position: center; height: 100vh;
height: 100%; display: flex;
width: 100%; align-items: center;
background-size: cover; justify-content: center;
position: fixed; 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; position: absolute;
top: 50%; top: -10px;
left: 50%; left: -10px;
transform: translate(-50%, -50%); overflow: hidden;
width: 400px; background: inherit;
border-radius: 15px; 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 { .el-form {
...@@ -71,8 +129,6 @@ const login = () => { ...@@ -71,8 +129,6 @@ const login = () => {
} }
h2 { h2 {
font-size: 20px;
font-weight: bolder;
margin: 10px 0 20px 0; margin: 10px 0 20px 0;
} }
......
<template> <template>
<div v-loading="loading"> <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-button type="primary" size="mini">新增租户</el-button>
</el-upload> </el-upload>
<el-table :data="tableData" stripe border> <el-table :data="tableData" stripe border>
...@@ -21,12 +26,13 @@ const tableData = ref() ...@@ -21,12 +26,13 @@ const tableData = ref()
const loading = ref(true) const loading = ref(true)
const action = '/admin/api/lic/info/file/import' const action = '/admin/api/lic/info/file/import'
const onUpload = (res: any) => { const onUpload = async (res: any) => {
try { try {
if (res.code === 200) ElMessage.success('导入成功') if (res.code === 200) ElMessage.success('导入成功')
else ElMessage.error(res.msg) else ElMessage.error(res.msg)
} finally { } finally {
init() await tenantStore.initTenantList()
await init()
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论