Compare commits

...

4 Commits
master ... lcsj

  1. 4
      .env.development
  2. 2
      .env.production
  3. 2
      .env.staging
  4. 2
      package.json
  5. 4
      src/store/modules/permission.js
  6. 175
      src/views/index.vue
  7. 2
      src/views/login.vue
  8. 2
      src/views/register.vue
  9. 2
      vue.config.js

4
.env.development

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 智能化衣柜 VUE_APP_TITLE = 智能粮仓数据监测
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 智能化衣柜/开发环境 # 智能粮仓数据监测/开发环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/dev-api'
VUE_APP_IMG_URL = 'https://test.tall.wiki/commen/' VUE_APP_IMG_URL = 'https://test.tall.wiki/commen/'
VUE_APP_API_QZURL = 'https://test.tall.wiki/commen/' VUE_APP_API_QZURL = 'https://test.tall.wiki/commen/'

2
.env.production

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 智能化衣柜 VUE_APP_TITLE = 智能粮仓数据监测
# 生产环境配置 # 生产环境配置
NODE_ENV = 'production' NODE_ENV = 'production'

2
.env.staging

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 智能化衣柜 VUE_APP_TITLE = 智能粮仓数据监测
# 生产环境配置 # 生产环境配置
NODE_ENV = 'production' NODE_ENV = 'production'

2
package.json

@ -1,7 +1,7 @@
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "3.8.9", "version": "3.8.9",
"description": "智能化衣柜", "description": "智能粮仓数据监测",
"author": "若依", "author": "若依",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

4
src/store/modules/permission.js

@ -34,8 +34,8 @@ const permission = {
return new Promise(resolve => { return new Promise(resolve => {
// 向后端请求路由数据 // 向后端请求路由数据
getRouters().then(res => { getRouters().then(res => {
const sdata = JSON.parse(JSON.stringify(res.data)) const sdata = JSON.parse(JSON.stringify([]))
const rdata = JSON.parse(JSON.stringify(res.data)) const rdata = JSON.parse(JSON.stringify([]))
const sidebarRoutes = filterAsyncRouter(sdata) const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, false, true) const rewriteRoutes = filterAsyncRouter(rdata, false, true)
const asyncRoutes = filterDynamicRoutes(dynamicRoutes); const asyncRoutes = filterDynamicRoutes(dynamicRoutes);

175
src/views/index.vue

@ -1,86 +1,155 @@
<template> <template>
<div style="padding: 16px"> <div style="padding: 16px;min-height: calc(100vh - 84px);display: flex; justify-content: center;align-items: center;">
<!-- <img src="./welcome.5e305008.png" style="" /> --> <div class="div-box">
<div class="div-box-title"> 智能粮仓数据监测 </div>
<div class="div-ul">
<div class="div-li">
<div>
<span>温度</span>22.2
</div>
<div> <span>湿度</span>50%
</div>
</div>
<!-- ON开启 OFF关闭 -->
<div class="div-li">
<div>
<span>CO</span>5PPM
</div>
<div>
<span>光照</span>350
</div>
</div>
<div class="div-li">
<div>
<span>预警</span>
<el-switch v-model="value2" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</div>
<div>
<span>阈值设定</span>30
<i class="el-icon-edit" style="color: rgb(64, 158, 255);margin-left: 4px;cursor: pointer;"
@click="handleSettings"></i>
</div>
</div>
</div>
<!-- <div class="div-tips">
<span>阈值设定</span>30 <i class="el-icon-edit" style="color: rgb(64, 158, 255);margin-left: 4px;cursor: pointer;"
@click="handleSettings"></i>
</div> -->
</div>
<!-- 添加或修改公告对话框 -->
<el-dialog title="阈值设定" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="阈值" prop="noticeTitle">
<el-input v-model="form.noticeTitle" placeholder="请输入阈值" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { updateNotice } from "@/api/system/notice";
export default { export default {
name: "Index", name: "Index",
data() { data() {
return { return {
open: false,
value2: false,
//
form: {},
//
rules: {
noticeTitle: [
{ required: true, message: "公告标题不能为空", trigger: "blur" }
],
noticeType: [
{ required: true, message: "公告类型不能为空", trigger: "change" }
]
},
// //
version: "3.8.9", version: "3.8.9",
}; };
}, },
methods: { methods: {
goTarget(href) { //
window.open(href, "_blank"); handleSettings() {
this.open = true;
this.form = {
noticeTitle: "30",
};
// this.$message.success('');
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
updateNotice(this.form).then(response => {
this.$modal.msgSuccess("操作成功");
this.open = false;
this.getList();
});
}
});
}, },
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.home { .div-box {
blockquote { width: 500px;
padding: 10px 20px; box-sizing: border-box;
margin: 0 0 20px; padding: 16px;
font-size: 17.5px; border: 1px solid #ccc;
border-left: 5px solid #eee; border-radius: 10px;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
.col-item {
margin-bottom: 20px;
}
ul {
padding: 0;
margin: 0;
}
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif; .div-box-title {
font-size: 13px; font-size: 20px;
color: #676a6c; font-weight: bold;
overflow-x: hidden; margin-bottom: 20px;
text-align: center;
ul { border-bottom: 1px solid #ccc;
list-style-type: none; padding-bottom: 16px;
} }
}
h4 { .div-ul {
margin-top: 0px; .div-li>div:nth-of-type(1) {
border-right: 1px solid #ccc;
margin-right: 16px;
} }
h2 { .div-li {
margin-top: 10px; font-size: 18px;
font-size: 26px; display: flex;
font-weight: 100; justify-content: space-between;
} margin-bottom: 12px;
p { div {
margin-top: 10px; flex: 1;
align-items: center;
}
b { span {
font-weight: 700; color: #666;
} }
} }
}
.update-log { .div-tips {
ol { font-size: 18px;
display: block; line-height: 22px;
list-style-type: decimal; display: flex;
margin-block-start: 1em; align-items: center;
margin-block-end: 1em;
margin-inline-start: 0; span {
margin-inline-end: 0; color: #666;
padding-inline-start: 40px;
}
} }
} }
</style> </style>

2
src/views/login.vue

@ -8,7 +8,7 @@
> >
<h3 class="title" style="margin-bottom: 0"> <h3 class="title" style="margin-bottom: 0">
</h3> </h3>
<h3 class="title">智能化衣柜</h3> <h3 class="title">智能粮仓数据监测</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"

2
src/views/register.vue

@ -6,7 +6,7 @@
:rules="registerRules" :rules="registerRules"
class="register-form" class="register-form"
> >
<h3 class="title">智能化衣柜</h3> <h3 class="title">智能粮仓数据监测</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="registerForm.username" v-model="registerForm.username"

2
vue.config.js

@ -8,7 +8,7 @@ function resolve(dir) {
const CompressionPlugin = require("compression-webpack-plugin"); const CompressionPlugin = require("compression-webpack-plugin");
const name = const name =
process.env.VUE_APP_TITLE || "智能化衣柜"; // 网页标题 process.env.VUE_APP_TITLE || "智能粮仓数据监测"; // 网页标题
const port = process.env.port || process.env.npm_config_port || 80; // 端口 const port = process.env.port || process.env.npm_config_port || 80; // 端口

Loading…
Cancel
Save