智慧农业后台管理页面
src/views/farmplant/processlist.vue
@@ -15,13 +15,13 @@
            @size-change="sizeChange"
            @refresh-change="refreshChange"
            @on-load="onLoad"
        ></avue-crud>
            @row-del="rowDel">
        </avue-crud>
    </basic-container>
</template>
<script>
import { getList } from "@/api/process/process"
import { getList,remove } from "@/api/process/process"
export default {
    data () {
        return {
@@ -36,15 +36,17 @@
                total: 0,
            },
            selectionList: [],
            align: "center",
            menu: true,
            option: {
                tip: false,
                searchShow: true,
                searchMenuSpan: 6,
                height: 520,
                editBtn: false,
                addBtn: false,
                delBtn: true,
                viewBtn: true,
                delBtnText:'删除',
                delBtnIcon:'el-icon-delete',
                editBtn:false,
                menuWidth: 200,
                menuAlign: "center",
                align: "center",
@@ -54,7 +56,7 @@
                selectionFixed: false,
                expandFixed: false,
                menuFixed: false,
                menu: false,
                menu: true,
                column: [
                    {
                        label: "品种",
@@ -86,7 +88,7 @@
                        prop: "processNum"
                    },
                    {
                        label: "销售时间",
                        label: "加工时间",
                        prop: "saleTime",
                    },
                ],
@@ -108,7 +110,6 @@
            this.loading = true
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                if (res.data.code == 200) {
                    console.log(res)
                    this.data = res.data.data.records
                    this.page.total = res.data.data.total
                    this.loading = false
@@ -125,6 +126,21 @@
            this.onLoad(this.page, params)
            done()
        },
        rowDel (row) {
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                    return remove(row.id)
                }).then((res) => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!"
                    })
                })
        },
    }
}
</script>