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,201 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-dialog
|
|
4
|
+
class="online-development-table-add-or-edit"
|
|
5
|
+
v-model="dialogVisible"
|
|
6
|
+
fullscreen
|
|
7
|
+
:show-close="false"
|
|
8
|
+
:showHeader="false"
|
|
9
|
+
:close-on-press-escape="false"
|
|
10
|
+
:close-on-click-modal="false"
|
|
11
|
+
:before-close="handleClose">
|
|
12
|
+
<div class="left">
|
|
13
|
+
<el-form :model="addOrEditRootData.form" label-width="80px">
|
|
14
|
+
<el-form-item label="配置名称" prop="configName" :span="24">
|
|
15
|
+
<el-input v-model="addOrEditRootData.form.configName"></el-input>
|
|
16
|
+
</el-form-item>
|
|
17
|
+
<el-form-item label="主题模板" prop="theme" :span="24">
|
|
18
|
+
<ol-dict-tag code="theme_model" v-model="addOrEditRootData.form.theme"></ol-dict-tag>
|
|
19
|
+
</el-form-item>
|
|
20
|
+
<el-form-item label="数据源" prop="theme" :span="24">
|
|
21
|
+
<ol-dict-tag code="db_name" v-model="addOrEditRootData.form.dbName"></ol-dict-tag>
|
|
22
|
+
<!-- <olDictTag code="online,system_data_source,database_chinese,db_name" v-model="addOrEditRootData.form.dbName"></olDictTag>-->
|
|
23
|
+
</el-form-item>
|
|
24
|
+
<el-form-item label="树uuid" prop="treeUuid" :span="24" v-if="addOrEditRootData.form.theme==7">
|
|
25
|
+
<ol-dict-tag v-model="addOrEditRootData.form.treeUuid" code="online,tree_config,config_name,uuid"
|
|
26
|
+
:clearable="false"
|
|
27
|
+
:whereAnd="whereAnd" style="margin-bottom: 20px"/>
|
|
28
|
+
</el-form-item>
|
|
29
|
+
<el-form-item label="搜索占行"
|
|
30
|
+
v-if="addOrEditRootData.form.theme == 3|| addOrEditRootData.form.theme == 5 || addOrEditRootData.form.theme == 6"
|
|
31
|
+
prop="searchRow" :span="24">
|
|
32
|
+
<ol-dict-tag code="pubilc_yes_no" v-model="addOrEditRootData.form.searchRow"
|
|
33
|
+
:clearable="false"></ol-dict-tag>
|
|
34
|
+
</el-form-item>
|
|
35
|
+
</el-form>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="right">
|
|
39
|
+
<div style="width: 100%;line-height: 50px;border-bottom: 1px solid #d1d1d1">
|
|
40
|
+
<vxe-button status="primary" @click="save(false)">{{
|
|
41
|
+
addOrEditRootData.disabled ? '保存' : '更新'
|
|
42
|
+
}}
|
|
43
|
+
</vxe-button>
|
|
44
|
+
<vxe-button status="primary" @click="save(true)">{{
|
|
45
|
+
addOrEditRootData.disabled ? '保存并关闭' : '更新并关闭'
|
|
46
|
+
}}
|
|
47
|
+
</vxe-button>
|
|
48
|
+
<vxe-button @click="handleClose(true)">取消</vxe-button>
|
|
49
|
+
</div>
|
|
50
|
+
<div style="width: 100%;height: calc(100% - 71px);padding: 10px">
|
|
51
|
+
<theme-model @initConfig="initConfig" ref="theme" v-bind="addOrEditRootData.form"
|
|
52
|
+
@emits="emits"></theme-model>
|
|
53
|
+
<ol-component ref="vComponent" @emits="emits" v-if="configShow"/>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</el-dialog>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
<script>
|
|
60
|
+
import ThemeModel from "@/views/table/add-or-edit/themeModel/index.vue";
|
|
61
|
+
import {get, post, put} from "@/utils/http/httpUtils";
|
|
62
|
+
import object from "@/utils/object";
|
|
63
|
+
import OlComponent from "@/components/v-component/index.vue";
|
|
64
|
+
|
|
65
|
+
export default {
|
|
66
|
+
name: 'add-or-edit',
|
|
67
|
+
components: {OlComponent, ThemeModel},
|
|
68
|
+
inject: ['http'],
|
|
69
|
+
provide() {
|
|
70
|
+
return {
|
|
71
|
+
addOrEditRootData: this.addOrEditRootData
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
configShow: false,
|
|
77
|
+
dialogVisible: false,
|
|
78
|
+
whereAnd: [{
|
|
79
|
+
key: 'deleted',
|
|
80
|
+
value: 0
|
|
81
|
+
}],
|
|
82
|
+
addOrEditRootData: {
|
|
83
|
+
form: {
|
|
84
|
+
configName: "",
|
|
85
|
+
theme: undefined,
|
|
86
|
+
dbName: '',
|
|
87
|
+
searchRow: '0',
|
|
88
|
+
treeUuid: '',
|
|
89
|
+
},
|
|
90
|
+
key: new Date().getTime(),
|
|
91
|
+
showEditConfig: true,
|
|
92
|
+
disabled: true,
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
}, methods: {
|
|
96
|
+
handleClose(f) {
|
|
97
|
+
this.dialogVisible = false;
|
|
98
|
+
if (f == true) {
|
|
99
|
+
this.$emit("emits", {m: 'query'});
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
init(o) {
|
|
103
|
+
let form = {
|
|
104
|
+
configName: "",
|
|
105
|
+
theme: '1',
|
|
106
|
+
dbName: '',
|
|
107
|
+
searchRow: '0',
|
|
108
|
+
uuid: undefined,
|
|
109
|
+
treeUuid: ''
|
|
110
|
+
}
|
|
111
|
+
this.dialogVisible = true;
|
|
112
|
+
this.addOrEditRootData.disabled = o == undefined ? true : false;
|
|
113
|
+
if (o != undefined) {
|
|
114
|
+
let uuid = o.uuid ? o.uuid : o.UUID
|
|
115
|
+
console.log(o,uuid)
|
|
116
|
+
this.$nextTick(() => {
|
|
117
|
+
get(this.http, "online/tableMain/getOne", {uuid: uuid, deleted: 0}, undefined, true).then((data) => {
|
|
118
|
+
for (let key of Object.keys(form)) {
|
|
119
|
+
form[key] = data[key];
|
|
120
|
+
}
|
|
121
|
+
this.addOrEditRootData.form = form;
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
} else {
|
|
125
|
+
this.addOrEditRootData.form = form;
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
message(f, res) {
|
|
129
|
+
if (this.addOrEditRootData.disabled) {
|
|
130
|
+
this.addOrEditRootData.form = res.data;
|
|
131
|
+
this.addOrEditRootData.disabled = false;
|
|
132
|
+
}
|
|
133
|
+
if (f) {
|
|
134
|
+
this.handleClose(f);
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
save(f) {
|
|
138
|
+
let form = object.clone(this.addOrEditRootData.form);
|
|
139
|
+
form.parendId = form.id;
|
|
140
|
+
if (this.addOrEditRootData.disabled) {
|
|
141
|
+
post(this.http, "/online/tableMain/save", form, undefined, false).then(res => {
|
|
142
|
+
this.message(f, res);
|
|
143
|
+
})
|
|
144
|
+
} else {
|
|
145
|
+
delete form.version;
|
|
146
|
+
put(this.http, "/online/tableMain/edit", form, undefined, false).then(res => {
|
|
147
|
+
this.message(f, res);
|
|
148
|
+
})
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
},
|
|
152
|
+
initConfig(v) {
|
|
153
|
+
this.configShow = true;
|
|
154
|
+
this.$nextTick(() => {
|
|
155
|
+
this.$refs.vComponent.setComponent('views/table/add-or-edit/config/index.vue', 'init', {
|
|
156
|
+
o: v,
|
|
157
|
+
v: this.addOrEditRootData.form
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
},
|
|
161
|
+
emits({m, v}) {
|
|
162
|
+
if (m == "configClose") {
|
|
163
|
+
if (v) {
|
|
164
|
+
this.$refs.theme.refresh(v);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</script>
|
|
171
|
+
<style lang="less" scoped>
|
|
172
|
+
|
|
173
|
+
:deep(.online-development-table-add-or-edit) {
|
|
174
|
+
> header:first-of-type {
|
|
175
|
+
display: none !important;;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
> .el-dialog__body:first-of-type {
|
|
179
|
+
height: 100% !important;
|
|
180
|
+
padding: 0 !important;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.online-development-table-add-or-edit {
|
|
185
|
+
.left {
|
|
186
|
+
width: 230px !important;
|
|
187
|
+
height: 100% !important;
|
|
188
|
+
position: relative !important;
|
|
189
|
+
float: left !important;
|
|
190
|
+
border-right: 1px solid #d1d1d1 !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.right {
|
|
194
|
+
width: calc(100% - 251px) !important;
|
|
195
|
+
height: 100% !important;
|
|
196
|
+
position: relative !important;
|
|
197
|
+
float: left !important;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%;width: 100%">
|
|
3
|
+
<Model :temp="true" v-bind="$attrs" v-if="$attrs.theme ==1" theme="t1" ref="theme"></Model>
|
|
4
|
+
<top-bottom :temp="true" v-bind="$attrs"
|
|
5
|
+
v-else-if="$attrs.theme ==2"
|
|
6
|
+
ref="theme"></top-bottom>
|
|
7
|
+
<left-right :temp="true" v-bind="$attrs"
|
|
8
|
+
v-else-if="$attrs.theme ==3" ref="theme"></left-right>
|
|
9
|
+
<Top1Bottom2 :temp="true" v-bind="$attrs"
|
|
10
|
+
v-else-if="$attrs.theme ==4"
|
|
11
|
+
ref="theme"></Top1Bottom2>
|
|
12
|
+
<Top2Bottom1 :temp="true" v-bind="$attrs"
|
|
13
|
+
v-else-if="$attrs.theme ==5" ref="theme"></Top2Bottom1>
|
|
14
|
+
<Top2Bottom2 :temp="true" v-bind="$attrs"
|
|
15
|
+
v-else-if="$attrs.theme ==6" ref="theme"></Top2Bottom2>
|
|
16
|
+
<left-tree-right-table v-bind="$attrs" v-else-if="$attrs.theme ==7"
|
|
17
|
+
ref="theme"></left-tree-right-table>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
<script>
|
|
21
|
+
|
|
22
|
+
import Model from "@/views/table/add-or-edit/themeModel/init-model-table.vue";
|
|
23
|
+
import TopBottom from "@/views/table/add-or-edit/themeModel/top-bottom";
|
|
24
|
+
import Top1Bottom2 from "@/views/table/add-or-edit/themeModel/top-1-bottom-2";
|
|
25
|
+
import Top2Bottom1 from "@/views/table/add-or-edit/themeModel/top-2-bottom-1";
|
|
26
|
+
import Top2Bottom2 from "@/views/table/add-or-edit/themeModel/top-2-bottom-2";
|
|
27
|
+
import leftRight from "@/views/table/add-or-edit/themeModel/left-right";
|
|
28
|
+
import LeftTreeRightTable from "@/views/table/add-or-edit/themeModel/left-tree-right-table.vue";
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'themeModel',
|
|
32
|
+
components: {Model, TopBottom, Top1Bottom2, Top2Bottom1, Top2Bottom2, leftRight, LeftTreeRightTable},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
table: {},
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
provide() {
|
|
39
|
+
return {
|
|
40
|
+
tableAll: this.table //传入一个响应式对象
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
refresh(v) {
|
|
45
|
+
this.$refs.theme.init(v);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style scoped>
|
|
52
|
+
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style=" position: relative;height: 100%;width: 100%">
|
|
3
|
+
<init-model :temp="temp" :table-name="theme" @initConfig="$emit('initConfig',theme)"></init-model>
|
|
4
|
+
<olTable v-bind="$attrs" ref="olTable" v-if="!temp" :uuid="uuid" :theme="theme"/>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
|
|
10
|
+
import InitModel from "./init-model"
|
|
11
|
+
import {get} from "@/utils/http/httpUtils";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
components: {InitModel},
|
|
15
|
+
name: "initModelTable",
|
|
16
|
+
inject: ['tableAll','http'],
|
|
17
|
+
props: {
|
|
18
|
+
uuid: {},
|
|
19
|
+
theme: {default: 't1'}
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
temp: true
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
init() {
|
|
28
|
+
this.temp = true;
|
|
29
|
+
if (!this.uuid) {
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
get(this.http,'/online/tableConfig/count', {uuid: this.uuid, theme: this.theme}).then(data => {
|
|
33
|
+
this.temp = data == 0;
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
watch: {
|
|
38
|
+
'uuid'() {
|
|
39
|
+
this.init();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
created() {
|
|
43
|
+
this.init();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
<style scoped>
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="main" v-if="temp">
|
|
3
|
+
<div class="tableName">{{ tableName }}</div>
|
|
4
|
+
<div class="back">
|
|
5
|
+
<div v-if="this.addOrEditRootData.disabled" class="disabled">
|
|
6
|
+
第一次请保存后再进行配置
|
|
7
|
+
</div>
|
|
8
|
+
<div v-else @click="$emit('initConfig')">
|
|
9
|
+
开始配置
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="editConfig" @click="$emit('initConfig')" v-else>编辑配置 - {{ tableName }}</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name:'initModel',
|
|
20
|
+
props: {
|
|
21
|
+
tableName: {type: String, default: 't1', required: true},
|
|
22
|
+
temp: {default:false}
|
|
23
|
+
},
|
|
24
|
+
inject: ['addOrEditRootData'],
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
<style lang="less" scoped>
|
|
28
|
+
|
|
29
|
+
.editConfig {
|
|
30
|
+
z-index: 100;
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: 40%;
|
|
33
|
+
top: 40%;
|
|
34
|
+
color: #fff;
|
|
35
|
+
background-color: #00c260;
|
|
36
|
+
padding: 40px 80px;
|
|
37
|
+
border-radius: 10px;
|
|
38
|
+
font-size: 28px;
|
|
39
|
+
user-select: none;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
.main {
|
|
43
|
+
height: 100%;
|
|
44
|
+
min-width: 400px;
|
|
45
|
+
min-height: 200px;
|
|
46
|
+
|
|
47
|
+
.tableName {
|
|
48
|
+
text-align: left;
|
|
49
|
+
left: 10px;
|
|
50
|
+
top: 10px;
|
|
51
|
+
position: relative;
|
|
52
|
+
height: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.disabled {
|
|
56
|
+
background-color: aliceblue !important;
|
|
57
|
+
cursor: no-drop !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.back {
|
|
61
|
+
background-color: #cecbcb;
|
|
62
|
+
height: 100%;
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
|
|
67
|
+
div {
|
|
68
|
+
background-color: #00c260;
|
|
69
|
+
padding: 40px 80px;
|
|
70
|
+
border-radius: 10px;
|
|
71
|
+
font-size: 28px;
|
|
72
|
+
border: 1px solid #fff;
|
|
73
|
+
user-select: none;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<splitpanes-theme-model ref="splitpanesModel"
|
|
3
|
+
:horizontal="false" v-bind="$attrs"/>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script scope>
|
|
7
|
+
import {olTableSearchModelMixins} from "@/views/table/add-or-edit/themeModel/olTableSearchModelMixins";
|
|
8
|
+
import SplitpanesThemeModel from "@/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'leftRight',
|
|
12
|
+
components: {SplitpanesThemeModel},
|
|
13
|
+
mixins: [olTableSearchModelMixins]
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
<style scoped>
|
|
17
|
+
.top-bottom {
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.olTable {
|
|
22
|
+
height: calc(100% - 10px);
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<el-card class="tree-left">
|
|
4
|
+
<ol-tree v-if="show" :uuid="uuid"></ol-tree>
|
|
5
|
+
</el-card>
|
|
6
|
+
<div class="table-right">
|
|
7
|
+
<initModelTable ref="t1" v-bind="$attrs" theme="t1"/>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<script scope>
|
|
12
|
+
import OlTree from "@/components/tree/index.vue";
|
|
13
|
+
import initModelTable from "@/views/table/add-or-edit/themeModel/init-model-table.vue";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'leftTreeRightTable',
|
|
17
|
+
components: {OlTree, initModelTable},
|
|
18
|
+
props: {
|
|
19
|
+
treeUuid: {}
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
uuid: '',
|
|
24
|
+
show: false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
watch: {
|
|
28
|
+
treeUuid: function () {
|
|
29
|
+
this.change()
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
init(v) {
|
|
34
|
+
if (this.$refs[v]) {
|
|
35
|
+
this.$refs[v].init()
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
change() {
|
|
39
|
+
this.uuid = this.treeUuid;
|
|
40
|
+
this.show = false;
|
|
41
|
+
this.$nextTick(() => {
|
|
42
|
+
this.show = true;
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
computed: {
|
|
47
|
+
getStyle() {
|
|
48
|
+
let px = Math.ceil(this.formConfig.items.length / 4) * 45;
|
|
49
|
+
let style = 'height: calc(100% - ' + px + 'px)'
|
|
50
|
+
return style
|
|
51
|
+
}
|
|
52
|
+
}, created() {
|
|
53
|
+
this.$nextTick(() => {
|
|
54
|
+
this.change();
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
<style lang="less" scoped>
|
|
60
|
+
.table-right {
|
|
61
|
+
position: relative;
|
|
62
|
+
height: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.tree-left {
|
|
66
|
+
height: 100%;
|
|
67
|
+
position: relative;
|
|
68
|
+
float: left;
|
|
69
|
+
margin-right: 10px;
|
|
70
|
+
z-index: 100;
|
|
71
|
+
/deep/ .el-card__body{
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import initModelTable from "@/views/table/add-or-edit/themeModel/init-model-table.vue";
|
|
2
|
+
import {Pane, Splitpanes} from "splitpanes";
|
|
3
|
+
|
|
4
|
+
export const olTableSearchModelMixins = {
|
|
5
|
+
|
|
6
|
+
components: {initModelTable, Splitpanes, Pane}, data() {
|
|
7
|
+
return {
|
|
8
|
+
formConfig: undefined, customerForm: undefined, paneSize: {
|
|
9
|
+
minSize: 20, maxSize: 80
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}, methods: {
|
|
13
|
+
init(v) {
|
|
14
|
+
if(this.$refs[v]){
|
|
15
|
+
this.$refs[v].init()
|
|
16
|
+
}else {
|
|
17
|
+
if(this.$refs.splitpanesModel && this.$refs.splitpanesModel.$refs[v]){
|
|
18
|
+
this.$refs.splitpanesModel.$refs[v].init()
|
|
19
|
+
}else{
|
|
20
|
+
this.$refs.splitpanesModel1.$refs[v].init()
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}, initOk({theme, table, customerForm}) {
|
|
25
|
+
if (this.searchRow == '1' && theme == 't1') {
|
|
26
|
+
customerForm();//执行自定义表单,这个方法会隐藏table的表单,隐藏搜索按钮
|
|
27
|
+
}
|
|
28
|
+
if (theme == 't1') {
|
|
29
|
+
this.formConfig = table.formConfig;//给原有的自定义搜索
|
|
30
|
+
this.customerForm = customerForm
|
|
31
|
+
}
|
|
32
|
+
}, doCustomerForm() {
|
|
33
|
+
if(this.customerForm){
|
|
34
|
+
this.customerForm(this.searchRow == '1')
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, watch: {
|
|
38
|
+
searchRow: function () {
|
|
39
|
+
this.doCustomerForm();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ol-table-search v-if="formConfig && searchRow == '1'" :formConfig="formConfig"></ol-table-search>
|
|
3
|
+
<splitpanes :style="formConfig ? getStyle :''" class="default-theme" :horizontal="horizontal" @resize="doResize"
|
|
4
|
+
:push-other-panes="false">
|
|
5
|
+
<pane style="background: transparent" :size="50" v-bind="paneSize">
|
|
6
|
+
<div :class="isLR ? 'left' :'top'">
|
|
7
|
+
<initModelTable :key="'theme1'" :ref="theme1" @initOk="initOk" v-bind="$attrs"
|
|
8
|
+
:theme="theme1"/>
|
|
9
|
+
</div>
|
|
10
|
+
</pane>
|
|
11
|
+
<pane style="background: transparent" v-bind="paneSize">
|
|
12
|
+
<div :class="isLR ? 'right' :'bottom'">
|
|
13
|
+
<initModelTable :key="'theme2'" :ref="theme2" v-bind="$attrs" :theme="theme2"/>
|
|
14
|
+
</div>
|
|
15
|
+
</pane>
|
|
16
|
+
</splitpanes>
|
|
17
|
+
</template>
|
|
18
|
+
<script scope>
|
|
19
|
+
import {olTableSearchModelMixins} from "@/views/table/add-or-edit/themeModel/olTableSearchModelMixins";
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'splitpanesThemeModel',
|
|
23
|
+
inject: ['addOrEditRootData'],
|
|
24
|
+
mixins: [olTableSearchModelMixins], props: {
|
|
25
|
+
theme1: {default: 't1'},
|
|
26
|
+
theme2: {default: 't2'},
|
|
27
|
+
searchRow: {default: '0'},
|
|
28
|
+
horizontal: {default: true},
|
|
29
|
+
isLR: {default: true},
|
|
30
|
+
paneSize: {default: {minSize: 20, maxSize: 80}}
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
getStyle() {
|
|
34
|
+
let px = Math.ceil(this.formConfig.items.length / 4) * 45;
|
|
35
|
+
let style = 'height: calc(100% - ' + px + 'px)'
|
|
36
|
+
return style
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
doResize($event) {
|
|
41
|
+
console.log($event)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
<style scoped>
|
|
48
|
+
@import "@/components/table/model/splitpanesModel.css";
|
|
49
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<splitpanes class="default-theme" horizontal :push-other-panes="false">
|
|
3
|
+
<pane style="background:transparent" :size="50" v-bind="paneSize">
|
|
4
|
+
<div class="olTable">
|
|
5
|
+
<initModelTable @emits="$emit('emits','t1')" v-bind="$attrs" ref="t1" theme="t1"/>
|
|
6
|
+
</div>
|
|
7
|
+
</pane>
|
|
8
|
+
<pane style="background:transparent;" v-bind="paneSize">
|
|
9
|
+
<splitpanes-theme-model theme1="t2" theme2="t3" @emits="$emit('emits',$event)" ref="splitpanesModel"
|
|
10
|
+
:horizontal="false" v-bind="$attrs"/>
|
|
11
|
+
</pane>
|
|
12
|
+
</splitpanes>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script scope>
|
|
16
|
+
import {olTableSearchModelMixins} from "@/views/table/add-or-edit/themeModel/olTableSearchModelMixins";
|
|
17
|
+
import SplitpanesThemeModel from "@/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue";
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'top1Bottom2',
|
|
21
|
+
components: {SplitpanesThemeModel},
|
|
22
|
+
mixins:[olTableSearchModelMixins]
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
<style scoped>
|
|
26
|
+
.olTable {
|
|
27
|
+
height: calc(100% - 10px);
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<splitpanes class="default-theme" horizontal :push-other-panes="false">
|
|
3
|
+
<pane style="background:transparent" :size="50" v-bind="paneSize">
|
|
4
|
+
<div class="top">
|
|
5
|
+
<splitpanes-theme-model ref="splitpanesModel"
|
|
6
|
+
:horizontal="false" v-bind="$attrs"/>
|
|
7
|
+
</div>
|
|
8
|
+
</pane>
|
|
9
|
+
<pane style="background:transparent;" v-bind="paneSize">
|
|
10
|
+
<initModelTable v-bind="$attrs" ref="t3" theme="t3"/>
|
|
11
|
+
</pane>
|
|
12
|
+
</splitpanes>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script scope>
|
|
16
|
+
import {olTableSearchModelMixins} from "@/views/table/add-or-edit/themeModel/olTableSearchModelMixins";
|
|
17
|
+
import SplitpanesThemeModel from "@/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue";
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'top2Bottom1',
|
|
21
|
+
components: {SplitpanesThemeModel},
|
|
22
|
+
mixins: [olTableSearchModelMixins]
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
<style scoped>
|
|
26
|
+
.top {
|
|
27
|
+
height: 100%;
|
|
28
|
+
padding-bottom: 10px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<splitpanes class="default-theme" horizontal :push-other-panes="false">
|
|
3
|
+
<pane style="background:transparent" :size="50" v-bind="paneSize">
|
|
4
|
+
<div class="top">
|
|
5
|
+
<splitpanes-theme-model @emits="$emit('emits',$event)" ref="splitpanesModel"
|
|
6
|
+
:horizontal="false" v-bind="$attrs"/>
|
|
7
|
+
</div>
|
|
8
|
+
</pane>
|
|
9
|
+
<pane style="background:transparent;" v-bind="paneSize">
|
|
10
|
+
<splitpanes-theme-model theme1="t3" theme2="t4" @emits="$emit('emits',$event)" ref="splitpanesModel1"
|
|
11
|
+
:horizontal="false" v-bind="$attrs"/>
|
|
12
|
+
</pane>
|
|
13
|
+
</splitpanes>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script scope>
|
|
17
|
+
import {olTableSearchModelMixins} from "@/views/table/add-or-edit/themeModel/olTableSearchModelMixins";
|
|
18
|
+
import SplitpanesThemeModel from "@/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue";
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'top2Bottom2',
|
|
22
|
+
components: {SplitpanesThemeModel},
|
|
23
|
+
mixins: [olTableSearchModelMixins]
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
<style scoped>
|
|
27
|
+
.top {
|
|
28
|
+
height: 100%;
|
|
29
|
+
padding-bottom: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<splitpanes-theme-model ref="splitpanesModel" v-bind="$attrs"/>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script scope>
|
|
6
|
+
import {olTableSearchModelMixins} from "@/views/table/add-or-edit/themeModel/olTableSearchModelMixins";
|
|
7
|
+
import SplitpanesThemeModel from "@/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: 'topBottom',
|
|
11
|
+
components: {SplitpanesThemeModel},
|
|
12
|
+
mixins: [olTableSearchModelMixins]
|
|
13
|
+
}
|
|
14
|
+
</script>
|