智慧农业后台管理页面
guoshilong
2022-08-09 311325c98fbe3ccfdbc85d64e007e7b5b638bbc0
src/views/land/cs.vue
@@ -15,7 +15,7 @@
                        <el-option label="果园" value="2"></el-option>
                        <el-option label="鱼塘" value="3"></el-option>
                        <el-option label="山地" value="4"></el-option>
                        <el-option label="养殖区" value="4"></el-option>
                        <el-option label="养殖区" value="5"></el-option>
                    </el-select>
                </div>
                <!--        <div style="float: left; margin-left: 15px">-->
@@ -39,6 +39,18 @@
                        clearable
                    ></el-input>
                </div>
                        <div class="el-page">
                            <el-pagination
                                @size-change="handleSizeChange"
                                @current-change="handleCurrentChange"
                                :current-page="page.currentPage"
                                :hide-on-single-page="value"
                                :page-size="page.pageSize"
                                background
                                layout="total, prev, pager, next"
                                :total="page.total"
                            ></el-pagination>
                        </div>
            </div>
            <div>
                <el-button size="small">
@@ -70,7 +82,7 @@
                </div>
            </div>
        </div>
        <div class="el-page">
        <!-- <div class="el-page">
            <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
@@ -81,7 +93,7 @@
                layout="total, prev, pager, next"
                :total="page.total"
            ></el-pagination>
        </div>
        </div> -->
        <landAdd v-if="landVisible" ref="land" @refreshOnLoad="onLoad"></landAdd>
    </div>
</template>
@@ -103,12 +115,12 @@
                keyword: "",
            },
            query: {},
            value: false,
            value: true,
            farmingCount: 0,
            landVisible: false,
            farmPlanList: [],
            page: {
                pageSize: 4,
                pageSize: 8,
                currentPage: 1,
                total: 0,
            },
@@ -129,7 +141,7 @@
        ...mapGetters(["userInfo"]),
    },
    created () {
        this.onLoad()
        this.onLoad(this.page)
    },
    methods: {
        //圈地
@@ -143,6 +155,7 @@
        stypeChange (value) {
            this.query["landType"] = value
            this.onLoad(this.page, this.query)
            this.page.currentPage = 1
        },
        //库存 select 改变事件
        stateChange (value) {
@@ -165,14 +178,22 @@
            this.onLoad(this.page)
        },
        landInfo (item) {
          var arr = [];
          this.$store.state.tags.tagList.forEach((item) => {
            if (item.label != "地块详情") {
              arr.push(item);
            }
          });
          this.$store.state.tags.tagList = arr;
            this.$router.push({
                path: `/LandDetail`,
                query: item,
            })
        },
        onLoad (page, params = {}) {
            getList(1, 10, Object.assign(params, this.query)).then(res => {
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                const data = res.data.data
                this.page.total = data.total
                this.farmPlanList = data.records
            })
        },
@@ -227,13 +248,15 @@
        .land-img {
            width: 100%;
            height: 280px;
            // height: 280px;
            height: 240px;
            margin: 0 auto;
            text-align: center;
            .landimg {
                width: 100%;
                height: 280px;
                // height: 280px;
                height: 240px;
                //border-radius: 100px;
                //margin-top: 25px;
                //margin-left: -25px;