From 335f9ce8a5efb5be1c8d7c422d2beee6fd77cd97 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 08 Jul 2022 10:13:42 +0800
Subject: [PATCH] 多农场修改

---
 src/views/farm/farmingrecord.vue |   53 ++++++++++++++++++++++++++++++++---------------------
 1 files changed, 32 insertions(+), 21 deletions(-)

diff --git a/src/views/farm/farmingrecord.vue b/src/views/farm/farmingrecord.vue
index 01a71ed..cfc22eb 100644
--- a/src/views/farm/farmingrecord.vue
+++ b/src/views/farm/farmingrecord.vue
@@ -63,7 +63,7 @@
       landList: [],
       option: {
         tip: false,
-        height: "auto",
+        height: 520,
         editBtn: true,
         delBtn: true,
         viewBtn: true,
@@ -73,12 +73,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 +128,6 @@
           {
             label: "农资",
             prop: "stockId",
-            searchSpan: 4,
-            search: true,
             type: "tree",
             // hide:true,
             dicData: [],
@@ -143,8 +148,6 @@
           {
             label: "作业方式",
             prop: "jobWay",
-            search: true,
-            searchSpan: 4,
             labelWidth: 110,
             type: "select",
             dicData: [
@@ -183,8 +186,6 @@
           {
             label: "操作人",
             prop: "operator",
-            searchSpan: 4,
-            search: true,
             type: "tree",
             hide: true,
             dicData: [],
@@ -203,21 +204,23 @@
           },
           {
             label: "农事照片",
+            prop: "tp",
             type: "upload",
-            listType: "picture-img",
-            propsHttp: {
-              res: "data",
-              url: "url",
-            },
+            labelWidth: 110,
+            dataType: "string",
+            span: 24,
+            limit: 5,
+            listType: "picture-card",
+            tip: "建议上传手机横屏拍摄的照片,宽高比16:9,最多上传5张",
             canvasOption: {
-              text: " ",
+              text: "",
               ratio: 1.0,
             },
-            action: "/api/blade-resource/oss/endpoint/put-files",
-            tip: "",
-            span: 24,
-            labelWidth: 110,
-            prop: "tp",
+            propsHttp: {
+              res: "data",
+              url: "url"
+            },
+            action: "/api/blade-resource/oss/endpoint/put-files"
           },
           {
             label: "备注",
@@ -250,7 +253,7 @@
         }
       },
       immediate: true,
-    },
+    }
   },
   created() {
     this.initData();
@@ -273,13 +276,17 @@
       return ids.join(",");
     },
   },
-  mounted() {},
+  mounted() {
+  },
   methods: {
+    getType(){
+      return this.type;
+    },
     //初始化数据
     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;
@@ -414,6 +421,10 @@
     },
     onLoad(page, params = {}) {
       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,

--
Gitblit v1.9.3