保安公司  点击数量跳转 到该公司保安人员保安公司详情 添加营业执照,许可证,社保记录
12 files modified
4 files added
1 files deleted
4573 ■■■■ changed files
src/api/securityUnitChild/securityUnitChild.js 25 ●●●●● patch | view | raw | blame | history
src/router/views/index.js 1795 ●●●● patch | view | raw | blame | history
src/styles/element-ui.scss 16 ●●●●● patch | view | raw | blame | history
src/views/resource/attach.vue 2 ●●● patch | view | raw | blame | history
src/views/securityEquipment/gun.js 9 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 14 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuardOnce.vue 1530 ●●●●● patch | view | raw | blame | history
src/views/securityUnit/armedEscort.vue 710 ●●●●● patch | view | raw | blame | history
src/views/securityUnit/data.js 28 ●●●●● patch | view | raw | blame | history
src/views/securityUnit/index copy 2.vue 69 ●●●●● patch | view | raw | blame | history
src/views/securityUnit/localCompany.vue 62 ●●●● patch | view | raw | blame | history
src/views/securityUnit/securityTraining.vue 27 ●●●●● patch | view | raw | blame | history
src/views/securityUnit/selfRecruitedSecurityGuard.vue 27 ●●●●● patch | view | raw | blame | history
src/views/securityUnit/transRegionalcompany.vue 28 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/businessLicense.vue 96 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/index.vue 39 ●●●● patch | view | raw | blame | history
src/views/securityUnitChild/licence.vue 96 ●●●●● patch | view | raw | blame | history
src/api/securityUnitChild/securityUnitChild.js
New file
@@ -0,0 +1,25 @@
import request from '@/router/axios';
export const getdata = () => {
    return request({
        url: '/api/blade-resource/oss/endpoint/put-file-app',
        // url: 'http://192.168.0.104:80/information/page',
        method: 'post',
        // params: {
        //     ...params,
        //     current,
        //     size,
        // }
    })
}
export const adddata = (row) => {
    return request({
        url: '/api/information/save',
        // url: 'http://192.168.0.104:80/information/save',
        method: 'post',
        data: row
    })
}
src/router/views/index.js
@@ -1,899 +1,912 @@
import Layout from '@/page/index/'
export default [{
        path: '/wel',
        component: Layout,
        redirect: '/wel/index',
        children: [{
            path: 'index',
            name: '首页',
            meta: {
                i18n: 'dashboard'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/wel/index')
        }, {
            path: 'dashboard',
            name: '控制台',
            meta: {
                i18n: 'dashboard',
                menu: false,
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/wel/dashboard')
        }]
    }, {
        path: '/test',
        component: Layout,
        redirect: '/test/index',
        children: [{
            path: 'index',
            name: '测试页',
            meta: {
                i18n: 'test'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/util/test')
        }]
    }, {
        path: '/dict-horizontal',
        component: Layout,
        redirect: '/dict-horizontal/index',
        children: [{
            path: 'index',
            name: '字典管理',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal')
        }]
    }, {
        path: '/dict-vertical',
        component: Layout,
        redirect: '/dict-vertical/index',
        children: [{
            path: 'index',
            name: '字典管理',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
        }]
    }, {
        path: '/info',
        component: Layout,
        redirect: '/info/index',
        children: [{
            path: 'index',
            name: '个人信息',
            meta: {
                i18n: 'info'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/system/userinfo')
        }]
    }, {
        path: '/work/process/leave',
        component: Layout,
        redirect: '/work/process/leave/form',
        children: [{
            path: 'form/:processDefinitionId',
            name: '请假流程',
            meta: {
                i18n: 'work'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
        }, {
            path: 'handle/:taskId/:processInstanceId/:businessId',
            name: '处理请假流程',
            meta: {
                i18n: 'work'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
        }, {
            path: 'detail/:processInstanceId/:businessId',
            name: '请假流程详情',
            meta: {
                i18n: 'work'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
        }]
    }, {
        path: '/securityAnalysis',
        component: Layout,
        redirect: '/securityAnalysis/index',
        children: [{
            path: 'index',
            name: '保安单位情况智能分析',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
        }]
    }, {
        path: '/recruitmentManagement',
        component: Layout,
        redirect: '/recruitmentManagement/index',
        children: [{
            path: 'index',
            name: '招聘管理',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
        }]
    }, {
        path: '/securityUnit',
        component: Layout,
        redirect: '/securityUnit/index',
        children: [{
            path: 'index',
            name: '保安单位信息',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
        }]
    }, {
        path: '/securityGuard',
        component: Layout,
        redirect: '/securityGuard/securityGuard',
        children: [{
            path: 'index',
            name: '保安员查询',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
        }]
    }, {
        path: '/securityGuardDetail',
        component: Layout,
        redirect: '/securityGuardDetail/index',
        children: [{
            path: 'index',
            name: '保安员详情',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardDetail')
        }]
    }, {
        path: '/resource',
        component: Layout,
        redirect: '/resource/attach',
        children: [{
            path: 'attach',
            name: '附件上传',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/resource/attach')
        }]
    }, {
        path: '/securityUnitChild',
        component: Layout,
        redirect: '/securityUnitChild/index',
        children: [{
            path: 'index',
            name: '保安单位详情',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityUnitChild/index')
        }]
    }, {
        path: '/securityGuard',
        component: Layout,
        redirect: '/securityGuard/securityGuard',
        children: [{
            path: 'index',
            name: '保安员管理',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
        }]
    },
    // {
    //     path: '/dispatch/dispatch',
    //     component: Layout,
    //     redirect: '/dispatch/dispatch',
    //     children: [{
    //         path: 'index',
    //         name: '派遣服务管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
    //     }]
    // },
    {
        path: '/desk',
        component: Layout,
        redirect: '/desk/notice',
        children: [{
            path: 'index',
            name: '通知公告',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/desk/notice')
        }]
    },
    {
        path: '/talk',
        component: Layout,
        redirect: '/talk/talk',
        children: [{
            path: 'index',
            name: '心里咨询',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/talk/talk')
        }]
    },
    {
        path: '/workreport',
        component: Layout,
        redirect: '/workreport/workreport',
        children: [{
            path: 'workreport',
            name: '发起的汇报',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/workreport/workreport')
        }]
    },
    {
        path: '/workreport',
        component: Layout,
        redirect: '/workreport/workreply',
        children: [{
            path: 'workreply',
            name: '接收的汇报',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/workreport/workreply')
        }]
    }, {
        path: '/resource',
        component: Layout,
        redirect: '/resource/attachCopy',
        children: [{
            path: 'attachCopy',
            name: '保安单位附件上传',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/resource/attachCopy')
        }]
    },
    // {
    //     path: '/dispatch',
    //     component: Layout,
    //     redirect: '/dispatch/dispatch',
    //     children: [{
    //         path: 'dispatch',
    //         name: '派遣单位管理',
    //         meta: {
    //             i18n: 'dispatch'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
    //     }, {
    //         path: 'dispatchChildoperable',
    //         name: '派遣记录管理',
    //         meta: {
    //             i18n: 'dispatch'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperable')
    //     }]
    // },
    // {
    //     path: '/dispatchChild',
    //     component: Layout,
    //     redirect: '/dispatchChild/index',
    //     children: [{
    //         path: 'index',
    //         name: '派遣服务记录',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
    //     }]
    // },
    // {
    //     path: '/equipments',
    //     component: Layout,
    //     redirect: '/equipments/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安公司装备管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/equipments/index')
    //     }]
    // }, {
    //     path: '/car',
    //     component: Layout,
    //     redirect: '/car/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安公司车辆管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/car/index')
    //     }]
    // }, {
    //     path: '/gun',
    //     component: Layout,
    //     redirect: '/gun/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安公司枪支管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/gun/index')
    //     }]
    // },
    // {
    //     path: '/securityEquipment',
    //     component: Layout,
    //     redirect: '/securityEquipment',
    //     children: [{
    //         path: 'equipments',
    //         name: '装备管理',
    //         meta: {
    //             i18n: 'securityEquipment'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/equipments')
    //     }, {
    //         path: 'car',
    //         name: '车辆管理',
    //         meta: {
    //             i18n: 'car'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/car')
    //     }, {
    //         path: 'gun',
    //         name: '车辆管理',
    //         meta: {
    //             i18n: 'gun'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun')
    //     }]
    // },
    // {
    //     path: '/trainingRegistration',
    //     component: Layout,
    //     redirect: '/trainingRegistration/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安培训报名管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index')
    //     }]
    // },
    {
        path: '/securityAnalysis',
        component: Layout,
        redirect: '/securityAnalysis/index',
        children: [{
            path: 'index',
            name: '保安单位情况智能分析',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
        }]
    }, {
        path: '/recruitmentManagement',
        component: Layout,
        redirect: '/recruitmentManagement/index',
        children: [{
            path: 'index',
            name: '招聘管理',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
        }]
    }, {
        path: '/ownerFeedback',
        component: Layout,
        redirect: '/ownerFeedback/index',
        children: [{
            path: 'index',
            name: '业主反馈',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/ownerFeedback/owner')
        }]
    }, {
        path: '/securityUnit',
        component: Layout,
        redirect: '/securityUnit/index',
        children: [{
            path: 'index',
            name: '保安单位信息',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
        }]
    }, {
        path: '/securityGuard',
        component: Layout,
        redirect: '/securityGuard/securityGuard',
        children: [{
            path: 'index',
            name: '保安员查询',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
        }]
    }, {
        path: '/securityGuardDetail',
        component: Layout,
        redirect: '/securityGuardDetail/index',
        children: [{
            path: 'index',
            name: '保安员详情',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardDetail')
        }]
    }, {
        path: '/resource',
        component: Layout,
        redirect: '/resource/attach',
        children: [{
            path: 'attach',
            name: '附件上传',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/resource/attach')
        }]
    }, {
        path: '/securityUnitChild',
        component: Layout,
        redirect: '/securityUnitChild/index',
        children: [{
            path: 'index',
            name: '保安单位详情',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityUnitChild/index')
        }]
    }, {
        path: '/securityGuard',
        component: Layout,
        redirect: '/securityGuard/securityGuard',
        children: [{
            path: 'index',
            name: '保安员管理',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
        }]
    },
    // {
    //     path: '/dispatch/dispatch',
    //     component: Layout,
    //     redirect: '/dispatch/dispatch',
    //     children: [{
    //         path: 'index',
    //         name: '派遣服务管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
    //     }]
    // },
    {
        path: '/desk',
        component: Layout,
        redirect: '/desk/notice',
        children: [{
            path: 'index',
            name: '通知公告',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/desk/notice')
        }]
    }, {
        path: '/dispatch',
        component: Layout,
        redirect: '/dispatch/dispatch',
        children: [{
            path: 'dispatch',
            name: '派遣单位管理',
            meta: {
                i18n: 'dispatch'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
        }, {
            path: 'dispatchChildoperable',
            name: '派遣记录管理',
            meta: {
                i18n: 'dispatch'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperable')
        }]
    }, {
        path: '/dispatchChild',
        component: Layout,
        redirect: '/dispatchChild/index',
        children: [{
            path: 'index',
            name: '派遣服务记录',
            meta: {
                i18n: 'dict'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
        }]
    }, {
        path: '/applyexam',
        redirect: '/applyexam/papers',
        component: Layout,
        children: [{
            path: 'papers',
            name: '准考证信息',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/applyexam/papers')
        }]
    },
    // {
    //     path: '/equipments',
    //     component: Layout,
    //     redirect: '/equipments/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安公司装备管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/equipments/index')
    //     }]
    // }, {
    //     path: '/car',
    //     component: Layout,
    //     redirect: '/car/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安公司车辆管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/car/index')
    //     }]
    // }, {
    //     path: '/gun',
    //     component: Layout,
    //     redirect: '/gun/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安公司枪支管理',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/gun/index')
    //     }]
    // },
    // {
    //     path: '/securityEquipment',
    //     component: Layout,
    //     redirect: '/securityEquipment',
    //     children: [{
    //         path: 'equipments',
    //         name: '装备管理',
    //         meta: {
    //             i18n: 'securityEquipment'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/equipments')
    //     }, {
    //         path: 'car',
    //         name: '车辆管理',
    //         meta: {
    //             i18n: 'car'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/car')
    //     }, {
    //         path: 'gun',
    //         name: '车辆管理',
    //         meta: {
    //             i18n: 'gun'
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun')
    //     }]
    // },
    // {
    //     path: '/trainingRegistration',
    //     component: Layout,
    //     redirect: '/trainingRegistration/index',
    //     children: [{
    //         path: 'index',
    //         name: '保安培训报名',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index')
    //     }]
    // },
    // {
    //     path: '/trainExam',
    //     component: Layout,
    //     redirect: '/trainExam/index',
    //     children: [{
    //         path: 'index',
    //         name: '考试申请',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import ( /* webpackChunkName: "views" */ '@/views/trainExam/index')
    //     }]
    // },
    // {
    //     path: '/applyexam',
    //     redirect: '/applyexam/index',
    //     component: Layout,
    //     children: [{
    //         path: 'index',
    //         name: '报名考试',
    //         meta: {
    //             i18n: 'index',
    //         },
    //         component: () =>
    //             import( /* webpackChunkName: "views" */ '@/views/applyexam/index')
    //     }]
    // },
    {
        path: '/applydetailed',
        redirect: '/applydetailed/index',
        component: Layout,
        children: [{
            path: 'index',
            name: '报名清册',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/applydetailed/index')
        }]
    },
    {
        path: '/trainApply',
        redirect: '/trainApply/index',
        component: Layout,
        children: [{
            path: 'index',
            name: '报名清册',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/trainApply/index')
        }]
    },
    {
        path: '/startexam',
        redirect: '/startexam/index',
        component: Layout,
        children: [{
            path: 'index',
            name: '开始考试',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/startexam/index')
        }]
    },
    {
        path: '/titleDetails',
    path: '/wel',
    component: Layout,
    redirect: '/wel/index',
    children: [{
        path: 'index',
        name: '首页',
        meta: {
            i18n: 'dashboard'
        },
        component: () =>
            import ( /* webpackChunkName: "views" */ '@/views/exam/topicDetails')
    },
    {
        path: '',
        component: Layout,
        children: [{
            path: '/exam/subjects/:id',
            component: () =>
                import ('@/views/exam/examSubjects'),
            name: '题目管理',
            title: '题目管理',
            noCache: true
        }]
    },
    {
        path: '',
        component: Layout,
        children: [{
            path: '/startexam/:id',
            component: () =>
                import ('@/views/startexam/index'),
            name: '开始考试',
            title: '开始考试',
            noCache: true
        }]
    },
    // {
    //     path: '/traincompany',
    //     component: Layout,
    //     redirect: '/traincompany/index',
    //     children: [{
    //         path: 'index',
    //         name: '培训公司查询',
    //         meta: {
    //             i18n: 'dict'
    //         },
    //         component: () =>
    //             import ( /* webpackChunkName: "views" */ '@/views/traincompany/index')
    //     }]
    // },
    {
        path: '/dispatchChildoperableSee',
        component: Layout,
        redirect: '/dispatchChildoperableSee/index',
        children: [{
            path: 'index',
            name: '派遣记录',
            meta: {
                i18n: 'index'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperableSee')
        }]
    },
    {
        path: '/expression',
        component: Layout,
        redirect: '/expression/index',
        children: [{
            path: 'index',
            name: '表现记录',
            meta: {
                i18n: 'index'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/people/expression')
        }]
            import( /* webpackChunkName: "views" */ '@/views/wel/index')
    }, {
        path: '/job',
        component: Layout,
        redirect: '/job/index',
        children: [{
            path: 'index',
            name: '从业记录',
            meta: {
                i18n: 'index'
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/people/job')
        }]
        path: 'dashboard',
        name: '控制台',
        meta: {
            i18n: 'dashboard',
            menu: false,
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/wel/dashboard')
    }]
}, {
    path: '/test',
    component: Layout,
    redirect: '/test/index',
    children: [{
        path: 'index',
        name: '测试页',
        meta: {
            i18n: 'test'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/util/test')
    }]
}, {
    path: '/dict-horizontal',
    component: Layout,
    redirect: '/dict-horizontal/index',
    children: [{
        path: 'index',
        name: '字典管理',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal')
    }]
}, {
    path: '/dict-vertical',
    component: Layout,
    redirect: '/dict-vertical/index',
    children: [{
        path: 'index',
        name: '字典管理',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
    }]
}, {
    path: '/info',
    component: Layout,
    redirect: '/info/index',
    children: [{
        path: 'index',
        name: '个人信息',
        meta: {
            i18n: 'info'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/system/userinfo')
    }]
}, {
    path: '/work/process/leave',
    component: Layout,
    redirect: '/work/process/leave/form',
    children: [{
        path: 'form/:processDefinitionId',
        name: '请假流程',
        meta: {
            i18n: 'work'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
    }, {
        path: '/resource',
        redirect: '/resource/uploadNotice',
        component: Layout,
        children: [{
            path: 'uploadNotice',
            name: '通知公告>附件上传',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/resource/uploadNotice')
        }]
    },
    {
        path: '/applydetailed',
        redirect: '/applydetailed/papers',
        component: Layout,
        children: [{
            path: 'papers',
            name: '报名清册信息',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/applydetailed/papers')
        }]
    },
    {
        path: '/exam',
        redirect: '/exam/papers',
        component: Layout,
        children: [{
            path: 'papers',
            name: '保安证',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/exam/papers')
        }]
        path: 'handle/:taskId/:processInstanceId/:businessId',
        name: '处理请假流程',
        meta: {
            i18n: 'work'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
    }, {
        path: '/resource',
        redirect: '/resource/uploadPolicyRelease',
        component: Layout,
        children: [{
            path: 'uploadPolicyRelease',
            name: '政策发布>附件上传',
            meta: {
                i18n: 'index',
            },
            component: () =>
                import ( /* webpackChunkName: "views" */ '@/views/resource/uploadPolicyRelease')
        }]
    }
        path: 'detail/:processInstanceId/:businessId',
        name: '请假流程详情',
        meta: {
            i18n: 'work'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
    }]
}, {
    path: '/securityAnalysis',
    component: Layout,
    redirect: '/securityAnalysis/index',
    children: [{
        path: 'index',
        name: '保安单位情况智能分析',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
    }]
}, {
    path: '/recruitmentManagement',
    component: Layout,
    redirect: '/recruitmentManagement/index',
    children: [{
        path: 'index',
        name: '招聘管理',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
    }]
}, {
    path: '/securityUnit',
    component: Layout,
    redirect: '/securityUnit/index',
    children: [{
        path: 'index',
        name: '保安单位信息',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
    }]
}, {
    path: '/securityGuard',
    component: Layout,
    redirect: '/securityGuard/securityGuard',
    children: [{
        path: 'index',
        name: '保安员管理',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
    }]
}, {
    path: '/securityGuardOnce',
    component: Layout,
    redirect: '/securityGuard/securityGuardOnce',
    children: [{
        path: 'index',
        name: '保安员查询',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardOnce')
    }]
}, {
    path: '/securityGuardDetail',
    component: Layout,
    redirect: '/securityGuardDetail/index',
    children: [{
        path: 'index',
        name: '保安员详情',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardDetail')
    }]
}, {
    path: '/resource',
    component: Layout,
    redirect: '/resource/attach',
    children: [{
        path: 'attach',
        name: '附件上传',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/resource/attach')
    }]
}, {
    path: '/securityUnitChild',
    component: Layout,
    redirect: '/securityUnitChild/index',
    children: [{
        path: 'index',
        name: '保安单位详情',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityUnitChild/index')
    }]
}, {
    path: '/securityGuard',
    component: Layout,
    redirect: '/securityGuard/securityGuard',
    children: [{
        path: 'index',
        name: '保安员管理',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
    }]
},
// {
//     path: '/dispatch/dispatch',
//     component: Layout,
//     redirect: '/dispatch/dispatch',
//     children: [{
//         path: 'index',
//         name: '派遣服务管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
//     }]
// },
{
    path: '/desk',
    component: Layout,
    redirect: '/desk/notice',
    children: [{
        path: 'index',
        name: '通知公告',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/desk/notice')
    }]
},
{
    path: '/talk',
    component: Layout,
    redirect: '/talk/talk',
    children: [{
        path: 'index',
        name: '心里咨询',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/talk/talk')
    }]
},
{
    path: '/workreport',
    component: Layout,
    redirect: '/workreport/workreport',
    children: [{
        path: 'workreport',
        name: '发起的汇报',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/workreport/workreport')
    }]
},
{
    path: '/workreport',
    component: Layout,
    redirect: '/workreport/workreply',
    children: [{
        path: 'workreply',
        name: '接收的汇报',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/workreport/workreply')
    }]
}, {
    path: '/resource',
    component: Layout,
    redirect: '/resource/attachCopy',
    children: [{
        path: 'attachCopy',
        name: '保安单位附件上传',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/resource/attachCopy')
    }]
},
// {
//     path: '/dispatch',
//     component: Layout,
//     redirect: '/dispatch/dispatch',
//     children: [{
//         path: 'dispatch',
//         name: '派遣单位管理',
//         meta: {
//             i18n: 'dispatch'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
//     }, {
//         path: 'dispatchChildoperable',
//         name: '派遣记录管理',
//         meta: {
//             i18n: 'dispatch'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperable')
//     }]
// },
// {
//     path: '/dispatchChild',
//     component: Layout,
//     redirect: '/dispatchChild/index',
//     children: [{
//         path: 'index',
//         name: '派遣服务记录',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
//     }]
// },
// {
//     path: '/equipments',
//     component: Layout,
//     redirect: '/equipments/index',
//     children: [{
//         path: 'index',
//         name: '保安公司装备管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/equipments/index')
//     }]
// }, {
//     path: '/car',
//     component: Layout,
//     redirect: '/car/index',
//     children: [{
//         path: 'index',
//         name: '保安公司车辆管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/car/index')
//     }]
// }, {
//     path: '/gun',
//     component: Layout,
//     redirect: '/gun/index',
//     children: [{
//         path: 'index',
//         name: '保安公司枪支管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/gun/index')
//     }]
// },
// {
//     path: '/securityEquipment',
//     component: Layout,
//     redirect: '/securityEquipment',
//     children: [{
//         path: 'equipments',
//         name: '装备管理',
//         meta: {
//             i18n: 'securityEquipment'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/equipments')
//     }, {
//         path: 'car',
//         name: '车辆管理',
//         meta: {
//             i18n: 'car'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/car')
//     }, {
//         path: 'gun',
//         name: '车辆管理',
//         meta: {
//             i18n: 'gun'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun')
//     }]
// },
// {
//     path: '/trainingRegistration',
//     component: Layout,
//     redirect: '/trainingRegistration/index',
//     children: [{
//         path: 'index',
//         name: '保安培训报名管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index')
//     }]
// },
{
    path: '/securityAnalysis',
    component: Layout,
    redirect: '/securityAnalysis/index',
    children: [{
        path: 'index',
        name: '保安单位情况智能分析',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
    }]
}, {
    path: '/recruitmentManagement',
    component: Layout,
    redirect: '/recruitmentManagement/index',
    children: [{
        path: 'index',
        name: '招聘管理',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
    }]
}, {
    path: '/ownerFeedback',
    component: Layout,
    redirect: '/ownerFeedback/index',
    children: [{
        path: 'index',
        name: '业主反馈',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/ownerFeedback/owner')
    }]
}, {
    path: '/securityUnit',
    component: Layout,
    redirect: '/securityUnit/index',
    children: [{
        path: 'index',
        name: '保安单位信息',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
    }]
}, {
    path: '/securityGuard',
    component: Layout,
    redirect: '/securityGuard/securityGuard',
    children: [{
        path: 'index',
        name: '保安员查询',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
    }]
}, {
    path: '/securityGuardDetail',
    component: Layout,
    redirect: '/securityGuardDetail/index',
    children: [{
        path: 'index',
        name: '保安员详情',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardDetail')
    }]
}, {
    path: '/resource',
    component: Layout,
    redirect: '/resource/attach',
    children: [{
        path: 'attach',
        name: '附件上传',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/resource/attach')
    }]
}, {
    path: '/securityUnitChild',
    component: Layout,
    redirect: '/securityUnitChild/index',
    children: [{
        path: 'index',
        name: '保安单位详情',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityUnitChild/index')
    }]
}, {
    path: '/securityGuard',
    component: Layout,
    redirect: '/securityGuard/securityGuard',
    children: [{
        path: 'index',
        name: '保安员管理',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
    }]
},
// {
//     path: '/dispatch/dispatch',
//     component: Layout,
//     redirect: '/dispatch/dispatch',
//     children: [{
//         path: 'index',
//         name: '派遣服务管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
//     }]
// },
{
    path: '/desk',
    component: Layout,
    redirect: '/desk/notice',
    children: [{
        path: 'index',
        name: '通知公告',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/desk/notice')
    }]
}, {
    path: '/dispatch',
    component: Layout,
    redirect: '/dispatch/dispatch',
    children: [{
        path: 'dispatch',
        name: '派遣单位管理',
        meta: {
            i18n: 'dispatch'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
    }, {
        path: 'dispatchChildoperable',
        name: '派遣记录管理',
        meta: {
            i18n: 'dispatch'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperable')
    }]
}, {
    path: '/dispatchChild',
    component: Layout,
    redirect: '/dispatchChild/index',
    children: [{
        path: 'index',
        name: '派遣服务记录',
        meta: {
            i18n: 'dict'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
    }]
}, {
    path: '/applyexam',
    redirect: '/applyexam/papers',
    component: Layout,
    children: [{
        path: 'papers',
        name: '准考证信息',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/applyexam/papers')
    }]
},
// {
//     path: '/equipments',
//     component: Layout,
//     redirect: '/equipments/index',
//     children: [{
//         path: 'index',
//         name: '保安公司装备管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/equipments/index')
//     }]
// }, {
//     path: '/car',
//     component: Layout,
//     redirect: '/car/index',
//     children: [{
//         path: 'index',
//         name: '保安公司车辆管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/car/index')
//     }]
// }, {
//     path: '/gun',
//     component: Layout,
//     redirect: '/gun/index',
//     children: [{
//         path: 'index',
//         name: '保安公司枪支管理',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/gun/index')
//     }]
// },
// {
//     path: '/securityEquipment',
//     component: Layout,
//     redirect: '/securityEquipment',
//     children: [{
//         path: 'equipments',
//         name: '装备管理',
//         meta: {
//             i18n: 'securityEquipment'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/equipments')
//     }, {
//         path: 'car',
//         name: '车辆管理',
//         meta: {
//             i18n: 'car'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/car')
//     }, {
//         path: 'gun',
//         name: '车辆管理',
//         meta: {
//             i18n: 'gun'
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun')
//     }]
// },
// {
//     path: '/trainingRegistration',
//     component: Layout,
//     redirect: '/trainingRegistration/index',
//     children: [{
//         path: 'index',
//         name: '保安培训报名',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index')
//     }]
// },
// {
//     path: '/trainExam',
//     component: Layout,
//     redirect: '/trainExam/index',
//     children: [{
//         path: 'index',
//         name: '考试申请',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import ( /* webpackChunkName: "views" */ '@/views/trainExam/index')
//     }]
// },
// {
//     path: '/applyexam',
//     redirect: '/applyexam/index',
//     component: Layout,
//     children: [{
//         path: 'index',
//         name: '报名考试',
//         meta: {
//             i18n: 'index',
//         },
//         component: () =>
//             import( /* webpackChunkName: "views" */ '@/views/applyexam/index')
//     }]
// },
{
    path: '/applydetailed',
    redirect: '/applydetailed/index',
    component: Layout,
    children: [{
        path: 'index',
        name: '报名清册',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/applydetailed/index')
    }]
},
{
    path: '/trainApply',
    redirect: '/trainApply/index',
    component: Layout,
    children: [{
        path: 'index',
        name: '报名清册',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/trainApply/index')
    }]
},
{
    path: '/startexam',
    redirect: '/startexam/index',
    component: Layout,
    children: [{
        path: 'index',
        name: '开始考试',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/startexam/index')
    }]
},
{
    path: '/titleDetails',
    component: () =>
        import( /* webpackChunkName: "views" */ '@/views/exam/topicDetails')
},
{
    path: '',
    component: Layout,
    children: [{
        path: '/exam/subjects/:id',
        component: () =>
            import('@/views/exam/examSubjects'),
        name: '题目管理',
        title: '题目管理',
        noCache: true
    }]
},
{
    path: '',
    component: Layout,
    children: [{
        path: '/startexam/:id',
        component: () =>
            import('@/views/startexam/index'),
        name: '开始考试',
        title: '开始考试',
        noCache: true
    }]
},
// {
//     path: '/traincompany',
//     component: Layout,
//     redirect: '/traincompany/index',
//     children: [{
//         path: 'index',
//         name: '培训公司查询',
//         meta: {
//             i18n: 'dict'
//         },
//         component: () =>
//             import ( /* webpackChunkName: "views" */ '@/views/traincompany/index')
//     }]
// },
{
    path: '/dispatchChildoperableSee',
    component: Layout,
    redirect: '/dispatchChildoperableSee/index',
    children: [{
        path: 'index',
        name: '派遣记录',
        meta: {
            i18n: 'index'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperableSee')
    }]
},
{
    path: '/expression',
    component: Layout,
    redirect: '/expression/index',
    children: [{
        path: 'index',
        name: '表现记录',
        meta: {
            i18n: 'index'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/people/expression')
    }]
}, {
    path: '/job',
    component: Layout,
    redirect: '/job/index',
    children: [{
        path: 'index',
        name: '从业记录',
        meta: {
            i18n: 'index'
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/people/job')
    }]
}, {
    path: '/resource',
    redirect: '/resource/uploadNotice',
    component: Layout,
    children: [{
        path: 'uploadNotice',
        name: '通知公告>附件上传',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/resource/uploadNotice')
    }]
},
{
    path: '/applydetailed',
    redirect: '/applydetailed/papers',
    component: Layout,
    children: [{
        path: 'papers',
        name: '报名清册信息',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/applydetailed/papers')
    }]
},
{
    path: '/exam',
    redirect: '/exam/papers',
    component: Layout,
    children: [{
        path: 'papers',
        name: '保安证',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/exam/papers')
    }]
}, {
    path: '/resource',
    redirect: '/resource/uploadPolicyRelease',
    component: Layout,
    children: [{
        path: 'uploadPolicyRelease',
        name: '政策发布>附件上传',
        meta: {
            i18n: 'index',
        },
        component: () =>
            import( /* webpackChunkName: "views" */ '@/views/resource/uploadPolicyRelease')
    }]
}
]
src/styles/element-ui.scss
@@ -260,3 +260,19 @@
    display: flex;
    flex-direction: row-reverse;
}
.businessLicense .avue-upload__avatar,
.businessLicense .avue-upload__icon {
    // 图片
    width: 450px !important;
    height: 680px !important;
    line-height: 680px !important;
}
.License .avue-upload__avatar,
.License .avue-upload__icon {
    // 图片
    width: 1048px !important;
    height: 680px !important;
    line-height: 680px !important;
}
src/views/resource/attach.vue
@@ -45,7 +45,7 @@
          size="small"
          v-if="permission.attach_download"
          @click="handleDownload(scope.row)"
          >下载222
          >下载
        </el-button>
        <el-button
          type="text"
src/views/securityEquipment/gun.js
@@ -80,9 +80,6 @@
            message: "请输入组织机构",
            trigger: "blur"
        }],
        // addDisplay: true,
        // editDisplay: true,
        // viewDisplay: true,
        overHidden: true,
        // searchSpan: 4,
        dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
@@ -90,13 +87,7 @@
            label: "title",
            value: "id"
        },
        // search: true,
        type: "select",
        // rules: [{
        //     required: true,
        //     message: "请选择学历",
        //     trigger: "blur"
        // }],
    },
    {
        label: "责任人",
src/views/securityGuard/securityGuard.vue
@@ -130,7 +130,7 @@
              :type="type"
              v-if="permission.securityGuard_check"
              @click.stop="rowCheck(row)"
              >审查异常标记
              >异常
            </el-button>
          </template>
@@ -139,9 +139,12 @@
            <el-tag v-if="row.sex == 2">女</el-tag>
          </template>
          <template slot-scope="{ row }" slot="deptId">
            <el-tag class="rowClickSelf" @click="rowClickSelf(row.deptId)">{{
              row.$deptId
            }}</el-tag>
            <el-tag
              class="rowClickSelf"
              title="点击查看所属公司情况"
              @click="rowClickSelf(row.deptId)"
              >{{ row.$deptId }}</el-tag
            >
          </template>
          <template slot-scope="{ row }" slot="tenantName">
            <el-tag>{{ row.tenantName }}</el-tag>
@@ -394,11 +397,12 @@
        searchMenuSpan: 6,
        stripe: true,
        border: true,
        delBtn: false,
        align: "center",
        index: true,
        delBtnText: "注销",
        menuWidth: 276,
        menuWidth: 271,
        selection: true,
        viewBtn: true,
        defaultExpandAll: true,
src/views/securityGuard/securityGuardOnce.vue
New file
@@ -0,0 +1,1530 @@
<template>
  <el-row class="securityGuard">
    <el-col :span="0" style="display: none">
      <div class="box">
        <el-scrollbar>
          <basic-container>
            <avue-tree
              :option="treeOption"
              :data="treeData"
              @node-click="nodeClick"
            />
          </basic-container>
        </el-scrollbar>
      </div>
    </el-col>
    <el-col :span="24">
      <basic-container>
        <avue-crud
          :option="option"
          :search.sync="search"
          :table-loading="loading"
          :data="data"
          ref="crud"
          v-model="form"
          :permission="permissionList"
          @row-del="rowDel"
          @row-update="rowUpdate"
          :row-style="rowStyle"
          @row-save="rowSave"
          :before-open="beforeOpen"
          :page.sync="page"
          @search-change="searchChange"
          @search-reset="searchReset"
          @selection-change="selectionChange"
          @current-change="currentChange"
          @size-change="sizeChange"
          @refresh-change="refreshChange"
          @on-load="onLoad"
        >
          <template slot="menuLeft">
            <el-button
              type="success"
              size="small"
              plain
              icon="el-icon-upload2"
              v-if="permission.securityGuard_import"
              @click="handleImport1"
              >批量导入
            </el-button>
            <el-button
              type="danger"
              style="display: none"
              size="small"
              plain
              icon="el-icon-delete"
              @click="handleDelete"
              >注 销
            </el-button>
            <el-button
              type="info"
              style="display: none"
              size="small"
              plain
              v-if="permission.user_role"
              icon="el-icon-user"
              @click="handleGrant"
              >角色配置
            </el-button>
            <el-button
              type="info"
              style="display: none"
              size="small"
              plain
              v-if="permission.user_reset"
              icon="el-icon-refresh"
              @click="handleReset"
              >密码重置
            </el-button>
            <el-button
              type="info"
              style="display: none"
              size="small"
              plain
              v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-setting"
              @click="handlePlatform"
              >平台配置
            </el-button>
            <el-button
              type="success"
              style="display: none"
              size="small"
              plain
              v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-upload2"
              @click="handleImport"
              >导入
            </el-button>
            <el-button
              type="warning"
              style="display: none"
              size="small"
              plain
              v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-download"
              @click="handleExport"
              >导出
            </el-button>
          </template>
          <template slot-scope="{ type, size, row }" slot="menu">
            <el-button
              icon="el-icon-s-custom"
              :size="size"
              :type="type"
              @click.stop="rowClick(row)"
              >查看
            </el-button>
            <el-button
              icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="permission.securityGuard_delete"
              @click.stop="rowDel(row)"
              >离职登记
            </el-button>
            <el-button
              icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="permission.securityGuard_check"
              @click.stop="rowCheck(row)"
              >审查异常标记
            </el-button>
          </template>
          <template slot-scope="{ row }" slot="sex">
            <el-tag v-if="row.sex == 1">男</el-tag>
            <el-tag v-if="row.sex == 2">女</el-tag>
          </template>
          <template slot-scope="{ row }" slot="deptId">
            <el-tag
              class="rowClickSelf"
              title="点击查看所属公司情况"
              @click="rowClickSelf(row.deptId)"
              >{{ row.$deptId }}</el-tag
            >
          </template>
          <template slot-scope="{ row }" slot="tenantName">
            <el-tag>{{ row.tenantName }}</el-tag>
          </template>
          <template slot-scope="{ row }" slot="roleName">
            <el-tag>{{ row.roleName }}</el-tag>
          </template>
          <template slot-scope="{ row }" slot="deptName">
            <el-tag>{{ row.deptName }}</el-tag>
          </template>
          <template slot-scope="{ row }" slot="userTypeName">
            <el-tag>{{ row.userTypeName }}</el-tag>
          </template>
        </avue-crud>
        <el-dialog
          title="用户角色配置"
          append-to-body
          :visible.sync="roleBox"
          width="345px"
        >
          <el-tree
            :data="roleGrantList"
            show-checkbox
            check-strictly
            default-expand-all
            node-key="id"
            ref="treeRole"
            :default-checked-keys="roleTreeObj"
            :props="props"
          >
          </el-tree>
          <span slot="footer" class="dialog-footer">
            <el-button @click="roleBox = false">取 消</el-button>
            <el-button type="primary" @click="submitRole">确 定</el-button>
          </span>
        </el-dialog>
        <el-dialog
          title="用户数据导入"
          append-to-body
          :visible.sync="excelBox"
          width="555px"
        >
          <avue-form
            :option="excelOption"
            v-model="excelForm"
            :upload-after="uploadAfter"
          >
            <template slot="excelTemplate">
              <el-button type="primary" @click="handleTemplate">
                点击下载<i class="el-icon-download el-icon--right"></i>
              </el-button>
            </template>
          </avue-form>
        </el-dialog>
        <el-dialog
          title="用户平台配置"
          append-to-body
          :visible.sync="platformBox"
        >
          <avue-crud
            :option="platformOption"
            :table-loading="platformLoading"
            :data="platformData"
            ref="platformCrud"
            v-model="platformForm"
            :before-open="platformBeforeOpen"
            :page.sync="platformPage"
            :permission="platformPermissionList"
            @row-update="platformRowUpdate"
            @search-change="platformSearchChange"
            @search-reset="platformSearchReset"
            @selection-change="platformSelectionChange"
            @current-change="platformCurrentChange"
            @size-change="platformSizeChange"
            @refresh-change="platformRefreshChange"
            @on-load="platformOnLoad"
          >
            <template slot-scope="{ row }" slot="tenantName">
              <el-tag>{{ row.tenantName }}</el-tag>
            </template>
            <template slot-scope="{ row }" slot="userTypeName">
              <el-tag>{{ row.userTypeName }}</el-tag>
            </template>
          </avue-crud>
        </el-dialog>
        <el-dialog
          title="保安员导入"
          append-to-body
          :visible.sync="excelBox1"
          width="555px"
        >
          <avue-form
            :option="excelOption1"
            v-model="excelForm1"
            :upload-after="uploadAfter1"
          >
            <template slot="excelTemplate">
              <el-button type="primary" @click="handleTemplate1">
                点击下载<i class="el-icon-download el-icon--right"></i>
              </el-button>
            </template>
          </avue-form>
        </el-dialog>
      </basic-container>
    </el-col>
  </el-row>
</template>
<script>
import {
  getUser,
  getUserPlatform,
  remove,
  update,
  updatePlatform,
  add,
  securitySave,
  grant,
  resetPassword,
  getUserPractitionersInfo,
  saveOrUpdateUserPractitionersInfo,
} from "@/api/system/user";
import { getList } from "@/api/securityGuard/securityGuard";
import { getDeptLazyTree } from "@/api/system/dept";
import { getRoleTree, getRoleDetail } from "@/api/system/role";
import { getPostList } from "@/api/system/post";
import { mapGetters } from "vuex";
import website from "@/config/website";
import { getToken } from "@/util/auth";
import { securityFormPageColumn } from "./data";
import { mapState } from "vuex";
export default {
  data() {
    const validatePass = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入密码"));
      } else {
        callback();
      }
    };
    const validatePass2 = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请再次输入密码"));
      } else if (value !== this.form.password) {
        callback(new Error("两次输入密码不一致!"));
      } else {
        callback();
      }
    };
    return {
      securityid: "",
      excelBox1: false,
      isSecurity: false,
      excelForm1: {},
      excelOption1: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            label: "文件上传",
            prop: "excelFile",
            type: "upload",
            drag: true,
            loadText: "文件上传中,请稍等",
            span: 24,
            propsHttp: {
              res: "data",
            },
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/blade-user/import-user",
          },
          {
            label: "模板下载",
            prop: "excelTemplate",
            formslot: true,
            span: 24,
          },
        ],
      },
      form: {},
      search: {},
      roleBox: false,
      excelBox: false,
      platformBox: false,
      initFlag: true,
      selectionList: [],
      query: {},
      loading: true,
      platformLoading: false,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      roleId: "1412226235153731586",
      deptId: "1413470343230877697",
      platformPage: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      init: {
        roleTree: [],
        deptTree: [],
      },
      props: {
        label: "title",
        value: "key",
      },
      roleGrantList: [],
      roleTreeObj: [],
      treeDeptId: "",
      treeData: [],
      treeOption: {
        nodeKey: "id",
        lazy: true,
        treeLoad: function (node, resolve) {
          const parentId = node.level === 0 ? 0 : node.data.id;
          getDeptLazyTree(parentId).then((res) => {
            resolve(
              res.data.data.map((item) => {
                return {
                  ...item,
                  leaf: !item.hasChildren,
                };
              })
            );
          });
        },
        addBtn: false,
        menu: false,
        size: "small",
        props: {
          labelText: "标题",
          label: "title",
          value: "value",
          children: "children",
        },
      },
      option: {
        height: "auto",
        calcHeight: 80,
        tip: false,
        searchShow: true,
        indexWidth: 55,
        searchMenuSpan: 6,
        stripe: true,
        border: true,
        align: "center",
        index: true,
        delBtnText: "注销",
        menuWidth: 375,
        selection: true,
        viewBtn: true,
        defaultExpandAll: true,
        //dialogType: 'drawer',
        dialogClickModal: false,
        column: securityFormPageColumn,
        group: [
          {
            label: "基础信息",
            labelWidth: "110",
            prop: "baseInfo",
            icon: "el-icon-user-solid",
            column: [
              {
                label: "所属保安公司",
                prop: "deptId",
                type: "tree",
                // dicUrl:
                // "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
                // dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
                props: {
                  label: "title",
                  value: "id",
                },
                // disabled: true,
                rules: [
                  {
                    required: true,
                    message: "请选择保安公司",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "登录账号",
                prop: "account",
                rules: [
                  {
                    required: true,
                    message: "请输入登录账号",
                    trigger: "blur",
                  },
                ],
                // disabled: true,
              },
              {
                label: "密码",
                prop: "password",
                hide: true,
                editDisplay: false,
                viewDisplay: false,
                rules: [
                  { required: true, validator: validatePass, trigger: "blur" },
                ],
              },
              {
                label: "确认密码",
                prop: "password2",
                hide: true,
                editDisplay: false,
                viewDisplay: false,
                rules: [
                  { required: true, validator: validatePass2, trigger: "blur" },
                ],
              },
              {
                label: "姓名",
                prop: "realName",
                rules: [
                  {
                    required: true,
                    message: "请输入姓名",
                    trigger: "blur",
                  },
                  {
                    min: 2,
                    max: 5,
                    message: "姓名长度在2到5个字符",
                  },
                ],
              },
              {
                label: "昵称",
                prop: "name",
              },
              {
                label: "个人照片",
                type: "upload",
                listType: "picture-img",
                propsHttp: {
                  res: "data",
                  url: "link",
                },
                canvasOption: {
                  text: " ",
                  ratio: 0.1,
                },
                action: "/api/blade-resource/oss/endpoint/put-file",
                tip: "只能上传jpg/png个人头像,且不超过500kb",
                span: 12,
                row: true,
                prop: "myPicture",
              },
              // {
              //   label: "编号",
              //   prop: "code",
              // },
              {
                label: "所属辖区",
                prop: "jurisdiction",
                // multiple: true,
                type: "tree",
                dicUrl: "/api/jurisdiction/lazy-tree?parentId=0",
                props: {
                  label: "title",
                  value: "id",
                },
                checkStrictly: true,
                slot: true,
                rules: [
                  {
                    required: false,
                    message: "请选择所属辖区",
                    trigger: "click",
                  },
                ],
              },
              // {
              //   label: "所属角色",
              //   prop: "roleId",
              //   multiple: true,
              //   type: "tree",
              //   dicData: [],
              //   props: {
              //     label: "title",
              //   },
              //   checkStrictly: true,
              //   slot: true,
              //   rules: [
              //     {
              //       required: true,
              //       message: "请选择所属角色",
              //       trigger: "click",
              //     },
              //   ],
              // },
              // {
              //   label: "所属岗位",
              //   prop: "postId",
              //   type: "tree",
              //   multiple: true,
              //   dicData: [],
              //   props: {
              //     label: "postName",
              //     value: "id",
              //   },
              //   rules: [
              //     {
              //       required: false,
              //       message: "请选择所属岗位",
              //       trigger: "click",
              //     },
              //   ],
              // },
              {
                label: "是否持证",
                prop: "hold",
                dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
                props: {
                  label: "dictValue",
                  value: "dictKey",
                },
                type: "select",
                rules: [
                  {
                    required: true,
                    message: "请选择",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "保安员证编号",
                prop: "securitynumber",
                hide: true,
              },
              {
                label: "手机号码",
                prop: "phone",
                overHidden: true,
                rules: [
                  {
                    required: true,
                    message: "请输入手机号",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "电子邮箱",
                prop: "email",
              },
              {
                label: "身份证号",
                prop: "cardid",
                hide: true,
                overHidden: true,
                rules: [
                  {
                    required: true,
                    message: "请输入身份证号",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "籍贯",
                prop: "nativeplace",
              },
              {
                label: "民族",
                prop: "nation",
              },
              {
                label: "最高学历",
                prop: "education1",
                type: "select",
                dicUrl:
                  "/api/blade-system/dict-biz/dictionary?code=educationType",
                props: {
                  label: "dictValue",
                  value: "dictKey",
                },
                dataType: "number",
                slot: true,
              },
              {
                label: "政治面貌",
                prop: "politicaloutlook",
              },
              {
                label: "健康状态",
                prop: "healstats",
              },
              {
                label: "身高",
                prop: "height",
              },
              {
                label: "联系地址",
                prop: "address",
              },
              {
                label: "户口所在地",
                prop: "registered",
              },
              {
                label: "入职时间",
                prop: "rtime",
                type: "date",
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
              },
              {
                label: "性别",
                prop: "sex",
                type: "select",
                slot: true,
                dicData: [
                  {
                    label: "男",
                    value: 1,
                  },
                  {
                    label: "女",
                    value: 2,
                  },
                  // {
                  //   label: "未知",
                  //   value: 3,
                  // },
                ],
              },
              {
                label: "生日",
                type: "date",
                prop: "birthday",
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
              },
            ],
          },
          {
            label: "从业信息",
            prop: "detailInfo",
            icon: "el-icon-s-order",
            column: [
              {
                prop: "UserPractitionersInfo",
                type: "dynamic",
                border: false,
                span: 24,
                children: {
                  align: "left",
                  headerAlign: "center",
                  type: "form",
                  rowAdd: (done) => {
                    console.log(done, 111);
                    done({
                      input: "默认值",
                    });
                  },
                  rowDel: (row, done) => {
                    console.log(row, 222);
                    done();
                  },
                  column: [
                    {
                      width: 200,
                      label: "单位名称",
                      prop: "companyname",
                      formslot: true,
                    },
                    {
                      width: 200,
                      label: "部门",
                      prop: "department",
                      formslot: true,
                    },
                    {
                      width: 200,
                      label: "岗位",
                      prop: "post",
                      formslot: true,
                    },
                    {
                      width: 200,
                      label: "岗位职责",
                      prop: "responsibilities",
                      formslot: true,
                    },
                    {
                      width: 200,
                      label: "入职时间",
                      type: "date",
                      format: "yyyy-MM-dd",
                      valueFormat: "yyyy-MM-dd",
                      prop: "entryTime",
                      formslot: true,
                    },
                    {
                      width: 200,
                      label: "离职时间",
                      type: "date",
                      format: "yyyy-MM-dd",
                      valueFormat: "yyyy-MM-dd",
                      prop: "departureTime",
                      formslot: true,
                    },
                    {
                      width: 200,
                      label: "离职原因",
                      prop: "leaving",
                      formslot: true,
                    },
                  ],
                },
              },
            ],
          },
        ],
      },
      data: [],
      platformQuery: {},
      platformSelectionList: [],
      platformData: [],
      platformForm: {},
      platformOption: {
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: true,
        index: true,
        selection: true,
        viewBtn: true,
        dialogClickModal: false,
        menuWidth: 120,
        editBtnText: "配置",
        column: [
          {
            label: "登录账号",
            prop: "account",
            search: true,
            display: false,
          },
          {
            label: "所属保安单位",
            prop: "tenantName",
            slot: true,
            display: false,
          },
          {
            label: "姓名",
            prop: "realName",
            search: true,
            display: false,
          },
          {
            label: "平台",
            prop: "userTypeName",
            slot: true,
            display: false,
          },
          {
            label: "平台",
            type: "select",
            dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            dataType: "number",
            search: true,
            hide: true,
            display: false,
            prop: "userType",
            rules: [
              {
                required: true,
                message: "请选择平台",
                trigger: "blur",
              },
            ],
          },
          {
            label: "拓展",
            prop: "userExt",
            type: "textarea",
            minRows: 8,
            span: 24,
            overHidden: true,
            row: true,
            hide: true,
          },
        ],
      },
      excelForm: {},
      excelOption: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            label: "模板上传",
            prop: "excelFile",
            type: "upload",
            drag: true,
            loadText: "模板上传中,请稍等",
            span: 24,
            propsHttp: {
              res: "data",
            },
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/blade-user/import-user",
          },
          // {
          //   label: "数据覆盖",
          //   prop: "isCovered",
          //   type: "switch",
          //   align: "center",
          //   width: 80,
          //   dicData: [
          //     {
          //       label: "否",
          //       value: 0,
          //     },
          //     {
          //       label: "是",
          //       value: 1,
          //     },
          //   ],
          //   value: 0,
          //   slot: true,
          //   rules: [
          //     {
          //       required: true,
          //       message: "请选择是否覆盖",
          //       trigger: "blur",
          //     },
          //   ],
          // },
          {
            label: "模板下载",
            prop: "excelTemplate",
            formslot: true,
            span: 24,
          },
        ],
      },
    };
  },
  watch: {
    "form.tenantId"() {
      if (this.form.tenantId !== "" && this.initFlag) {
        this.initData(this.form.tenantId);
      }
    },
    "form.deptId"() {
      this.initData(this.form.tenantId);
    },
    "excelForm.isCovered"() {
      if (this.excelForm.isCovered !== "") {
        const column = this.findObject(this.excelOption.column, "excelFile");
        column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
      }
    },
  },
  computed: {
    ...mapGetters(["userInfo", "permission"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.securityGuard_add, false),
        viewBtn: this.vaildData(null, false),
        delBtn: this.vaildData(this.permission.securityGuard_delete, false),
        editBtn: this.vaildData(this.permission.securityGuard_edit, false),
      };
    },
    platformPermissionList() {
      return {
        addBtn: false,
        viewBtn: false,
        delBtn: false,
        editBtn: this.vaildData(this.permission.user_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
    ...mapState({
      userInfo: (state) => state.user.userInfo,
    }),
  },
  beforeCreate() {},
  created() {},
  mounted() {
    // this.option.column[0].hide = true
    // 非保安单位模式默认加载管理组数据
    if (!website.tenantMode) {
      this.initData(website.tenantId);
    }
    var flag = false,
      i = 0,
      ind = null;
    this.$store.state.tags.tagList.forEach((item, index) => {
      if (item.label == "保安员查询") {
        if (flag == false) {
          ind = index;
          flag = true;
        }
        i++;
      }
    });
    if (i > 1) {
      this.$store.state.tags.tagList.splice(ind, 1);
    }
  },
  methods: {
    handleImport1() {
      this.excelBox1 = true;
    },
    uploadAfter1(res, done, loading, column) {
      window.console.log(column);
      this.excelBox1 = false;
      // this.refreshChange();
      done();
    },
    handleTemplate1() {
      window.open(`/api/blade-user/export-template-security`);
    },
    //行点击事件
    rowClick(row) {
      console.log(row, 111);
      this.$router.push({
        path: "/securityGuardDetail",
        query: { row: JSON.stringify(row) },
      });
    },
    rowClickSelf(row) {
      console.log(row, "baoan");
      this.$router.push({
        path: "/securityUnitChild",
        query: { fromSecunityGuardId: row },
      });
    },
    nodeClick(data) {
      this.treeDeptId = data.id;
      this.page.currentPage = 1;
      this.onLoad(this.page);
    },
    initData(tenantId) {
      // getRoleTree(tenantId).then((res) => {
      //   const column = this.findObject(this.option.group, "roleId");
      //   column.dicData = res.data.data;
      // });
      // getDeptTree(tenantId).then((res) => {
      //   const column = this.findObject(this.option.group, "deptId");
      //   column.dicData = res.data.data;
      // });
      // getPostList(tenantId).then((res) => {
      //   const column = this.findObject(this.option.group, "postId");
      //   column.dicData = res.data.data;
      // });
    },
    submitRole() {
      const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
      grant(this.ids, roleList).then(() => {
        this.roleBox = false;
        this.$message({
          type: "success",
          message: "操作成功!",
        });
        this.onLoad(this.page);
      });
    },
    rowSave(row, done, loading) {
      if (row.deptId) {
        row.deptId = row.deptId;
      }
      if (row.roleId) {
        row.roleId = row.roleId.join(",");
      }
      if (row.postId) {
        row.postId = row.postId.join(",");
      }
      const userPractitionersList = [];
      var userPractitionersInfo = row.UserPractitionersInfo;
      if (userPractitionersInfo.length > 0) {
        userPractitionersInfo.forEach((item) => {
          const info = {
            companyname: item.companyname,
            department: item.department,
            departureTime: item.departureTime,
            entryTime: item.entryTime,
            name: row.realName,
            leaving: item.leaving,
            securityid: row.id,
            post: item.post,
            responsibilities: item.responsibilities,
          };
          userPractitionersList.push(info);
        });
      }
      const user = {
        account: row.account,
        address: row.address,
        birthday: row.birthday,
        cardid: row.cardid,
        deptId: row.deptId,
        education: row.education,
        email: row.email,
        height: row.height,
        hold: row.hold,
        jurisdiction: row.jurisdiction,
        myPicture: row.myPicture,
        name: row.name,
        nation: row.nation,
        nativeplace: row.nativeplace,
        password: row.password,
        password2: row.password2,
        phone: row.phone,
        politicaloutlook: row.politicaloutlook,
        realName: row.realName,
        registered: row.registered,
        rtime: row.rtime,
        securitynumber: row.securitynumber,
        sex: row.sex,
      };
      const userMap = {
        user: user,
        userPractitionersInfo: userPractitionersList,
      };
      securitySave(userMap).then(
        () => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.initFlag = false;
          this.onLoad(this.page);
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowUpdate(row, index, done, loading) {
      row.deptId = row.deptId;
      row.roleId = row.roleId.join(",");
      row.postId = row.postId.join(",");
      const userPractitionersList = [];
      var userPractitionersInfo = row.UserPractitionersInfo;
      if (userPractitionersInfo.length > 0) {
        userPractitionersInfo.forEach((item) => {
          const info = {
            companyname: item.companyname,
            department: item.department,
            departureTime: item.departureTime,
            entryTime: item.entryTime,
            name: row.realName,
            leaving: item.leaving,
            securityid: row.id,
            post: item.post,
            responsibilities: item.responsibilities,
          };
          userPractitionersList.push(info);
        });
      }
      var IdCardNo = row.id;
      //值替换,education 放在页面会卡死
      row.education = row.education1;
      update(row).then(
        () => {
          const experience = {
            securityid: IdCardNo,
            userPractitionersInfo: userPractitionersList,
          };
          //更新从业信息
          saveOrUpdateUserPractitionersInfo(experience).then(() => {
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
          this.initFlag = false;
          this.onLoad(this.page);
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowDel(row) {
      this.$confirm("确定将选择保安登记离职?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          row.status = "0";
          return update(row);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    rowCheck(row) {
      this.$confirm("确定审查异常标记?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          row.examinationType = "1";
          return update(row);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    searchReset() {
      this.query = {};
      this.treeDeptId = "";
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择保安注销?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    handleReset() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择账号密码重置为123456?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return resetPassword(this.ids);
        })
        .then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
    },
    handleGrant() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.roleTreeObj = [];
      if (this.selectionList.length === 1) {
        this.roleTreeObj = this.selectionList[0].roleId.split(",");
      }
      getRoleTree().then((res) => {
        this.roleGrantList = res.data.data;
        this.roleBox = true;
      });
    },
    handlePlatform() {
      this.platformBox = true;
    },
    handleImport() {
      this.excelBox = true;
    },
    uploadAfter(res, done, loading, column) {
      window.console.log(column);
      this.excelBox = false;
      this.refreshChange();
      done();
    },
    handleExport() {
      this.$confirm("是否导出保安数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        window.open(
          `/api/blade-user/export-user?${
            this.website.tokenHeader
          }=${getToken()}&account=${this.search.account}&realName=${
            this.search.realName
          }`
        );
      });
    },
    handleTemplate() {
      window.open(
        `/api/blade-user/export-template?${
          this.website.tokenHeader
        }=${getToken()}`
      );
    },
    beforeOpen(done, type) {
      var that = this;
      if (["edit", "view"].includes(type)) {
        getUser(this.form.id).then((res) => {
          this.form = res.data.data;
          var d = {
            education1: res.data.data.education,
          };
          this.form = {
            ...this.form,
            ...d,
          };
          // this.from["education1"] = res.data.data.education;
          if (this.form.hasOwnProperty("deptId")) {
            this.form.deptId = this.form.deptId;
          }
          if (this.form.hasOwnProperty("roleId")) {
            this.form.roleId = this.form.roleId.split(",");
          }
          if (this.form.hasOwnProperty("postId")) {
            this.form.postId = this.form.postId.split(",");
          }
          var userInfo = res.data.data;
          //获取用户从业信息
          getUserPractitionersInfo(userInfo.id).then((res1) => {
            that.form.UserPractitionersInfo = res1.data.data;
          });
        });
      }
      this.initFlag = true;
      done();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    //行样式调整
    rowStyle({ row, column, rowIndex }) {
      if (row.examinationType == "1") {
        return {
          color: "#ff2727",
        };
      }
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      var that = this;
      //判断是否是从保安公司进来
      var ids = this.$route.query.departmentid || false;
      // console.log(ids, 888);
      // return;
      //获取当前登录人员的角色信息
      var roleIds = this.userInfo.role_id.split(",");
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
          var roleAlias = res.data.data.roleAlias;
          if (
            roleAlias == "保安公司管理员" ||
            roleAlias == "保安" ||
            roleAlias == "未持证保安"
          ) {
            //去除保安公司查询
            const column = that.findObject(that.option.column, "deptId");
            column.search = false;
            const deptColumn = that.findObject(that.option.group, "deptId");
            deptColumn.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
            //禁止编辑
            deptColumn.disabled = true;
            deptColumn.value = that.userInfo.dept_id;
            that.isSecurity = true;
            //如果是保安公司管理员
            params["deptId"] = that.userInfo.dept_id;
          } else if (roleAlias == "公安管理员") {
            params["jurisdiction"] = that.userInfo.jurisdiction;
            var columnDept = that.findObject(that.option.column, "deptId");
            columnDept.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
              that.userInfo.jurisdiction;
            var ColumnDeptUpdate = that.findObject(that.option.group, "deptId");
            ColumnDeptUpdate.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
              that.userInfo.jurisdiction;
          } else {
            var columnDept1 = that.findObject(that.option.column, "deptId");
            columnDept1.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
            var ColumnDeptUpdate1 = that.findObject(
              that.option.group,
              "deptId"
            );
            ColumnDeptUpdate1.dicUrl =
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
          }
          let values = {
            ...params,
          };
          values = {
            ...params,
            roleAlias: "111",
            ...that.query,
          };
          that.loading = true;
          if (ids) {
            values["deptId"] = ids;
            this.option.column[1].search = false;
            this.option.column[1].hide = false;
            this.option.column[1].addDisplay = false;
            this.option.column[1].editDisplay = false;
          } else {
            this.option.column[1].search = true;
            this.option.column[1].hide = false;
            this.option.column[1].addDisplay = true;
            this.option.column[1].editDisplay = true;
          }
          getList(page.currentPage, page.pageSize, values).then((res) => {
            const data = res.data.data;
            that.page.total = data.total;
            var d = data.records;
            var date = new Date();
            var datayear = date.getFullYear();
            for (const key in d) {
              var year = d[key].cardid.slice(6, 10);
              d[key]["age"] = +datayear - +year;
              // d[key].securitynumber = "赣洪202100009";
            }
            console.log(d);
            that.data = data.records;
            that.loading = false;
            that.selectionClear();
          });
        });
      });
    },
    platformRowUpdate(row, index, done, loading) {
      updatePlatform(row.id, row.userType, row.userExt).then(
        () => {
          this.platformOnLoad(this.platformPage);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    platformBeforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getUserPlatform(this.platformForm.id).then((res) => {
          this.platformForm = res.data.data;
        });
      }
      done();
    },
    platformSearchReset() {
      this.platformQuery = {};
      this.platformOnLoad(this.platformPage);
    },
    platformSearchChange(params, done) {
      this.platformQuery = params;
      this.platformPage.currentPage = 1;
      this.platformOnLoad(this.platformPage, params);
      done();
    },
    platformSelectionChange(list) {
      this.platformSelectionList = list;
    },
    platformSelectionClear() {
      this.platformSelectionList = [];
      this.$refs.platformCrud.toggleSelection();
    },
    platformCurrentChange(currentPage) {
      this.platformPage.currentPage = currentPage;
    },
    platformSizeChange(pageSize) {
      this.platformPage.pageSize = pageSize;
    },
    platformRefreshChange() {
      this.platformOnLoad(this.platformPage, this.platformQuery);
    },
    platformOnLoad(page, params = {}) {
      this.platformLoading = true;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query),
        this.treeDeptId
      ).then((res) => {
        const data = res.data.data;
        this.platformPage.total = data.total;
        this.platformData = data.records;
        this.platformLoading = false;
        this.selectionClear();
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.box {
  height: 800px;
}
.el-scrollbar {
  height: 100%;
}
.box .el-scrollbar__wrap {
  overflow: scroll;
}
.rowClickSelf {
  &:hover {
    cursor: pointer;
  }
}
</style>
src/views/securityUnit/armedEscort.vue
@@ -1,10 +1,712 @@
<template>
  <div>武装压运公司</div>
  <basic-container>
    <div class="securityUnit">
      <avue-crud
        :option="option"
        :data="data"
        :page.sync="page"
        ref="crudrec"
        @on-load="onLoad"
        :table-loading="loading"
        @row-save="rowSave"
        @search-change="searchChange"
        @search-reset="searchReset"
        @row-update="rowUpdate"
        @row-del="rowDel"
        @selection-change="selectionChange"
        @refresh-change="refreshChange"
      >
        <!-- @row-click="rowClick" -->
        <template slot-scope="{ row }" slot="znum">
          <el-tag
            class="rowClickSelf"
            @click="rowClickSelf(row)"
            title="点击查看保安人员情况"
            >{{ row.znum }}</el-tag
          >
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="el-icon-s-custom"
            :size="size"
            :type="type"
            @click.stop="rowClick(row)"
            >查看
          </el-button>
          <el-button
            :size="size"
            :type="type"
            @click="handleUploadPage(row)"
            icon="el-icon-circle-check"
            >附件上传
          </el-button>
        </template>
        <template slot="menuLeft">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="small"
            plain
            @click.stop="rowSave"
            >新增</el-button
          >
          <el-button
            type="danger"
            size="small"
            plain
            icon="el-icon-delete"
            @click="handleDelete"
            >删 除
          </el-button>
          <el-button
            type="success"
            size="small"
            plain
            icon="el-icon-upload2"
            @click="handleImport1"
            >批量导入
          </el-button>
        </template>
      </avue-crud>
      <div class="lod" v-show="forms != -1">
        <div class="lod-in">
          <!-- <el-col class="trees" v-if="forms == 0">
          <div class="box">
            <el-scrollbar>
              <basic-container>
                <avue-tree
                  :option="treeOption"
                  :data="treeData"
                  @node-click="nodeClick"
                />
              </basic-container>
            </el-scrollbar>
          </div>
        </el-col> -->
          <avue-form
            ref="form"
            v-model="obj0"
            :option="option0"
            v-if="forms == 0"
          >
            <template slot="menuForm">
              <el-button type="primary" @click="tip0">下一页</el-button>
              <el-button type="info" @click="tipover">取消</el-button>
            </template>
          </avue-form>
          <avue-form
            ref="form1"
            v-model="obj1"
            :option="option1"
            v-else-if="forms == 1"
          >
            <template slot="menuForm">
              <el-button type="primary" @click="tip1up1">上一页</el-button>
              <el-button type="primary" @click="tip1">下一页</el-button>
              <el-button type="info" @click="tipover">取消</el-button>
            </template>
          </avue-form>
          <avue-form
            ref="form2"
            v-model="obj2"
            :option="option2"
            v-else-if="forms == 2"
          >
            <template slot="menuForm">
              <el-button type="primary" @click="tip2up2">上一页</el-button>
              <el-button type="primary" @click="tip2">提交</el-button>
              <el-button type="info" @click="tipover">取消</el-button>
            </template>
          </avue-form>
        </div>
      </div>
    </div>
    <el-dialog
      title="保安单位导入"
      append-to-body
      :visible.sync="excelBox1"
      width="555px"
    >
      <avue-form
        :option="excelOption1"
        v-model="excelForm1"
        :upload-after="uploadAfter1"
      >
        <template slot="excelTemplate">
          <el-button type="primary" @click="handleTemplate1">
            点击下载<i class="el-icon-download el-icon--right"></i>
          </el-button>
        </template>
      </avue-form>
    </el-dialog>
  </basic-container>
</template>
<script>
export default {};
import { column, column0, column1, column2 } from "./data";
import {
  getdata,
  adddata,
  update,
  remove,
  adddata1,
  adddata2,
  getDeptLazyTree,
} from "@/api/securityUnit/securityUnit";
import { mapGetters } from "vuex";
export default {
  data() {
    var w = 160,
      s = 12;
    return {
      excelBox1: false,
      excelForm1: {},
      excelOption1: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            label: "文件上传",
            prop: "excelFile",
            type: "upload",
            drag: true,
            loadText: "文件上传中,请稍等",
            span: 24,
            propsHttp: {
              res: "data",
            },
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/information/import-informaton",
          },
          {
            label: "模板下载",
            prop: "excelTemplate",
            formslot: true,
            span: 24,
          },
        ],
      },
      loading: true, //保安单位基本信息
      selectionList: [],
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      treeData: [],
      treeOption: {
        title: "我是标题",
        filterText: "搜索关键字自定义",
        defaultExpandAll: true,
        addBtn: false,
        menu: false,
        size: "small",
        formOption: {
          labelWidth: 100,
          column: [
            {
              label: "自定义项",
              prop: "label",
            },
          ],
        },
        props: {
          labelText: "标题",
          label: "title",
          value: "id",
          children: "children",
        },
      },
      obj0: {
        title0: "保安单位基本信息",
      },
      option0: {
        emptyBtn: false,
        submitBtn: false,
        gutter: 30,
        column: column0,
      },
      obj1: {
        title1: "保安单位出资人员",
      },
      option1: {
        emptyBtn: false,
        submitBtn: false,
        gutter: 30,
        column: column1,
      },
      obj2: {
        title2: "主要管理人员信息",
      },
      option2: {
        emptyBtn: false,
        submitBtn: false,
        gutter: 30,
        column: column2,
      },
      forms: -1,
      data0: {},
      data1: {},
      data2: {},
      b0: {},
      b1: {},
      b2: {},
      noshehuibianma: 0,
      nobumen: 0,
      query: {},
      data: [],
      option: {
        index: true,
        addBtn: false,
        // card: true,
        tip: false,
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 583,
        menuWidth: 275,
        border: true,
        align: "center",
        selection: true,
        column: column,
      },
    };
  },
  computed: {
    ...mapGetters(["userInfo"]),
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.creditcode);
      });
      return ids.join(",");
    },
    ids1() {
      let ids1 = [];
      this.selectionList1.forEach((ele) => {
        ids1.push(ele.id);
      });
      return ids1.join(",");
    },
    ids2() {
      let ids2 = [];
      this.selectionList2.forEach((ele) => {
        ids2.push(ele.id);
      });
      return ids2.join(",");
    },
    haveID() {
      return this.obj0.creditcode;
    },
  },
  methods: {
    rowClickSelf(val) {
      // console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardOnce/index",
        query: { departmentid: val.departmentid },
      });
    },
    handleImport1() {
      this.excelBox1 = true;
    },
    uploadAfter1(res, done, loading, column) {
      window.console.log(column);
      this.excelBox1 = false;
      // this.refreshChange();
      done();
    },
    handleTemplate1() {
      window.open(`/api/examSubjectChoices/export-template`);
    },
    // handleChangeTABS(column) {
    //   this.typeTABS = column;
    //   // this.$message.success(JSON.stringify(column));
    //   if (column.prop == "tab1") {
    //     this.loading1 = false;
    //     this.loading2 = false;
    //     this.onLoad(this.page);
    //   } else if (column.prop == "tab2") {
    //     this.loading = false;
    //     this.loading2 = false;
    //     this.onLoad1(this.page1); //第二个表格不会自动执行
    //   } else if (column.prop == "tab3") {
    //     this.loading1 = false;
    //     this.loading = false;
    //     this.onLoad2(this.page2); //第二个表格不会自动执行
    //   }
    // },
    //保安单位基本信息
    sizeChange(val) {
      this.page1.currentPage = 1;
      this.page1.pageSize = val;
      // this.getData();
      this.onLoad(this.page, this.query);
      //   this.$message.success("行数" + val);
    },
    currentChange(val) {
      this.page1.currentPage = val;
      // this.getData();
      this.onLoad(this.page, this.query);
      //   this.$message.success("页码" + val);
    },
    rowSave(form, done, loading) {
      // console.log("save1");
      this.forms = 0;
      var that = this;
      //先获取部门接口
      getDeptLazyTree().then((res) => {
        var d = res.data.data;
        that.treeData = d;
        // console.log(d);
      });
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    rowUpdate(row, index, done, loading) {
      delete row.tenantid;
      delete row.regstsat;
      console.log(row, 0);
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          console.log(row);
          return remove(row.creditcode, row.departmentid);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定批量将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          console.log(this.ids);
          // return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crudrec.toggleSelection();
        });
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    rowClick(row) {
      // console.log(row);
      // row.identificationnumber; //统一社会信用代 码
      window.localStorage.setItem("danweidata", JSON.stringify(row));
      this.$router.push({
        path: "/securityUnitChild",
        // redirect: { name: "foo" },
        query: { rowsecurity: "fromSecurity" },
        // params: { row: row.identificationnumber },
      });
    },
    //跳转到附近列表页面
    handleUploadPage(row) {
      this.$router.push({
        path: `/resource/attachCopy`,
        query: {
          deptId: row.departmentid,
          enterprisename: row.enterprisename,
        },
      });
    },
    onLoad(page, params = {}) {
      if (this.userInfo.role_id == "1414840172333842433") {
        console.log("是公安add jurisdiction");
        params["jurisdiction"] = this.userInfo.jurisdiction;
      }
      params["stats"] = "3";
      this.loading = true;
      getdata(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
        console.log(this.data);
        this.loading = false;
      });
    },
    // nodeClick(data) {//分局   不在这添加
    //   // this.treeDeptId = data.id;
    //   // this.page.currentPage = 1;
    //   // this.onLoad(this.page);
    //   // this.$message.success(JSON.stringify(data));
    //   this.obj0["departmentid"] = data.title;
    //   this.obj1["departmentid"] = data.title;
    //   this.obj2["departmentid"] = data.title;
    //   this.obj0["useid"] = data.id;
    //   this.obj1["useid"] = data.id;
    //   this.obj2["useid"] = data.id;
    //   this.nobumen = 1;
    // },
    tip0() {
      if (this.panduanmeiyouziduan()) {
        return;
      }
      var d = {};
      for (var k in this.obj0) {
        for (var i in column0) {
          if (k == column0[i].prop && k != "title0") {
            d[k] = this.obj0[k];
          }
        }
      }
      console.log(d);
      for (var k in d) {
        if (d[k] == "" || d[k] == undefined) {
          console.log(k);
          this.$message.warning("请检查表单是否填写完整!");
          return;
        }
      }
      console.log(d, 0);
      this.data0 = d;
      this.forms = 1;
    },
    tip1() {
      if (this.panduanmeiyouziduan()) {
        return;
      }
      var d = {};
      for (var k in this.obj1) {
        for (var i in column1) {
          if (k == column1[i].prop && k != "title1") {
            d[k] = this.obj1[k];
          }
        }
      }
      d["capital"] = d["capital2"];
      delete d["capital2"];
      // console.log(d);
      for (var k in d) {
        if (d[k] == "" || d[k] == undefined) {
          console.log(k);
          this.$message.warning("请检查表单是否填写完整!");
          return;
        }
      }
      console.log(d, 1);
      this.data1 = d;
      this.forms = 2;
    },
    tip2() {
      if (this.panduanmeiyouziduan()) {
        return;
      }
      var d = {};
      for (var k in this.obj2) {
        for (var i in column2) {
          if (k == column2[i].prop && k != "title2") {
            d[k] = this.obj2[k];
          }
        }
      }
      console.log(d);
      d["cardid"] = d["cardid2"];
      delete d["cardid2"];
      d["cell"] = d["cell2"];
      delete d["cell2"];
      // d["shareholdingratio"] = d["shareholdingratio2"];
      // delete d["shareholdingratio2"];
      for (var k in d) {
        if (d[k] == "" || d[k] == undefined) {
          console.log(k);
          this.$message.warning("请检查表单是否填写完整!");
          return;
        }
      }
      console.log(d, 2);
      this.data2 = d;
      // this.data0.departmentid = this.data0.useid;
      // this.data1.departmentid = this.data1.useid;
      // this.data2.departmentid = this.data2.useid;
      // delete this.data0.useid;
      // delete this.data1.useid;
      // delete this.data2.useid;
      adddata(this.data0).then((res) => {
        console.log(res, 0);
      });
      adddata1(this.data1).then((res) => {
        console.log(res, 1);
      });
      adddata2(this.data2).then((res) => {
        console.log(res, 2);
      });
      var time = setTimeout(() => {
        this.onLoad(this.page, this.query);
        console.log(this.data0, this.data1, this.data2, "已刷新");
      }, 500);
      this.tipover();
    },
    tip1up1() {
      this.forms = 0;
    },
    tip2up2() {
      this.forms = 1;
    },
    tipover() {
      this.forms = -1;
      this.obj0 = {
        title0: "保安单位基本信息",
      };
      this.obj1 = {
        title1: "保安单位出资人员",
      };
      this.obj2 = {
        title2: "主要管理人员信息",
      };
      this.data0 = {};
      this.data1 = {};
      this.data2 = {};
      this.noshehuibianma = 0;
      this.nobumen = 0;
    },
    panduanmeiyouziduan() {
      if (this.noshehuibianma == 0) {
        this.$message.warning("请输入统一社会信用代码");
        return true;
      }
      if (this.nobumen == 0) {
        return false;
        this.$message.warning("请选则部门");
      }
      return false;
    },
  },
  watch: {
    haveID() {
      // console.log(this.haveID);
      if (this.haveID != undefined) {
        if (this.haveID.length > 5) {
          //统一社会信用代码判断
          this.noshehuibianma = 1;
        } else {
          this.noshehuibianma = 0;
        }
      }
    },
    havedata() {
      console.log(this.havedata, "qqqqq");
    },
  },
  mounted() {},
};
</script>
<style>
</style>
<style lang="scss">
.securityUnit {
  width: 100%;
  height: 100%;
  //   border: 1px solid #000;
  box-sizing: border-box;
}
// .el-card__body {
//   padding-bottom: 5px !important;
// }
// .avue-crud__tip,
// .el-tag,
// .el-tag--light {
//   padding: 0 !important;
// }
.lod {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba($color: #000000, $alpha: 0.5);
  padding: 100px 0 0 0;
  z-index: 500 !important;
  display: flex;
  // align-items: center;
  justify-content: center;
  .trees {
    z-index: 501 !important;
    position: absolute;
    width: 15%;
    top: 100px;
    left: 0;
    // display: none;
  }
  .lod-in {
    width: 70%;
    height: auto;
    background-color: transparent;
    // padding: 10px 0 0 0;
  }
  .el-collapse-item {
    padding-top: 15px !important;
  }
}
.el-collapse {
  border-top: 1px solid transparent !important;
}
.rowClickSelf {
  &:hover {
    cursor: pointer;
  }
}
</style>
src/views/securityUnit/data.js
@@ -63,6 +63,7 @@
        // width: 130,
        overHidden: true
    },
    {
        label: "企业类型",
        prop: "stats",
@@ -122,6 +123,33 @@
    //     // // }],
    // },
    {
        label: "保安人数",
        labelWidth: 160,
        prop: "znum",
        width: 69,
        // search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "派遣人数",
        labelWidth: 160,
        prop: "pnum",
        width: 69,
        // search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "持证人数",
        labelWidth: 160,
        prop: "cnum",
        width: 69,
        // search: true,
        searchSpan: 4,
        searchLabelWidth: 100
    },
    {
        label: "注册时间",
        prop: "establishtime",
        labelWidth: 160,
src/views/securityUnit/index copy 2.vue
File was deleted
src/views/securityUnit/localCompany.vue
@@ -15,9 +15,25 @@
        @row-del="rowDel"
        @selection-change="selectionChange"
        @refresh-change="refreshChange"
        @row-click="rowClick"
      >
        <!-- @row-click="rowClick" -->
        <template slot-scope="{ row }" slot="znum">
          <el-tag
            class="rowClickSelf"
            @click="rowClickSelf(row)"
            title="点击查看保安人员情况"
            >{{ row.znum }}</el-tag
          >
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="el-icon-s-custom"
            :size="size"
            :type="type"
            @click.stop="rowClick(row)"
            >查看
          </el-button>
          <el-button
            :size="size"
            :type="type"
@@ -204,36 +220,6 @@
          children: "children",
        },
      },
      // treeOption: {
      //   nodeKey: "id",
      //   // lazy: true,
      //   // treeLoad: function (node, resolve) {
      //   //   // const parentId = node.level === 0 ? 0 : node.data.id;
      //   //   getDeptLazyTree().then((res) => {
      //   //     resolve(
      //   //       res.data.data.map((item) => {
      //   //         console.log({
      //   //           ...item,
      //   //           leaf: !item.hasChildren,
      //   //         });
      //   //         return {
      //   //           ...item,
      //   //           leaf: !item.hasChildren,
      //   //         };
      //   //       })
      //   //     );
      //   //   });
      //   // },
      //   addBtn: false,
      //   menu: false,
      //   size: "small",
      //   props: {
      //     labelText: "标题",
      //     label: "title",
      //     value: "value",
      //     children: "children",
      //   },
      // },
      obj0: {
        title0: "保安单位基本信息",
@@ -283,7 +269,7 @@
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 583,
        menuWidth: 220,
        menuWidth: 275,
        border: true,
        align: "center",
        selection: true,
@@ -319,6 +305,13 @@
    },
  },
  methods: {
    rowClickSelf(val) {
      // console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardOnce/index",
        query: { departmentid: val.departmentid },
      });
    },
    handleImport1() {
      this.excelBox1 = true;
    },
@@ -711,4 +704,9 @@
.el-collapse {
  border-top: 1px solid transparent !important;
}
.rowClickSelf {
  &:hover {
    cursor: pointer;
  }
}
</style>
src/views/securityUnit/securityTraining.vue
@@ -15,9 +15,25 @@
        @row-del="rowDel"
        @selection-change="selectionChange"
        @refresh-change="refreshChange"
        @row-click="rowClick"
      >
        <!-- @row-click="rowClick" -->
        <template slot-scope="{ row }" slot="znum">
          <el-tag
            class="rowClickSelf"
            @click="rowClickSelf(row)"
            title="点击查看保安人员情况"
            >{{ row.znum }}</el-tag
          >
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="el-icon-s-custom"
            :size="size"
            :type="type"
            @click.stop="rowClick(row)"
            >查看
          </el-button>
          <el-button
            :size="size"
            :type="type"
@@ -285,7 +301,7 @@
        searchMenuSpan: 6,
        height: 583,
        menuWidth: 220,
        menuWidth: 275,
        align: "center",
        selection: true,
        column: column,
@@ -320,6 +336,13 @@
    },
  },
  methods: {
    rowClickSelf(val) {
      // console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardOnce/index",
        query: { departmentid: val.departmentid },
      });
    },
    handleImport1() {
      this.excelBox1 = true;
    },
src/views/securityUnit/selfRecruitedSecurityGuard.vue
@@ -15,9 +15,25 @@
        @row-del="rowDel"
        @selection-change="selectionChange"
        @refresh-change="refreshChange"
        @row-click="rowClick"
      >
        <!-- @row-click="rowClick" -->
        <template slot-scope="{ row }" slot="znum">
          <el-tag
            class="rowClickSelf"
            @click="rowClickSelf(row)"
            title="点击查看保安人员情况"
            >{{ row.znum }}</el-tag
          >
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="el-icon-s-custom"
            :size="size"
            :type="type"
            @click.stop="rowClick(row)"
            >查看
          </el-button>
          <el-button
            :size="size"
            :type="type"
@@ -283,7 +299,7 @@
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 583,
        menuWidth: 220,
        menuWidth: 275,
        align: "center",
        border: true,
@@ -320,6 +336,13 @@
    },
  },
  methods: {
    rowClickSelf(val) {
      // console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardOnce/index",
        query: { departmentid: val.departmentid },
      });
    },
    handleImport1() {
      this.excelBox1 = true;
    },
src/views/securityUnit/transRegionalcompany.vue
@@ -15,9 +15,26 @@
        @row-del="rowDel"
        @selection-change="selectionChange"
        @refresh-change="refreshChange"
        @row-click="rowClick"
      >
        <!-- @row-click="rowClick" -->
        <template slot-scope="{ row }" slot="znum">
          <el-tag
            class="rowClickSelf"
            @click="rowClickSelf(row)"
            title="点击查看保安人员情况"
            >{{ row.znum }}</el-tag
          >
        </template>
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button
            icon="el-icon-s-custom"
            :size="size"
            :type="type"
            @click.stop="rowClick(row)"
            >查看
          </el-button>
          <el-button
            :size="size"
            :type="type"
@@ -284,7 +301,7 @@
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 583,
        menuWidth: 220,
        menuWidth: 275,
        align: "center",
        border: true,
@@ -321,6 +338,13 @@
    },
  },
  methods: {
    rowClickSelf(val) {
      // console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardOnce/index",
        query: { departmentid: val.departmentid },
      });
    },
    handleImport1() {
      this.excelBox1 = true;
    },
src/views/securityUnitChild/businessLicense.vue
New file
@@ -0,0 +1,96 @@
<template>
  <div class="businessLicense">
    <el-container>
      <el-main>
        <avue-form :option="option" v-model="form" :upload-after="uploadAfter">
        </avue-form
      ></el-main>
    </el-container>
  </div>
</template>
<script>
import { update } from "@/api/securityUnit/securityUnit";
export default {
  props: ["row"],
  data() {
    return {
      form: {
        imgUrl: [],
      },
      option: {
        submitBtn: false,
        emptyBtn: false,
        labelWidth: 120,
        column: [
          {
            label: "",
            prop: "imgUrl",
            type: "upload",
            listType: "picture-img",
            span: 24,
            propsHttp: {
              res: "data",
            },
            tip: "只能上传jpg/png格式图片,且不超过2Mb",
            action: "/api/blade-resource/oss/endpoint/put-files?file=",
          },
        ],
      },
    };
  },
  mounted() {
    this.seeImg();
  },
  comments: {
    srcList() {
      return [this.res];
    },
  },
  methods: {
    seeImg() {
      if (this.row.businessLicense == "") {
        // console.log("暂无营业执照");
      } else {
        // console.log("have");
        this.form.imgUrl = this.row.businessLicense;
      }
    },
    uploadAfter(res, done, loading, column) {
      this.row.businessLicense = res.url;
      update(this.row).then(
        () => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          this.$message({
            type: "warning",
            message: "请上传图片,再重试!",
          });
          done();
        }
      );
      done();
    },
  },
};
</script>
<style lang="scss" scoped>
.businessLicense {
  padding-top: 15px;
  background-color: #fff;
}
.el-main {
  background-color: #fff;
  color: #333;
  text-align: center;
  position: relative;
  right: 5%;
}
</style>
src/views/securityUnitChild/index.vue
@@ -120,10 +120,19 @@
      <!-- 车辆管理 -->
      <car :fromDeptId="departmentid"></car>
    </span>
    <span v-else-if="typeTABS.prop === 'tab6'" class="tab">
      <!-- 枪支管理 -->
    <!-- <span v-else-if="typeTABS.prop === 'tab6'" class="tab">
      枪支管理
      <gun :fromDeptId="departmentid"></gun>
    </span> -->
    <span v-else-if="typeTABS.prop === 'tab7'" class="tab">
      <!-- 营业执照 -->
      <businessLicense :row="obj0"></businessLicense>
    </span>
    <span v-else-if="typeTABS.prop === 'tab8'" class="tab">
      <!-- 许可证  -->
      <licence :row="obj0"></licence>
    </span>
    <span v-else-if="typeTABS.prop === 'tab9'" class="tab"> 社保记录 </span>
    <el-dialog
      title="出资人导入"
      append-to-body
@@ -186,12 +195,16 @@
import equipments from "../securityEquipment/equipments.vue";
import car from "../securityEquipment/car.vue";
import gun from "../securityEquipment/gun.vue";
import licence from "./licence.vue";
import businessLicense from "./businessLicense.vue";
export default {
  components: {
    equipments: equipments,
    car: car,
    gun: gun,
    licence: licence,
    businessLicense: businessLicense,
  },
  data() {
    var DIC = {
@@ -303,10 +316,25 @@
            label: "车辆管理 ",
            prop: "tab5",
          },
          // {
          //   // icon: "el-icon-info",
          //   label: "枪支管理 ",
          //   prop: "tab6",
          // },
          {
            // icon: "el-icon-info",
            label: "枪支管理 ",
            prop: "tab6",
            label: "营业执照 ",
            prop: "tab7",
          },
          {
            // icon: "el-icon-info",
            label: "许可证 ",
            prop: "tab8",
          },
          {
            // icon: "el-icon-info",
            label: "社保记录 ",
            prop: "tab9",
          },
        ],
      },
@@ -732,7 +760,7 @@
      if (that.readLock("danweidata") != null) {
        row = JSON.parse(that.readLock("danweidata"));
        // that.obj0.title = row.enterprisename;
        // console.log(row, "row");
        console.log(row, "row");
        that.departmentid = row.departmentid;
        for (var k in row) {
          that.obj0[k] = row[k];
@@ -828,6 +856,7 @@
.tab {
  position: relative;
  // border: 1px solid red;
  background-color: #fff;
  height: 92%;
  display: inline-block;
  width: 100%;
src/views/securityUnitChild/licence.vue
New file
@@ -0,0 +1,96 @@
<template>
  <div class="License">
    <el-container>
      <el-main>
        <avue-form :option="option" v-model="form" :upload-after="uploadAfter">
        </avue-form
      ></el-main>
    </el-container>
  </div>
</template>
<script>
import { update } from "@/api/securityUnit/securityUnit";
export default {
  props: ["row"],
  data() {
    return {
      form: {
        imgUrl: [],
      },
      option: {
        submitBtn: false,
        emptyBtn: false,
        labelWidth: 120,
        column: [
          {
            label: "",
            prop: "imgUrl",
            type: "upload",
            listType: "picture-img",
            span: 24,
            propsHttp: {
              res: "data",
            },
            tip: "只能上传jpg/png格式图片,且不超过2Mb",
            action: "/api/blade-resource/oss/endpoint/put-files?file=",
          },
        ],
      },
    };
  },
  mounted() {
    this.seeImg();
  },
  comments: {
    srcList() {
      return [this.res];
    },
  },
  methods: {
    seeImg() {
      if (this.row.licence == "") {
        // console.log("暂无保安公司许可证");
      } else {
        // console.log("have");
        this.form.imgUrl = this.row.licence;
      }
    },
    uploadAfter(res, done, loading, column) {
      this.row.licence = res.url;
      update(this.row).then(
        () => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          this.$message({
            type: "warning",
            message: "请上传图片,再重试!",
          });
          done();
        }
      );
      done();
    },
  },
};
</script>
<style lang="scss" scoped>
.License {
  padding-top: 15px;
  background-color: #fff;
}
.el-main {
  background-color: #fff;
  color: #333;
  text-align: center;
  position: relative;
  right: 5%;
}
</style>