src/views/place/index.vue
@@ -22,6 +22,16 @@
                }}</el-tag>
            </template>
            <template slot-scope="{row}" slot="confirmFlag">
                <el-tag size="small" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text
                }}</el-tag>
            </template>
            <template slot-scope="{row}" slot="source">
                <el-tag size="small" :type="showSource(row.source).type">{{ showSource(row.source).text
                }}</el-tag>
            </template>
            <template slot="menuLeft">
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
                </el-button>
@@ -98,13 +108,16 @@
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -113,16 +126,15 @@
                selection: true,
                dialogClickModal: false,
                menuFixed: 'right',
                labelWidth: 120,
                column: [
                    {
                        width: 160,
                        span: 12,
                        width: 156,
                        overHidden: true,
                        label: "场所名称",
                        span: 12,
                        prop: "placeName",
                        searchSpan: 5,
                        search: true,
                        overHidden: true,
                        rules: [{
                            required: true,
                            message: "请输入场所名称",
@@ -166,11 +178,11 @@
                    },
                    {
                        width: 96,
                        searchLabelWidth: 120,
                        width: 110,
                        label: "场所负责人",
                        prop: "principal",
                        searchSpan: 5,
                        searchLabelWidth: 110,
                        search: true,
                        rules: [{
                            required: false,
@@ -180,13 +192,13 @@
                    },
                    {
                        width: 96,
                        width: 120,
                        overHidden: true,
                        label: "手机号码",
                        prop: "principalPhone",
                        search: true,
                        searchSpan: 4,
                        slot: true,
                        overHidden: true,
                        rules: [
                            {
                                validator: validatorPhone,
@@ -283,9 +295,9 @@
                        ],
                    },
                    {
                        width: 110,
                        label: "场所照片",
                        prop: "imageUrls",
                        width: 80,
                        type: "upload",
                        listType: "picture-card",
                        dataType: "string",
@@ -300,7 +312,7 @@
                    },
                    {
                        width: 160,
                        width: 156,
                        overHidden: true,
                        slot: true,
                        label: "位置",
@@ -339,6 +351,7 @@
                    },
                    {
                        width: 100,
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
@@ -346,16 +359,18 @@
                        prop: 'confirmFlag',
                        type: 'radio',
                        slot: true,
                        dicData: [{
                            label: '待审核',
                            value: 1
                        }, {
                            label: '已审核',
                            value: 2
                        }, {
                            label: '未通过',
                            value: 3
                        }]
                        dicData: [
                            {
                                label: '待审核',
                                value: 1
                            }, {
                                label: '已审核',
                                value: 2
                            }, {
                                label: '未通过',
                                value: 3
                            }
                        ]
                    },
                    {
                        width: 120,
@@ -366,13 +381,16 @@
                        type: "select",
                        search: true,
                        searchSpan: 5,
                        dicData: [{
                            label: '是',
                            value: 1
                        }, {
                            label: '否',
                            value: 2
                        }]
                        slot: true,
                        dicData: [
                            {
                                label: '是',
                                value: 1
                            }, {
                                label: '否',
                                value: 2
                            }
                        ]
                    }
                ],
            },
@@ -434,6 +452,29 @@
                } else if (data == 4) {
                    tags = {
                        text: '待完善',
                        type: 'info'
                    }
                }
                return tags
            }
        },
        showSource () {
            return (data) => {
                let tags = {
                    text: '',
                    type: ''
                }
                if (data == 1) {
                    tags = {
                        text: '是',
                        type: 'success'
                    }
                } else if (data == 2) {
                    tags = {
                        text: '否',
                        type: 'info'
                    }
                }
@@ -670,23 +711,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