guanqb
2024-02-05 53f4b2973444148435418a7d86726c20e60c13f1
整改情况审核功能
2 files modified
86 ■■■■■ changed files
src/api/publicSecurity/ninePlaceManage.js 9 ●●●●● patch | view | raw | blame | history
src/views/publicSecurity/ninePlaceManage/situationRectification.vue 77 ●●●● patch | view | raw | blame | history
src/api/publicSecurity/ninePlaceManage.js
@@ -51,4 +51,13 @@
        method: "get",
        params
    })
}
// 民警审核接口
export const applyRectification = (data) => {
    return request({
        url: "/api/blade-taskPlaceRectification/taskPlaceRectification/applyRectification",
        method: "post",
        data
    })
}
src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -8,8 +8,8 @@
            <template slot="menuLeft">
                <div class="tab-list">
                    <div :class="{ 'choose': typeStatus == 3 }" @click="changeType(3)">全部</div>
                    <div :class="{ 'choose': typeStatus == 2 }" @click="changeType(2)">待审核</div>
                    <div :class="{ 'choose': typeStatus == 1 }" @click="changeType(1)">已审核</div>
                    <div :class="{ 'choose': typeStatus == 1 }" @click="changeType(1)">待审核</div>
                    <div :class="{ 'choose': typeStatus == 2 }" @click="changeType(2)">已审核</div>
                </div>
                <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
                </el-button>
@@ -18,9 +18,8 @@
                <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="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>
            </template>
        </avue-crud>
        <el-drawer title="整改情况详情" :visible.sync="isDetail" :append-to-body="true" size="46%" direction="rtl">
@@ -106,6 +105,25 @@
                </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>
        </el-dialog>
    </basic-container>
</template>
@@ -114,7 +132,7 @@
    mapGetters
} from "vuex"
import {
    getZGQKList, getPatrolGroupTree
    getZGQKList, getPatrolGroupTree, applyRectification
} from "@/api/publicSecurity/ninePlaceManage"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
@@ -136,7 +154,13 @@
export default {
    data () {
        return {
            typeStatus: 2,
            auditRules: {
                status: [{ required: true, message: "必填" }],
                reasonFailure: [{ required: true, message: "必填" }],
            },
            auditForm: {},
            visible: false,
            typeStatus: 1,
            isDetail: false,
            rowDetail: [],
            form: {},
@@ -283,6 +307,44 @@
    },
    methods: {
        // 弹窗关闭回调
        handleClose () {
            this.cancelAudit()
        },
        // 取消审核
        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
                }
            })
        },
        // 审核按钮
        goAudit (row) {
            this.auditParams = {
                id: row.id,
                taskId: row.taskId
            }
            this.visible = true
        },
        flodQL (index) {
            this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
            this.refreshNum += 1
@@ -360,7 +422,6 @@
                exportBlob(
                    `/api/blade-taskPlaceRectification/taskPlaceRectification/exportRectificationStatistics?${this.website.tokenHeader}=${getToken()}&` + data
                ).then(res => {
                    console.log('exportBlob', res)
                    downloadXls(res.data, `整改情况${dateNow()}.xlsx`)
                    NProgress.done()
                })