瀏覽代碼

更改接口

yf_zd 5 年之前
父節點
當前提交
dfeea21631

+ 3 - 3
config/index.js

@@ -11,11 +11,11 @@ module.exports = {
     assetsPublicPath: '/',
     assetsPublicPath: '/',
     proxyTable: {
     proxyTable: {
       '/api': {
       '/api': {
-        target: 'http://192.168.1.120:8001/',
-        // target: 'http://192.168.1.8:8000/',
+        // target: 'http://192.168.1.120:8001/',
+        target: 'http://192.168.1.4:8000/',
         changeOrigin: true,
         changeOrigin: true,
         pathRewrite: {
         pathRewrite: {
-          '^/api': '/api'   //重写接口
+          '^/api': ''   //重写接口
         }
         }
       },
       },
       '/ChinaSciencesGroup': {
       '/ChinaSciencesGroup': {

+ 2 - 2
src/components/Index.vue

@@ -297,7 +297,7 @@ export default {
 		outSys() {
 		outSys() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=user.login.logout_user'
+				url: '/api/logout_user'
 			}).then((res) => {
 			}).then((res) => {
 				if (res.data.message == '') {
 				if (res.data.message == '') {
 					window.localStorage.removeItem('isLogin')
 					window.localStorage.removeItem('isLogin')
@@ -316,7 +316,7 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=user.login.changepwd',
+					url: '/api/changepwd',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						old_password: this.resetPassForm.oldPass,
 						old_password: this.resetPassForm.oldPass,
 						new_password: this.resetPassForm.newPass,
 						new_password: this.resetPassForm.newPass,

+ 3 - 3
src/components/Login.vue

@@ -71,13 +71,13 @@ export default {
 			}
 			}
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=user.login.login_user',
+				url: '/api/login',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					username: this.username,
 					username: this.username,
 					password: this.pass
 					password: this.pass
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
+				if (res.data  == 0) {
 					if (this.cState == true) {
 					if (this.cState == true) {
 						//是否记住密码
 						//是否记住密码
 						localStorage.setItem('username', this.username)
 						localStorage.setItem('username', this.username)
@@ -90,7 +90,7 @@ export default {
 					if (selHome) {
 					if (selHome) {
 						this.$router.push(selHome) //登录后默认选择首页
 						this.$router.push(selHome) //登录后默认选择首页
 					} else {
 					} else {
-						this.$router.push('/index/home')
+						this.$router.push('/index/farmBaseManger')
 					}
 					}
 				} else {
 				} else {
 					this.$message.error(res.data.message)
 					this.$message.error(res.data.message)

+ 0 - 48
src/main.js

@@ -96,54 +96,6 @@ Vue.filter('equipType', function (i) {
   }
   }
 })
 })
 
 
-function checkLoginRequire(type, isLogin, next) {
-  if (type == false) {
-    next();
-  } else {
-    if (isLogin) {
-      next();
-    } else {
-      next('/login')
-    }
-  }
-}
-router.beforeEach((to, from, next) => {
-  //针对菜单进入列表不缓存
-  if (to.name == 'CbdDataDetails' || to.name == 'cbdDataPhotos' || to.name == 'MessageWarn' || to.name == 'PestsStats' || to.name == "BzyPhotos" || to.name == 'DataDetail' || to.name == 'xycbDataPhotos' || to.name == 'xycbDataDetail' || to.name == 'ScdDetail') {
-    from.meta.keepAlive = true
-  } else {
-    from.meta.keepAlive = false
-  }
-
-  let isLogin = JSON.parse(localStorage.getItem('isLogin'));
-  if (to.path === '/login') {
-    if (isLogin) {
-      next('/index/home') //登录后默认跳转到首页
-    } else {
-      next()
-    }
-  } else {
-    let type = to.meta.login_require; //是否需要登录,为了解决扫码在手机上看
-    axios({
-      method: 'POST',
-      url: '/api/api_gateway?method=user.login.users_check'
-    }).then(res => {
-      if (res.data.message=='') { //登录状态
-        // console.log('check_success');
-        localStorage.setItem("isLogin", true)
-        checkLoginRequire(type, isLogin, next)
-      } else { //session过期 
-        // console.log('check_false');
-        localStorage.setItem("isLogin", false)
-        next('/login');
-      }
-    }, err => {
-      // console.log('check_error');
-      localStorage.setItem("isLogin", false);
-      next('/login');
-    })
-  }
-})
 
 
 /* eslint-disable no-new */
 /* eslint-disable no-new */
 new Vue({
 new Vue({

+ 3 - 3
src/pages/symanger/farm/AddBase.vue

@@ -130,7 +130,7 @@ export default {
 						})
 						})
 						.join(';')
 						.join(';')
 				this.$axios({
 				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_base',
+					url: '/api/add_base',
 					method: 'POST',
 					method: 'POST',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farmname: this.addBaseForm.farmname,
 						farmname: this.addBaseForm.farmname,
@@ -141,11 +141,11 @@ export default {
 						farmarea: this.addBaseForm.farmarea
 						farmarea: this.addBaseForm.farmarea
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.$message.success('添加基地成功!')
 						this.$message.success('添加基地成功!')
 						this.$router.go(-1)
 						this.$router.go(-1)
 					} else {
 					} else {
-						this.$message.error('添加基地失败!')
+						this.$message.error(res.data)
 					}
 					}
 				})
 				})
 			})
 			})

+ 72 - 58
src/pages/symanger/farm/Base.vue

@@ -7,9 +7,9 @@
 		<el-card class="box-card pad0">
 		<el-card class="box-card pad0">
 			<baidu-map
 			<baidu-map
 				class="bm-view"
 				class="bm-view"
-				:center="{ lng: 116.404, lat: 39.915 }"
+				:center="center"
 				@ready="handler"
 				@ready="handler"
-				:zoom="13"
+				:zoom="zoom"
 			>
 			>
 				<bm-polygon
 				<bm-polygon
 					v-for="(item, index) in polygonPath"
 					v-for="(item, index) in polygonPath"
@@ -46,13 +46,14 @@
 						>新增基地</el-button
 						>新增基地</el-button
 					>
 					>
 					<el-button
 					<el-button
+						v-if="baseList.length>0"
 						type="primary"
 						type="primary"
 						style="margin-right: 5px"
 						style="margin-right: 5px"
 						size="mini"
 						size="mini"
 						@click="editBase()"
 						@click="editBase()"
 						>编辑基地</el-button
 						>编辑基地</el-button
 					>
 					>
-					<i class="el-icon-delete" @click="deletBase()"></i>
+					<i class="el-icon-delete" v-if="baseList.length>0" @click="deletBase()"></i>
 				</div>
 				</div>
 			</div>
 			</div>
 			<div class="intro">
 			<div class="intro">
@@ -69,6 +70,11 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			center:{
+				lat: 36.746057,
+				lng: 118.889935
+			},
+			zoom:5,
 			baseList: [],
 			baseList: [],
 			baseInfo: {
 			baseInfo: {
 				id: '',
 				id: '',
@@ -93,66 +99,86 @@ export default {
 		}
 		}
 	},
 	},
 	created() {
 	created() {
-		this.getBaseList()
 	},
 	},
 	methods: {
 	methods: {
 		handler({ BMap, map }) {
 		handler({ BMap, map }) {
+			this.BMap = BMap
+			this.map = map
 			map.enableScrollWheelZoom(true)
 			map.enableScrollWheelZoom(true)
+			this.getBaseList()
 		},
 		},
 		getBaseList() {
 		getBaseList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.base_info'
+				url: '/api/base_info'
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.baseList = res.data.data.data
+				if (res.data.counts > 0) {
+					this.baseList = res.data.data
 					this.baseInfo.id = this.baseList[0].id
 					this.baseInfo.id = this.baseList[0].id
 					this.baseInfo.farmname = this.baseList[0].farmname
 					this.baseInfo.farmname = this.baseList[0].farmname
 					this.baseInfo.username = this.baseList[0].user
 					this.baseInfo.username = this.baseList[0].user
 					this.baseInfo.addr = this.baseList[0].farmaddr
 					this.baseInfo.addr = this.baseList[0].farmaddr
 					this.baseInfo.desc = this.baseList[0].farmdesc
 					this.baseInfo.desc = this.baseList[0].farmdesc
 					this.baseInfo.farmarea = this.baseList[0].farmarea
 					this.baseInfo.farmarea = this.baseList[0].farmarea
+					this.drapmap(this.baseList[0].farmframe)
+				}else{
+					this.baseInfo = {
+						id: '',
+						farmname: '',
+						username: '',
+						addr: '',
+						desc: '',
+						farmarea: '',
+						polygonPath: []
+					}
+					this.polygonPath = []
 				}
 				}
 			})
 			})
 		},
 		},
 		selectBase(id) {
 		selectBase(id) {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.base_info',
+				url: '/api/base_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					id
 					id
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					var data = res.data.data.data[0]
+				if (res.data.counts > 0) {
+					var data = res.data.data[0]
 					this.baseInfo.id = data.id
 					this.baseInfo.id = data.id
 					this.baseInfo.farmname = data.farmname
 					this.baseInfo.farmname = data.farmname
 					this.baseInfo.username = data.user
 					this.baseInfo.username = data.user
 					this.baseInfo.addr = data.farmaddr
 					this.baseInfo.addr = data.farmaddr
 					this.baseInfo.desc = data.farmdesc
 					this.baseInfo.desc = data.farmdesc
 					this.baseInfo.farmarea = data.farmarea
 					this.baseInfo.farmarea = data.farmarea
-					this.polygonPath = []
-					if (data.farmframe) {
-						let array2 = data.farmframe.split(';').map((item) => {
-							let arr = item.split(',')
-							return {
-								lng: arr[0],
-								lat: arr[1]
-							}
-						})
-						this.polygonPath.push(array2)
-					} else {
-						this.polygonPath = []
-					}
+					this.drapmap(data.farmframe)
 				}
 				}
 			})
 			})
 		},
 		},
+		drapmap(path){
+			if (path) {
+				this.polygonPath = []
+				let array2 = path.split(';').map((item) => {
+					let arr = item.split(',')
+					return {
+						lng: arr[0],
+						lat: arr[1]
+					}
+				})
+				this.polygonPath.push(array2)
+			} else {
+				this.polygonPath = []
+			}
+			let view = this.map.getViewport(this.polygonPath[0])
+			this.zoom = view.zoom
+			this.center = view.center
+		},
 		addBase() {
 		addBase() {
 			this.$router.push('/index/farmAddBase')
 			this.$router.push('/index/farmAddBase')
 		},
 		},
 		editBase() {
 		editBase() {
 			this.baseInfo.polygonPath = this.polygonPath
 			this.baseInfo.polygonPath = this.polygonPath
-			this.$router.push({ path: '/index/farmEditBase', query: this.baseInfo })
+			this.$router.push({ path: '/index/farmEditBase', query:{baseInfo:JSON.stringify(this.baseInfo)}})
 		},
 		},
 		deletBase() {
 		deletBase() {
 			const h = this.$createElement;
 			const h = this.$createElement;
@@ -167,41 +193,29 @@ export default {
 				confirmButtonText: '确定',
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
 				cancelButtonText: '取消',
 			}).then((action) => {
 			}).then((action) => {
-			
+				this.$axios({
+						method: 'POST',
+						url: '/api/del_base',
+						data: this.qs.stringify({
+							id: this.baseInfo.id
+						})
+					}).then((res) => {
+						if (res.data == 1) {
+							this.$message({
+								type: 'success',
+								message: '删除成功!'
+							})
+							this.getBaseList()
+						}
+					})
+					.catch(() => {
+						this.$message({
+							type: 'info',
+							message: '已取消删除'
+						})
+					})
 			})
 			})
-
-			// this.$msgbox(
-			// 	'确定要删除?/</br>此基地下的所有农事操作都会被清楚,此操作不可逆',
-			// 	'提示',
-			// 	{
-			// 		confirmButtonText: '确定',
-			// 		cancelButtonText: '取消',
-			// 		type: 'warning'
-			// 	}
-			// )
-			// 	.then(() => {
-			// 		this.$axios({
-			// 			method: 'POST',
-			// 			url: '/api/api_gateway?method=ascend.ascend_manage.del_base',
-			// 			data: this.qs.stringify({
-			// 				id: this.baseInfo.id
-			// 			})
-			// 		}).then((res) => {
-			// 			if (res.data.message == '') {
-			// 				this.$message({
-			// 					type: 'success',
-			// 					message: '删除成功!'
-			// 				})
-			// 				this.getBaseList()
-			// 			}
-			// 		})
-			// 	})
-			// 	.catch(() => {
-			// 		this.$message({
-			// 			type: 'info',
-			// 			message: '已取消删除'
-			// 		})
-			// 	})
+			
 		}
 		}
 	}
 	}
 }
 }

+ 19 - 19
src/pages/symanger/farm/EditBase.vue

@@ -88,14 +88,8 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
-			editBaseForm: {
-				id: this.$route.query.id,
-				farmname: this.$route.query.farmname,
-				username: this.$route.query.username,
-				farmdesc: this.$route.query.desc,
-				farmaddr: this.$route.query.addr,
-				farmarea: this.$route.query.farmarea
-			},
+			info: JSON.parse(this.$route.query.baseInfo),
+			editBaseForm: {},
 			editBaseFormRules: {
 			editBaseFormRules: {
 				farmname: [
 				farmname: [
 					{ required: true, message: '请填写基地名称', trigger: 'blur' }
 					{ required: true, message: '请填写基地名称', trigger: 'blur' }
@@ -116,14 +110,24 @@ export default {
 			haha: '百度地图',
 			haha: '百度地图',
 			center: { lng: 116.412732, lat: 39.911707 },
 			center: { lng: 116.412732, lat: 39.911707 },
 			zoom: 13,
 			zoom: 13,
-			// polygonPath: this.$route.query.polygonPath,
 			polygonPath: {
 			polygonPath: {
 				editing: false,
 				editing: false,
-				paths: this.$route.query.polygonPath // 绘制完成后的经纬度,其实是在画的时候动态push的,因为在点击的时候触发了 paintPolygon 函数
+				paths: []// 绘制完成后的经纬度,其实是在画的时候动态push的,因为在点击的时候触发了 paintPolygon 函数
 			},
 			},
 			addr: ''
 			addr: ''
 		}
 		}
 	},
 	},
+	mounted() {
+		this.editBaseForm = {
+			id: this.info.id,
+			farmname: this.info.farmname,
+			username: this.info.username,
+			farmdesc: this.info.desc,
+			farmaddr: this.info.addr,
+			farmarea: this.info.farmarea
+		}
+		this.polygonPath.paths=this.info.polygonPath
+	},
 	methods: {
 	methods: {
 		editBaseSubm() {
 		editBaseSubm() {
 			this.$refs.editBaseFormRef.validate((valid) => {
 			this.$refs.editBaseFormRef.validate((valid) => {
@@ -138,7 +142,7 @@ export default {
 						})
 						})
 						.join(';')
 						.join(';')
 				this.$axios({
 				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_base',
+					url: '/api/edit_base',
 					method: 'POST',
 					method: 'POST',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.editBaseForm.id,
 						id: this.editBaseForm.id,
@@ -150,7 +154,7 @@ export default {
 						farmarea: this.editBaseForm.farmarea
 						farmarea: this.editBaseForm.farmarea
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.$message.success('修改基地成功!')
 						this.$message.success('修改基地成功!')
 						this.$router.go(-1)
 						this.$router.go(-1)
 					} else {
 					} else {
@@ -165,8 +169,10 @@ export default {
 		handler({ BMap, map }) {
 		handler({ BMap, map }) {
 			this.map = map
 			this.map = map
 			this.BMap = BMap
 			this.BMap = BMap
+			let view = map.getViewport(this.polygonPath.paths[0])
+			this.center = view.center
+			this.zoom = view.zoom
 			map.enableScrollWheelZoom(true)
 			map.enableScrollWheelZoom(true)
-			// map.centerAndZoom('青岛市', 13)
 		},
 		},
 		getClickInfo(e) {
 		getClickInfo(e) {
 			console.log(e.point.lng)
 			console.log(e.point.lng)
@@ -227,12 +233,6 @@ export default {
 		alertpath(e) {
 		alertpath(e) {
 			// console.log(this.polygonPath.paths[0])
 			// console.log(this.polygonPath.paths[0])
 		},
 		},
-		handler({ BMap, map }) {
-			this.BMap = BMap
-			this.map = map
-			map.enableScrollWheelZoom(true)
-			// map.centerAndZoom('青岛市', 13)
-		},
 		addrChange() {
 		addrChange() {
 			let local = new this.BMap.LocalSearch(this.map, {
 			let local = new this.BMap.LocalSearch(this.map, {
 				renderOptions: { map: this.map, panel: 'r-result' }
 				renderOptions: { map: this.map, panel: 'r-result' }

+ 18 - 16
src/pages/symanger/farm/Fields.vue

@@ -123,10 +123,11 @@
 				:rules="editFieldFormRules"
 				:rules="editFieldFormRules"
 			>
 			>
 				<el-form-item label="地块名称 : " prop="landname">
 				<el-form-item label="地块名称 : " prop="landname">
-					<el-input v-model="editFieldForm.landname"></el-input>
+					<el-input :disabled="true" v-model="editFieldForm.landname"></el-input>
 				</el-form-item>
 				</el-form-item>
 				<el-form-item label="所属基地 : " prop="farm">
 				<el-form-item label="所属基地 : " prop="farm">
 					<el-select
 					<el-select
+						:disabled="true"
 						v-model="editFieldForm.farm"
 						v-model="editFieldForm.farm"
 						placeholder="请选择基地"
 						placeholder="请选择基地"
 						style="width: 100%"
 						style="width: 100%"
@@ -216,24 +217,22 @@ export default {
 		getFields() {
 		getFields() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.land_info',
+				url: '/api/land_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: this.page,
 					page: this.page,
 					farmname:this.base
 					farmname:this.base
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum=res.data.data.counts
-				}
+				this.fieldsList = res.data.data
+				this.totalNum=res.data.counts
 			})
 			})
 		},
 		},
 		getBaseList() {
 		getBaseList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
-				this.baseList = res.data.data.data
+				this.baseList = res.data.data
 			})
 			})
 		},
 		},
 		addFieldDialogClosed() {
 		addFieldDialogClosed() {
@@ -249,11 +248,11 @@ export default {
 			this.$refs.addFieldFormRef.validate((valid) => {
 			this.$refs.addFieldFormRef.validate((valid) => {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_land',
+					url: '/api/add_land',
 					method: 'POST',
 					method: 'POST',
 					data: this.qs.stringify(this.addFieldForm)
 					data: this.qs.stringify(this.addFieldForm)
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.$message.success('地块添加成功!')
 						this.$message.success('地块添加成功!')
 						this.getFields()
 						this.getFields()
 					} else {
 					} else {
@@ -273,22 +272,25 @@ export default {
 			this.$refs.editFieldFormRef.validate((valid) => {
 			this.$refs.editFieldFormRef.validate((valid) => {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_land',
+					url: '/api/edit_land',
 					method: 'POST',
 					method: 'POST',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.editFieldForm.id,
 						id: this.editFieldForm.id,
-						farm: this.editFieldForm.farm,
+						// farm: this.editFieldForm.farm,
 						landname: this.editFieldForm.landname,
 						landname: this.editFieldForm.landname,
 						// landuse: this.editFieldForm.landuse,
 						// landuse: this.editFieldForm.landuse,
 						landaddr: this.editFieldForm.landaddr,
 						landaddr: this.editFieldForm.landaddr,
 						landarea: this.editFieldForm.landarea
 						landarea: this.editFieldForm.landarea
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.$message.success('地块修改成功!')
 						this.$message.success('地块修改成功!')
 						this.getFields()
 						this.getFields()
+						this.editFieldDialogVisible = false
+					}else{
+						this.$message.success(res.data)
+
 					}
 					}
-					this.editFieldDialogVisible = false
 				})
 				})
 			})
 			})
 		},
 		},
@@ -302,7 +304,7 @@ export default {
 			})
 			})
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_land',
+						url: '/api/del_land',
 						method: 'POST',
 						method: 'POST',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							farm: item.farm,
 							farm: item.farm,
@@ -312,7 +314,7 @@ export default {
 							landarea: item.landarea
 							landarea: item.landarea
 						})
 						})
 					}).then((res) => {
 					}).then((res) => {
-						if (res.data.message == '') {
+						if (res.data == 1) {
 							this.$message({
 							this.$message({
 								type: 'success',
 								type: 'success',
 								message: '删除成功!'
 								message: '删除成功!'

+ 87 - 72
src/pages/symanger/farmThing/applyFertilizer.vue

@@ -33,52 +33,65 @@
 			</div>
 			</div>
 			<el-button type="primary" size="mini" @click="fertiAdd">新增</el-button>
 			<el-button type="primary" size="mini" @click="fertiAdd">新增</el-button>
 		</div>
 		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.is_pick == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/applyFertilizer.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">操作基地 : {{ item.farm }}</p>
-						<p class="borderLine">操作地块 : {{ item.land }}</p>
-						<p class="borderLine">肥料名称 : {{ item.itemname }}</p>
-						<p class="borderLine">施肥用量(kg) : {{ item.manureuse }}</p>
-						<p class="borderLine">
-							施肥时间 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="fertiEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="fertiDelet(item)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
+		<template v-if="fieldsList.length">
+			<el-row :gutter="10">
+				<el-col
+					:xs="24"
+					:sm="24"
+					:md="12"
+					:lg="6"
+					:xl="6"
+					v-for="item in fieldsList"
+					:key="item.id"
+				>
+					<el-card class="box-card">
+						<img
+							class="tag"
+							v-if="item.is_pick == '1'"
+							src="@/assets/images/sy/farmThing/picked.png"
+						/>
+						<div class="img-box">
+							<img src="@/assets/images/sy/farmThing/applyFertilizer.png" />
+						</div>
+						<div class="detail">
+							<p class="borderLine">操作基地 : {{ item.farm }}</p>
+							<p class="borderLine">操作地块 : {{ item.land }}</p>
+							<p class="borderLine">肥料名称 : {{ item.itemname }}</p>
+							<p class="borderLine">施肥用量(kg) : {{ item.manureuse }}</p>
+							<p class="borderLine">
+								施肥时间 : {{ (item.uptime * 1000) | formatTime }}
+							</p>
+							<p class="borderLine">批次 : {{ item.batch }}</p>
+							<p class="borderLine">操作人 : {{ item.user }}</p>
+						</div>
+						<div class="btns">
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
+								@click="fertiEdit(item)"
+								>编辑</a
+							>
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
+								@click="fertiDelet(item)"
+								>删除</a
+							>
+						</div>
+					</el-card>
+				</el-col>
+			</el-row>
+		</template>
+		<template v-else>
+			<!-- 暂无数据 -->
+			<div class="expertDiagnosis_referral_units_not" >
+				<img
+					:src="zanwu"
+					alt
+					class="expertDiagnosis_referral_units_notImg"
+				/>
+			</div>
+		</template>
 		<el-pagination
 		<el-pagination
+			v-if="fieldsList.length"
 			background
 			background
 			layout="prev, pager, next"
 			layout="prev, pager, next"
 			:total="totalNum"
 			:total="totalNum"
@@ -115,7 +128,7 @@
 						<el-input v-model="addForm.fertilizer_name"></el-input>
 						<el-input v-model="addForm.fertilizer_name"></el-input>
 					</el-form-item>
 					</el-form-item>
 					<el-form-item label="使用总量(kg) : " prop="weight">
 					<el-form-item label="使用总量(kg) : " prop="weight">
-						<el-input v-model="addForm.weight"></el-input>
+						<el-input type="number" v-model="addForm.weight"></el-input>
 					</el-form-item>
 					</el-form-item>
 					<el-form-item label="操作人 : " prop="operator">
 					<el-form-item label="操作人 : " prop="operator">
 						<el-input v-model="addForm.operator"></el-input>
 						<el-input v-model="addForm.operator"></el-input>
@@ -170,6 +183,7 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			zanwu: require('@/assets/images/expertDiagnosis/zanwu.png'),
 			itemId: '',
 			itemId: '',
 			btnindex: '',
 			btnindex: '',
 			base: '',
 			base: '',
@@ -219,44 +233,40 @@ export default {
 		getBaseList() {  //获取所有基地
 		getBaseList() {  //获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
-				this.baseList = res.data.data.data
+				this.baseList = res.data.data
 			})
 			})
 		},
 		},
 		getPlanted() {
 		getPlanted() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
+				url: '/api/already_plant'
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr.filter((item) => {
-						if (item.children.length > 0) {
-							return item.children.some((item2) => {
-								return item2.is_pick != 1 //未采收
-							})
-						} else {
-							return false
-						}
-					})
-				}
+				let arr = res.data.data
+				this.planted = arr.filter((item) => {
+					if (item.children.length > 0) {
+						return item.children.some((item2) => {
+							return item2.is_pick != 1 //未采收
+						})
+					} else {
+						return false
+					}
+				})
 			})
 			})
 		},
 		},
 		getFields() {
 		getFields() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.manure_info',
+				url: '/api/manure_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: this.page,
 					page: this.page,
 					farmname: this.base,
 					farmname: this.base,
 					pickcode: this.pickcode
 					pickcode: this.pickcode
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
+				this.fieldsList = res.data.data
+				this.totalNum = res.data.counts
 			})
 			})
 		},
 		},
 		fertiAdd() {
 		fertiAdd() {
@@ -286,12 +296,12 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_manure',
+						url: '/api/del_manure',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							id: item.id
 							id: item.id
 						})
 						})
 					}).then((res) => {
 					}).then((res) => {
-						if (res.data.message == '') {
+						if (res.data == 1) {
 							this.$message({
 							this.$message({
 								type: 'success',
 								type: 'success',
 								message: '删除成功!'
 								message: '删除成功!'
@@ -320,7 +330,7 @@ export default {
 				let land = this.addForm.pro_cascader[1].split('/')[0]
 				let land = this.addForm.pro_cascader[1].split('/')[0]
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_manure',
+					url: '/api/add_manure',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farm: farm,
 						farm: farm,
 						land: land,
 						land: land,
@@ -329,10 +339,10 @@ export default {
 						user: this.addForm.operator
 						user: this.addForm.operator
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.getFields()
 						this.getFields()
 					} else {
 					} else {
-						this.$message.warning(res.data.message)
+						this.$message.warning(res.data)
 					}
 					}
 					this.farmThingAddDialogVisible = false
 					this.farmThingAddDialogVisible = false
 				})
 				})
@@ -343,7 +353,7 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_manure',
+					url: '/api/edit_manure',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.itemId,
 						id: this.itemId,
 						itemname: this.editForm.fertilizer_name,
 						itemname: this.editForm.fertilizer_name,
@@ -444,4 +454,9 @@ export default {
 .noPlanted {
 .noPlanted {
 	color: red;
 	color: red;
 }
 }
+// 暂无数据
+.expertDiagnosis_referral_units_not {
+	width: 272px;
+	margin: 0 auto;
+}
 </style>
 </style>

+ 87 - 69
src/pages/symanger/farmThing/harvest.vue

@@ -4,6 +4,7 @@
 			<el-breadcrumb-item>农事管理</el-breadcrumb-item>
 			<el-breadcrumb-item>农事管理</el-breadcrumb-item>
 			<el-breadcrumb-item>采收</el-breadcrumb-item>
 			<el-breadcrumb-item>采收</el-breadcrumb-item>
 		</el-breadcrumb>
 		</el-breadcrumb>
+		{{planted}}
 		<div class="search-box">
 		<div class="search-box">
 			<div class="filter-box">
 			<div class="filter-box">
 				<el-select
 				<el-select
@@ -23,54 +24,67 @@
 			</div>
 			</div>
 			<el-button type="primary" size="mini" @click="harvAdd">新增</el-button>
 			<el-button type="primary" size="mini" @click="harvAdd">新增</el-button>
 		</div>
 		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in pickList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/harvest.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">采收基地 : {{ item.farm }}</p>
-						<p class="borderLine">采收地块 : {{ item.land }}</p>
-						<p class="borderLine">产品名称 : {{ item.pickname }}</p>
-						<p class="borderLine">采收总量(kg) : {{ item.picktotal }}</p>
-						<p class="borderLine">
-							采收时间 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<!-- <div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="harvEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="showQRcode(item.id)"
-							>二维码</a
-						>
-					</div> -->
-					<div class="btns2">
-						<a
-							:class="{ bg: itemId == item.id ? true : false }"
-							@click="showQRcode(item.id)"
-							>二维码</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
+		<template v-if="pickList.length">
+			<el-row :gutter="10">
+				<el-col
+					:xs="24"
+					:sm="24"
+					:md="12"
+					:lg="6"
+					:xl="6"
+					v-for="item in pickList"
+					:key="item.id"
+				>
+					<el-card class="box-card">
+						<div class="img-box">
+							<img src="@/assets/images/sy/farmThing/harvest.png" />
+						</div>
+						<div class="detail">
+							<p class="borderLine">采收基地 : {{ item.farm }}</p>
+							<p class="borderLine">采收地块 : {{ item.land }}</p>
+							<p class="borderLine">产品名称 : {{ item.pickname }}</p>
+							<p class="borderLine">采收总量(kg) : {{ item.picktotal }}</p>
+							<p class="borderLine">
+								采收时间 : {{ (item.uptime * 1000) | formatTime }}
+							</p>
+							<p class="borderLine">批次 : {{ item.batch }}</p>
+							<p class="borderLine">操作人 : {{ item.user }}</p>
+						</div>
+						<!-- <div class="btns">
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
+								@click="harvEdit(item)"
+								>编辑</a
+							>
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
+								@click="showQRcode(item.id)"
+								>二维码</a
+							>
+						</div> -->
+						<div class="btns2">
+							<a
+								:class="{ bg: itemId == item.id ? true : false }"
+								@click="showQRcode(item.id)"
+								>二维码</a
+							>
+						</div>
+					</el-card>
+				</el-col>
+			</el-row>
+		</template>
+		<template v-else>
+			<!-- 暂无数据 -->
+			<div class="expertDiagnosis_referral_units_not" >
+				<img
+					:src="zanwu"
+					alt
+					class="expertDiagnosis_referral_units_notImg"
+				/>
+			</div>
+		</template>
 		<el-pagination
 		<el-pagination
+			v-if="pickList.length"
 			background
 			background
 			layout="prev, pager, next"
 			layout="prev, pager, next"
 			:total="totalNum"
 			:total="totalNum"
@@ -182,6 +196,7 @@ import QRCode from 'qrcodejs2' //二维码生成
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			zanwu: require('@/assets/images/expertDiagnosis/zanwu.png'),
 			itemId: '',
 			itemId: '',
 			btnindex: '',
 			btnindex: '',
 			backcode: '', //新增和编辑弹框
 			backcode: '', //新增和编辑弹框
@@ -233,40 +248,37 @@ export default {
 			//获取所有基地
 			//获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
-				this.baseList = res.data.data.data
+				this.baseList = res.data.data
 			})
 			})
 		},
 		},
 		getPlanted() {
 		getPlanted() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
+				url: '/api/already_plant'
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr.filter((item) => {
-						if (item.children.length > 0) {
-							return item.children.some((item2) => {
-								return item2.is_pick != 1
-							})
-						} else {
-							return false
-						}
+				let arr = res.data.data
+				this.planted = arr.filter((item) => {
+					return item.children.some(m=>{
+						return m.is_pick==0
 					})
 					})
-				}
+				}).map((item) => {
+					item.children = item.children.filter((m) => {
+						return m.is_pick == 0
+					})
+					return item
+				})
 			})
 			})
 		},
 		},
 		getPickList() {
 		getPickList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.pick_info',
+				url: '/api/pick_info',
 				data: this.qs.stringify({ page: this.page, farmname: this.base })
 				data: this.qs.stringify({ page: this.page, farmname: this.base })
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.pickList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
+				this.pickList = res.data.data
+				this.totalNum = res.data.counts
 			})
 			})
 		},
 		},
 		harvAdd() {
 		harvAdd() {
@@ -287,6 +299,7 @@ export default {
 			}
 			}
 		},
 		},
 		AddDialogClosed() {
 		AddDialogClosed() {
+			console.log(this.$refs.addFormRef)
 			this.$refs.addFormRef.resetFields()
 			this.$refs.addFormRef.resetFields()
 		},
 		},
 		EditDialogClosed() {
 		EditDialogClosed() {
@@ -309,7 +322,7 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_pick',
+					url: '/api/add_pick',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farm: this.addForm.pro_cascader[0],
 						farm: this.addForm.pro_cascader[0],
 						land: this.addForm.pro_cascader[1],
 						land: this.addForm.pro_cascader[1],
@@ -318,12 +331,12 @@ export default {
 						backcode: this.backcode
 						backcode: this.backcode
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.getPickList()
 						this.getPickList()
 						this.getPlanted()
 						this.getPlanted()
 						this.farmThingAddDialogVisible = false
 						this.farmThingAddDialogVisible = false
 					} else {
 					} else {
-						this.$message.warning(res.data.message)
+						this.$message.warning(res.data)
 					}
 					}
 				})
 				})
 			})
 			})
@@ -463,4 +476,9 @@ export default {
 	padding: 0 10px 20px 10px;
 	padding: 0 10px 20px 10px;
 	color: red;
 	color: red;
 }
 }
+// 暂无数据
+.expertDiagnosis_referral_units_not {
+	width: 272px;
+	margin: 0 auto;
+}
 </style>
 </style>

+ 86 - 71
src/pages/symanger/farmThing/more.vue

@@ -33,51 +33,64 @@
 			</div>
 			</div>
 			<el-button type="primary" size="mini" @click="sprayAdd">新增</el-button>
 			<el-button type="primary" size="mini" @click="sprayAdd">新增</el-button>
 		</div>
 		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.is_pick == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/more.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">操作基地 : {{ item.farm }}</p>
-						<p class="borderLine">操作地块 : {{ item.land }}</p>
-						<p class="borderLine">操作事项 : {{ item.jobname }}</p>
-						<p class="borderLine">
-							操作日期 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次名称 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="sprayEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="sprayDelet(item.id)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
+		<template v-if="fieldsList.length">
+			<el-row :gutter="10">
+				<el-col
+					:xs="24"
+					:sm="24"
+					:md="12"
+					:lg="6"
+					:xl="6"
+					v-for="item in fieldsList"
+					:key="item.id"
+				>
+					<el-card class="box-card">
+						<img
+							class="tag"
+							v-if="item.is_pick == '1'"
+							src="@/assets/images/sy/farmThing/picked.png"
+						/>
+						<div class="img-box">
+							<img src="@/assets/images/sy/farmThing/more.png" />
+						</div>
+						<div class="detail">
+							<p class="borderLine">操作基地 : {{ item.farm }}</p>
+							<p class="borderLine">操作地块 : {{ item.land }}</p>
+							<p class="borderLine">操作事项 : {{ item.jobname }}</p>
+							<p class="borderLine">
+								操作日期 : {{ (item.uptime * 1000) | formatTime }}
+							</p>
+							<p class="borderLine">批次名称 : {{ item.batch }}</p>
+							<p class="borderLine">操作人 : {{ item.user }}</p>
+						</div>
+						<div class="btns">
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
+								@click="sprayEdit(item)"
+								>编辑</a
+							>
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
+								@click="sprayDelet(item.id)"
+								>删除</a
+							>
+						</div>
+					</el-card>
+				</el-col>
+			</el-row>
+		</template>
+		<template v-else>
+			<!-- 暂无数据 -->
+			<div class="expertDiagnosis_referral_units_not" >
+				<img
+					:src="zanwu"
+					alt
+					class="expertDiagnosis_referral_units_notImg"
+				/>
+			</div>
+		</template>
 		<el-pagination
 		<el-pagination
+			v-if="fieldsList.length"
 			background
 			background
 			layout="prev, pager, next"
 			layout="prev, pager, next"
 			:total="totalNum"
 			:total="totalNum"
@@ -164,6 +177,7 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			zanwu: require('@/assets/images/expertDiagnosis/zanwu.png'),
 			itemId: '',
 			itemId: '',
 			btnindex: '',
 			btnindex: '',
 			base: '',
 			base: '',
@@ -209,44 +223,40 @@ export default {
 			//获取所有基地
 			//获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
-				this.baseList = res.data.data.data
+				this.baseList = res.data.data
 			})
 			})
 		},
 		},
 		getPlanted() {
 		getPlanted() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
+				url: '/api/already_plant'
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr.filter((item) => {
-						if (item.children.length > 0) {
-							return item.children.some((item2) => {
-								return item2.is_pick != 1
-							})
-						} else {
-							return false
-						}
-					})
-				}
+				let arr = res.data.data
+				this.planted = arr.filter((item) => {
+					if (item.children.length > 0) {
+						return item.children.some((item2) => {
+							return item2.is_pick != 1
+						})
+					} else {
+						return false
+					}
+				})
 			})
 			})
 		},
 		},
 		getFields() {
 		getFields() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.area_job_info',
+				url: '/api/area_job_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: this.page,
 					page: this.page,
 					farmname: this.base,
 					farmname: this.base,
 					pickcode: this.pickcode
 					pickcode: this.pickcode
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
+				this.fieldsList = res.data.data
+				this.totalNum = res.data.counts
 			})
 			})
 		},
 		},
 		sprayAdd() {
 		sprayAdd() {
@@ -276,12 +286,12 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_area_job',
+						url: '/api/del_area_job',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							id: id
 							id: id
 						})
 						})
 					}).then((res) => {
 					}).then((res) => {
-						if (res.data.message == '') {
+						if (res.data == 1) {
 							this.$message({
 							this.$message({
 								type: 'success',
 								type: 'success',
 								message: '删除成功!'
 								message: '删除成功!'
@@ -308,7 +318,7 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.area_job',
+					url: '/api/area_job',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farm: this.addForm.pro_cascader[0],
 						farm: this.addForm.pro_cascader[0],
 						land: this.addForm.pro_cascader[1],
 						land: this.addForm.pro_cascader[1],
@@ -316,7 +326,7 @@ export default {
 						user: this.addForm.operator
 						user: this.addForm.operator
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.getFields()
 						this.getFields()
 						this.farmThingAddDialogVisible = false
 						this.farmThingAddDialogVisible = false
 					}
 					}
@@ -328,17 +338,17 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_area_job',
+					url: '/api/edit_area_job',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.itemId,
 						id: this.itemId,
 						jobname: this.editForm.opt_items,
 						jobname: this.editForm.opt_items,
 						user: this.editForm.operator
 						user: this.editForm.operator
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.getFields()
 						this.getFields()
 					} else {
 					} else {
-						this.$message.warning(res.data.message)
+						this.$message.error(res.data)
 					}
 					}
 				})
 				})
 				this.farmThingEditDialogVisible = false
 				this.farmThingEditDialogVisible = false
@@ -429,4 +439,9 @@ export default {
 	padding: 0 10px 20px 10px;
 	padding: 0 10px 20px 10px;
 	color: red;
 	color: red;
 }
 }
+// 暂无数据
+.expertDiagnosis_referral_units_not {
+	width: 272px;
+	margin: 0 auto;
+}
 </style>
 </style>

+ 80 - 61
src/pages/symanger/farmThing/plant.vue

@@ -21,54 +21,67 @@
 			</div>
 			</div>
 			<el-button type="primary" size="mini" @click="plantAdd">新增</el-button>
 			<el-button type="primary" size="mini" @click="plantAdd">新增</el-button>
 		</div>
 		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.backcode"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.pickcode == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/plant.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">种植基地 : {{ item.farm }}</p>
-						<p class="borderLine">种植地块 : {{ item.land }}</p>
-						<p class="borderLine">
-							采收状态 : {{ item.pickcode == 1 ? '已采收' : '未采收' }}
-						</p>
-						<p class="borderLine">类别 : {{ item.planttype }}</p>
-						<p class="borderLine">名称 : {{ item.plantname }}</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">
-							种植时间 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="plantEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="plantDelet(item.id, item.backcode)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
+		<template v-if="fieldsList.length">
+			<el-row :gutter="10">
+				<el-col
+					:xs="24"
+					:sm="24"
+					:md="12"
+					:lg="6"
+					:xl="6"
+					v-for="item in fieldsList"
+					:key="item.backcode"
+				>
+					<el-card class="box-card">
+						<img
+							class="tag"
+							v-if="item.pickcode == '1'"
+							src="@/assets/images/sy/farmThing/picked.png"
+						/>
+						<div class="img-box">
+							<img src="@/assets/images/sy/farmThing/plant.png" />
+						</div>
+						<div class="detail">
+							<p class="borderLine">种植基地 : {{ item.farm }}</p>
+							<p class="borderLine">种植地块 : {{ item.land }}</p>
+							<p class="borderLine">
+								采收状态 : {{ item.pickcode == 1 ? '已采收' : '未采收' }}
+							</p>
+							<p class="borderLine">类别 : {{ item.planttype }}</p>
+							<p class="borderLine">名称 : {{ item.plantname }}</p>
+							<p class="borderLine">批次 : {{ item.batch }}</p>
+							<p class="borderLine">
+								种植时间 : {{ (item.uptime * 1000) | formatTime }}
+							</p>
+						</div>
+						<div class="btns">
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
+								@click="plantEdit(item)"
+								>编辑</a
+							>
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
+								@click="plantDelet(item.id, item.backcode)"
+								>删除</a
+							>
+						</div>
+					</el-card>
+				</el-col>
+			</el-row>
+		</template>
+		<template v-else>
+			<!-- 暂无数据 -->
+			<div class="expertDiagnosis_referral_units_not" >
+				<img
+					:src="zanwu"
+					alt
+					class="expertDiagnosis_referral_units_notImg"
+				/>
+			</div>
+		</template>
 		<el-pagination
 		<el-pagination
+			v-if="fieldsList.length"
 			background
 			background
 			layout="prev, pager, next"
 			layout="prev, pager, next"
 			:total="totalNum"
 			:total="totalNum"
@@ -162,6 +175,7 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			zanwu: require('@/assets/images/expertDiagnosis/zanwu.png'),
 			itemId: '',
 			itemId: '',
 			btnindex: '',
 			btnindex: '',
 			page: 1,
 			page: 1,
@@ -227,27 +241,27 @@ export default {
 		getAllFieldsCascader() {
 		getAllFieldsCascader() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.FieldCascader = res.data.data.data
+				if (res.data.data.length > 0) {
+					this.FieldCascader = res.data.data
+				}else{
+					this.FieldCascader = []
 				}
 				}
 			})
 			})
 		},
 		},
 		getplant() {
 		getplant() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.plant_info',
+				url: '/api/plant_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: this.page,
 					page: this.page,
 					farmname: this.base,
 					farmname: this.base,
 					pickcode: this.pickcode
 					pickcode: this.pickcode
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.totalNum = res.data.data.counts
-					this.fieldsList = res.data.data.data
-				}
+				this.totalNum = res.data.counts
+				this.fieldsList = res.data.data
 			})
 			})
 		},
 		},
 		selChange(){
 		selChange(){
@@ -282,12 +296,12 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_plant',
+						url: '/api/del_plant',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							backcode: backcode
 							backcode: backcode
 						})
 						})
 					}).then((res) => {
 					}).then((res) => {
-						if (res.data.message == '') {
+						if (res.data == 1) {
 							this.$message({
 							this.$message({
 								type: 'success',
 								type: 'success',
 								message: '删除成功!'
 								message: '删除成功!'
@@ -316,7 +330,7 @@ export default {
 				let land = this.addForm.pro_cascader[1]
 				let land = this.addForm.pro_cascader[1]
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_plant',
+					url: '/api/add_plant',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farm: farm,
 						farm: farm,
 						land: land,
 						land: land,
@@ -325,10 +339,10 @@ export default {
 						plantname: this.addForm.pro_name
 						plantname: this.addForm.pro_name
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.getplant()
 						this.getplant()
 					} else {
 					} else {
-						this.$message.warning(res.data.message)
+						this.$message.error(res.data)
 					}
 					}
 					this.farmThingAddDialogVisible = false
 					this.farmThingAddDialogVisible = false
 				})
 				})
@@ -339,7 +353,7 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_plant',
+					url: '/api/edit_plant',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.itemId,
 						id: this.itemId,
 						planttype: this.editForm.pro_type,
 						planttype: this.editForm.pro_type,
@@ -426,4 +440,9 @@ export default {
 .el-cascader {
 .el-cascader {
 	width: 100%;
 	width: 100%;
 }
 }
+// 暂无数据
+.expertDiagnosis_referral_units_not {
+	width: 272px;
+	margin: 0 auto;
+}
 </style>
 </style>

+ 6 - 6
src/pages/symanger/farmThing/sale.vue

@@ -236,7 +236,7 @@ export default {
 			//获取所有基地
 			//获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
 				this.baseList = res.data.data.data
 				this.baseList = res.data.data.data
 			})
 			})
@@ -244,7 +244,7 @@ export default {
 		getList() {
 		getList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.sell_info',
+				url: '/api/sell_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: 1,
 					page: 1,
 					farmname: this.base
 					farmname: this.base
@@ -280,7 +280,7 @@ export default {
 		getHarvest() {
 		getHarvest() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.pick_info',
+				url: '/api/pick_info',
 				data: this.qs.stringify({ page: this.page })
 				data: this.qs.stringify({ page: this.page })
 			}).then((res) => {
 			}).then((res) => {
 				if (res.data.message == '') {
 				if (res.data.message == '') {
@@ -301,7 +301,7 @@ export default {
 				let date = parseInt(new Date(this.addForm.saleDate).getTime() / 1000)
 				let date = parseInt(new Date(this.addForm.saleDate).getTime() / 1000)
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_sell_info',
+					url: '/api/add_sell_info',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						sellname: this.addForm.name,
 						sellname: this.addForm.name,
 						backcode: this.addForm.sourceCode,
 						backcode: this.addForm.sourceCode,
@@ -328,7 +328,7 @@ export default {
 				)
 				)
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_sell_info',
+					url: '/api/edit_sell_info',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.id,
 						id: this.id,
 						selltime,
 						selltime,
@@ -361,7 +361,7 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_sell_info',
+						url: '/api/del_sell_info',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							id: id
 							id: id
 						})
 						})

+ 85 - 70
src/pages/symanger/farmThing/spray.vue

@@ -33,51 +33,64 @@
 			</div>
 			</div>
 			<el-button type="primary" size="mini" @click="sprayAdd">新增</el-button>
 			<el-button type="primary" size="mini" @click="sprayAdd">新增</el-button>
 		</div>
 		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.is_pick == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/spray.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">操作基地 : {{ item.farm }}</p>
-						<p class="borderLine">操作地块 : {{ item.land }}</p>
-						<p class="borderLine">药品名称 : {{ item.mediname }}</p>
-						<p class="borderLine">
-							喷药时间 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="sprayEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="sprayDelet(item)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
+		<template v-if="fieldsList.length">
+			<el-row :gutter="10">
+				<el-col
+					:xs="24"
+					:sm="24"
+					:md="12"
+					:lg="6"
+					:xl="6"
+					v-for="item in fieldsList"
+					:key="item.id"
+				>
+					<el-card class="box-card">
+						<img
+							class="tag"
+							v-if="item.is_pick == '1'"
+							src="@/assets/images/sy/farmThing/picked.png"
+						/>
+						<div class="img-box">
+							<img src="@/assets/images/sy/farmThing/spray.png" />
+						</div>
+						<div class="detail">
+							<p class="borderLine">操作基地 : {{ item.farm }}</p>
+							<p class="borderLine">操作地块 : {{ item.land }}</p>
+							<p class="borderLine">药品名称 : {{ item.mediname }}</p>
+							<p class="borderLine">
+								喷药时间 : {{ (item.uptime * 1000) | formatTime }}
+							</p>
+							<p class="borderLine">批次 : {{ item.batch }}</p>
+							<p class="borderLine">操作人 : {{ item.user }}</p>
+						</div>
+						<div class="btns">
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
+								@click="sprayEdit(item)"
+								>编辑</a
+							>
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
+								@click="sprayDelet(item)"
+								>删除</a
+							>
+						</div>
+					</el-card>
+				</el-col>
+			</el-row>
+		</template>
+		<template v-else>
+			<!-- 暂无数据 -->
+			<div class="expertDiagnosis_referral_units_not" >
+				<img
+					:src="zanwu"
+					alt
+					class="expertDiagnosis_referral_units_notImg"
+				/>
+			</div>
+		</template>
 		<el-pagination
 		<el-pagination
+			v-if="fieldsList.length"
 			background
 			background
 			layout="prev, pager, next"
 			layout="prev, pager, next"
 			:total="totalNum"
 			:total="totalNum"
@@ -164,6 +177,7 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			zanwu: require('@/assets/images/expertDiagnosis/zanwu.png'),
 			itemId: '',
 			itemId: '',
 			btnindex: '',
 			btnindex: '',
 			base: '',
 			base: '',
@@ -220,44 +234,40 @@ export default {
 			//获取所有基地
 			//获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
-				this.baseList = res.data.data.data
+				this.baseList = res.data.data
 			})
 			})
 		},
 		},
 		getPlanted() {
 		getPlanted() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
+				url: '/api/already_plant'
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr.filter((item) => {
-						if (item.children.length > 0) {
-							return item.children.some((item2) => {
-								return item2.is_pick != 1 //为采收
-							})
-						} else {
-							return false
-						}
-					})
-				}
+				let arr = res.data.data
+				this.planted = arr.filter((item) => {
+					if (item.children.length > 0) {
+						return item.children.some((item2) => {
+							return item2.is_pick != 1 //为采收
+						})
+					} else {
+						return false
+					}
+				})
 			})
 			})
 		},
 		},
 		getFields() {
 		getFields() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.medi_info',
+				url: '/api/medi_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: this.page,
 					page: this.page,
 					farmname: this.base,
 					farmname: this.base,
 					pickcode: this.pickcode
 					pickcode: this.pickcode
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
+				this.fieldsList = res.data.data
+				this.totalNum = res.data.counts
 			})
 			})
 		},
 		},
 		sprayAdd() {
 		sprayAdd() {
@@ -286,12 +296,12 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_medi',
+						url: '/api/del_medi',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							id: item.id
 							id: item.id
 						})
 						})
 					}).then((res) => {
 					}).then((res) => {
-						if (res.data.message == '') {
+						if (res.data == 1) {
 							this.$message({
 							this.$message({
 								type: 'success',
 								type: 'success',
 								message: '删除成功!'
 								message: '删除成功!'
@@ -320,7 +330,7 @@ export default {
 				let land = this.addForm.pro_cascader[1].split('/')[0]
 				let land = this.addForm.pro_cascader[1].split('/')[0]
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_medi',
+					url: '/api/add_medi',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farm,
 						farm,
 						land,
 						land,
@@ -328,10 +338,10 @@ export default {
 						user: this.addForm.operator
 						user: this.addForm.operator
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.getFields()
 						this.getFields()
 					} else {
 					} else {
-						this.$message.warning(res.data.message)
+						this.$message.error(res.data)
 					}
 					}
 				})
 				})
 				this.farmThingAddDialogVisible = false
 				this.farmThingAddDialogVisible = false
@@ -342,7 +352,7 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_medi',
+					url: '/api/edit_medi',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.itemId,
 						id: this.itemId,
 						mediname: this.editForm.spray_name,
 						mediname: this.editForm.spray_name,
@@ -442,4 +452,9 @@ export default {
 .noPlanted {
 .noPlanted {
 	color: red;
 	color: red;
 }
 }
+// 暂无数据
+.expertDiagnosis_referral_units_not {
+	width: 272px;
+	margin: 0 auto;
+}
 </style>
 </style>

+ 3 - 3
src/pages/symanger/farmThing/stock.vue

@@ -265,7 +265,7 @@
          getFields(){
          getFields(){
             this.$axios({
             this.$axios({
                 method:"POST",
                 method:"POST",
-                url:"/api/api_gateway?method=ascend.ascend_manage.stock_info",
+                url:"/api/stock_info",
                 data:this.qs.stringify({page:this.page})
                 data:this.qs.stringify({page:this.page})
                 }).then((res)=>{
                 }).then((res)=>{
                     if (res.data.message=='') {
                     if (res.data.message=='') {
@@ -277,7 +277,7 @@
         getAllFieldsCascader(){
         getAllFieldsCascader(){
             this.$axios({
             this.$axios({
                method:"POST",
                method:"POST",
-               url:"/api/api_gateway?method=ascend.ascend_manage.all_base",
+               url:"/api/all_base",
             }).then((res)=>{
             }).then((res)=>{
                   if (res.data.message== "") {
                   if (res.data.message== "") {
                       this.FieldCascader=res.data.data.data;
                       this.FieldCascader=res.data.data.data;
@@ -311,7 +311,7 @@
                if (!valid) return 
                if (!valid) return 
                 this.$axios({
                 this.$axios({
                     method:'POST',
                     method:'POST',
-                    url:'/api/api_gateway?method=ascend.ascend_manage.out_stock',
+                    url:'/api/out_stock',
                     data:this.qs.stringify({
                     data:this.qs.stringify({
                         farm:this.addForm.pro_cascader[0],
                         farm:this.addForm.pro_cascader[0],
                         land:this.addForm.pro_cascader[1],
                         land:this.addForm.pro_cascader[1],

+ 3 - 3
src/pages/symanger/farmThing/stockIn.vue

@@ -198,7 +198,7 @@ export default {
 		getAllFieldsCascader() {
 		getAllFieldsCascader() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
 				if (res.data.message == '') {
 				if (res.data.message == '') {
 					this.FieldCascader = res.data.data.data  //所有地块
 					this.FieldCascader = res.data.data.data  //所有地块
@@ -208,7 +208,7 @@ export default {
 		getList() {
 		getList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.put_stock_info',
+				url: '/api/put_stock_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: 1
 					page: 1
 				})
 				})
@@ -233,7 +233,7 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.put_stock',
+					url: '/api/put_stock',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farm: this.addForm.pro_cascader[0],
 						farm: this.addForm.pro_cascader[0],
 						land: this.addForm.pro_cascader[1],
 						land: this.addForm.pro_cascader[1],

+ 2 - 2
src/pages/symanger/farmThing/stockOut.vue

@@ -253,7 +253,7 @@
         getList(){
         getList(){
             this.$axios({
             this.$axios({
                 method:'POST',
                 method:'POST',
-                url:'/api/api_gateway?method=ascend.ascend_manage.out_stock_info',
+                url:'/api/out_stock_info',
                 data:this.qs.stringify({
                 data:this.qs.stringify({
                     page:1
                     page:1
                 })
                 })
@@ -277,7 +277,7 @@
         //        if (!valid) return 
         //        if (!valid) return 
         //         this.$axios({
         //         this.$axios({
         //             method:'POST',
         //             method:'POST',
-        //             url:'/api_gateway?method=ascend.ascend_manage.out_stock',
+        //             url:'/out_stock',
         //             data:this.qs.stringify({
         //             data:this.qs.stringify({
         //                 farm:this.addForm.pro_cascader[0],
         //                 farm:this.addForm.pro_cascader[0],
         //                 land:this.addForm.pro_cascader[1],
         //                 land:this.addForm.pro_cascader[1],

+ 6 - 6
src/pages/symanger/farmThing/transport.vue

@@ -330,7 +330,7 @@ export default {
 			//获取所有基地
 			//获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
 				this.baseList = res.data.data.data
 				this.baseList = res.data.data.data
 			})
 			})
@@ -338,7 +338,7 @@ export default {
 		getList() {
 		getList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.trans_info',
+				url: '/api/trans_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: this.page,
 					page: this.page,
 					farmname: this.base
 					farmname: this.base
@@ -384,7 +384,7 @@ export default {
 		getSellList() {
 		getSellList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.sell_info',
+				url: '/api/sell_info',
 				data: this.qs.stringify({ page: this.page })
 				data: this.qs.stringify({ page: this.page })
 			}).then((res) => {
 			}).then((res) => {
 				if (res.data.message == '') {
 				if (res.data.message == '') {
@@ -410,7 +410,7 @@ export default {
 				let eaddr = this.locationForm.lng + ',' + this.locationForm.lat
 				let eaddr = this.locationForm.lng + ',' + this.locationForm.lat
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_trans_info',
+					url: '/api/add_trans_info',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						backcode: this.addForm.backcode,
 						backcode: this.addForm.backcode,
 						transname: this.addForm.name,
 						transname: this.addForm.name,
@@ -442,7 +442,7 @@ export default {
 				let eaddr = this.locationForm.lng + ',' + this.locationForm.lat
 				let eaddr = this.locationForm.lng + ',' + this.locationForm.lat
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_trans_info',
+					url: '/api/edit_trans_info',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.id,
 						id: this.id,
 						stime,
 						stime,
@@ -480,7 +480,7 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_trans_info',
+						url: '/api/del_trans_info',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							id: id
 							id: id
 						})
 						})

+ 90 - 72
src/pages/symanger/farmThing/watering.vue

@@ -33,51 +33,64 @@
 			</div>
 			</div>
 			<el-button type="primary" size="mini" @click="plantAdd">新增</el-button>
 			<el-button type="primary" size="mini" @click="plantAdd">新增</el-button>
 		</div>
 		</div>
-		<el-row :gutter="10">
-			<el-col
-				:xs="24"
-				:sm="24"
-				:md="12"
-				:lg="6"
-				:xl="6"
-				v-for="item in fieldsList"
-				:key="item.id"
-			>
-				<el-card class="box-card">
-					<img
-						class="tag"
-						v-if="item.is_pick == '1'"
-						src="@/assets/images/sy/farmThing/picked.png"
-					/>
-					<div class="img-box">
-						<img src="@/assets/images/sy/farmThing/watering.png" />
-					</div>
-					<div class="detail">
-						<p class="borderLine">操作基地 : {{ item.farm }}</p>
-						<p class="borderLine">操作地块 : {{ item.land }}</p>
-						<p class="borderLine">灌溉面积(亩) : {{ item.area }}</p>
-						<p class="borderLine">
-							灌溉日期 : {{ (item.uptime * 1000) | formatTime }}
-						</p>
-						<p class="borderLine">批次 : {{ item.batch }}</p>
-						<p class="borderLine">操作人 : {{ item.user }}</p>
-					</div>
-					<div class="btns">
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
-							@click="plantEdit(item)"
-							>编辑</a
-						>
-						<a
-							:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
-							@click="plantDelet(item.id)"
-							>删除</a
-						>
-					</div>
-				</el-card>
-			</el-col>
-		</el-row>
+		<template v-if="fieldsList.length">
+			<el-row :gutter="10">
+				<el-col
+					:xs="24"
+					:sm="24"
+					:md="12"
+					:lg="6"
+					:xl="6"
+					v-for="item in fieldsList"
+					:key="item.id"
+				>
+					<el-card class="box-card">
+						<img
+							class="tag"
+							v-if="item.is_pick == '1'"
+							src="@/assets/images/sy/farmThing/picked.png"
+						/>
+						<div class="img-box">
+							<img src="@/assets/images/sy/farmThing/watering.png" />
+						</div>
+						<div class="detail">
+							<p class="borderLine">操作基地 : {{ item.farm }}</p>
+							<p class="borderLine">操作地块 : {{ item.land }}</p>
+							<p class="borderLine">灌溉面积(亩) : {{ item.area }}</p>
+							<p class="borderLine">
+								灌溉日期 : {{ (item.uptime * 1000) | formatTime }}
+							</p>
+							<p class="borderLine">批次 : {{ item.batch }}</p>
+							<p class="borderLine">操作人 : {{ item.user }}</p>
+						</div>
+						<div class="btns">
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 1 ? true : false }"
+								@click="plantEdit(item)"
+								>编辑</a
+							>
+							<a
+								:class="{ bg: itemId == item.id && btnindex == 2 ? true : false }"
+								@click="plantDelet(item.id)"
+								>删除</a
+							>
+						</div>
+					</el-card>
+				</el-col>
+			</el-row>
+		</template>
+		<template v-else>
+			<!-- 暂无数据 -->
+			<div class="expertDiagnosis_referral_units_not">
+				<img
+					:src="zanwu"
+					alt
+					class="expertDiagnosis_referral_units_notImg"
+				/>
+			</div>
+		</template>	
 		<el-pagination
 		<el-pagination
+			v-if="fieldsList.length"
 			background
 			background
 			layout="prev, pager, next"
 			layout="prev, pager, next"
 			:total="totalNum"
 			:total="totalNum"
@@ -163,6 +176,7 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			zanwu: require('@/assets/images/expertDiagnosis/zanwu.png'),
 			itemId: '',
 			itemId: '',
 			btnindex: '',
 			btnindex: '',
 			base: '',
 			base: '',
@@ -209,44 +223,40 @@ export default {
 			//获取所有基地
 			//获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
-				this.baseList = res.data.data.data
+				this.baseList = res.data.data
 			})
 			})
 		},
 		},
 		getPlanted() {
 		getPlanted() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.already_plant'
+				url: '/api/already_plant'
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					let arr = res.data.data.data
-					this.planted = arr.filter((item) => {
-						if (item.children.length > 0) {
-							return item.children.some((item2) => {
-								return item2.is_pick != 1
-							})
-						} else {
-							return false
-						}
-					})
-				}
+				let arr = res.data.data
+				this.planted = arr.filter((item) => {
+					if (item.children.length > 0) {
+						return item.children.some((item2) => {
+							return item2.is_pick != 1
+						})
+					} else {
+						return false
+					}
+				})
 			})
 			})
 		},
 		},
 		getFields() {
 		getFields() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.irrigate_info',
+				url: '/api/irrigate_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					page: this.page,
 					page: this.page,
 					farmname: this.base,
 					farmname: this.base,
 					pickcode: this.pickcode
 					pickcode: this.pickcode
 				})
 				})
 			}).then((res) => {
 			}).then((res) => {
-				if (res.data.message == '') {
-					this.fieldsList = res.data.data.data
-					this.totalNum = res.data.data.counts
-				}
+				this.fieldsList = res.data.data
+				this.totalNum = res.data.counts
 			})
 			})
 		},
 		},
 		plantAdd() {
 		plantAdd() {
@@ -275,12 +285,12 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_irrigate',
+						url: '/api/del_irrigate',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							id: id
 							id: id
 						})
 						})
 					}).then((res) => {
 					}).then((res) => {
-						if (res.data.message == '') {
+						if (res.data == 1) {
 							this.$message({
 							this.$message({
 								type: 'success',
 								type: 'success',
 								message: '删除成功!'
 								message: '删除成功!'
@@ -309,7 +319,7 @@ export default {
 				let land = this.addForm.pro_cascader[1]
 				let land = this.addForm.pro_cascader[1]
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.add_irrigate',
+					url: '/api/add_irrigate',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						farm: this.addForm.pro_cascader[0],
 						farm: this.addForm.pro_cascader[0],
 						land: this.addForm.pro_cascader[1],
 						land: this.addForm.pro_cascader[1],
@@ -317,8 +327,11 @@ export default {
 						user: this.addForm.operator
 						user: this.addForm.operator
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
-						this.fieldsList = res.data.data.data
+					if (res.data == 1) {
+						this.$message({
+							type: 'success',
+							message: '增加成功!'
+						})
 						this.getFields()
 						this.getFields()
 					}
 					}
 					this.farmThingAddDialogVisible = false
 					this.farmThingAddDialogVisible = false
@@ -330,17 +343,17 @@ export default {
 				if (!valid) return
 				if (!valid) return
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=ascend.ascend_manage.edit_irrigate',
+					url: '/api/edit_irrigate',
 					data: this.qs.stringify({
 					data: this.qs.stringify({
 						id: this.itemId,
 						id: this.itemId,
 						area: this.editForm.area,
 						area: this.editForm.area,
 						user: this.editForm.operator
 						user: this.editForm.operator
 					})
 					})
 				}).then((res) => {
 				}).then((res) => {
-					if (res.data.message == '') {
+					if (res.data == 1) {
 						this.getFields()
 						this.getFields()
 					} else {
 					} else {
-						this.$message.warning(res.data.message)
+						this.$message.warning(res.data)
 					}
 					}
 				})
 				})
 				this.farmThingEditDialogVisible = false
 				this.farmThingEditDialogVisible = false
@@ -431,4 +444,9 @@ export default {
 	padding: 0 10px 20px 10px;
 	padding: 0 10px 20px 10px;
 	color: red;
 	color: red;
 }
 }
+// 暂无数据
+.expertDiagnosis_referral_units_not {
+	width: 272px;
+	margin: 0 auto;
+}
 </style>
 </style>

+ 4 - 4
src/pages/symanger/resultInfo/cqReports.vue

@@ -146,7 +146,7 @@ export default {
 		getInfo() {
 		getInfo() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.quality_info',
+				url: '/api/quality_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -165,7 +165,7 @@ export default {
 				.then(() => {
 				.then(() => {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.del_quality',
+						url: '/api/del_quality',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							id
 							id
 						})
 						})
@@ -196,7 +196,7 @@ export default {
 				this.cropperVisible = false
 				this.cropperVisible = false
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=base.bases.base_photo',
+					url: '/api/base_photo',
 					data: form
 					data: form
 				}).then((res) => {
 				}).then((res) => {
 					if (res.data.message == '') {
 					if (res.data.message == '') {
@@ -241,7 +241,7 @@ export default {
 				if (valid) {
 				if (valid) {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.quality_info',
+						url: '/api/quality_info',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							backcode: this.backcode,
 							backcode: this.backcode,
 							qualitydesc: this.addSyForm.reportTitle,
 							qualitydesc: this.addSyForm.reportTitle,

+ 3 - 3
src/pages/symanger/resultInfo/growRecord.vue

@@ -188,7 +188,7 @@ export default {
 		getInfo() {
 		getInfo() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.grow_info',
+				url: '/api/grow_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -217,7 +217,7 @@ export default {
 			let photo5 = this.addSyForm.img5 && this.addSyForm.img5
 			let photo5 = this.addSyForm.img5 && this.addSyForm.img5
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.grow_info',
+				url: '/api/grow_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode,
 					backcode: this.backcode,
 					// photo1,
 					// photo1,
@@ -295,7 +295,7 @@ export default {
 				this.cropperVisible = false
 				this.cropperVisible = false
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=base.bases.base_photo',
+					url: '/api/base_photo',
 					data: form
 					data: form
 				}).then((res) => {
 				}).then((res) => {
 					if (res.data.message == '') {
 					if (res.data.message == '') {

+ 3 - 3
src/pages/symanger/resultInfo/productInfo.vue

@@ -108,7 +108,7 @@ export default {
 		getInfo() {
 		getInfo() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.product_info',
+				url: '/api/product_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -143,7 +143,7 @@ export default {
 				this.cropperVisible = false
 				this.cropperVisible = false
 				this.$axios({
 				this.$axios({
 					method: 'POST',
 					method: 'POST',
-					url: '/api/api_gateway?method=base.bases.base_photo',
+					url: '/api/base_photo',
 					data: form
 					data: form
 				}).then((res) => {
 				}).then((res) => {
 					if (res.data.message == '') {
 					if (res.data.message == '') {
@@ -163,7 +163,7 @@ export default {
 				if (valid) {
 				if (valid) {
 					this.$axios({
 					this.$axios({
 						method: 'POST',
 						method: 'POST',
-						url: '/api/api_gateway?method=ascend.ascend_manage.product_info',
+						url: '/api/product_info',
 						data: this.qs.stringify({
 						data: this.qs.stringify({
 							backcode: this.backcode,
 							backcode: this.backcode,
 							productphoto: this.addSyForm.imgSrc, //去掉/api/,
 							productphoto: this.addSyForm.imgSrc, //去掉/api/,

+ 2 - 2
src/pages/symanger/resultInfo/resultInfoList.vue

@@ -164,7 +164,7 @@ export default {
 			//获取所有基地
 			//获取所有基地
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_base'
+				url: '/api/all_base'
 			}).then((res) => {
 			}).then((res) => {
 				this.baseList = res.data.data.data
 				this.baseList = res.data.data.data
 			})
 			})
@@ -172,7 +172,7 @@ export default {
 		getPickList() {
 		getPickList() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.pick_info',
+				url: '/api/pick_info',
 				data: this.qs.stringify({ page: this.page,farmname:this.base })
 				data: this.qs.stringify({ page: this.page,farmname:this.base })
 			}).then((res) => {
 			}).then((res) => {
 				if (res.data.message == '') {
 				if (res.data.message == '') {

+ 4 - 4
src/pages/symanger/resultInfo/tracebackDetail.vue

@@ -237,7 +237,7 @@ export default {
 		getInfo() {
 		getInfo() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.product_info',
+				url: '/api/product_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -264,7 +264,7 @@ export default {
 		growRecord() {
 		growRecord() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.grow_info',
+				url: '/api/grow_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -282,7 +282,7 @@ export default {
 		getGrowRecord() {
 		getGrowRecord() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_ascend',
+				url: '/api/all_ascend',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -305,7 +305,7 @@ export default {
 		report() {
 		report() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.quality_info',
+				url: '/api/quality_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})

+ 4 - 4
src/pages/symanger/resultInfo/tracebackDetailApp.vue

@@ -256,7 +256,7 @@ export default {
 		getInfo() {
 		getInfo() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.product_info',
+				url: '/api/product_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -297,7 +297,7 @@ export default {
 		report() {
 		report() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.quality_info',
+				url: '/api/quality_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -314,7 +314,7 @@ export default {
 		growRecord() {
 		growRecord() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.grow_info',
+				url: '/api/grow_info',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})
@@ -332,7 +332,7 @@ export default {
 		getGrowRecord() {
 		getGrowRecord() {
 			this.$axios({
 			this.$axios({
 				method: 'POST',
 				method: 'POST',
-				url: '/api/api_gateway?method=ascend.ascend_manage.all_ascend',
+				url: '/api/all_ascend',
 				data: this.qs.stringify({
 				data: this.qs.stringify({
 					backcode: this.backcode
 					backcode: this.backcode
 				})
 				})

+ 11 - 2
src/router/index.js

@@ -10,6 +10,7 @@ Router.prototype.push = function push(location) {
 
 
 const Login = () => import('@/components/Login')
 const Login = () => import('@/components/Login')
 const Index = () => import('@/components/Index')
 const Index = () => import('@/components/Index')
+const Home01 = () => import( /* webpackChunkName: "shouye" */ '@/components/home/Home01')
 
 
 
 
 //---------------------------------------溯源模块------------------------------农场管理----------------------
 //---------------------------------------溯源模块------------------------------农场管理----------------------
@@ -46,12 +47,20 @@ export default new Router({
       redirect: '/login'
       redirect: '/login'
     },
     },
     {
     {
+      path: '/login',
+      component: Login
+    },
+    {
       path: '/index',
       path: '/index',
       component: Index,
       component: Index,
       children: [{
       children: [{
           path: '',
           path: '',
-          redirect: (window.sessionStorage.getItem('activePath') || '/index/home')
-        }, 
+          redirect: '/index/home'
+        },
+        {
+          path: 'home',
+          component: Home01
+        },
         //-------------------溯源模块-----------农场管理----------
         //-------------------溯源模块-----------农场管理----------
         {
         {
           path: 'farmUserManger',
           path: 'farmUserManger',

文件差異過大導致無法顯示
+ 0 - 46
src/util/http.js


+ 1 - 1
src/vuex/store.js

@@ -38,7 +38,7 @@ const actions = {
         console.log(this);
         console.log(this);
         axios({
         axios({
             method:"POST",
             method:"POST",
-            url:"/api/api_gateway?method=ascend.ascend_manage.all_base",
+            url:"/api/all_base",
         }).then((res)=>{
         }).then((res)=>{
             if (res.data.message== "") {
             if (res.data.message== "") {
                 console.log(111);
                 console.log(111);