guanqb
2024-02-22 e56341cbcd86ce30e871990dd7b75f62e5d4d427
src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -14,15 +14,20 @@
                <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
                </el-button>
            </template>
            <template slot-scope="{row, size}" slot="status">
                <el-tag :size="size" :type="showConfirmFlag(row.status).type">{{ showConfirmFlag(row.status).text
                }}</el-tag>
            </template>
            <template slot-scope="{type,size,row }" slot="menu">
                <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
                    详情
                </el-button>
                <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="goAudit(row)"
                    v-show="row.status == 1">审核</el-button>
                <el-button icon="el-icon-s-check" :size="size" :type="type" @click.stop="goAudit(row)"
                    :disabled="row.status != 1">审核</el-button>
            </template>
        </avue-crud>
        <el-drawer title="整改情况详情" :visible.sync="isDetail" :append-to-body="true" size="46%" direction="rtl">
        <el-drawer title="整改情况详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
            <div class="title">
                <div class="icon">{{ refreshNum }}</div>
                基础信息
@@ -118,21 +123,7 @@
        <!-- 审核弹窗 -->
        <el-dialog :visible.sync="visible" append-to-body destroy-on-close title="审核" width="30%"
            custom-class="flow-design-dialog" :before-close="handleClose">
            <el-form ref="auditForm" :model="auditForm" :rules="auditRules">
                <el-form-item label="审核结论:" prop="status">
                    <el-radio-group v-model="auditForm.status">
                        <el-radio :label="2">通过</el-radio>
                        <el-radio :label="3">不通过</el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="不通过原因:" prop="reasonFailure" v-if="auditForm.status == 3">
                    <el-input type="textarea" v-model="auditForm.reasonFailure"></el-input>
                </el-form-item>
            </el-form>
            <div style="display:flex;justify-content:center">
                <el-button @click="submitAudit" size="small" type="primary">保 存</el-button>
                <el-button @click="cancelAudit" size="small">取 消</el-button>
            </div>
            <audit-base @handleSubmit="submitAudit"></audit-base>
        </el-dialog>
    </basic-container>
</template>
@@ -168,7 +159,6 @@
                status: [{ required: true, message: "必填" }],
                reasonFailure: [{ required: true, message: "必填" }],
            },
            auditForm: {},
            visible: false,
            typeStatus: 1,
            isDetail: false,
@@ -192,11 +182,15 @@
                searchShow: true,
                searchMenuSpan: 3,
                menu: true,
                menuWidth: 120,
                border: true,
                index: true,
                editBtn: false,
                delBtn: false,
                addBtn: false,
                refreshBtn: false,
                searchShowBtn: false,
                columnBtn: false,
                dialogClickModal: false,
                column: [{
                    label: "场所名称",
@@ -206,7 +200,7 @@
                    searchSpan: 4,
                    searchLabelWidth: 76,
                }, {
                    label: "地址名称",
                    label: "场所地址",
                    prop: "addressName",
                    align: 'center',
                    search: true,
@@ -283,6 +277,31 @@
                    searchSpan: 4,
                    searchLabelWidth: 106,
                }, {
                    label: "审核状态",
                    prop: "status",
                    align: 'center',
                    dicData: [
                        {
                            label: "待审核",
                            value: 1,
                        },
                        {
                            label: "审核通过",
                            value: 2,
                        },
                        {
                            label: "审核不通过",
                            value: 3,
                        },
                        {
                            label: "待上报",
                            value: 4,
                        }
                    ],
                    search: false,
                    searchSpan: 4,
                    searchLabelWidth: 106,
                }, {
                    label: "检查时间",
                    prop: "dateRange",
                    type: "daterange",
@@ -324,6 +343,37 @@
            return ids.join(",")
        },
        showConfirmFlag () {
            return (data) => {
                let tags = {
                    text: '',
                    type: ''
                }
                if (data == 1) {
                    tags = {
                        text: '待审核',
                        type: 'warning'
                    }
                } else if (data == 2) {
                    tags = {
                        text: '审核通过',
                        type: 'success'
                    }
                } else if (data == 3) {
                    tags = {
                        text: '审核不通过',
                        type: 'danger'
                    }
                } else if (data == 4) {
                    tags = {
                        text: '待上报',
                        type: 'info'
                    }
                }
                return tags
            }
        }
    },
    created () {
@@ -339,23 +389,20 @@
        // 取消审核
        cancelAudit () {
            this.visible = false
            this.auditForm = {}
            this.$refs.auditForm.resetFields()
        },
        // 确认提交审核
        submitAudit () {
            this.$refs.auditForm.validate((valid) => {
                if (valid) {
                    applyRectification(Object.assign(this.auditParams, this.auditForm)).then(res => {
                        if (res.data.code == 200) {
                            this.$message.warning("审核成功")
                            this.onLoad(this.page)
                            this.cancelAudit()
                        }
                    })
                } else {
                    return false
        submitAudit (form) {
            let auditForm = {
                status: form.status == '1' ? '2' : '3',
                reasonFailure: form.confirmNotion,
            }
            applyRectification(Object.assign(this.auditParams, auditForm)).then(res => {
                if (res.data.code == 200) {
                    this.$message.warning("审核成功")
                    this.onLoad(this.page)
                    this.cancelAudit()
                }
            })
        },
@@ -574,7 +621,7 @@
            }
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            this.onLoad(this.page)
            done()
        },
@@ -634,10 +681,18 @@
        onLoad (page, params = {}) {
            this.loading = true
            if (this.typeStatus == 3) {
            if (this.typeStatus == 1) {
                this.query.status = '1'
            } else if (this.typeStatus == 2) {
                this.query.status = '2'
            } else if (this.typeStatus == 3) {
                this.query.status = ''
            } else {
                this.query.status = this.typeStatus
            }
            if ('startTime' in this.query) {
                this.query.startTime += ' 00:00:00'
            }
            if ('endTime' in this.query) {
                this.query.endTime += ' 23:59:59'
            }
            getZGQKList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                console.log('getZGQKList', res.data.data)
@@ -714,6 +769,10 @@
    background-color: #409EFF;
}
:deep(.el-radio) {
    margin-right: 20px;
}
.title {
    margin: 10px;
    height: 40px;
@@ -732,6 +791,7 @@
.basic-info {
    padding: 0 20px;
    font-size: 14px;
    .info-item {
        display: flex;
@@ -752,6 +812,7 @@
.question-list {
    padding: 0 20px;
    font-size: 14px;
    .question-type {
        height: 60px;
@@ -781,6 +842,7 @@
            .key {
                width: 80%;
                padding-right: 20px;
                word-break: break-all;
            }