diff --git a/.env.stage b/.env.stage new file mode 100644 index 00000000..d7157fbb --- /dev/null +++ b/.env.stage @@ -0,0 +1,31 @@ +# 生产环境 +NODE_ENV=production + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn' + +# 上传路径 +VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/' + +# 输出路径 +VITE_OUT_DIR=dist-stage diff --git a/.env.test b/.env.test index 85e2cf54..0793af25 100644 --- a/.env.test +++ b/.env.test @@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=false VITE_SOURCEMAP=true # 打包路径 -VITE_BASE_PATH=/dist-test/ +VITE_BASE_PATH=/ # 输出路径 VITE_OUT_DIR=dist-test diff --git a/package.json b/package.json index 4dbca411..dce5244d 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "ts:check": "vue-tsc --noEmit", "build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", "build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", + "build:stage": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode stage", "build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", "build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", "build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front", diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template/index.ts index f2bf5d27..50196e85 100644 --- a/src/api/system/notify/template/index.ts +++ b/src/api/system/notify/template/index.ts @@ -1,24 +1,17 @@ import request from '@/config/axios' export interface NotifyTemplateVO { - id: number | null + id?: number name: string nickname: string code: string content: string - type: number | null + type: number params: string - status: number | null + status: number remark: string } -export interface NotifyTemplatePageReqVO extends PageParam { - name?: string - code?: string - status?: number - createTime?: Date[] -} - export interface NotifySendReqVO { userId: number | null templateCode: string @@ -26,22 +19,22 @@ export interface NotifySendReqVO { } // 查询站内信模板列表 -export const getNotifyTemplatePageApi = async (params: NotifyTemplatePageReqVO) => { +export const getNotifyTemplatePage = async (params: PageParam) => { return await request.get({ url: '/system/notify-template/page', params }) } // 查询站内信模板详情 -export const getNotifyTemplateApi = async (id: number) => { +export const getNotifyTemplate = async (id: number) => { return await request.get({ url: '/system/notify-template/get?id=' + id }) } // 新增站内信模板 -export const createNotifyTemplateApi = async (data: NotifyTemplateVO) => { +export const createNotifyTemplate = async (data: NotifyTemplateVO) => { return await request.post({ url: '/system/notify-template/create', data }) } // 修改站内信模板 -export const updateNotifyTemplateApi = async (data: NotifyTemplateVO) => { +export const updateNotifyTemplate = async (data: NotifyTemplateVO) => { return await request.put({ url: '/system/notify-template/update', data }) } @@ -51,6 +44,6 @@ export const deleteNotifyTemplateApi = async (id: number) => { } // 发送站内信 -export const sendNotifyApi = (data: NotifySendReqVO) => { +export const sendNotify = (data: NotifySendReqVO) => { return request.post({ url: '/system/notify-template/send-notify', data }) } diff --git a/src/components/bpmnProcessDesigner/package/index.ts b/src/components/bpmnProcessDesigner/package/index.ts index 23c77346..ce44a3c5 100644 --- a/src/components/bpmnProcessDesigner/package/index.ts +++ b/src/components/bpmnProcessDesigner/package/index.ts @@ -1,37 +1,11 @@ -import { App } from 'vue' import MyProcessDesigner from './designer' import MyProcessPenal from './penal' import MyProcessViewer from './designer/index2' -const components = [MyProcessDesigner, MyProcessPenal, MyProcessViewer] +import './theme/index.scss' +import 'bpmn-js/dist/assets/diagram-js.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' -// const install = function (Vue) { -// components.forEach(component => { -// Vue.component(component.name, component) -// }) -// } - -// if (typeof window !== "undefined" && window.Vue) { -// install(window.Vue) -// } -// components.forEach(component => { -// Vue.component(component.name, component) -// }) -const componentss = { - install: (Vue: App): void => { - components.forEach((component) => { - Vue.component(component.name, component) - }) - } -} -// let version = "0.0.1" -export const MyPD = (app) => { - // export default { - // app.use(version) - // app.use(install) - // app.use(MyProcessDesigner) - // app.use(MyProcessPenal) - // app.use(MyProcessViewer) - // app.use(components) - app.use(componentss) -} +export { MyProcessDesigner, MyProcessPenal, MyProcessViewer } diff --git a/src/components/index.ts b/src/components/index.ts index 35df3da6..4d030c37 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,21 +1,6 @@ import type { App } from 'vue' import { Icon } from './Icon' -import { Form } from '@/components/Form' -import { Table } from '@/components/Table' -import { Search } from '@/components/Search' -import { XButton, XTextButton } from '@/components/XButton' -import { DictTag } from '@/components/DictTag' -import { ContentWrap } from '@/components/ContentWrap' -import { Descriptions } from '@/components/Descriptions' export const setupGlobCom = (app: App): void => { app.component('Icon', Icon) - app.component('Form', Form) - app.component('Table', Table) - app.component('Search', Search) - app.component('XButton', XButton) - app.component('XTextButton', XTextButton) - app.component('DictTag', DictTag) - app.component('ContentWrap', ContentWrap) - app.component('Descriptions', Descriptions) } diff --git a/src/main.ts b/src/main.ts index 0fc15c2c..b37b8243 100644 --- a/src/main.ts +++ b/src/main.ts @@ -37,16 +37,6 @@ import App from './App.vue' import './permission' -import { MyPD } from '@/components/bpmnProcessDesigner/package/index.js' -import '@/components/bpmnProcessDesigner/package/theme/index.scss' -import 'bpmn-js/dist/assets/diagram-js.css' -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css' -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css' -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' - -import hljs from 'highlight.js' //导入代码高亮文件 -import 'highlight.js/styles/github.css' //导入代码高亮样式 新版 - import '@/plugins/tongji' // 百度统计 import Logger from '@/utils/Logger' @@ -55,18 +45,8 @@ import Logger from '@/utils/Logger' const setupAll = async () => { const app = createApp(App) - //自定义一个代码高亮指令 - app.directive('highlight', function (el) { - const blocks = el.querySelectorAll('code') - blocks.forEach((block: any) => { - hljs.highlightElement(block) - }) - }) - await setupI18n(app) - MyPD(app) - setupStore(app) setupGlobCom(app) diff --git a/src/plugins/formCreate/index.ts b/src/plugins/formCreate/index.ts index 0d72048e..a6cb8213 100644 --- a/src/plugins/formCreate/index.ts +++ b/src/plugins/formCreate/index.ts @@ -17,7 +17,6 @@ import { import formCreate from '@form-create/element-ui' import install from '@form-create/element-ui/auto-import' -import FcDesigner from '@form-create/designer' const components = [ ElAside, @@ -34,14 +33,11 @@ const components = [ ElTabPane ] +// 参考 http://www.form-create.com/v3/element-ui/auto-import.html 文档 export const setupFormCreate = (app: App) => { components.forEach((component) => { app.component(component.name, component) }) - formCreate.use(install) - app.use(formCreate) - - app.use(FcDesigner) } diff --git a/src/views/bpm/definition/index.vue b/src/views/bpm/definition/index.vue index ae260b45..c18e9a92 100644 --- a/src/views/bpm/definition/index.vue +++ b/src/views/bpm/definition/index.vue @@ -84,7 +84,7 @@ - import { DICT_TYPE } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' +import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package' import * as DefinitionApi from '@/api/bpm/definition' import { setConfAndFields2 } from '@/utils/formCreate' const { push } = useRouter() // 路由 diff --git a/src/views/bpm/form/editor/index.vue b/src/views/bpm/form/editor/index.vue index 14a2c50f..c56a7747 100644 --- a/src/views/bpm/form/editor/index.vue +++ b/src/views/bpm/form/editor/index.vue @@ -1,14 +1,14 @@