Ver código fonte

杀虫灯一页显示8个

yf_zd 5 anos atrás
pai
commit
148ad74e52

+ 9 - 1
bigdata2/config/index.js

@@ -10,7 +10,7 @@ module.exports = {
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
     proxyTable: {
-      '': {
+      '/': {
         target: 'http://192.168.1.4:8000/',
         // target: 'http://192.168.1.120:8001/',
         changeOrigin: true,
@@ -18,6 +18,14 @@ module.exports = {
           '': ''   //重写接口
         }
       },
+      '/api': {
+        // target: 'http://192.168.1.4:8000/',
+        target: 'http://192.168.1.120:8001/',
+        changeOrigin: true,
+        pathRewrite: {
+          '^/api': '/api'   //重写接口
+        }
+      },
     },
     // Various Dev Server settings
     host: '192.168.1.12', // can be overwritten by process.env.HOST

+ 0 - 127
bigdata2/src/components/Index.vue

@@ -156,15 +156,6 @@ export default {
 	mounted() {
 	},
 	methods: {
-		dropdownHandle(command) {
-			if (command == 'editPwd') {
-				this.changePass()
-			} else if (command == 'outSys') {
-				this.outSys()
-			} else {
-				this.$router.push({ path: command })
-			}
-		},
 		getuserinfo() {
 			this.$axios({
 				method: 'post',
@@ -183,124 +174,6 @@ export default {
 				localStorage.setItem('staff', this.userinfo.staff)  // 1是admin
 			})
 		},
-		getNavList() {
-			this.$axios({
-				method: 'GET',
-				url: '/home'
-			}).then((res) => {
-				let navList = res.data
-				this.menuList1 = navList
-			})
-		},
-		dropdownHandle(command) {
-			if (command == 'editPwd') {
-				this.changePass()
-			} else if (command == 'outSys') {
-				this.outSys()
-			} else {
-				this.$router.push({ path: command })
-			}
-		},
-		handleCommand(command) {
-			// this.$message('click on item ' + command);
-			document.body.className = 'custom-' + command
-			window.sessionStorage.setItem('bodyCalss', 'custom-' + command)
-		},
-		outSys() {
-			this.$axios({
-				method: 'POST',
-				url: '/api_gateway?method=user.login.logout_user'
-			}).then((res) => {
-				if (res.data.message == '') {
-					window.localStorage.removeItem('isLogin')
-					window.localStorage.removeItem('session')
-					this.$router.push('/login')
-					// window.sessionStorage.setItem('activePath', '/index/home')
-				}
-			})
-		},
-		changePass() {
-			this.resetPassDialogVisible = true
-		},
-		resetPassDialogClosed() {},
-		resetPassSubm() {
-			this.$refs.resetPassFormRef.validate((valid) => {
-				if (!valid) return
-				this.$axios({
-					method: 'POST',
-					url: '/api_gateway?method=user.login.changepwd',
-					data: this.qs.stringify({
-						old_password: this.resetPassForm.oldPass,
-						new_password: this.resetPassForm.newPass,
-						confirm_password: this.resetPassForm.checkNewPass
-					})
-				}).then((res) => {
-					if (res.data.message == '') {
-						this.$message({
-							message: '密码修改成功!',
-							type: 'success'
-						})
-						this.resetPassDialogVisible = false
-					}
-				})
-			})
-		},
-	
-		menuIndex(menu) {
-			if (menu == 'bFourSituations') {
-				return ''
-			} else if (menu == 'equipDistribute') {
-				return ''
-			} else if (menu == 'bCbd') {
-				return ''
-			} else if (menu == 'bQxz') {
-				return ''
-			} else if (menu == 'bSy') {
-				return ''
-			} else if (menu == 'bBzy') {
-				return ''
-			} else {
-				return '/index/' + menu
-			}
-		},
-		//保存菜单的激活地址
-		saveNavState(activePath) {
-			// let path='/'+activePath.split('/')[activePath.split('/').length-1]
-			let path = activePath.slice(6)
-			// console.log(path)
-			// console.log(activePath)
-			if (activePath == '/index/bFourSituations') {
-				// this.$router.replace('/index/home')
-				this.BFourSituations(path) //跳转到大数据平台
-			} else if (activePath == '/index/equipDistribute') {
-				// this.$router.push('/index/home')
-				this.BFourSituations(path) //跳转到大数据平台
-			} else if (activePath == '/index/bCbd') {
-				this.BFourSituations(path) //跳转到大数据平台
-				// this.$router.push('/index/home')
-			} else if (activePath == '/index/bQxz') {
-				// this.$router.push('/index/home')
-				this.BFourSituations(path) //跳转到大数据平台
-			} else if (activePath == '/index/bSy') {
-				// this.$router.push('/index/home')
-				this.BFourSituations(path) //跳转到大数据平台
-			} else if (activePath == '/index/bBzy') {
-				// this.$router.push('/index/home')
-				this.BFourSituations(path) //跳转到大数据平台
-			}
-		},
-		BFourSituations(path) {
-			const { href } = this.$router.resolve({
-				path: path
-			})
-			window.open(href, '_blank')
-		},
-		goBD(path) {
-			const { href } = this.$router.resolve({
-				path: path
-			})
-			window.open(href, '_blank')
-		}
 	}
 }
 </script>

+ 1 - 65
bigdata2/src/pages/cure/scd/scd.vue

@@ -124,6 +124,7 @@
 			background
 			layout="prev, pager, next"
 			:total="totalNum"
+			:page-size="8"
 			:current-page="queryInfo.page"
 			@current-change="changePage"
 		></el-pagination>
@@ -326,19 +327,6 @@
 				</el-col>
 			</el-row>
 		</el-dialog>
-		<!-- 管理员操作对话框 -->
-		<el-dialog title="操作" :visible.sync="operarionDialogVisible" width="30%">
-			<div class="adminOperate">
-				<el-button type="primary" round @click="equipBtnControl('update')"
-					>升 级</el-button
-				>
-			</div>
-			<div class="adminOperate">
-				<el-button type="primary" round @click="equipBtnControl('reboot')"
-					>重 启</el-button
-				>
-			</div>
-		</el-dialog>
 	</div>
 </template>
 <script>
@@ -420,8 +408,6 @@ export default {
 			equipControlDialogVisible: false,
 			//编辑阈值信息对话框
 			equipStateDialogVisible: false,
-			//管理员设置
-			operarionDialogVisible: false
 		}
 	},
 	mounted() {
@@ -497,40 +483,6 @@ export default {
 				this.$message.error('获取失败')
 			})
 		},
-		simSet(d_id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api_gateway?method=forecast.send_control.device_sim',
-				data: this.qs.stringify({
-					d_id: d_id,
-					type: 'sim'
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.sim.iccid = res.data.data[0].iccid
-					this.$axios({
-						method: 'POST',
-						url: '/api_gateway?method=forecast.send_control.sim_query',
-						data: this.qs.stringify({
-							iccid: this.sim.iccid
-						})
-					}).then((res) => {
-						if (res.data.message == '') {
-							let data = eval('(' + res.data.data.data + ')')
-							let cardInfo = data.data
-							this.sim = cardInfo
-						}
-						this.simCodeVisible = true
-					})
-				} else {
-					this.$message.error(res.data.message)
-				}
-			})
-		},
-		equipOperation(d_id) {
-			this.d_id = d_id
-			this.operarionDialogVisible = true
-		},
 		//改变page
 		changePage(val) {
 			this.queryInfo.page = val
@@ -684,22 +636,6 @@ export default {
 			this.$refs.equipContrlRef.resetFields()
 			// console.log(this.equipContrlForm)
 		},
-		equipBtnControl(cmd) {
-			this.$axios({
-				method: 'POST',
-				url:
-					'/api_gateway?method=forecast.send_control.admin_device_control',
-				data: this.qs.stringify({
-					cmd,
-					device_type_id: 2,
-					d_id: this.d_id
-				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					this.$message.success('指令下发成功!')
-				}
-			})
-		}
 	},
 	filters: {
 		simStatus(val) {