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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: calc(100vh - 30px)">
|
|
3
|
+
<model-index uuid="1602112913960386560" ref="oTable" @initComponents="initComponents" @toolbarBtnClick="toolbarBtnClick"/>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
|
|
10
|
+
import ModelIndex from "@/components/table/model/model-index.vue";
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'olTable',
|
|
14
|
+
components: {ModelIndex},
|
|
15
|
+
data() {
|
|
16
|
+
return {
|
|
17
|
+
width: 0,
|
|
18
|
+
height: 0,
|
|
19
|
+
top: 0,
|
|
20
|
+
left: 0,
|
|
21
|
+
test:'',
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
methods: {
|
|
26
|
+
initComponents(props) {
|
|
27
|
+
console.log("initComponents22" + props);
|
|
28
|
+
},
|
|
29
|
+
toolbarBtnClick(code) {
|
|
30
|
+
console.log("ss", code)
|
|
31
|
+
},
|
|
32
|
+
resize(newRect) {
|
|
33
|
+
this.width = newRect.width;
|
|
34
|
+
this.height = newRect.height;
|
|
35
|
+
this.top = newRect.top;
|
|
36
|
+
this.left = newRect.left;
|
|
37
|
+
}
|
|
38
|
+
},created() {
|
|
39
|
+
let oTable = this.$refs.oTable;
|
|
40
|
+
console.log(oTable)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: calc(100vh - 30px)">
|
|
3
|
+
<!-- <olTable uuid="1602112913960386560" theme="t1" ref="vTable">
|
|
4
|
+
|
|
5
|
+
</olTable>-->
|
|
6
|
+
<vxe-grid v-bind="bind" :data="data"></vxe-grid>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
data: [
|
|
17
|
+
{
|
|
18
|
+
"name": "芋道源码",
|
|
19
|
+
"parentId": 0,
|
|
20
|
+
"sort": 0,
|
|
21
|
+
"leaderUserId": 1,
|
|
22
|
+
"phone": "15888888888",
|
|
23
|
+
"email": "ry@qq.com",
|
|
24
|
+
"status": 0,
|
|
25
|
+
"id": 100,
|
|
26
|
+
"createTime": 1609837427000
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "深圳总公司",
|
|
30
|
+
"parentId": 100,
|
|
31
|
+
"sort": 1,
|
|
32
|
+
"leaderUserId": 104,
|
|
33
|
+
"phone": "15888888888",
|
|
34
|
+
"email": "ry@qq.com",
|
|
35
|
+
"status": 0,
|
|
36
|
+
"id": 101,
|
|
37
|
+
"createTime": 1609837427000
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "研发部门",
|
|
41
|
+
"parentId": 101,
|
|
42
|
+
"sort": 1,
|
|
43
|
+
"leaderUserId": 104,
|
|
44
|
+
"phone": "15888888888",
|
|
45
|
+
"email": "ry@qq.com",
|
|
46
|
+
"status": 0,
|
|
47
|
+
"id": 103,
|
|
48
|
+
"createTime": 1609837427000
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "市场部门",
|
|
52
|
+
"parentId": 102,
|
|
53
|
+
"sort": 1,
|
|
54
|
+
"leaderUserId": null,
|
|
55
|
+
"phone": "15888888888",
|
|
56
|
+
"email": "ry@qq.com",
|
|
57
|
+
"status": 0,
|
|
58
|
+
"id": 108,
|
|
59
|
+
"createTime": 1609837427000
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "新部门",
|
|
63
|
+
"parentId": 0,
|
|
64
|
+
"sort": 1,
|
|
65
|
+
"leaderUserId": null,
|
|
66
|
+
"phone": null,
|
|
67
|
+
"email": null,
|
|
68
|
+
"status": 0,
|
|
69
|
+
"id": 110,
|
|
70
|
+
"createTime": 1645620390000
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "顶级部门",
|
|
74
|
+
"parentId": 0,
|
|
75
|
+
"sort": 1,
|
|
76
|
+
"leaderUserId": null,
|
|
77
|
+
"phone": null,
|
|
78
|
+
"email": null,
|
|
79
|
+
"status": 0,
|
|
80
|
+
"id": 111,
|
|
81
|
+
"createTime": 1646660690000
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "长沙分公司",
|
|
85
|
+
"parentId": 100,
|
|
86
|
+
"sort": 2,
|
|
87
|
+
"leaderUserId": null,
|
|
88
|
+
"phone": "15888888888",
|
|
89
|
+
"email": "ry@qq.com",
|
|
90
|
+
"status": 0,
|
|
91
|
+
"id": 102,
|
|
92
|
+
"createTime": 1609837427000
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "市场部门",
|
|
96
|
+
"parentId": 101,
|
|
97
|
+
"sort": 2,
|
|
98
|
+
"leaderUserId": null,
|
|
99
|
+
"phone": "15888888888",
|
|
100
|
+
"email": "ry@qq.com",
|
|
101
|
+
"status": 0,
|
|
102
|
+
"id": 104,
|
|
103
|
+
"createTime": 1609837427000
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "财务部门",
|
|
107
|
+
"parentId": 102,
|
|
108
|
+
"sort": 2,
|
|
109
|
+
"leaderUserId": null,
|
|
110
|
+
"phone": "15888888888",
|
|
111
|
+
"email": "ry@qq.com",
|
|
112
|
+
"status": 0,
|
|
113
|
+
"id": 109,
|
|
114
|
+
"createTime": 1609837427000
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "测试部门",
|
|
118
|
+
"parentId": 101,
|
|
119
|
+
"sort": 3,
|
|
120
|
+
"leaderUserId": null,
|
|
121
|
+
"phone": "15888888888",
|
|
122
|
+
"email": "ry@qq.com",
|
|
123
|
+
"status": 0,
|
|
124
|
+
"id": 105,
|
|
125
|
+
"createTime": 1609837427000
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "财务部门",
|
|
129
|
+
"parentId": 101,
|
|
130
|
+
"sort": 4,
|
|
131
|
+
"leaderUserId": 103,
|
|
132
|
+
"phone": "15888888888",
|
|
133
|
+
"email": "ry@qq.com",
|
|
134
|
+
"status": 0,
|
|
135
|
+
"id": 106,
|
|
136
|
+
"createTime": 1609837427000
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "运维部门",
|
|
140
|
+
"parentId": 101,
|
|
141
|
+
"sort": 5,
|
|
142
|
+
"leaderUserId": null,
|
|
143
|
+
"phone": "15888888888",
|
|
144
|
+
"email": "ry@qq.com",
|
|
145
|
+
"status": 0,
|
|
146
|
+
"id": 107,
|
|
147
|
+
"createTime": 1609837427000
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
bind: {
|
|
151
|
+
border: true,
|
|
152
|
+
height: 300,
|
|
153
|
+
align: null,
|
|
154
|
+
columnConfig: {
|
|
155
|
+
resizable: true
|
|
156
|
+
},
|
|
157
|
+
treeConfig: {
|
|
158
|
+
transform: true,
|
|
159
|
+
rowField: 'id', parentField: 'parentId'
|
|
160
|
+
},
|
|
161
|
+
columns: [
|
|
162
|
+
{
|
|
163
|
+
field: 'id',
|
|
164
|
+
treeNode:true,
|
|
165
|
+
title: 'id',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
field: 'name',
|
|
169
|
+
title: '部门名称',
|
|
170
|
+
}, {
|
|
171
|
+
field: 'leader',
|
|
172
|
+
title: '负责人',
|
|
173
|
+
}, {
|
|
174
|
+
field: 'sort',
|
|
175
|
+
title: '排序',
|
|
176
|
+
}, {
|
|
177
|
+
field: 'status',
|
|
178
|
+
title: 'status',
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
toolbarConfig: {
|
|
182
|
+
slots: {
|
|
183
|
+
buttons: 'toolbar_buttons'
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
methods: {
|
|
191
|
+
resize(newRect) {
|
|
192
|
+
this.width = newRect.width;
|
|
193
|
+
this.height = newRect.height;
|
|
194
|
+
this.top = newRect.top;
|
|
195
|
+
this.left = newRect.left;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
v-model="dialogVisible"
|
|
4
|
+
style="height: 100vh;width:100%"
|
|
5
|
+
fullscreen destroy-on-close>
|
|
6
|
+
<model-index :http="http" v-if="uuid" :uuid="uuid"/>
|
|
7
|
+
</el-dialog>
|
|
8
|
+
</template>
|
|
9
|
+
<script>
|
|
10
|
+
|
|
11
|
+
import ModelIndex from "@/components/table/model/model-index.vue";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'preview',
|
|
15
|
+
components: {ModelIndex},
|
|
16
|
+
inject: ['http'],
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
dialogVisible: false,
|
|
20
|
+
uuid:'',
|
|
21
|
+
}
|
|
22
|
+
}, methods: {
|
|
23
|
+
init(uuid){
|
|
24
|
+
this.dialogVisible = true;
|
|
25
|
+
this.uuid = uuid
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
代码生成时间:
|
|
3
|
+
2024-04-30 09:43:03
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<el-form ref="formRef" :model="$attrs.formData" :rules="rules" label-width="100px" class="el-form-globals"
|
|
8
|
+
labelAlign="label-right-align" @submit.prevent>
|
|
9
|
+
<el-row>
|
|
10
|
+
<el-col :span="8">
|
|
11
|
+
<el-form-item label="树配置名称" prop="configName">
|
|
12
|
+
<el-input v-model="$attrs.formData.configName" clearable/>
|
|
13
|
+
</el-form-item>
|
|
14
|
+
</el-col>
|
|
15
|
+
|
|
16
|
+
<el-col :span="8">
|
|
17
|
+
<el-form-item label="数据源" prop="dbName">
|
|
18
|
+
<olDictTag v-model="$attrs.formData.dbName" :clearable="false" code="db_name"/>
|
|
19
|
+
</el-form-item>
|
|
20
|
+
</el-col>
|
|
21
|
+
</el-row>
|
|
22
|
+
<el-row>
|
|
23
|
+
<el-col :span="8">
|
|
24
|
+
<el-form-item label="转换驼峰" prop="hump">
|
|
25
|
+
<olDictTag v-model="$attrs.formData.hump" type="radio" border code="converting_hump"/>
|
|
26
|
+
</el-form-item>
|
|
27
|
+
</el-col>
|
|
28
|
+
<el-col :span="8">
|
|
29
|
+
<el-form-item label="数据源类型" prop="dataSource">
|
|
30
|
+
<olDictTag v-model="$attrs.formData.dataSource" type="radio" border code="tree_data_type"/>
|
|
31
|
+
</el-form-item>
|
|
32
|
+
</el-col>
|
|
33
|
+
</el-row>
|
|
34
|
+
<el-form-item label="查询表格" prop="table" v-if="$attrs.formData.dataSource == 0">
|
|
35
|
+
<config-core-table ref="configTable"/>
|
|
36
|
+
</el-form-item>
|
|
37
|
+
<el-form-item label="执行SQL" prop="executeSql" v-if="$attrs.formData.dataSource != 2">
|
|
38
|
+
<el-input type="textarea" v-model="$attrs.formData.executeSql" rows="3"></el-input>
|
|
39
|
+
</el-form-item>
|
|
40
|
+
<el-form-item label="where条件" prop="executeWhere" v-if="$attrs.formData.dataSource != 2">
|
|
41
|
+
<el-input v-model="$attrs.formData.executeWhere" type="text" clearable></el-input>
|
|
42
|
+
</el-form-item>
|
|
43
|
+
<el-form-item label="排序" prop="orderBy" v-if="$attrs.formData.dataSource != 2">
|
|
44
|
+
<el-input v-model="$attrs.formData.orderBy" type="text" clearable></el-input>
|
|
45
|
+
</el-form-item>
|
|
46
|
+
<el-form-item label="默认参数" prop="parameterDefault" v-if="$attrs.formData.dataSource != 2">
|
|
47
|
+
<el-input v-model="$attrs.formData.parameterDefault" type="text" clearable></el-input>
|
|
48
|
+
</el-form-item>
|
|
49
|
+
<el-form-item label="API" prop="api" v-if="$attrs.formData.dataSource == 2">
|
|
50
|
+
<el-input v-model="$attrs.formData.api" type="text" clearable></el-input>
|
|
51
|
+
</el-form-item>
|
|
52
|
+
<el-button type="primary" @click="$emit('syncTable')">同步预览数据</el-button>
|
|
53
|
+
<el-button type="primary" status="success"
|
|
54
|
+
@click="$refs.configTable.setFieldConfig(true)">字段配置
|
|
55
|
+
</el-button>
|
|
56
|
+
</el-form>
|
|
57
|
+
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script>
|
|
61
|
+
import ConfigCoreTable from "@/views/tree/components/config-core-table.vue";
|
|
62
|
+
|
|
63
|
+
export default {
|
|
64
|
+
name: 'configCodeData',
|
|
65
|
+
components: {ConfigCoreTable},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
rules: {
|
|
69
|
+
configName: [
|
|
70
|
+
{required: true, message: '请输入配置名称', trigger: 'blur'},
|
|
71
|
+
],
|
|
72
|
+
executeSql: [
|
|
73
|
+
{required: true, message: '请输入执行SQL', trigger: 'blur'},
|
|
74
|
+
],
|
|
75
|
+
api: [
|
|
76
|
+
{required: true, message: '请输入API', trigger: 'blur'},
|
|
77
|
+
],
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<style lang="scss" scoped>
|
|
85
|
+
</style>
|