diff --git a/.vscode/launch.json b/.vscode/launch.json index ec531026..f43edc03 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,12 +1,16 @@ { + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { - "name": "Launch debug", + "type": "msedge", "request": "launch", - "type": "chrome", + "name": "Launch Edge against localhost", "url": "http://localhost", - "webRoot": "${workspaceFolder}/src" + "webRoot": "${workspaceFolder}/src", + "sourceMaps": true } ] } diff --git a/build/vite/index.ts b/build/vite/index.ts index 0538f98c..2a6f1311 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -5,6 +5,7 @@ import progress from 'vite-plugin-progress' import EslintPlugin from 'vite-plugin-eslint' import PurgeIcons from 'vite-plugin-purge-icons' import { ViteEjsPlugin } from 'vite-plugin-ejs' +// @ts-ignore import ElementPlus from 'unplugin-element-plus/vite' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' @@ -17,10 +18,12 @@ import UnoCSS from 'unocss/vite' export function createVitePlugins() { const root = process.cwd() + // 路径查找 function pathResolve(dir: string) { return resolve(root, '.', dir) } + return [ Vue(), VueJsx(), diff --git a/build/vite/optimize.ts b/build/vite/optimize.ts index 25b5f4cc..2ec5d2e8 100644 --- a/build/vite/optimize.ts +++ b/build/vite/optimize.ts @@ -17,7 +17,6 @@ const include = [ 'cropperjs', 'lodash-es', 'nprogress', - 'animate.css', 'vxe-table', 'vxe-table/es/style', 'vxe-table/lib/locale/lang/zh-CN', diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 463170c6..a952bbbd 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -62,8 +62,8 @@ export const createProcessInstanceCC = async (data) => { /** * 抄送列表 - * @param params - * @returns + * @param params + * @returns */ export const getProcessInstanceCCPage = async (params) => { return await request.get({ url: '/bpm/process-instance/cc/my-page', params }) diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index 5c19c3c4..df6d8160 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -49,7 +49,7 @@ export const getReturnList = async (params) => { // 回退 export const returnTask = async (data) => { - return await request.put({ url: '/bpm/task/rollback', data }) + return await request.put({ url: '/bpm/task/return', data }) } /** diff --git a/src/api/infra/dataSourceConfig/index.ts b/src/api/infra/dataSourceConfig/index.ts index c0f9f624..70a03eaf 100644 --- a/src/api/infra/dataSourceConfig/index.ts +++ b/src/api/infra/dataSourceConfig/index.ts @@ -1,22 +1,12 @@ import request from '@/config/axios' export interface DataSourceConfigVO { - id: number + id: number | undefined name: string url: string username: string password: string - createTime: Date -} - -// 查询数据源配置列表 -export const getDataSourceConfigListApi = () => { - return request.get({ url: '/infra/data-source-config/list' }) -} - -// 查询数据源配置详情 -export const getDataSourceConfigApi = (id: number) => { - return request.get({ url: '/infra/data-source-config/get?id=' + id }) + createTime?: Date } // 新增数据源配置 @@ -33,3 +23,13 @@ export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => { export const deleteDataSourceConfigApi = (id: number) => { return request.delete({ url: '/infra/data-source-config/delete?id=' + id }) } + +// 查询数据源配置列表 +export const getDataSourceConfigListApi = () => { + return request.get({ url: '/infra/data-source-config/list' }) +} + +// 查询数据源配置详情 +export const getDataSourceConfigApi = (id: number) => { + return request.get({ url: '/infra/data-source-config/get?id=' + id }) +} diff --git a/src/api/infra/fileConfig/index.ts b/src/api/infra/fileConfig/index.ts index 8bad302d..baf17b39 100644 --- a/src/api/infra/fileConfig/index.ts +++ b/src/api/infra/fileConfig/index.ts @@ -13,6 +13,7 @@ export interface FileClientConfig { accessSecret?: string domain: string } + export interface FileConfigVO { id: number name: string diff --git a/src/api/infra/redis/index.ts b/src/api/infra/redis/index.ts index 1214a1da..d41e4bb5 100644 --- a/src/api/infra/redis/index.ts +++ b/src/api/infra/redis/index.ts @@ -6,36 +6,3 @@ import request from '@/config/axios' export const getCacheApi = () => { return request.get({ url: '/infra/redis/get-monitor-info' }) } -// 获取模块 -export const getKeyDefineListApi = () => { - return request.get({ url: '/infra/redis/get-key-define-list' }) -} -/** - * 获取redis key列表 - */ -export const getKeyListApi = (keyTemplate: string) => { - return request.get({ - url: '/infra/redis/get-key-list', - params: { - keyTemplate - } - }) -} -// 获取缓存内容 -export const getKeyValueApi = (key: string) => { - return request.get({ url: '/infra/redis/get-key-value?key=' + key }) -} - -// 根据键名删除缓存 -export const deleteKeyApi = (key: string) => { - return request.delete({ url: '/infra/redis/delete-key?key=' + key }) -} - -export const deleteKeysApi = (keyTemplate: string) => { - return request.delete({ - url: '/infra/redis/delete-keys?', - params: { - keyTemplate - } - }) -} diff --git a/src/api/infra/redis/types.ts b/src/api/infra/redis/types.ts index 2342e543..548bfe96 100644 --- a/src/api/infra/redis/types.ts +++ b/src/api/infra/redis/types.ts @@ -174,12 +174,3 @@ export interface RedisCommandStatsVO { calls: number usec: number } - -export interface RedisKeyInfo { - keyTemplate: string - keyType: string - valueType: string - timeoutType: number - timeout: number - memo: string -} diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 985203e8..eee632d5 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -20,8 +20,8 @@ export interface Sku { stock?: number // 库存 weight?: number // 商品重量,单位:kg 千克 volume?: number // 商品体积,单位:m^3 平米 - firstBrokerageRecord?: number | string // 一级分销的佣金 - secondBrokerageRecord?: number | string // 二级分销的佣金 + firstBrokeragePrice?: number | string // 一级分销的佣金 + secondBrokeragePrice?: number | string // 二级分销的佣金 salesCount?: number // 商品销量 } diff --git a/src/api/system/dict/dict.data.ts b/src/api/system/dict/dict.data.ts index 815e0d46..5f1d29f4 100644 --- a/src/api/system/dict/dict.data.ts +++ b/src/api/system/dict/dict.data.ts @@ -2,7 +2,7 @@ import request from '@/config/axios' import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types' // 查询字典数据(精简)列表 -export const listSimpleDictDataApi = () => { +export const getSimpleDictDataList = () => { return request.get({ url: '/system/dict-data/simple-list' }) } diff --git a/src/api/system/errorCode/index.ts b/src/api/system/errorCode/index.ts index 0e000794..65eabd3a 100644 --- a/src/api/system/errorCode/index.ts +++ b/src/api/system/errorCode/index.ts @@ -1,10 +1,10 @@ import request from '@/config/axios' export interface ErrorCodeVO { - id: number + id: number | undefined type: number applicationName: string - code: number + code: number | undefined message: string memo: string createTime: Date diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts index 65c1014a..ca90d7c4 100644 --- a/src/api/system/loginLog/index.ts +++ b/src/api/system/loginLog/index.ts @@ -25,6 +25,7 @@ export interface LoginLogReqVO extends PageParam { export const getLoginLogPageApi = (params: LoginLogReqVO) => { return request.get({ url: '/system/login-log/page', params }) } + // 导出登录日志 export const exportLoginLogApi = (params: LoginLogReqVO) => { return request.download({ url: '/system/login-log/export', params }) diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template/index.ts index bb583a49..cf45b891 100644 --- a/src/api/system/notify/template/index.ts +++ b/src/api/system/notify/template/index.ts @@ -1,8 +1,9 @@ import request from '@/config/axios' export interface NotifyTemplateVO { - id: number + id?: number name: string + nickname: string code: string content: string type?: number @@ -19,7 +20,7 @@ export interface NotifyTemplatePageReqVO extends PageParam { } export interface NotifySendReqVO { - userId: number + userId: number | null templateCode: string templateParams: Map } diff --git a/src/api/system/oauth2/client.ts b/src/api/system/oauth2/client.ts index 4c06386d..d24b54c0 100644 --- a/src/api/system/oauth2/client.ts +++ b/src/api/system/oauth2/client.ts @@ -30,17 +30,17 @@ export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => { return request.get({ url: '/system/oauth2-client/page', params }) } -// 查询 OAuth2详情 +// 查询 OAuth2 客户端的详情 export const getOAuth2ClientApi = (id: number) => { return request.get({ url: '/system/oauth2-client/get?id=' + id }) } -// 新增 OAuth2 +// 新增 OAuth2 客户端 export const createOAuth2ClientApi = (data: OAuth2ClientVO) => { return request.post({ url: '/system/oauth2-client/create', data }) } -// 修改 OAuth2 +// 修改 OAuth2 客户端 export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => { return request.put({ url: '/system/oauth2-client/update', data }) } diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 288da0d8..74b0ddf8 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -7,6 +7,8 @@ export interface RoleVO { sort: number status: number type: number + dataScope: number + dataScopeDeptIds: number[] createTime: Date } @@ -56,3 +58,11 @@ export const updateRoleStatusApi = async (data: UpdateStatusReqVO) => { export const deleteRoleApi = async (id: number) => { return await request.delete({ url: '/system/role/delete?id=' + id }) } + +// 导出角色 +export const exportRole = (params) => { + return request.download({ + url: '/system/role/export-excel', + params + }) +} diff --git a/src/api/system/sensitiveWord/index.ts b/src/api/system/sensitiveWord/index.ts index ffda89c0..ca240be7 100644 --- a/src/api/system/sensitiveWord/index.ts +++ b/src/api/system/sensitiveWord/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import qs from 'qs' export interface SensitiveWordVO { id: number @@ -16,11 +17,9 @@ export interface SensitiveWordPageReqVO extends PageParam { createTime?: Date[] } -export interface SensitiveWordExportReqVO { - name?: string - tag?: string - status?: number - createTime?: Date[] +export interface SensitiveWordTestReqVO { + text: string + tag: string[] } // 查询敏感词列表 @@ -49,7 +48,7 @@ export const deleteSensitiveWordApi = (id: number) => { } // 导出敏感词 -export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { +export const exportSensitiveWordApi = (params: SensitiveWordPageReqVO) => { return request.download({ url: '/system/sensitive-word/export-excel', params }) } @@ -59,6 +58,8 @@ export const getSensitiveWordTagsApi = () => { } // 获得文本所包含的不合法的敏感词数组 -export const validateTextApi = (id: number) => { - return request.get({ url: '/system/sensitive-word/validate-text?' + id }) +export const validateTextApi = (query: SensitiveWordTestReqVO) => { + return request.get({ + url: '/system/sensitive-word/validate-text?' + qs.stringify(query, { arrayFormat: 'repeat' }) + }) } diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 8671a847..b1ee1823 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -91,10 +91,10 @@ export const updateUserStatusApi = (id: number, status: number) => { } // 获取用户精简信息列表 -export const getListSimpleUsersApi = () => { +export const getListSimpleUsersApi = (): Promise => { return request.get({ url: '/system/user/simple-list' }) } -export const getSimpleUserList = () => { +export const getSimpleUserList = (): Promise => { return request.get({ url: '/system/user/simple-list' }) } diff --git a/src/components/Verifition/src/Verify/VerifySlide.vue b/src/components/Verifition/src/Verify/VerifySlide.vue index 55e2cb6b..6a99078e 100644 --- a/src/components/Verifition/src/Verify/VerifySlide.vue +++ b/src/components/Verifition/src/Verify/VerifySlide.vue @@ -303,7 +303,7 @@ const end = () => { }, 1500) } passFlag.value = true - tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s + tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s ${t('captcha.success')}` var captchaVerification = secretKey.value ? aesEncrypt( diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue index 7fb00e60..3fe21944 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -196,8 +196,11 @@ max-height="600px" > -
-
+
+ + + {{ previewResult }} +
@@ -233,6 +236,14 @@ import flowableModdleExtension from './plugins/extension-moddle/flowable' // import xml2js from 'xml-js' // import xml2js from 'fast-xml-parser' import { XmlNode, XmlNodeType, parseXmlString } from 'steady-xml' +// 代码高亮插件 +// import hljs from 'highlight.js/lib/highlight' +// import 'highlight.js/styles/github-gist.css' +// hljs.registerLanguage('xml', 'highlight.js/lib/languages/xml') +// hljs.registerLanguage('json', 'highlight.js/lib/languages/json') +// const eventName = reactive({ +// name: '' +// }) defineOptions({ name: 'MyProcessDesigner' }) @@ -360,9 +371,9 @@ const additionalModules = computed(() => { return Modules }) const moddleExtensions = computed(() => { - // console.log(props.onlyCustomizeModdle, 'props.onlyCustomizeModdle') - // console.log(props.moddleExtension, 'props.moddleExtension') - // console.log(props.prefix, 'props.prefix') + console.log(props.onlyCustomizeModdle, 'props.onlyCustomizeModdle') + console.log(props.moddleExtension, 'props.moddleExtension') + console.log(props.prefix, 'props.prefix') const Extensions: any = {} // 仅使用用户自定义模块 if (props.onlyCustomizeModdle) { @@ -425,22 +436,22 @@ const initBpmnModeler = () => { // bpmnModeler.createDiagram() - // console.log(bpmnModeler, 'bpmnModeler111111') + console.log(bpmnModeler, 'bpmnModeler111111') emit('init-finished', bpmnModeler) initModelListeners() } const initModelListeners = () => { const EventBus = bpmnModeler.get('eventBus') - // console.log(EventBus, 'EventBus') + console.log(EventBus, 'EventBus') // 注册需要的监听事件, 将. 替换为 - , 避免解析异常 props.events.forEach((event: any) => { EventBus.on(event, function (eventObj) { - // let eventName = event.replace(/\./g, '-') + let eventName = event.replace(/\./g, '-') // eventName.name = eventName let element = eventObj ? eventObj.element : null - // console.log(eventName, 'eventName') - // console.log(element, 'element') + console.log(eventName, 'eventName') + console.log(element, 'element') emit('element-click', element, eventObj) // emit(eventName, element, eventObj) }) @@ -467,7 +478,7 @@ const initModelListeners = () => { } /* 创建新的流程图 */ const createNewDiagram = async (xml) => { - // console.log(xml, 'xml') + console.log(xml, 'xml') // 将字符串转换成图显示出来 let newId = props.processId || `Process_${new Date().getTime()}` let newName = props.processName || `业务流程_${new Date().getTime()}` @@ -476,7 +487,7 @@ const createNewDiagram = async (xml) => { // console.log(xmlString, 'xmlString') // console.log(this.bpmnModeler.importXML); let { warnings } = await bpmnModeler.importXML(xmlString) - // console.log(warnings, 'warnings') + console.log(warnings, 'warnings') if (warnings && warnings.length) { warnings.forEach((warn) => console.warn(warn)) } @@ -556,7 +567,7 @@ const downloadProcessAsSvg = () => { } const processSimulation = () => { simulationStatus.value = !simulationStatus.value - // console.log(bpmnModeler.get('toggleMode', 'strict'), "bpmnModeler.get('toggleMode')") + console.log(bpmnModeler.get('toggleMode', 'strict'), "bpmnModeler.get('toggleMode')") props.simulation && bpmnModeler.get('toggleMode', 'strict').toggleMode() } const processRedo = () => { @@ -619,7 +630,7 @@ const elementsAlign = (align) => { } /*----------------------------- 方法结束 ---------------------------------*/ const previewProcessXML = () => { - // console.log(bpmnModeler.saveXML, 'bpmnModeler') + console.log(bpmnModeler.saveXML, 'bpmnModeler') bpmnModeler.saveXML({ format: true }).then(({ xml }) => { // console.log(xml, 'xml111111') previewResult.value = xml @@ -655,10 +666,10 @@ const previewProcessJson = () => { } /* ------------------------------------------------ 芋道源码 methods ------------------------------------------------------ */ const processSave = async () => { - // console.log(bpmnModeler, 'bpmnModelerbpmnModelerbpmnModelerbpmnModeler') + console.log(bpmnModeler, 'bpmnModelerbpmnModelerbpmnModelerbpmnModeler') const { err, xml } = await bpmnModeler.saveXML() - // console.log(err, 'errerrerrerrerr') - // console.log(xml, 'xmlxmlxmlxmlxml') + console.log(err, 'errerrerrerrerr') + console.log(xml, 'xmlxmlxmlxmlxml') // 读取异常时抛出异常 if (err) { // this.$modal.msgError('保存模型失败,请重试!') @@ -668,38 +679,20 @@ const processSave = async () => { // 触发 save 事件 emit('save', xml) } +/** 高亮显示 */ +// const highlightedCode = (previewType, previewResult) => { +// console.log(previewType, 'previewType, previewResult') +// console.log(previewResult, 'previewType, previewResult') +// console.log(hljs.highlight, 'hljs.highlight') +// const result = hljs.highlight(previewType, previewResult.value || '', true) +// return result.value || ' ' +// } onBeforeMount(() => { - // console.log(props, 'propspropspropsprops') + console.log(props, 'propspropspropsprops') }) - -/** - * 代码高亮 - */ -import hljs from 'highlight.js' // 导入代码高亮文件 -import 'highlight.js/styles/github.css' // 导入代码高亮样式 -import java from 'highlight.js/lib/languages/java' -import xml from 'highlight.js/lib/languages/java' -import javascript from 'highlight.js/lib/languages/javascript' -import sql from 'highlight.js/lib/languages/sql' -import typescript from 'highlight.js/lib/languages/typescript' -const highlightedCode = (item) => { - const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1) - const result = hljs.highlight(language, item.code || '', true) - return result.value || ' ' -} - -/** 初始化 **/ -onMounted(async () => { +onMounted(() => { initBpmnModeler() createNewDiagram(props.value) - // 注册代码高亮的各种语言 - hljs.registerLanguage('java', java) - hljs.registerLanguage('xml', xml) - hljs.registerLanguage('html', xml) - hljs.registerLanguage('vue', xml) - hljs.registerLanguage('javascript', javascript) - hljs.registerLanguage('sql', sql) - hljs.registerLanguage('typescript', typescript) }) onBeforeUnmount(() => { // this.$once('hook:beforeDestroy', () => { diff --git a/src/layout/components/Footer/src/Footer.vue b/src/layout/components/Footer/src/Footer.vue index a83de88a..3eede386 100644 --- a/src/layout/components/Footer/src/Footer.vue +++ b/src/layout/components/Footer/src/Footer.vue @@ -1,4 +1,4 @@ - diff --git a/src/views/infra/server/index.vue b/src/views/infra/server/index.vue index a43f5b2f..ddcce7b4 100644 --- a/src/views/infra/server/index.vue +++ b/src/views/infra/server/index.vue @@ -1,4 +1,6 @@