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>
                基础信息
@@ -104,25 +109,21 @@
                    </div>
                </div>
            </div>
            <div class="question-list" v-show="rowDetail.isShowRemarkTitle">
                <div class="question-type" @click="flodRM()">
                    <div class="type-name">
                        {{ CNNum[rowDetail.remarkNo] }}、其他隐患问题
                    </div>
                    <div class="icon-box"><i class="el-icon-arrow-down" v-show="rowDetail.isShowRemark"></i><i
                            class="el-icon-arrow-up" v-show="!rowDetail.isShowRemark"></i></div>
                </div>
                <div class="remark-box" v-show="rowDetail.isShowRemark">{{ rowDetail.remark }}</div>
            </div>
        </el-drawer>
        <!-- 审核弹窗 -->
        <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>
@@ -158,7 +159,6 @@
                status: [{ required: true, message: "必填" }],
                reasonFailure: [{ required: true, message: "必填" }],
            },
            auditForm: {},
            visible: false,
            typeStatus: 1,
            isDetail: false,
@@ -182,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: "场所名称",
@@ -196,7 +200,7 @@
                    searchSpan: 4,
                    searchLabelWidth: 76,
                }, {
                    label: "地址名称",
                    label: "场所地址",
                    prop: "addressName",
                    align: 'center',
                    search: true,
@@ -272,6 +276,45 @@
                    search: true,
                    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",
                    format: "yyyy-MM-dd",
                    valueFormat: "yyyy-MM-dd",
                    searchRange: true,
                    startPlaceholder: '开始日期',
                    endPlaceholder: '结束日期',
                    align: 'center',
                    search: true,
                    hide: true,
                    searchSpan: 5,
                    searchLabelWidth: 76,
                }],
            },
            data: [],
@@ -300,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 () {
@@ -315,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()
                }
            })
        },
@@ -345,8 +416,15 @@
            this.visible = true
        },
        // 折叠问题列表
        flodQL (index) {
            this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
            this.refreshNum += 1
        },
        // 折叠其他
        flodRM () {
            this.rowDetail.isShowRemark = !this.rowDetail.isShowRemark
            this.refreshNum += 1
        },
@@ -400,12 +478,16 @@
                newArr.push({ questionName: part[0], questionList: part[1], isShowQList: true })
            })
            row.qTypeList = newArr
            row.remarkNo = newArr.length
            row.isShowRemarkTitle = row.remark ? true : false
            row.isShowRemark = true
            this.rowDetail = row
            this.isDetail = true
        },
        changeType (type) {
            this.typeStatus = type
            this.page.currentPage = 1
            this.onLoad(this.page)
        },
@@ -531,9 +613,15 @@
        },
        searchChange (params, done) {
            let dateRange = params.dateRange
            if (params.dateRange) {
                params.startTime = dateRange[0]
                params.endTime = dateRange[1]
                delete params.dateRange
            }
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            this.onLoad(this.page)
            done()
        },
@@ -593,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)
@@ -673,6 +769,10 @@
    background-color: #409EFF;
}
:deep(.el-radio) {
    margin-right: 20px;
}
.title {
    margin: 10px;
    height: 40px;
@@ -691,6 +791,7 @@
.basic-info {
    padding: 0 20px;
    font-size: 14px;
    .info-item {
        display: flex;
@@ -711,6 +812,7 @@
.question-list {
    padding: 0 20px;
    font-size: 14px;
    .question-type {
        height: 60px;
@@ -740,6 +842,7 @@
            .key {
                width: 80%;
                padding-right: 20px;
                word-break: break-all;
            }
@@ -784,5 +887,13 @@
            }
        }
    }
    .remark-box {
        padding: 10px;
        background-color: #f5f7fa;
        border-radius: 8px;
        min-height: 40px;
        margin-bottom: 20px;
    }
}
</style>