| | |
| | | } |
| | | |
| | | |
| | | export const getFarmingCount = () => { |
| | | export const getFarmingCount = (deptId) => { |
| | | return request({ |
| | | url: '/api/farmingRecord/getFarmingCount', |
| | | method: 'get', |
| | | params: {} |
| | | params: { |
| | | deptId |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getFarmingStatis = () => { |
| | | export const getFarmingStatis = (deptId) => { |
| | | return request({ |
| | | url: '/api/farmingRecord/getFarmingStatis', |
| | | method: 'get', |
| | | params: {} |
| | | params: { |
| | | deptId |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export const selectCount = () => { |
| | | export const selectCount = (deptId) => { |
| | | return request({ |
| | | url: '/api/land/land/selectCount', |
| | | method: 'get', |
| | | params: {} |
| | | params: { |
| | | deptId |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | export const pagenum = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/stock/stock/pagenum', |
| | | method: 'post', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/stock/stock/pagenum', |
| | | method: 'post', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | export const StockCount = (row) => { |
| | | return request({ |
| | | url: '/api/stock/stock/StockCount', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | export const StockCount = (deptId) => { |
| | | return request({ |
| | | url: '/api/stock/stock/StockCount', |
| | | method: 'get', |
| | | params: { |
| | | deptId |
| | | } |
| | | }) |
| | | } |
| | |
| | | initData() { |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.user_id).then((res) => { |
| | | getLandList(this.userInfo.dept_id).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = that.findObject(that.option.column, "landId"); |
| | | that.landList = res.data.data; |
| | |
| | | this.loading = true; |
| | | var datas = this.$route.query.id; |
| | | params.landId=datas; |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | //初始化数据 |
| | | initData(){ |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.user_id).then((res)=>{ |
| | | getLandList(this.userInfo.dept_id).then((res)=>{ |
| | | if(res.data.code==200){ |
| | | var landIdcolumn = that.findObject(that.option.column,"landId"); |
| | | that.landList = res.data.data; |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | this.loading = true; |
| | | getList( |
| | | page.currentPage, |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | //新增 |
| | | rowSave(row, done, loading) { |
| | | row['strainType'] =0; |
| | | row['tenantId'] = this.userInfo.tenant_id; |
| | | row['deptId'] = this.userInfo.dept_id; |
| | | save(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | this.loading = true; |
| | | getList( |
| | | page.currentPage, |
| | |
| | | initData(){ |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.user_id).then((res)=>{ |
| | | getLandList(this.userInfo.dept_id).then((res)=>{ |
| | | if(res.data.code==200){ |
| | | var landIdcolumn = that.findObject(that.option.column,"landId"); |
| | | that.landList = res.data.data; |
| | |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | const { releaseTimeRange } = this.query; |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | let values = { |
| | | ...params, |
| | | }; |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | this.loading = true; |
| | | const { releaseTimeRange } = this.query; |
| | | let values = { |
| | |
| | | } else { |
| | | this.formLabelAlign["bind"] = "1"; |
| | | } |
| | | |
| | | that.formLabelAlign['tenantId'] = this.userInfo.tenant_id; |
| | | that.formLabelAlign['deptId'] = this.userInfo.dept_id; |
| | | this.$refs["formLabelAlign"].validate((valid) => { |
| | | if (valid) { |
| | | that.formLabelAlign.createTime = |
| | |
| | | that.formLabelAlign['recoveryId'] = this.selectionList[0].id; |
| | | that.formLabelAlign['bind'] = '0'; |
| | | } |
| | | that.formLabelAlign['tenantId'] = this.userInfo.tenant_id; |
| | | that.formLabelAlign['deptId'] = this.userInfo.dept_id; |
| | | //新增 |
| | | save(that.formLabelAlign).then( |
| | | () => { |
| | |
| | | data['recoveryId'] = this.selectionList[0].id; |
| | | data['bind'] = '0'; |
| | | } |
| | | //新增 |
| | | //修改 |
| | | update(data).then( |
| | | () => { |
| | | that.$emit("refreshOnLoad"); |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | this.loading = true; |
| | | getList( |
| | | page.currentPage, |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | this.loading = true; |
| | | getList( |
| | | page.currentPage, |
| | |
| | | this.visible = true; |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.user_id).then((res) => { |
| | | getLandList(this.userInfo.dept_id).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = that.findObject(that.option.column, "landId"); |
| | | that.landList = res.data.data; |
| | |
| | | // 表单提交 |
| | | submit(row,done) { |
| | | var that = this; |
| | | row['tenantId'] = this.userInfo.tenant_id; |
| | | row['deptId'] = this.userInfo.dept_id; |
| | | save(row).then( |
| | | () => { |
| | | that.$refs.form.resetFields(); |
| | |
| | | //本年农事操作记录 |
| | | getFarmingCount() { |
| | | var that = this; |
| | | getFarmingCount().then((res) => { |
| | | getFarmingCount(this.userInfo.dept_id).then((res) => { |
| | | that.total = res.data.data; |
| | | // that.total = 0; |
| | | if (that.total > 0) { |
| | |
| | | //本年农事操作记录,分组统计 |
| | | getFarmingStatis() { |
| | | var that = this; |
| | | getFarmingStatis().then((res) => { |
| | | getFarmingStatis(this.userInfo.dept_id).then((res) => { |
| | | that.farmingList = res.data.data; |
| | | }); |
| | | }, |
| | | StockCount() { |
| | | var that = this; |
| | | StockCount().then((res) => { |
| | | StockCount(this.userInfo.dept_id).then((res) => { |
| | | that.stockList= res.data.data; |
| | | console.log(that.stockList) |
| | | }); |
| | |
| | | //地块使用率统计 |
| | | getCountStatis() { |
| | | var that = this; |
| | | selectCount().then((res) => { |
| | | selectCount(this.userInfo.dept_id).then((res) => { |
| | | var data = res.data.data; |
| | | that.landInfo = data; |
| | | }); |
| | |
| | | var params = { |
| | | status: 1, |
| | | }; |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | getList(1, 10, Object.assign(params)).then((res) => { |
| | | const data = res.data.data; |
| | | this.farmPlanList = data.records; |
| | |
| | | row.userId = this.userInfo.user_id; |
| | | row.landRange = usePolygons; |
| | | } |
| | | row['tenantId'] = this.userInfo.tenant_id; |
| | | row['deptId'] = this.userInfo.dept_id; |
| | | add(row).then(() => { |
| | | that.$refs.form.resetFields(); |
| | | that.visible = false; |
| | |
| | | var that = this; |
| | | row['farmType'] = 0; |
| | | row['createUser'] = this.userInfo.user_id; |
| | | row['tenantId'] = this.userInfo.tenant_id; |
| | | row['deptId'] = this.userInfo.dept_id; |
| | | save(row).then( |
| | | () => { |
| | | that.$emit("refreshOnLoad") |
| | |
| | | submit(row,done) { |
| | | var that = this; |
| | | row.time = row.time + ":00"; |
| | | row['tenantId'] = this.userInfo.tenant_id; |
| | | row['deptId'] = this.userInfo.dept_id; |
| | | save(row).then( |
| | | () => { |
| | | this.$refs.form.resetFields(); |
| | |
| | | // 表单提交 |
| | | submit(row,done) { |
| | | var that = this; |
| | | row['tenantId'] = this.userInfo.tenant_id; |
| | | row['deptId'] = this.userInfo.dept_id; |
| | | add(row).then( |
| | | () => { |
| | | that.$refs.form.resetFields(); |