guanqb
2024-02-21 ea3eaea9b6ef359e6a9ef81dc829e3fc4a2baec4
审核弹窗组件封装,消防自查审核弹窗修改
3 files modified
1 files added
220 ■■■■■ changed files
src/components/audit-base/main.vue 85 ●●●●● patch | view | raw | blame | history
src/main.js 88 ●●●● patch | view | raw | blame | history
src/views/place/index.vue 13 ●●●●● patch | view | raw | blame | history
src/views/publicSecurity/keynotePlaceManage.vue 34 ●●●● patch | view | raw | blame | history
src/components/audit-base/main.vue
New file
@@ -0,0 +1,85 @@
<template>
    <div class="cur-container-box">
        <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
            <template slot-scope="{size}" slot="menuForm">
                <el-button type="primary" :size="size" @click="handleSubmit">通 过</el-button>
                <el-button :size="size" @click="handleReset">驳 回</el-button>
            </template>
        </avue-form>
    </div>
</template>
<script>
export default {
    name: 'auditBase',
    data () {
        return {
            form: {},
            option: {
                submitBtn: false,
                emptyBtn: false,
                column: [
                    {
                        span: 23,
                        row: true,
                        label: "审批意见",
                        prop: "confirmNotion",
                        type: 'textarea',
                        minRows: 3,
                        maxRows: 5,
                        rules: [],
                    }
                ]
            },
        }
    },
    methods: {
        handleSubmit () {
            this.form.status = 1
            this.$emit('handleSubmit', this.form)
        },
        handleReset () {
            if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
                this.$message({
                    type: 'warning',
                    message: "请输入审批意见!",
                })
                return
            }
            this.form.status = 2
            this.$emit('handleSubmit', this.form)
        },
    }
}
</script>
<style lang="scss" scoped>
.cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    .content-box {
        margin: 0 4px;
        padding: 0 16px;
        height: 0;
        flex: 1;
        overflow: hidden;
        overflow-y: auto;
    }
    .footer-btn-box {
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }
}
</style>
src/main.js
@@ -1,68 +1,70 @@
import Vue from "vue";
import axios from "./router/axios";
import VueAxios from "vue-axios";
import App from "./App";
import router from "./router/router";
import "./permission"; // 权限
import "./error"; // 日志
import "./cache"; //页面缓存
import store from "./store";
import { loadStyle } from "./util/util";
import * as urls from "@/config/env";
import Element from "element-ui";
import { iconData } from "@/config/env";
import i18n from "./lang"; // Internationalization
import "./styles/common.scss";
import basicBlock from "./components/basic-block/main";
import basicContainer from "./components/basic-container/main";
import thirdRegister from "./components/third-register/main";
import flowDesign from "./components/flow-design/main";
import avueUeditor from "avue-plugin-ueditor";
import website from "@/config/website";
import crudCommon from "@/mixins/crud";
import Vue from "vue"
import axios from "./router/axios"
import VueAxios from "vue-axios"
import App from "./App"
import router from "./router/router"
import "./permission" // 权限
import "./error" // 日志
import "./cache" //页面缓存
import store from "./store"
import { loadStyle } from "./util/util"
import * as urls from "@/config/env"
import Element from "element-ui"
import { iconData } from "@/config/env"
import i18n from "./lang" // Internationalization
import "./styles/common.scss"
import basicBlock from "./components/basic-block/main"
import basicContainer from "./components/basic-container/main"
import thirdRegister from "./components/third-register/main"
import flowDesign from "./components/flow-design/main"
import auditBase from "./components/audit-base/main"
import avueUeditor from "avue-plugin-ueditor"
import website from "@/config/website"
import crudCommon from "@/mixins/crud"
// 业务组件
import tenantPackage from "./views/system/tenantpackage";
import tenantPackage from "./views/system/tenantpackage"
// 注册全局crud驱动
window.$crudCommon = crudCommon;
window.$crudCommon = crudCommon
// 加载Vue拓展
Vue.use(router);
Vue.use(VueAxios, axios);
Vue.use(router)
Vue.use(VueAxios, axios)
Vue.use(Element, {
  i18n: (key, value) => i18n.t(key, value),
});
})
Vue.use(window.AVUE, {
  size: "small",
  tableSize: "small",
  calcHeight: 65,
  i18n: (key, value) => i18n.t(key, value),
});
})
// 注册全局容器
Vue.component("basicContainer", basicContainer);
Vue.component("basicBlock", basicBlock);
Vue.component("thirdRegister", thirdRegister);
Vue.component("avueUeditor", avueUeditor);
Vue.component("flowDesign", flowDesign);
Vue.component("tenantPackage", tenantPackage);
Vue.component("basicContainer", basicContainer)
Vue.component("basicBlock", basicBlock)
Vue.component("thirdRegister", thirdRegister)
Vue.component("avueUeditor", avueUeditor)
Vue.component("flowDesign", flowDesign)
Vue.component("auditBase", auditBase)
Vue.component("tenantPackage", tenantPackage)
// 加载相关url地址
Object.keys(urls).forEach((key) => {
  Vue.prototype[key] = urls[key];
});
    Vue.prototype[key] = urls[key]
})
// 加载NutFlow
Vue.use(window.WfDesignBase);
Vue.use(window.WfDesignBase)
// 加载website
Vue.prototype.website = website;
Vue.prototype.$axios = axios;
Vue.prototype.website = website
Vue.prototype.$axios = axios
iconData.forEach((item) => {
  loadStyle(item.url.replace("$key", item.icon));
});
    loadStyle(item.url.replace("$key", item.icon))
})
Vue.config.productionTip = false;
Vue.config.productionTip = false
new Vue({
  router,
  store,
  i18n,
  render: (h) => h(App),
}).$mount("#app");
}).$mount("#app")
src/views/place/index.vue
@@ -143,9 +143,6 @@
                            trigger: "blur",
                        },],
                    },
                    {
                        width: 110,
                        label: "场所负责人",
@@ -159,7 +156,6 @@
                            trigger: "blur",
                        },],
                    },
                    {
                        width: 120,
                        overHidden: true,
@@ -191,7 +187,6 @@
                            }
                        ],
                    },
                    {
                        width: 110,
                        label: "所属街道",
@@ -242,7 +237,6 @@
                            },
                        ],
                    },
                    {
                        width: 110,
                        overHidden: true,
@@ -279,8 +273,6 @@
                            },
                        ],
                    },
                    {
                        span: 7,
                        label: "场所标签",
@@ -300,7 +292,6 @@
                            trigger: "blur",
                        },],
                    },
                    {
                        span: 5,
                        label: "",
@@ -315,7 +306,6 @@
                        dataType: "string",
                        hide: true,
                    },
                    {
                        span: 12,
                        label: "标签颜色",
@@ -402,7 +392,6 @@
                            value: "dictKey",
                        },
                    },
                    {
                        width: 110,
                        label: "场所照片",
@@ -462,7 +451,6 @@
                        hide: true,
                        prop: "lng",
                    },
                    {
                        width: 96,
                        slot: true,
@@ -473,7 +461,6 @@
                        hide: true,
                        prop: "lat",
                    },
                    {
                        width: 100,
                        addDisplay: false,
src/views/publicSecurity/keynotePlaceManage.vue
@@ -40,21 +40,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="remark" v-if="auditForm.status == 3">
                    <el-input type="textarea" v-model="auditForm.remark"></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" @handleReset="submitAudit"></audit-base>
        </el-dialog>
    </basic-container>
</template>
@@ -97,7 +83,6 @@
                status: [{ required: true, message: "必填" }],
                remark: [{ required: true, message: "必填" }],
            },
            auditForm: {},
            visible: false,
            taskType: 0,
            curRow: {},
@@ -350,23 +335,19 @@
        // 取消审核
        cancelAudit () {
            this.visible = false
            this.auditForm = {}
            this.$refs.auditForm.resetFields()
        },
        // 确认提交审核
        submitAudit () {
            this.$refs.auditForm.validate((valid) => {
                if (valid) {
                    applyTaskExamine(Object.assign(this.auditParams, this.auditForm)).then(res => {
        submitAudit (form) {
            let auditForm = {
                status: form.status == 1 ? 2 : 3,
                remark: form.confirmNotion
            }
            applyTaskExamine(Object.assign(this.auditParams, auditForm)).then(res => {
                        if (res.data.code == 200) {
                            this.$message.warning("审核成功")
                            this.onLoad(this.page)
                            this.cancelAudit()
                        }
                    })
                } else {
                    return false
                }
            })
        },
@@ -377,7 +358,6 @@
                id: row.id,
                reportType: row.reportType
            }
            console.log('this.auditParams', this.auditParams)
            this.visible = true
        },