Compare commits

..

2 Commits

Author SHA1 Message Date
c1ce6c384c 111 2025-09-26 16:29:20 +08:00
7a19a82318 '修改图片参数转换处理' 2025-09-26 16:08:24 +08:00
9 changed files with 594 additions and 465 deletions

View File

@ -14,42 +14,45 @@ const whiteList = ['/login','/', '/oatuh_login', '/sso_redirect', '/editPassword
* next 往下走 * next 往下走
*/ */
let onRun = true; let onRun = true;
// router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
// // 存在 token ,进入主页 // 存在 token ,进入主页
// // if (store.state.user.token) { // if (store.state.user.token) {
// // 快捷访问 // 快捷访问
// if (store.getters.token) { if (store.getters.token) {
// // 判断用户资料是否获取 // 判断用户资料是否获取
// // 若不存在用户信息,则需要获取用户信息 // 若不存在用户信息,则需要获取用户信息
// // 触发获取用户信息的 action并获取用户当前权限 // 触发获取用户信息的 action并获取用户当前权限
// await store.commit('permission/setRouteReady', true) await store.commit('permission/setRouteReady', true)
// // 添加完动态路由之后,需要在进行一次主动跳转 // 添加完动态路由之后,需要在进行一次主动跳转
// const afterMenuList = await getItem('menusPermission'); const afterMenuList = await getItem('menusPermission');
// // 处理用户权限,筛选出需要添加的权限 // 处理用户权限,筛选出需要添加的权限
// if (store.state.permission.routes == 0) { if (store.state.permission.routes == 0) {
// const filterRoutes = await store.dispatch('permission/filterRoutes', afterMenuList) const filterRoutes = await store.dispatch('permission/filterRoutes', afterMenuList)
// filterRoutes.forEach(item => {
// router.addRoute(item) console.log(filterRoutes);
// })
// next({ filterRoutes.forEach(item => {
// ...to, router.addRoute(item)
// replace: true })
// }) next({
// } else { ...to,
// next() replace: true
// } })
// // 利用 addRoute 循环添加 } else {
// } else { next()
// const isOatuh = getItem('isOatuh') }
// // 没有token的情况下可以进入白名单 // 利用 addRoute 循环添加
// if (whiteList.indexOf(to.path) > -1) { } else {
// next() const isOatuh = getItem('isOatuh')
// } else { // 没有token的情况下可以进入白名单
// if (isOatuh) { if (whiteList.indexOf(to.path) > -1) {
// next('/oatuh_login') next()
// } else { } else {
// next('/login') if (isOatuh) {
// } next('/oatuh_login')
// } } else {
// } next('/login')
// }) }
}
}
})

View File

@ -15,61 +15,33 @@ import store from "@/store";
* 私有路由表 * 私有路由表
*/ */
export const privateRoutes = []; 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: [
{ {
path: "/", path: "/",
name: "unitManagement",
component: layout,
redirect: "/unitManagement/unitInformation",
meta: {
title: "单位管理",
icon: "personnel"
},
children: [
{
path: "/unitManagement/unitInformation",
name: "unitInformation", name: "unitInformation",
component: () => component: () =>
import("@/views/securityManagement/unitInformation/index"), import("@/views/securityManagement/unitManagement/unitInformation/index"),
meta: { meta: {
title: "单位信息", title: "单位信息",
icon: "personnel" icon: "personnel"
}, },
}
]
}, },
{ {
path: "/personnelManagement", path: "/personnelManagement",
name: "personnelManagement", name: "personnelManagement",
component: layout,
meta: { meta: {
title: "人员管理", title: "人员管理",
icon: "personnel" icon: "personnel"
@ -99,7 +71,8 @@ export const publicRoutes = [
}, },
{ {
path: "/trainingManagement", path: "/trainingManagement",
name: "/trainingManagement", name: "trainingManagement",
component: layout,
meta: { meta: {
title: "培训管理", title: "培训管理",
icon: "personnel" icon: "personnel"
@ -135,21 +108,22 @@ export const publicRoutes = [
icon: "personnel" icon: "personnel"
} }
}, },
]
},
{ {
path: "/examManagement", path: "/trainingManagement/examManagement",
name: "examManagement", name: "examManagement",
component: () => component: () =>
import("@/views/securityManagement/examManagement/index"), import("@/views/securityManagement/trainingManagement/examManagement/index"),
meta: { meta: {
title: "保安考试管理", title: "保安考试管理",
icon: "personnel" icon: "personnel"
}, },
}, },
]
},
{ {
path: "/training", path: "/training",
name: "training", name: "training",
component: layout,
meta: { meta: {
title: "培训中心", title: "培训中心",
icon: "personnel" icon: "personnel"
@ -187,6 +161,7 @@ export const publicRoutes = [
{ {
path: "/njxx", path: "/njxx",
name: "njxx", name: "njxx",
component: layout,
meta: { meta: {
title: "年检信息", title: "年检信息",
icon: "personnel" 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", // path: "/systemConfig",
// name: "systemConfigModel", // name: "systemConfigModel",
@ -344,15 +453,15 @@ export const publicRoutes = [
// icon: "personnel-manage" // icon: "personnel-manage"
// } // }
// }, // },
// // { // {
// // path: "/sys/ysjq", // path: "/sys/ysjq",
// // name: "ysjq", // name: "ysjq",
// // component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"), // component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"),
// // meta: { // meta: {
// // title: "演示警情", // title: "演示警情",
// // icon: "personnel-manage" // icon: "personnel-manage"
// // } // }
// // }, // },
// { // {
// path: "/user/systemConfig", // path: "/user/systemConfig",
// name: "systemConfig", // name: "systemConfig",
@ -1425,8 +1534,8 @@ export const publicRoutes = [
// } // }
// ] // ]
// } // }
] // ]
} // }
]; ];
const router = createRouter({ const router = createRouter({

View File

@ -49,7 +49,7 @@ const formList = reactive([
{ label: "学时安排", prop: "gksc", type: "input" }, { 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) { function getDateById (id) {
qcckPost({},`/bagl/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => { qcckPost({},`/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => {
res.fj = res.fj ? res.fj.split(','):[] res.fj = res.fj ? JSON.parse(res.fj):[]
listQuery.value = res || {}; listQuery.value = res || {};
}) })
} }
@ -74,7 +74,11 @@ const save = () => {
loading.value = true; loading.value = true;
let url = title.value == '新增' ? `/bagl/mosty-base/baxx/jxda/add` : `/bagl/mosty-base/baxx/jxda/edit`; let url = title.value == '新增' ? `/bagl/mosty-base/baxx/jxda/add` : `/bagl/mosty-base/baxx/jxda/edit`;
let params = { ...val } 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(() => { qcckPost(params, url).then(() => {
loading.value = false; loading.value = false;
proxy.$message.success("保存成功"); proxy.$message.success("保存成功");
@ -87,7 +91,7 @@ const save = () => {
} }
const close = () => { const close = () => {
dialogForm.value = false; dialogForm.value = false;
listQuery.value = {fj:[]} listQuery.value.fj = []
FormRef.value.reset() FormRef.value.reset()
};; };;

View File

@ -57,11 +57,10 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="授课教员" :prop="`pxkcList[${index}].skjy`" style="width: 100%;" :rules="rules.skjy"> <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-input v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;"></el-input> -->
<!-- <el-select v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;"> <el-select v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;">
<el-option label="张三" value="张三"></el-option> <el-option v-for="items in cyryList" :key="items.id" :label="items?.xm" :value="items.id"></el-option>
<el-option label="李四" value="李四"></el-option> </el-select>
</el-select> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -102,6 +101,7 @@ import SelectPersonnelDialog from "./selectPersonnelDialog.vue";
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const visible = ref(false) const visible = ref(false)
const showDialog = ref(false) const showDialog = ref(false)
const cyryList = ref([])
const formData = ref({ const formData = ref({
pxkcList: [{ pxkcList: [{
pxkcxm: '', //课程名称 pxkcxm: '', //课程名称
@ -173,6 +173,7 @@ const delItem = (item,index) => {
} }
const init = () => { const init = () => {
getCyryList()
showDialog.value = true 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) 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 = () => { const save = () => {
if (pageData.tableData.length === 0) return proxy.$message.warning('请选择培训保安人员') if (pageData.tableData.length === 0) return proxy.$message.warning('请选择培训保安人员')
const ryidList = pageData.tableData?.map(i => i?.id) const ryidList = pageData.tableData?.map(i => i?.id)

View File

@ -11,7 +11,7 @@
<el-descriptions column="3" border label-width="180px"> <el-descriptions column="3" border label-width="180px">
<el-descriptions-item label="单位名称(营业执照登记名称)">{{ formData.dwmc }}</el-descriptions-item> <el-descriptions-item label="单位名称(营业执照登记名称)">{{ formData.dwmc }}</el-descriptions-item>
<el-descriptions-item label="统一社会信用代码">{{ formData.xydm }}</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"> <div class="imgWrapper">
<Upload v-model="formData.cszp" /> <Upload v-model="formData.cszp" />
</div> </div>