Pārlūkot izejas kodu

配置项更改

yf_zd 5 gadi atpakaļ
vecāks
revīzija
0dd663b5ee

+ 2 - 30
bigdata2/config/index.js

@@ -10,40 +10,12 @@ module.exports = {
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
     proxyTable: {
-      '/api': {
+      '': {
         target: 'http://192.168.1.4:8000/',
         // target: 'http://192.168.1.120:8001/',
         changeOrigin: true,
         pathRewrite: {
-          '^/api': ''   //重写接口
-        }
-      },
-      '/ChinaSciencesGroup': {
-        target: 'http://47.99.110.100:8080/', //目标接口域名-中科院
-        changeOrigin: true, //是否跨域
-        pathRewrite: {
-          '^/ChinaSciencesGroup': '' //重写接口
-        }
-      },
-      '/v3': {   //百度地图坐标转换
-        target: 'http://api.map.baidu.com/reverse_geocoding/v3/',
-        changeOrigin: true,
-        pathRewrite: {
-          '^/v3': ''   //重写接口
-        }
-      },
-      '/v4': {   //搜狐IP地址查询接口(可设置编码)
-        target: 'https://pv.sohu.com/cityjson?ie=utf-8',
-        changeOrigin: true,
-        pathRewrite: {
-          '^/v4': ''   //重写接口
-        }
-      },
-      '/v5': {   //查看天气
-        target: 'http://wthrcdn.etouch.cn/weather_mini',
-        changeOrigin: true,
-        pathRewrite: {
-          '^/v5': ''   //重写接口
+          '': ''   //重写接口
         }
       },
     },

+ 1 - 1
bigdata2/src/components/Home.vue

@@ -31,7 +31,7 @@ export default {
     },
     methods: {
       submitForm() {
-        this.$axios.post('/api/login',this.qs.stringify(this.loginInfo)).then((res)=>{
+        this.$axios.post('/login',this.qs.stringify(this.loginInfo)).then((res)=>{
           if(res.data == 0){
             window.sessionStorage.setItem('myuser_type',1)
             this.$router.push('/index/xycb')

+ 5 - 5
bigdata2/src/components/Index.vue

@@ -168,7 +168,7 @@ export default {
 		getuserinfo() {
 			this.$axios({
 				method: 'post',
-				url: '/api/userinfo_'
+				url: '/userinfo_'
 			}).then((res) => {
 				this.username = res.data.username
 				this.userphoto = res.data.userphoto
@@ -176,7 +176,7 @@ export default {
 			})
 			this.$axios({
 				method: 'get',
-				url: '/api/user_detail'
+				url: '/user_detail'
 			}).then((res) => {
 				this.userinfo = res.data
 				localStorage.setItem('have_type', this.userinfo.have_type)  // 0管理员  1用户
@@ -186,7 +186,7 @@ export default {
 		getNavList() {
 			this.$axios({
 				method: 'GET',
-				url: '/api/home'
+				url: '/home'
 			}).then((res) => {
 				let navList = res.data
 				this.menuList1 = navList
@@ -209,7 +209,7 @@ export default {
 		outSys() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/api_gateway?method=user.login.logout_user'
+				url: '/api_gateway?method=user.login.logout_user'
 			}).then((res) => {
 				if (res.data.message == '') {
 					window.localStorage.removeItem('isLogin')
@@ -228,7 +228,7 @@ export default {
 				if (!valid) return
 				this.$axios({
 					method: 'POST',
-					url: '/api/api_gateway?method=user.login.changepwd',
+					url: '/api_gateway?method=user.login.changepwd',
 					data: this.qs.stringify({
 						old_password: this.resetPassForm.oldPass,
 						new_password: this.resetPassForm.newPass,

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 517 - 746
bigdata2/src/components/UserManger.vue


+ 9 - 9
bigdata2/src/pages/cure/scd/scd.vue

@@ -461,7 +461,7 @@ export default {
 			this.dataloading = true;
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_scd',
+				url: '/equipmanage_scd',
 				data: this.qs.stringify({
 					req: 'filter',
 					is_online:this.queryInfo.is_online,
@@ -500,7 +500,7 @@ export default {
 		simSet(d_id) {
 			this.$axios({
 				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
+				url: '/api_gateway?method=forecast.send_control.device_sim',
 				data: this.qs.stringify({
 					d_id: d_id,
 					type: 'sim'
@@ -510,7 +510,7 @@ export default {
 					this.sim.iccid = res.data.data[0].iccid
 					this.$axios({
 						method: 'POST',
-						url: '/api/api_gateway?method=forecast.send_control.sim_query',
+						url: '/api_gateway?method=forecast.send_control.sim_query',
 						data: this.qs.stringify({
 							iccid: this.sim.iccid
 						})
@@ -550,7 +550,7 @@ export default {
 			this.currImei = id
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_scd',
+				url: '/equipmanage_scd',
 				data: this.qs.stringify({
 					req: 'imei',
 					id: id,
@@ -608,7 +608,7 @@ export default {
 			this.currImei = id
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_scd',
+				url: '/equipmanage_scd',
 				data: this.qs.stringify({
 					req: 'imei',
 					id: id,
@@ -632,7 +632,7 @@ export default {
 			obj.et = obj.et && obj.et.toString().slice(0, 2) != '0' ? obj.et.toString().slice(0, 2) : obj.et.toString().slice(1, 2)
 			this.$axios({
 				method: 'POST',
-				url: '/api/scd_mqtt',
+				url: '/scd_mqtt',
 				data: this.qs.stringify({
 					sw: 'datt',
 					topicid: JSON.stringify([this.currImei]),
@@ -645,7 +645,7 @@ export default {
 			})
 			this.$axios({
 				method: 'POST',
-				url: '/api/scd_mqtt_all',
+				url: '/scd_mqtt_all',
 				data: this.qs.stringify({
 					sw: 'timer',
 					ts: this.equipContrlForm.ts,
@@ -666,7 +666,7 @@ export default {
 		equipSwitch(){
 			this.$axios({
 				method: 'POST',
-				url: '/api/scd_mqtt',
+				url: '/scd_mqtt',
 				data: this.qs.stringify({
 					sw: 'timer',
 					topicid: JSON.stringify([this.currImei]),
@@ -688,7 +688,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/api_gateway?method=forecast.send_control.admin_device_control',
+					'/api_gateway?method=forecast.send_control.admin_device_control',
 				data: this.qs.stringify({
 					cmd,
 					device_type_id: 2,

+ 3 - 3
bigdata2/src/pages/cure/scd/scdDetail.vue

@@ -142,7 +142,7 @@ export default {
 		getChartDataList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/scd_report_detail_chart',
+				url: '/scd_report_detail_chart',
 				data: this.qs.stringify({
 					req: 'filter',
 					id: this.queryInfo.e_id,
@@ -354,7 +354,7 @@ export default {
 		getHisDataList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/scd_report_detail',
+				url: '/scd_report_detail',
 				data: this.qs.stringify({
 					req: 'filter',
 					id: this.queryInfo.e_id,
@@ -417,7 +417,7 @@ export default {
 		refresh() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/scd_mqtt',
+				url: '/scd_mqtt',
 				data: this.qs.stringify({
 					sw: 'read',
 					topicid: JSON.stringify([this.queryInfo.e_id]),

+ 3 - 3
bigdata2/src/pages/equipmanger/EquipList.vue

@@ -212,7 +212,7 @@ export default {
 		getList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/equiplist_filter',
+				url: '/equiplist_filter',
 				data: this.qs.stringify({
 					f_type: this.queryInfo.device_type_id,
 					f_id: this.queryInfo.f_id,
@@ -267,7 +267,7 @@ export default {
 					if (value) {
 						this.$axios({
 							method: 'POST',
-							url: '/api/equiplist',
+							url: '/equiplist',
 							data: this.qs.stringify({
 								req: 'rename',
 								ename: value,
@@ -336,7 +336,7 @@ export default {
 			console.log(this.point)
 			this.$axios({
 				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+				url: '/api_gateway?method=forecast.worm_lamp.revise_device',
 				data: this.qs.stringify({
 					device_id: this.device_id,
 					lat: this.point.lat,

+ 10 - 10
bigdata2/src/pages/forecasting/bzy/Bzy.vue

@@ -509,7 +509,7 @@ export default {
 			this.tableLoading = true;
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_bzy',
+				url: '/equipmanage_bzy',
 				data: this.qs.stringify({
 					req: 'filter',
 					ename: this.queryInfo.ename,
@@ -547,7 +547,7 @@ export default {
 			this.d_id = d_id
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_bzy_detail',
+				url: '/equipmanage_bzy_detail',
 				data: this.qs.stringify({
 					id:d_id
 				})
@@ -570,7 +570,7 @@ export default {
 			let cultivate_time = this.time.time02 
 			this.$axios({
 				method: 'POST',
-				url: '/api/bzy_mqtt',
+				url: '/bzy_mqtt',
 				data: this.qs.stringify({
 					req: 'glass',
 					id: this.d_id,
@@ -586,7 +586,7 @@ export default {
 			})
 			this.$axios({
 				method: 'POST',
-				url: '/api/bzy_mqtt',
+				url: '/bzy_mqtt',
 				data: this.qs.stringify({
 					req: 'liquid',
 					id: this.d_id,
@@ -623,7 +623,7 @@ export default {
 			var colltime = JSON.stringify(this.setFrom.coll_time)
 			this.$axios({
 				method: 'POST',
-				url: '/api/bzy_mqtt',
+				url: '/bzy_mqtt',
 				data: this.qs.stringify({
 					req: 'set',
 					id: this.itemId,
@@ -656,7 +656,7 @@ export default {
 			this.itemId = d_id
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_bzy_detail',
+				url: '/equipmanage_bzy_detail',
 				data: this.qs.stringify({ id:d_id })
 			}).then((res) => {
 				if (res.status == 200) {
@@ -686,7 +686,7 @@ export default {
 		simSet(d_id) {
 			this.$axios({
 				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
+				url: '/api_gateway?method=forecast.send_control.device_sim',
 				data: this.qs.stringify({
 					d_id: d_id
 				})
@@ -695,7 +695,7 @@ export default {
 					this.sim.iccid = res.data.data[0].iccid
 					this.$axios({
 						method: 'POST',
-						url: '/api/api_gateway?method=forecast.send_control.sim_query',
+						url: '/api_gateway?method=forecast.send_control.sim_query',
 						data: this.qs.stringify({
 							iccid: this.sim.iccid
 						})
@@ -718,7 +718,7 @@ export default {
 			this.d_id = d_id
 			this.$axios({
 				method: 'POST',
-				url: '/api/api_gateway?method=forecast.worm_lamp.bzy_device',
+				url: '/api_gateway?method=forecast.worm_lamp.bzy_device',
 				data: this.qs.stringify({
 					device_id
 				})
@@ -753,7 +753,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/api_gateway?method=forecast.send_control.admin_device_control',
+					'/api_gateway?method=forecast.send_control.admin_device_control',
 				data: this.qs.stringify({
 					cmd,
 					device_type_id: 7,

+ 4 - 4
bigdata2/src/pages/forecasting/bzy/BzyPhotos.vue

@@ -31,7 +31,7 @@
 							<img :src="item.addr" @error="errImg" alt />
 						</template>
 						<template v-else>
-							<img :src="'/api/' + item.addr" @error="errImg" alt />
+							<img :src="'/' + item.addr" @error="errImg" alt />
 						</template>
 					</div>
 					<div class="photoCtrl">
@@ -131,7 +131,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/bzy_mqtt',
+					'/bzy_mqtt',
 				data: this.qs.stringify({
 					req: 'ctrl',
 					topicid: this.$route.query.d_id,
@@ -147,7 +147,7 @@ export default {
 		getPhoteList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/app_bzy_img',
+				url: '/app_bzy_img',
 				data: this.qs.stringify({
 					equip_id: this.id,
 					page: this.queryInfo.page,
@@ -207,7 +207,7 @@ export default {
 					this.$axios({
 						method: 'POST',
 						url:
-							'/api/bzy_delete_img',
+							'/bzy_delete_img',
 						data: this.qs.stringify({
 							imei: '300142',
 							addr: addrlist[0]

+ 3 - 3
bigdata2/src/pages/forecasting/bzy/DataDetail.vue

@@ -108,7 +108,7 @@ export default {
 		getChartDataList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/bzy_report_detail_chart',
+				url: '/bzy_report_detail_chart',
 				data: this.qs.stringify({
 					req: 'filter',
 					id: this.queryInfo.e_id,
@@ -319,7 +319,7 @@ export default {
 		getHisDataList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/bzy_report_detail',
+				url: '/bzy_report_detail',
 				data: this.qs.stringify({
 					req: 'filter',
 					id: this.queryInfo.e_id,
@@ -382,7 +382,7 @@ export default {
 		refresh() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/bzy_mqtt',
+				url: '/bzy_mqtt',
 				data: this.qs.stringify({
 					req: 'read',
 					topicid: this.queryInfo.e_id,

+ 6 - 6
bigdata2/src/pages/forecasting/cbd/Cbd.vue

@@ -311,7 +311,7 @@ export default {
 			this.tableLoading = true;
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_cbd',
+				url: '/equipmanage_cbd',
 				data: this.qs.stringify({
 					req: 'filter',
 					page: this.queryInfo.page,
@@ -364,7 +364,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/cbd_mqtt',
+					'/cbd_mqtt',
 				data: this.qs.stringify({ 
 					req: 'read',
 					topicid: id,
@@ -376,7 +376,7 @@ export default {
 						this.$axios({
 							method: 'POST',
 							url:
-								'/api/equipmanage_cbd',
+								'/equipmanage_cbd',
 							data: this.qs.stringify({
 								req: 'paramconf',
 								id: id,
@@ -441,7 +441,7 @@ export default {
 			}
 			this.$axios({
 				method: 'POST',
-				url: '/api/cbd_mqtt',
+				url: '/cbd_mqtt',
 				data: this.qs.stringify(dat)
 			}).then((res) => {
 				if (res.data==0) {
@@ -473,7 +473,7 @@ export default {
 				.then(() => {
 					this.$axios({
 						method: 'POST',
-						url: '/api/api_gateway?method=forecast.send_control.device_control',
+						url: '/api_gateway?method=forecast.send_control.device_control',
 						data: this.qs.stringify({
 							device_type_id: 3,
 							d_id: this.d_id,
@@ -508,7 +508,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/api_gateway?method=forecast.send_control.admin_device_control',
+					'/api_gateway?method=forecast.send_control.admin_device_control',
 				data: this.qs.stringify({
 					cmd,
 					device_type_id: 3,

+ 7 - 7
bigdata2/src/pages/forecasting/cbd/DataDetails.vue

@@ -368,7 +368,7 @@ export default {
 		getChartLine() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/cbd_report_detail_chart',
+				url: '/cbd_report_detail_chart',
 				data: this.qs.stringify({
 					req: 'filter',
 					begin: this.queryInfo.begin,
@@ -482,7 +482,7 @@ export default {
 		getEquipStatus() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/equipmanage_cbd_detail',
+				url: '/equipmanage_cbd_detail',
 				data: this.qs.stringify({
 					id: this.$route.query.id
 				})
@@ -511,7 +511,7 @@ export default {
 		getHisDataList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/cbd_report_detail',
+				url: '/cbd_report_detail',
 				data: this.qs.stringify({
 					page: this.queryInfo.page,
 					req: 'filter',
@@ -558,7 +558,7 @@ export default {
 			}
 			this.$axios({
 				method: 'post',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
+				url: '/api_gateway?method=forecast.send_control.device_sim',
 				data: this.qs.stringify({
 					d_id: this.queryInfo.d_id,
 					type:flag
@@ -568,7 +568,7 @@ export default {
 					this.sim.iccid = res.data.data[0].iccid
 					this.$axios({
 						method: 'POST',
-						url: '/api/api_gateway?method=forecast.send_control.sim_query',
+						url: '/api_gateway?method=forecast.send_control.sim_query',
 						data: this.qs.stringify({
 							iccid: this.sim.iccid
 						})
@@ -631,7 +631,7 @@ export default {
 			if(!this.hksiminp){}
 			this.$axios({
 				method: 'post',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
+				url: '/api_gateway?method=forecast.send_control.device_sim',
 				data: this.qs.stringify({
 					d_id: this.queryInfo.d_id,
 					iccid: this.hksiminp,
@@ -648,7 +648,7 @@ export default {
 		refresh() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/cbd_mqtt',
+				url: '/cbd_mqtt',
 				data: this.qs.stringify({
 					req: 'read',
 					topicid: this.$route.query.id,

+ 2 - 2
bigdata2/src/pages/forecasting/cbd/MessageWarn.vue

@@ -430,7 +430,7 @@ export default {
 			that
 				.$axios({
 					method: 'post',
-					url: '/api/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
+					url: '/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
 					data: postData
 				})
 				.then((res) => {
@@ -465,7 +465,7 @@ export default {
 			that
 				.$axios({
 					method: 'post',
-					url: '/api/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
+					url: '/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
 					data: postData
 				})
 				.then((res) => {

+ 2 - 2
bigdata2/src/pages/forecasting/cbd/PestsStats.vue

@@ -201,7 +201,7 @@ export default {
 		getPestChartLine() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/pest_at_ah_1',
+				url: '/pest_at_ah_1',
 				data: this.qs.stringify({
 					e_id: this.queryInfo.id,
 					tbegin: this.queryInfo.begin,
@@ -511,7 +511,7 @@ export default {
 		},
 		// 下载
 		dowonloadFile(){
-			window.location.href = '/api/pest_export?id=' + this.id + ' &filename="pestFile"'
+			window.location.href = '/pest_export?id=' + this.id + ' &filename="pestFile"'
 		},
 	}
 }

+ 4 - 4
bigdata2/src/pages/forecasting/cbd/cbdDataPhotos.vue

@@ -361,7 +361,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/cbd_mqtt',
+					'/cbd_mqtt',
 				data: this.qs.stringify({
 					req: 'ctrl',
 					topicid: this. id,
@@ -411,7 +411,7 @@ export default {
 				.$axios({
 					method: 'post',
 					url:
-						'/api/pests_identification_new',
+						'/pests_identification_new',
 					data: postData
 				})
 				.then((res) => {
@@ -449,7 +449,7 @@ export default {
 			that
 				.$axios({
 					method: 'post',
-					url: '/api/app_cbd_img', //forecast.forecast_system.equip_photo
+					url: '/app_cbd_img', //forecast.forecast_system.equip_photo
 					data: postData
 				})
 				.then((res) => {
@@ -487,7 +487,7 @@ export default {
 					this.$axios({
 						method: 'POST',
 						url:
-							'/api/cbd_delete_img',
+							'/cbd_delete_img',
 						data: this.qs.stringify({
 							imei: this.id,
 							addrlist: JSON.stringify(addrlist)

+ 7 - 7
bigdata2/src/pages/forecasting/xycb/xycb.vue

@@ -475,7 +475,7 @@ export default {
 			this.tableLoading = true;
 			this.$axios({
 				method: 'post',
-				url: '/api/sex_trap_view',
+				url: '/sex_trap_view',
 				data: this.qs.stringify({
 					f_id: this.queryInfo.f_id,
 					ename: this.queryInfo.ename,
@@ -532,7 +532,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/sex_trap_detail',
+					'/sex_trap_detail',
 				data: this.qs.stringify({ id:id })
 			}).then((res) => {
 				if(res.data.sex_trap.length>3){
@@ -567,7 +567,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/sex_mqtt_v1',
+					'/sex_mqtt_v1',
 				data: this.qs.stringify(data)
 			}).then((res) => {
 				if(res.data == 0){
@@ -578,7 +578,7 @@ export default {
 		equipControlSubm(form) {
 			this.$axios({
 				method: 'POST',
-				url: '/api/sex_mqtt_v1',
+				url: '/sex_mqtt_v1',
 				data: this.qs.stringify({
 					ext: 'data_tim',
 					dat_f: this.equipContrlForm1.dat_f,
@@ -597,7 +597,7 @@ export default {
 		lookSIMCode(d_id) {
 			this.$axios({
 				method: 'POST',
-				url: '/api/api_gateway?method=forecast.send_control.device_sim',
+				url: '/api_gateway?method=forecast.send_control.device_sim',
 				data: this.qs.stringify({
 					d_id: d_id
 				})
@@ -606,7 +606,7 @@ export default {
 					this.sim.iccid = res.data.data[0].iccid
 					this.$axios({
 						method: 'POST',
-						url: '/api/api_gateway?method=forecast.send_control.sim_query',
+						url: '/api_gateway?method=forecast.send_control.sim_query',
 						data: this.qs.stringify({
 							iccid: this.sim.iccid
 						})
@@ -643,7 +643,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/api_gateway?method=forecast.send_control.admin_device_control',
+					'/api_gateway?method=forecast.send_control.admin_device_control',
 				data: this.qs.stringify({
 					cmd,
 					device_type_id: 4,

+ 3 - 3
bigdata2/src/pages/forecasting/xycb/xycbDataDetail.vue

@@ -159,7 +159,7 @@ export default {
 		getChartDataList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/sex_at_ah',
+				url: '/sex_at_ah',
 				data: this.qs.stringify({
 					begin:  this.queryInfo.begin,
 					end: this.queryInfo.end,
@@ -352,7 +352,7 @@ export default {
 		getHisDataList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/sex_trap_data',
+				url: '/sex_trap_data',
 				data: this.qs.stringify({
 					e_id: this.queryInfo.e_id,
 					begin: this.queryInfo.begin,
@@ -427,7 +427,7 @@ export default {
 		refresh() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/sex_mqtt_v1',
+				url: '/sex_mqtt_v1',
 				data: this.qs.stringify({
 					ext: 'data',
 					e_id: this.queryInfo.e_id,

+ 4 - 4
bigdata2/src/pages/forecasting/xycb/xycbDataPhotos.vue

@@ -36,7 +36,7 @@
 						<el-checkbox v-show="!delBtnState" v-model="item.checked"></el-checkbox>
 					</div>
 					<div class="photoImg">
-						<img :src="'/api/'+item.addr" />
+						<img :src="'/'+item.addr" />
 					</div>
 					<div class="photoCtrl">
 						<span>{{item.addtime*1000 | formatTime}}</span>
@@ -128,7 +128,7 @@ export default {
 			this.$axios({
 				method: 'POST',
 				url:
-					'/api/api_gateway?method=forecast.send_control.admin_device_control',
+					'/api_gateway?method=forecast.send_control.admin_device_control',
 				data: this.qs.stringify({
 					cmd,
 					device_type_id: 4,
@@ -143,7 +143,7 @@ export default {
 		getPhoteList() {
 			this.$axios({
 				method: 'POST',
-				url: '/api/api_gateway?method=forecast.forecast_system.equip_photo',
+				url: '/api_gateway?method=forecast.forecast_system.equip_photo',
 				data: this.qs.stringify({
 					device_id: this.id,
 					ret: 'list',
@@ -193,7 +193,7 @@ export default {
 					this.$axios({
 						method: 'POST',
 						url:
-							'/api/api_gateway?method=forecast.forecast_system.equip_photo_del',
+							'/api_gateway?method=forecast.forecast_system.equip_photo_del',
 						data: this.qs.stringify({
 							device_id: this.id,
 							addrlist: JSON.stringify(addrlist)

+ 0 - 295
bigdata2/src/pages/personage/personMsg.vue

@@ -1,295 +0,0 @@
-<template>
-   <div>
-      <el-breadcrumb separator-class="el-icon-arrow-right">
-         <el-breadcrumb-item>个人中心</el-breadcrumb-item>
-      </el-breadcrumb> 
-       <el-card class="card">
-        <el-form
-            class="form"
-				ref="userMsgRef"
-				:model="userMsg"
-				label-width="90px"
-            :rules="editUserMsgRules"
-			> 
-            <el-form-item label="用户头像:" prop="newPass">
-               <el-upload
-						class="avatar-uploader"
-						action
-						:auto-upload="false"
-						:show-file-list="false"
-						:on-change="changeUpload">
-						<img v-if="userMsg.image" :src="userMsg.image" class="avatar" />
-						<i v-else class="el-icon-plus avatar-uploader-icon"></i>
-					</el-upload>
-               <div class="hint">仅支持jpg、gif、jpeg、bmp格式,文件小于4M</div>
-				</el-form-item>
-            <el-form-item label="用户名:" prop="">
-					<el-input type="text" disabled="disabled" v-model="userMsg.username"></el-input>
-				</el-form-item>
-             <el-form-item label="联系方式: " prop="mobile">
-					<el-input type="mobile" v-model="userMsg.mobile" maxlength=11></el-input>
-				</el-form-item>
-				<el-form-item label="地址:">
-               <div class="block">
-                  <el-cascader
-                     placeholder="搜索:河南"
-                     v-model="cityValue"
-                     :options="options"
-                     :props="props"
-                     @change="handleChange"
-                     filterable>
-                  </el-cascader>
-               </div>
-				</el-form-item>
-				<el-form-item label="邮箱:" prop="email">
-					<el-input type="email" v-model="userMsg.email" ></el-input>
-				</el-form-item>
-            <el-form-item>
-               <el-button type="primary" @click="saveUserMsg">保存</el-button>
-               <el-button @click="resetForm">取消</el-button>
-            </el-form-item>
-			</el-form>
-       </el-card>
-       <!-- vueCropper 剪裁图片实现-->
-		<el-dialog title="图片剪裁" :visible.sync="cropperVisible" append-to-body>
-			<div class="cropper-content">
-				<div style="width:100%;height:500px">
-					<vueCropper
-						ref="cropper"
-						:img="photo.img"
-						autoCrop
-						centerBox
-						fixed
-						:fixedNumber="photo.fixedNumber"
-						:outputSize="photo.size"
-						:outputType="photo.outputType"
-					></vueCropper>
-				</div>
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click="cropperVisible = false">取 消</el-button>
-				<el-button type="primary" @click="finish">确认</el-button>
-			</div>
-		</el-dialog>
-   </div>
-</template>
-
-<script>
-   import cityArr from './citydata.js'
-   export default {
-      data(){
-         var telRexEx = (rule, value, callback) => {
-            if (value) {
-               if(!(/^1[3456789]\d{9}$/.test(value))){ 
-                  callback(new Error('手机号码有误,请重填'));
-                  return false; 
-               }else{
-                  callback();
-               }
-            } else {
-               // callback(new Error('请输入联系方式'));
-               callback();
-            }
-         };
-         var emailRexEx = (rule, value, callback) => {
-            if (value) {
-               if(!(/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value))){ 
-                  callback(new Error('邮箱有误,请重填'));
-                  return false; 
-               }else{
-                  callback();
-               }
-            }else{
-               callback();
-            }
-         };
-         return {
-            userMsg:{
-               ret:'',
-               mobile:'',
-               province:'',
-               city:'',
-               district:'',
-               image:'',
-               email:'',
-               username:''
-            },
-            cityValue:[],
-            options: cityArr,
-            props: {
-               expandTrigger: 'hover',
-               value:'value',
-            },
-            cropperVisible: false,
-            // 裁剪组件的基础配置option
-            photo: {
-               img:'', // 裁剪图片的地址
-               info: true, // 裁剪框的大小信息
-               outputSize: 0.8, // 裁剪生成图片的质量
-               outputType: 'jpeg', // 裁剪生成图片的格式
-               // canScale: false, // 图片是否允许滚轮缩放
-               // autoCrop: true, // 是否默认生成截图框
-               // autoCropWidth: 300, // 默认生成截图框宽度
-               // autoCropHeight: 200, // 默认生成截图框高度
-               // fixedBox: true, // 固定截图框大小 不允许改变
-               fixed: true, // 是否开启截图框宽高固定比例
-               fixedNumber: [1, 1], // 截图框的宽高比例
-               full: true, // 是否输出原图比例的截图
-               canMoveBox: false, // 截图框能否拖动
-               original: false, // 上传图片按照原始比例渲染
-               centerBox: false, // 截图框是否被限制在图片里面
-               infoTrue: true // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
-            },
-            // 表单验证
-            editUserMsgRules: {
-               mobile: [
-                  { validator: telRexEx, trigger: 'blur' }
-               ],
-               email: [
-                  {  validator: emailRexEx, trigger: 'blur' }
-               ]
-            },
-            
-         }
-      },
-      created(){
-         this.getRoleList()
-      },
-      mounted(){
-         // this.getRoleList()
-      },
-      methods:{
-         resetForm() {
-            this.$refs.userMsgRef.resetFields();
-         },
-         getRoleList(){
-            let that = this;
-            this.$axios({
-               method:'POST',
-               url:'/api/api_gateway?method=home.homes.personal_center',
-               data:this.qs.stringify({username:localStorage.getItem('username')})
-            }).then(res=>{
-               if(res.data.message==""){
-                  that.userMsg=res.data.data;
-                  that.cityValue = [res.data.data.province,res.data.data.city,res.data.data.district]
-               }
-            })
-         },
-         saveUserMsg(){
-            this.$refs.userMsgRef.validate((valid) => {
-               console.log(11111)
-               if (valid) {
-                  this.userMsg.ret = 'change'
-                  this.$axios({
-                     method:'POST',
-                     url:'/api/api_gateway?method=home.homes.personal_center',
-                     data:this.qs.stringify(this.userMsg)
-                  }).then(res=>{
-                     if(res.data.message==""){
-                        this.$message.success('修改成功!')
-                     }else{
-                        this.$message.error('修改失败!')
-                     }
-                  })
-               } else {
-                  return false
-               }
-            })
-            
-         },
-         // 上传按钮   限制图片大小
-         changeUpload(file, fileList) {
-            const isLt4M = file.size / 1024 / 1024 < 4
-            if (!isLt4M) {
-               this.$message.error('上传文件大小不能超过 4MB!')
-               return false
-            }
-            // 上传成功后将图片地址赋值给裁剪框显示图片
-            this.$nextTick(() => {
-               this.photo.img = URL.createObjectURL(file.raw)
-               this.cropperVisible = true
-            })
-         },
-         // 点击裁剪,这一步是可以拿到处理后的地址
-         finish() {
-            // 获取截图的base64 数据
-            this.$refs.cropper.getCropBlob((data) => {
-               var form = new FormData()
-               let resFile = this.blobToFile(data, 'filename.jpg');
-               form.append('image', resFile)
-               form.append('username', localStorage.getItem('username'))
-
-               this.cropperVisible = false
-               this.$axios({
-                  method: 'POST',
-                  url: '/api/api_gateway?method=home.homes.personal_photo',
-                  data: form
-               }).then((res) => {
-                  if (res.data.data.src != 0 && res.data.message == '') {
-                     this.userMsg.image = `/api/${res.data.data.src}`
-                  }else{
-                     this.$message({
-                        message: '上传失败',
-                        type: 'error'
-                     })
-                  }
-               })
-            })
-         },
-         //转成file
-         blobToFile(Blob, fileName) {
-            Blob.lastModifiedDate = new Date();
-            Blob.name = fileName;
-            return Blob;
-         },
-         handleChange(value) {
-            console.log(value)
-            console.log(this.cityValue)
-            this.userMsg.province = value[0]
-            this.userMsg.city = value[1]
-            this.userMsg.district = value[2]
-         }
-         
-      }
-   }
-</script>
-
-<style lang='less' scoped>
-   .card{
-      min-height: 80vh;
-      .form{
-         // width: 50%;
-         // 头像上传
-         .avatar-uploader .el-upload {
-            border: 1px dashed #d9d9d9;
-            border-radius: 6px;
-            cursor: pointer;
-            position: relative;
-            overflow: hidden;
-         }
-         .avatar-uploader .el-upload:hover {
-            border-color: #409EFF;
-         }
-         .avatar-uploader-icon {
-            font-size: 28px;
-            color: #8c939d;
-            width: 150px;
-            height: 150px;
-            line-height: 150px !important;
-            text-align: center;
-         }
-         .avatar {
-            width: 178px;
-            height: 178px;
-            display: block;
-         }
-         .hint{
-            font-size: 12px;
-            color: #707070;
-         }
-         .el-input{
-            width: 220px;
-         }
-      }
-   }
-</style>

+ 1 - 16
bigdata2/src/vuex/store.js

@@ -32,24 +32,9 @@ const mutations = {
         window.sessionStorage.setItem('activePath',payload.activePath)
     },
 }
-const actions = {
-    getBaseLandList({state}){
-        console.log(Vue);
-        console.log(this);
-        axios({
-            method:"POST",
-            url:"/api/api_gateway?method=ascend.ascend_manage.all_base",
-        }).then((res)=>{
-            if (res.data.message== "") {
-                console.log(111);
-                state.baseLandList=res.data.data.data;
-            }
-        })
-    }
-}
+
 
 export default new Vuex.Store({
     state,
     mutations,
-    actions,
 })