pull/1/head
pnoker 4 years ago
parent a55ec3e56e
commit 3902dc7b29

14104
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -3,19 +3,19 @@
"version": "3.0.0",
"private": true,
"author": "pnoker",
"description": "IOT DC3 平台UI",
"description": "IOT DC3 UI",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"analyz": "npm_config_report=true npm run build"
"lint": "vue-cli-service lint"
},
"dependencies": {
"@antv/g2": "^3.5.11",
"@antv/l7": "latest",
"@antv/l7-maps": "latest",
"axios": "^0.19.1",
"core-js": "^3.6.2",
"@smallwei/avue": "^2.3.9",
"axios": "^0.19.2",
"core-js": "^3.6.4",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
"insert-css": "^2.0.0",
@ -24,7 +24,7 @@
"nprogress": "latest",
"vue": "^2.6.11",
"vue-axios": "^2.1.5",
"vue-router": "^3.1.3",
"vue-router": "^3.1.5",
"vuex": "^3.1.2"
},
"devDependencies": {
@ -36,8 +36,8 @@
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^6.1.2",
"node-sass": "^4.13.0",
"sass-loader": "^8.0.0",
"node-sass": "^4.13.1",
"sass-loader": "^8.0.2",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.11"
},

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 422 B

@ -8,6 +8,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<link rel="stylesheet" href="<%= BASE_URL %>css/animate/3.7.0/animate.min.css">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>DC3 Web UI</title>
<style>
@ -74,7 +75,7 @@
<div id="app">
<div class="load_home">
<div class="load_home__main">
<img class="load_home__loading" src="./svg/loading-init.svg" alt="loading">
<img class="load_home__loading" src="./images/common/loading-init.svg" alt="loading">
<div class="load_home__title">
正在加载资源
</div>

@ -11,11 +11,18 @@
background: radial-gradient(circle, #fff, #1296DB);
}
.login-weaper {
margin: 0 auto;
width: 1000px;
.login-wrapper-left {
margin: 0 0 0 auto;
width: 500px;
border-radius: 5px;
box-shadow: -1px 5px 10px rgba(0, 0, 0, 0.4);
}
.login-wrapper-right {
margin: 0 auto 0 0;
width: 500px;
border-radius: 5px;
box-shadow: -4px 5px 10px rgba(0, 0, 0, 0.4);
box-shadow: 1px 5px 10px rgba(0, 0, 0, 0.4);
.el-input-group__append {
border: none;
@ -38,7 +45,7 @@
background-color: #55b5e5;
color: #fff;
float: left;
width: 50%;
width: 100%;
position: relative;
}
@ -68,13 +75,12 @@
}
.login-border {
z-index: 1;
border-left: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
color: #fff;
background-color: #fff;
width: 50%;
width: 100%;
float: left;
box-sizing: border-box;
}

@ -1,5 +1,5 @@
<template>
<div class="card">
<div class="card_base">
<el-card shadow="hover">
<slot/>
</el-card>
@ -13,13 +13,14 @@
</script>
<style lang="scss">
.card {
padding: 8px 5px;
.card_base {
padding: 2px 3px;
border-radius: 5px;
box-sizing: border-box;
.el-card {
width: 100%;
box-sizing: border-box;
}
.el-card__body {
@ -28,7 +29,7 @@
&:first-child {
padding-top: 0;
padding-left: 3px;
padding-left: 0;
}
}
</style>

@ -1,5 +1,5 @@
<template>
<div class="card">
<div class="card_title">
<el-card shadow="hover">
<div slot="header">
<span>{{title}}</span>
@ -24,13 +24,14 @@
</script>
<style lang="scss">
.card {
padding: 8px 5px;
.card_title {
padding: 2px 3px;
border-radius: 5px;
box-sizing: border-box;
.el-card {
width: 100%;
box-sizing: border-box;
}
.el-card__header {
@ -43,7 +44,7 @@
&:first-child {
padding-top: 0;
padding-left: 3px;
padding-left: 0;
}
}
</style>

@ -1,13 +1,17 @@
import Vue from 'vue'
import Element from 'element-ui'
import Avue from "@smallwei/avue";
import locale from 'element-ui/lib/locale/lang/zh-CN'
import 'element-ui/lib/theme-chalk/index.css';
import './element-variables.scss'
import '@smallwei/avue/lib/index.css'
import baseCard from '@/components/card/base-card'
import titleCard from '@/components/card/title-card'
Vue.use(Element, {locale});
Vue.use(Avue);
Vue.component('base-card', baseCard);
Vue.component('title-card', titleCard);

@ -1,5 +1,8 @@
export default [
{
path: '*',
redirect: '/404'
}, {
name: 'login',
path: '/login',
meta: {
@ -35,8 +38,5 @@ export default [
isAuth: false
},
component: () => import('@/components/error/500')
}, {
path: '*',
redirect: '/404'
}
]

@ -1,6 +1,6 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import PageRouter from './page/index'
import CommonRouter from './common/index'
import ViewsRouter from './views/index'
Vue.use(VueRouter);
@ -22,6 +22,6 @@ const router = new VueRouter({
routes: []
});
router.addRoutes([...PageRouter, ...ViewsRouter]);
router.addRoutes([...CommonRouter, ...ViewsRouter]);
export default router

@ -4,9 +4,6 @@ export default [
{
path: '/',
redirect: '/home',
meta: {
isAuth: true
},
component: Index,
children: [
{
@ -23,7 +20,7 @@ export default [
meta: {
isAuth: true
},
component: () => import('@/views/Things')
component: () => import('@/views/things/Things')
}, {
name: 'template',
path: '/template',

@ -1,5 +1,15 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>
<script>
export default {
data() {
return {}
},
mounted(){
}
}
</script>

@ -1,5 +1,109 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
<base-card>
<avue-crud :option="option"
:data="data"
ref="crud"
v-model="form"
@row-del="rowDel"
@row-update="handleRowUpdate"
@row-save="handleRowSave"
@search-change="searchChange"
@search-reset="searchReset">
<template slot="menuLeft">
<el-button type="danger"
size="small"
icon="el-icon-delete"
plain>
</el-button>
</template>
</avue-crud>
</base-card>
</template>
<script>
export default {
data() {
return {
form: {},
selectionList: [],
query: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
data: [{
name: '张三',
sex: '男',
date: '1994-02-23 00:00:00'
}, {
name: '李四',
sex: '女',
date: '1994-02-23 00:00:00'
}, {
name: '王五',
sex: '女',
date: '1994-02-23 00:00:00'
}, {
name: '赵六',
sex: '男',
date: '1994-02-23 00:00:00'
}],
option: {
tip: false,
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: '姓名',
prop: 'name',
search: true,
rules: [{
required: true,
message: "请输入部门名称",
trigger: "blur"
}]
},
{
label: '性别',
prop: 'sex'
}, {
label: "日期",
prop: "date",
type: "date",
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "yyyy-MM-dd hh:mm:ss",
}
]
}
}
},
methods: {
//
handleRowSave(row, done, loading) {
this.data.splice(0, 0, row);
done(); //
loading(); //
},
//
handleRowUpdate(row, index, done, loading) {
this.data.splice(index, 1, row);
done(); //
loading(); //
},
//
rowDel(row, index) {
this.$confirm('是否删除该条信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.data.splice(index, 1);
});
},
},
}
</script>

@ -1,64 +0,0 @@
<template>
<div class="container view">
<el-row class="operator">
<el-button icon="el-icon-search" circle></el-button>
<el-button type="success" icon="el-icon-plus" circle></el-button>
<el-button type="primary" icon="el-icon-edit" circle></el-button>
<el-button type="warning" icon="el-icon-star-off" circle></el-button>
<el-button type="danger" icon="el-icon-delete" circle></el-button>
</el-row>
<el-row class="device_list">
<el-card class="box-card" shadow="hover">
<div slot="header" class="clearfix">
<span>设备名称</span>
<el-button class="el-icon-more" style="float: right; padding: 3px 0" type="text"/>
</div>
<div v-for="o in 4" :key="o" class="text item">
{{'列表内容 ' + o }}
</div>
</el-card>
<el-card class="box-card" shadow="hover">
<div slot="header" class="clearfix">
<span>设备名称</span>
<el-button class="el-icon-more" style="float: right; padding: 3px 0" type="text"/>
</div>
<div v-for="o in 4" :key="o" class="text item">
{{'列表内容 ' + o }}
</div>
</el-card>
</el-row>
<el-row class="page">
<el-pagination
background
layout="prev, pager, next"
:total="1000">
</el-pagination>
</el-row>
</div>
</template>
<style>
.text {
font-size: 14px;
}
.item {
margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {
display: table;
}
.clearfix:after {
clear: both
}
.box-card {
width: 480px;
}
</style>

@ -16,7 +16,6 @@
<div id="c3"/>
</title-card>
</el-col>
</el-col>
<el-col :span="24">
<base-card>
@ -191,13 +190,9 @@
</script>
<style lang="scss">
.home:first-child {
padding-top: 4px;
}
#device-map {
position: relative;
width: 100%;
height: 500px;
height: 600px;
}
</style>

@ -46,7 +46,7 @@
</el-col>
</div>
<div class="body">
<el-scrollbar style="height: 100%;">
<el-scrollbar>
<router-view/>
</el-scrollbar>
</div>
@ -132,32 +132,21 @@
}
.body {
top: 65px;
bottom: 5px;
width: 100%;
position: absolute;
.el-scrollbar__wrap {
overflow-x: hidden;
}
}
.view {
top: 1px;
top: 60px;
right: 0;
left: 0;
bottom: 0;
width: 100%;
padding: 4px;
position: absolute;
}
background: #f0f2f5;
.operator {
text-align: center;
margin: 5px 0;
}
.el-scrollbar {
height: 100%;
.page {
right: 1px;
bottom: 1px;
position: absolute !important;
.el-scrollbar__wrap {
overflow-x: hidden;
}
}
}
</style>

@ -1,9 +1,12 @@
<template>
<div class="login-container">
<div class="login-weaper animated bounceInDown">
<div class="login-wrapper-left animated bounceInDown">
<div class="login-left">
<img class="img" src="/images/logo/logo-white.png">
</div>
</div>
<particles/>
<div class="login-wrapper-right animated bounceInDown">
<div class="login-border">
<div class="login-main">
<h4 class="login-title">
@ -46,7 +49,6 @@
</div>
</div>
</div>
<particles/>
</div>
</template>
<script>
@ -89,7 +91,7 @@
});
this.$store.dispatch("GenerateToken", this.loginForm).then(() => {
this.$router.push({path: '/'});
loading.close();
setTimeout(() => loading.close(), 500);
}).catch(() => {
loading.close()
});

@ -0,0 +1,220 @@
<template>
<el-col :span="24">
<el-col :span="4">
<base-card>
<avue-tree :option="treeOption"
:data="treeData"
@node-click="nodeClick"/>
</base-card>
</el-col>
<el-col :span="20">
<base-card>
<avue-crud :option="option"
:data="data"
ref="crud"
v-model="form"
:page="page"
@row-del="rowDel"
@row-update="handleRowUpdate"
@row-save="handleRowSave"
@search-change="searchChange"
@search-reset="searchReset">
<template slot="menuLeft">
<el-button type="danger"
size="small"
icon="el-icon-delete"
plain>
</el-button>
</template>
</avue-crud>
</base-card>
</el-col>
</el-col>
</template>
<script>
export default {
data() {
return {
form: {},
query: {},
selectionList: [],
page: {
currentPage: 1,
total: 0,
pageSize: 20
},
treeOption: {
nodeKey: 'id',
size: 'medium',
formOption: {
labelWidth: 100,
column: [{
label: '分组',
prop: 'group'
}],
}
},
option: {
index: true,
align: 'center',
border: true,
viewBtn: true,
selection: true,
stripe: true,
tip: false,
height: 664,
column: [
{
label: '设备',
prop: 'name',
search: true,
rules: [{
required: true,
message: "请输入设备名称",
trigger: "blur"
}]
}, {
label: '编码',
prop: 'code',
search: true,
rules: [{
required: true,
message: "请输入设备编码",
trigger: "blur"
}]
}, {
label: '状态',
prop: 'status',
search: true,
rules: [{
required: true,
message: "请输入设备状态",
trigger: "blur"
}]
}, {
label: '描述',
prop: 'description'
}, {
label: "创建日期",
prop: "create_time",
type: "date",
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "yyyy-MM-dd hh:mm:ss",
}, {
label: "修改日期",
prop: "update_time",
type: "date",
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "yyyy-MM-dd hh:mm:ss",
}
]
},
treeData: [
{
id: 0,
label: '一级部门',
value: 0,
children: [
{
id: 1,
label: '一级部门1',
value: 0,
}
]
}],
data: [{
name: '张三',
sex: '男',
date: '1994-02-23 00:00:00'
}, {
name: '李四',
sex: '女',
date: '1994-02-23 00:00:00'
}, {
name: '王五',
sex: '女',
date: '1994-02-23 00:00:00'
}, {
name: '赵六',
sex: '男',
date: '1994-02-23 00:00:00'
}]
}
},
created() {
this.getList()
},
methods:
{
getList() {
this.page.total = 200
if (this.page.currentPage === 1) {
this.data = [
{
name: '张三',
sex: '男'
}, {
name: '李四',
sex: '女'
}, {
name: '李四',
sex: '女'
}, {
name: '李四',
sex: '女'
}, {
name: '李四',
sex: '女'
}, {
name: '李四',
sex: '女'
}, {
name: '李四',
sex: '女'
}
]
} else if (this.page.currentPage == 2) {
this.data = [
{
name: '李四',
sex: '女'
}
]
}
},
//
handleRowSave(row, done, loading) {
this.data.splice(0, 0, row);
done(); //
loading(); //
}
,
//
handleRowUpdate(row, index, done, loading) {
this.data.splice(index, 1, row);
done(); //
loading(); //
}
,
//
rowDel(row, index) {
this.$confirm('是否删除该条信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.data.splice(index, 1);
});
}
,
}
,
}
</script>
<style lang="scss">
.avue-tree {
height: 876px;
}
</style>
Loading…
Cancel
Save