yyfang %!s(int64=3) %!d(string=hai) anos
pai
achega
b845024b04

BIN=BIN
src/assets/img/bg.jpg


BIN=BIN
src/assets/img/jccx.png


BIN=BIN
src/assets/img/jcrw.png


BIN=BIN
src/assets/img/jgcx.png


BIN=BIN
src/assets/img/lct.jpg


BIN=BIN
src/assets/img/xtjs.png


+ 65 - 101
src/components/admin.vue

@@ -5,41 +5,35 @@
 			<!--页面头部(上边)-->
 			<el-header>
 				<div class="admin-logo-container">
-					<!--    <img
-            class="admin-logo"
-            src="../assets/img/admin.jpg"
-            alt=""
-          > -->
-					<span>安徽省农产品质量安全监测系统</span>
-				</div>
-				<div class="right-function-container">
-					<el-button type="text" style="color:#FFFFFF" size="medium" @click="getAccount()">个人中心</el-button>
-					<el-button @click="logout">
-						退 出
-					</el-button>
+					<span>安徽省农产品质量安全监测系统-监管平台</span>
 				</div>
 			</el-header>
+			<!-- 页面个人中心 -->
+				<div class="hello">
+					<span>您好,监管部门!--{{name}}</span>
+					<div class="btn">
+						<el-button  class="btns" @click="userInform()" size="mini">个人信息</el-button>
+						<el-button  class="btns" @click="logout" size="mini">退出</el-button>
+					</div>
+				</div>
 			<!--页面主体部分-->
 			<el-container>
+				
 				<!--页面侧边栏(左边)-->
 				<el-aside style="width: 210px;">
 					<!--        页面左侧菜单区域-->
 					<el-menu :default-active="$route.path" background-color="#EEF1F6" text-color="#48576a"
-						active-text-color="#31B404"  :collapse-transition="false" :router="true">
-						<!-- :unique-opened="true" -->
-						<!--            <el-menu-item
-              index="/admin"
-              @click="addTab('系统首页', '/admin')"
-            >
-              <i class="el-icon-s-home" />
-              <span slot="title">系统首页</span>
-            </el-menu-item> -->
+						active-text-color="#187bdd"  :collapse-transition="false" :router="true">
+						           <!-- <el-menu-item index="/admin"  @click="addTab('首页', '/admin')">
+    									<i class="el-icon-s-home" />
+             					 		<span slot="title">首页</span>
+           							</el-menu-item> -->
 						<!--          一级菜单-->
 						<el-submenu :index="index+''" v-for="(item, index) in menuList" :key="index">
 							<!--          一级菜单模板区-->
 							<template slot="title">
 								<!--              图标-->
-								<i :class="item.icon" />
+								<!-- <i :class="item.icon" /> -->
 								<!--              文本-->
 								<span>{{ item.subMenuName }}</span>
 							</template>
@@ -65,7 +59,7 @@
 							<el-container>
 								<el-main>
 									<el-card shadow="always">
-										<!--            内容显示-->
+										<!--内容显示-->
 										<router-view :key="item.name" />
 									</el-card>
 								</el-main>
@@ -83,6 +77,7 @@
 		name: 'Admin',
 		data() {
 			return {
+				name:'',
 				lastTime: null, // 最后一次点击的时间
 				currentTime: null, // 当前点击的时间
 				timeOut: 30 * 60 * 1000, // 设置超时时间: 30分钟
@@ -94,42 +89,27 @@
 				menuList: []
 			}
 		},
-		// watch: {
-		// 	/** 监听,当路由发生变化的时候执行(防止用户手动更换地址导致tabs的面板变动却不切换相应的tabs) */
-		// 	'$route.path': function() {
-		// 		var iindex = -1
-		// 		var jindex = -1
-		// 		for (let i = 0; i < this.menuList.length; i++) {
-		// 			for (let j = 0; j < this.menuList[i].children.length; j++) {
-		// 				if (this.menuList[i].children[j].path == this.$route.path) {
-		// 					iindex = i
-		// 					jindex = j
-		// 					break
-		// 				}
-		// 			}
-		// 		}
-		// 		this.addTab(this.menuList[iindex].children[jindex].subMenuName, this.$route.path)
-		// 	}
-		// },
+
 		created() {
+			this.getAccount()
 			this.lastTime = new Date().getTime() // 网页第一次打开时,记录当前时间
 			// 保证admin中的页面刷新后重置到/admin路由下
 			if (this.$route.path !== '/admin/routineMonitor') this.$router.push('/admin/routineMonitor')
 			let groupname = window.sessionStorage.getItem('groupname')
 			let data1 = []
 			let data = [
-				// {
-				//     // icon: 'el-icon-user-solid',
-				//     subMenuName: '监测模型',
-				//     children: [{
-				//       id: '1-1',
-				//       subMenuName: '模型配置',
-				//       path: '/admin/'
-				//     }]
-				//   },
 				{
 					// icon: 'el-icon-user-solid',
-					subMenuName: '主体信息管理',
+					subMenuName: '首页',
+					children: [{
+							id: '6-1',
+							subMenuName: '控制台',
+							path: '/admin/Console'
+					}]
+				},
+				{
+					// icon: 'el-icon-user-solid',
+					subMenuName: '机构查询',
 					children: [{
 							id: '4-1',
 							subMenuName: '检测机构',
@@ -141,30 +121,6 @@
 					}]
 				},
 				{	
-
-					// subMenuName: '主体管理',
-					// children: [{
-					// 		id: '6-1',
-					// 		subMenuName: '监管机构',
-					// 		path: '/admin/regulatoryAuthority'
-					// 	}, {
-					// 		id: '6-2',
-					// 		subMenuName: '监测机构',
-					// 		path: '/admin/testingFacility'
-					// 	}
-						// ,{
-						//      id: '5-3',
-						//      subMenuName: '监测抽查',
-						//      path: '/admin/checkMonitor'
-						//    },{
-						//      id: '5-4',
-						//      subMenuName: '复检任务',
-						//      path: '/admin/'
-				// 		//    },
-				// 	]
-				// },
-				// {
-					// icon: 'el-icon-user-solid',
 					subMenuName: '监测任务',
 					children: [{
 							id: '5-1',
@@ -185,30 +141,20 @@
 						     subMenuName: '退回任务',
 						     path: '/admin/retask'
 						}
-
-						// ,{
-						//      id: '5-3',
-						//      subMenuName: '监测抽查',
-						//      path: '/admin/checkMonitor'
-						//    },{
-
-						//      id: '5-4',
-						//      subMenuName: '复检任务',
-						//      path: '/admin/'
-						//    },
 						]
 				},
-				//   },
 				
 			]
 			this.menuList = data
 		},
 		methods: {
-			// async getAccount() {
-			// 	const result = await this.$http.post('getAccount', {
-			// 		})},
-				getAccount() {
-				this.$router.push('getAccount')
+			async getAccount() {
+				const result = await this.$http.post('getAccount')
+				this.name = result.data.data.name
+				console.log(this.name)
+			},
+			async userInform() {
+				this.$router.push('userAccount')
 			},		
 			handleOpen(index) {
 				console.log(index)
@@ -259,10 +205,10 @@
 				// 清除seesion信息
 				window.sessionStorage.clear()
 				this.$router.push('/login')
-				// }
+				//}
 
 			},
-
+			
 			async checkTimeOut() {
 				this.currentTime = new Date().getTime() // 记录这次点击的时间
 				// 如果当前页面不是登录,初始化界面就可以执行是否退出
@@ -332,12 +278,12 @@
 
 
 	// .admin-logo-container {
-		// border-color: #5EB9DE;
-		// border-right-width: 1px;
-		// border-right-style: solid;
-	// 	// border-color: #5EB9DE;
-	// 	// border-right-width: 1px;
-	// 	// border-right-style: solid;
+	// 	border-color: #5EB9DE;
+	// 	border-right-width: 1px;
+	// 	border-right-style: solid;
+	// 	border-color: #5EB9DE;
+	// 	border-right-width: 1px;
+	// 	border-right-style: solid;
 	// }
 
 	.admin-logo {
@@ -349,7 +295,7 @@
 	}
 
 	.el-header {
-		background-color: #31B404;
+		background-color: #145faa;
 		width: 100%;
 		color: white;
 		font-size: 25px;
@@ -362,7 +308,7 @@
 		align-items: center;
 
 		span {
-			margin-left: 15px;
+			margin-left: 20px;
 		}
 	}
 
@@ -397,4 +343,22 @@
 		float: right;
 		margin-top:10px;
 	}
+	.hello{
+		border: 0.5px solid rgb(233, 233, 233);
+		height: 30px;
+		// position: relative;
+		float: right;
+		padding: 3px;
+	}
+	.btn{
+		// margin-left: 5px;
+		// margin-top:2px;
+		// margin-bottom: 2px;
+		text-align: right;	
+		float: right;
+	}
+	.btns{
+		border-style: solid;
+  		border-color: rgb(52, 92, 224);
+	}
 </style>

+ 1 - 10
src/components/admin/getAccount.vue → src/components/admin/userAccount.vue

@@ -7,7 +7,6 @@
 		<div class="title">
 			个人中心
 		</div>
-
 		<el-form :model="form" label-width="100px">
 			<el-form-item label="登录账号" prop="form.username" required>
 				<el-input v-model="form.username" :disabled="true"></el-input>
@@ -30,15 +29,6 @@
             <el-form-item label="联系人电话" prop="form.contact_phone" required>
 				<el-input v-model="form.contact_phone" :disabled="true"></el-input>
 			</el-form-item>
-            <!-- <el-form-item label="创建时间" prop="form.create_time" required>
-				<el-input v-model="form.create_time" :disabled="true"></el-input>
-			</el-form-item>
-            <el-form-item label="修改时间" prop="form.update_time" required>
-				<el-input v-model="form.update_time" :disabled="true"></el-input>
-			</el-form-item> -->
-
-
-
 			<el-form-item>
 				<el-button type="success" @click="putAccount()">修改账户信息</el-button>
 				<!-- <el-button @click="reBack()">返回</el-button> -->
@@ -46,6 +36,7 @@
 		</el-form>
 	</div>
 </template>
+
 <script>
 	const rymc = window.sessionStorage.getItem('rymc')
 	const token = window.sessionStorage.getItem('token')

+ 28 - 83
src/components/login.vue

@@ -1,15 +1,12 @@
 <template>
 	<el-container id="login">
 		<!-- 顶部 -->
-		<el-header style="height: 114px;">
-			<!-- 左边logo -->
-			<div class="header-left">
-				安徽省农产品质量安全监测系统
-			</div>
+		<el-header style="height: 114px;" class="liuLan">
+			<span>浏览次数:{{data}}</span>
 		</el-header>
 		<el-form class="form" ref="loginForm" :model="loginForm" label-position="top" :rules="rulesLoginForm" label-width="70px" @keyup.enter="submitForm">
-			<!-- 	<el-radio v-model="loginForm.user_flag" label="1">监管机构</el-radio>
-			<el-radio v-model="loginForm.user_flag" label="2">检测机构</el-radio> -->
+				<el-radio v-model="loginForm.user_flag" label="1">监管机构</el-radio>
+				<el-radio v-model="loginForm.user_flag" label="2">检测机构</el-radio>
 			<el-form-item  prop="login_name">
 				<el-input prefix-icon="el-icon-user-solid" class="login_input"  placeholder="用户名称" v-model="loginForm.login_name" clearable />
 			</el-form-item>
@@ -17,13 +14,9 @@
 				<el-input prefix-icon="el-icon-c-scale-to-original" placeholder="密码" v-model="loginForm.pwd" show-password clearable />
 			</el-form-item>
 			<input type="button" name="" value="登录" class="btn" @click="submitForm">
-			<!-- <el-button ref="loginButton" type="success" @click="submitForm"> -->
-				<!-- 登录 -->
-			<!-- </el-button> -->
 		</el-form>
 		<div class="footer">
 			<p>主办单位:安徽省农业农村厅</p>
-			<!--  <p>承办单位:安徽省北斗精准农业信息工程实验室</p> -->
 			<p>技术支持:安徽省北斗精准农业信息工程实验室 农产品安全安徽省重点实验室</p>
 		</div>
 	</el-container>
@@ -43,16 +36,13 @@ let camera, scene, renderer;
 let particles,
   particle,
   count = 0;
-
-let mouseX = 85,
-  mouseY = -342;
-
 let windowHalfX = window.innerWidth / 2;
 let windowHalfY = window.innerHeight / 2;
 	export default {
 		name: 'Login',
 		data() {
 			return {
+				data:'',
 				met:null,
 				loginForm: {
 					login_name: '',
@@ -65,9 +55,17 @@ let windowHalfY = window.innerHeight / 2;
 				rulesLoginForm: {}
 			}
 		},
+		created(){
+			this.getAccessCount()
+			this.timer = setInterval(this.getTime, 1000)
+		},
 		// 方法绑定
-	
 		methods: {
+			async getAccessCount(){
+				const result = await this.$http.post('getAccessCount')
+				this.data = result.data.data
+				console.log(result.data.data)
+			},
 			// 检测是否初始化系统
 			// async isSysteInit () {
 			//   const formData = JSON.stringify({ useraction: 'isSystemInit' })
@@ -195,66 +193,13 @@ let windowHalfY = window.innerHeight / 2;
 
       renderer.setSize(window.innerWidth, window.innerHeight);
     },
-    onDocumentMouseMove(event) {
-      mouseX = event.clientX - windowHalfX;
-      mouseY = event.clientY - windowHalfY;
-    },
-    onDocumentTouchStart(event) {
-      if (event.touches.length === 1) {
-        event.preventDefault();
-
-        mouseX = event.touches[0].pageX - windowHalfX;
-        mouseY = event.touches[0].pageY - windowHalfY;
-      }
-    },
-    onDocumentTouchMove(event) {
-      if (event.touches.length === 1) {
-        event.preventDefault();
-
-        mouseX = event.touches[0].pageX - windowHalfX;
-        mouseY = event.touches[0].pageY - windowHalfY;
-      }
-    },
-    animate() {
-      requestAnimationFrame(this.animate);
-
-      this.render();
-    },
-    render() {
-      camera.position.x += (mouseX - camera.position.x) * 0.05;
-	    camera.position.y = 364;
-      camera.position.y += (-mouseY - camera.position.y) * 0.05;
-      camera.lookAt(scene.position);
-
-      var i = 0;
-
-      for (var ix = 0; ix < AMOUNTX; ix++) {
-        for (var iy = 0; iy < AMOUNTY; iy++) {
-          particle = particles[i++];
-          particle.position.y =
-            Math.sin((ix + count) * 0.3) * 50 +
-            Math.sin((iy + count) * 0.5) * 50;
-          particle.scale.x = particle.scale.y =
-            (Math.sin((ix + count) * 0.3) + 1) * 2 +
-            (Math.sin((iy + count) * 0.5) + 1) * 2;
-        }
-      }
-
-      renderer.render(scene, camera);
-
-      count += 0.1;
-    }
 		},
-		mounted() {
-    // this.getImgCode();
-    this.init()
-    this.animate()
-  },
+	mounted() {
+		this.init()
+		// this.animate()
+	},
 
-		created() {
-			this.timer = setInterval(this.getTime, 1000)
-		}
-	}
+}
 	
 </script>
 
@@ -339,26 +284,26 @@ let windowHalfY = window.innerHeight / 2;
 
 	#login {
 		height: 100%;
-		// background: url(../assets/img/bg01.jpg) bottom center no-repeat;
+		background: url(../assets/img/bg.jpg) bottom center no-repeat;
 		background-size: 100% 100%;
-		background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%);
+		// background-attachment:fixed;
+		// background-repeat: no-repeat;
+		// background-size: cover;
 	}
 
 	.footer {
-		// background-color: rgb(40,119,22);
-		// background-color: rgba(40, 119, 22, 0.6);
-		// display: flex;
-		// flex-direction: row;
 		position: absolute;
 		bottom: 0px;
+		background: rgba(6, 126, 12, 0.705);
+		opacity: 0.8;
 		color: #ffffff;
 		width: 100%;
 		text-align: center;
 		font-size: 14px;
 		height: 70px;
-		// padding-top: 5px;
-		// opacity: 0.6;
 		font-weight: 550;
-		// font: 24px bold #0055ff;
+	}
+	.liuLan{
+		padding: 20px;
 	}
 </style>

+ 2 - 2
src/main.js

@@ -12,9 +12,9 @@ import axios from 'axios'
 
 
 // 使用axios
-axios.defaults.baseURL = 'http://syjcapi.aielab.net/api/v1' 
+// axios.defaults.baseURL = 'http://syjcapi.aielab.net/api/v1' 
 
-// axios.defaults.baseURL = 'http://new.syjc.com/api/v1'
+axios.defaults.baseURL = 'http://new.syjc.com/api/v1'
 Vue.prototype.$http = axios
 Vue.config.productionTip = false
 axios.interceptors.request.use(

+ 12 - 3
src/router/index.js

@@ -26,6 +26,11 @@ const routes = [{
 		path: '/login',
 		component: () => import('../components/login')
 	},
+	{
+		path: '/homePage',
+		name:'homePage',
+		component: () => import('../components/homePage')
+	},
 	{
 		path: '/admin',
 		component: () => import('../components/admin'),
@@ -65,9 +70,9 @@ const routes = [{
 					name:'addTaskJcObject',
 					component: () => import('../components/admin/addTaskJcObject')
 			},{
-				path: '/admin/getAccount',
-					name:'getAccount',
-					component: () => import('../components/admin/getAccount')
+				path: '/admin/userAccount',
+					name:'userAccount',
+					component: () => import('../components/admin/userAccount')
 			},{
 				path: '/admin/putAccount',
 					name:'putAccount',
@@ -132,6 +137,10 @@ const routes = [{
 				path: '/admin/addTaskObjectJd',
 				name:'addTaskObjectJd',
 				component: () => import('../components/admin/addTaskObjectJd')
+			},{
+				path: '/admin/conSole',
+				name:'conSole',
+				component: () => import('../components/admin/conSole')
 			},
 			
 		]