智慧农业后台管理页面
guoshilong
2022-09-09 04fa66265592427f4b6f612b4f739107bd662a39
溯源地块筛选为当前农场采收地块
3 files modified
27 ■■■■ changed files
src/api/land/land.js 10 ●●●●● patch | view | raw | blame | history
src/store/modules/user.js 2 ●●● patch | view | raw | blame | history
src/views/traceability/addTraceability.vue 15 ●●●● patch | view | raw | blame | history
src/api/land/land.js
@@ -76,6 +76,16 @@
  })
}
export const selectRecoveryLandList = (farmId) => {
  return request({
    url: '/api/land/land/selectRecoveryLandList',
    method: 'get',
    params: {
      farmId
    }
  })
}
export const selectCount = (farmId) => {
  return request({
    url: '/api/land/land/selectCount',
src/store/modules/user.js
@@ -52,7 +52,7 @@
    token: getStore({name: 'token'}) || '',
    refreshToken: getStore({name: 'refreshToken'}) || '',
    $farmId: 0,
    drawMapUrlBase: 'http://182.106.212.58:8013'
    drawMapUrlBase: 'https://dev.jxpskj.com:8013'
  },
  actions: {
    loginInfoByToken({commit}) {
src/views/traceability/addTraceability.vue
@@ -208,7 +208,7 @@
import { save } from "@/api/traceability/traceability";
import { getList } from "@/api/farmplant/recovery";
import { getStrainList } from "@/api/farmplant/strain";
import { getLandList } from "@/api/land/land";
import { getLandList,selectRecoveryLandList } from "@/api/land/land";
export default {
  data() {
    return {
@@ -295,11 +295,16 @@
        column: [
          {
            label: "采收品种",
            prop: "strainName",
          },
          {
            label: "采收品种",
            prop: "strainId",
            search: true,
            searchSpan: 4,
            span: 12,
            type: "tree",
            hide:true,
            dicData: [],
            props: {
              label: "strainName",
@@ -375,10 +380,15 @@
            ],
          },
          {
            label:"操作人",
            prop:"realName"
          },
          {
            label: "操作人",
            prop: "operator",
            type: "tree",
            dicData: [],
            hide:true,
            props: {
              label: "realName",
              value: "id",
@@ -592,7 +602,7 @@
      //     }
      // })
      //获取农地数据
      getLandList(this.$farmId).then((res)=>{
      selectRecoveryLandList(this.$farmId).then((res)=>{
          if(res.data.code==200){
              var landIdcolumn = that.findObject(that.option.column,"landId");
              that.landList = res.data.data;
@@ -664,6 +674,7 @@
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        console.log(res)
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;