lcw
This commit is contained in:
@ -14,42 +14,45 @@ const whiteList = ['/login','/', '/oatuh_login', '/sso_redirect', '/editPassword
|
||||
* next 往下走
|
||||
*/
|
||||
let onRun = true;
|
||||
// router.beforeEach(async (to, from, next) => {
|
||||
// // 存在 token ,进入主页
|
||||
// // if (store.state.user.token) {
|
||||
// // 快捷访问
|
||||
// if (store.getters.token) {
|
||||
// // 判断用户资料是否获取
|
||||
// // 若不存在用户信息,则需要获取用户信息
|
||||
// // 触发获取用户信息的 action,并获取用户当前权限
|
||||
// await store.commit('permission/setRouteReady', true)
|
||||
// // 添加完动态路由之后,需要在进行一次主动跳转
|
||||
// const afterMenuList = await getItem('menusPermission');
|
||||
// // 处理用户权限,筛选出需要添加的权限
|
||||
// if (store.state.permission.routes == 0) {
|
||||
// const filterRoutes = await store.dispatch('permission/filterRoutes', afterMenuList)
|
||||
// filterRoutes.forEach(item => {
|
||||
// router.addRoute(item)
|
||||
// })
|
||||
// next({
|
||||
// ...to,
|
||||
// replace: true
|
||||
// })
|
||||
// } else {
|
||||
// next()
|
||||
// }
|
||||
// // 利用 addRoute 循环添加
|
||||
// } else {
|
||||
// const isOatuh = getItem('isOatuh')
|
||||
// // 没有token的情况下,可以进入白名单
|
||||
// if (whiteList.indexOf(to.path) > -1) {
|
||||
// next()
|
||||
// } else {
|
||||
// if (isOatuh) {
|
||||
// next('/oatuh_login')
|
||||
// } else {
|
||||
// next('/login')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
// 存在 token ,进入主页
|
||||
// if (store.state.user.token) {
|
||||
// 快捷访问
|
||||
if (store.getters.token) {
|
||||
// 判断用户资料是否获取
|
||||
// 若不存在用户信息,则需要获取用户信息
|
||||
// 触发获取用户信息的 action,并获取用户当前权限
|
||||
await store.commit('permission/setRouteReady', true)
|
||||
// 添加完动态路由之后,需要在进行一次主动跳转
|
||||
const afterMenuList = await getItem('menusPermission');
|
||||
// 处理用户权限,筛选出需要添加的权限
|
||||
if (store.state.permission.routes == 0) {
|
||||
const filterRoutes = await store.dispatch('permission/filterRoutes', afterMenuList)
|
||||
|
||||
console.log(filterRoutes);
|
||||
|
||||
filterRoutes.forEach(item => {
|
||||
router.addRoute(item)
|
||||
})
|
||||
next({
|
||||
...to,
|
||||
replace: true
|
||||
})
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
// 利用 addRoute 循环添加
|
||||
} else {
|
||||
const isOatuh = getItem('isOatuh')
|
||||
// 没有token的情况下,可以进入白名单
|
||||
if (whiteList.indexOf(to.path) > -1) {
|
||||
next()
|
||||
} else {
|
||||
if (isOatuh) {
|
||||
next('/oatuh_login')
|
||||
} else {
|
||||
next('/login')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -15,61 +15,33 @@ import store from "@/store";
|
||||
* 私有路由表
|
||||
*/
|
||||
|
||||
export const privateRoutes = [];
|
||||
|
||||
/**
|
||||
* 公开路由表
|
||||
*/
|
||||
export const publicRoutes = [
|
||||
{
|
||||
path: "/publicPage",
|
||||
name: "publicPage",
|
||||
component: () => import("@/views/login/publicPage")
|
||||
},
|
||||
{
|
||||
path: "/oatuh_login",
|
||||
name: "oatuh_login",
|
||||
component: () => import("@/views/login/oatuh_login")
|
||||
},
|
||||
{
|
||||
path: "/sso_redirect",
|
||||
name: "sso_redirect",
|
||||
component: () => import("@/views/login/sso_redirect")
|
||||
},
|
||||
{
|
||||
path: "/login",
|
||||
name: "login",
|
||||
component: () => import("@/views/login/index")
|
||||
},
|
||||
{
|
||||
path: "/homeMy",
|
||||
name: "homeMy",
|
||||
component: () => import("@/views/homeMy/index") //街面巡防
|
||||
},
|
||||
// {
|
||||
// path: "/dataBI",
|
||||
// name: "dataBI",
|
||||
// component: () => import("@/views/dataBI/index") //警保
|
||||
// },
|
||||
{
|
||||
path: "/editPassword", // 注意:带有路径"/"的记录中的组件"默认"是一个不返回 Promise 的函数
|
||||
component: layout,
|
||||
redirect: "/user/department-ist",
|
||||
children: [
|
||||
|
||||
export const privateRoutes = [
|
||||
{
|
||||
path: "/",
|
||||
name: "unitManagement",
|
||||
component: layout,
|
||||
redirect: "/unitManagement/unitInformation",
|
||||
meta: {
|
||||
title: "单位管理",
|
||||
icon: "personnel"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/unitManagement/unitInformation",
|
||||
name: "unitInformation",
|
||||
component: () =>
|
||||
import("@/views/securityManagement/unitInformation/index"),
|
||||
import("@/views/securityManagement/unitManagement/unitInformation/index"),
|
||||
meta: {
|
||||
title: "单位信息",
|
||||
icon: "personnel"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/personnelManagement",
|
||||
name: "personnelManagement",
|
||||
component: layout,
|
||||
meta: {
|
||||
title: "人员管理",
|
||||
icon: "personnel"
|
||||
@ -99,7 +71,8 @@ export const publicRoutes = [
|
||||
},
|
||||
{
|
||||
path: "/trainingManagement",
|
||||
name: "/trainingManagement",
|
||||
name: "trainingManagement",
|
||||
component: layout,
|
||||
meta: {
|
||||
title: "培训管理",
|
||||
icon: "personnel"
|
||||
@ -135,21 +108,22 @@ export const publicRoutes = [
|
||||
icon: "personnel"
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/examManagement",
|
||||
path: "/trainingManagement/examManagement",
|
||||
name: "examManagement",
|
||||
component: () =>
|
||||
import("@/views/securityManagement/examManagement/index"),
|
||||
import("@/views/securityManagement/trainingManagement/examManagement/index"),
|
||||
meta: {
|
||||
title: "保安考试管理",
|
||||
icon: "personnel"
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/training",
|
||||
name: "training",
|
||||
component: layout,
|
||||
meta: {
|
||||
title: "培训中心",
|
||||
icon: "personnel"
|
||||
@ -187,6 +161,7 @@ export const publicRoutes = [
|
||||
{
|
||||
path: "/njxx",
|
||||
name: "njxx",
|
||||
component: layout,
|
||||
meta: {
|
||||
title: "年检信息",
|
||||
icon: "personnel"
|
||||
@ -221,6 +196,140 @@ export const publicRoutes = [
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/systemConfig",
|
||||
name: "systemConfigModel",
|
||||
component: layout,
|
||||
meta: {
|
||||
title: "系统管理",
|
||||
icon: "personnel"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/user/userList",
|
||||
name: "userList",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/user-list/index"),
|
||||
meta: {
|
||||
title: "用户管理",
|
||||
icon: "role"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/role",
|
||||
name: "userRoleIndex",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/role-list/index"),
|
||||
meta: {
|
||||
title: "角色列表",
|
||||
icon: "role"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/menuList",
|
||||
name: "menuList",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/menu-list/index"),
|
||||
meta: {
|
||||
title: "菜单管理",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/dict/detail",
|
||||
name: "dictDetail",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/detail"),
|
||||
meta: {
|
||||
title: "字典数据"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/dict/index",
|
||||
name: "dictIndex",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/index"),
|
||||
meta: {
|
||||
title: "字典列表",
|
||||
icon: "article-ranking"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/deptAllocationUser/:id",
|
||||
name: "deptAllocationUser",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"
|
||||
),
|
||||
meta: {
|
||||
title: "管理用户"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/allocationUser/:id",
|
||||
name: "allocationUser",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/role-list/allocationUser"
|
||||
),
|
||||
meta: {
|
||||
title: "分配用户"
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 公开路由表
|
||||
*/
|
||||
export const publicRoutes = [
|
||||
{
|
||||
path: "/publicPage",
|
||||
name: "publicPage",
|
||||
component: () => import("@/views/login/publicPage")
|
||||
},
|
||||
{
|
||||
path: "/oatuh_login",
|
||||
name: "oatuh_login",
|
||||
component: () => import("@/views/login/oatuh_login")
|
||||
},
|
||||
{
|
||||
path: "/sso_redirect",
|
||||
name: "sso_redirect",
|
||||
component: () => import("@/views/login/sso_redirect")
|
||||
},
|
||||
{
|
||||
path: "/login",
|
||||
name: "login",
|
||||
component: () => import("@/views/login/index")
|
||||
},
|
||||
{
|
||||
path: "/homeMy",
|
||||
name: "homeMy",
|
||||
component: () => import("@/views/homeMy/index") //街面巡防
|
||||
},
|
||||
// {
|
||||
// path: "/dataBI",
|
||||
// name: "dataBI",
|
||||
// component: () => import("@/views/dataBI/index") //警保
|
||||
// },
|
||||
// {
|
||||
// path: "/editPassword", // 注意:带有路径"/"的记录中的组件"默认"是一个不返回 Promise 的函数
|
||||
// component: layout,
|
||||
// redirect: "/user/department-ist",
|
||||
// children: [
|
||||
|
||||
// {
|
||||
// path: "/",
|
||||
// name: "unitInformation",
|
||||
// component: () =>
|
||||
// import("@/views/securityManagement/unitInformation/index"),
|
||||
// meta: {
|
||||
// title: "单位信息",
|
||||
// icon: "personnel"
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "/systemConfig",
|
||||
// name: "systemConfigModel",
|
||||
@ -283,25 +392,25 @@ export const publicRoutes = [
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: "/dict/detail",
|
||||
name: "dictDetail",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/detail"),
|
||||
meta: {
|
||||
title: "字典数据"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/dict/index",
|
||||
name: "dictIndex",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/index"),
|
||||
meta: {
|
||||
title: "字典列表",
|
||||
icon: "article-ranking"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: "/dict/detail",
|
||||
// name: "dictDetail",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/dict/detail"),
|
||||
// meta: {
|
||||
// title: "字典数据"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/dict/index",
|
||||
// name: "dictIndex",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/dict/index"),
|
||||
// meta: {
|
||||
// title: "字典列表",
|
||||
// icon: "article-ranking"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/job",
|
||||
// name: "userJob",
|
||||
@ -344,15 +453,15 @@ export const publicRoutes = [
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// // {
|
||||
// // path: "/sys/ysjq",
|
||||
// // name: "ysjq",
|
||||
// // component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"),
|
||||
// // meta: {
|
||||
// // title: "演示警情",
|
||||
// // icon: "personnel-manage"
|
||||
// // }
|
||||
// // },
|
||||
// {
|
||||
// path: "/sys/ysjq",
|
||||
// name: "ysjq",
|
||||
// component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"),
|
||||
// meta: {
|
||||
// title: "演示警情",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/systemConfig",
|
||||
// name: "systemConfig",
|
||||
@ -1425,8 +1534,8 @@ export const publicRoutes = [
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
]
|
||||
}
|
||||
// ]
|
||||
// }
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
|
||||
@ -49,7 +49,7 @@ const formList = reactive([
|
||||
{ label: "学时安排", prop: "gksc", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "上传附件", prop: "fj", type: "upload" },
|
||||
{ label: "上传附件", prop: "fj", type: "upload", isAll: true, showBtn: true, isImg: false },
|
||||
],
|
||||
])
|
||||
|
||||
@ -63,8 +63,8 @@ const init = (type, id,) => {
|
||||
};
|
||||
|
||||
function getDateById (id) {
|
||||
qcckPost({},`/bagl/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => {
|
||||
res.fj = res.fj ? res.fj.split(','):[]
|
||||
qcckPost({},`/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => {
|
||||
res.fj = res.fj ? JSON.parse(res.fj):[]
|
||||
listQuery.value = res || {};
|
||||
})
|
||||
}
|
||||
@ -74,7 +74,11 @@ const save = () => {
|
||||
loading.value = true;
|
||||
let url = title.value == '新增' ? `/bagl/mosty-base/baxx/jxda/add` : `/bagl/mosty-base/baxx/jxda/edit`;
|
||||
let params = { ...val }
|
||||
params.fj = params.fj ? params.fj.join(','):''
|
||||
params.fj = params.fj ? JSON.stringify(params.fj):''
|
||||
|
||||
console.log(params, val);
|
||||
|
||||
return
|
||||
qcckPost(params, url).then(() => {
|
||||
loading.value = false;
|
||||
proxy.$message.success("保存成功");
|
||||
@ -87,7 +91,7 @@ const save = () => {
|
||||
}
|
||||
const close = () => {
|
||||
dialogForm.value = false;
|
||||
listQuery.value = {fj:[]}
|
||||
listQuery.value.fj = []
|
||||
FormRef.value.reset()
|
||||
};;
|
||||
|
||||
|
||||
@ -142,6 +142,8 @@ const handleLogin = () => {
|
||||
// 登录后操作;
|
||||
if (res.deptList.length === 1) {
|
||||
router.push("/");
|
||||
console.log("xxxxxxx");
|
||||
|
||||
// window.location.href = "/";
|
||||
} else {
|
||||
deptList.value = [...res.deptList];
|
||||
|
||||
@ -57,11 +57,10 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="授课教员" :prop="`pxkcList[${index}].skjy`" style="width: 100%;" :rules="rules.skjy">
|
||||
<el-input v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;"></el-input>
|
||||
<!-- <el-select v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;">
|
||||
<el-option label="张三" value="张三"></el-option>
|
||||
<el-option label="李四" value="李四"></el-option>
|
||||
</el-select> -->
|
||||
<!-- <el-input v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;"></el-input> -->
|
||||
<el-select v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;">
|
||||
<el-option v-for="items in cyryList" :key="items.id" :label="items?.xm" :value="items.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -102,6 +101,7 @@ import SelectPersonnelDialog from "./selectPersonnelDialog.vue";
|
||||
const { proxy } = getCurrentInstance()
|
||||
const visible = ref(false)
|
||||
const showDialog = ref(false)
|
||||
const cyryList = ref([])
|
||||
const formData = ref({
|
||||
pxkcList: [{
|
||||
pxkcxm: '', //课程名称
|
||||
@ -173,6 +173,7 @@ const delItem = (item,index) => {
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
getCyryList()
|
||||
showDialog.value = true
|
||||
}
|
||||
|
||||
@ -197,6 +198,18 @@ const handleChange = (val) => {
|
||||
pageData.tableData = [...pageData.tableData, ...val]?.filter((i, index, arr) => arr?.findIndex(s => i?.id === s?.id) === index)
|
||||
}
|
||||
|
||||
// 获取授课教员
|
||||
const getCyryList = async () => {
|
||||
const res = await qcckPost({
|
||||
pxgsid: "",
|
||||
gw: '04'
|
||||
}, `/mosty-base//baxx/cyry/list`)
|
||||
|
||||
if (res) {
|
||||
cyryList.value = res
|
||||
}
|
||||
}
|
||||
|
||||
const save = () => {
|
||||
if (pageData.tableData.length === 0) return proxy.$message.warning('请选择培训保安人员')
|
||||
const ryidList = pageData.tableData?.map(i => i?.id)
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<el-descriptions column="3" border label-width="180px">
|
||||
<el-descriptions-item label="单位名称(营业执照登记名称)">{{ formData.dwmc }}</el-descriptions-item>
|
||||
<el-descriptions-item label="统一社会信用代码">{{ formData.xydm }}</el-descriptions-item>
|
||||
<el-descriptions-item label="娱乐场所图片" :rowspan="4">
|
||||
<el-descriptions-item label="单位图片" :rowspan="4">
|
||||
<div class="imgWrapper">
|
||||
<Upload v-model="formData.cszp" />
|
||||
</div>
|
||||
Reference in New Issue
Block a user