tanyanfei 5 years ago
parent
commit
4e8399a499

+ 11 - 0
.gitignore

@@ -0,0 +1,11 @@
+*.pyc
+*.bak
+.DS_Store
+
+dist/
+node_modules/
+npm-debug.log
+.editorconfig
+
+.idea/
+

+ 29 - 0
README.md

@@ -0,0 +1,29 @@
+# admin
+
+## Project setup
+```
+npm install
+```
+
+### Compiles and hot-reloads for development
+```
+npm run serve
+```
+
+### Compiles and minifies for production
+```
+npm run build
+```
+
+### Run your tests
+```
+npm run test
+```
+
+### Lints and fixes files
+```
+npm run lint
+```
+
+### Customize configuration
+See [Configuration Reference](https://cli.vuejs.org/config/).

+ 5 - 0
babel.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  presets: [
+    '@vue/app'
+  ]
+}

+ 69 - 0
package.json

@@ -0,0 +1,69 @@
+{
+  "name": "admin",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve --open",
+    "build": "vue-cli-service build",
+    "lint": "vue-cli-service lint"
+  },
+  "dependencies": {
+    "ali-oss": "^6.2.1",
+    "cos-js-sdk-v5": "^0.5.20",
+    "echarts": "^4.6.0",
+    "element-ui": "^2.7.2",
+    "font-awesome": "^4.7.0",
+    "js-base64": "^2.5.2",
+    "qrcode.vue": "^1.7.0",
+    "url-search-params-polyfill": "^8.0.0",
+    "vue": "^2.6.6",
+    "vue-baidu-map": "^0.21.22",
+    "vue-router": "^3.0.1",
+    "vuex": "^3.0.1",
+    "wangeditor": "^3.1.1"
+  },
+  "devDependencies": {
+    "@babel/core": "^7.1.0",
+    "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
+    "@babel/plugin-transform-runtime": "^7.1.0",
+    "@babel/preset-env": "^7.1.0",
+    "@babel/preset-react": "^7.0.0",
+    "@vue/cli-plugin-babel": "^3.5.0",
+    "@vue/cli-plugin-eslint": "^3.5.0",
+    "@vue/cli-service": "^3.5.0",
+    "axios": "^0.18.0",
+    "babel-loader": "^8.0.2",
+    "babel-polyfill": "^6.26.0",
+    "es6-promise": "^4.2.8",
+    "eslint": "^5.8.0",
+    "eslint-plugin-vue": "^5.0.0",
+    "node-sass": "^4.11.0",
+    "sass-loader": "^7.1.0",
+    "vue-cropper": "^0.4.9",
+    "vue-template-compiler": "^2.5.21"
+  },
+  "eslintConfig": {
+    "root": true,
+    "env": {
+      "node": true
+    },
+    "extends": [
+      "plugin:vue/essential",
+      "eslint:recommended"
+    ],
+    "rules": {},
+    "parserOptions": {
+      "parser": "babel-eslint"
+    }
+  },
+  "postcss": {
+    "plugins": {
+      "autoprefixer": {}
+    }
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
+}

BIN
public/favicon.ico


+ 17 - 0
public/index.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+  <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>百安兮安全管控</title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but admin 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>

+ 12 - 0
src/App.vue

@@ -0,0 +1,12 @@
+<template>
+  <div id="app">
+    <transition name="fade"
+		            mode="out-in">
+			<router-view></router-view>
+		</transition>
+  </div>
+</template>
+
+<style lang='scss'>
+
+</style>

+ 68 - 0
src/api.js

@@ -0,0 +1,68 @@
+import axios from 'axios';
+// var baseURL='https://www.scxjc.club'
+var baseURL = ''
+// axios.defaults.headers.get['Content-Type']='application/json;charset=utf-8';
+axios.interceptors.request.use(
+	config => {
+		// const token = localStorage.getItem('token');
+		// if (config.url.indexOf('downloadzip') >= 0) {
+		// 	if (token) { // 判断是否存在token,如果存在的话,则每个http header都加上token                      
+		// 		config.headers.Authorization = `jwt ${token}`;   
+		// 	} else {
+		// 		//未登录
+		// 		window.location.hash = "/login";
+		// 	}
+		// } 
+		return config;
+	},
+	err => {
+		return Promise.reject(err);
+	});
+axios.interceptors.response.use(function (response) {
+	console.log(response.headers)
+	// IE 8-9 
+	if (response.data == null && response.config.responseType === 'json' && response.request.responseText != null) {
+		try {
+			// eslint-disable-next-line no-param-reassign
+			response.data = JSON.parse(response.request.responseText);
+		} catch (e) {
+			// ignored
+		}
+	}
+	// 对响应数据做点什么
+	if (response.data.code == 401) {
+		window.location.hash = "/login";
+	}
+	if (response.data.code == 305) {
+		window.location.hash = "/";
+	}
+	return response;
+}, function (error) {
+	// 对响应错误做点什么
+	if (error.request.status == 403) {
+		window.location.hash = "/login";
+	}
+	// console.log(Object.getOwnPropertyNames(error))
+	// console.log(error.request,error.message)
+	return Promise.reject(error);
+});
+export default {
+	//登录
+	login: params => {
+		return axios.post(`${baseURL}/api/account/login`, params);
+	},
+	logout: params => {
+		return axios.post(`${baseURL}/api/account/logout`, params);
+	},
+	getInfo: params => {
+		return axios.get(`${baseURL}/api/account/info`)
+	},
+	uploadFile: params => {
+		return axios.post(`${baseURL}/api/admin/uploadfile`, params);
+	},
+	//获取验证码
+	getCode: params => {
+		return axios.get(`${baseURL}/api/account/imgcode`)
+	},
+
+}

BIN
src/assets/bg.png


BIN
src/assets/logo.png


+ 49 - 0
src/components/Page.vue

@@ -0,0 +1,49 @@
+<style lang="scss">
+ @import '../style/style.scss';
+    .el-pagination{
+        li,button{
+            border: 1px solid #CACACA !important;
+            background-color: #fff !important;
+        }
+        .active{
+            border:none !important;
+            background: $color !important;
+        }
+    }
+</style>
+<template>
+    <el-pagination
+    @current-change="getData"
+    background :page-size='20'
+    @size-change="handleSizeChange"
+    :page-sizes="[20, 30, 40, 50,60,70,80,90,100]"
+    layout="sizes,total,prev, pager, next"
+    :total="total">
+    </el-pagination>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            page:1
+        }
+    },
+    props: {
+        total:'',
+    },
+    methods:{
+        getData(type){
+            // if(type == 1){
+            //     this.data.pageNumber=this.data.pageNumber-1
+            // }else if(type == 2){
+            //     this.data.pageNumber=this.data.pageNumber+1
+            // }
+             this.page=type
+            this.$emit('pageChange')
+        },
+        handleSizeChange(val){
+            this.$emit('pageChange',val)
+        }
+    }
+}
+</script>

+ 95 - 0
src/components/Subject.vue

@@ -0,0 +1,95 @@
+<style lang="scss">
+ @import '../style/style.scss';
+    .sub{
+        .el-input{
+            width: 300px !important;
+        }
+    }
+</style>
+<template>
+    <span v-if='!subject_id'>
+        <el-cascader v-if='value' class="sub" :props='props' 
+        placeholder="请选择培训科目 / 作业类别 / 准操项目"
+        v-model="value1" @change="handleChange"
+        :options="data"></el-cascader>
+        <el-cascader v-else class="sub" :props='props1' clearable
+        placeholder="请选择培训科目 / 作业类别 / 准操项目"
+        v-model="value1" @change="handleChange"
+        :options="data"></el-cascader>
+    </span>
+    <span v-else>
+        <el-cascader class="sub" :props='props1' clearable
+        placeholder="请选择作业类别 / 准操项目"
+        v-model="value1" @change="handleChange"
+        :options="data">
+        </el-cascader>
+    </span>
+</template>   
+<script>
+export default {
+    data(){
+        return{
+            data:[],
+            value1:[],
+            props:{
+                label:'name',
+                checkStrictly:true,
+                value:'id'
+            },
+            props1:{
+                label:'name',
+                checkStrictly:true,
+                value:'name'
+            }
+        }
+    },
+    props: {
+        value:'',
+        subvalue:'',
+        subject_id:''
+    },
+    methods:{
+        getData(type){
+            this.$api.getSubList().then(res=>{
+                let data=res.data.data;
+                if(this.subject_id){
+                    for(let i=0;i<data.length;i++){
+                        if(data[i].id == this.subject_id){
+                            this.data=data[i].children
+                        }
+                    }
+                }else{
+                    this.data=res.data.data
+                }
+              
+          })
+        },
+        handleChange(value) {
+            var id='',that=this;
+            if(value.length>=3&&isNaN(value[0])){
+                var item1=this.data.filter(item=>item.name==value[0]),
+                    item2=item1[0].children.filter(item=>item.name==value[1]),
+                    item3=item2[0].children.filter(item=>item.name==value[2])
+                    id=item3[0].id;
+            }
+            setTimeout(function(){
+                let values=document.querySelector('.el-input__inner').value;
+                let items=values.split(' / ');
+                console.log(values)
+                that.$emit('subChange',items,id,value)
+            },100)
+            
+            
+        }
+    },
+    created(){
+        this.getData()
+        if(this.value){
+            this.value1=this.value   
+        }
+        if(this.subvalue){
+            this.value1=this.subvalue.split('|')
+        }
+    }
+}
+</script>

+ 145 - 0
src/components/fuEditor/index.vue

@@ -0,0 +1,145 @@
+<template lang="html">
+  <div class="editor">
+    <div ref="toolbar" class="toolbar">
+    </div>
+    <div ref="editor" class="text">
+    </div>
+  </div>
+</template>
+
+<script>
+import E from "wangeditor";
+export default {
+  name: "editoritem",
+  data() {
+    return {
+      // uploadPath,
+      editor: null,
+      info_: null
+    };
+  },
+  model: {
+    prop: "value",
+    event: "change"
+  },
+  props: {
+    value: {
+      type: String,
+      default: ""
+    },
+    isClear: {
+      type: Boolean,
+      default: false
+    }
+  },
+  watch: {
+    isClear(val) {
+      // 触发清除文本域内容
+      if (val) {
+        this.editor.txt.clear();
+        this.info_ = null;
+      }
+    },
+    value: function(value) {
+      if (value !== this.editor.txt.html()) {
+        this.editor.txt.html(this.value);
+      }
+    }
+    //value为编辑框输入的内容,这里我监听了一下值,当父组件调用得时候,如果给value赋值了,子组件将会显示父组件赋给的值
+  },
+  mounted() {
+    this.seteditor();
+    this.editor.txt.html(this.value);
+  },
+  methods: {
+    seteditor() {
+
+      // http://192.168.2.125:8080/admin/storage/create
+      this.editor = new E(this.$refs.toolbar, this.$refs.editor);
+      this.editor.customConfig.uploadImgShowBase64 = false; // base 64 存储图片
+      this.editor.customConfig.uploadImgServer =
+        "/api/admin/uploadfile"; // 配置服务器端地址
+      this.editor.customConfig.uploadImgHeaders = {}; // 自定义 header
+      this.editor.customConfig.uploadFileName = "file"; // 后端接受上传文件的参数名
+      this.editor.customConfig.uploadImgMaxSize = 2 * 1024 * 1024; // 将图片大小限制为 2M
+      this.editor.customConfig.uploadImgMaxLength = 6; // 限制一次最多上传 3 张图片
+      this.editor.customConfig.uploadImgTimeout = 3 * 60 * 1000; // 设置超时时间
+
+      // 配置菜单
+      this.editor.customConfig.menus = [
+        "head", // 标题
+        "bold", // 粗体
+        "fontSize", // 字号
+        "fontName", // 字体
+        "italic", // 斜体
+        "underline", // 下划线
+        "strikeThrough", // 删除线
+        "foreColor", // 文字颜色
+        "backColor", // 背景颜色
+        "link", // 插入链接
+        "list", // 列表
+        "justify", // 对齐方式
+        "quote", // 引用
+        "emoticon", // 表情
+        "image", // 插入图片
+        "table", // 表格
+        "video", // 插入视频
+        "code", // 插入代码
+        "undo", // 撤销
+        "redo", // 重复
+        "fullscreen" // 全屏
+      ];
+
+      this.editor.customConfig.uploadImgHooks = {
+        fail: (xhr, editor, result) => {
+          // 插入图片失败回调
+        },
+        success: (xhr, editor, result) => {
+          // 图片上传成功回调
+        },
+        timeout: (xhr, editor) => {
+          // 网络超时的回调
+        },
+        error: (xhr, editor) => {
+          // 图片上传错误的回调
+        },
+        customInsert: (insertImg, result, editor) => {
+          // 图片上传成功,插入图片的回调
+          //result为上传图片成功的时候返回的数据,这里我打印了一下发现后台返回的是data:[{url:"路径的形式"},...]
+          // console.log(result.data[0].url)
+          //insertImg()为插入图片的函数
+          //循环插入图片
+          // for (let i = 0; i < 1; i++) {
+          // console.log(result)
+          let url = result.data.url;
+          console.log(result)
+          insertImg(url);
+          // }
+        }
+      };
+      this.editor.customConfig.onchange = html => {
+        this.info_ = html; // 绑定当前逐渐地值
+        this.$emit("change", this.info_); // 将内容同步到父组件中
+      };
+      // 创建富文本编辑器
+      this.editor.create();
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.editor {
+  width: 100%;
+  margin: 0 auto;
+  position: relative;
+  z-index: 0;
+  /deep/ .toolbar {
+    border: 1px solid #ccc;
+  }
+  /deep/ .text {
+    border: 1px solid #ccc;
+    min-height: 500px;
+  }
+}
+</style>

BIN
src/images/bg.png


BIN
src/images/logo.png


+ 23 - 0
src/main.js

@@ -0,0 +1,23 @@
+import Vue from 'vue'
+import App from './App.vue'
+import router from './router'
+import store from './store'
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+import 'font-awesome/css/font-awesome.css'
+import api from './api';
+
+import BaiduMap from 'vue-baidu-map'
+Vue.use(BaiduMap, {
+  ak: '1hqg34NFaCw9jcv0xG82cI7uINFaXGGM'
+})
+
+Vue.use(ElementUI);
+Vue.prototype.$api = api;
+Vue.config.productionTip = false
+
+new Vue({
+  router,
+  store,
+  render: h => h(App)
+}).$mount('#app')

+ 91 - 0
src/router.js

@@ -0,0 +1,91 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+
+Vue.use(Router)
+
+export default new Router({
+  routes: [{
+      path: '/login',
+      name: 'login',
+      component: () => import('./views/Login.vue'),
+      show: 0
+    },
+    {
+      path: '/',
+      name: '概览',
+      icon: 'el-icon-s-data',
+      component: () => import('./views/Home.vue'),
+      show: 1,
+      isLeaf: 1,
+      children: [{
+        path: '/',
+        component: () => import('./views/Index.vue'),
+        name: '系统首页'
+      }, ]
+    },
+    {
+      path: '/government',
+      name: '政府管理',
+      change:1,
+      icon: 'el-icon-office-building',
+      component: () => import('./views/Home.vue'),
+      show: 1,
+      isLeaf: 1,
+      children: [{
+        path: '/government',
+        component: () => import('./views/government/Index.vue'),
+        name: '政府管理'
+      }, ]
+    },
+    {
+      path: '/',
+      name: '企业管理',
+      change:1,
+      icon: 'el-icon-s-home',
+      component: () => import('./views/Home.vue'),
+      show: 1,
+      isLeaf: 0,
+      children: [{
+        path: '/company',
+        component: () => import('./views/company/Company.vue'),
+        name: '公司管理'
+      },{
+        path: '/company/add',
+        hide:1,
+        component: () => import('./views/company/Add.vue'),
+        name: '新增企业'
+      },{
+        path: '/department',
+        component: () => import('./views/company/Department.vue'),
+        name: '部门管理'
+      },{
+        path: '/staff',
+        component: () => import('./views/company/Staff.vue'),
+        name: '员工管理'
+      },{
+        path: '/merterial',
+        component: () => import('./views/company/Merterial.vue'),
+        name: '资料管理'
+      },]
+    },
+    {
+      path: '/',
+      name: '任务管理',
+      change:1,
+      icon: 'el-icon-s-flag',
+      component: () => import('./views/Home.vue'),
+      show: 1,
+      isLeaf: 0,
+      children: [{
+        path: '/danger',
+        component: () => import('./views/task/Danger.vue'),
+        name: '风险点管理'
+      },{
+        path: '/dangertask',
+        component: () => import('./views/task/DangerTask.vue'),
+        name: '风险点任务'
+      }]
+    },
+    
+  ]
+})

+ 16 - 0
src/store.js

@@ -0,0 +1,16 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+
+Vue.use(Vuex)
+
+export default new Vuex.Store({
+  state: {
+
+  },
+  mutations: {
+
+  },
+  actions: {
+
+  }
+})

+ 34 - 0
src/style/_base.scss

@@ -0,0 +1,34 @@
+*{
+    margin: 0;
+    padding: 0;
+    box-sizing: border-box;
+}
+::-webkit-scrollbar
+{
+   width: 8px;
+   height: 13px;
+   background-color: #F5F5F5;
+}
+
+::-webkit-scrollbar-track
+{
+//    box-shadow: inset 0 0 6px red;
+   border-radius: 10px;
+   background-color: #F5F5F5;
+}
+
+::-webkit-scrollbar-thumb
+{
+   border-radius: 10px;
+   // box-shadow: inset 0 0 6px rgba(0,0,0,.3);
+   background-color: #999;
+}
+.input_100{
+   width: 100px;
+}
+.input_150{
+   width: 150px;
+}
+.input_200{
+   width: 200px;
+}

+ 6 - 0
src/style/_style.scss

@@ -0,0 +1,6 @@
+$color:#1b1e23;
+$mainColor:#FF6A00;
+$color_1:#151932;
+$color_2:#FF694B;
+// $color_1:#4671D5;
+

+ 233 - 0
src/style/home.scss

@@ -0,0 +1,233 @@
+@import 'style';
+@import 'base';
+$height: 50px;
+.header {
+	background: -webkit-linear-gradient(top, $color, $color_1);
+	color: #fff;
+	height: 60px !important;
+	padding: 0 20px 0 0;
+	.logo{
+		height: 60px;
+		margin-top: 5px;
+	}
+	h1{
+		font-size: 18px;
+		// line-height: 60px;
+		display: inline-block;
+		font-weight: 400;
+		img{
+			display: inline-block;
+			vertical-align: middle;
+		}
+		span{
+			font-size: 14px;
+			margin-left: 10px;
+		}
+	}
+	.settings{
+		float: right;
+		line-height: 60px;
+		img{
+			position: relative;
+			top: 3px;
+		}
+		span{
+			color: #fff;
+			font-size: 15px;
+			padding: 0 10px;
+			cursor: pointer;
+		}
+		.logout:hover{
+			color: #999;
+		}
+	}
+}
+.main {
+	position: relative;
+	height: calc(100vh - 60px);
+	background: #ECF0F5;
+	// padding-top: 10px;
+}
+.left-aside {
+	height: 100%;
+	overflow-y: auto;
+	overflow-x: hidden;
+	background: #151932;
+	.left-menue {
+		border: none;
+		& > .is-active {
+			background-color: $color_2 !important;
+			position: relative;
+			border-left: 10px solid #ECF0F5;
+			transition: all .3s linear;
+			.iconfont{
+				color: $mainColor;
+			}	
+			&>.el-submenu__title{
+				color: #fff !important;
+			}
+			.is-active {
+				background-color: $color_2 !important;
+				border-left: 10px solid #ECF0F5;
+				transition: all .3s linear;
+				position: relative;
+				.iconfont{
+					color: $mainColor;
+				}		
+			}	
+		}
+		.is-opened{
+			background-color: #fff !important;
+			border-left: none !important;
+			&>.el-submenu__title{
+				color: #fff !important;
+				
+			}
+		}
+		.el-menu-item-group__title{
+			padding: 0;
+		}
+		.child{
+			padding-left: 60px !important;
+		}
+		.el-menu-item, .el-submenu__title{
+			height: 48px;
+			line-height: 48px;
+			font-size: 15px;
+		}
+		// .el-menu-item{
+		// 	height: 44px;
+		// 	line-height: 44px;
+		// }
+	}
+}
+.el-main {
+	// border: 1px solid red;
+	padding:10px 20px;
+	position: relative;
+	.content{
+		background: #fff;
+		padding: 32px;
+		margin-top: 12px;
+		min-height: calc(100vh - 130px);
+		box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
+	}
+	.title_top{
+		
+		.add_btn{
+			width:90px;
+			height:32px;
+			background:$mainColor;
+			border:1px solid rgba(237,237,237,1);
+			border-radius:4px;
+			float: right;
+			text-align: center;
+			line-height: 32px;
+			color: #FFF;
+		}
+	}
+
+    .table_div{
+        background: #fff;
+        border: 1px solid #EDEDED;
+        min-height: calc(100vh - 430px);
+    }
+    .edit_btn{
+        color: #25486A;
+	}
+	.info_btn{
+		background: #ECF0F5;
+		color: #1F2328;
+		border-color: #ECF0F5;
+	}
+	// 分页
+	.el-pagination {
+		// position: absolute;
+		// left: 0;
+		// bottom: 15px;
+		text-align: right;
+		width: 100%;
+		margin-top: 20px;
+	}
+}
+.el-dialog{
+	.el-select{display: block;}
+}
+.main_btn{
+	background: $mainColor;
+	border-color: $mainColor;
+	width: 120px;
+	font-size: 14px;
+}
+.cancel_btn{
+	width: 170px;
+	font-size: 14px;
+	color: #6A737B;
+}
+// 列表页面
+.filter{
+	background: #fff;
+	padding: 20px 20px 10px; 
+	border:1px solid #EDEDED;
+	border-radius:2px;
+	margin-bottom: 10px;
+	margin-top: 10px;
+	.el-form-item{
+		margin-bottom: 10px;
+	}
+	.el-input,.el-select{
+		width: 150px;
+	}
+
+}
+.table{
+	thead{
+	   th{
+		   background: #eee;
+	   }
+	}
+	button{
+		padding:6px;
+	}
+}
+.el-table__fixed-right::before, .el-table__fixed::before{
+	background: none;
+}
+//上传按钮
+.up_btn{
+	position: relative;
+	input{
+		position: absolute;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+	}
+}
+.upload_div{
+	width: 150px;
+	height: 100px;
+	border: 1px dashed #d9d9d9;
+	position: relative;
+	line-height: 120px;
+	text-align: center;
+	input{
+		position: absolute;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+	}
+	img{
+		position: absolute;
+		left: 0;
+		top: 0;
+	}
+	i{
+		font-size: 48px;
+		color: #999;
+	}
+}
+@media (max-width: 750px) {}

+ 35 - 0
src/style/login.scss

@@ -0,0 +1,35 @@
+@import 'style';
+.login{
+    background: $color;
+    width: 100%;
+    height: 100vh;
+    position: relative;
+    .login-div{
+      width: 350px;
+      height: 420px;
+      background: #fff;
+      position: absolute;
+      top: 0;
+      bottom: 0;
+      left: 0;
+      right: 0;
+      margin: auto;
+      border-radius: 5px;
+      box-shadow: rgba(0, 0, 0, 0.35) 20px 20px 20px;
+      padding: 30px;
+      img{
+        display: block;
+        margin: 0 auto 10px;
+      }
+      h1{
+        color: $color;
+        font-size: 24px;
+        text-align: center;
+        margin-bottom: 20px;
+      }
+      .login-btn{
+        width: 100%;
+        background: #FF694B;
+      }
+    }
+}

+ 125 - 0
src/views/Home.vue

@@ -0,0 +1,125 @@
+<style lang="scss">
+@import '../style/home.scss';
+.head{
+	width:30px;
+	height:30px;
+	border-radius:50%;
+	float:left;
+	margin:10px;
+}
+</style>
+
+<template>
+	<el-container>
+		<el-header class="header">
+			<h1><img height="60px" src="../images/logo.png" alt=""> <span>
+				<!-- <el-divider direction="vertical"></el-divider>  -->
+				{{now}}</span></h1>
+			<!-- <img class="logo" src="../images/logo.png" alt=""> -->
+			<div class="settings">
+				<span>
+					<i class="el-icon-s-custom"></i>
+					admin
+				</span>
+        <span class="logout" @click="logout"><i class="el-icon-switch-button"></i> 退出登录</span>
+			</div>
+		</el-header>
+		<el-container class="main">
+			<!-- 左侧菜单 -->
+			<el-aside class="left-aside" width="210px">
+				<el-menu background-color='#151932'	text-color='#ffffff' :unique-opened='true'  :default-active="$route.path" router class="left-menue" active-text-color="#ffffff">
+					<template v-for="(item, index) in $router.options.routes">
+							<el-menu-item v-if='item.show&&item.isLeaf' :index="item.path"  :key='index'>
+								<i :class="item.icon"></i>
+								<span slot="title">{{item.name}}</span>
+							</el-menu-item>
+							<el-submenu v-if='item.show&&!item.isLeaf' :index="'index_'+index"  :key='index'>
+								<template slot="title">
+								<i :class="item.icon"></i>
+								<span>{{item.name}}</span>
+								</template>
+								<el-menu-item-group>
+									<el-menu-item class="child" v-for="(child,idx) in item.children" :key="index+'_'+idx" :index="child.path" v-show='!child.hide'>
+									{{child.name}}
+									</el-menu-item>
+								</el-menu-item-group>
+							</el-submenu>
+					</template>
+				</el-menu>
+			</el-aside>
+			<!-- 右侧内容 -->
+			<el-container>
+				<el-main>			
+					<transition name="fade" mode="out-in"><router-view :info='info' :community='community'></router-view></transition>
+				</el-main>
+				<!-- <el-footer>Footer</el-footer> -->
+			</el-container>
+		</el-container>
+	</el-container>
+</template>
+
+<script>
+export default {
+	name: 'home',
+	data() {
+		return {
+			menuList:[],
+			path:'',
+			info:{},
+			community_list:[],
+			community:{},
+			menu:[],
+			now:(new Date()).toLocaleDateString()+" "+(new Date()).toLocaleTimeString()
+		};
+	},
+	methods: {
+		getDate(){
+			this.now=(new Date()).toLocaleDateString()+" "+(new Date()).toLocaleTimeString()
+		},
+		logout(){
+			this.$api.logout().then(res=>{
+				this.$router.push({path:'/login'})
+			})
+		},
+		permission(name){
+			let permissions=this.info.permissions||''
+			if(permissions.indexOf(name)<0){
+				return false;
+			}else{
+				return true;
+			}	
+		},
+		getData(){
+			this.$api.getInfo().then(res=>{
+				this.info=res.data.data
+			})
+			this.$api.getSubList().then(res=>{
+			  let data=res.data.data
+			  let routes=this.$route
+			  let path=[]
+			  for(let i=0;i<data.length;i++){
+				  path.push({
+					  	path: '/',
+						name: data[i].name,
+						icon:'el-icon-s-custom',
+						children:[
+							{ path: '/new/'+data[i].id,  name: '新办'},
+							{ path: '/update/'+data[i].id,  name: '复审'},
+							{ path: '/change/'+data[i].id,  name: '换证'},
+						]
+				  })
+			  }
+			  this.menu=path
+          	})
+		}
+	},
+	created(){
+		// console.log(this.$route)
+		// this.getData()
+		var that=this;
+		setInterval(function(){
+			that.getDate();
+		},1000)
+	}
+};
+</script>

+ 63 - 0
src/views/Index.vue

@@ -0,0 +1,63 @@
+<style lang="scss">
+  .index{
+      .title{
+        color: #222;
+        font-size: 20px;
+        margin-bottom: 30px;
+      }
+      .datas{
+        margin-bottom: 60px;
+        li{
+          list-style: none;
+          display: inline-block;
+          width: 20%;
+          margin-left: 20px;
+          margin-bottom: 20px;
+          padding: 32px;
+          border-radius:6px;
+          border:1px solid rgba(238,238,238,1);
+          text-align: center;
+          color:#222;
+          font-size: 16px;
+          img{
+            display: block;
+            margin: 10px auto;
+          }
+          p{
+            font-size: 32px;
+          }
+        }
+      }
+  }
+</style>
+<template>
+  <section class="index">
+    <p>概览</p>
+    <div class="content">
+        <h1 class="title">数据总揽</h1>
+        <ul class="datas">
+          <li>
+            用户总数
+            <!-- <img width="40" src="../images/curstom.png" alt=""> -->
+            <p>123</p>
+          </li>
+          <li>
+            用户总数
+            <!-- <img width="40" src="../images/curstom.png" alt=""> -->
+            <p>123</p>
+          </li>
+          <li>
+            用户总数
+            <!-- <img width="40" src="../images/curstom.png" alt=""> -->
+            <p>123</p>
+          </li>
+          <li>
+            用户总数
+            <!-- <img width="40" src="../images/curstom.png" alt=""> -->
+            <p>123</p>
+          </li>
+        </ul>
+        <h1 class="title">最新告警</h1>
+    </div>
+  </section>
+</template>

+ 154 - 0
src/views/Login.vue

@@ -0,0 +1,154 @@
+<style lang="scss">
+  @import '../style/_base.scss';
+  .login{
+    height: 100vh;
+    min-height: 450px;
+    background: url(../images/bg.png) no-repeat;
+    background-size: 100%;
+    background-position: center top; 
+    // background: #1F315D;
+    position: relative;
+    .login-div{
+      width:520px;
+      height:448px;
+      background:#FFFFFF;
+      box-shadow:0px 12px 24px 0px rgba(0,0,0,0.24);
+      border-radius:8px;
+      position: absolute;
+      top: 0;
+      bottom: 0;
+      left: 0;
+      right: 0;
+      margin: auto;
+      padding:48px  75px;
+      h1{
+        text-align: center;
+        margin-bottom: 40px;
+        font-size: 28px;
+      }
+      .input_div{
+        position: relative;
+        margin-bottom: 12px;
+        input{
+          padding-left: 80px;
+          outline: none;
+          background:rgba(242,245,247,1);
+          border-radius:8px;
+          border:1px solid rgba(238,238,238,1);
+          display: block;
+          height: 54px;
+          width: 100%;
+          font-size: 16px;
+        }
+        label{
+          color: #222;
+          font-size: 16px;
+          position: absolute;
+          left: 16px;
+          top:16px;
+          z-index: 99;
+        }
+      }
+      .code{
+        input{
+          width: 250px;
+        }
+        img{
+          width: 108px;
+          height: 54px;
+          float: right;
+          background-origin: 1px solid red;
+        }
+      }
+      
+      .login-btn{
+        background: #FF694B;
+        width: 100%;
+        height: 54px;
+        margin-top: 36px;
+        font-size: 18px;
+        color: #FFF;
+        font-weight: 600;
+        border:none;
+        border-radius: 8px;
+      }
+    }
+    .footer{
+      position: fixed;
+      width: 100%;
+      bottom: 10px;
+      left:0;
+      z-index: 9;
+      text-align: center;
+      color:#333;
+      font-size: 12px;
+    }
+  }
+</style>
+
+<template>
+  <div class="login">
+      <div class="login-div">
+        <h1>综合风险防控平台</h1>
+        <form>
+            <div class="input_div">
+              <label>用户名</label>
+              <input type="text" v-model="logindata.username" placeholder="请输入用户名">
+            </div>
+            <div class="input_div">
+              <label>密&nbsp;&nbsp;码</label>
+              <input type="password" v-model="logindata.password" placeholder="请输入密码">
+            </div>
+            <div class="input_div code">
+              <img @click="getCode" :src="code" alt="">
+              <label>图形码</label>
+              <input type="text" v-model="logindata.imgcode" placeholder="请输入验证码">  
+            </div>
+            <el-button @click="login" class="login-btn" type="primary">登  录</el-button>
+        </form>
+      </div>
+      <p class="footer">四川百安兮注册安全工程师事务有限公司提供技术支持</p>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'login',
+  data(){
+    return{
+      code:'',
+      logindata:{
+        username:'root',
+        password:'root',
+        imgcode_id:'',
+        imgcode:''
+      }
+    }
+  },
+  methods:{
+      login(){
+          let parms=this.logindata;   
+            this.$api.login(parms).then((res)=>{
+                let data=res.data
+                  if(res.data.code == 0){
+                      window.location.hash='/';
+                  }else{
+                      this.$message.error("账号或者密码有误");
+                  } 
+            })
+            .catch(err=>{
+              this.$message.error("账号或者密码有误");
+            })
+      },
+      getCode(){
+        this.$api.getCode().then(res=>{
+          this.code=res.data.data.ubase64
+          this.logindata.imgcode_id=res.data.data.captcha_id
+        })
+      }
+    },
+  created(){
+    // this.getCode();
+  }
+}
+</script>

+ 182 - 0
src/views/company/Add.vue

@@ -0,0 +1,182 @@
+<style lang="scss">
+    .add_form{
+        display: flex;
+        justify-content: space-between;
+        .req{
+            position: relative;
+            &::after{
+                content: '*';
+                color: red;
+                position: absolute;
+                right: -15px;
+                top: 8px;
+            }
+        }
+        .div_left{
+            width: 33%;
+            .el-select{
+                width: 100%;
+            }
+        }
+        .div_right{
+            width: 65%;
+            .map{
+                width: 100%;
+                height: 300px;
+            }
+            .btn_div{
+                text-align: right;
+                button{
+                    width: 200px;
+                }
+            }
+        }
+    }
+</style>
+<template>
+    <section>
+        <p>公司管理  >  新增企业</p>
+        <div class="content">
+            <el-form class="add_form" label-width="100px"  size="small" label-position="right">
+                <div class="div_left">
+                    <el-form-item label="企业名称" class="req">
+                        <el-input clearable placeholder="请输入企业名称" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="账号" class="req">
+                        <el-input clearable placeholder="请输入账号" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="密码" class="req">
+                        <el-input clearable placeholder="请输入密码" type="password" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="公司类型">
+                            <el-select v-model="form.area" placeholder="请选择">
+                                <el-option label="区域一" value="shanghai"></el-option>
+                                <el-option label="区域二" value="beijing"></el-option>
+                            </el-select>
+                    </el-form-item>
+                    <el-form-item label="上级公司">
+                            <el-select v-model="form.area" placeholder="请选择">
+                                <el-option label="区域一" value="shanghai"></el-option>
+                                <el-option label="区域二" value="beijing"></el-option>
+                            </el-select>
+                    </el-form-item>
+                    <el-form-item label="上级政府" class="req">
+                            <el-select v-model="form.area" placeholder="请选择">
+                                <el-option label="区域一" value="shanghai"></el-option>
+                                <el-option label="区域二" value="beijing"></el-option>
+                            </el-select>
+                    </el-form-item>
+                    <el-form-item label="企业法人" class="req">
+                        <el-input clearable placeholder="请输入企业法人" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="法人手机号" class="req">
+                        <el-input clearable placeholder="请输入法人手机号" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="企业负责人">
+                        <el-input clearable placeholder="请输入企业负责人" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="负责人手机号">
+                        <el-input clearable placeholder="请输入负责人手机号" v-model="form.name"></el-input>
+                    </el-form-item>
+                    <el-form-item label="经营范围">
+                        <el-input type="textarea" v-model="form.name"></el-input>
+                    </el-form-item>
+                    
+                </div>
+                <div class="div_right">
+                    <el-form-item label="封面图">
+                        <div class="upload_div">
+                            <i class="el-icon-upload"></i>
+                            <img v-if="form.oldcard_img" width="100%" height="100%" :src="form.oldcard_img" alt="">
+                            <input @change="upload('oldcard_img')" id='oldcard_img' type="file">
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="四色分布图">
+                        <div class="upload_div">
+                            <i class="el-icon-upload"></i>
+                            <img v-if="form.oldcard_img" width="100%" height="100%" :src="form.oldcard_img" alt="">
+                            <input @change="upload('oldcard_img')" id='oldcard_img' type="file">
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="企业地址">
+                            <div>
+                                <el-input style="width:100%" v-model="keyword" placeholder="请输入关键词搜索"></el-input>
+                                <p>当前位置:</p>
+                            </div>
+                            <baidu-map @click="getClickInfo"   @ready="onBaiduMapReady" class="map bm-view" :center="point.lng||point.lat?point:'成都'" :zoom="15" :scroll-wheel-zoom="true">
+                                <bm-view style="width: 100%; height:300px;"></bm-view>
+                                <bm-marker  :position="point" :dragging="true" animation="BMAP_ANIMATION_BOUNCE">
+                                </bm-marker>
+                                <bm-local-search style="max-height:200px;overflow:auto;border:1px solid #d9d9d9;" :keyword="keyword" :auto-viewport="true"></bm-local-search>
+                            </baidu-map>
+                    </el-form-item>
+                    <el-form-item class="btn_div">  
+                        <el-button  @click="$router.push({path:'/company/add'})"  type="info">重置</el-button>
+                        <el-button type="primary">保存</el-button>
+                    </el-form-item>
+                </div>
+                
+            </el-form>
+        </div>
+    </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+  components:{
+        Page
+  },
+  data(){
+    return{
+      form:{name:''},
+      BMap:null,
+      keyword:'',
+      point:{
+        lng:'',
+        lat:''
+      },
+    }
+  },
+  methods:{
+    onBaiduMapReady(e) {
+        const that = this
+        this.BMap = e.BMap
+    },
+    getClickInfo(e) {
+        // 调整地图中心位置
+        this.point=e.point
+
+        // 此时已经可以获取到BMap类
+        if (this.BMap) {
+            const that = this
+            // Geocoder() 类进行地址解析
+            // 创建地址解析器的实例
+            const geoCoder = new this.BMap.Geocoder()
+            // getLocation() 类--利用坐标获取地址的详细信息
+            // getPoint() 类--获取位置对应的坐标
+            geoCoder.getLocation(e.point, function(res) {
+            const addrComponent = res.addressComponents
+            const surroundingPois = res.surroundingPois
+            const province = addrComponent.province
+            const city = addrComponent.city
+            const district = addrComponent.district
+            let addr = addrComponent.street
+            if (surroundingPois.length > 0 && surroundingPois[0].title) {
+                if (addr) {
+                addr += `-${surroundingPois[0].title}`
+                } else {
+                addr += `${surroundingPois[0].title}`
+                }
+            } else {
+                addr += addrComponent.streetNumber
+            }
+            that.form.address=province+city+district+addr
+            })
+        }
+    },
+  },
+  created(){
+    //   this.getData()
+  }
+}
+</script>

+ 132 - 0
src/views/company/Company.vue

@@ -0,0 +1,132 @@
+<style lang="scss">
+    
+</style>
+<template>
+    <section>
+        <p>公司管理  >  公司列表</p>
+        <div class="filter">
+            <el-form label-width="70px" :inline="true" size="small" label-position="left">
+                <el-form-item label="企业名称">
+                        <el-input clearable placeholder="请输入企业名称" v-model="form.name"></el-input>
+                </el-form-item>
+                <el-form-item label="企业区域">
+                        <el-select v-model="form.area" placeholder="请选择">
+                            <el-option label="区域一" value="shanghai"></el-option>
+                            <el-option label="区域二" value="beijing"></el-option>
+                        </el-select>
+                </el-form-item>
+                <el-form-item label="企业类型">
+                        <el-select v-model="form.area" placeholder="请选择">
+                            <el-option label="区域一" value="shanghai"></el-option>
+                            <el-option label="区域二" value="beijing"></el-option>
+                        </el-select>
+                </el-form-item>
+                <el-form-item>
+                       <el-button @click="form.page=1,getData()" type="primary" icon="el-icon-search">搜索</el-button>
+                       <el-button icon="el-icon-plus" @click="$router.push({path:'/company/add'})"  type="primary">创建公司</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
+
+
+        <el-table
+                class="table"
+                :data="list" height="64vh"
+                border  v-loading="loading"
+                style="width: 100%">
+                <el-table-column
+                type="selection" fixed="left"
+                width="40">
+                </el-table-column>
+                <el-table-column
+                prop="name" 
+                label="公司名称">
+                </el-table-column>
+                <el-table-column
+                prop="subject_item" 
+                label="区域">
+                </el-table-column>
+                <el-table-column
+                prop="signup_limit" 
+                label="上级单位">
+                </el-table-column>
+                <el-table-column
+                prop="signuped_count" 
+                label="企业类型">
+                </el-table-column>
+                <el-table-column
+                prop="remark" width="70px"
+                label="状态">
+                <template>
+                    <el-tag type="success">启用</el-tag>
+                    <!-- <el-tag type="danger">禁用</el-tag> -->
+                </template>
+                </el-table-column>
+                <el-table-column
+                prop="ctime"  width="200"
+                label="时间">
+                </el-table-column>
+                <el-table-column fixed="right"
+                prop="zip"  width="220"
+                label="操作">
+                <template slot-scope="scope">
+                    <el-button icon="el-icon-view" size="mini"  type="success">查看</el-button>
+                    <el-button icon="el-icon-edit" @click="$router.push({path:'/company/add',query:{id:scope.row.id}})" size="mini" type="warning">编辑</el-button>
+                    <el-button icon="el-icon-delete" @click="del(scope.row.id)" size="mini"  type="danger">删除</el-button>
+                </template>
+                </el-table-column>
+        </el-table>
+        <Page  ref="pageButton"  :total='total' @pageChange='gopage'/>
+    </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+  components:{
+        Page
+  },
+  data(){
+    return{
+      form:{name:'',page:1,page_size:20},
+      activeName:"1",
+      total:1,
+      list:[{name:'2333'}],
+      loading:false
+    }
+  },
+  methods:{
+        gopage(size){
+            if(size){
+                this.form.page_size=size
+            }
+            this.form.page=this.$refs.pageButton.page
+            this.getData()
+        },
+        getData(){
+            var parm=this.form;
+            this.loading=true
+            // this.$api.getClass(parm).then(res=>{
+            //     this.list=res.data.data.list
+            //     this.total=res.data.data.total
+            //     this.loading=false
+            // })
+        },
+        del(id){
+                this.$confirm('确定删除吗', '提示', {
+                        type: 'warning'
+                    }).then(() => {
+                    this.$api.deleteClass({id:id}).then((res)=>{
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                    })
+                })
+        },
+  },
+  created(){
+    //   this.getData()
+  }
+}
+</script>

+ 101 - 0
src/views/company/Department.vue

@@ -0,0 +1,101 @@
+<style lang="scss">
+    
+</style>
+<template>
+    <section>
+        <p>公司管理  >  部门列表</p>
+        <div class="filter">
+            <el-form label-width="70px" :inline="true" size="small" label-position="left">
+                <el-form-item label="企业名称">
+                        <el-input clearable placeholder="请输入企业名称" v-model="form.name"></el-input>
+                </el-form-item>
+                <el-form-item>
+                       <el-button @click="form.page=1,getData()" type="primary" icon="el-icon-search">搜索</el-button>
+                       <el-button icon="el-icon-plus" @click="$router.push({path:'/company/add'})"  type="primary">创建部门</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
+        <el-table
+                class="table"
+                :data="list" height="64vh"
+                border  v-loading="loading"
+                style="width: 100%">
+                <el-table-column
+                type="selection" fixed="left"
+                width="40">
+                </el-table-column>
+                <el-table-column
+                prop="name" 
+                label="公司名称">
+                </el-table-column>
+                <el-table-column
+                prop="subject_item" 
+                label="部门">
+                </el-table-column>
+                <el-table-column
+                prop="ctime"  width="200"
+                label="时间">
+                </el-table-column>
+                <el-table-column fixed="right"
+                prop="zip"  width="170"
+                label="操作">
+                <template slot-scope="scope">
+                    <el-button icon="el-icon-edit" @click="$router.push({path:'/company/add',query:{id:scope.row.id}})" size="mini" type="warning">编辑</el-button>
+                    <el-button icon="el-icon-delete" @click="del(scope.row.id)" size="mini"  type="danger">删除</el-button>
+                </template>
+                </el-table-column>
+        </el-table>
+        <Page  ref="pageButton"  :total='total' @pageChange='gopage'/>
+    </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+  components:{
+        Page
+  },
+  data(){
+    return{
+      form:{name:'',page:1,page_size:20},
+      activeName:"1",
+      total:1,
+      list:[{name:'2333'}],
+      loading:false
+    }
+  },
+  methods:{
+        gopage(size){
+            if(size){
+                this.form.page_size=size
+            }
+            this.form.page=this.$refs.pageButton.page
+            this.getData()
+        },
+        getData(){
+            var parm=this.form;
+            this.loading=true
+            // this.$api.getClass(parm).then(res=>{
+            //     this.list=res.data.data.list
+            //     this.total=res.data.data.total
+            //     this.loading=false
+            // })
+        },
+        del(id){
+                this.$confirm('确定删除吗', '提示', {
+                        type: 'warning'
+                    }).then(() => {
+                    this.$api.deleteClass({id:id}).then((res)=>{
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                    })
+                })
+        },
+  },
+  created(){
+    //   this.getData()
+  }
+}
+</script>

+ 99 - 0
src/views/company/Merterial.vue

@@ -0,0 +1,99 @@
+<style lang="scss">
+    
+</style>
+<template>
+    <section>
+        <p>公司管理  >  资料列表</p>
+        <div class="filter">
+            <el-form label-width="70px" :inline="true" size="small" label-position="left">
+                <el-form-item label="名称">
+                        <el-input clearable placeholder="请输入名称" v-model="form.name"></el-input>
+                </el-form-item>
+                <el-form-item>
+                       <el-button @click="form.page=1,getData()" type="primary" icon="el-icon-search">搜索</el-button>
+                       <el-button icon="el-icon-plus" @click="$router.push({path:'/company/add'})"  type="primary">新增资料</el-button>
+                </el-form-item>
+            </el-form>
+        </div>
+
+
+        <el-table
+                class="table"
+                :data="list" height="64vh"
+                border  v-loading="loading"
+                style="width: 100%">
+                <el-table-column
+                type="selection" fixed="left"
+                width="40">
+                </el-table-column>
+                <el-table-column
+                prop="name" 
+                label="宣传资料名称">
+                </el-table-column>
+                <el-table-column
+                prop="ctime"  width="200"
+                label="时间">
+                </el-table-column>
+                <el-table-column fixed="right"
+                prop="zip"  width="170"
+                label="操作">
+                <template slot-scope="scope">
+                    <el-button icon="el-icon-edit" @click="$router.push({path:'/company/add',query:{id:scope.row.id}})" size="mini" type="warning">编辑</el-button>
+                    <el-button icon="el-icon-delete" @click="del(scope.row.id)" size="mini"  type="danger">删除</el-button>
+                </template>
+                </el-table-column>
+        </el-table>
+        <Page  ref="pageButton"  :total='total' @pageChange='gopage'/>
+    </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+  components:{
+        Page
+  },
+  data(){
+    return{
+      form:{name:'',page:1,page_size:20},
+      activeName:"1",
+      total:1,
+      list:[{name:'2333'}],
+      loading:false
+    }
+  },
+  methods:{
+        gopage(size){
+            if(size){
+                this.form.page_size=size
+            }
+            this.form.page=this.$refs.pageButton.page
+            this.getData()
+        },
+        getData(){
+            var parm=this.form;
+            this.loading=true
+            // this.$api.getClass(parm).then(res=>{
+            //     this.list=res.data.data.list
+            //     this.total=res.data.data.total
+            //     this.loading=false
+            // })
+        },
+        del(id){
+                this.$confirm('确定删除吗', '提示', {
+                        type: 'warning'
+                    }).then(() => {
+                    this.$api.deleteClass({id:id}).then((res)=>{
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                    })
+                })
+        },
+  },
+  created(){
+    //   this.getData()
+  }
+}
+</script>

+ 169 - 0
src/views/company/Staff.vue

@@ -0,0 +1,169 @@
+<style lang="scss">
+    .staff{
+        display: flex;
+        justify-content: space-between;
+        &>li{
+            width: 30%;
+            list-style: none;
+            min-height: 70vh;
+            background: #fff;
+            border: 1px solid #d9d9d9;
+            padding:20px 10px;
+        }
+        .custom-tree-node{
+                    width: 100%;
+                    .el-tree-node__content{
+                        height: 32px;
+                    }
+                    .label_name{
+                        font-size: 14px;
+                    }
+                    .edit{
+                        float: right;
+                        i{
+                            font-weight: bolder;
+                            font-size: 14px;
+                        }
+                    }
+        }
+        .staff_list{
+            width: 68%;
+        }
+    }
+</style>
+<template>
+  <section>
+    <p>公司管理 > 员工管理</p>
+    <div class="content">
+        <ul class="staff">
+            <li>
+                <el-form  size="small">
+                    <el-form-item>
+                        <el-input suffix-icon="el-icon-search" v-model="input1" placeholder="公司名称"></el-input>
+                    </el-form-item>
+                </el-form>
+                <el-tree  
+                    :data="data"
+                    node-key="id" 
+                    :expand-on-click-node="false">
+                    <span class="custom-tree-node" slot-scope="{ node, data }" @click.stop="() => edit(data)" >
+                        <span class="label_name">{{ node.label }}</span>
+                    </span>
+                </el-tree>
+            </li>
+            <li class="staff_list">
+                    <el-form label-width="70px" :inline="true" size="small" label-position="left">
+                        <el-form-item label="企业名称">
+                                <el-input clearable placeholder="请输入企业名称" v-model="form.name"></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button @click="form.page=1,getData()" type="primary" icon="el-icon-search">搜索</el-button>
+                            <el-button icon="el-icon-plus" @click="$router.push({path:'/company/add'})"  type="primary">新增员工</el-button>
+                        </el-form-item>
+                    </el-form>
+                <el-table
+                        class="table"
+                        :data="list" height="54vh"
+                        border  v-loading="loading"
+                        style="width: 100%">
+                        <el-table-column
+                        type="selection" fixed="left"
+                        width="40">
+                        </el-table-column>
+                        <el-table-column
+                        prop="name" 
+                        label="员工名称">
+                        </el-table-column>
+                        <el-table-column
+                        prop="subject_item" 
+                        label="联系电话">
+                        </el-table-column>
+                        <el-table-column
+                        prop="subject_item" 
+                        label="公司名称">
+                        </el-table-column>
+                        <el-table-column
+                        prop="subject_item" 
+                        label="部门">
+                        </el-table-column>
+                        <el-table-column
+                        prop="ctime"  width="200"
+                        label="时间">
+                        </el-table-column>
+                        <el-table-column fixed="right"
+                        prop="zip"  width="170"
+                        label="操作">
+                        <template slot-scope="scope">
+                            <el-button icon="el-icon-edit" @click="$router.push({path:'/company/add',query:{id:scope.row.id}})" size="mini" type="warning">编辑</el-button>
+                            <el-button icon="el-icon-delete" @click="del(scope.row.id)" size="mini"  type="danger">删除</el-button>
+                        </template>
+                        </el-table-column>
+                </el-table>
+                <Page  ref="pageButton"  :total='total' @pageChange='gopage'/>
+            </li>
+        </ul>
+    </div>
+  </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+    components:{
+        Page
+    },
+	data() {
+		return {
+            input1:'',
+            data:[{
+                id: 3,
+                label: '一级 3',
+                children: [{
+                    id: 7,
+                    label: '二级 3-1'
+                }, {
+                    id: 8,
+                    label: '二级 3-2'
+                }]
+            }],
+            form:{name:'',page:1,page_size:20},
+            list:[{name:'2333'}],
+            total:1,
+            loading:false
+		};
+	},
+	methods: {
+        gopage(size){
+            if(size){
+                this.form.page_size=size
+            }
+            this.form.page=this.$refs.pageButton.page
+            this.getData()
+        },
+        getData(){
+            var parm=this.form;
+            this.loading=true
+            // this.$api.getClass(parm).then(res=>{
+            //     this.list=res.data.data.list
+            //     this.total=res.data.data.total
+            //     this.loading=false
+            // })
+        },
+        del(id){
+                this.$confirm('确定删除吗', '提示', {
+                        type: 'warning'
+                    }).then(() => {
+                    this.$api.deleteClass({id:id}).then((res)=>{
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                    })
+                })
+        },
+    },
+	created(){
+	
+	}
+};
+</script>

+ 180 - 0
src/views/government/Index.vue

@@ -0,0 +1,180 @@
+<style lang="scss">
+    .govern{
+        display: flex;
+        justify-content: space-between;
+        li{
+            width: 32%;
+            list-style: none;
+            min-height: 70vh;
+            background: #fff;
+            border: 1px solid #d9d9d9;
+            padding:20px 10px;
+        }
+        .custom-tree-node{
+                    width: 100%;
+                    .el-tree-node__content{
+                        height: 32px;
+                    }
+                    .label_name{
+                        font-size: 14px;
+                    }
+                    .edit{
+                        float: right;
+                        i{
+                            font-weight: bolder;
+                            font-size: 14px;
+                        }
+                    }
+        }
+        .form{
+            .el-input,.el-textarea{
+                width: 90%;
+            }
+            .el-select{
+                width: 100%;
+            }
+            .req{
+                color:red;
+                font-weight: 600;
+                margin-left: 5px;
+            }
+        }
+        .company{
+            h1{
+                font-size: 18px;
+                margin-bottom: 20px;
+                button{
+                    float: right;
+                }
+            }
+            p{
+                color: #409EFF;
+                padding: 10px 0;
+                border-bottom: 1px solid #d9d9d9;
+                font-size: 14px;
+                width: 90%;
+                margin: 0 auto;
+            }
+        }
+    }
+</style>
+<template>
+  <section>
+    <p>政府管理</p>
+    <div class="content">
+        <ul class="govern">
+            <li>
+                <el-form :inline="true" size="small" label-width="40px">
+                    <el-form-item label="区域">
+                        <el-select class="input_100" v-model="input1" placeholder="请选择">
+                            <el-option label="区域一" value="shanghai"></el-option>
+                            <el-option label="区域二" value="beijing"></el-option>
+                        </el-select>
+                        <el-input style="width:62%;margin-left:5px;" v-model="input1" placeholder="政府名称"></el-input>
+                    </el-form-item>
+                </el-form>
+                <el-button type="primary" icon="el-icon-circle-plus" size="mini" style="width:100%;margin-bottom:10px;">新增政府单位</el-button>
+                <el-tree  
+                    :data="data"
+                    node-key="id" 
+                    :expand-on-click-node="false">
+                    <span class="custom-tree-node" slot-scope="{ node, data }" @click.stop="() => edit(data)" >
+                        <span class="label_name">{{ node.label }}</span>
+                        <span class="edit">
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click.stop="() => append(data)">
+                            <i class="el-icon-plus"></i>
+                        </el-button>
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click="() => edit(data)">
+                            <i class="el-icon-edit"></i>
+                        </el-button>
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click="() => remove(data)">
+                            <i class="el-icon-delete"></i>
+                        </el-button>
+                        </span>
+                    </span>
+                </el-tree>
+            </li>
+            <li>
+                <el-form class="form" label-width="80px" label-position='right' size="small">
+                    <el-form-item label="政府名称">
+                        <el-input v-model="form.name"></el-input>
+                        <span class="req">*</span>
+                    </el-form-item>
+                    <el-form-item label="账号" >
+                        <el-input v-model="form.name"></el-input>
+                        <span class="req">*</span>
+                    </el-form-item>
+                    <el-form-item label="区域" >
+                        <el-select v-model="input1" placeholder="请选择">
+                            <el-option label="区域一" value="shanghai"></el-option>
+                            <el-option label="区域二" value="beijing"></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="密码" >
+                        <el-input v-model="form.name"></el-input>
+                        <span class="req">*</span>
+                    </el-form-item>
+                    <el-form-item label="确认密码" >
+                        <el-input v-model="form.name"></el-input>
+                        <span class="req">*</span>
+                    </el-form-item>
+                    <el-form-item label="账号状态">
+                        <el-switch
+                        v-model="form.status"
+                        active-text="启用"
+                        inactive-text="禁用">
+                        </el-switch>
+                    </el-form-item>
+                    <el-form-item label="备注">
+                        <el-input :rows="4" type="textarea" v-model="form.intro"></el-input>
+                    </el-form-item>
+                    <el-form-item>
+                        <el-button  type="primary">保存</el-button>
+                        <el-button  type="info">取消</el-button>
+                    </el-form-item>
+                </el-form>
+            </li>
+            <li class="company">
+                <h1>巴中市应急管理局下属企业  <el-button size='mini' type="primary">添加</el-button></h1>
+                <p>巴中市恩阳中学</p>
+                <p>巴中市恩阳中学</p>
+                <p>巴中市恩阳中学</p>
+            </li>
+        </ul>
+    </div>
+  </section>
+</template>
+<script>
+export default {
+	data() {
+		return {
+            input1:'',
+            data:[{
+                id: 3,
+                label: '一级 3',
+                children: [{
+                    id: 7,
+                    label: '二级 3-1'
+                }, {
+                    id: 8,
+                    label: '二级 3-2'
+                }]
+            }],
+            form:{}
+		};
+	},
+	methods: {},
+	created(){
+	
+	}
+};
+</script>

+ 155 - 0
src/views/task/Danger.vue

@@ -0,0 +1,155 @@
+<style lang="scss">
+    .danger{
+        display: flex;
+        // justify-content: space-between;
+        li{
+            width: 45%;
+            list-style: none;
+            min-height: 70vh;
+            background: #fff;
+            border: 1px solid #d9d9d9;
+            padding:20px 10px;
+            margin-right: 20px;
+        }
+        .custom-tree-node{
+                    width: 100%;
+                    .el-tree-node__content{
+                        height: 32px;
+                    }
+                    .label_name{
+                        font-size: 14px;
+                    }
+                    .edit{
+                        float: right;
+                        i{
+                            font-weight: bolder;
+                            font-size: 14px;
+                        }
+                    }
+        }
+        .form{
+            .el-input,.el-textarea{
+                width: 90%;
+            }
+            .el-select{
+                width: 100%;
+            }
+            .req{
+                color:red;
+                font-weight: 600;
+                margin-left: 5px;
+            }
+        }
+        .company{
+            h1{
+                font-size: 18px;
+                margin-bottom: 20px;
+                button{
+                    float: right;
+                }
+            }
+            p{
+                color: #409EFF;
+                padding: 10px 0;
+                border-bottom: 1px solid #d9d9d9;
+                font-size: 14px;
+                width: 90%;
+                margin: 0 auto;
+            }
+        }
+    }
+</style>
+<template>
+  <section>
+    <p>任务管理 > 风险点管理</p>
+    <div class="content">
+        <ul class="danger">
+            <li>
+                <el-form size="small" >
+                    <el-form-item>
+                        <el-input suffix-icon="el-icon-search" v-model="input1" placeholder="公司名称"></el-input>
+                    </el-form-item>
+                </el-form>
+                <el-tree  
+                    :data="data"
+                    node-key="id" :default-expanded-keys="[7, 3]"
+                    :expand-on-click-node="false">
+                    <span class="custom-tree-node" slot-scope="{ node, data }" @click.stop="() => edit(data)" >
+                        <span class="label_name"><i class="el-icon-film"></i> {{ node.label }}</span>
+                        <span class="edit">
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click.stop="() => append(data)">
+                            <i class="el-icon-plus"></i>
+                        </el-button>
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click="() => edit(data)">
+                            <i class="el-icon-edit"></i>
+                        </el-button>
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click="() => remove(data)">
+                            <i class="el-icon-delete"></i>
+                        </el-button>
+                        </span>
+                    </span>
+                </el-tree>
+            </li>
+            <li>
+                <el-form class="form" label-width="90px" label-position='right' size="small">
+                    <el-form-item label="公司名称">
+                        <el-input v-model="form.name"></el-input>
+                        <span class="req">*</span>
+                    </el-form-item>
+                    <el-form-item label="风险点名称" >
+                        <el-input v-model="form.name"></el-input>
+                        <span class="req">*</span>
+                    </el-form-item>
+                    <el-form-item label="备注">
+                        <el-input :rows="4" type="textarea" v-model="form.intro"></el-input>
+                    </el-form-item>
+                    <el-form-item>
+                        <el-button  type="primary">保存</el-button>
+                        <el-button  type="info">取消</el-button>
+                    </el-form-item>
+                </el-form>
+            </li>
+        </ul>
+    </div>
+  </section>
+</template>
+<script>
+export default {
+	data() {
+		return {
+            input1:'',
+            data:[{
+                id: 3,
+                label: '一级 3',
+                children: [{
+                    id: 7,
+                    label: '二级 3-1',
+                    children:[
+                        {
+                            id: 9,
+                            label: '三级 3-1',
+                        }
+                    ]
+                }, {
+                    id: 8,
+                    label: '二级 3-2'
+                }]
+            }],
+            form:{}
+		};
+	},
+	methods: {},
+	created(){
+	
+	}
+};
+</script>

+ 196 - 0
src/views/task/DangerTask.vue

@@ -0,0 +1,196 @@
+<style lang="scss">
+    .staff{
+        display: flex;
+        justify-content: space-between;
+        &>li{
+            width: 30%;
+            list-style: none;
+            min-height: 70vh;
+            background: #fff;
+            border: 1px solid #d9d9d9;
+            padding:20px 10px;
+        }
+        .custom-tree-node{
+                    width: 100%;
+                    .el-tree-node__content{
+                        height: 32px;
+                    }
+                    .label_name{
+                        font-size: 14px;
+                    }
+                    .edit{
+                        float: right;
+                        i{
+                            font-weight: bolder;
+                            font-size: 14px;
+                        }
+                    }
+        }
+        .staff_list{
+            width: 68%;
+        }
+    }
+</style>
+<template>
+  <section>
+    <p>公司管理 > 员工管理</p>
+    <div class="content">
+        <ul class="staff">
+            <li>
+                <el-form  size="small">
+                    <el-form-item>
+                        <el-input suffix-icon="el-icon-search" v-model="input1" placeholder="公司名称"></el-input>
+                    </el-form-item>
+                </el-form>
+                <el-tree  
+                    :data="data"
+                    node-key="id" :default-expanded-keys="[7, 3]"
+                    :expand-on-click-node="false">
+                    <span class="custom-tree-node" slot-scope="{ node, data }" @click.stop="() => edit(data)" >
+                        <span class="label_name"><i class="el-icon-film"></i> {{ node.label }}</span>
+                        <span class="edit">
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click.stop="() => append(data)">
+                            <i class="el-icon-plus"></i>
+                        </el-button>
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click="() => edit(data)">
+                            <i class="el-icon-edit"></i>
+                        </el-button>
+                        <el-button
+                            type="text"
+                            size="mini"
+                            @click="() => remove(data)">
+                            <i class="el-icon-delete"></i>
+                        </el-button>
+                        </span>
+                    </span>
+                </el-tree>
+            </li>
+            <li class="staff_list">
+                    <el-form label-width="70px" :inline="true" size="small" label-position="left">
+                        <el-form-item label="公司名称">
+                                <el-input clearable placeholder="请输入企业名称" v-model="form.name"></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button @click="form.page=1,getData()" type="primary" icon="el-icon-search">搜索</el-button>
+                            <el-button  @click="$router.push({path:'/company/add'})"  type="primary">创建任务</el-button>
+                            <el-button  @click="$router.push({path:'/company/add'})"  type="primary">批量导入任务</el-button>
+                        </el-form-item>
+                    </el-form>
+                <el-table
+                        class="table"
+                        :data="list" height="54vh"
+                        border  v-loading="loading"
+                        style="width: 100%">
+                        <el-table-column
+                        prop="name" 
+                        label="风险点">
+                        </el-table-column>
+                        <el-table-column
+                        prop="subject_item" 
+                        label="风险描述">
+                        </el-table-column>
+                        <el-table-column
+                        prop="subject_item" 
+                        label="导致后果">
+                        </el-table-column>
+                        <el-table-column
+                        prop="subject_item" 
+                        label="风险级别">
+                        </el-table-column>
+                        <el-table-column
+                        prop="ctime" 
+                        label="工程技术">
+                        </el-table-column>
+                        <el-table-column
+                        prop="ctime" 
+                        label="管控措施">
+                        </el-table-column>
+                        <el-table-column 
+                        prop="zip" 
+                        label="培训教育">
+                        </el-table-column>
+                        <el-table-column 
+                        prop="zip" 
+                        label="个体防护">
+                        </el-table-column>
+                </el-table>
+                <!-- <Page  ref="pageButton"  :total='total' @pageChange='gopage'/> -->
+            </li>
+        </ul>
+    </div>
+  </section>
+</template>
+<script>
+import Page from '../../components/Page';
+export default {
+    components:{
+        Page
+    },
+	data() {
+		return {
+            input1:'',
+            data:[{
+                id: 3,
+                label: '一级 3',
+                children: [{
+                    id: 7,
+                    label: '二级 3-1',
+                    children:[
+                        {
+                            id: 9,
+                            label: '三级 3-1',
+                        }
+                    ]
+                }, {
+                    id: 8,
+                    label: '二级 3-2'
+                }]
+            }],
+            form:{name:'',page:1,page_size:20},
+            list:[{name:'2333'}],
+            total:1,
+            loading:false
+		};
+	},
+	methods: {
+        gopage(size){
+            if(size){
+                this.form.page_size=size
+            }
+            this.form.page=this.$refs.pageButton.page
+            this.getData()
+        },
+        getData(){
+            var parm=this.form;
+            this.loading=true
+            // this.$api.getClass(parm).then(res=>{
+            //     this.list=res.data.data.list
+            //     this.total=res.data.data.total
+            //     this.loading=false
+            // })
+        },
+        del(id){
+                this.$confirm('确定删除吗', '提示', {
+                        type: 'warning'
+                    }).then(() => {
+                    this.$api.deleteClass({id:id}).then((res)=>{
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.getData()
+                    })
+                })
+        },
+    },
+	created(){
+	
+	}
+};
+</script>