Browse Source

智能居家数据监护

lcsj
lzp 4 months ago
parent
commit
28989fe11f
  1. 4
      .env.development
  2. 2
      .env.production
  3. 2
      .env.staging
  4. 2
      package.json
  5. 74
      src/views/index.vue
  6. 2
      src/views/login.vue
  7. 2
      src/views/register.vue
  8. 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": {

74
src/views/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div style="padding: 16px;min-height: calc(100vh - 84px);display: flex; justify-content: center;align-items: center;"> <div style="padding: 16px;min-height: calc(100vh - 84px);display: flex; justify-content: center;align-items: center;">
<div class="div-box"> <div class="div-box">
<div class="div-box-title"> 智能化衣柜 </div> <div class="div-box-title"> 智能居家数据监护 </div>
<div class="div-ul"> <div class="div-ul">
<div class="div-li"> <div class="div-li">
<div> <div>
@ -13,36 +13,77 @@
<!-- ON开启 OFF关闭 --> <!-- ON开启 OFF关闭 -->
<div class="div-li"> <div class="div-li">
<div> <div>
<span>除湿</span> <span>CO</span>5PPM
<el-switch v-model="value2" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</div> </div>
<div> <div>
<span>杀菌</span> <span>预警</span>
<el-switch v-model="value2" active-color="#13ce66" inactive-color="#ff4949"> <el-switch v-model="value2" active-color="#13ce66" inactive-color="#ff4949">
</el-switch> </el-switch>
</div> </div>
</div> </div>
</div> </div>
<div class="div-tips"><span>标签序列号</span>AE0B01 </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> </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, 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();
});
}
});
}, },
}, },
}; };
@ -77,17 +118,26 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 12px; margin-bottom: 12px;
div { div {
flex: 1 flex: 1;
align-items: center;
} }
span { span {
color: #666; color: #666;
} }
} }
} }
.div-tips{
.div-tips {
font-size: 18px;
line-height: 22px;
display: flex;
align-items: center;
span { span {
color: #666; color: #666;
} }
} }
</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