文件

116 行
4.1 KiB
HTML
可执行文件

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>环境检测</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.2.8.2.css"/>
<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
<script type="text/javascript" src="__PUBLIC__/vue/element-ui.2.8.2.js"></script>
<style>
html, body {
padding: 0;
margin: 0;
background-color: #f5f5f5;
}
.logo-box {
text-align: center;
}
.logo {
height: 84px;
margin: 25px auto 0;
}
.icon {
font-size: 20px;
}
.success {
color: #62b900;
}
.error {
color: #f56c6c;
}
.bottom-button {
margin-top: 10px;
text-align: right;
}
</style>
</head>
<body>
<div id="app">
<div class="logo-box">
<img src="__PUBLIC__/Install/images/logo.png" alt="" class="logo"/>
</div>
<el-container>
<el-main>
<el-card shadow="always" style="width: 650px;margin: 0 auto">
<h3>环境检测</h3>
<h4>运行环境</h4>
<el-table :data="sceneConf" size="small">
<el-table-column align="center" label="项目" prop="name"></el-table-column>
<el-table-column align="center" label="所需配置" prop="need"></el-table-column>
<el-table-column align="center" label="当前配置" prop="value"></el-table-column>
<el-table-column align="center" label="状态" prop="state" width="100px">
<template slot-scope="scope">
<i v-if="scope.row.state" class="el-icon-success icon success"></i>
<i v-else class="el-icon-error icon error"></i>
</template>
</el-table-column>
</el-table>
<h4>目录/文件权限</h4>
<el-table :data="fileAuth" size="small">
<el-table-column align="center" label="目录/文件" prop="name"></el-table-column>
<el-table-column align="center" label="所需状态" prop="need"></el-table-column>
<el-table-column align="center" label="当前状态" prop="value"></el-table-column>
<el-table-column align="center" label="状态" prop="state" width="100px">
<template slot-scope="scope">
<i v-if="scope.row.state" class="el-icon-success icon success"></i>
<i v-else class="el-icon-error icon error"></i>
</template>
</el-table-column>
</el-table>
<div class="bottom-button">
<el-button size="medium" @click="refresh">刷新</el-button>
<el-button type="primary" size="medium" @click="nextOperate">继续</el-button>
</div>
</el-card>
</el-main>
</el-container>
</div>
<script>
var app = new Vue({
el: '#app',
data() {
return {
sceneConf: {$sceneConf},
fileAuth: {$fileAuth},
}
},
methods: {
refresh() {
window.location.reload();
},
nextOperate() {
for (let i in this.sceneConf) {
if (!this.sceneConf[i].state) {
return this.$message.error('运行环境' + this.sceneConf[i].name + '的参数不符合配置,请检查');
}
}
for (let i in this.fileAuth) {
if (!this.fileAuth[i].state) {
return this.$message.error('目录或文件' + this.fileAuth[i].name + '的权限不够,请检查');
}
}
window.location.href = "{:U('Home/Index/home')}";
}
}
});
</script>
</body>
</html>