智慧农业后台管理页面
Administrator
2022-06-14 735027d05301cc3f1852942eb81503318a25d524
采收,统计,首页,农产品及库存,农事操作等习惯
19 files modified
108 ■■■■■ changed files
src/api/farm/farmingrecord.js 12 ●●●●● patch | view | raw | blame | history
src/api/land/land.js 8 ●●●●● patch | view | raw | blame | history
src/api/stock/stock.js 34 ●●●● patch | view | raw | blame | history
src/views/farm/farmingrecord.vue 4 ●●● patch | view | raw | blame | history
src/views/farmplant/farmplant.vue 5 ●●●●● patch | view | raw | blame | history
src/views/farmplant/farmproductstock.vue 2 ●●●●● patch | view | raw | blame | history
src/views/farmplant/strain.vue 4 ●●●● patch | view | raw | blame | history
src/views/recovery/recovery.vue 2 ●●● patch | view | raw | blame | history
src/views/statistics/farmplantarea.vue 2 ●●●●● patch | view | raw | blame | history
src/views/statistics/farmproductstockstatistics.vue 2 ●●●●● patch | view | raw | blame | history
src/views/traceability/addTraceability.vue 5 ●●●● patch | view | raw | blame | history
src/views/traceability/recovery.vue 4 ●●● patch | view | raw | blame | history
src/views/traceability/traceability.vue 2 ●●●●● patch | view | raw | blame | history
src/views/wel/farming.vue 4 ●●● patch | view | raw | blame | history
src/views/wel/index.vue 10 ●●●●● patch | view | raw | blame | history
src/views/wel/land.vue 2 ●●●●● patch | view | raw | blame | history
src/views/wel/plant.vue 2 ●●●●● patch | view | raw | blame | history
src/views/wel/recovery.vue 2 ●●●●● patch | view | raw | blame | history
src/views/wel/stock.vue 2 ●●●●● patch | view | raw | blame | history
src/api/farm/farmingrecord.js
@@ -48,18 +48,22 @@
}
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
        }
    })
}
src/api/land/land.js
@@ -58,10 +58,12 @@
    })
}
export const selectCount = () => {
export const selectCount = (deptId) => {
    return request({
        url: '/api/land/land/selectCount',
        method: 'get',
        params: {}
        params: {
            deptId
        }
    })
}
}
src/api/stock/stock.js
@@ -48,20 +48,22 @@
    })
}
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
        }
    })
}
src/views/farm/farmingrecord.vue
@@ -286,7 +286,7 @@
    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;
@@ -423,6 +423,8 @@
      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,
src/views/farmplant/farmplant.vue
@@ -538,13 +538,12 @@
      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;
@@ -671,6 +670,8 @@
      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,
src/views/farmplant/farmproductstock.vue
@@ -127,6 +127,8 @@
      this.onLoad(this.page);
    },
    onLoad(page, params = {}) {
      params['tenantId'] = this.userInfo.tenant_id;
      params['deptId'] = this.userInfo.dept_id;
      getList(
        page.currentPage,
        page.pageSize,
src/views/farmplant/strain.vue
@@ -172,6 +172,8 @@
    //新增
    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);
@@ -279,6 +281,8 @@
      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,
src/views/recovery/recovery.vue
@@ -291,7 +291,7 @@
    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;
src/views/statistics/farmplantarea.vue
@@ -253,6 +253,8 @@
    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,
      };
src/views/statistics/farmproductstockstatistics.vue
@@ -335,6 +335,8 @@
      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 = {
src/views/traceability/addTraceability.vue
@@ -427,7 +427,8 @@
      } 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 =
@@ -482,6 +483,8 @@
        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(
        () => {
src/views/traceability/recovery.vue
@@ -229,7 +229,7 @@
        data['recoveryId'] = this.selectionList[0].id;
        data['bind'] = '0';
      }
      //新增
      //修改
      update(data).then(
        () => {
          that.$emit("refreshOnLoad");
@@ -272,6 +272,8 @@
      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,
src/views/traceability/traceability.vue
@@ -349,6 +349,8 @@
      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,
src/views/wel/farming.vue
@@ -252,7 +252,7 @@
      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;
@@ -280,6 +280,8 @@
    // 表单提交
    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();
src/views/wel/index.vue
@@ -224,7 +224,7 @@
    //本年农事操作记录
    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) {
@@ -235,13 +235,13 @@
    //本年农事操作记录,分组统计
    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)
      });
@@ -249,7 +249,7 @@
    //地块使用率统计
    getCountStatis() {
      var that = this;
      selectCount().then((res) => {
      selectCount(this.userInfo.dept_id).then((res) => {
        var data = res.data.data;
        that.landInfo = data;
      });
@@ -262,6 +262,8 @@
      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;
src/views/wel/land.vue
@@ -122,6 +122,8 @@
        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;
src/views/wel/plant.vue
@@ -303,6 +303,8 @@
      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")
src/views/wel/recovery.vue
@@ -301,6 +301,8 @@
    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();
src/views/wel/stock.vue
@@ -193,6 +193,8 @@
    // 表单提交
    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();