olp-table 5.3.1 → 5.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.build +1 -0
- package/README.md +26 -0
- package/babel.config.js +5 -0
- package/jsconfig.json +22 -0
- package/{olp-table.common.js → olp-table/olp-table.common.js} +5 -5
- package/{olp-table.umd.js → olp-table/olp-table.umd.js} +5 -5
- package/{olp-table.umd.min.js → olp-table/olp-table.umd.min.js} +3 -3
- package/package.json +92 -12
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/rmMode.bat +1 -0
- package/src/App.vue +199 -0
- package/src/api/crud.js +22 -0
- package/src/api/dist.js +6 -0
- package/src/assets/iconfont/iconfont.css +20 -0
- package/src/assets/iconfont/iconfont.json +16 -0
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/iconfont/iconfont.woff +0 -0
- package/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/assets/logo.png +0 -0
- package/src/components/auto-height/index.vue +75 -0
- package/src/components/codemirror-tag.vue +100 -0
- package/src/components/lazy-load-select.vue +107 -0
- package/src/components/ol-dialog-excel.vue +112 -0
- package/src/components/ol-dialog-import.vue +304 -0
- package/src/components/ol-dialog-json.vue +82 -0
- package/src/components/ol-dialog-table.vue +81 -0
- package/src/components/ol-dialog-upload-file.vue +208 -0
- package/src/components/ol-dict-tag.vue +271 -0
- package/src/components/ol-select-dom.vue +71 -0
- package/src/components/ol-table-filter.vue +28 -0
- package/src/components/ol-table-render.vue +44 -0
- package/src/components/ol-table-select.vue +150 -0
- package/src/components/pinia-init.vue +18 -0
- package/src/components/table/model/ModelMixins.js +43 -0
- package/src/components/table/model/model-index.vue +121 -0
- package/src/components/table/model/ot-left-right.vue +18 -0
- package/src/components/table/model/ot-left-tree-right-table.scss +14 -0
- package/src/components/table/model/ot-left-tree-right-table.vue +41 -0
- package/src/components/table/model/ot-top-1-bottom-2.vue +39 -0
- package/src/components/table/model/ot-top-2-bottom-1.vue +38 -0
- package/src/components/table/model/ot-top-2-bottom-2.vue +38 -0
- package/src/components/table/model/ot-top-bottom.vue +18 -0
- package/src/components/table/model/splitpanesModel.css +22 -0
- package/src/components/table/model/splitpanesModel.vue +54 -0
- package/src/components/table/ol-form/index.vue +537 -0
- package/src/components/table/ol-form-v3/index.vue +455 -0
- package/src/components/table/ol-main-form-sub-table/index.vue +601 -0
- package/src/components/table/ol-pager/index.vue +46 -0
- package/src/components/table/ol-table/components/ol-table-column-config/columnIndex.vue +233 -0
- package/src/components/table/ol-table/components/ol-table-column-config/index.vue +145 -0
- package/src/components/table/ol-table/components/ol-table-column-dict-color/index.vue +88 -0
- package/src/components/table/ol-table/index.vue +232 -0
- package/src/components/table/ol-table-operate/index.vue +61 -0
- package/src/components/table/ol-table-search/index.vue +17 -0
- package/src/components/table/ol-table-tool-btn/index.vue +60 -0
- package/src/components/tree/components/o-tree.vue +289 -0
- package/src/components/tree/index.vue +46 -0
- package/src/components/v-component/index.vue +43 -0
- package/src/config/dev-config.js +5 -0
- package/src/config/prod-config.js +5 -0
- package/src/config/shared-config.js +20 -0
- package/src/data.js +9378 -0
- package/src/directives/permission/hasPermi.js +63 -0
- package/src/directives/permission/hasRole.js +30 -0
- package/src/main.js +55 -0
- package/src/mixins/VTMixin/DefaultMethods.js +749 -0
- package/src/mixins/VTMixin/OTMixinBody.js +105 -0
- package/src/mixins/VTMixin/OTMixinBodyFooter.js +93 -0
- package/src/mixins/VTMixin/OTMixinBodyMethods.js +420 -0
- package/src/mixins/VTMixin/OTMixinColumnMethod.js +450 -0
- package/src/mixins/VTMixin/OTMixinInitMethod.js +130 -0
- package/src/mixins/VTMixin/OTMixinPager.js +38 -0
- package/src/mixins/VTMixin/OTMixinSortable.js +43 -0
- package/src/mixins/VTMixin/index.js +18 -0
- package/src/package/index.js +20 -0
- package/src/plugins/axios.js +61 -0
- package/src/store/dict.js +76 -0
- package/src/store/dictType.js +52 -0
- package/src/store/permi.js +45 -0
- package/src/styles/common.scss +37 -0
- package/src/styles/index.scss +48 -0
- package/src/styles/theme.scss +32 -0
- package/src/utils/AESCRUDUtils.js +87 -0
- package/src/utils/DateUtils.js +35 -0
- package/src/utils/ExcelUtil.js +159 -0
- package/src/utils/TableSortUtil.js +91 -0
- package/src/utils/columnProp.js +3 -0
- package/src/utils/groupCompute.js +68 -0
- package/src/utils/http/httpFactory.js +92 -0
- package/src/utils/http/httpFactory2.js +79 -0
- package/src/utils/http/httpUtil.js +123 -0
- package/src/utils/http/httpUtils.js +38 -0
- package/src/utils/loadStyle.js +14 -0
- package/src/utils/message.js +56 -0
- package/src/utils/object.js +80 -0
- package/src/utils/security/TokenUtil.js +19 -0
- package/src/utils/tree.js +54 -0
- package/src/utils/util.js +127 -0
- package/src/views/Test/index.vue +77 -0
- package/src/views/Test/index2.vue +33 -0
- package/src/views/components/btn-config/index.vue +202 -0
- package/src/views/components/option-config/index.vue +192 -0
- package/src/views/db/chineseToEnglish.vue +127 -0
- package/src/views/db/filed.vue +395 -0
- package/src/views/db/index.vue +192 -0
- package/src/views/db/preview/index.vue +139 -0
- package/src/views/db/preview/left.vue +204 -0
- package/src/views/db/preview/right.vue +466 -0
- package/src/views/groupTable/index.vue +137 -0
- package/src/views/groupTable/ol-table-column-config/columnIndex.vue +194 -0
- package/src/views/groupTable/ol-table-column-config/index.vue +92 -0
- package/src/views/table/add-or-edit/config/base-config/index.vue +539 -0
- package/src/views/table/add-or-edit/config/base-config/table-form.vue +333 -0
- package/src/views/table/add-or-edit/config/column-config/header-config.vue +475 -0
- package/src/views/table/add-or-edit/config/column-config/index.vue +790 -0
- package/src/views/table/add-or-edit/config/data/column.js +218 -0
- package/src/views/table/add-or-edit/config/data/crud.js +122 -0
- package/src/views/table/add-or-edit/config/data/events.js +109 -0
- package/src/views/table/add-or-edit/config/data/method.js +127 -0
- package/src/views/table/add-or-edit/config/data/option.js +725 -0
- package/src/views/table/add-or-edit/config/data/page.js +79 -0
- package/src/views/table/add-or-edit/config/field-config/filed-config-table.vue +42 -0
- package/src/views/table/add-or-edit/config/field-config/index.vue +91 -0
- package/src/views/table/add-or-edit/config/form-config/index.vue +1179 -0
- package/src/views/table/add-or-edit/config/index.vue +376 -0
- package/src/views/table/add-or-edit/config/initFormObject.js +25 -0
- package/src/views/table/add-or-edit/config/script-config/LeftMeun.vue +71 -0
- package/src/views/table/add-or-edit/config/script-config/index.vue +70 -0
- package/src/views/table/add-or-edit/config/table-config/btn-config.vue +340 -0
- package/src/views/table/add-or-edit/config/table-config/btn-sort.vue +132 -0
- package/src/views/table/add-or-edit/config/table-config/index.vue +446 -0
- package/src/views/table/add-or-edit/configOld/dataTags/filed-config-table-model.vue +41 -0
- package/src/views/table/add-or-edit/configOld/dataTags/filed-config.vue +74 -0
- package/src/views/table/add-or-edit/configOld/dataTags/index.vue +439 -0
- package/src/views/table/add-or-edit/configOld/dataTags/set-table-sql.vue +79 -0
- package/src/views/table/add-or-edit/configOld/dataTags/table-on-config.vue +74 -0
- package/src/views/table/add-or-edit/configOld/index.vue +127 -0
- package/src/views/table/add-or-edit/configOld/tableTags/columnConfig.js +5 -0
- package/src/views/table/add-or-edit/configOld/tableTags/index.vue +353 -0
- package/src/views/table/add-or-edit/configOld/tableTags/operation-but-config.vue +75 -0
- package/src/views/table/add-or-edit/configOld/tableTags/tool-but-config.vue +92 -0
- package/src/views/table/add-or-edit/index.vue +201 -0
- package/src/views/table/add-or-edit/themeModel/index.vue +53 -0
- package/src/views/table/add-or-edit/themeModel/init-model-table.vue +48 -0
- package/src/views/table/add-or-edit/themeModel/init-model.vue +81 -0
- package/src/views/table/add-or-edit/themeModel/left-right.vue +24 -0
- package/src/views/table/add-or-edit/themeModel/left-tree-right-table.vue +75 -0
- package/src/views/table/add-or-edit/themeModel/olTableSearchModelMixins.js +42 -0
- package/src/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue +49 -0
- package/src/views/table/add-or-edit/themeModel/top-1-bottom-2.vue +29 -0
- package/src/views/table/add-or-edit/themeModel/top-2-bottom-1.vue +32 -0
- package/src/views/table/add-or-edit/themeModel/top-2-bottom-2.vue +32 -0
- package/src/views/table/add-or-edit/themeModel/top-bottom.vue +14 -0
- package/src/views/table/index.vue +43 -0
- package/src/views/table/index2.vue +199 -0
- package/src/views/table/preview/index.vue +29 -0
- package/src/views/tree/components/config-core-data.vue +85 -0
- package/src/views/tree/components/config-core-table.vue +362 -0
- package/src/views/tree/components/config-core-tree/data/events.js +95 -0
- package/src/views/tree/components/config-core-tree/data/option.js +88 -0
- package/src/views/tree/components/config-core-tree/data/prop.js +28 -0
- package/src/views/tree/components/config-core-tree/index.vue +181 -0
- package/src/views/tree/components/config-core.vue +42 -0
- package/src/views/tree/components/form-config/index.vue +967 -0
- package/src/views/tree/index.vue +424 -0
- package/vue.config.js +44 -0
- /package/{demo.html → olp-table/demo.html} +0 -0
- /package/{fonts → olp-table/fonts}/iconfont.1720006583309.7e4906d9.woff +0 -0
- /package/{fonts → olp-table/fonts}/iconfont.1720006583309.947a27f0.ttf +0 -0
- /package/{olp-table.css → olp-table/olp-table.css} +0 -0
package/package.json
CHANGED
|
@@ -1,12 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "olp-table",
|
|
3
|
-
"version": "5.3.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "olp-table",
|
|
3
|
+
"version": "5.3.4",
|
|
4
|
+
"main": "olp-table/olp-table.umd.js",
|
|
5
|
+
"module": "olp-table/olp-table.umd.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": {
|
|
9
|
+
"node": "./olp-table/olp-table.common.js",
|
|
10
|
+
"default": "./olp-table/olp-table.umd.js"
|
|
11
|
+
},
|
|
12
|
+
"require": "./olp-table/olp-table.umd.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"serve": "vue-cli-service serve",
|
|
17
|
+
"build": "vue-cli-service build",
|
|
18
|
+
"lint": "vue-cli-service lint",
|
|
19
|
+
"build:report": "vue-cli-service build --report",
|
|
20
|
+
"package": "vue-cli-service build --target lib src/package/index.js --name olp-table --dest olp-table --mode build",
|
|
21
|
+
"patch": "npm run package && npm version patch && npm publish --registry https://registry.npmjs.org",
|
|
22
|
+
"minor": "npm run package && npm version minor && npm publish --registry https://registry.npmjs.org",
|
|
23
|
+
"major": "npm run package && npm version major && npm publish --registry https://registry.npmjs.org"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@codemirror/lang-html": "^6.4.6",
|
|
27
|
+
"@codemirror/lang-javascript": "^6.2.1",
|
|
28
|
+
"@codemirror/lang-json": "^6.0.1",
|
|
29
|
+
"@codemirror/theme-one-dark": "^6.1.2",
|
|
30
|
+
"@smallwei/avue": "^3.4.1",
|
|
31
|
+
"codemirror": "^6.0.1",
|
|
32
|
+
"core-js": "^3.8.3",
|
|
33
|
+
"crypto-js": "^4.2.0",
|
|
34
|
+
"default-passive-events": "^2.0.0",
|
|
35
|
+
"element-plus": "^2.6.3",
|
|
36
|
+
"exceljs": "^4.4.0",
|
|
37
|
+
"file-saver": "^2.0.5",
|
|
38
|
+
"install": "^0.13.0",
|
|
39
|
+
"js-base64": "^3.7.7",
|
|
40
|
+
"npm": "^8.19.1",
|
|
41
|
+
"or": "^0.2.0",
|
|
42
|
+
"pako": "^2.1.0",
|
|
43
|
+
"pinia": "2.0.36",
|
|
44
|
+
"pinyin-pro": "^3.19.3",
|
|
45
|
+
"qs": "^6.11.0",
|
|
46
|
+
"sass": "^1.70.0",
|
|
47
|
+
"sortablejs": "^1.15.0",
|
|
48
|
+
"splitpanes": "^3.1.5",
|
|
49
|
+
"sql-formatter": "^2.3.3",
|
|
50
|
+
"vue": "^3.2.13",
|
|
51
|
+
"vue-codemirror": "^6.1.1",
|
|
52
|
+
"vue-json-viewer": "^3.0.4",
|
|
53
|
+
"vxe-table": "4.6.18",
|
|
54
|
+
"xe-utils": "^3.5.7"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@babel/core": "^7.12.16",
|
|
58
|
+
"@babel/eslint-parser": "^7.12.16",
|
|
59
|
+
"@vue/cli-plugin-babel": "~5.0.0",
|
|
60
|
+
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
61
|
+
"@vue/cli-plugin-router": "~5.0.0",
|
|
62
|
+
"@vue/cli-service": "~5.0.0",
|
|
63
|
+
"axios": "^1.6.7",
|
|
64
|
+
"eslint": "^7.32.0",
|
|
65
|
+
"eslint-plugin-vue": "^8.0.3",
|
|
66
|
+
"less": "^4.1.3",
|
|
67
|
+
"less-loader": "^6.0.0",
|
|
68
|
+
"sass-loader": "^14.0.0",
|
|
69
|
+
"vue-cli-plugin-axios": "~0.0.4",
|
|
70
|
+
"vxe-table": "4.6.18"
|
|
71
|
+
},
|
|
72
|
+
"eslintConfig": {
|
|
73
|
+
"root": true,
|
|
74
|
+
"env": {
|
|
75
|
+
"node": true
|
|
76
|
+
},
|
|
77
|
+
"extends": [
|
|
78
|
+
"plugin:vue/vue3-essential",
|
|
79
|
+
"eslint:recommended"
|
|
80
|
+
],
|
|
81
|
+
"parserOptions": {
|
|
82
|
+
"parser": "@babel/eslint-parser"
|
|
83
|
+
},
|
|
84
|
+
"rules": {}
|
|
85
|
+
},
|
|
86
|
+
"browserslist": [
|
|
87
|
+
"> 1%",
|
|
88
|
+
"last 2 versions",
|
|
89
|
+
"not dead",
|
|
90
|
+
"not ie 11"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
|
+
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<noscript>
|
|
12
|
+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
13
|
+
</noscript>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<!-- built files will be auto injected -->
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
package/rmMode.bat
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rimraf node_modules
|
package/src/App.vue
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 95vh">
|
|
3
|
+
<model-index :http="http" :uuid="uuid"/>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<!-- <div style="height: 100vh">
|
|
7
|
+
<div style="height: 100%">
|
|
8
|
+
<el-card class="tree-left">
|
|
9
|
+
<ol-tree v-bind="$attrs" @node-click="nodeClick" :uuid="treeUuid"></ol-tree>
|
|
10
|
+
</el-card>
|
|
11
|
+
<div class="table-right">
|
|
12
|
+
<model-index :http="http" v-if="uuid" :uuid="uuid" @initOk="initOk">
|
|
13
|
+
<!– <template #headerLeftLeft_t1>
|
|
14
|
+
工具栏按钮左边左边
|
|
15
|
+
</template>
|
|
16
|
+
<template #headerLeftRight_t1>
|
|
17
|
+
工具栏按钮左边右边
|
|
18
|
+
</template>
|
|
19
|
+
<template #headerRightLeft_t1>
|
|
20
|
+
工具栏按钮右边左边
|
|
21
|
+
</template>
|
|
22
|
+
<template #headerRightRight_t1>
|
|
23
|
+
工具栏按钮右边右边
|
|
24
|
+
</template>
|
|
25
|
+
<template #operateLeft_t1>
|
|
26
|
+
操作栏左边
|
|
27
|
+
</template>
|
|
28
|
+
<template #operateRight_t1>
|
|
29
|
+
操作栏右边
|
|
30
|
+
</template>
|
|
31
|
+
<template #pageLeft_t1>
|
|
32
|
+
分页栏左边
|
|
33
|
+
</template>
|
|
34
|
+
<template #pageRight_t1>
|
|
35
|
+
分页栏右边
|
|
36
|
+
</template>–>
|
|
37
|
+
</model-index>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<!– <el-card class="tree-left">
|
|
41
|
+
<ol-tree @node-click="nodeClick" :uuid="treeUuid"></ol-tree>
|
|
42
|
+
</el-card>
|
|
43
|
+
<div class="table-right">
|
|
44
|
+
<model-index :http="http" uuid="1787452516924563456"/>
|
|
45
|
+
</div>–>
|
|
46
|
+
</div>
|
|
47
|
+
<!–
|
|
48
|
+
<model-index :http="http" uuid="1787452516924563456"/>–>
|
|
49
|
+
<!–<db-index></db-index>–>
|
|
50
|
+
<div style="height: calc(100vh - 30px);background-color: #00000014">
|
|
51
|
+
|
|
52
|
+
<!– <el-upload
|
|
53
|
+
ref="uploadRef"
|
|
54
|
+
:action="action"
|
|
55
|
+
:show-file-list="false"
|
|
56
|
+
:on-success="Change"
|
|
57
|
+
>
|
|
58
|
+
<el-button type="primary">上传预览</el-button>
|
|
59
|
+
</el-upload>–>
|
|
60
|
+
<!– <div style="height: 90%;width: 100%;position: relative;float: left">
|
|
61
|
+
<model-index uuid="1787766229951041536"/>
|
|
62
|
+
</div>–>
|
|
63
|
+
<!– <div style="height: 90%;width: 100%;position: relative;float: left">
|
|
64
|
+
<ol-table-search v-if="formConfig" :formConfig="formConfig"></ol-table-search>
|
|
65
|
+
<model-index uuid="1749619280421036032" ref="oTable" @initOk="initOk"/>
|
|
66
|
+
</div>–>
|
|
67
|
+
</div>-->
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
|
|
72
|
+
import AutoHeight from "@/components/auto-height/index.vue";
|
|
73
|
+
import OlTree from "@/components/tree/index.vue";
|
|
74
|
+
import http from "@/utils/http/httpUtil";
|
|
75
|
+
import ModelIndex from "@/components/table/model/model-index.vue";
|
|
76
|
+
import {storeDict} from "@/store/dict";
|
|
77
|
+
import {storeDictType} from "@/store/dictType";
|
|
78
|
+
import OlDialogUploadFile from "@/components/ol-dialog-upload-file.vue";
|
|
79
|
+
import {postAes} from "@/utils/http/httpUtils";
|
|
80
|
+
import OlTableSelect from "@/components/ol-table-select.vue";
|
|
81
|
+
|
|
82
|
+
const dict = storeDict();
|
|
83
|
+
const dictType = storeDictType();
|
|
84
|
+
export default {
|
|
85
|
+
name: 'olTable',
|
|
86
|
+
components: {OlTableSelect, OlDialogUploadFile, ModelIndex, OlTree, AutoHeight},
|
|
87
|
+
provide() {
|
|
88
|
+
return {
|
|
89
|
+
http: http,
|
|
90
|
+
tableAll: this.table
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
data() {
|
|
94
|
+
return {
|
|
95
|
+
uuid: '1787452516924563456',
|
|
96
|
+
treeUuid: '1815551679408418816',
|
|
97
|
+
table: {},
|
|
98
|
+
http: http,
|
|
99
|
+
formConfig: undefined,
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
methods: {
|
|
104
|
+
nodeClick(e) {
|
|
105
|
+
console.log(e)
|
|
106
|
+
this.uuid = undefined;
|
|
107
|
+
this.$nextTick(() => {
|
|
108
|
+
this.uuid = e.uuid
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
},
|
|
112
|
+
initOk({theme, table, customerForm}) {
|
|
113
|
+
if (theme == 't1') {
|
|
114
|
+
this.formConfig = table.formConfig;//给原有的自定义搜索
|
|
115
|
+
//customerForm();//执行自定义表单,这个方法会隐藏table的表单,隐藏搜索按钮
|
|
116
|
+
}
|
|
117
|
+
console.log(this.formConfig)
|
|
118
|
+
},
|
|
119
|
+
//主子表更新或者保存
|
|
120
|
+
testSave() {
|
|
121
|
+
let params = {
|
|
122
|
+
dbName: 'online',//数据库名称
|
|
123
|
+
tableName: 'sys_dict_type',//主表名称
|
|
124
|
+
subTableName: 'sys_dict_data',//子表名称
|
|
125
|
+
mianColumnAndValueMap: {id: '1231564546', name: '韦邦杠',sex:''},//保存主表的数据{表字段:value}
|
|
126
|
+
//mainGenIdMap:{id: 'uuid'} //主表要自动生成的唯一字段 如果没有 可以忽略
|
|
127
|
+
mainTableKey: ['code'],//主表的唯一字段
|
|
128
|
+
subColumnAndValueList: [{dict_code: 'test_code_2', dict_value: '1', dict_label: 'label'}],//子表子主表的数据
|
|
129
|
+
subGenIdMap: {id: 'uuid'}, //子表要自动生成的唯一字段 如果没有 可以忽略
|
|
130
|
+
subTableKey: ['id'],//子表的唯一字段
|
|
131
|
+
subForeignKey: {'code': 'dict_type'},//表的关联key,这里框架自动复制 {主表字段,子表的字段}
|
|
132
|
+
}
|
|
133
|
+
postAes(this.http, "/online/crudAes/saveMainAndSubs", params)
|
|
134
|
+
},
|
|
135
|
+
//主子表删除
|
|
136
|
+
testDelete() {
|
|
137
|
+
let params = {
|
|
138
|
+
dbName: 'online',//数据库名称
|
|
139
|
+
tableName: 'sys_dict_type',//主表名称
|
|
140
|
+
subTableName: 'sys_dict_data',//子表名称
|
|
141
|
+
whereMap: {id: 'test_code'},//主表删除条件
|
|
142
|
+
subForeignKey: {'id': 'parent_id'},////表的关联key,{主表字段,子表的字段}
|
|
143
|
+
}
|
|
144
|
+
postAes(this.http, "/online/crudAes/deleteMainAndSubs", params)
|
|
145
|
+
},
|
|
146
|
+
//单表更新
|
|
147
|
+
updateOne() {
|
|
148
|
+
let params = {
|
|
149
|
+
dbName: 'online',//数据库名称
|
|
150
|
+
tableName: 'sys_dict_type',//主表名称
|
|
151
|
+
columnAndValueMap: {code: 'test_code',sex: 'xxx'},//更新字段
|
|
152
|
+
whereMap: {code: 'test_code'},//更新条件
|
|
153
|
+
}
|
|
154
|
+
postAes(this.http, "/online/crudAes/modify", params)
|
|
155
|
+
},
|
|
156
|
+
//单表批量更新
|
|
157
|
+
updateBatch() {
|
|
158
|
+
let params = {
|
|
159
|
+
dbName: 'online',//数据库名称
|
|
160
|
+
tableName: 'sys_dict_type',//主表名称
|
|
161
|
+
list: [
|
|
162
|
+
{
|
|
163
|
+
columnAndValueMap: {code: 'test_code'},//更新字段
|
|
164
|
+
whereMap: {code: 'test_code'},
|
|
165
|
+
}//更新条件}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
postAes(this.http, "/online/crudAes/batchModify", params)
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
created() {
|
|
172
|
+
dict.refresh()
|
|
173
|
+
dictType.refresh()
|
|
174
|
+
//this.testDelete();
|
|
175
|
+
//this.nodeClick({uuid:'1787452516924563456'})
|
|
176
|
+
//window.olpTableAxiosBaseURL = "http://localhost:48090/"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</script>
|
|
180
|
+
<style lang="less" scoped>
|
|
181
|
+
.table-right {
|
|
182
|
+
position: relative;
|
|
183
|
+
float: left;
|
|
184
|
+
width: calc(100% - 315px);
|
|
185
|
+
height: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.tree-left {
|
|
189
|
+
height: 100%;
|
|
190
|
+
position: relative;
|
|
191
|
+
float: left;
|
|
192
|
+
margin-right: 10px;
|
|
193
|
+
z-index: 100;
|
|
194
|
+
|
|
195
|
+
/deep/ .el-card__body {
|
|
196
|
+
height: 100%;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
</style>
|
package/src/api/crud.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {post,get, request} from "@/utils/http/httpUtil";
|
|
2
|
+
|
|
3
|
+
export const modify = (params) => post('/crud/modify', params);
|
|
4
|
+
export const save = (params) => post('/crud/save', params);
|
|
5
|
+
export const batchSave = (params, timeout) => request({
|
|
6
|
+
url: '/crud/batchSave',
|
|
7
|
+
method: 'post',
|
|
8
|
+
data: params,
|
|
9
|
+
timeout: timeout
|
|
10
|
+
}, false, false)
|
|
11
|
+
export const remove = (params) => post('/crud/delete', params);
|
|
12
|
+
|
|
13
|
+
export const batchRemove = (params) => post('/crud/batchDelete', params);
|
|
14
|
+
export const query = (params) => post('/crud/query', params, false, false)
|
|
15
|
+
export const getRender = (params) => get('/formDesigner/getOne', params, undefined, true)
|
|
16
|
+
|
|
17
|
+
export const queryReq = (params, timeout) => request({
|
|
18
|
+
url: '/crud/query',
|
|
19
|
+
method: 'post',
|
|
20
|
+
data: params,
|
|
21
|
+
timeout: timeout
|
|
22
|
+
}, false, false)
|
package/src/api/dist.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import {get, post} from "@/utils/http/httpUtils";
|
|
2
|
+
export const initDist = (http) => get(http,'/sysDictData/initDist');
|
|
3
|
+
export const initDistType = (http) => get(http,'/sysDictType/list');
|
|
4
|
+
|
|
5
|
+
export const initDictTable = (http,params) => post(http,'/online/dictTable', params,false,false);
|
|
6
|
+
export const initDictTag = (http,params) => post(http,'/online/dictTag', params,false,false);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'online'; /* Project id 4539076 */
|
|
4
|
+
src:
|
|
5
|
+
url('//at.alicdn.com/t/c/font_4539076_9ii7aenrdz.woff2?t=1715239008922') format('woff2'),
|
|
6
|
+
url('//at.alicdn.com/t/c/font_4539076_9ii7aenrdz.woff?t=1715239008922') format('woff'),
|
|
7
|
+
url('//at.alicdn.com/t/c/font_4539076_9ii7aenrdz.ttf?t=1715239008922') format('truetype');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.online {
|
|
11
|
+
font-family: "online" !important;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.online-liepeizhi:before {
|
|
18
|
+
content: "\e6f7";
|
|
19
|
+
}
|
|
20
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "4539076",
|
|
3
|
+
"name": "online",
|
|
4
|
+
"font_family": "online",
|
|
5
|
+
"css_prefix_text": "online-",
|
|
6
|
+
"description": "",
|
|
7
|
+
"glyphs": [
|
|
8
|
+
{
|
|
9
|
+
"icon_id": "12410224",
|
|
10
|
+
"name": "列配置",
|
|
11
|
+
"font_class": "liepeizhi",
|
|
12
|
+
"unicode": "e6f7",
|
|
13
|
+
"unicode_decimal": 59127
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="autoHeight" class="autoHeight" :style="'height:'+height">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script>
|
|
7
|
+
export default {
|
|
8
|
+
name: 'autoHeight',
|
|
9
|
+
props: {
|
|
10
|
+
footer: {
|
|
11
|
+
default: 18
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
height: 1080,
|
|
17
|
+
width: 1920,
|
|
18
|
+
first: true,
|
|
19
|
+
index: 3,//自旋3次
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
methods: {
|
|
23
|
+
computedHeight() {
|
|
24
|
+
if (this.index <= 0) {
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
this.$nextTick(() => {
|
|
28
|
+
let autoHeight = this.$refs.autoHeight
|
|
29
|
+
if (autoHeight) {
|
|
30
|
+
let innerHeight = window.innerHeight - autoHeight.getBoundingClientRect().top
|
|
31
|
+
if (this.first) {
|
|
32
|
+
this.deleteParentCard15PX()
|
|
33
|
+
}
|
|
34
|
+
this.height = innerHeight > 250 ? innerHeight - this.footer : 250
|
|
35
|
+
autoHeight.style.height = this.height + 'px'
|
|
36
|
+
this.width = window.innerWidth - (autoHeight.getBoundingClientRect().left + 10)
|
|
37
|
+
this.index--;
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
this.computedHeight();
|
|
40
|
+
}, 200)
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
},
|
|
44
|
+
deleteParentCard15PX() {
|
|
45
|
+
let parentNode = this.$refs.autoHeight
|
|
46
|
+
for (let index = 0; index < 3; index++) {
|
|
47
|
+
parentNode = parentNode['parentNode']
|
|
48
|
+
if (!parentNode) {
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
let className = parentNode.className.replace('mb-15px', '')
|
|
53
|
+
parentNode.className = className
|
|
54
|
+
this.first = false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
created() {
|
|
58
|
+
this.computedHeight()
|
|
59
|
+
window.addEventListener('resize', () => {
|
|
60
|
+
this.index = 3;
|
|
61
|
+
this.computedHeight()
|
|
62
|
+
})
|
|
63
|
+
/* setInterval(() => {
|
|
64
|
+
this.computedHeight()
|
|
65
|
+
}, 310)*/
|
|
66
|
+
}, destroyed() {
|
|
67
|
+
window.removeEventListener('resize', this.computedHeight)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
<style scoped>
|
|
72
|
+
.autoHeight {
|
|
73
|
+
width: 100%;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-input :size="state.show ? 'default':'small'" v-model="values" @click="state.show = true"/>
|
|
4
|
+
<el-dialog v-model="state.show" :title="title" class="codemirror-el-dialog"
|
|
5
|
+
style="z-index: 99999 !important;"
|
|
6
|
+
:show-close="false" @open="onOpen">
|
|
7
|
+
<slot name="tip-header"></slot>
|
|
8
|
+
<div :style="{height: heights}">
|
|
9
|
+
<codemirror
|
|
10
|
+
v-model="values"
|
|
11
|
+
:autofocus="true"
|
|
12
|
+
:indent-with-tab="true"
|
|
13
|
+
:tabSize="2"
|
|
14
|
+
:extensions="state.extensions"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<template #footer>
|
|
18
|
+
<div class="dialog-footer">
|
|
19
|
+
<slot name="toolbar-left"></slot>
|
|
20
|
+
<el-button type="primary" @click="confirm">确 定</el-button>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
</el-dialog>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import {Codemirror} from "vue-codemirror";
|
|
29
|
+
import {javascript} from "@codemirror/lang-javascript";
|
|
30
|
+
import {oneDark} from "@codemirror/theme-one-dark";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: "olCodemirrorTag",
|
|
34
|
+
components: {
|
|
35
|
+
Codemirror
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
modelValue: {},
|
|
39
|
+
height: {},
|
|
40
|
+
title: {default: ''}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
state: {
|
|
45
|
+
show: false,
|
|
46
|
+
extensions: [javascript(), oneDark],
|
|
47
|
+
values: null,
|
|
48
|
+
err: false
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
heights: {
|
|
54
|
+
get() {
|
|
55
|
+
return (this.height ? this.height : 500) + "px";
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
values: {
|
|
59
|
+
get() {
|
|
60
|
+
return this.modelValue;
|
|
61
|
+
},
|
|
62
|
+
set(value) {
|
|
63
|
+
this.$emit("update:modelValue", value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
confirm() {
|
|
69
|
+
this.state.show = false;
|
|
70
|
+
this.$emit("confirm", this.values);
|
|
71
|
+
},
|
|
72
|
+
onOpen() {
|
|
73
|
+
this.$emit("open");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style lang="scss">
|
|
80
|
+
.codemirror-el-dialog {
|
|
81
|
+
.el-dialog__header_none {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
> .el-dialog__body {
|
|
86
|
+
height: 100%;
|
|
87
|
+
padding: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cm-editor {
|
|
91
|
+
height: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
text-align: left;
|
|
95
|
+
|
|
96
|
+
.el-dialog__footer {
|
|
97
|
+
padding: 5px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-select
|
|
3
|
+
v-model="selectedValue"
|
|
4
|
+
:filterable="filterable"
|
|
5
|
+
remote-show-suffix
|
|
6
|
+
:loading="loading"
|
|
7
|
+
:remote="true"
|
|
8
|
+
:remote-method="handleRemoteMethod"
|
|
9
|
+
:size="size"
|
|
10
|
+
@visible-change="handleVisibleChange"
|
|
11
|
+
>
|
|
12
|
+
<el-option
|
|
13
|
+
v-for="item in visibleData"
|
|
14
|
+
:key="item[valueKey]"
|
|
15
|
+
:label="item[labelKey]"
|
|
16
|
+
:value="item[valueKey]"
|
|
17
|
+
/>
|
|
18
|
+
</el-select>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
export default {
|
|
23
|
+
name: 'lazyLoadSelect',
|
|
24
|
+
props: {
|
|
25
|
+
data: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: () => [],
|
|
28
|
+
},
|
|
29
|
+
value: {
|
|
30
|
+
type: [String, Number, Array],
|
|
31
|
+
default: '',
|
|
32
|
+
},
|
|
33
|
+
labelKey: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'label',
|
|
36
|
+
},
|
|
37
|
+
valueKey: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: 'value',
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 30,
|
|
44
|
+
},
|
|
45
|
+
filterable: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
selectedValue: this.value,
|
|
53
|
+
visibleData: [],
|
|
54
|
+
loading: false,
|
|
55
|
+
filteredData: [],
|
|
56
|
+
searchQuery: '',
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
watch: {
|
|
60
|
+
value(newVal) {
|
|
61
|
+
this.selectedValue = newVal;
|
|
62
|
+
},
|
|
63
|
+
selectedValue(newVal) {
|
|
64
|
+
this.$emit('input', newVal);
|
|
65
|
+
},
|
|
66
|
+
data(newData) {
|
|
67
|
+
this.filteredData = newData;
|
|
68
|
+
this.updateVisibleData();
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
mounted() {
|
|
72
|
+
this.filteredData = this.data;
|
|
73
|
+
this.updateVisibleData();
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
// 更新可见数据
|
|
77
|
+
updateVisibleData() {
|
|
78
|
+
this.visibleData = this.filteredData.slice(0, this.size);
|
|
79
|
+
},
|
|
80
|
+
// 处理远程搜索
|
|
81
|
+
handleRemoteMethod(query) {
|
|
82
|
+
this.searchQuery = query;
|
|
83
|
+
this.filterData();
|
|
84
|
+
this.updateVisibleData();
|
|
85
|
+
},
|
|
86
|
+
// 过滤数据
|
|
87
|
+
filterData() {
|
|
88
|
+
if (!this.searchQuery) {
|
|
89
|
+
this.filteredData = this.data;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const query = this.searchQuery.toLowerCase();
|
|
93
|
+
this.filteredData = this.data.filter((item) => {
|
|
94
|
+
const label = String(item[this.labelKey]).toLowerCase();
|
|
95
|
+
const value = String(item[this.valueKey]).toLowerCase();
|
|
96
|
+
return label.includes(query) || value.includes(query);
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
// 处理下拉框显示/隐藏
|
|
100
|
+
handleVisibleChange(isVisible) {
|
|
101
|
+
if (isVisible) {
|
|
102
|
+
this.updateVisibleData();
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
</script>
|