Compare commits

..

13 Commits
dev ... ts

Author SHA1 Message Date
疯狂的狮子Li
7de9f23226
update README.md.
Signed-off-by: 疯狂的狮子Li <15040126243@163.com>
2025-05-08 14:24:37 +00:00
疯狂的狮子Li
8fa765f7be
!199 发布 5.3.1-2.3.0 正式版
Merge pull request !199 from 疯狂的狮子Li/dev
2025-03-27 02:54:40 +00:00
疯狂的狮子Li
f5d557fe80
!197 发布 5.3.1-BETA2_2.3.0-BETA2 公测版本
Merge pull request !197 from 疯狂的狮子Li/dev
2025-03-21 07:26:30 +00:00
疯狂的狮子Li
b23b123613
!195 发布 5.3.1-BETA_2.3.0-BETA 公测版本
Merge pull request !195 from 疯狂的狮子Li/dev
2025-03-13 05:30:32 +00:00
疯狂的狮子Li
b1f0b3c096
!183 同步修复一些问题
Merge pull request !183 from 疯狂的狮子Li/dev
2025-02-07 06:20:16 +00:00
疯狂的狮子Li
b2a4157285
!175 发布 5.3.0 新春版 祝大家新年快乐
Merge pull request !175 from 疯狂的狮子Li/dev
2025-01-24 05:08:48 +00:00
疯狂的狮子Li
5e440a7dc4
!173 发布 5.3.0-BETA 公测版本
Merge pull request !173 from 疯狂的狮子Li/dev
2025-01-20 03:36:18 +00:00
疯狂的狮子Li
9a02598c00
!151 发布 vue 版本 5.2.3 与 cloud 版本 2.2.2
Merge pull request !151 from 疯狂的狮子Li/dev
2024-10-25 03:13:13 +00:00
疯狂的狮子Li
1606dbd76f
!141 发布 vue 版本 5.2.2 与 cloud 版本 2.2.1
Merge pull request !141 from 疯狂的狮子Li/dev
2024-08-26 03:45:16 +00:00
疯狂的狮子Li
ba24afce52
!131 ♥️发布 vue 版本 5.2.1 与 cloud 版本 2.2.0
Merge pull request !131 from 疯狂的狮子Li/dev
2024-07-09 03:02:34 +00:00
疯狂的狮子Li
abb4f543b9
!125 ♥️发布 vue 版本 5.2.0 与 cloud 版本 2.2.0
Merge pull request !125 from 疯狂的狮子Li/dev
2024-06-20 02:15:41 +00:00
疯狂的狮子Li
e354db74a7
!121 ♥️发布 2.2.0-BETA 公测版本
Merge pull request !121 from 疯狂的狮子Li/dev
2024-06-06 03:00:23 +00:00
疯狂的狮子Li
a63543a5c7
!118 ♥️发布 5.2.0-BETA 公测版本
Merge pull request !118 from 疯狂的狮子Li/dev
2024-05-20 02:26:46 +00:00
53 changed files with 426 additions and 259 deletions

View File

@ -315,9 +315,6 @@
"watchThrottled": true, "watchThrottled": true,
"watchTriggerable": true, "watchTriggerable": true,
"watchWithFilter": true, "watchWithFilter": true,
"whenever": true, "whenever": true
"Slot": true,
"Slots": true,
"createRef": true
} }
} }

View File

@ -2,7 +2,6 @@
- 本仓库为前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [TS](https://www.typescriptlang.org/) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。 - 本仓库为前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [TS](https://www.typescriptlang.org/) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。
- 成员项目: 基于 vben5(ant-design-vue) 的前端项目 [ruoyi-plus-vben5](https://gitee.com/dapppp/ruoyi-plus-vben5) - 成员项目: 基于 vben5(ant-design-vue) 的前端项目 [ruoyi-plus-vben5](https://gitee.com/dapppp/ruoyi-plus-vben5)
- 成员项目: 基于soybean 的前端项目 [ruoyi-plus-soybean](https://gitee.com/xlsea/ruoyi-plus-soybean)
## 配套后端代码仓库地址 ## 配套后端代码仓库地址
@ -11,11 +10,6 @@
| 🔥 分布式集群框架 | RuoYi-Vue-Plus | - [Gitee](https://gitee.com/dromara/RuoYi-Vue-Plus)<br> - [GitHub](https://github.com/dromara/RuoYi-Vue-Plus)<br> - [GitCode](https://gitcode.com/dromara/RuoYi-Vue-Plus) | | 🔥 分布式集群框架 | RuoYi-Vue-Plus | - [Gitee](https://gitee.com/dromara/RuoYi-Vue-Plus)<br> - [GitHub](https://github.com/dromara/RuoYi-Vue-Plus)<br> - [GitCode](https://gitcode.com/dromara/RuoYi-Vue-Plus) |
| 🔥 微服务框架 | RuoYi-Cloud-Plus | - [Gitee](https://gitee.com/dromara/RuoYi-Cloud-Plus)<br>- [GitHub](https://github.com/dromara/RuoYi-Cloud-Plus)<br> - [GitCode](https://gitcode.com/dromara/RuoYi-Cloud-Plus) | | 🔥 微服务框架 | RuoYi-Cloud-Plus | - [Gitee](https://gitee.com/dromara/RuoYi-Cloud-Plus)<br>- [GitHub](https://github.com/dromara/RuoYi-Cloud-Plus)<br> - [GitCode](https://gitcode.com/dromara/RuoYi-Cloud-Plus) |
## 分支说明
- ts分支(稳定发布主分支 生产可用)
- dev分支(开发分支 开发过程中使用)
## 前端运行 ## 前端运行
```bash ```bash

View File

@ -23,31 +23,31 @@
"@element-plus/icons-vue": "2.3.1", "@element-plus/icons-vue": "2.3.1",
"@highlightjs/vue-plugin": "2.1.0", "@highlightjs/vue-plugin": "2.1.0",
"@vueup/vue-quill": "1.2.0", "@vueup/vue-quill": "1.2.0",
"@vueuse/core": "13.1.0", "@vueuse/core": "12.7.0",
"animate.css": "4.1.1", "animate.css": "4.1.1",
"await-to-js": "3.0.0", "await-to-js": "3.0.0",
"axios": "1.8.4", "axios": "1.7.8",
"crypto-js": "4.2.0", "crypto-js": "4.2.0",
"echarts": "5.6.0", "echarts": "5.5.0",
"element-plus": "2.9.8", "element-plus": "2.8.8",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"highlight.js": "11.9.0", "highlight.js": "11.9.0",
"image-conversion": "2.1.1", "image-conversion": "2.1.1",
"js-cookie": "3.0.5", "js-cookie": "3.0.5",
"jsencrypt": "3.3.2", "jsencrypt": "3.3.2",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"pinia": "3.0.2", "pinia": "2.2.6",
"screenfull": "6.0.2", "screenfull": "6.0.2",
"vue": "3.5.13", "vue": "3.5.13",
"vue-cropper": "1.1.1", "vue-cropper": "1.1.1",
"vue-i18n": "11.1.3", "vue-i18n": "10.0.5",
"vue-json-pretty": "2.4.0", "vue-json-pretty": "2.4.0",
"vue-router": "4.5.0", "vue-router": "4.4.5",
"vue-types": "6.0.0", "vue-types": "5.1.3",
"vxe-table": "4.13.7" "vxe-table": "4.5.22"
}, },
"devDependencies": { "devDependencies": {
"@iconify/json": "^2.2.276", "@iconify/json": "2.2.276",
"@types/crypto-js": "4.2.2", "@types/crypto-js": "4.2.2",
"@types/file-saver": "2.0.7", "@types/file-saver": "2.0.7",
"@types/js-cookie": "3.0.6", "@types/js-cookie": "3.0.6",
@ -56,8 +56,8 @@
"@unocss/preset-attributify": "66.0.0", "@unocss/preset-attributify": "66.0.0",
"@unocss/preset-icons": "66.0.0", "@unocss/preset-icons": "66.0.0",
"@unocss/preset-uno": "66.0.0", "@unocss/preset-uno": "66.0.0",
"@vitejs/plugin-vue": "5.2.3", "@vitejs/plugin-vue": "5.2.1",
"@vue/compiler-sfc": "3.5.13", "@vue/compiler-sfc": "3.4.23",
"@vue/eslint-config-prettier": "10.2.0", "@vue/eslint-config-prettier": "10.2.0",
"@vue/eslint-config-typescript": "14.4.0", "@vue/eslint-config-typescript": "14.4.0",
"autoprefixer": "10.4.20", "autoprefixer": "10.4.20",
@ -66,22 +66,19 @@
"eslint-plugin-vue": "9.32.0", "eslint-plugin-vue": "9.32.0",
"globals": "16.0.0", "globals": "16.0.0",
"prettier": "3.5.2", "prettier": "3.5.2",
"sass": "1.87.0", "sass": "1.84.0",
"typescript": "~5.8.3", "typescript": "~5.7.3",
"unocss": "66.0.0", "unocss": "66.0.0",
"unplugin-auto-import": "19.1.2", "unplugin-auto-import": "0.17.5",
"unplugin-icons": "22.1.0", "unplugin-icons": "0.18.5",
"unplugin-vue-components": "28.5.0", "unplugin-vue-components": "28.0.0",
"unplugin-vue-setup-extend-plus": "1.0.1", "unplugin-vue-setup-extend-plus": "1.0.1",
"vite": "6.3.2", "vite": "5.4.11",
"vite-plugin-compression": "0.5.1", "vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons-ng": "^1.4.0", "vite-plugin-svg-icons-ng": "^1.2.2",
"vite-plugin-vue-devtools": "7.7.5", "vite-plugin-vue-devtools": "7.7.1",
"vitest": "3.1.2", "vitest": "3.0.5",
"vue-tsc": "^2.2.8" "vue-tsc": "^2.2.2"
},
"overrides": {
"quill": "2.0.2"
}, },
"engines": { "engines": {
"node": ">=18.18.0", "node": ">=18.18.0",

View File

@ -1,6 +1,6 @@
import request from '@/utils/request'; import request from '@/utils/request';
import { AxiosPromise } from 'axios'; import { AxiosPromise } from 'axios';
import { DeptForm, DeptQuery, DeptTreeVO, DeptVO } from './types'; import {DeptForm, DeptQuery, DeptTreeVO, DeptVO} from './types';
// 查询部门列表 // 查询部门列表
export const listDept = (query?: DeptQuery) => { export const listDept = (query?: DeptQuery) => {

View File

@ -1,4 +1,4 @@
import { DeptTreeVO, DeptVO } from './../dept/types'; import {DeptTreeVO, DeptVO} from './../dept/types';
import { RoleVO } from '@/api/system/role/types'; import { RoleVO } from '@/api/system/role/types';
import request from '@/utils/request'; import request from '@/utils/request';
import { AxiosPromise } from 'axios'; import { AxiosPromise } from 'axios';

View File

@ -26,7 +26,7 @@
z-index: 1001; z-index: 1001;
overflow: hidden; overflow: hidden;
-webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1); box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
// reset element-ui css // reset element-ui css
.horizontal-collapse-transition { .horizontal-collapse-transition {

View File

@ -44,7 +44,7 @@ const findPathNum = (str, char = '/') => {
return str.split(char).length - 1; return str.split(char).length - 1;
}; };
const getMatched = (pathList, routeList, matched) => { const getMatched = (pathList, routeList, matched) => {
const data = routeList.find((item) => item.path == pathList[0] || (item.name += '').toLowerCase() == pathList[0]); let data = routeList.find((item) => item.path == pathList[0] || (item.name += '').toLowerCase() == pathList[0]);
if (data) { if (data) {
matched.push(data); matched.push(data);
if (data.children && pathList.length) { if (data.children && pathList.length) {

View File

@ -95,7 +95,7 @@ const options = ref<any>({
}); });
const styles = computed(() => { const styles = computed(() => {
const style: any = {}; let style: any = {};
if (props.minHeight) { if (props.minHeight) {
style.minHeight = `${props.minHeight}px`; style.minHeight = `${props.minHeight}px`;
} }
@ -121,9 +121,9 @@ const handleUploadSuccess = (res: any) => {
// //
if (res.code === 200) { if (res.code === 200) {
// //
const quill = toRaw(quillEditorRef.value).getQuill(); let quill = toRaw(quillEditorRef.value).getQuill();
// //
const length = quill.selection.savedRange.index; let length = quill.selection.savedRange.index;
// res // res
quill.insertEmbed(length, 'image', res.data.url); quill.insertEmbed(length, 'image', res.data.url);
// //

View File

@ -176,7 +176,7 @@ const handleUploadSuccess = (res: any, file: UploadFile) => {
// //
const handleDelete = (index: number) => { const handleDelete = (index: number) => {
const ossId = fileList.value[index].ossId; let ossId = fileList.value[index].ossId;
delOss(ossId); delOss(ossId);
fileList.value.splice(index, 1); fileList.value.splice(index, 1);
emit('update:modelValue', listToString(fileList.value)); emit('update:modelValue', listToString(fileList.value));

View File

@ -27,7 +27,7 @@ const realSrc = computed(() => {
if (!props.src) { if (!props.src) {
return; return;
} }
const real_src = props.src.split(',')[0]; let real_src = props.src.split(',')[0];
return real_src; return real_src;
}); });
@ -35,8 +35,8 @@ const realSrcList = computed(() => {
if (!props.src) { if (!props.src) {
return []; return [];
} }
const real_src_list = props.src.split(','); let real_src_list = props.src.split(',');
const srcList: string[] = []; let srcList: string[] = [];
real_src_list.forEach((item: string) => { real_src_list.forEach((item: string) => {
if (item.trim() === '') { if (item.trim() === '') {
return; return;

View File

@ -189,7 +189,7 @@ const handleUploadSuccess = (res: any, file: UploadFile) => {
const handleDelete = (file: UploadFile): boolean => { const handleDelete = (file: UploadFile): boolean => {
const findex = fileList.value.map((f) => f.name).indexOf(file.name); const findex = fileList.value.map((f) => f.name).indexOf(file.name);
if (findex > -1 && uploadList.value.length === number.value) { if (findex > -1 && uploadList.value.length === number.value) {
const ossId = fileList.value[findex].ossId; let ossId = fileList.value[findex].ossId;
delOss(ossId); delOss(ossId);
fileList.value.splice(findex, 1); fileList.value.splice(findex, 1);
emit('update:modelValue', listToString(fileList.value)); emit('update:modelValue', listToString(fileList.value));
@ -225,7 +225,7 @@ const handlePictureCardPreview = (file: any) => {
const listToString = (list: any[], separator?: string) => { const listToString = (list: any[], separator?: string) => {
let strs = ''; let strs = '';
separator = separator || ','; separator = separator || ',';
for (const i in list) { for (let i in list) {
if (undefined !== list[i].ossId && list[i].url.indexOf('blob:') !== 0) { if (undefined !== list[i].ossId && list[i].url.indexOf('blob:') !== 0) {
strs += list[i].ossId + separator; strs += list[i].ossId + separator;
} }

View File

@ -1,56 +0,0 @@
<template>
<div style="display: flex; justify-content: space-between">
<div>
<el-button v-if="submitButtonShow" :loading="props.buttonLoading" type="info" @click="submitForm('draft')">暂存</el-button>
<el-button v-if="submitButtonShow" :loading="props.buttonLoading" type="primary" @click="submitForm('submit')"> </el-button>
<el-button v-if="approvalButtonShow" :loading="props.buttonLoading" type="primary" @click="approvalVerifyOpen">审批</el-button>
<el-button v-if="props.id && props.status !== 'draft'" type="primary" @click="handleApprovalRecord">流程进度</el-button>
<slot />
</div>
<div>
<el-button style="float: right" @click="goBack()">返回</el-button>
</div>
</div>
</template>
<script setup lang="ts">
import { propTypes } from '@/utils/propTypes';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const props = defineProps({
status: propTypes.string.def(''),
pageType: propTypes.string.def(''),
buttonLoading: propTypes.bool.def(false),
id: propTypes.string.def('') || propTypes.number.def()
});
const emits = defineEmits(['submitForm', 'approvalVerifyOpen', 'handleApprovalRecord']);
//
const submitForm = async (type) => {
emits('submitForm', type);
};
//
const approvalVerifyOpen = async () => {
emits('approvalVerifyOpen');
};
//
const handleApprovalRecord = () => {
emits('handleApprovalRecord');
};
//
const submitButtonShow = computed(() => {
return (
props.pageType === 'add' ||
(props.pageType === 'update' && props.status && (props.status === 'draft' || props.status === 'cancel' || props.status === 'back'))
);
});
//
const approvalButtonShow = computed(() => {
return props.pageType === 'approval' && props.status && props.status === 'waiting';
});
//
const goBack = () => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.go(-1);
};
</script>

View File

@ -8,10 +8,10 @@
<el-checkbox value="3" name="type">短信</el-checkbox> <el-checkbox value="3" name="type">短信</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="附件"> <el-form-item v-if="task.flowStatus === 'waiting'" label="附件">
<fileUpload v-model="form.fileId" :file-type="['png', 'jpg', 'jpeg', 'doc', 'docx', 'xlsx', 'xls', 'ppt', 'txt', 'pdf']" :file-size="20" /> <fileUpload v-model="form.fileId" :file-type="['png', 'jpg', 'jpeg', 'doc', 'docx', 'xlsx', 'xls', 'ppt', 'txt', 'pdf']" :file-size="20" />
</el-form-item> </el-form-item>
<el-form-item label="抄送" v-if="buttonObj.copy"> <el-form-item label="抄送" v-if="task.flowStatus === 'waiting' && buttonObj.copy">
<el-button type="primary" icon="Plus" circle @click="openUserSelectCopy" /> <el-button type="primary" icon="Plus" circle @click="openUserSelectCopy" />
<el-tag v-for="user in selectCopyUserList" :key="user.userId" closable style="margin: 2px" @close="handleCopyCloseTag(user)"> <el-tag v-for="user in selectCopyUserList" :key="user.userId" closable style="margin: 2px" @close="handleCopyCloseTag(user)">
{{ user.nickName }} {{ user.nickName }}

View File

@ -47,11 +47,11 @@ const routers = computed(() => permissionStore.getTopbarRoutes());
// //
const topMenus = computed(() => { const topMenus = computed(() => {
const topMenus: RouteRecordRaw[] = []; let topMenus: RouteRecordRaw[] = [];
routers.value.map((menu) => { routers.value.map((menu) => {
if (menu.hidden !== true) { if (menu.hidden !== true) {
// //
if (menu.path === '/' && menu.children) { if (menu.path === '/') {
topMenus.push(menu.children ? menu.children[0] : menu); topMenus.push(menu.children ? menu.children[0] : menu);
} else { } else {
topMenus.push(menu); topMenus.push(menu);
@ -63,7 +63,7 @@ const topMenus = computed(() => {
// //
const childrenMenus = computed(() => { const childrenMenus = computed(() => {
const childrenMenus: RouteRecordRaw[] = []; let childrenMenus: RouteRecordRaw[] = [];
routers.value.map((router) => { routers.value.map((router) => {
router.children?.forEach((item) => { router.children?.forEach((item) => {
if (item.parentPath === undefined) { if (item.parentPath === undefined) {
@ -118,7 +118,7 @@ const handleSelect = (key: string) => {
// //
const routeMenu = childrenMenus.value.find((item) => item.path === key); const routeMenu = childrenMenus.value.find((item) => item.path === key);
if (routeMenu && routeMenu.query) { if (routeMenu && routeMenu.query) {
const query = JSON.parse(routeMenu.query); let query = JSON.parse(routeMenu.query);
router.push({ path: key, query: query }); router.push({ path: key, query: query });
} else { } else {
router.push({ path: key }); router.push({ path: key });
@ -132,7 +132,7 @@ const handleSelect = (key: string) => {
}; };
const activeRoutes = (key: string) => { const activeRoutes = (key: string) => {
const routes: RouteRecordRaw[] = []; let routes: RouteRecordRaw[] = [];
if (childrenMenus.value && childrenMenus.value.length > 0) { if (childrenMenus.value && childrenMenus.value.length > 0) {
childrenMenus.value.map((item) => { childrenMenus.value.map((item) => {
if (key == item.parentPath || (key == 'index' && '' == item.path)) { if (key == item.parentPath || (key == 'index' && '' == item.path)) {

View File

@ -0,0 +1,147 @@
<template>
<div class="el-tree-select">
<el-select
ref="treeSelect"
v-model="valueId"
style="width: 100%"
:filterable="true"
:clearable="true"
:filter-method="selectFilterData as any"
:placeholder="placeholder"
@clear="clearHandle"
>
<el-option :value="valueId" :label="valueTitle">
<el-tree
id="tree-option"
ref="selectTree"
:accordion="accordion"
:data="options"
:props="objMap as any"
:node-key="objMap.value"
:expand-on-click-node="false"
:default-expanded-keys="defaultExpandedKey"
:filter-node-method="filterNode"
@node-click="handleNodeClick"
></el-tree>
</el-option>
</el-select>
</div>
</template>
<script setup lang="ts">
interface ObjMap {
value: string;
label: string;
children: string;
}
interface Props {
objMap: ObjMap;
accordion: boolean;
value: string | number;
options: any[];
placeholder: string;
}
const props = withDefaults(defineProps<Props>(), {
objMap: () => {
return {
value: 'id',
label: 'label',
children: 'children'
};
},
accordion: false,
value: '',
options: () => [],
placeholder: ''
});
const selectTree = ref<ElTreeSelectInstance>();
const emit = defineEmits(['update:value']);
const valueId = computed({
get: () => props.value,
set: (val) => {
emit('update:value', val);
}
});
const valueTitle = ref('');
const defaultExpandedKey = ref<any[]>([]);
const initHandle = () => {
nextTick(() => {
const selectedValue = valueId.value;
if (selectedValue !== null && typeof selectedValue !== 'undefined') {
const node = selectTree.value?.getNode(selectedValue);
if (node) {
valueTitle.value = node.data[props.objMap.label];
selectTree.value?.setCurrentKey(selectedValue); //
defaultExpandedKey.value = [selectedValue]; //
}
} else {
clearHandle();
}
});
};
const handleNodeClick = (node: any) => {
valueTitle.value = node[props.objMap.label];
valueId.value = node[props.objMap.value];
defaultExpandedKey.value = [];
selectTree.value?.blur();
selectFilterData('');
};
const selectFilterData = (val: any) => {
selectTree.value?.filter(val);
};
const filterNode = (value: any, data: any) => {
if (!value) return true;
return data[props.objMap['label']].indexOf(value) !== -1;
};
const clearHandle = () => {
valueTitle.value = '';
valueId.value = '';
defaultExpandedKey.value = [];
clearSelected();
};
const clearSelected = () => {
const allNode = document.querySelectorAll('#tree-option .el-tree-node');
allNode.forEach((element) => element.classList.remove('is-current'));
};
onMounted(() => {
initHandle();
});
watch(valueId, () => {
initHandle();
});
</script>
<style lang="scss" scoped>
@import '@/assets/styles/variables.module.scss';
.el-scrollbar .el-scrollbar__view .el-select-dropdown__item {
padding: 0;
background-color: #fff;
height: auto;
}
.el-select-dropdown__item.selected {
font-weight: normal;
}
ul li .el-tree .el-tree-node__content {
height: auto;
padding: 0 20px;
box-sizing: border-box;
}
:deep(.el-tree-node__content:hover),
:deep(.el-tree-node__content:active),
:deep(.is-current > div:first-child),
:deep(.el-tree-node__content:focus) {
background-color: mix(#fff, $--color-primary, 90%);
color: $--color-primary;
}
</style>

View File

@ -40,16 +40,16 @@ watch(
); );
onMounted(() => { onMounted(() => {
addIframe(); addIframe()
}); })
watchEffect(() => { watchEffect((route) => {
addIframe(); addIframe()
}); })
function addIframe() { function addIframe() {
if (route.meta.link) { if (route.meta.link) {
useTagsViewStore().addIframeView(route); useTagsViewStore().addIframeView(route)
} }
} }
</script> </script>

View File

@ -18,7 +18,7 @@ const tagsViewStore = useTagsViewStore();
function iframeUrl(url: string | undefined, query: any) { function iframeUrl(url: string | undefined, query: any) {
if (Object.keys(query).length > 0) { if (Object.keys(query).length > 0) {
const params = Object.keys(query) let params = Object.keys(query)
.map((key) => key + '=' + query[key]) .map((key) => key + '=' + query[key])
.join('&'); .join('&');
return url + '?' + params; return url + '?' + params;

View File

@ -33,7 +33,7 @@
<el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="300" :persistent="false"> <el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="300" :persistent="false">
<template #reference> <template #reference>
<el-badge :value="newNotice > 0 ? newNotice : ''" :max="99"> <el-badge :value="newNotice > 0 ? newNotice : ''" :max="99">
<div class="right-menu-item hover-effect" style="display: block"><svg-icon icon-class="message" /></div> <svg-icon icon-class="message" />
</el-badge> </el-badge>
</template> </template>
<template #default> <template #default>
@ -98,7 +98,7 @@ import { dynamicClear, dynamicTenant } from '@/api/system/tenant';
import { TenantVO } from '@/api/types'; import { TenantVO } from '@/api/types';
import notice from './notice/index.vue'; import notice from './notice/index.vue';
import router from '@/router'; import router from '@/router';
import { ElMessageBoxOptions } from 'element-plus/es/components/message-box/src/message-box.type'; import {ElMessageBoxOptions} from "element-plus/es/components/message-box/src/message-box.type";
const appStore = useAppStore(); const appStore = useAppStore();
const userStore = useUserStore(); const userStore = useUserStore();
@ -171,7 +171,6 @@ const logout = async () => {
redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/') redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/')
} }
}); });
proxy?.$tab.closeAllPage();
}); });
}; };

View File

@ -86,7 +86,7 @@ const resolvePath = (routePath: string, routeQuery?: string): any => {
return props.basePath; return props.basePath;
} }
if (routeQuery) { if (routeQuery) {
const query = JSON.parse(routeQuery); let query = JSON.parse(routeQuery);
return { path: getNormalPath(props.basePath + '/' + routePath), query: query }; return { path: getNormalPath(props.basePath + '/' + routePath), query: query };
} }
return getNormalPath(props.basePath + '/' + routePath); return getNormalPath(props.basePath + '/' + routePath);

View File

@ -63,9 +63,9 @@ const loginByCode = async (data: LoginData) => {
const init = async () => { const init = async () => {
// //
const host = window.location.host; let host = window.location.host;
if (domain !== host) { if (domain !== host) {
const urlFull = new URL(window.location.href); let urlFull = new URL(window.location.href);
urlFull.host = domain; urlFull.host = domain;
window.location.href = urlFull.toString(); window.location.href = urlFull.toString();
return; return;

View File

@ -67,7 +67,7 @@ const closeSearch = () => {
}; };
// //
const menuSearch = (queryString: string, cb: (options: any[]) => void) => { const menuSearch = (queryString: string, cb: (options: any[]) => void) => {
const options = state.menuList.filter((item) => { let options = state.menuList.filter((item) => {
return item.title.indexOf(queryString) > -1; return item.title.indexOf(queryString) > -1;
}); });
cb(options); cb(options);

View File

@ -24,9 +24,10 @@
</template> </template>
<script setup lang="ts" name="layoutBreadcrumbUserNews"> <script setup lang="ts" name="layoutBreadcrumbUserNews">
import { storeToRefs } from 'pinia';
import { useNoticeStore } from '@/store/modules/notice'; import { useNoticeStore } from '@/store/modules/notice';
const noticeStore = useNoticeStore(); const noticeStore = storeToRefs(useNoticeStore());
const { readAll } = useNoticeStore(); const { readAll } = useNoticeStore();
// //
@ -41,7 +42,7 @@ const newsList = ref([]) as any;
*/ */
const getTableData = async () => { const getTableData = async () => {
state.loading = true; state.loading = true;
newsList.value = noticeStore.state.notices; newsList.value = noticeStore.state.value.notices;
state.loading = false; state.loading = false;
}; };
@ -49,7 +50,7 @@ const getTableData = async () => {
const onNewsClick = (item: any) => { const onNewsClick = (item: any) => {
newsList.value[item].read = true; newsList.value[item].read = true;
//pinia //pinia
noticeStore.state.notices = newsList.value; noticeStore.state.value.notices = newsList.value;
}; };
// //

View File

@ -34,7 +34,7 @@ import i18n from '@/lang/index';
// vxeTable // vxeTable
import VXETable from 'vxe-table'; import VXETable from 'vxe-table';
import 'vxe-table/lib/style.css'; import 'vxe-table/lib/style.css';
VXETable.setConfig({ VXETable.config({
zIndex: 999999 zIndex: 999999
}); });

View File

@ -14,8 +14,8 @@ NProgress.configure({ showSpinner: false });
const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*']; const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*'];
const isWhiteList = (path: string) => { const isWhiteList = (path: string) => {
return whiteList.some((pattern) => isPathMatch(pattern, path)); return whiteList.some(pattern => isPathMatch(pattern, path))
}; }
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
NProgress.start(); NProgress.start();

View File

@ -93,7 +93,104 @@ export const constantRoutes: RouteRecordRaw[] = [
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载
export const dynamicRoutes: RouteRecordRaw[] = [ export const dynamicRoutes: RouteRecordRaw[] = [
{
path: '/system/user-auth',
component: Layout,
hidden: true,
permissions: ['system:user:edit'],
children: [
{
path: 'role/:userId(\\d+)',
component: () => import('@/views/system/user/authRole.vue'),
name: 'AuthRole',
meta: { title: '分配角色', activeMenu: '/system/user', icon: '', noCache: true }
}
]
},
{
path: '/system/role-auth',
component: Layout,
hidden: true,
permissions: ['system:role:edit'],
children: [
{
path: 'user/:roleId(\\d+)',
component: () => import('@/views/system/role/authUser.vue'),
name: 'AuthUser',
meta: { title: '分配用户', activeMenu: '/system/role', icon: '', noCache: true }
}
]
},
{
path: '/system/dict-data',
component: Layout,
hidden: true,
permissions: ['system:dict:list'],
children: [
{
path: 'index/:dictId(\\d+)',
component: () => import('@/views/system/dict/data.vue'),
name: 'Data',
meta: { title: '字典数据', activeMenu: '/system/dict', icon: '', noCache: true }
}
]
},
{
path: '/system/oss-config',
component: Layout,
hidden: true,
permissions: ['system:ossConfig:list'],
children: [
{
path: 'index',
component: () => import('@/views/system/oss/config.vue'),
name: 'OssConfig',
meta: { title: '配置管理', activeMenu: '/system/oss', icon: '', noCache: true }
}
]
},
{
path: '/tool/gen-edit',
component: Layout,
hidden: true,
permissions: ['tool:gen:edit'],
children: [
{
path: 'index/:tableId(\\d+)',
component: () => import('@/views/tool/gen/editTable.vue'),
name: 'GenEdit',
meta: { title: '修改生成配置', activeMenu: '/tool/gen', icon: '', noCache: true }
}
]
},
{
path: '/workflow/leaveEdit',
component: Layout,
hidden: true,
permissions: ['workflow:leave:edit'],
children: [
{
path: 'index',
component: () => import('@/views/workflow/leave/leaveEdit.vue'),
name: 'leaveEdit',
meta: { title: '请假申请', activeMenu: '/workflow/leave', noCache: true }
}
]
},
{
path: '/workflow/design',
component: Layout,
hidden: true,
permissions: ['workflow:leave:edit'],
children: [
{
path: 'index',
component: () => import('@/views/workflow/processDefinition/design.vue'),
name: 'design',
meta: { title: '流程设计', activeMenu: '/workflow/processDefinition', noCache: true }
}
]
}
]; ];
/** /**

View File

@ -1,4 +1,4 @@
import { createPinia } from 'pinia'; import { createPinia } from "pinia";
const store = createPinia(); const store = createPinia();

View File

@ -99,14 +99,14 @@ export const usePermissionStore = defineStore('permission', () => {
}; };
const filterChildren = (childrenMap: RouteRecordRaw[], lastRouter?: RouteRecordRaw): RouteRecordRaw[] => { const filterChildren = (childrenMap: RouteRecordRaw[], lastRouter?: RouteRecordRaw): RouteRecordRaw[] => {
let children: RouteRecordRaw[] = []; let children: RouteRecordRaw[] = [];
childrenMap.forEach((el) => { childrenMap.forEach(el => {
el.path = lastRouter ? lastRouter.path + '/' + el.path : el.path; el.path = lastRouter ? lastRouter.path + '/' + el.path : el.path;
if (el.children && el.children.length && el.component?.toString() === 'ParentView') { if (el.children && el.children.length && el.component?.toString() === 'ParentView') {
children = children.concat(filterChildren(el.children, el)); children = children.concat(filterChildren(el.children, el));
} else { } else {
children.push(el); children.push(el);
} }
}); })
return children; return children;
}; };
return { return {

View File

@ -5,6 +5,7 @@ import { useStorage } from '@vueuse/core';
import { ref } from 'vue'; import { ref } from 'vue';
export const useSettingsStore = defineStore('setting', () => { export const useSettingsStore = defineStore('setting', () => {
// @ts-ignore
const storageSetting = useStorage<LayoutSetting>('layout-setting', { const storageSetting = useStorage<LayoutSetting>('layout-setting', {
topNav: defaultSettings.topNav, topNav: defaultSettings.topNav,
tagsView: defaultSettings.tagsView, tagsView: defaultSettings.tagsView,

View File

@ -48,3 +48,4 @@ export type ObjKeysToUnion<T, P extends string = ''> = T extends object
[K in keyof T]: ObjKeysToUnion<T[K], P extends '' ? `${K & string}` : `${P}.${K & string}`>; [K in keyof T]: ObjKeysToUnion<T[K], P extends '' ? `${K & string}` : `${P}.${K & string}`>;
}[keyof T] }[keyof T]
: P; : P;

View File

@ -191,8 +191,7 @@ export function download(url: string, params: any, fileName: string) {
const blob = new Blob([resp]); const blob = new Blob([resp]);
FileSaver.saveAs(blob, fileName); FileSaver.saveAs(blob, fileName);
} else { } else {
const blob = new Blob([resp]); const resText = await resp.data.text();
const resText = await blob.text();
const rspObj = JSON.parse(resText); const rspObj = JSON.parse(resText);
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']; const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'];
ElMessage.error(errMsg); ElMessage.error(errMsg);

View File

@ -178,11 +178,11 @@ export const handleTree = <T>(data: any[], id?: string, parentId?: string, child
for (const d of data) { for (const d of data) {
const parentId = d[config.parentId]; const parentId = d[config.parentId];
const parentObj = childrenListMap[parentId]; const parentObj = childrenListMap[parentId]
if (!parentObj) { if (!parentObj) {
tree.push(d); tree.push(d);
} else { } else {
parentObj[config.childrenList].push(d); parentObj[config.childrenList].push(d)
} }
} }
return tree; return tree;

View File

@ -22,7 +22,7 @@
<script setup lang="ts"> <script setup lang="ts">
import errImage from '@/assets/401_images/401.gif'; import errImage from '@/assets/401_images/401.gif';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; let { proxy } = getCurrentInstance() as ComponentInternalInstance;
const errGif = ref(errImage + '?' + +new Date()); const errGif = ref(errImage + '?' + +new Date());

View File

@ -22,7 +22,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const message = computed(() => { let message = computed(() => {
return '找不到网页!'; return '找不到网页!';
}); });
</script> </script>

View File

@ -26,7 +26,7 @@
* 文件存储 七牛阿里腾讯 云存储<br /> * 文件存储 七牛阿里腾讯 云存储<br />
* 监控框架 SpringBoot-Admin 全方位服务监控<br /> * 监控框架 SpringBoot-Admin 全方位服务监控<br />
* 校验框架 Validation 增强接口安全性 严谨性<br /> * 校验框架 Validation 增强接口安全性 严谨性<br />
* Excel框架 FastExcel(Alibaba EasyExcel) 性能优异 扩展性强<br /> * Excel框架 Alibaba EasyExcel 性能优异 扩展性强<br />
* 文档框架 SpringDocjavadoc 无注解零入侵基于java注释<br /> * 文档框架 SpringDocjavadoc 无注解零入侵基于java注释<br />
* 工具类框架 HutoolLombok 减少代码冗余 增加安全性<br /> * 工具类框架 HutoolLombok 减少代码冗余 增加安全性<br />
* 代码生成器 适配MPSpringDoc规范化代码 一键生成前后端代码<br /> * 代码生成器 适配MPSpringDoc规范化代码 一键生成前后端代码<br />

View File

@ -260,9 +260,10 @@ onMounted(() => {
background: #ffffff; background: #ffffff;
width: 400px; width: 400px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
z-index: 1;
.el-input { .el-input {
height: 40px; height: 40px;
input { input {
height: 40px; height: 40px;
} }

View File

@ -203,6 +203,7 @@ onMounted(() => {
line-height: 0; line-height: 0;
color: #7483a3; color: #7483a3;
} }
} }
.register-form { .register-form {

View File

@ -300,7 +300,7 @@ const handleExport = () => {
/** 状态修改 */ /** 状态修改 */
const handleStatusChange = async (row: ClientVO) => { const handleStatusChange = async (row: ClientVO) => {
const text = row.status === '0' ? '启用' : '停用'; let text = row.status === '0' ? '启用' : '停用';
try { try {
await proxy?.$modal.confirm('确认要"' + text + '"吗?'); await proxy?.$modal.confirm('确认要"' + text + '"吗?');
await changeStatus(row.clientId, row.status); await changeStatus(row.clientId, row.status);

View File

@ -87,18 +87,10 @@
<el-input v-model="form.configKey" placeholder="请输入配置key" /> <el-input v-model="form.configKey" placeholder="请输入配置key" />
</el-form-item> </el-form-item>
<el-form-item label="访问站点" prop="endpoint"> <el-form-item label="访问站点" prop="endpoint">
<el-input v-model="form.endpoint" placeholder="请输入访问站点"> <el-input v-model="form.endpoint" placeholder="请输入访问站点" />
<template #prefix>
<span style="color: #999">{{ protocol }}</span>
</template>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="自定义域名" prop="domain"> <el-form-item label="自定义域名" prop="domain">
<el-input v-model="form.domain" placeholder="请输入自定义域名"> <el-input v-model="form.domain" placeholder="请输入自定义域名" />
<template #prefix>
<span style="color: #999">{{ protocol }}</span>
</template>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="accessKey" prop="accessKey"> <el-form-item label="accessKey" prop="accessKey">
<el-input v-model="form.accessKey" placeholder="请输入accessKey" /> <el-input v-model="form.accessKey" placeholder="请输入accessKey" />
@ -247,8 +239,6 @@ const data = reactive<PageData<OssConfigForm, OssConfigQuery>>({
const { queryParams, form, rules } = toRefs(data); const { queryParams, form, rules } = toRefs(data);
const protocol = computed(() => (form.value.isHttps === 'Y' ? 'https://' : 'http://'));
/** 查询对象存储配置列表 */ /** 查询对象存储配置列表 */
const getList = async () => { const getList = async () => {
loading.value = true; loading.value = true;
@ -316,7 +306,7 @@ const submitForm = () => {
}; };
/** 状态修改 */ /** 状态修改 */
const handleStatusChange = async (row: OssConfigVO) => { const handleStatusChange = async (row: OssConfigVO) => {
const text = row.status === '0' ? '启用' : '停用'; let text = row.status === '0' ? '启用' : '停用';
try { try {
await proxy?.$modal.confirm('确认要"' + text + '""' + row.configKey + '"配置吗?'); await proxy?.$modal.confirm('确认要"' + text + '""' + row.configKey + '"配置吗?');
await changeOssConfigStatus(row.ossConfigId, row.status, row.configKey); await changeOssConfigStatus(row.ossConfigId, row.status, row.configKey);

View File

@ -255,9 +255,9 @@ const handleHeaderCLick = (column: any) => {
handleOrderChange(column.property, column.multiOrder); handleOrderChange(column.property, column.multiOrder);
}; };
const handleOrderChange = (prop: string, order: string) => { const handleOrderChange = (prop: string, order: string) => {
const orderByArr = queryParams.value.orderByColumn ? queryParams.value.orderByColumn.split(',') : []; let orderByArr = queryParams.value.orderByColumn ? queryParams.value.orderByColumn.split(',') : [];
const isAscArr = queryParams.value.isAsc ? queryParams.value.isAsc.split(',') : []; let isAscArr = queryParams.value.isAsc ? queryParams.value.isAsc.split(',') : [];
const propIndex = orderByArr.indexOf(prop); let propIndex = orderByArr.indexOf(prop);
if (propIndex !== -1) { if (propIndex !== -1) {
if (order) { if (order) {
// //
@ -306,7 +306,7 @@ const handleDownload = (row: OssVO) => {
}; };
/** 预览开关按钮 */ /** 预览开关按钮 */
const handlePreviewListResource = async (preview: boolean) => { const handlePreviewListResource = async (preview: boolean) => {
const text = preview ? '启用' : '停用'; let text = preview ? '启用' : '停用';
try { try {
await proxy?.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?'); await proxy?.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?');
await proxy?.updateConfigByKey('sys.oss.previewListResource', preview); await proxy?.updateConfigByKey('sys.oss.previewListResource', preview);

View File

@ -323,7 +323,7 @@ const handleSelectionChange = (selection: RoleVO[]) => {
/** 角色状态修改 */ /** 角色状态修改 */
const handleStatusChange = async (row: RoleVO) => { const handleStatusChange = async (row: RoleVO) => {
const text = row.status === '0' ? '启用' : '停用'; let text = row.status === '0' ? '启用' : '停用';
try { try {
await proxy?.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?'); await proxy?.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?');
await changeRoleStatus(row.roleId, row.status); await changeRoleStatus(row.roleId, row.status);
@ -346,11 +346,11 @@ const getMenuTreeselect = async () => {
/** 所有部门节点数据 */ /** 所有部门节点数据 */
const getDeptAllCheckedKeys = (): any => { const getDeptAllCheckedKeys = (): any => {
// //
const checkedKeys = deptRef.value?.getCheckedKeys(); let checkedKeys = deptRef.value?.getCheckedKeys();
// //
const halfCheckedKeys = deptRef.value?.getHalfCheckedKeys(); let halfCheckedKeys = deptRef.value?.getHalfCheckedKeys();
if (halfCheckedKeys) { if (halfCheckedKeys) {
checkedKeys?.unshift(...halfCheckedKeys); checkedKeys?.unshift.apply(checkedKeys, halfCheckedKeys);
} }
return checkedKeys; return checkedKeys;
}; };
@ -404,14 +404,14 @@ const getRoleDeptTreeSelect = async (roleId: string | number) => {
/** 树权限(展开/折叠)*/ /** 树权限(展开/折叠)*/
const handleCheckedTreeExpand = (value: boolean, type: string) => { const handleCheckedTreeExpand = (value: boolean, type: string) => {
if (type == 'menu') { if (type == 'menu') {
const treeList = menuOptions.value; let treeList = menuOptions.value;
for (let i = 0; i < treeList.length; i++) { for (let i = 0; i < treeList.length; i++) {
if (menuRef.value) { if (menuRef.value) {
menuRef.value.store.nodesMap[treeList[i].id].expanded = value; menuRef.value.store.nodesMap[treeList[i].id].expanded = value;
} }
} }
} else if (type == 'dept') { } else if (type == 'dept') {
const treeList = deptOptions.value; let treeList = deptOptions.value;
for (let i = 0; i < treeList.length; i++) { for (let i = 0; i < treeList.length; i++) {
if (deptRef.value) { if (deptRef.value) {
deptRef.value.store.nodesMap[treeList[i].id].expanded = value; deptRef.value.store.nodesMap[treeList[i].id].expanded = value;
@ -438,11 +438,11 @@ const handleCheckedTreeConnect = (value: any, type: string) => {
/** 所有菜单节点数据 */ /** 所有菜单节点数据 */
const getMenuAllCheckedKeys = (): any => { const getMenuAllCheckedKeys = (): any => {
// //
const checkedKeys = menuRef.value?.getCheckedKeys(); let checkedKeys = menuRef.value?.getCheckedKeys();
// //
const halfCheckedKeys = menuRef.value?.getHalfCheckedKeys(); let halfCheckedKeys = menuRef.value?.getHalfCheckedKeys();
if (halfCheckedKeys) { if (halfCheckedKeys) {
checkedKeys?.unshift(...halfCheckedKeys); checkedKeys?.unshift.apply(checkedKeys, halfCheckedKeys);
} }
return checkedKeys; return checkedKeys;
}; };

View File

@ -245,7 +245,7 @@ const getList = async () => {
// //
const handleStatusChange = async (row: TenantVO) => { const handleStatusChange = async (row: TenantVO) => {
const text = row.status === '0' ? '启用' : '停用'; let text = row.status === '0' ? '启用' : '停用';
try { try {
await proxy?.$modal.confirm('确认要"' + text + '""' + row.companyName + '"租户吗?'); await proxy?.$modal.confirm('确认要"' + text + '""' + row.companyName + '"租户吗?');
await changeTenantStatus(row.id, row.tenantId, row.status); await changeTenantStatus(row.id, row.tenantId, row.status);
@ -361,7 +361,7 @@ const handleExport = () => {
/**同步租户字典*/ /**同步租户字典*/
const handleSyncTenantDict = async () => { const handleSyncTenantDict = async () => {
await proxy?.$modal.confirm('确认要同步所有租户字典吗?'); await proxy?.$modal.confirm('确认要同步所有租户字典吗?');
const res = await syncTenantDict(); let res = await syncTenantDict();
proxy?.$modal.msgSuccess(res.msg); proxy?.$modal.msgSuccess(res.msg);
}; };

View File

@ -167,11 +167,11 @@ const getMenuTreeselect = async () => {
// //
const getMenuAllCheckedKeys = (): any => { const getMenuAllCheckedKeys = (): any => {
// //
const checkedKeys = menuTreeRef.value?.getCheckedKeys(); let checkedKeys = menuTreeRef.value?.getCheckedKeys();
// //
const halfCheckedKeys = menuTreeRef.value?.getHalfCheckedKeys(); let halfCheckedKeys = menuTreeRef.value?.getHalfCheckedKeys();
if (halfCheckedKeys) { if (halfCheckedKeys) {
checkedKeys?.unshift(...halfCheckedKeys); checkedKeys?.unshift.apply(checkedKeys, halfCheckedKeys);
} }
return checkedKeys; return checkedKeys;
}; };
@ -194,7 +194,7 @@ const getList = async () => {
// //
const handleStatusChange = async (row: TenantPkgVO) => { const handleStatusChange = async (row: TenantPkgVO) => {
const text = row.status === '0' ? '启用' : '停用'; let text = row.status === '0' ? '启用' : '停用';
const [err] = await to(proxy?.$modal.confirm('确认要"' + text + '""' + row.packageName + '"套餐吗?') as Promise<any>); const [err] = await to(proxy?.$modal.confirm('确认要"' + text + '""' + row.packageName + '"套餐吗?') as Promise<any>);
if (err) { if (err) {
row.status = row.status === '0' ? '1' : '0'; row.status = row.status === '0' ? '1' : '0';
@ -241,7 +241,7 @@ const handleSelectionChange = (selection: TenantPkgVO[]) => {
// / // /
const handleCheckedTreeExpand = (value: CheckboxValueType, type: string) => { const handleCheckedTreeExpand = (value: CheckboxValueType, type: string) => {
if (type == 'menu') { if (type == 'menu') {
const treeList = menuOptions.value; let treeList = menuOptions.value;
for (let i = 0; i < treeList.length; i++) { for (let i = 0; i < treeList.length; i++) {
if (menuTreeRef.value) { if (menuTreeRef.value) {
menuTreeRef.value.store.nodesMap[treeList[i].id].expanded = value as boolean; menuTreeRef.value.store.nodesMap[treeList[i].id].expanded = value as boolean;

View File

@ -33,7 +33,7 @@
<span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span> <span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column type="selection" :reserve-selection="true" :selectable="checkSelectable" width="55"></el-table-column> <el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
<el-table-column label="角色编号" align="center" prop="roleId" /> <el-table-column label="角色编号" align="center" prop="roleId" />
<el-table-column label="角色名称" align="center" prop="roleName" /> <el-table-column label="角色名称" align="center" prop="roleName" />
<el-table-column label="权限字符" align="center" prop="roleKey" /> <el-table-column label="权限字符" align="center" prop="roleKey" />
@ -80,10 +80,8 @@ const tableRef = ref<ElTableInstance>();
/** 单击选中行数据 */ /** 单击选中行数据 */
const clickRow = (row: RoleVO) => { const clickRow = (row: RoleVO) => {
if (checkSelectable(row)) { row.flag = !row.flag;
row.flag = !row.flag; tableRef.value?.toggleRowSelection(row, row.flag);
tableRef.value?.toggleRowSelection(row, row.flag);
}
}; };
/** 多选框选中数据 */ /** 多选框选中数据 */
const handleSelectionChange = (selection: RoleVO[]) => { const handleSelectionChange = (selection: RoleVO[]) => {
@ -93,10 +91,6 @@ const handleSelectionChange = (selection: RoleVO[]) => {
const getRowKey = (row: RoleVO): string => { const getRowKey = (row: RoleVO): string => {
return String(row.roleId); return String(row.roleId);
}; };
/** 检查角色状态 */
const checkSelectable = (row: RoleVO): boolean => {
return row.status === '0';
};
/** 关闭按钮 */ /** 关闭按钮 */
const close = () => { const close = () => {
const obj: RouteLocationNormalized = { const obj: RouteLocationNormalized = {

View File

@ -498,7 +498,7 @@ const handleDelete = async (row?: UserVO) => {
/** 用户状态修改 */ /** 用户状态修改 */
const handleStatusChange = async (row: UserVO) => { const handleStatusChange = async (row: UserVO) => {
const text = row.status === '0' ? '启用' : '停用'; let text = row.status === '0' ? '启用' : '停用';
try { try {
await proxy?.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?'); await proxy?.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?');
await api.changeUserStatus(row.userId, row.status); await api.changeUserStatus(row.userId, row.status);

View File

@ -134,7 +134,7 @@ const beforeUpload = (file: UploadRawFile): any => {
/** 上传图片 */ /** 上传图片 */
const uploadImg = async () => { const uploadImg = async () => {
cropper.value.getCropBlob(async (data: any) => { cropper.value.getCropBlob(async (data: any) => {
const formData = new FormData(); let formData = new FormData();
formData.append('avatarfile', data, options.fileName); formData.append('avatarfile', data, options.fileName);
const res = await uploadAvatar(formData); const res = await uploadAvatar(formData);
open.value = false; open.value = false;

View File

@ -113,8 +113,8 @@
</template> </template>
<script setup name="Gen" lang="ts"> <script setup name="Gen" lang="ts">
import { delTable, genCode, getDataNames, listTable, previewTable, synchDb } from '@/api/tool/gen'; import {delTable, genCode, getDataNames, listTable, previewTable, synchDb} from '@/api/tool/gen';
import { TableQuery, TableVO } from '@/api/tool/gen/types'; import {TableQuery, TableVO} from '@/api/tool/gen/types';
import router from '@/router'; import router from '@/router';
import ImportTable from './importTable.vue'; import ImportTable from './importTable.vue';

View File

@ -34,7 +34,7 @@
:default-expand-all="isExpandAll" :default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
> >
<el-table-column label="分类名称" prop="categoryName" width="260" /> <el-table-column label="分类名称" prop="categoryName" width="260"/>
<el-table-column label="显示顺序" align="center" prop="orderNum" width="200" /> <el-table-column label="显示顺序" align="center" prop="orderNum" width="200" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" /> <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
@ -77,7 +77,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
@ -88,16 +88,17 @@
</template> </template>
<script setup name="Category" lang="ts"> <script setup name="Category" lang="ts">
import { listCategory, getCategory, delCategory, addCategory, updateCategory } from '@/api/workflow/category'; import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/workflow/category";
import { CategoryVO, CategoryQuery, CategoryForm } from '@/api/workflow/category/types'; import { CategoryVO, CategoryQuery, CategoryForm } from '@/api/workflow/category/types';
type CategoryOption = { type CategoryOption = {
categoryId: number; categoryId: number;
categoryName: string; categoryName: string;
children?: CategoryOption[]; children?: CategoryOption[];
}; }
const { proxy } = getCurrentInstance() as ComponentInternalInstance;;
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const categoryList = ref<CategoryVO[]>([]); const categoryList = ref<CategoryVO[]>([]);
const categoryOptions = ref<CategoryOption[]>([]); const categoryOptions = ref<CategoryOption[]>([]);
@ -108,29 +109,32 @@ const loading = ref(false);
const queryFormRef = ref<ElFormInstance>(); const queryFormRef = ref<ElFormInstance>();
const categoryFormRef = ref<ElFormInstance>(); const categoryFormRef = ref<ElFormInstance>();
const categoryTableRef = ref<ElTableInstance>(); const categoryTableRef = ref<ElTableInstance>()
const dialog = reactive<DialogOption>({ const dialog = reactive<DialogOption>({
visible: false, visible: false,
title: '' title: ''
}); });
const initFormData: CategoryForm = { const initFormData: CategoryForm = {
categoryId: undefined, categoryId: undefined,
categoryName: '', categoryName: "",
parentId: undefined, parentId: undefined,
orderNum: 0 orderNum: 0,
}; }
const data = reactive<PageData<CategoryForm, CategoryQuery>>({ const data = reactive<PageData<CategoryForm, CategoryQuery>>({
form: { ...initFormData }, form: {...initFormData},
queryParams: { queryParams: {
categoryName: undefined categoryName: undefined,
}, },
rules: { rules: {
categoryId: [{ required: true, message: '流程分类ID不能为空', trigger: 'blur' }], categoryId: [
parentId: [{ required: true, message: '请选择上级分类', trigger: 'change' }], { required: true, message: "流程分类ID不能为空", trigger: "blur" }
categoryName: [{ required: true, message: '请输入分类名称', trigger: 'blur' }] ],
parentId: [{ required: true, message: "请选择上级分类", trigger: "change" }],
categoryName: [{ required: true, message: "请输入分类名称", trigger: "blur" }]
} }
}); });
@ -140,19 +144,19 @@ const { queryParams, form, rules } = toRefs(data);
const getList = async () => { const getList = async () => {
loading.value = true; loading.value = true;
const res = await listCategory(queryParams.value); const res = await listCategory(queryParams.value);
const data = proxy?.handleTree<CategoryVO>(res.data, 'categoryId', 'parentId'); const data = proxy?.handleTree<CategoryVO>(res.data, "categoryId", "parentId");
if (data) { if (data) {
categoryList.value = data; categoryList.value = data;
loading.value = false; loading.value = false;
} }
}; }
/** 查询流程分类下拉树结构 */ /** 查询流程分类下拉树结构 */
const getTreeselect = async () => { const getTreeselect = async () => {
const res = await listCategory(); const res = await listCategory();
categoryOptions.value = []; categoryOptions.value = [];
// //
const data = proxy?.handleTree<CategoryOption>(res.data, 'categoryId', 'parentId'); const data = proxy?.handleTree<CategoryOption>(res.data, "categoryId", "parentId");
if (data) { if (data) {
categoryOptions.value = data; // categoryOptions.value = data; //
} }
@ -162,24 +166,24 @@ const getTreeselect = async () => {
const cancel = () => { const cancel = () => {
reset(); reset();
dialog.visible = false; dialog.visible = false;
}; }
// //
const reset = () => { const reset = () => {
form.value = { ...initFormData }; form.value = {...initFormData}
categoryFormRef.value?.resetFields(); categoryFormRef.value?.resetFields();
}; }
/** 搜索按钮操作 */ /** 搜索按钮操作 */
const handleQuery = () => { const handleQuery = () => {
getList(); getList();
}; }
/** 重置按钮操作 */ /** 重置按钮操作 */
const resetQuery = () => { const resetQuery = () => {
queryFormRef.value?.resetFields(); queryFormRef.value?.resetFields();
handleQuery(); handleQuery();
}; }
/** 新增按钮操作 */ /** 新增按钮操作 */
const handleAdd = (row?: CategoryVO) => { const handleAdd = (row?: CategoryVO) => {
@ -191,22 +195,22 @@ const handleAdd = (row?: CategoryVO) => {
form.value.parentId = undefined; form.value.parentId = undefined;
} }
dialog.visible = true; dialog.visible = true;
dialog.title = '添加流程分类'; dialog.title = "添加流程分类";
}; }
/** 展开/折叠操作 */ /** 展开/折叠操作 */
const handleToggleExpandAll = () => { const handleToggleExpandAll = () => {
isExpandAll.value = !isExpandAll.value; isExpandAll.value = !isExpandAll.value;
toggleExpandAll(categoryList.value, isExpandAll.value); toggleExpandAll(categoryList.value, isExpandAll.value)
}; }
/** 展开/折叠操作 */ /** 展开/折叠操作 */
const toggleExpandAll = (data: CategoryVO[], status: boolean) => { const toggleExpandAll = (data: CategoryVO[], status: boolean) => {
data.forEach((item) => { data.forEach((item) => {
categoryTableRef.value?.toggleRowExpansion(item, status); categoryTableRef.value?.toggleRowExpansion(item, status)
if (item.children && item.children.length > 0) toggleExpandAll(item.children, status); if (item.children && item.children.length > 0) toggleExpandAll(item.children, status)
}); })
}; }
/** 修改按钮操作 */ /** 修改按钮操作 */
const handleUpdate = async (row: CategoryVO) => { const handleUpdate = async (row: CategoryVO) => {
@ -218,8 +222,8 @@ const handleUpdate = async (row: CategoryVO) => {
const res = await getCategory(row.categoryId); const res = await getCategory(row.categoryId);
Object.assign(form.value, res.data); Object.assign(form.value, res.data);
dialog.visible = true; dialog.visible = true;
dialog.title = '修改流程分类'; dialog.title = "修改流程分类";
}; }
/** 提交按钮 */ /** 提交按钮 */
const submitForm = () => { const submitForm = () => {
@ -227,25 +231,25 @@ const submitForm = () => {
if (valid) { if (valid) {
buttonLoading.value = true; buttonLoading.value = true;
if (form.value.categoryId) { if (form.value.categoryId) {
await updateCategory(form.value).finally(() => (buttonLoading.value = false)); await updateCategory(form.value).finally(() => buttonLoading.value = false);
} else { } else {
await addCategory(form.value).finally(() => (buttonLoading.value = false)); await addCategory(form.value).finally(() => buttonLoading.value = false);
} }
proxy?.$modal.msgSuccess('操作成功'); proxy?.$modal.msgSuccess("操作成功");
dialog.visible = false; dialog.visible = false;
getList(); getList();
} }
}); });
}; }
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (row: CategoryVO) => { const handleDelete = async (row: CategoryVO) => {
await proxy?.$modal.confirm('是否确认删除"' + row.categoryName + '"的分类?'); await proxy?.$modal.confirm('是否确认删除"' + row.categoryName + '"的分类?');
loading.value = true; loading.value = true;
await delCategory(row.categoryId).finally(() => (loading.value = false)); await delCategory(row.categoryId).finally(() => loading.value = false);
await getList(); await getList();
proxy?.$modal.msgSuccess('删除成功'); proxy?.$modal.msgSuccess("删除成功");
}; }
onMounted(() => { onMounted(() => {
getList(); getList();

View File

@ -222,7 +222,7 @@ const handleExport = () => {
const handleCancelProcessApply = async (id: string) => { const handleCancelProcessApply = async (id: string) => {
await proxy?.$modal.confirm('是否确认撤销当前单据?'); await proxy?.$modal.confirm('是否确认撤销当前单据?');
loading.value = true; loading.value = true;
const data = { let data = {
businessId: id, businessId: id,
message: '申请人撤销流程!' message: '申请人撤销流程!'
}; };

View File

@ -1,15 +1,17 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<el-card shadow="never"> <el-card shadow="never">
<approvalButton <div style="display: flex; justify-content: space-between">
@submitForm="submitForm" <div>
@approvalVerifyOpen="approvalVerifyOpen" <el-button v-if="submitButtonShow" :loading="buttonLoading" type="info" @click="submitForm('draft')">暂存</el-button>
@handleApprovalRecord="handleApprovalRecord" <el-button v-if="submitButtonShow" :loading="buttonLoading" type="primary" @click="submitForm('submit')"> </el-button>
:buttonLoading="buttonLoading" <el-button v-if="approvalButtonShow" :loading="buttonLoading" type="primary" @click="approvalVerifyOpen">审批</el-button>
:id="form.id" <el-button v-if="form && form.id && form.status !== 'draft'" type="primary" @click="handleApprovalRecord">流程进度</el-button>
:status="form.status" </div>
:pageType="routeParams.type" <div>
/> <el-button style="float: right" @click="goBack()">返回</el-button>
</div>
</div>
</el-card> </el-card>
<el-card shadow="never" style="height: 78vh; overflow-y: auto"> <el-card shadow="never" style="height: 78vh; overflow-y: auto">
<el-form ref="leaveFormRef" v-loading="loading" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="80px"> <el-form ref="leaveFormRef" v-loading="loading" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="80px">
@ -18,7 +20,7 @@
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="请假时间" required> <el-form-item label="请假时间">
<el-date-picker <el-date-picker
v-model="leaveTime" v-model="leaveTime"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@ -62,7 +64,6 @@ import { LeaveForm, LeaveQuery, LeaveVO } from '@/api/workflow/leave/types';
import { startWorkFlow } from '@/api/workflow/task'; import { startWorkFlow } from '@/api/workflow/task';
import SubmitVerify from '@/components/Process/submitVerify.vue'; import SubmitVerify from '@/components/Process/submitVerify.vue';
import ApprovalRecord from '@/components/Process/approvalRecord.vue'; import ApprovalRecord from '@/components/Process/approvalRecord.vue';
import ApprovalButton from '@/components/Process/approvalButton.vue';
import { AxiosResponse } from 'axios'; import { AxiosResponse } from 'axios';
import { StartProcessBo } from '@/api/workflow/workflowCommon/types'; import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -127,8 +128,6 @@ const dialogVisible = reactive<DialogOption>({
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>(); const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
// //
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>(); const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
//
const approvalButtonRef = ref<InstanceType<typeof ApprovalButton>>();
const leaveFormRef = ref<ElFormInstance>(); const leaveFormRef = ref<ElFormInstance>();
@ -213,9 +212,9 @@ const submitForm = (status: string) => {
buttonLoading.value = true; buttonLoading.value = true;
let res: AxiosResponse<LeaveVO>; let res: AxiosResponse<LeaveVO>;
if (form.value.id) { if (form.value.id) {
res = await updateLeave(form.value).finally(() => (buttonLoading.value = false)); res = await updateLeave(form.value);
} else { } else {
res = await addLeave(form.value).finally(() => (buttonLoading.value = false)); res = await addLeave(form.value);
} }
form.value = res.data; form.value = res.data;
if (status === 'draft') { if (status === 'draft') {
@ -253,9 +252,7 @@ const handleStartWorkFlow = async (data: LeaveForm) => {
submitFormData.value.businessId = data.id; submitFormData.value.businessId = data.id;
// //
taskVariables.value = { taskVariables.value = {
// leave2/6 使
leaveDays: data.leaveDays, leaveDays: data.leaveDays,
// leave4/5 使
userList: ['1', '3', '4'] userList: ['1', '3', '4']
}; };
submitFormData.value.variables = taskVariables.value; submitFormData.value.variables = taskVariables.value;
@ -277,6 +274,12 @@ const submitCallback = async () => {
await proxy.$tab.closePage(proxy.$route); await proxy.$tab.closePage(proxy.$route);
proxy.$router.go(-1); proxy.$router.go(-1);
}; };
//
const goBack = () => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.go(-1);
};
// //
const approvalVerifyOpen = async () => { const approvalVerifyOpen = async () => {
submitVerifyRef.value.openDialog(routeParams.value.taskId); submitVerifyRef.value.openDialog(routeParams.value.taskId);

View File

@ -4,7 +4,7 @@
</div> </div>
</template> </template>
<script setup name="WarmFlow" lang="ts"> <script setup name="WarmFlow">
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
@ -24,12 +24,12 @@ const iframeLoaded = () => {
}; };
}; };
const open = async (definitionId, disabled) => { const open = async (definitionId, disabled) => {
const url = baseUrl + `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`; let url = baseUrl + `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`;
iframeUrl.value = url + '&Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID; iframeUrl.value = url + '&Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID;
}; };
/** 关闭按钮 */ /** 关闭按钮 */
function close() { function close() {
const obj = { path: '/workflow/processDefinition', query: { activeName: proxy.$route.query.activeName } }; const obj = { path: '/workflow/processDefinition', query: {activeName: proxy.$route.query.activeName}};
proxy.$tab.closeOpenPage(obj); proxy.$tab.closeOpenPage(obj);
} }

View File

@ -197,7 +197,7 @@ import { categoryTree } from '@/api/workflow/category';
import { CategoryTreeVO } from '@/api/workflow/category/types'; import { CategoryTreeVO } from '@/api/workflow/category/types';
import { FlowDefinitionQuery, FlowDefinitionVo, FlowDefinitionForm } from '@/api/workflow/definition/types'; import { FlowDefinitionQuery, FlowDefinitionVo, FlowDefinitionForm } from '@/api/workflow/definition/types';
import { UploadRequestOptions, TabsPaneContext } from 'element-plus'; import { UploadRequestOptions, TabsPaneContext } from 'element-plus';
import { ElMessageBoxOptions } from 'element-plus/es/components/message-box/src/message-box.type'; import { ElMessageBoxOptions } from "element-plus/es/components/message-box/src/message-box.type";
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -326,7 +326,7 @@ const handleSelectionChange = (selection: any) => {
}; };
// //
const getPageList = async () => { const getPageList = async () => {
const query = proxy.$route.query; let query = proxy.$route.query;
if (query.activeName) { if (query.activeName) {
activeName.value = query.activeName; activeName.value = query.activeName;
} }
@ -411,7 +411,7 @@ const handlerBeforeUpload = () => {
}; };
// //
const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest => { const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest => {
const formData = new FormData(); let formData = new FormData();
uploadDialogLoading.value = true; uploadDialogLoading.value = true;
formData.append('file', data.file); formData.append('file', data.file);
formData.append('category', selectCategory.value); formData.append('category', selectCategory.value);
@ -466,9 +466,6 @@ const reset = () => {
*/ */
const handleAdd = async () => { const handleAdd = async () => {
reset(); reset();
if (queryParams.value.category != '') {
form.value.category = queryParams.value.category;
}
modelDialog.visible = true; modelDialog.visible = true;
modelDialog.title = '新增流程'; modelDialog.title = '新增流程';
}; };

View File

@ -352,7 +352,7 @@ const handleInvalid = async (row: FlowInstanceVO) => {
await proxy?.$modal.confirm('是否确认作废?'); await proxy?.$modal.confirm('是否确认作废?');
loading.value = true; loading.value = true;
if ('running' === tab.value) { if ('running' === tab.value) {
const param = { let param = {
id: row.id, id: row.id,
comment: deleteReason.value comment: deleteReason.value
}; };
@ -381,7 +381,7 @@ const handleInstanceVariable = async (row: FlowInstanceVO) => {
variableLoading.value = true; variableLoading.value = true;
variableVisible.value = true; variableVisible.value = true;
processDefinitionName.value = row.flowName; processDefinitionName.value = row.flowName;
const data = await instanceVariable(row.id); let data = await instanceVariable(row.id);
variables.value = data.data.variable; variables.value = data.data.variable;
variableLoading.value = false; variableLoading.value = false;
}; };

View File

@ -222,7 +222,7 @@ const handleCancelProcessApply = async (businessId: string) => {
await proxy?.$modal.confirm('是否确认撤销当前单据?'); await proxy?.$modal.confirm('是否确认撤销当前单据?');
loading.value = true; loading.value = true;
if ('running' === tab.value) { if ('running' === tab.value) {
const data = { let data = {
businessId: businessId, businessId: businessId,
message: '申请人撤销流程!' message: '申请人撤销流程!'
}; };