mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 10:36:31 +08:00
commit:前端webpack版本
This commit is contained in:
4
OrangeFormsOpen-VUE3/.browserslistrc
Normal file
4
OrangeFormsOpen-VUE3/.browserslistrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not dead
|
||||||
|
not ie 11
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
VITE_SERVER_HOST='http://localhost:8082/'
|
VUE_APP_SERVER_HOST='http://localhost:8082/'
|
||||||
VITE_PROJECT_NAME='橙单演示工程'
|
VUE_APP_PROJECT_NAME='橙单演示工程'
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
VITE_SERVER_HOST='http://localhost:8082/'
|
VUE_APP_SERVER_HOST='http://localhost:8082/'
|
||||||
VITE_PROJECT_NAME='橙单项目'
|
VUE_APP_PROJECT_NAME='橙单项目'
|
||||||
|
|||||||
83
OrangeFormsOpen-VUE3/auto-imports.d.ts
vendored
Normal file
83
OrangeFormsOpen-VUE3/auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
// @ts-nocheck
|
||||||
|
// noinspection JSUnusedGlobalSymbols
|
||||||
|
// Generated by unplugin-auto-import
|
||||||
|
export {}
|
||||||
|
declare global {
|
||||||
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
|
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||||
|
const computed: typeof import('vue')['computed']
|
||||||
|
const createApp: typeof import('vue')['createApp']
|
||||||
|
const createPinia: typeof import('pinia')['createPinia']
|
||||||
|
const customRef: typeof import('vue')['customRef']
|
||||||
|
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||||
|
const defineComponent: typeof import('vue')['defineComponent']
|
||||||
|
const defineStore: typeof import('pinia')['defineStore']
|
||||||
|
const effectScope: typeof import('vue')['effectScope']
|
||||||
|
const getActivePinia: typeof import('pinia')['getActivePinia']
|
||||||
|
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||||
|
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||||
|
const h: typeof import('vue')['h']
|
||||||
|
const inject: typeof import('vue')['inject']
|
||||||
|
const isProxy: typeof import('vue')['isProxy']
|
||||||
|
const isReactive: typeof import('vue')['isReactive']
|
||||||
|
const isReadonly: typeof import('vue')['isReadonly']
|
||||||
|
const isRef: typeof import('vue')['isRef']
|
||||||
|
const mapActions: typeof import('pinia')['mapActions']
|
||||||
|
const mapGetters: typeof import('pinia')['mapGetters']
|
||||||
|
const mapState: typeof import('pinia')['mapState']
|
||||||
|
const mapStores: typeof import('pinia')['mapStores']
|
||||||
|
const mapWritableState: typeof import('pinia')['mapWritableState']
|
||||||
|
const markRaw: typeof import('vue')['markRaw']
|
||||||
|
const nextTick: typeof import('vue')['nextTick']
|
||||||
|
const onActivated: typeof import('vue')['onActivated']
|
||||||
|
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||||
|
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||||
|
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||||
|
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||||
|
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||||
|
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||||
|
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||||
|
const onMounted: typeof import('vue')['onMounted']
|
||||||
|
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||||
|
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||||
|
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||||
|
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||||
|
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||||
|
const onUpdated: typeof import('vue')['onUpdated']
|
||||||
|
const provide: typeof import('vue')['provide']
|
||||||
|
const reactive: typeof import('vue')['reactive']
|
||||||
|
const readonly: typeof import('vue')['readonly']
|
||||||
|
const ref: typeof import('vue')['ref']
|
||||||
|
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||||
|
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||||
|
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||||
|
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||||
|
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||||
|
const shallowRef: typeof import('vue')['shallowRef']
|
||||||
|
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||||
|
const toRaw: typeof import('vue')['toRaw']
|
||||||
|
const toRef: typeof import('vue')['toRef']
|
||||||
|
const toRefs: typeof import('vue')['toRefs']
|
||||||
|
const toValue: typeof import('vue')['toValue']
|
||||||
|
const triggerRef: typeof import('vue')['triggerRef']
|
||||||
|
const unref: typeof import('vue')['unref']
|
||||||
|
const useAttrs: typeof import('vue')['useAttrs']
|
||||||
|
const useCssModule: typeof import('vue')['useCssModule']
|
||||||
|
const useCssVars: typeof import('vue')['useCssVars']
|
||||||
|
const useLink: typeof import('vue-router')['useLink']
|
||||||
|
const useRoute: typeof import('vue-router')['useRoute']
|
||||||
|
const useRouter: typeof import('vue-router')['useRouter']
|
||||||
|
const useSlots: typeof import('vue')['useSlots']
|
||||||
|
const watch: typeof import('vue')['watch']
|
||||||
|
const watchEffect: typeof import('vue')['watchEffect']
|
||||||
|
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||||
|
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||||
|
}
|
||||||
|
// for type re-export
|
||||||
|
declare global {
|
||||||
|
// @ts-ignore
|
||||||
|
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||||
|
import('vue')
|
||||||
|
}
|
||||||
3
OrangeFormsOpen-VUE3/babel.config.js
Normal file
3
OrangeFormsOpen-VUE3/babel.config.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: ['@vue/cli-plugin-babel/preset'],
|
||||||
|
};
|
||||||
66
OrangeFormsOpen-VUE3/components.d.ts
vendored
66
OrangeFormsOpen-VUE3/components.d.ts
vendored
@@ -8,17 +8,11 @@ export {}
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AdvanceQuery: typeof import('./src/components/AdvanceQuery/index.vue')['default']
|
AdvanceQuery: typeof import('./src/components/AdvanceQuery/index.vue')['default']
|
||||||
BarChart: typeof import('./src/components/Charts/barChart.vue')['default']
|
BtnsRightAddBtn: typeof import('./src/components/Btns/RightAddBtn.vue')['default']
|
||||||
Base: typeof import('./src/components/Charts/base.vue')['default']
|
|
||||||
BreadCrumb: typeof import('./src/components/layout/components/BreadCrumb.vue')['default']
|
|
||||||
CarouselChart: typeof import('./src/components/Charts/carouselChart.vue')['default']
|
|
||||||
CommonList: typeof import('./src/components/Charts/commonList.vue')['default']
|
|
||||||
DataCard: typeof import('./src/components/Charts/dataCard.vue')['default']
|
|
||||||
DataProgressCard: typeof import('./src/components/Charts/dataProgressCard.vue')['default']
|
|
||||||
DataViewTable: typeof import('./src/components/Charts/dataViewTable.vue')['default']
|
|
||||||
DateRange: typeof import('./src/components/DateRange/index.vue')['default']
|
DateRange: typeof import('./src/components/DateRange/index.vue')['default']
|
||||||
DeptSelect: typeof import('./src/components/DeptSelect/index.vue')['default']
|
DeptSelect: typeof import('./src/components/DeptSelect/index.vue')['default']
|
||||||
DeptSelectDlg: typeof import('./src/components/DeptSelect/DeptSelectDlg.vue')['default']
|
DeptSelectDeptSelectDlg: typeof import('./src/components/DeptSelect/DeptSelectDlg.vue')['default']
|
||||||
|
DialogLayout: typeof import('./src/components/Dialog/layout.vue')['default']
|
||||||
ElAlert: typeof import('element-plus/es')['ElAlert']
|
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||||
ElAside: typeof import('element-plus/es')['ElAside']
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
@@ -27,8 +21,6 @@ declare module 'vue' {
|
|||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
|
||||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
|
||||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
@@ -44,7 +36,6 @@ declare module 'vue' {
|
|||||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
|
||||||
ElFooter: typeof import('element-plus/es')['ElFooter']
|
ElFooter: typeof import('element-plus/es')['ElFooter']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
@@ -53,8 +44,6 @@ declare module 'vue' {
|
|||||||
ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
|
ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
|
||||||
ElIconArrowLeft: typeof import('@element-plus/icons-vue')['ArrowLeft']
|
ElIconArrowLeft: typeof import('@element-plus/icons-vue')['ArrowLeft']
|
||||||
ElIconArrowRight: typeof import('@element-plus/icons-vue')['ArrowRight']
|
ElIconArrowRight: typeof import('@element-plus/icons-vue')['ArrowRight']
|
||||||
ElIconCaretBottom: typeof import('@element-plus/icons-vue')['CaretBottom']
|
|
||||||
ElIconClose: typeof import('@element-plus/icons-vue')['Close']
|
|
||||||
ElImage: typeof import('element-plus/es')['ElImage']
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
@@ -65,7 +54,6 @@ declare module 'vue' {
|
|||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
@@ -84,58 +72,30 @@ declare module 'vue' {
|
|||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
FilterBox: typeof import('./src/components/FilterBox/index.vue')['default']
|
FilterBox: typeof import('./src/components/FilterBox/index.vue')['default']
|
||||||
FunnelChart: typeof import('./src/components/Charts/funnelChart.vue')['default']
|
|
||||||
FunnelChartV3: typeof import('./src/components/Charts/funnelChartV3.vue')['default']
|
|
||||||
GaugeChart: typeof import('./src/components/Charts/gaugeChart.vue')['default']
|
|
||||||
Icons: typeof import('./src/components/icons/index.vue')['default']
|
Icons: typeof import('./src/components/icons/index.vue')['default']
|
||||||
IconSelect: typeof import('./src/components/IconSelect/index.vue')['default']
|
IconSelect: typeof import('./src/components/IconSelect/index.vue')['default']
|
||||||
InputNumberRange: typeof import('./src/components/InputNumberRange/index.vue')['default']
|
InputNumberRange: typeof import('./src/components/InputNumberRange/index.vue')['default']
|
||||||
Layout: typeof import('./src/components/Dialog/layout.vue')['default']
|
Layout: typeof import('./src/components/layout/index.vue')['default']
|
||||||
LineChart: typeof import('./src/components/Charts/lineChart.vue')['default']
|
LayoutComponentsBreadCrumb: typeof import('./src/components/layout/components/BreadCrumb.vue')['default']
|
||||||
MultiColumn: typeof import('./src/components/layout/components/multi-column.vue')['default']
|
LayoutComponentsMultiColumn: typeof import('./src/components/layout/components/multi-column.vue')['default']
|
||||||
MultiColumnMenu: typeof import('./src/components/layout/components/multi-column-menu.vue')['default']
|
LayoutComponentsMultiColumnMenu: typeof import('./src/components/layout/components/multi-column-menu.vue')['default']
|
||||||
|
LayoutComponentsSidebar: typeof import('./src/components/layout/components/Sidebar.vue')['default']
|
||||||
|
LayoutComponentsSubMenu: typeof import('./src/components/layout/components/SubMenu.vue')['default']
|
||||||
|
LayoutComponentsTagItem: typeof import('./src/components/layout/components/TagItem.vue')['default']
|
||||||
|
LayoutComponentsTagPanel: typeof import('./src/components/layout/components/TagPanel.vue')['default']
|
||||||
MultiItemBox: typeof import('./src/components/MultiItemBox/index.vue')['default']
|
MultiItemBox: typeof import('./src/components/MultiItemBox/index.vue')['default']
|
||||||
MultiItemList: typeof import('./src/components/MultiItemList/index.vue')['default']
|
MultiItemList: typeof import('./src/components/MultiItemList/index.vue')['default']
|
||||||
PageCloseButton: typeof import('./src/components/PageCloseButton/index.vue')['default']
|
PageCloseButton: typeof import('./src/components/PageCloseButton/index.vue')['default']
|
||||||
PieChart: typeof import('./src/components/Charts/pieChart.vue')['default']
|
|
||||||
PivotTable: typeof import('./src/components/Charts/pivotTable.vue')['default']
|
|
||||||
PivotTableColumn: typeof import('./src/components/Charts/pivotTableColumn.vue')['default']
|
|
||||||
Progress: typeof import('./src/components/Progress/index.vue')['default']
|
Progress: typeof import('./src/components/Progress/index.vue')['default']
|
||||||
ProgressBar: typeof import('./src/components/Charts/progressBar.vue')['default']
|
|
||||||
ProgressCircle: typeof import('./src/components/Charts/progressCircle.vue')['default']
|
|
||||||
RadarChart: typeof import('./src/components/Charts/radarChart.vue')['default']
|
|
||||||
RadarChartV3: typeof import('./src/components/Charts/radarChartV3.vue')['default']
|
|
||||||
RichEditor: typeof import('./src/components/RichEditor/index.vue')['default']
|
RichEditor: typeof import('./src/components/RichEditor/index.vue')['default']
|
||||||
RichText: typeof import('./src/components/Charts/richText.vue')['default']
|
|
||||||
RightAddBtn: typeof import('./src/components/Btns/RightAddBtn.vue')['default']
|
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
ScatterChart: typeof import('./src/components/Charts/scatterChart.vue')['default']
|
|
||||||
ScriptEditor: typeof import('./src/components/ScriptEditor/index.vue')['default']
|
|
||||||
Sidebar: typeof import('./src/components/layout/components/Sidebar.vue')['default']
|
|
||||||
StepBar: typeof import('./src/components/StepBar/index.vue')['default']
|
StepBar: typeof import('./src/components/StepBar/index.vue')['default']
|
||||||
StepItem: typeof import('./src/components/StepBar/stepItem.vue')['default']
|
StepBarStepItem: typeof import('./src/components/StepBar/stepItem.vue')['default']
|
||||||
SubMenu: typeof import('./src/components/layout/components/SubMenu.vue')['default']
|
|
||||||
TableBox: typeof import('./src/components/TableBox/index.vue')['default']
|
TableBox: typeof import('./src/components/TableBox/index.vue')['default']
|
||||||
TableProgressColumn: typeof import('./src/components/TableProgressColumn/index.vue')['default']
|
TableProgressColumn: typeof import('./src/components/TableProgressColumn/index.vue')['default']
|
||||||
TagItem: typeof import('./src/components/layout/components/TagItem.vue')['default']
|
|
||||||
TagPanel: typeof import('./src/components/layout/components/TagPanel.vue')['default']
|
|
||||||
ThirdParty: typeof import('./src/components/thirdParty/index.vue')['default']
|
ThirdParty: typeof import('./src/components/thirdParty/index.vue')['default']
|
||||||
UserSelect: typeof import('./src/components/UserSelect/index.vue')['default']
|
UserSelect: typeof import('./src/components/UserSelect/index.vue')['default']
|
||||||
UserSelectDlg: typeof import('./src/components/UserSelect/UserSelectDlg.vue')['default']
|
UserSelectUserSelectDlg: typeof import('./src/components/UserSelect/UserSelectDlg.vue')['default']
|
||||||
VanButton: typeof import('vant/es')['Button']
|
|
||||||
VanCellGroup: typeof import('vant/es')['CellGroup']
|
|
||||||
VanCheckbox: typeof import('vant/es')['Checkbox']
|
|
||||||
VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
|
|
||||||
VanForm: typeof import('vant/es')['Form']
|
|
||||||
VanRadio: typeof import('vant/es')['Radio']
|
|
||||||
VanRadioGroup: typeof import('vant/es')['RadioGroup']
|
|
||||||
VanRate: typeof import('vant/es')['Rate']
|
|
||||||
VanSearch: typeof import('vant/es')['Search']
|
|
||||||
VanSidebar: typeof import('vant/es')['Sidebar']
|
|
||||||
VanSidebarItem: typeof import('vant/es')['SidebarItem']
|
|
||||||
VanStepper: typeof import('vant/es')['Stepper']
|
|
||||||
VanSwitch: typeof import('vant/es')['Switch']
|
|
||||||
VanUploader: typeof import('vant/es')['Uploader']
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
27636
OrangeFormsOpen-VUE3/package-lock.json
generated
27636
OrangeFormsOpen-VUE3/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -2,11 +2,9 @@
|
|||||||
"name": "vite",
|
"name": "vite",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vue-cli-service serve",
|
||||||
"build": "vue-tsc && vite build",
|
"build": "vue-cli-service build",
|
||||||
"preview": "vite preview",
|
|
||||||
"lint": "eslint --fix \"src/**/*.{ts,vue}\" && prettier --write \"src/**/*.{ts,vue}\""
|
"lint": "eslint --fix \"src/**/*.{ts,vue}\" && prettier --write \"src/**/*.{ts,vue}\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -17,25 +15,27 @@
|
|||||||
"ace-builds": "^1.32.2",
|
"ace-builds": "^1.32.2",
|
||||||
"axios": "^1.5.1",
|
"axios": "^1.5.1",
|
||||||
"bpmn-js-token-simulation": "^0.10.0",
|
"bpmn-js-token-simulation": "^0.10.0",
|
||||||
|
"clipboard": "^2.0.11",
|
||||||
|
"core-js": "^3.8.3",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"echarts": "^5.5.0",
|
"echarts": "^5.5.0",
|
||||||
"ejs": "^3.1.9",
|
"ejs": "^3.1.9",
|
||||||
|
"element-plus": "^2.7.3",
|
||||||
"highlight.js": "^11.9.0",
|
"highlight.js": "^11.9.0",
|
||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
"json-bigint": "^1.0.0",
|
"json-bigint": "^1.0.0",
|
||||||
"clipboard": "^2.0.11",
|
|
||||||
"pinia": "^2.1.6",
|
"pinia": "^2.1.6",
|
||||||
"pinia-plugin-persist": "^1.0.0",
|
"pinia-plugin-persist": "^1.0.0",
|
||||||
"vant": "^4.7.3",
|
"vant": "^4.7.3",
|
||||||
"vue": "^3.3.8",
|
"vue": "^3.3.8",
|
||||||
"element-plus": "^2.7.3",
|
|
||||||
"vue-draggable-plus": "^0.3.1",
|
"vue-draggable-plus": "^0.3.1",
|
||||||
"vue-json-viewer": "^3.0.4",
|
"vue-json-viewer": "^3.0.4",
|
||||||
"vue-router": "^4.2.5",
|
"vue-router": "^4.2.5",
|
||||||
"vxe-table": "^4.5.13",
|
"vxe-table": "^4.5.13",
|
||||||
"xe-utils": "^3.5.14",
|
"xe-utils": "^3.5.14",
|
||||||
"xml-js": "^1.6.11"
|
"xml-js": "^1.6.11",
|
||||||
|
"lodash": "^4.17.21"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ejs": "^3.1.5",
|
"@types/ejs": "^3.1.5",
|
||||||
@@ -44,7 +44,12 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
||||||
"@typescript-eslint/parser": "^5.46.1",
|
"@typescript-eslint/parser": "^5.46.1",
|
||||||
"@vant/auto-import-resolver": "^1.0.2",
|
"@vant/auto-import-resolver": "^1.0.2",
|
||||||
"@vitejs/plugin-vue": "^4.0.0",
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-router": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-typescript": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||||
|
"@vue/cli-service": "~5.0.0",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"bpmn-js": "^7.4.0",
|
"bpmn-js": "^7.4.0",
|
||||||
"bpmn-js-properties-panel": "^0.37.2",
|
"bpmn-js-properties-panel": "^0.37.2",
|
||||||
@@ -54,18 +59,17 @@
|
|||||||
"eslint-plugin-import": "^2.29.0",
|
"eslint-plugin-import": "^2.29.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-vue": "^9.8.0",
|
"eslint-plugin-vue": "^9.8.0",
|
||||||
|
"node-polyfill-webpack-plugin": "^4.0.0",
|
||||||
"postcss": "^8.4.20",
|
"postcss": "^8.4.20",
|
||||||
"postcss-html": "^1.5.0",
|
"postcss-html": "^1.5.0",
|
||||||
"postcss-preset-env": "^7.8.3",
|
"postcss-preset-env": "^7.8.3",
|
||||||
"postcss-scss": "^4.0.6",
|
"postcss-scss": "^4.0.6",
|
||||||
"prettier": "2.8.1",
|
"prettier": "2.8.1",
|
||||||
"sass": "^1.57.1",
|
"sass": "^1.32.7",
|
||||||
|
"sass-loader": "^12.0.0",
|
||||||
"typescript": "^4.9.3",
|
"typescript": "^4.9.3",
|
||||||
"unplugin-auto-import": "^0.16.7",
|
"unplugin-auto-import": "^0.16.7",
|
||||||
"unplugin-vue-components": "^0.25.2",
|
"unplugin-vue-components": "^0.25.2",
|
||||||
"vite": "^4.0.0",
|
"vue-eslint-parser": "^9.1.0"
|
||||||
"vite-plugin-eslint": "^1.8.1",
|
|
||||||
"vue-eslint-parser": "^9.1.0",
|
|
||||||
"vue-tsc": "^1.0.11"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ watch(
|
|||||||
() => route.name,
|
() => route.name,
|
||||||
() => {
|
() => {
|
||||||
//console.log('路由发生了变化', route.name, route.fullPath, route.path, route);
|
//console.log('路由发生了变化', route.name, route.fullPath, route.path, route);
|
||||||
document.title = import.meta.env.VITE_PROJECT_NAME;
|
document.title = process.env.VUE_APP_PROJECT_NAME;
|
||||||
if (route.meta && route.meta.title) {
|
if (route.meta && route.meta.title) {
|
||||||
document.title += ' - ' + route.meta.title;
|
document.title += ' - ' + route.meta.title;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,71 +61,71 @@ $--color-primary-light-9: color-mix(in srgb, $--color-white 90%, $--color-primar
|
|||||||
/**
|
/**
|
||||||
* 弹窗样式,封装的layer的弹窗
|
* 弹窗样式,封装的layer的弹窗
|
||||||
**/
|
**/
|
||||||
body .layer-dialog .layui-layer-title{
|
.layui-layer-page .layui-layer-title{
|
||||||
border:1px solid #01000000;
|
border:1px solid #01000000;
|
||||||
border-radius: 4px 4px 0 0;
|
border-radius: 4px 4px 0 0;
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .layer-dialog .slot-fragment {
|
.layui-layer-page .slot-fragment {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .layer-dialog .layui-layer-setwin {color: #fff}
|
.layui-layer-page .layui-layer-setwin {color: #fff}
|
||||||
|
|
||||||
body .layer-dialog {
|
.layui-layer-page {
|
||||||
border:1px solid #01000000;
|
border:1px solid #01000000;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .layer-dialog .layui-layer-content {
|
.layui-layer-page .layui-layer-content {
|
||||||
padding: $box-padding-size;
|
padding: $box-padding-size;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .layer-dialog.one_to_one_query .layui-layer-content {
|
.layui-layer-page.one_to_one_query .layui-layer-content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .layer-dialog.layui-layer-iframe .layui-layer-content {
|
.layui-layer-page.layui-layer-iframe .layui-layer-content {
|
||||||
padding: 0!important;
|
padding: 0!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 左树右表弹窗样式
|
* 左树右表弹窗样式
|
||||||
*/
|
*/
|
||||||
body .layer-advance-dialog {
|
.layer-advance-dialog {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
border:1px solid #01000000;
|
border:1px solid #01000000;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .layer-advance-dialog .layui-layer-title{
|
.layer-advance-dialog .layui-layer-title{
|
||||||
border:1px solid #01000000;
|
border:1px solid #01000000;
|
||||||
border-radius: 4px 4px 0 0;
|
border-radius: 4px 4px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .layer-advance-dialog .layui-layer-content {
|
.layer-advance-dialog .layui-layer-content {
|
||||||
padding: 5px 15px;
|
padding: 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全屏弹窗样式
|
* 全屏弹窗样式
|
||||||
*/
|
*/
|
||||||
body .fullscreen-dialog {
|
.fullscreen-dialog {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .fullscreen-dialog .layui-layer-title {
|
.fullscreen-dialog .layui-layer-title {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .fullscreen-dialog .layui-layer-setwin {
|
.fullscreen-dialog .layui-layer-setwin {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .fullscreen-dialog .layui-layer-content {
|
.fullscreen-dialog .layui-layer-content {
|
||||||
height: 100vh!important;
|
height: 100vh!important;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
@@ -735,7 +735,7 @@ body .fullscreen-dialog .layui-layer-content {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
.logo {;
|
.logo {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
|||||||
@@ -19,10 +19,7 @@ export const useDate = () => {
|
|||||||
statsType = allowStatsType.indexOf(statsType) === -1 ? 'day' : statsType;
|
statsType = allowStatsType.indexOf(statsType) === -1 ? 'day' : statsType;
|
||||||
if (statsType === 'datetime') format = 'YYYY-MM-DD HH:mm:ss';
|
if (statsType === 'datetime') format = 'YYYY-MM-DD HH:mm:ss';
|
||||||
|
|
||||||
//console.log('date', statsType, format, date);
|
|
||||||
|
|
||||||
const tempDate = date instanceof Date ? date : parseDate(date, format);
|
const tempDate = date instanceof Date ? date : parseDate(date, format);
|
||||||
//console.log('tempDate', tempDate);
|
|
||||||
if (!tempDate) return undefined;
|
if (!tempDate) return undefined;
|
||||||
switch (statsType) {
|
switch (statsType) {
|
||||||
case 'time':
|
case 'time':
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ export const useDownload = () => {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log('============= download', res);
|
|
||||||
const data = res instanceof Blob ? res : res.data;
|
const data = res instanceof Blob ? res : res.data;
|
||||||
if (data instanceof Blob) {
|
if (data instanceof Blob) {
|
||||||
const url = window.URL.createObjectURL(data);
|
const url = window.URL.createObjectURL(data);
|
||||||
@@ -41,7 +40,6 @@ export const useDownload = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
console.error('============= download', e);
|
|
||||||
if (e instanceof Blob) {
|
if (e instanceof Blob) {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.onload = function () {
|
reader.onload = function () {
|
||||||
|
|||||||
@@ -16,14 +16,11 @@ export const useDropdown = <T>(options: DropdownOptions<T>) => {
|
|||||||
|
|
||||||
const { loadData, isTree, idKey, parentIdKey } = finalOptions;
|
const { loadData, isTree, idKey, parentIdKey } = finalOptions;
|
||||||
|
|
||||||
//console.log('dropdown', loadData, isTree, idKey, parentIdKey);
|
|
||||||
|
|
||||||
const loadDropdownData = (): Promise<T[]> => {
|
const loadDropdownData = (): Promise<T[]> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (!loaded && !loading.value) {
|
if (!loaded && !loading.value) {
|
||||||
loadData()
|
loadData()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(`loadDropdownData 加载了${res.dataList.length}条数据`);
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
dropdownList.value = isTree
|
dropdownList.value = isTree
|
||||||
? treeDataTranslate(res.dataList, idKey, parentIdKey)
|
? treeDataTranslate(res.dataList, idKey, parentIdKey)
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ export const usePermissions = () => {
|
|||||||
const loginStorage = useLoginStore();
|
const loginStorage = useLoginStore();
|
||||||
|
|
||||||
const checkPermCodeExist = (permCode: string) => {
|
const checkPermCodeExist = (permCode: string) => {
|
||||||
//console.log(permCode);
|
|
||||||
if (getAppId() != null && getAppId() !== '') return true;
|
if (getAppId() != null && getAppId() !== '') return true;
|
||||||
|
|
||||||
if (loginStorage.userInfo == null) {
|
if (loginStorage.userInfo == null) {
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
|
|||||||
|
|
||||||
// 监听pageSize变化
|
// 监听pageSize变化
|
||||||
watch(pageSize, (newVal, oldVal) => {
|
watch(pageSize, (newVal, oldVal) => {
|
||||||
//console.log('pageSize change', newVal, oldVal);
|
|
||||||
if (newVal != oldVal) {
|
if (newVal != oldVal) {
|
||||||
loadData(1, newVal)
|
loadData(1, newVal)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -70,14 +69,8 @@ export const useTable = <T>(options: TableOptions<T>) => {
|
|||||||
*/
|
*/
|
||||||
const loadData = (pageNum: number, pageSize: number, reload = false): Promise<void> => {
|
const loadData = (pageNum: number, pageSize: number, reload = false): Promise<void> => {
|
||||||
if (paged && !reload && oldPage == pageNum && oldPageSize == pageSize) {
|
if (paged && !reload && oldPage == pageNum && oldPageSize == pageSize) {
|
||||||
console.log('数据已加载,无须重复执行');
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
if (paged) {
|
|
||||||
console.log(`开始加载数据, 第${pageNum}页,每页${pageSize}, 强制加载:${reload}`);
|
|
||||||
} else {
|
|
||||||
console.log(`开始加载数据, 无分页, 强制加载:${reload}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const params = {} as RequestParam;
|
const params = {} as RequestParam;
|
||||||
if (orderInfo.fieldName != null) params.orderParam = [orderInfo];
|
if (orderInfo.fieldName != null) params.orderParam = [orderInfo];
|
||||||
@@ -91,13 +84,11 @@ export const useTable = <T>(options: TableOptions<T>) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
loadTableData(params)
|
loadTableData(params)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
//console.log(res.dataList, res.totalCount);
|
|
||||||
// vxetable需要用到对象的hasOwnerProperty方法,因此需要重新构造对象
|
// vxetable需要用到对象的hasOwnerProperty方法,因此需要重新构造对象
|
||||||
dataList.value = res.dataList.map((item: T) => {
|
dataList.value = res.dataList.map((item: T) => {
|
||||||
return { ...item };
|
return { ...item };
|
||||||
});
|
});
|
||||||
totalCount.value = res.totalCount;
|
totalCount.value = res.totalCount;
|
||||||
console.log(`本次加载${res.dataList.length}条数据,共有${res.totalCount}条数据`);
|
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
@@ -105,7 +96,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
//console.log('加载数据完毕');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -125,7 +115,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
|
|||||||
* @param {String} order 正序还是倒序
|
* @param {String} order 正序还是倒序
|
||||||
*/
|
*/
|
||||||
const onSortChange = ({ prop, field, order }: SortInfo) => {
|
const onSortChange = ({ prop, field, order }: SortInfo) => {
|
||||||
//console.log(prop, field, order);
|
|
||||||
orderInfo.fieldName = prop || field;
|
orderInfo.fieldName = prop || field;
|
||||||
orderInfo.asc = order == 'ascending' || order == 'asc';
|
orderInfo.asc = order == 'ascending' || order == 'asc';
|
||||||
refreshTable();
|
refreshTable();
|
||||||
@@ -137,7 +126,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
|
|||||||
* @param showMsg 是否显示查询结果成功与否消息
|
* @param showMsg 是否显示查询结果成功与否消息
|
||||||
*/
|
*/
|
||||||
const refreshTable = (research = false, pageNum = 0, showMsg = false) => {
|
const refreshTable = (research = false, pageNum = 0, showMsg = false) => {
|
||||||
//console.log(research, pageNum, showMsg);
|
|
||||||
let reload = false;
|
let reload = false;
|
||||||
if (research) {
|
if (research) {
|
||||||
if (!verifyTableParameter()) return;
|
if (!verifyTableParameter()) return;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const useUpload = () => {
|
|||||||
* @returns {Array} 上传文件信息,[{name, downloadUri, filename, url}]
|
* @returns {Array} 上传文件信息,[{name, downloadUri, filename, url}]
|
||||||
*/
|
*/
|
||||||
const parseUploadData = (jsonData: string, params: ANY_OBJECT) => {
|
const parseUploadData = (jsonData: string, params: ANY_OBJECT) => {
|
||||||
let pathList = [];
|
let pathList: Array<ANY_OBJECT> = [];
|
||||||
if (jsonData != null) {
|
if (jsonData != null) {
|
||||||
try {
|
try {
|
||||||
pathList = JSON.parse(jsonData);
|
pathList = JSON.parse(jsonData);
|
||||||
@@ -39,7 +39,7 @@ export const useUpload = () => {
|
|||||||
* @param {*} item 上传文件
|
* @param {*} item 上传文件
|
||||||
* @param {*} params 上传文件的参数
|
* @param {*} params 上传文件的参数
|
||||||
*/
|
*/
|
||||||
const getUploadFileUrl = (item: { downloadUri: string }, params?: ANY_OBJECT) => {
|
const getUploadFileUrl = (item: ANY_OBJECT, params?: ANY_OBJECT) => {
|
||||||
if (item == null || item.downloadUri == null) {
|
if (item == null || item.downloadUri == null) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
@@ -101,7 +101,6 @@ export const useUpload = () => {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then((res: ANY_OBJECT) => {
|
.then((res: ANY_OBJECT) => {
|
||||||
console.log('uploaded file fetchUpload', res);
|
|
||||||
if (res.data && res.success) {
|
if (res.data && res.success) {
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,14 +9,13 @@ export const useUrlBuilder = () => {
|
|||||||
* @returns 请求全路径(含参数)
|
* @returns 请求全路径(含参数)
|
||||||
*/
|
*/
|
||||||
const buildGetUrl = (actionName: string, params: ANY_OBJECT | null = null) => {
|
const buildGetUrl = (actionName: string, params: ANY_OBJECT | null = null) => {
|
||||||
console.log('getUrl', actionName);
|
|
||||||
const queryString = objectToQueryString(params);
|
const queryString = objectToQueryString(params);
|
||||||
if (actionName != null && actionName !== '') {
|
if (actionName != null && actionName !== '') {
|
||||||
if (actionName.substring(0, 1) === '/') actionName = actionName.substring(1);
|
if (actionName.substring(0, 1) === '/') actionName = actionName.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
import.meta.env.VITE_SERVER_HOST + actionName + (queryString == null ? '' : '?' + queryString)
|
process.env.VUE_APP_SERVER_HOST + actionName + (queryString == null ? '' : '?' + queryString)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -25,14 +24,13 @@ export const useUrlBuilder = () => {
|
|||||||
* @param actionName action方法名称
|
* @param actionName action方法名称
|
||||||
*/
|
*/
|
||||||
const requestUrl = (actionName: string) => {
|
const requestUrl = (actionName: string) => {
|
||||||
console.log('requestUrl', actionName);
|
|
||||||
if (actionName) {
|
if (actionName) {
|
||||||
if (actionName.substring(0, 1) === '/') actionName = actionName.substring(1);
|
if (actionName.substring(0, 1) === '/') actionName = actionName.substring(1);
|
||||||
}
|
}
|
||||||
if (actionName.indexOf('http://') === 0 || actionName.indexOf('https://') === 0) {
|
if (actionName.indexOf('http://') === 0 || actionName.indexOf('https://') === 0) {
|
||||||
return actionName;
|
return actionName;
|
||||||
} else {
|
} else {
|
||||||
return import.meta.env.VITE_SERVER_HOST + actionName;
|
return process.env.VUE_APP_SERVER_HOST + actionName;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ const documentClientHeight = ref(0);
|
|||||||
*/
|
*/
|
||||||
export const useWindowResize = () => {
|
export const useWindowResize = () => {
|
||||||
const windowResize = () => {
|
const windowResize = () => {
|
||||||
//console.log('窗口尺寸发生变化');
|
|
||||||
documentClientHeight.value = document.documentElement.clientHeight;
|
documentClientHeight.value = document.documentElement.clientHeight;
|
||||||
if (window.innerWidth <= WIDTH) {
|
if (window.innerWidth <= WIDTH) {
|
||||||
layoutStore.defaultFormItemSize = 'default';
|
layoutStore.defaultFormItemSize = 'default';
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ const axiosInstance: AxiosInstance = axios.create({
|
|||||||
},
|
},
|
||||||
transformResponse: [
|
transformResponse: [
|
||||||
function (data) {
|
function (data) {
|
||||||
//console.log('transformResponse', data);
|
|
||||||
if (typeof data === 'string') {
|
if (typeof data === 'string') {
|
||||||
return JSONbig({ storeAsString: true }).parse(data);
|
return JSONbig({ storeAsString: true }).parse(data);
|
||||||
} else {
|
} else {
|
||||||
@@ -58,7 +57,6 @@ const loginInvalid = () => {
|
|||||||
// 创建响应拦截
|
// 创建响应拦截
|
||||||
axiosInstance.interceptors.response.use(
|
axiosInstance.interceptors.response.use(
|
||||||
<T>(response: AxiosResponse): AxiosPromise<ResponseDataType<T>> => {
|
<T>(response: AxiosResponse): AxiosPromise<ResponseDataType<T>> => {
|
||||||
//console.log('axios response => ', response);
|
|
||||||
const { data, status } = response;
|
const { data, status } = response;
|
||||||
// 如果401响应放行至此,执行此逻辑
|
// 如果401响应放行至此,执行此逻辑
|
||||||
if (status === 401) {
|
if (status === 401) {
|
||||||
@@ -80,7 +78,6 @@ axiosInstance.interceptors.response.use(
|
|||||||
if (response.headers['refreshedtoken'] != null) {
|
if (response.headers['refreshedtoken'] != null) {
|
||||||
setToken(response.headers['refreshedtoken']);
|
setToken(response.headers['refreshedtoken']);
|
||||||
}
|
}
|
||||||
//console.log('response', response, 'blob', response.data instanceof Blob);
|
|
||||||
// 判断请求是否成功
|
// 判断请求是否成功
|
||||||
if (!(response.data instanceof Blob) && !response.data.success) {
|
if (!(response.data instanceof Blob) && !response.data.success) {
|
||||||
return Promise.reject(new Error(response.data.errorMessage || 'error'));
|
return Promise.reject(new Error(response.data.errorMessage || 'error'));
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const serverDefaultCfg = {
|
export const serverDefaultCfg = {
|
||||||
baseURL: import.meta.env.VITE_SERVER_HOST, // 请求基础地址,可根据环境自定义
|
baseURL: process.env.VUE_APP_SERVER_HOST, // 请求基础地址,可根据环境自定义
|
||||||
mockURL: '',
|
mockURL: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,26 +61,21 @@ class LoadingManager {
|
|||||||
|
|
||||||
showMask() {
|
showMask() {
|
||||||
this.refCount++;
|
this.refCount++;
|
||||||
//console.log('loading >>>', this.refCount);
|
|
||||||
if (this.refCount <= 1 && this.loading == null) {
|
if (this.refCount <= 1 && this.loading == null) {
|
||||||
//console.log('loading do create serice');
|
|
||||||
this.loading = ElLoading.service(this.options);
|
this.loading = ElLoading.service(this.options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hideMask() {
|
hideMask() {
|
||||||
//console.log('loading hideMask', this.refCount);
|
|
||||||
if (this.refCount <= 1 && this.loading != null) {
|
if (this.refCount <= 1 && this.loading != null) {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
this.loading = null;
|
this.loading = null;
|
||||||
//console.log('loading hideMask do close');
|
|
||||||
}
|
}
|
||||||
this.refCount--;
|
this.refCount--;
|
||||||
this.refCount = Math.max(0, this.refCount);
|
this.refCount = Math.max(0, this.refCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log('new LoadingManager');
|
|
||||||
const loadingManager = new LoadingManager({
|
const loadingManager = new LoadingManager({
|
||||||
fullscreen: true,
|
fullscreen: true,
|
||||||
background: 'rgba(0, 0, 0, 0.1)',
|
background: 'rgba(0, 0, 0, 0.1)',
|
||||||
@@ -142,7 +137,6 @@ export async function commonRequest<D>(
|
|||||||
...data,
|
...data,
|
||||||
...finalAxiosOption,
|
...finalAxiosOption,
|
||||||
});
|
});
|
||||||
//console.log('result:', result);
|
|
||||||
if (result instanceof Blob || result.success) {
|
if (result instanceof Blob || result.success) {
|
||||||
return Promise.resolve(result);
|
return Promise.resolve(result);
|
||||||
} else {
|
} else {
|
||||||
@@ -254,13 +248,6 @@ export const download = async (
|
|||||||
method?: RequestMethods,
|
method?: RequestMethods,
|
||||||
options?: RequestOption,
|
options?: RequestOption,
|
||||||
) => {
|
) => {
|
||||||
// console.log(
|
|
||||||
// 'download file url=%s, params:%s, filename:%s, options:%s',
|
|
||||||
// url,
|
|
||||||
// params,
|
|
||||||
// filename,
|
|
||||||
// options,
|
|
||||||
// );
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
downloadBlob(url, params, method, options)
|
downloadBlob(url, params, method, options)
|
||||||
.then(blobData => {
|
.then(blobData => {
|
||||||
@@ -300,13 +287,11 @@ export const downloadBlob = (
|
|||||||
const axiosOption: AxiosRequestConfig = {
|
const axiosOption: AxiosRequestConfig = {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
transformResponse: function (data) {
|
transformResponse: function (data) {
|
||||||
//console.log(data);
|
|
||||||
return data instanceof Blob && data.size > 0 ? data : undefined;
|
return data instanceof Blob && data.size > 0 ? data : undefined;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
commonRequest<Blob>(requestUrl(url), params, method, options, axiosOption)
|
commonRequest<Blob>(requestUrl(url), params, method, options, axiosOption)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
//console.log('download blob response >>>', res);
|
|
||||||
if (res instanceof Blob) {
|
if (res instanceof Blob) {
|
||||||
const blobData = new Blob([res.data], { type: 'application/octet-stream' });
|
const blobData = new Blob([res.data], { type: 'application/octet-stream' });
|
||||||
resolve(blobData);
|
resolve(blobData);
|
||||||
@@ -337,7 +322,6 @@ export const downloadBlob = (
|
|||||||
* @param options 请求设置(showMask-是否显示Loading层,默认为true;showError-是否显示错误信息,默认为true;throttleFlag-是否开户节流,默认为false;throttleTimeout-节流时效,默认为50毫秒)
|
* @param options 请求设置(showMask-是否显示Loading层,默认为true;showError-是否显示错误信息,默认为true;throttleFlag-是否开户节流,默认为false;throttleTimeout-节流时效,默认为50毫秒)
|
||||||
*/
|
*/
|
||||||
export const upload = async (url: string, params: ANY_OBJECT, options?: RequestOption) => {
|
export const upload = async (url: string, params: ANY_OBJECT, options?: RequestOption) => {
|
||||||
//console.log('upload file url=%s, params:%s, options:%s', url, params, options);
|
|
||||||
const axiosOption: AxiosRequestConfig = {
|
const axiosOption: AxiosRequestConfig = {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data',
|
'Content-Type': 'multipart/form-data',
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
import * as generatedDict from './generated';
|
||||||
import * as baseDict from './index';
|
import * as baseDict from './index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...baseDict,
|
...baseDict,
|
||||||
|
...generatedDict,
|
||||||
};
|
};
|
||||||
|
|||||||
4
OrangeFormsOpen-VUE3/src/common/staticDict/generated.ts
Normal file
4
OrangeFormsOpen-VUE3/src/common/staticDict/generated.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import { DictionaryBase } from './types';
|
||||||
|
|
||||||
|
|
||||||
|
export {};
|
||||||
@@ -274,7 +274,7 @@ export function setObjectToSessionStorage(key: string, value: ANY_OBJECT) {
|
|||||||
* @param {*} defaultValue 默认值
|
* @param {*} defaultValue 默认值
|
||||||
*/
|
*/
|
||||||
export function getObjectFromSessionStorage(key: string, defaultValue: ANY_OBJECT): ANY_OBJECT {
|
export function getObjectFromSessionStorage(key: string, defaultValue: ANY_OBJECT): ANY_OBJECT {
|
||||||
let jsonObj = null;
|
let jsonObj: ANY_OBJECT;
|
||||||
try {
|
try {
|
||||||
const val: string | null = sessionStorage.getItem(key);
|
const val: string | null = sessionStorage.getItem(key);
|
||||||
if (val == null) return defaultValue;
|
if (val == null) return defaultValue;
|
||||||
@@ -590,11 +590,9 @@ export function fileToBase64(file: File) {
|
|||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
reader.onload = e => {
|
reader.onload = e => {
|
||||||
console.log('file loaded', e);
|
|
||||||
resolve(e.target?.result as string);
|
resolve(e.target?.result as string);
|
||||||
};
|
};
|
||||||
reader.onerror = e => {
|
reader.onerror = e => {
|
||||||
console.warn('file load', e);
|
|
||||||
reject(e);
|
reject(e);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -640,7 +638,6 @@ export function deepMerge(obj1: ANY_OBJECT, obj2: ANY_OBJECT) {
|
|||||||
tempObj[key] = copyObject(val2);
|
tempObj[key] = copyObject(val2);
|
||||||
}
|
}
|
||||||
} else if (Array.isArray(val2)) {
|
} else if (Array.isArray(val2)) {
|
||||||
//console.log('......deepMerge.......', val1, val2, obj1, obj2);
|
|
||||||
// 如果两个值都是数组,则合并数组
|
// 如果两个值都是数组,则合并数组
|
||||||
if (Array.isArray(val1)) {
|
if (Array.isArray(val1)) {
|
||||||
tempObj[key] = val2.map((arrVal2, index) => {
|
tempObj[key] = val2.map((arrVal2, index) => {
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ const loadGroupData = () => {
|
|||||||
}
|
}
|
||||||
if (currentGroup.value == null) currentGroup.value = dataList[0];
|
if (currentGroup.value == null) currentGroup.value = dataList[0];
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (groupTree.value)
|
if (groupTree.value && currentGroup.value)
|
||||||
groupTree.value.setCurrentKey(currentGroup.value[props.treePanel.keyColumnName]);
|
groupTree.value.setCurrentKey(currentGroup.value[props.treePanel.keyColumnName]);
|
||||||
}, 50);
|
}, 50);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -70,11 +70,10 @@ export class Dialog {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let layerOptions = {
|
let layerOptions: ANY_OBJECT = {
|
||||||
title: title,
|
title: title,
|
||||||
type: 1,
|
type: 1,
|
||||||
skin:
|
skin: 'layui-layer-page',
|
||||||
'layer-dialog ' + (window.innerWidth <= 1900 ? 'container-default' : 'container-large'),
|
|
||||||
resize: false,
|
resize: false,
|
||||||
offset: 'auto',
|
offset: 'auto',
|
||||||
shadeClose: false,
|
shadeClose: false,
|
||||||
@@ -103,7 +102,8 @@ export class Dialog {
|
|||||||
|
|
||||||
console.log('dialog params', params);
|
console.log('dialog params', params);
|
||||||
//layerOptions.content = h(component, params);
|
//layerOptions.content = h(component, params);
|
||||||
layerOptions.content = h(Layout, () => h(component, params));
|
const vueComponent = h(Layout, () => h(component, params));
|
||||||
|
layerOptions.content = vueComponent;
|
||||||
|
|
||||||
const id = layer.open(layerOptions);
|
const id = layer.open(layerOptions);
|
||||||
observer.index = id;
|
observer.index = id;
|
||||||
|
|||||||
@@ -965,6 +965,9 @@ const getWidth = () => {
|
|||||||
return '100%';
|
return '100%';
|
||||||
};
|
};
|
||||||
export default class Sheet {
|
export default class Sheet {
|
||||||
|
cell(ri, ci, sheetIndex) {
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
constructor(targetEl, data) {
|
constructor(targetEl, data) {
|
||||||
this.eventMap = createEventEmitter();
|
this.eventMap = createEventEmitter();
|
||||||
const { showToolbar, showContextmenu, mode } = data.settings;
|
const { showToolbar, showContextmenu, mode } = data.settings;
|
||||||
|
|||||||
@@ -1,193 +0,0 @@
|
|||||||
declare module 'x-data-spreadsheet' {
|
|
||||||
export interface ExtendToolbarOption {
|
|
||||||
tip?: string;
|
|
||||||
el?: HTMLElement;
|
|
||||||
icon?: string;
|
|
||||||
onClick?: (data: object, sheet: object) => void;
|
|
||||||
}
|
|
||||||
export interface Options {
|
|
||||||
mode?: 'edit' | 'read';
|
|
||||||
showToolbar?: boolean;
|
|
||||||
showGrid?: boolean;
|
|
||||||
showContextmenu?: boolean;
|
|
||||||
showBottomBar?: boolean;
|
|
||||||
extendToolbar?: {
|
|
||||||
left?: ExtendToolbarOption[];
|
|
||||||
right?: ExtendToolbarOption[];
|
|
||||||
};
|
|
||||||
autoFocus?: boolean;
|
|
||||||
view?: {
|
|
||||||
height: () => number;
|
|
||||||
width: () => number;
|
|
||||||
};
|
|
||||||
row?: {
|
|
||||||
len: number;
|
|
||||||
height: number;
|
|
||||||
};
|
|
||||||
col?: {
|
|
||||||
len: number;
|
|
||||||
width: number;
|
|
||||||
indexWidth: number;
|
|
||||||
minWidth: number;
|
|
||||||
};
|
|
||||||
style?: {
|
|
||||||
bgcolor: string;
|
|
||||||
align: 'left' | 'center' | 'right';
|
|
||||||
valign: 'top' | 'middle' | 'bottom';
|
|
||||||
textwrap: boolean;
|
|
||||||
strike: boolean;
|
|
||||||
underline: boolean;
|
|
||||||
color: string;
|
|
||||||
font: {
|
|
||||||
name: 'Helvetica';
|
|
||||||
size: number;
|
|
||||||
bold: boolean;
|
|
||||||
italic: false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CELL_SELECTED = 'cell-selected';
|
|
||||||
export type CELLS_SELECTED = 'cells-selected';
|
|
||||||
export type CELL_EDITED = 'cell-edited';
|
|
||||||
|
|
||||||
export type CellMerge = [number, number];
|
|
||||||
|
|
||||||
export interface SpreadsheetEventHandler {
|
|
||||||
(envt: CELL_SELECTED, callback: (cell: Cell, rowIndex: number, colIndex: number) => void): void;
|
|
||||||
(
|
|
||||||
envt: CELLS_SELECTED,
|
|
||||||
callback: (
|
|
||||||
cell: Cell,
|
|
||||||
parameters: { sri: number; sci: number; eri: number; eci: number },
|
|
||||||
) => void,
|
|
||||||
): void;
|
|
||||||
(evnt: CELL_EDITED, callback: (text: string, rowIndex: number, colIndex: number) => void): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ColProperties {
|
|
||||||
width?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Data for representing a cell
|
|
||||||
*/
|
|
||||||
export interface CellData {
|
|
||||||
text: string;
|
|
||||||
style?: number;
|
|
||||||
merge?: CellMerge;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Data for representing a row
|
|
||||||
*/
|
|
||||||
export interface RowData {
|
|
||||||
cells: {
|
|
||||||
[key: number]: CellData;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Data for representing a sheet
|
|
||||||
*/
|
|
||||||
export interface SheetData {
|
|
||||||
name?: string;
|
|
||||||
freeze?: string;
|
|
||||||
styles?: CellStyle[];
|
|
||||||
merges?: string[];
|
|
||||||
cols?: {
|
|
||||||
len?: number;
|
|
||||||
[key: number]: ColProperties;
|
|
||||||
};
|
|
||||||
rows?: {
|
|
||||||
[key: number]: RowData;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Data for representing a spreadsheet
|
|
||||||
*/
|
|
||||||
export interface SpreadsheetData {
|
|
||||||
[index: number]: SheetData;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CellStyle {
|
|
||||||
align?: 'left' | 'center' | 'right';
|
|
||||||
valign?: 'top' | 'middle' | 'bottom';
|
|
||||||
font?: {
|
|
||||||
bold?: boolean;
|
|
||||||
};
|
|
||||||
bgcolor?: string;
|
|
||||||
textwrap?: boolean;
|
|
||||||
color?: string;
|
|
||||||
border?: {
|
|
||||||
top?: string[];
|
|
||||||
right?: string[];
|
|
||||||
bottom?: string[];
|
|
||||||
left?: string[];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
export interface Editor {}
|
|
||||||
export interface Element {}
|
|
||||||
|
|
||||||
export interface Row {}
|
|
||||||
export interface Table {}
|
|
||||||
export interface Cell {}
|
|
||||||
export interface Sheet {}
|
|
||||||
|
|
||||||
export default class Spreadsheet {
|
|
||||||
constructor(container: string | HTMLElement, opts?: Options);
|
|
||||||
on: SpreadsheetEventHandler;
|
|
||||||
/**
|
|
||||||
* retrieve cell
|
|
||||||
* @param rowIndex {number} row index
|
|
||||||
* @param colIndex {number} column index
|
|
||||||
* @param sheetIndex {number} sheet iindex
|
|
||||||
*/
|
|
||||||
cell(rowIndex: number, colIndex: number, sheetIndex: number): Cell;
|
|
||||||
/**
|
|
||||||
* retrieve cell style
|
|
||||||
* @param rowIndex
|
|
||||||
* @param colIndex
|
|
||||||
* @param sheetIndex
|
|
||||||
*/
|
|
||||||
cellStyle(rowIndex: number, colIndex: number, sheetIndex: number): CellStyle;
|
|
||||||
/**
|
|
||||||
* get/set cell text
|
|
||||||
* @param rowIndex
|
|
||||||
* @param colIndex
|
|
||||||
* @param text
|
|
||||||
* @param sheetIndex
|
|
||||||
*/
|
|
||||||
cellText(rowIndex: number, colIndex: number, text: string, sheetIndex?: number): this;
|
|
||||||
/**
|
|
||||||
* remove current sheet
|
|
||||||
*/
|
|
||||||
deleteSheet(): void;
|
|
||||||
|
|
||||||
/**s
|
|
||||||
* load data
|
|
||||||
* @param json
|
|
||||||
*/
|
|
||||||
loadData(json: Record<string, any>): this;
|
|
||||||
/**
|
|
||||||
* get data
|
|
||||||
*/
|
|
||||||
getData(): Record<string, any>;
|
|
||||||
/**
|
|
||||||
* bind handler to change event, including data change and user actions
|
|
||||||
* @param callback
|
|
||||||
*/
|
|
||||||
change(callback: (json: Record<string, any>) => void): this;
|
|
||||||
/**
|
|
||||||
* set locale
|
|
||||||
* @param lang
|
|
||||||
* @param message
|
|
||||||
*/
|
|
||||||
static locale(lang: string, message: object): void;
|
|
||||||
}
|
|
||||||
global {
|
|
||||||
interface Window {
|
|
||||||
x_spreadsheet(container: string | HTMLElement, opts?: Options): Spreadsheet;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="child in menu.children" :key="child.menuId">
|
<template v-for="child in menu.children" :key="child.menuId">
|
||||||
<sub-menu class="nest-menu" :menu="child" :isChild="true" />
|
<sub-menu class="nest-menu" :index="child.menuId" :menu="child" :isChild="true" />
|
||||||
</template>
|
</template>
|
||||||
</el-sub-menu>
|
</el-sub-menu>
|
||||||
</div>
|
</div>
|
||||||
@@ -63,7 +63,7 @@ const getTextStyle = (isShow: boolean) => {
|
|||||||
.nest-menu :deep(.el-menu-item span:first-child),
|
.nest-menu :deep(.el-menu-item span:first-child),
|
||||||
.nest-menu :deep(.el-menu-item .menu-icon:first-child),
|
.nest-menu :deep(.el-menu-item .menu-icon:first-child),
|
||||||
.nest-menu :deep(.el-submenu__title span:first-child) {
|
.nest-menu :deep(.el-submenu__title span:first-child) {
|
||||||
padding-left: 8px !important;
|
padding-left: 14px !important;
|
||||||
}
|
}
|
||||||
.nest-menu :deep(.el-submenu__title .menu-icon:first-child) {
|
.nest-menu :deep(.el-submenu__title .menu-icon:first-child) {
|
||||||
margin-left: 8px !important;
|
margin-left: 8px !important;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ const route = useRoute();
|
|||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const loginStore = useLoginStore();
|
const loginStore = useLoginStore();
|
||||||
const documentClientHeight = inject('documentClientHeight', ref(500));
|
const documentClientHeight = inject('documentClientHeight', ref(500));
|
||||||
const projectName = import.meta.env.VITE_PROJECT_NAME;
|
const projectName = process.env.VUE_APP_PROJECT_NAME;
|
||||||
|
|
||||||
const { getUploadFileUrl } = useUpload();
|
const { getUploadFileUrl } = useUpload();
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import * as olineDicgt from '@/common/staticDict/online';
|
|||||||
import * as flowDict from '@/common/staticDict/flow';
|
import * as flowDict from '@/common/staticDict/flow';
|
||||||
|
|
||||||
import { ANY_OBJECT } from '@/types/generic';
|
import { ANY_OBJECT } from '@/types/generic';
|
||||||
|
import { debounce } from 'lodash';
|
||||||
|
|
||||||
function useTable(app: ANY_OBJECT) {
|
function useTable(app: ANY_OBJECT) {
|
||||||
app.use(VxeTable).use(VxeColumn).use(Edit);
|
app.use(VxeTable).use(VxeColumn).use(Edit);
|
||||||
@@ -41,6 +42,15 @@ function useStaticDict(app: ANY_OBJECT, staticDict: ANY_OBJECT) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// webpack需要重写ResizeObserver,否则会报错
|
||||||
|
const resizeObserver = window.ResizeObserver;
|
||||||
|
window.ResizeObserver = class ResizeObserver extends resizeObserver {
|
||||||
|
constructor(callback) {
|
||||||
|
callback = debounce(callback, 10);
|
||||||
|
super(callback);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||||
app.component(key, component);
|
app.component(key, component);
|
||||||
|
|||||||
@@ -199,7 +199,9 @@ import { SysOnlineFieldKind } from '@/common/staticDict/online';
|
|||||||
import { useUpload } from '@/common/hooks/useUpload';
|
import { useUpload } from '@/common/hooks/useUpload';
|
||||||
import { SortInfo } from '@/common/types/sortinfo';
|
import { SortInfo } from '@/common/types/sortinfo';
|
||||||
import { API_CONTEXT } from '@/api/config';
|
import { API_CONTEXT } from '@/api/config';
|
||||||
|
import { useLayoutStore } from '@/store';
|
||||||
|
|
||||||
|
const layoutStore = useLayoutStore();
|
||||||
const { downloadFile } = useDownload();
|
const { downloadFile } = useDownload();
|
||||||
const { parseUploadData } = useUpload();
|
const { parseUploadData } = useUpload();
|
||||||
|
|
||||||
@@ -247,8 +249,6 @@ const form = inject('form', () => {
|
|||||||
console.error('OnlineCustomTable: form not injected');
|
console.error('OnlineCustomTable: form not injected');
|
||||||
return { isEdit: false } as ANY_OBJECT;
|
return { isEdit: false } as ANY_OBJECT;
|
||||||
});
|
});
|
||||||
import { useLayoutStore } from '@/store';
|
|
||||||
const layoutStore = useLayoutStore();
|
|
||||||
|
|
||||||
const slots = useSlots();
|
const slots = useSlots();
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="inputWidgetType === SysCustomWidgetType.Input"
|
v-if="inputWidgetType === SysCustomWidgetType.Input"
|
||||||
size="default"
|
size="small"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
v-model="valStr"
|
v-model="valStr"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
/>
|
/>
|
||||||
<el-row v-if="inputWidgetType === SysCustomWidgetType.NumberInput" type="flex">
|
<el-row v-if="inputWidgetType === SysCustomWidgetType.NumberInput" type="flex">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
size="default"
|
size="small"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@@ -30,21 +30,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="inputWidgetType === SysCustomWidgetType.Radio" type="flex" align="middle">
|
<el-row v-if="inputWidgetType === SysCustomWidgetType.Radio" type="flex" align="middle">
|
||||||
<el-radio-group
|
<el-radio-group size="small" v-model="valNum" v-bind="attributeProps" @change="onValueChange">
|
||||||
size="default"
|
<el-radio-button
|
||||||
v-model="valNum"
|
v-for="item in dropdownData"
|
||||||
v-bind="attributeProps"
|
:key="item.id"
|
||||||
@change="onValueChange"
|
:value="item.id"
|
||||||
>
|
:label="item.name"
|
||||||
<el-radio-button v-for="item in dropdownData" :key="item.id" :value="item.id">
|
/>
|
||||||
{{ item.name }}
|
|
||||||
</el-radio-button>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-slider
|
<el-slider
|
||||||
v-if="inputWidgetType === SysCustomWidgetType.Slider"
|
v-if="inputWidgetType === SysCustomWidgetType.Slider"
|
||||||
style="width: 95%; margin-left: 5px"
|
style="width: 95%; margin-left: 5px"
|
||||||
size="default"
|
size="small"
|
||||||
:min="attributeItem.min"
|
:min="attributeItem.min"
|
||||||
:max="attributeItem.max"
|
:max="attributeItem.max"
|
||||||
v-model="valNum"
|
v-model="valNum"
|
||||||
@@ -54,7 +52,7 @@
|
|||||||
/>
|
/>
|
||||||
<el-row v-if="inputWidgetType === SysCustomWidgetType.Switch" type="flex" align="middle">
|
<el-row v-if="inputWidgetType === SysCustomWidgetType.Switch" type="flex" align="middle">
|
||||||
<el-select
|
<el-select
|
||||||
size="default"
|
size="small"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="valBool"
|
v-model="valBool"
|
||||||
@input="onValueChange"
|
@input="onValueChange"
|
||||||
@@ -65,18 +63,12 @@
|
|||||||
<el-option label="是" :value="true" />
|
<el-option label="是" :value="true" />
|
||||||
<el-option label="否" :value="false" />
|
<el-option label="否" :value="false" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<!--
|
|
||||||
<el-switch size="default"
|
|
||||||
:value="value" @input="onValueChange"
|
|
||||||
@change="$emit('change')"
|
|
||||||
/>
|
|
||||||
-->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="inputWidgetType === SysCustomWidgetType.Select"
|
v-if="inputWidgetType === SysCustomWidgetType.Select"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
size="default"
|
size="small"
|
||||||
v-model="valNum"
|
v-model="valNum"
|
||||||
v-bind="attributeProps"
|
v-bind="attributeProps"
|
||||||
@change="onValueChange"
|
@change="onValueChange"
|
||||||
@@ -86,7 +78,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<el-color-picker
|
<el-color-picker
|
||||||
v-if="inputWidgetType === SysCustomWidgetType.ColorPicker"
|
v-if="inputWidgetType === SysCustomWidgetType.ColorPicker"
|
||||||
size="default"
|
size="small"
|
||||||
v-model="valStr"
|
v-model="valStr"
|
||||||
@input="onValueChange"
|
@input="onValueChange"
|
||||||
v-bind="attributeProps"
|
v-bind="attributeProps"
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ export const useForm = (props: ANY_OBJECT, formRef: Ref<FormInstance> | null = n
|
|||||||
if (widget.props.dictInfo && Array.isArray(widget.props.dictInfo.paramList)) {
|
if (widget.props.dictInfo && Array.isArray(widget.props.dictInfo.paramList)) {
|
||||||
widget.props.dictInfo.paramList.forEach((param: ANY_OBJECT) => {
|
widget.props.dictInfo.paramList.forEach((param: ANY_OBJECT) => {
|
||||||
if (param.dictValueType === SysOnlineParamValueType.STATIC_DICT) {
|
if (param.dictValueType === SysOnlineParamValueType.STATIC_DICT) {
|
||||||
let errorItem = null;
|
let errorItem: ANY_OBJECT | null = null;
|
||||||
if (Array.isArray(param.dictValue) && param.dictValue.length === 2) {
|
if (Array.isArray(param.dictValue) && param.dictValue.length === 2) {
|
||||||
const dicts = StaticDict as ANY_OBJECT;
|
const dicts = StaticDict as ANY_OBJECT;
|
||||||
const staticDict = dicts[param.dictValue[0]];
|
const staticDict = dicts[param.dictValue[0]];
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ import { useThirdParty } from '@/components/thirdParty/hooks';
|
|||||||
import { ThirdProps } from '@/components/thirdParty/types';
|
import { ThirdProps } from '@/components/thirdParty/types';
|
||||||
import { useLayoutStore } from '@/store';
|
import { useLayoutStore } from '@/store';
|
||||||
import BasicForm from './basic/index.vue';
|
import BasicForm from './basic/index.vue';
|
||||||
import DataModel from './dataModel/indev.vue';
|
import DataModel from './dataModel/index.vue';
|
||||||
import FormDesign from './formDesign/index.vue';
|
import FormDesign from './formDesign/index.vue';
|
||||||
import EditOnlineForm from './editOnlineForm.vue';
|
import EditOnlineForm from './editOnlineForm.vue';
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
@@ -220,7 +220,6 @@ const onNextClick = () => {
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
res.forEach((item, index) => {
|
res.forEach((item, index) => {
|
||||||
console.log('RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR', item);
|
|
||||||
getPageDatasourceTableList.value[index].columnList = item;
|
getPageDatasourceTableList.value[index].columnList = item;
|
||||||
return getPageDatasourceTableList.value[index];
|
return getPageDatasourceTableList.value[index];
|
||||||
});
|
});
|
||||||
@@ -232,7 +231,7 @@ const onNextClick = () => {
|
|||||||
activeStep.value = SysOnlinePageSettingStep.FORM_DESIGN;
|
activeStep.value = SysOnlinePageSettingStep.FORM_DESIGN;
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
console.error(e);
|
console.warn(e);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ export const useWidgetToolkit = () => {
|
|||||||
widgetType: number,
|
widgetType: number,
|
||||||
formType: number,
|
formType: number,
|
||||||
) {
|
) {
|
||||||
console.log(column, widgetType, formType);
|
|
||||||
if (column == null) {
|
if (column == null) {
|
||||||
return {
|
return {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
@@ -43,7 +42,7 @@ export const useWidgetToolkit = () => {
|
|||||||
}
|
}
|
||||||
const columnFieldType = getColumnDataType(column);
|
const columnFieldType = getColumnDataType(column);
|
||||||
let disabled = false;
|
let disabled = false;
|
||||||
let warningMsg = null;
|
let warningMsg: string | null = null;
|
||||||
if (column.fieldKind === SysOnlineFieldKind.UPLOAD) {
|
if (column.fieldKind === SysOnlineFieldKind.UPLOAD) {
|
||||||
disabled = widgetType !== SysCustomWidgetType.Upload;
|
disabled = widgetType !== SysCustomWidgetType.Upload;
|
||||||
warningMsg = SysOnlineFieldKind.getValue(column.fieldKind);
|
warningMsg = SysOnlineFieldKind.getValue(column.fieldKind);
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="示例说明" name="cases">
|
<el-tab-pane label="示例说明" name="cases" :lazy="true">
|
||||||
<p style="margin-bottom: 16px">
|
<p style="margin-bottom: 16px">
|
||||||
<strong>在线表单,</strong>
|
<strong>在线表单,</strong>
|
||||||
通过在线表单编辑器创建,配置并绑定菜单后即可生效,无代码修改,适用于相对简单的表单页面。
|
通过在线表单编辑器创建,配置并绑定菜单后即可生效,无代码修改,适用于相对简单的表单页面。
|
||||||
|
|||||||
@@ -425,31 +425,6 @@
|
|||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
const defaultApprovalStatus = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: '同意',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: '拒绝',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: '驳回',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
name: '会签同意',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 5,
|
|
||||||
name: '会签拒绝',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { VxeTable, VxeColumn } from 'vxe-table';
|
import { VxeTable, VxeColumn } from 'vxe-table';
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
|
||||||
@@ -494,7 +469,13 @@ import ProcessDesigner from '../components/ProcessDesigner.vue';
|
|||||||
import EditFlowEntryStatus from './formEditFlowEntryStatus.vue';
|
import EditFlowEntryStatus from './formEditFlowEntryStatus.vue';
|
||||||
import EditFlowEntryVariable from './formEditFlowEntryVariable.vue';
|
import EditFlowEntryVariable from './formEditFlowEntryVariable.vue';
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
|
const defaultApprovalStatus = [
|
||||||
|
{ id: 1, name: '同意' },
|
||||||
|
{ id: 2, name: '拒绝' },
|
||||||
|
{ id: 3, name: '驳回' },
|
||||||
|
{ id: 4, name: '会签同意' },
|
||||||
|
{ id: 5, name: '会签拒绝' },
|
||||||
|
];
|
||||||
interface IProps extends ThirdProps {
|
interface IProps extends ThirdProps {
|
||||||
flowEntry?: ANY_OBJECT;
|
flowEntry?: ANY_OBJECT;
|
||||||
// 当使用Dialog.show弹出组件时,须定义该prop属性,以便对dialog进行回调
|
// 当使用Dialog.show弹出组件时,须定义该prop属性,以便对dialog进行回调
|
||||||
|
|||||||
@@ -125,14 +125,12 @@ import { useLayoutStore } from '@/store';
|
|||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
|
|
||||||
interface IProps extends ThirdProps {
|
interface IProps extends ThirdProps {
|
||||||
flowEntry: ANY_OBJECT;
|
flowEntry?: ANY_OBJECT | undefined;
|
||||||
// 当使用Dialog.show弹出组件时,须定义该prop属性,以便对dialog进行回调
|
// 当使用Dialog.show弹出组件时,须定义该prop属性,以便对dialog进行回调
|
||||||
dialog?: DialogProp<ANY_OBJECT>;
|
dialog?: DialogProp<ANY_OBJECT>;
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<IProps>(), {
|
const props = withDefaults(defineProps<IProps>(), {
|
||||||
flowEntry: () => {
|
flowEntry: undefined,
|
||||||
return {};
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const { thirdParams } = useThirdParty(props);
|
const { thirdParams } = useThirdParty(props);
|
||||||
const formItemSize = computed(() => {
|
const formItemSize = computed(() => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { RouteLocationNormalizedLoaded } from 'vue-router';
|
import { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router';
|
||||||
import Layout from '@/components/layout/index.vue';
|
import Layout from '@/components/layout/index.vue';
|
||||||
import Welcome from '@/pages/welcome/index.vue';
|
import Welcome from '@/pages/welcome/index.vue';
|
||||||
import Login from '@/pages/login/index.vue';
|
import Login from '@/pages/login/index.vue';
|
||||||
@@ -9,7 +9,7 @@ function getProps(route: RouteLocationNormalizedLoaded) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 系统生成路由
|
// 系统生成路由
|
||||||
export const routers = [
|
export const routers: Array<RouteRecordRaw> = [
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: Login,
|
component: Login,
|
||||||
@@ -217,7 +217,7 @@ export const routers = [
|
|||||||
// 第三方接入路由
|
// 第三方接入路由
|
||||||
{
|
{
|
||||||
path: '/thirdParty',
|
path: '/thirdParty',
|
||||||
component: import('@/components/thirdParty/index.vue'),
|
component: () => import('@/components/thirdParty/index.vue'),
|
||||||
name: 'thirdParty',
|
name: 'thirdParty',
|
||||||
props: getProps,
|
props: getProps,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
/// <reference types="vite/client" />
|
/* eslint-disable */
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import { DefineComponent } from 'vue';
|
import type { DefineComponent } from 'vue';
|
||||||
const component: DefineComponent<{}, {}, any>;
|
const component: DefineComponent<{}, {}, any>;
|
||||||
export default component;
|
export default component;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '*.svg';
|
declare module '*.svg';
|
||||||
declare module '*.png';
|
declare module '*.png';
|
||||||
declare module '*.jpg';
|
declare module '*.jpg';
|
||||||
@@ -18,12 +17,3 @@ declare module 'ejs';
|
|||||||
declare module 'bpmn-js/lib/Modeler';
|
declare module 'bpmn-js/lib/Modeler';
|
||||||
declare module 'xml-js';
|
declare module 'xml-js';
|
||||||
declare module 'bpmn-js-token-simulation';
|
declare module 'bpmn-js-token-simulation';
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
|
||||||
VITE_SERVER_HOST: string;
|
|
||||||
VITE_PROJECT_NAME: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ImportMeta {
|
|
||||||
env: ImportMetaEnv;
|
|
||||||
}
|
|
||||||
@@ -26,4 +26,6 @@ export interface ColumnInfo {
|
|||||||
fieldKind: number;
|
fieldKind: number;
|
||||||
maxFileCount: number;
|
maxFileCount: number;
|
||||||
dictId: string;
|
dictId: string;
|
||||||
|
maskFieldType: number;
|
||||||
|
encodedRule: ANY_OBJECT | string | undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,38 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "esnext",
|
||||||
"useDefineForClassFields": true,
|
"module": "esnext",
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "Node",
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"resolveJsonModule": true,
|
"moduleResolution": "node",
|
||||||
"isolatedModules": true,
|
"noImplicitAny": false,
|
||||||
"esModuleInterop": true,
|
"experimentalDecorators": true,
|
||||||
"lib": ["ESNext", "DOM"],
|
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"noEmit": true,
|
"esModuleInterop": true,
|
||||||
"baseUrl": ".",
|
"allowSyntheticDefaultImports": true,
|
||||||
"types": ["element-plus/global"],
|
"allowJs": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"baseUrl": "./",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@": ["src"],
|
"@": ["src"],
|
||||||
"@/*": ["src/*"]
|
"@/*": ["src/*"]
|
||||||
}
|
},
|
||||||
|
"types": [
|
||||||
|
"webpack-env"
|
||||||
|
],
|
||||||
|
"lib": [
|
||||||
|
"esnext",
|
||||||
|
"dom",
|
||||||
|
"dom.iterable",
|
||||||
|
"scripthost"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
// "src/components"
|
||||||
|
]
|
||||||
|
// "references": [{ "path": "./tsconfig.node.json" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
import path from 'path';
|
|
||||||
import { defineConfig } from 'vite';
|
|
||||||
import AutoImport from 'unplugin-auto-import/vite';
|
|
||||||
import vue from '@vitejs/plugin-vue';
|
|
||||||
import eslint from 'vite-plugin-eslint';
|
|
||||||
// import StylelintPlugin from 'vite-plugin-stylelint';
|
|
||||||
import postcssPresetEnv from 'postcss-preset-env';
|
|
||||||
import autoprefixer from 'autoprefixer';
|
|
||||||
import Components from 'unplugin-vue-components/vite';
|
|
||||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
|
||||||
import { VantResolver } from '@vant/auto-import-resolver';
|
|
||||||
// import { createStyleImportPlugin, VxeTableResolve } from 'vite-plugin-style-import';
|
|
||||||
// https://vitejs.dev/config/
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [
|
|
||||||
vue(),
|
|
||||||
AutoImport({
|
|
||||||
resolvers: [ElementPlusResolver(), VantResolver()],
|
|
||||||
imports: ['vue'], // 需要引入的类型来源
|
|
||||||
dts: 'src/types/auto-import.d.ts', // 根据引入来源自动生成的类型声明文件路径
|
|
||||||
eslintrc: {
|
|
||||||
enabled: true, // 使用 eslint 配置
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
Components({
|
|
||||||
resolvers: [
|
|
||||||
// 自定义element-plus主题色
|
|
||||||
ElementPlusResolver({
|
|
||||||
importStyle: 'sass',
|
|
||||||
}),
|
|
||||||
VantResolver(),
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
eslint(),
|
|
||||||
// StylelintPlugin(),
|
|
||||||
],
|
|
||||||
server: {
|
|
||||||
host: '0.0.0.0',
|
|
||||||
port: 8085,
|
|
||||||
open: true,
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': path.resolve(__dirname, 'src'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
css: {
|
|
||||||
// 自定义element-plus主题色
|
|
||||||
preprocessorOptions: {
|
|
||||||
scss: {
|
|
||||||
additionalData: `@use "@/assets/skin/orange/index.scss" as *;`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
postcss: {
|
|
||||||
plugins: [autoprefixer, postcssPresetEnv()],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
46
OrangeFormsOpen-VUE3/vue.config.js
Normal file
46
OrangeFormsOpen-VUE3/vue.config.js
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
|
// const { defineConfig } = require('@vue/cli-service');
|
||||||
|
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
|
||||||
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||||
|
const AutoImport = require('unplugin-auto-import/webpack');
|
||||||
|
const Components = require('unplugin-vue-components/webpack');
|
||||||
|
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers');
|
||||||
|
module.exports = {
|
||||||
|
transpileDependencies: true,
|
||||||
|
lintOnSave: false,
|
||||||
|
devServer: {
|
||||||
|
open: true,
|
||||||
|
host: '0.0.0.0', // 允许外部ip访问
|
||||||
|
port: 8085, // 端口
|
||||||
|
},
|
||||||
|
css: {
|
||||||
|
loaderOptions: {
|
||||||
|
scss: {
|
||||||
|
additionalData: `@use "@/assets/skin/orange/index.scss" as *;`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
configureWebpack: config => {
|
||||||
|
// remove the existing ForkTsCheckerWebpackPlugin
|
||||||
|
// config.plugins = config.plugins.filter(p => !(p instanceof ForkTsCheckerWebpackPlugin));
|
||||||
|
config.plugins.push(
|
||||||
|
new NodePolyfillPlugin({
|
||||||
|
// typescript: {
|
||||||
|
// configFile: path.resolve(__dirname, 'tsconfig.json'),
|
||||||
|
// }
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
config.plugins.push(
|
||||||
|
AutoImport({
|
||||||
|
imports: ['vue', 'vue-router', 'pinia'],
|
||||||
|
resolvers: [ElementPlusResolver()],
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
config.plugins.push(
|
||||||
|
Components({
|
||||||
|
resolvers: [ElementPlusResolver({ importStyle: 'sass' })],
|
||||||
|
directoryAsNamespace: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user