commit
ff434946f3
@ -0,0 +1,3 @@
|
||||
> 1%
|
||||
last 2 versions
|
||||
not dead
|
@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
@ -0,0 +1,19 @@
|
||||
# newvue
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
"presets": [
|
||||
"@vue/cli-plugin-babel/preset"
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"component",
|
||||
{
|
||||
"libraryName": "element-ui",
|
||||
"styleLibraryName": "theme-chalk"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "newvue",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.24.0",
|
||||
"core-js": "^3.6.5",
|
||||
"element-ui": "^2.15.6",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-router": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"less": "^4.1.2",
|
||||
"vue-cli-plugin-element": "^1.0.1",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view>
|
||||
</router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
name: 'app'
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
After Width: | Height: | Size: 8.8 KiB |
@ -0,0 +1,12 @@
|
||||
html,body,#app{
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.el-breadcrumb{
|
||||
margin-bottom: 15px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-card{
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) ! important;
|
||||
}
|
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 6.7 KiB |
@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,328 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--面包屑导航区-->
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>设备管理</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>设备网点</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-row>
|
||||
<el-button type="primary" @click="dialogFormVisible=true">新增</el-button>
|
||||
<el-button type="danger"@click="mulDelete()">批量删除</el-button>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item >
|
||||
<el-select v-model="value" clearable placeholder="搜索方式">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
v-model="search"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="search_some()">搜索</el-button>
|
||||
<el-button type="primary" @click="refresh()" icon="el-icon-refresh"></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
height="450"
|
||||
border
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-click="cellHandleclick">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="编号"
|
||||
width="80">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="kind"
|
||||
label="种类"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="名称"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="network_id"
|
||||
label="网点编号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="state"
|
||||
label="状态"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="打开" width="85">
|
||||
<el-button type="primary" @click="openVisible=true">打开</el-button>
|
||||
</el-table-column>
|
||||
<el-table-column label="关闭" width="85">
|
||||
<el-button type="primary" @click="closeVisible=true">关闭</el-button>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改" width="85">
|
||||
<el-button type="primary" @click="changeFormVisible=true">修改</el-button>
|
||||
</el-table-column>
|
||||
<el-table-column label="删除" width="85">
|
||||
<el-button type="danger" @click="deleteVisible=true">删除</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
|
||||
</el-footer>
|
||||
</el-container>
|
||||
<el-dialog title="新增" :visible.sync="dialogFormVisible" width=30%>
|
||||
<el-form ref="addFormRef" :model="addForm" class="add_form">
|
||||
<el-form-item label="编号" :label-width="formLabelWidth">
|
||||
<el-input v-model="addForm.id" prefix-icon="el-icon-user"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="种类" :label-width="formLabelWidth">
|
||||
<el-input v-model="addForm.kind" prefix-icon="el-icon-user"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" :label-width="formLabelWidth">
|
||||
<el-input v-model="addForm.name" prefix-icon="el-icon-lock"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="网点编号" :label-width="formLabelWidth">
|
||||
<el-input v-model="addForm.network_id" prefix-icon="el-icon-user"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="add_cancel()">取 消</el-button>
|
||||
<el-button type="primary" @click="add_success()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="修改" :visible.sync="changeFormVisible" width=30%>
|
||||
<el-form ref="changeFormRef" :model="changeForm" class="change_form">
|
||||
<el-form-item label="种类" :label-width="formLabelWidth">
|
||||
<el-input v-model="changeForm.kind" prefix-icon="el-icon-user"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" :label-width="formLabelWidth">
|
||||
<el-input v-model="changeForm.name" prefix-icon="el-icon-lock"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="网点编号" :label-width="formLabelWidth">
|
||||
<el-input v-model="changeForm.company" prefix-icon="el-icon-user"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="updateCancel()">取 消</el-button>
|
||||
<el-button type="primary" @click="updateData()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="是否确定删除" :visible.sync="deleteVisible" width=30%>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="deleteVisible=false">取 消</el-button>
|
||||
<el-button type="primary" @click="deleteData()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="是否确定打开" :visible.sync="openVisible" width=30%>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="openVisible=false">取 消</el-button>
|
||||
<el-button type="primary" @click="open_device()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="是否确定关闭" :visible.sync="closeVisible" width=30%>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeVisible=false">取 消</el-button>
|
||||
<el-button type="primary" @click="close_device()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "device",
|
||||
data() {
|
||||
return {
|
||||
dialogFormVisible: false,
|
||||
changeFormVisible:false,
|
||||
deleteVisible:false,
|
||||
openVisible:false,
|
||||
closeVisible:false,
|
||||
formLabelWidth:'',
|
||||
tableData: [],
|
||||
search:'',
|
||||
searchForm:{
|
||||
id:'',
|
||||
kind:'',
|
||||
name:'',
|
||||
network_id: '',
|
||||
state: ''
|
||||
},
|
||||
addForm:{
|
||||
id:'',
|
||||
kind:'',
|
||||
name:'',
|
||||
network_id: '',
|
||||
state: ''
|
||||
},
|
||||
changeForm:{
|
||||
id:'',
|
||||
kind:'',
|
||||
name:'',
|
||||
network_id: '',
|
||||
state: ''
|
||||
},
|
||||
options: [{
|
||||
value: 'kind',
|
||||
label: '种类'
|
||||
}, {
|
||||
value: 'name',
|
||||
label: '名称'
|
||||
},{
|
||||
value: 'network_id',
|
||||
label: '网点编号'
|
||||
}],
|
||||
value:'',
|
||||
multipleSelection:[],
|
||||
deleteId:'',
|
||||
openId:'',
|
||||
closeId:'',
|
||||
}
|
||||
},created() {
|
||||
this.request.get("/user/deviceFind").then(res=>{
|
||||
this.tableData = res;
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
add_success(){
|
||||
this.request.post("/user/deviceInsert",this.addForm).then(res=>{
|
||||
if (res){
|
||||
this.$message.success("新增成功");
|
||||
location.reload()
|
||||
}
|
||||
else
|
||||
this.$message.error("新增失败,编号不能为空或编号已存在");
|
||||
})
|
||||
this.dialogFormVisible = false;
|
||||
},
|
||||
add_cancel(){
|
||||
this.dialogFormVisible = false;
|
||||
},
|
||||
mulDelete(){
|
||||
if(!this.multipleSelection){
|
||||
return this.$message.error("请至少勾选一条");
|
||||
}
|
||||
var ids= this.multipleSelection.map(item => item.id).join();
|
||||
this.request.get("/user/deviceMulDelete?device_id="+ids).then(res=>{
|
||||
if(res>0){
|
||||
location.reload();
|
||||
this.$message.success("成功删除"+res+"条");
|
||||
}else {
|
||||
this.$message.error("删除失败");
|
||||
}
|
||||
})
|
||||
},
|
||||
search_some(){
|
||||
if(this.value.toString()==="name")
|
||||
this.searchForm.name = this.search;
|
||||
else if(this.value.toString()==="kind")
|
||||
this.searchForm.kind = this.search;
|
||||
else if(this.value.toString()==="network_id")
|
||||
this.searchForm.kind = this.search;
|
||||
else
|
||||
return this.$message.error("请选择搜索字段");
|
||||
if(this.search==="" || this.search==null)
|
||||
return this.$message.error("搜索框不能为空")
|
||||
else {
|
||||
this.request.post("/user/deviceSearch",this.searchForm).then(res=>{
|
||||
this.tableData = res;
|
||||
this.searchForm.name='';
|
||||
this.searchForm.kind='';
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
refresh(){
|
||||
this.request.get("/user/deviceFind").then(res=>{
|
||||
this.tableData = res;
|
||||
})
|
||||
},
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
updateData(){
|
||||
this.request.post("/user/deviceUpdate",this.changeForm).then(res=>{
|
||||
this.changeFormVisible=false;
|
||||
if(res===true){
|
||||
location.reload();
|
||||
this.$message.success("修改成功");
|
||||
}
|
||||
else
|
||||
this.$message.error("修改失败");
|
||||
})
|
||||
},
|
||||
cellHandleclick(row, column, cell, event){
|
||||
if(column.label==="修改"){
|
||||
this.changeForm.id = row.id;
|
||||
}else if(column.label==="删除"){
|
||||
this.deleteId=row.id;
|
||||
}else if(column.label==="打开"){
|
||||
this.openId=row.id;
|
||||
}else if(column.label==="关闭"){
|
||||
this.closeId=row.id;
|
||||
}
|
||||
},
|
||||
updateCancel(){
|
||||
this.changeFormVisible =false;
|
||||
},
|
||||
deleteData(){
|
||||
this.request.get("/user/deviceDelete",{params:{id:this.deleteId}}).then(res=>{
|
||||
this.deleteVisible=false;
|
||||
if (res){
|
||||
location.reload();
|
||||
this.$message.success("删除成功");
|
||||
}else
|
||||
this.$message.error("删除失败");
|
||||
})
|
||||
},
|
||||
open_device(){
|
||||
this.request.get("/user/deviceStateUpdate",{params:{state:"运行",id:this.openId}}).then(res=>{
|
||||
this.openVisible=false;
|
||||
if (res){
|
||||
location.reload();
|
||||
this.$message.success("打开成功");
|
||||
}else
|
||||
this.$message.error("打开失败");
|
||||
})
|
||||
},
|
||||
close_device(){
|
||||
this.request.get("/user/deviceStateUpdate",{params:{state:"关闭",id:this.closeId}}).then(res=>{
|
||||
this.closeVisible=false;
|
||||
if (res){
|
||||
location.reload();
|
||||
this.$message.success("关闭成功");
|
||||
}else
|
||||
this.$message.error("关闭失败");
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--面包屑导航区-->
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>系统管理</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>用户管理</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<!--卡片视图区-->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>用户信息</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text" @click="dialogFormVisible = true">修改密码</el-button>
|
||||
</div>
|
||||
<div key="username" class="text item">
|
||||
{{'用户账号:'+display.username}}
|
||||
</div>
|
||||
<div key="phone" class="text item">
|
||||
{{'用户电话:'+display.phone}}
|
||||
</div>
|
||||
<div key="email" class="text item">
|
||||
{{'用户邮箱:'+display.email}}
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog title="修改密码" :visible.sync="dialogFormVisible" width=30%>
|
||||
<el-form ref="changeFormRef" :model="changeForm" >
|
||||
<el-form-item label="旧密码" :label-width="formLabelWidth">
|
||||
<el-input v-model="changeForm.old_password" prefix-icon="el-icon-lock" type="password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" :label-width="formLabelWidth">
|
||||
<el-input v-model="changeForm.new_password" prefix-icon="el-icon-lock" type="password"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="change()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "user",
|
||||
data(){
|
||||
return{
|
||||
dialogFormVisible: false,
|
||||
formLabelWidth: '',
|
||||
display:{
|
||||
username:'',
|
||||
phone:'',
|
||||
email:''
|
||||
},
|
||||
login:{
|
||||
username:'',
|
||||
password:''
|
||||
},
|
||||
changeForm:{
|
||||
old_password:'',
|
||||
new_password:'',
|
||||
},
|
||||
changeUser:{
|
||||
username:'',
|
||||
password:'',
|
||||
state:'',
|
||||
phone:'',
|
||||
email:''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
change(){
|
||||
this.changeUser.username = window.sessionStorage.getItem("username");
|
||||
this.changeUser.password = this.changeForm.new_password;
|
||||
this.changeUser.state = "0";
|
||||
this.changeUser.phone = "无";
|
||||
this.changeUser.email = "无";
|
||||
this.login.username = this.changeUser.username;
|
||||
this.login.password = this.changeForm.old_password;
|
||||
this.request.post("/user/login",this.login).then(res =>{
|
||||
if(!res){
|
||||
this.$message.error("修改失败");
|
||||
}else {
|
||||
this.request.post("/user/change",this.changeUser).then(res =>{
|
||||
if(!res){
|
||||
this.$message.error("修改失败");
|
||||
}else
|
||||
this.$message.success("修改成功");
|
||||
})
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false;
|
||||
}
|
||||
},
|
||||
created:function (){
|
||||
this.display.username = window.sessionStorage.getItem("username");
|
||||
this.request.get("/user/find?username="+this.display.username).then(res=>{
|
||||
console.log(res[0]);
|
||||
this.display = res[0];
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.text {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.box-card {
|
||||
width: 480px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "register"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
欢迎使用物联网管理系统
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
|
||||
export default ({
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,27 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="about">
|
||||
<h1>This is an about page</h1>
|
||||
</div>
|
||||
</template>
|
@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<img alt="Vue logo" src="../assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in new issue