diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts
index dcd1fd3..8d45bac 100644
--- a/src/api/DesignForm/requestapi.ts
+++ b/src/api/DesignForm/requestapi.ts
@@ -654,4 +654,4 @@ export function savePrintTemplate(data: any) {
method: 'post',
data: data
});
-}
\ No newline at end of file
+}
diff --git a/src/api/api/index.ts b/src/api/api/index.ts
index 581df61..514fb9b 100644
--- a/src/api/api/index.ts
+++ b/src/api/api/index.ts
@@ -27,3 +27,15 @@ export function moveAppMenus(data?: any) {
data: data
});
}
+
+
+/**
+ * 新增职务分类
+ */
+ export function companyDutyInit(data?: any){
+ return request({
+ url: '/systemapi/app/companyDutyInit',
+ method: 'post',
+ data: data
+ });
+}
\ No newline at end of file
diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue
index 04e277e..e3f3e8c 100644
--- a/src/components/DesignForm/app/index.vue
+++ b/src/components/DesignForm/app/index.vue
@@ -2561,22 +2561,22 @@ const isObject = (obj: any) => {
:dprt="rangedDatePickerInTables1"
@get-page-data="getPageData"
/>
-
-
+
diff --git a/src/permission.ts b/src/permission.ts
index 01a0277..db33f69 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -31,7 +31,7 @@ router.beforeEach(async (to:any, from:any, next:any) => {
} else {
const userStore = useUserStoreHook();
const hasRoles = userStore.roles && userStore.roles.length > 0;
- console.log("如果已登录,跳转首页",hasRoles)
+ // console.log("如果已登录,跳转首页",hasRoles)
if (hasRoles) {
// 未匹配到任何路由,跳转404
if (to.matched.length === 0) {
@@ -43,7 +43,7 @@ router.beforeEach(async (to:any, from:any, next:any) => {
try {
// const { roles } = await userStore.getInfo();
const { perms,allPowerConfig } = await userStore.getInfo();
- console.log("路由权限---》",perms,allPowerConfig);
+ // console.log("路由权限---》",perms,allPowerConfig);
// const accessRoutes = await permissionStore.generateRoutes(perms);
const accessRoutes = await permissionStore.generateRoutes(allPowerConfig.menuIdAry);
// console.log("路由权限--perms--》",accessRoutes);
diff --git a/src/utils/axiosRequest/request.ts b/src/utils/axiosRequest/request.ts
new file mode 100644
index 0000000..8933393
--- /dev/null
+++ b/src/utils/axiosRequest/request.ts
@@ -0,0 +1,102 @@
+/**
+@ 作者: 秦东
+@ 时间: 2025-12-09 10:57:37
+@ 功能: 封装axios请求
+*/
+import axios, { AxiosError, type InternalAxiosRequestConfig } from 'axios'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { generateRandomString } from '@/utils/encryptionAndDecryption/randNumber'
+import { sm4DecryptMethod, sm4EncryptMethod } from '@/utils/encryptionAndDecryption/sm4Utils'
+import { useUserStore } from '@/stores/user'
+/**
+@ 作者: 秦东
+@ 时间: 2025-12-09 10:58:34
+@ 功能: 创建axios实例
+*/
+const service = axios.create({
+ baseURL: import.meta.env.VITE_APP_BASE_API,
+ timeout: 5000
+})
+
+/**
+@ 作者: 秦东
+@ 时间: 2025-12-09 11:00:05
+@ 功能: 请求拦截
+*/
+service.interceptors.request.use(
+ (config: InternalAxiosRequestConfig) => {
+ const userStore = useUserStore()
+ // if (config.headers['content-type'] === 'application/json') {
+ let { data, headers } = config
+ console.log('请求拦截----data---1--->', data)
+ if (userStore.authToken) {
+ config.headers['Auth-token'] = userStore.authToken
+ }
+ //获取16位随机数
+ let randomString = generateRandomString(16)
+ config.headers['Auth-key'] = randomString
+ if (data) {
+ // 加密请求数据
+ config.data = {
+ encryptedFile: sm4EncryptMethod(JSON.stringify(data), randomString)
+ }
+ }
+ console.log('请求拦截---------->', randomString)
+ console.log('请求拦截----headers------>', headers)
+ console.log('请求拦截----data------>', config.data)
+ console.log('请求拦截----config------>', config)
+ // }
+
+ // console.log('请求拦截----content-type------>', config.headers['Content-Type'])
+ // console.log('请求拦截----config------>', config.headers)
+ return config
+ },
+ (error: AxiosError) => {
+ return Promise.reject(error)
+ }
+)
+/**
+@ 作者: 秦东
+@ 时间: 2025-12-09 21:00:20
+@ 备注: 响应拦截
+*/
+service.interceptors.response.use(
+ response => {
+ console.log('行营结果---------->', response)
+ let { data, headers } = response
+ // console.log('行营结果----data------>', data.data)
+ let authKey = headers['auth-key']
+ console.log('行营结果----authKey------>', authKey)
+ // 解密响应数据
+ if (authKey) {
+ let jsonData = sm4DecryptMethod(data.data, authKey)
+ response.data.data = JSON.parse(jsonData)
+ }
+ console.log('行营结果----解密结构------>', headers['auth-key'], response)
+ return response.data
+ },
+ (error: AxiosError) => {
+ if (error.response) {
+ const status = error.response.status
+ switch (status) {
+ case 401:
+ // 处理401错误,例如跳转到登录页
+ break
+ case 403:
+ // 处理403错误,例如提示无权限
+ break
+ case 404:
+ // 处理404错误,例如提示资源不存在
+ break
+ case 500:
+ // 处理500错误,例如提示服务器错误
+ break
+ default:
+ // 处理其他错误
+ break
+ }
+ }
+ return Promise.reject(error)
+ }
+)
+export default service
diff --git a/src/utils/encryptionAndDecryption/sm4Utils.ts b/src/utils/encryptionAndDecryption/sm4Utils.ts
index 6ea8840..4a764e6 100644
--- a/src/utils/encryptionAndDecryption/sm4Utils.ts
+++ b/src/utils/encryptionAndDecryption/sm4Utils.ts
@@ -63,11 +63,6 @@ const sm4DecryptMethod = (data: string, customKey: string): string => {
console.log('SM4解密方法----解密结构--ivSetup---->', ivSetup)
console.log('SM4解密方法----解密结构---sm4TokenKey--->', sm4TokenKey)
console.log('SM4解密方法----解密结构---appSystemKey--->', appSystemKey)
-
- console.log('SM4解密方法----解密结构---appSystemKey.length--->', appSystemKey.length)
- console.log('SM4解密方法----解密结构---ivSetup.length--->', ivSetup.length)
-
-
return sm4.decrypt(data, appSystemKey, {
iv: ivSetup,
mode: sm4.constants.CBC,
diff --git a/src/utils/loadSvgFile.ts b/src/utils/loadSvgFile.ts
new file mode 100644
index 0000000..83f4e46
--- /dev/null
+++ b/src/utils/loadSvgFile.ts
@@ -0,0 +1,14 @@
+/**
+@ 作者: 秦东
+@ 时间: 2026-01-09 15:57:48
+@ 功能: 加载svg文件
+*/
+export const loadSvgFiles = (): string[] => {
+ const icons = import.meta.glob('../assets/icons/*.svg')
+ const svgIcons: string[] = []
+ for (const icon in icons) {
+ const iconName = icon.split('assets/icons/')[1].split('.svg')[0]
+ svgIcons.push(iconName)
+ }
+ return svgIcons
+}
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 73dc9da..5a19ec2 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -40,7 +40,10 @@ service.interceptors.request.use(
if (userStore.userToken) {
config.headers["user-token"] = userStore.userToken;
}
-
+ // console.error('<---------------请求拦截---------->')
+ // console.error('请求拦截----config------>', config.url)
+ // console.error('请求拦截----data------>', config.data)
+ // console.error('<---------------请求拦截---------->')
// if (config.headers['content-type'] === 'application/json') {
let { data, headers } = config
//获取16位随机数
@@ -52,10 +55,10 @@ service.interceptors.request.use(
data: sm4EncryptMethod(JSON.stringify(data), randomString)
}
}
- console.log('请求拦截---------->', randomString)
- console.log('请求拦截----headers------>', headers)
- console.log('请求拦截----data------>', config.data)
- console.log('请求拦截----config------>', config)
+ // console.log('请求拦截---------->', randomString)
+ // console.log('请求拦截----headers------>', headers)
+ // console.log('请求拦截----data------>', config.data)
+ // console.log('请求拦截----config------>', config)
// }
// console.log('请求拦截----content-type------>', config.headers['Content-Type'])
@@ -76,13 +79,15 @@ service.interceptors.response.use(
let { data, headers } = response
let authKey = headers['auth-key']
- console.log('行营结果----authKey------>', authKey)
+ // console.log('行营结果----authKey------>', authKey)
// 解密响应数据
if (authKey) {
let jsonData = sm4DecryptMethod(data.data, authKey)
response.data.data = JSON.parse(jsonData)
}
- console.log('行营结果----解密结构------>', headers['auth-key'], response)
+ // console.error('行营结果----解密结构------>', response.config.url)
+ // console.error('行营结果----解密结构------>', response.data)
+ // console.log('行营结果----解密结构------>', headers['auth-key'], response)
const { code, msg } = response.data;
if (code === 0 || code === 200 || code === 10001) {
return response.data;
diff --git a/src/utils/request123.ts b/src/utils/request123.ts
index 9e950b0..22ae507 100644
--- a/src/utils/request123.ts
+++ b/src/utils/request123.ts
@@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import router from '@/router';
import { useRouter } from 'vue-router'
import { generateRandomString } from '@/utils/encryptionAndDecryption/randNumber'
+import { sm4DecryptMethod, sm4EncryptMethod } from './encryptionAndDecryption/sm4Utils';
const routerPinia = useRouter()
diff --git a/src/utils/validate.ts b/src/utils/validate.ts
new file mode 100644
index 0000000..9277d7e
--- /dev/null
+++ b/src/utils/validate.ts
@@ -0,0 +1,32 @@
+/**
+@ 作者: 秦东
+@ 时间: 2025-12-29 16:00:55
+@ 功能: 路径匹配器
+ * @param {string} pattern
+ * @param {string} path
+ * @returns {Boolean}
+*/
+export const isPathMatch = (pattern: string, path: string): boolean => {
+ const regexPattern = pattern
+ .replace(/\//g, '\\/')
+ .replace(/\*\*/g, '.*')
+ .replace(/\*/g, '[^\\/]*')
+ const regex = new RegExp(`^${regexPattern}$`)
+ return regex.test(path)
+}
+/**
+@ 作者: 秦东
+@ 时间: 2025-12-29 16:02:21
+@ 功能: 判断字符串是否为空
+*/
+export const isEmptyString = (str: string): boolean => {
+ return str.trim().length === 0
+}
+/**
+@ 作者: 秦东
+@ 时间: 2025-12-29 16:03:14
+@ 功能: 判断url是否是http或https
+*/
+export const isHttpOrHttpsUrl = (url: string): boolean => {
+ return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
+}
diff --git a/src/views/hr/company/orgPeopleNew.vue b/src/views/hr/company/orgPeopleNew.vue
index 6682d6f..b2e8cb8 100644
--- a/src/views/hr/company/orgPeopleNew.vue
+++ b/src/views/hr/company/orgPeopleNew.vue
@@ -41,14 +41,14 @@ const props = defineProps({
},
});
//已选择的数据
-const pickUserAry = ref(props.orgInfo ? props.orgInfo : []);
-const pickUserKeyAry = ref(props.orgKey ? props.orgKey : []);
+const pickUserAry = ref
(props.orgInfo ? props.orgInfo : []);
+const pickUserKeyAry = ref(props.orgKey ? props.orgKey : []);
const loading = ref(false);
const emits = defineEmits([
"update:isOpen",
"update:orgKey",
"update:orgInfo",
- "subitRefresh",
+ "subitRefresh", 'update:isShow',
]);
const openPage = computed({
get() {
@@ -63,7 +63,7 @@ const openPage = computed({
const currOrgManList = ref([]);
const loadTable = ref(false);
const totalCount = ref(0); //一共多少数据
-const peopleAry = ref([]); //人员列表
+const peopleAry = ref([]); //人员列表
//获取行政组织
const getOrgTreeSub = () => {
currOrgManList.value = [];
diff --git a/src/views/system/monitor/timing/index.vue b/src/views/system/monitor/timing/index.vue
index 332e3c7..1273442 100644
--- a/src/views/system/monitor/timing/index.vue
+++ b/src/views/system/monitor/timing/index.vue
@@ -4,7 +4,20 @@
@ 备注: 在线人数
-->
定时任务