linwei
2024-01-08 265dd1f66e3c030bbfae1ce37d96bd5b5a42e697
src/views/community/index.vue
@@ -32,13 +32,16 @@
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 210,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -47,14 +50,13 @@
                dialogClickModal: false,
                column: [
                    {
                        width: 156,
                        overHidden: true,
                        label: "社区名称",
                        prop: "name",
                        searchSpan: 5,
                        searchSpan: 4,
                        search: true,
                        span: 12,
                        labelWidth: 120,
                        width: 220,
                        overHidden: true,
                        rules: [
                            {
                                required: true,
@@ -64,14 +66,13 @@
                        ],
                    },
                    {
                        width: 110,
                        overHidden: true,
                        label: "社区编号",
                        prop: "code",
                        searchSpan: 5,
                        searchSpan: 4,
                        search: true,
                        span: 12,
                        labelWidth: 120,
                        width: 220,
                        overHidden: true,
                        rules: [
                            {
                                required: true,
@@ -80,13 +81,24 @@
                            },
                        ],
                    },
                    {
                        width: 110,
                        label: "所属街道",
                        parent: false,
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "townName",
                        search: true,
                        searchSpan: 4
                    },
                    {
                        label: "所属街道",
                        hide: true,
                        parent: false,
                        prop: "streetCode",
                        search: true,
                        searchSpan: 4,
                        width: 150,
                        labelWidth: 120,
                        type: "tree",
                        dicUrl: "/api/blade-system/region/getTownTree",
                        props: {
@@ -101,10 +113,11 @@
                            },
                        ],
                    },
                    {
                        width: 110,
                        label: "社区民警",
                        prop: "resPoliceUserId",
                        labelWidth: 120,
                        type: "tree",
                        dicUrl: "/api/blade-system/user/getUserListByParam?roleName=民警",
                        props: {
@@ -114,16 +127,15 @@
                        rules: [
                            {
                                required: true,
                                message: "请选择所属街道",
                                message: "请选择社区民警",
                                trigger: "blur",
                            },
                        ],
                    },
                    {
                        width: 110,
                        label: "社区图片",
                        prop: "picUrl",
                        width: 80,
                        labelWidth: 120,
                        type: "upload",
                        listType: "picture-img",
                        action: "/api/blade-resource/oss/endpoint/put-file",
@@ -135,10 +147,10 @@
                    },
                    {
                        overHidden: true,
                        label: "地址",
                        prop: "address",
                        span: 24,
                        labelWidth: 120,
                        rules: [
                            {
                                required: false,
@@ -150,7 +162,6 @@
                    {
                        label: "社区简介",
                        prop: "remark",
                        labelWidth: 120,
                        component: "AvueUeditor",
                        options: {
                            action: "/api/blade-resource/oss/endpoint/put-file",
@@ -163,7 +174,7 @@
                        minRows: 6,
                        span: 24,
                    },
                ],
            },
            data: [],
@@ -324,21 +335,9 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const { dateTime } = this.query
            let values = {
                ...params,
            }
            if (dateTime) {
                values = {
                    ...params,
                    startTime: dateTime[0],
                    endTime: dateTime[1],
                    ...this.query,
                }
                values.dateTime = null
            }
            this.loading = true
            getList(page.currentPage, page.pageSize, values).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.data = data.records