智慧农业后台管理页面
Administrator
2022-05-31 757b6076319f5d8d1a1837fbedc398afe95e2de8
src/views/farm/farmingrecord.vue
@@ -47,6 +47,9 @@
import { selectStockFa } from "@/api/stockfactory/stockfactory";
import { mapGetters } from "vuex";
export default {
  props:[
    "type","activeName"
  ],
  data() {
    return {
      visible: true,
@@ -73,12 +76,19 @@
        selection: true,
        searchShow: true,
        searchMenuSpan: 6,
        indexFixed: false,
        selectionFixed: false,
        expandFixed: false,
        menuFixed: false,
        column: [
          {
            label: "农事类型",
            prop: "type",
            type: "select",
            search: true,
            searchSpan: 4,
            labelWidth: 110,
            searchValue:this.getType(),
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=farmingType",
            props: {
              label: "dictValue",
@@ -121,8 +131,6 @@
          {
            label: "农资",
            prop: "stockId",
            searchSpan: 4,
            search: true,
            type: "tree",
            // hide:true,
            dicData: [],
@@ -143,8 +151,6 @@
          {
            label: "作业方式",
            prop: "jobWay",
            search: true,
            searchSpan: 4,
            labelWidth: 110,
            type: "select",
            dicData: [
@@ -183,8 +189,6 @@
          {
            label: "操作人",
            prop: "operator",
            searchSpan: 4,
            search: true,
            type: "tree",
            hide: true,
            dicData: [],
@@ -253,6 +257,16 @@
      },
      immediate: true,
    },
    activeName:{
      handler(val) {
        console.log(val,99999999);
        if(this.activeName =="tab2"){
          this.option.height = 520;
        }
      },
      deep: true,
      immediate: true,
    }
  },
  created() {
    this.initData();
@@ -275,8 +289,12 @@
      return ids.join(",");
    },
  },
  mounted() {},
  mounted() {
  },
  methods: {
    getType(){
      return this.type;
    },
    //初始化数据
    initData() {
      var that = this;