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,150 @@
|
|
|
1
|
+
<!-- 表格选取组件 -->
|
|
2
|
+
<!--使用示例如下:
|
|
3
|
+
@olTableSelectChange 选中数据后的回调方法
|
|
4
|
+
:config 配置下拉选择框的配置信息key和label对应的字段名字
|
|
5
|
+
注意:弹出的table是表格构建的配置出的表格,需要再该表格构建配置页面增加选中和关闭按钮的事件,否则无法正常使用
|
|
6
|
+
按钮名称 | 方法名 | 触发事件
|
|
7
|
+
选中 getSelectRowChange this.$emit('getSelectRowChangeButClick',this.getSelectRows())
|
|
8
|
+
关闭 getSelectRowClose this.$emit('getSelectRowCloseButClick','')
|
|
9
|
+
以下是例子:
|
|
10
|
+
测试下拉框:
|
|
11
|
+
<ol-table-select @olTableSelectChange="olTableSelectChange" :http="http" :uuid="'1900437634399076352'"
|
|
12
|
+
:config="{
|
|
13
|
+
key:'code', //选择的key字段名称
|
|
14
|
+
label:'name', //显示的字段,默认是name
|
|
15
|
+
labelIsAppendCode:true,//标签是否追加编码如:[1]男
|
|
16
|
+
}"></ol-table-select>
|
|
17
|
+
其他属性配置例子:
|
|
18
|
+
{
|
|
19
|
+
"olTableSelect":{
|
|
20
|
+
"uuid":"1901841070608990208",
|
|
21
|
+
"key":"id",
|
|
22
|
+
"label":"name",
|
|
23
|
+
"labelIsAppendCode":true,
|
|
24
|
+
"otherResult":"name:name,age:age,sex:sex"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
-->
|
|
28
|
+
<template>
|
|
29
|
+
<el-select v-model="selectValue.value" placeholder="请选择" @click="openTable"
|
|
30
|
+
@change="updateValue" @clear="clearedSelectValue"
|
|
31
|
+
clearable>
|
|
32
|
+
<el-option
|
|
33
|
+
v-for="item in selectDataList"
|
|
34
|
+
:key="item.value"
|
|
35
|
+
:label="item.label"
|
|
36
|
+
:value="item.value">
|
|
37
|
+
</el-option>
|
|
38
|
+
</el-select>
|
|
39
|
+
|
|
40
|
+
<ol-dialog-table ref="table" @emits="getSelectRowChangeButClick"/>
|
|
41
|
+
|
|
42
|
+
<!-- <el-dialog :close-on-click-modal="false"-->
|
|
43
|
+
<!-- :key="dialogKey"-->
|
|
44
|
+
<!-- top="5vh"-->
|
|
45
|
+
<!-- v-model="dialogVisible"-->
|
|
46
|
+
<!-- title="选择数据"-->
|
|
47
|
+
<!-- width="80%"-->
|
|
48
|
+
<!-- append-to-body>-->
|
|
49
|
+
<!-- <div style="height: 80vh; overflow-y: auto;">-->
|
|
50
|
+
<!-- <model-index ref="modelIndex" :http="http" :uuid="uuid" style="height: calc(100% - 50px)"/>-->
|
|
51
|
+
<!-- <el-row style="height: 50px" justify="center">-->
|
|
52
|
+
<!-- <el-button type="primary" @click="getSelectRowChangeButClick">确定</el-button>-->
|
|
53
|
+
<!-- <el-button @click="getSelectRowCloseButClick">关闭</el-button>-->
|
|
54
|
+
<!-- </el-row>-->
|
|
55
|
+
<!-- </div>-->
|
|
56
|
+
<!-- </el-dialog>-->
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script>
|
|
60
|
+
|
|
61
|
+
import ModelIndex from "@/components/table/model/model-index.vue";
|
|
62
|
+
import OlDialogTable from "@/components/ol-dialog-table.vue";
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: 'olTableSelect',
|
|
66
|
+
components: {
|
|
67
|
+
OlDialogTable,
|
|
68
|
+
ModelIndex,
|
|
69
|
+
},
|
|
70
|
+
props: {
|
|
71
|
+
defaultValue: {required: false,default: ''},
|
|
72
|
+
slotName: {required: false},
|
|
73
|
+
uuid: {required: true},
|
|
74
|
+
http: {},
|
|
75
|
+
config: {},
|
|
76
|
+
},
|
|
77
|
+
provide() {
|
|
78
|
+
return {
|
|
79
|
+
tableAll: this.table,
|
|
80
|
+
http: this.http
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
data() {
|
|
84
|
+
return {
|
|
85
|
+
selectDataList: [],
|
|
86
|
+
dialogVisible: false,
|
|
87
|
+
selectValue: {
|
|
88
|
+
value: this.defaultValue,
|
|
89
|
+
label: '',
|
|
90
|
+
data: [],
|
|
91
|
+
},
|
|
92
|
+
dialogKey: 1
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
//打开表格选择组件
|
|
97
|
+
openTable() {
|
|
98
|
+
this.dialogKey++;//每次打开对话框时,key值加1,防止对话框重复渲染
|
|
99
|
+
this.dialogVisible = true;//打开对话框
|
|
100
|
+
this.$refs.table.init({uuid: this.uuid,title: '选择数据'})
|
|
101
|
+
},
|
|
102
|
+
//选中数据按钮回调
|
|
103
|
+
getSelectRowChangeButClick({v}) {
|
|
104
|
+
// let rows = this.$refs.modelIndex.$refs.tableModel.getSelectRows()
|
|
105
|
+
let rows = v
|
|
106
|
+
if (rows.length === 0) {
|
|
107
|
+
this.clearedSelectValue()//清空下拉框的值
|
|
108
|
+
this.dialogVisible = false;//关闭对话框
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
for (const [index, row] of rows.entries()) {
|
|
112
|
+
//给下拉框选项添加
|
|
113
|
+
let label = this.config.labelIsAppendCode ? `[${row[this.config.key]}]${row[this.config.label]}` : row[this.config.label]
|
|
114
|
+
this.selectDataList.push({
|
|
115
|
+
label: label,
|
|
116
|
+
value: row[this.config.key],
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
//选中第一行数据,目前暂时支持单选
|
|
120
|
+
this.selectValue = {
|
|
121
|
+
value: rows[0][this.config.key],
|
|
122
|
+
label: rows[0][this.config.label],
|
|
123
|
+
data: rows[0]
|
|
124
|
+
}
|
|
125
|
+
this.updateValue()//更新下拉框的值
|
|
126
|
+
this.dialogVisible = false;//关闭对话框
|
|
127
|
+
this.$refs.table.cancelEvent()
|
|
128
|
+
},
|
|
129
|
+
//关闭选择数据按钮回调
|
|
130
|
+
getSelectRowCloseButClick() {
|
|
131
|
+
this.dialogVisible = false;
|
|
132
|
+
},
|
|
133
|
+
//更新父组件的值
|
|
134
|
+
updateValue() {
|
|
135
|
+
this.$emit('olTableSelectChange', this.slotName, this.selectValue);
|
|
136
|
+
},
|
|
137
|
+
clearedSelectValue() {
|
|
138
|
+
this.selectValue = {value: '', label: '', data: []};
|
|
139
|
+
this.updateValue();//更新下拉框的值
|
|
140
|
+
this.$refs.table.cancelEvent()
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
created() {
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<style scoped>
|
|
149
|
+
|
|
150
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {storeDict} from "@/store/dict";
|
|
3
|
+
import {storeDictType} from "@/store/dictType";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: 'pinaInit',
|
|
7
|
+
props: {
|
|
8
|
+
http: {}
|
|
9
|
+
}, methods: {
|
|
10
|
+
async init() {
|
|
11
|
+
await storeDict().init(this.props.http);
|
|
12
|
+
await storeDictType().init(this.props.http);
|
|
13
|
+
}
|
|
14
|
+
}, mounted() {
|
|
15
|
+
this.init()
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {Pane, Splitpanes} from "splitpanes";
|
|
2
|
+
import 'splitpanes/dist/splitpanes.css'
|
|
3
|
+
import {nextTick} from "vue";
|
|
4
|
+
|
|
5
|
+
export const modelMixins = {
|
|
6
|
+
components: {Splitpanes, Pane},
|
|
7
|
+
emits: ['initOk'],
|
|
8
|
+
props: {
|
|
9
|
+
paneSize: {
|
|
10
|
+
minSize: 20, maxSize: 80
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
formConfig: undefined,
|
|
16
|
+
}
|
|
17
|
+
}, methods: {
|
|
18
|
+
initOk(e) {
|
|
19
|
+
let {theme, table, customerForm} = e;
|
|
20
|
+
if (this.searchRow == '1' && theme == 't1') {
|
|
21
|
+
this.formConfig = table.formConfig;//给原有的自定义搜索
|
|
22
|
+
customerForm();//执行自定义表单,这个方法会隐藏table的表单,隐藏搜索按钮
|
|
23
|
+
this.customerForm = customerForm
|
|
24
|
+
}
|
|
25
|
+
this.$emit('initOk', e)
|
|
26
|
+
}, setDataSource(data) {
|
|
27
|
+
nextTick(() => {
|
|
28
|
+
let keys = Object.keys(data).filter(o => o.toString().length == 2 && o.toString().indexOf("t") == 0);
|
|
29
|
+
for (let key of keys) {
|
|
30
|
+
if (this.$refs[key]) {
|
|
31
|
+
this.$refs[key].setDataSource(data[key])
|
|
32
|
+
} else {
|
|
33
|
+
if (this.$refs.splitpanesModel.$refs[key]) {
|
|
34
|
+
this.$refs.splitpanesModel.$refs[key].setDataSource(data[key])
|
|
35
|
+
} else {
|
|
36
|
+
this.$refs.splitpanesModel1.$refs[key].setDataSource(data[key])
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<auto-height v-slot="{ height }"
|
|
3
|
+
v-loading="loading"
|
|
4
|
+
element-loading-text="正在初始化页面...">
|
|
5
|
+
<olTable v-bind="$attrs" ref="tableModel" v-if="theme == 1" :uuid="uuid" :init-data-source="false"
|
|
6
|
+
theme="t1">
|
|
7
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
8
|
+
<slot :name="item"></slot>
|
|
9
|
+
</template>
|
|
10
|
+
</olTable>
|
|
11
|
+
<otTopBottom v-bind="$attrs" ref="tableModel" v-if="theme == 2" :uuid="uuid">
|
|
12
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
13
|
+
<slot :name="item"></slot>
|
|
14
|
+
</template>
|
|
15
|
+
</otTopBottom>
|
|
16
|
+
<OtLeftRight :searchRow="searchRow" v-bind="$attrs" ref="tableModel" v-else-if="theme == 3" :uuid="uuid">
|
|
17
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
18
|
+
<slot :name="item"></slot>
|
|
19
|
+
</template>
|
|
20
|
+
</OtLeftRight>
|
|
21
|
+
<OtTop1Bottom2 v-bind="$attrs" ref="tableModel" v-else-if="theme == 4" :uuid="uuid">
|
|
22
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
23
|
+
<slot :name="item"></slot>
|
|
24
|
+
</template>
|
|
25
|
+
</OtTop1Bottom2>
|
|
26
|
+
<OtTop2Bottom1 :searchRow="searchRow" v-bind="$attrs" ref="tableModel" v-else-if="theme == 5" :uuid="uuid">
|
|
27
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
28
|
+
<slot :name="item"></slot>
|
|
29
|
+
</template>
|
|
30
|
+
</OtTop2Bottom1>
|
|
31
|
+
<otTop2Bottom2 :searchRow="searchRow" v-bind="$attrs" ref="tableModel" v-else-if="theme == 6" :uuid="uuid">
|
|
32
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
33
|
+
<slot :name="item"></slot>
|
|
34
|
+
</template>
|
|
35
|
+
</otTop2Bottom2>
|
|
36
|
+
<otLeftTreeRightTable v-bind="$attrs" ref="tableModel" v-else-if="theme == 7" :uuid="uuid" :treeUuid="treeUuid">
|
|
37
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
38
|
+
<slot :name="item"></slot>
|
|
39
|
+
</template>
|
|
40
|
+
</otLeftTreeRightTable>
|
|
41
|
+
</auto-height>
|
|
42
|
+
</template>
|
|
43
|
+
<script>
|
|
44
|
+
import OtTopBottom from "@/components/table/model/ot-top-bottom.vue";
|
|
45
|
+
import OtLeftRight from "@/components/table/model/ot-left-right.vue";
|
|
46
|
+
import {get} from "@/utils/http/httpUtils";
|
|
47
|
+
import OtTop1Bottom2 from "@/components/table/model/ot-top-1-bottom-2.vue";
|
|
48
|
+
import OtTop2Bottom1 from "@/components/table/model/ot-top-2-bottom-1.vue";
|
|
49
|
+
import OtTop2Bottom2 from "@/components/table/model/ot-top-2-bottom-2.vue";
|
|
50
|
+
import otLeftTreeRightTable from "@/components/table/model/ot-left-tree-right-table.vue";
|
|
51
|
+
import AutoHeight from "@/components/auto-height/index.vue";
|
|
52
|
+
import {decryptWithDecompress} from "@/utils/AESCRUDUtils";
|
|
53
|
+
export default {
|
|
54
|
+
name: 'modelIndex',
|
|
55
|
+
components: {
|
|
56
|
+
AutoHeight,
|
|
57
|
+
OtTopBottom, OtLeftRight, OtTop1Bottom2, OtTop2Bottom1, OtTop2Bottom2, otLeftTreeRightTable
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
60
|
+
uuid: {required: true},
|
|
61
|
+
http: {}
|
|
62
|
+
}, provide() {
|
|
63
|
+
return {
|
|
64
|
+
tableAll: this.table,
|
|
65
|
+
http: this.http
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
data() {
|
|
69
|
+
return {
|
|
70
|
+
cas: 0,
|
|
71
|
+
table: {},
|
|
72
|
+
theme: 0,
|
|
73
|
+
searchRow: 0,
|
|
74
|
+
treeUuid: '',
|
|
75
|
+
loading: true,
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
methods: {
|
|
79
|
+
initConfig() {
|
|
80
|
+
this.loading = true;
|
|
81
|
+
get(this.http, "/onlineAes/initAll", {uuid: this.uuid}).then(data => {
|
|
82
|
+
data = JSON.parse(decryptWithDecompress(data));
|
|
83
|
+
this.theme = data.theme;
|
|
84
|
+
this.searchRow = data.searchRow;
|
|
85
|
+
this.treeUuid = data.treeUuid;
|
|
86
|
+
this.doSetDataSource(data);
|
|
87
|
+
}).finally(() => {
|
|
88
|
+
this.loading = false;
|
|
89
|
+
})
|
|
90
|
+
},
|
|
91
|
+
doSetDataSource(data) {
|
|
92
|
+
this.$nextTick(() => {
|
|
93
|
+
if (this.$refs.tableModel) {
|
|
94
|
+
if (data.theme == 1 || data.theme == 7) {
|
|
95
|
+
this.$refs.tableModel.setDataSource(data['t1'])
|
|
96
|
+
} else {
|
|
97
|
+
this.$refs.tableModel.setDataSource(data)
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
this.cas++;
|
|
102
|
+
if (this.cas <= 5) {
|
|
103
|
+
console.log("自旋》" + this.cas)
|
|
104
|
+
this.doSetDataSource(data)
|
|
105
|
+
}
|
|
106
|
+
}, 500)
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
}, created() {
|
|
111
|
+
this.initConfig()
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<style scoped lang="less">
|
|
117
|
+
div {
|
|
118
|
+
height: 100%;
|
|
119
|
+
width: 100%;
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<splitpanes-model ref="splitpanesModel" :paneSize="paneSize" :horizontal="false" @initOk="initOk" v-bind="$attrs">
|
|
3
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
4
|
+
<slot :name="item"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</splitpanes-model>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script scope>
|
|
10
|
+
import {modelMixins} from "@/components/table/model/ModelMixins";
|
|
11
|
+
import SplitpanesModel from "@/components/table/model/splitpanesModel.vue";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'otLeftRight',
|
|
15
|
+
components: {SplitpanesModel},
|
|
16
|
+
mixins: [modelMixins]
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<el-card class="tree-left">
|
|
4
|
+
<ol-tree :uuid="treeUuid"></ol-tree>
|
|
5
|
+
</el-card>
|
|
6
|
+
<el-card class="table-right">
|
|
7
|
+
<olTable v-bind="$attrs" ref="t1" :uuid="uuid" :init-data-source="false" theme="t1">
|
|
8
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
9
|
+
<slot :name="item"></slot>
|
|
10
|
+
</template>
|
|
11
|
+
</olTable>
|
|
12
|
+
</el-card>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script scope>
|
|
17
|
+
import OlTree from "@/components/tree/index.vue";
|
|
18
|
+
import {nextTick} from "vue";
|
|
19
|
+
export default {
|
|
20
|
+
name: 'otLeftTreeRightTable',
|
|
21
|
+
components: { OlTree},
|
|
22
|
+
props:{
|
|
23
|
+
uuid:{},
|
|
24
|
+
treeUuid:{},
|
|
25
|
+
},
|
|
26
|
+
methods:{
|
|
27
|
+
setDataSource(data) {
|
|
28
|
+
nextTick(() => {
|
|
29
|
+
this.$refs['t1'].setDataSource(data)
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
<style lang="less" scoped>
|
|
36
|
+
@import "ot-left-tree-right-table.scss";
|
|
37
|
+
/deep/ .el-card__body {
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
<olTable v-bind="$attrs" ref="t1" theme="t1" :initDataSource="false">
|
|
6
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
7
|
+
<slot :name="item"></slot>
|
|
8
|
+
</template>
|
|
9
|
+
</olTable>
|
|
10
|
+
</div>
|
|
11
|
+
</pane>
|
|
12
|
+
<pane style="background:transparent" v-bind="paneSize">
|
|
13
|
+
<splitpanes-model ref="splitpanesModel" :paneSize="paneSize" theme1="t2" theme2="t3" :horizontal="false"
|
|
14
|
+
v-bind="$attrs">
|
|
15
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
16
|
+
<slot :name="item"></slot>
|
|
17
|
+
</template>
|
|
18
|
+
</splitpanes-model>
|
|
19
|
+
</pane>
|
|
20
|
+
</splitpanes>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script scope>
|
|
24
|
+
import {modelMixins} from "@/components/table/model/ModelMixins";
|
|
25
|
+
import SplitpanesModel from "@/components/table/model/splitpanesModel.vue";
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
name: 'otTop1Bottom2',
|
|
29
|
+
components: {SplitpanesModel},
|
|
30
|
+
mixins: [modelMixins]
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
<style scoped>
|
|
34
|
+
.top {
|
|
35
|
+
height: 100%;
|
|
36
|
+
padding-bottom: 10px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
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-model ref="splitpanesModel" :paneSize="paneSize" :horizontal="false" @initOk="initOk" v-bind="$attrs">.
|
|
6
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
7
|
+
<slot :name="item"></slot>
|
|
8
|
+
</template>
|
|
9
|
+
</splitpanes-model>
|
|
10
|
+
</div>
|
|
11
|
+
</pane>
|
|
12
|
+
<pane style="background:transparent;padding-bottom: 5px" v-bind="paneSize">
|
|
13
|
+
<olTable v-bind="$attrs" ref="t3" theme="t3">
|
|
14
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
15
|
+
<slot :name="item"></slot>
|
|
16
|
+
</template>
|
|
17
|
+
</olTable>
|
|
18
|
+
</pane>
|
|
19
|
+
</splitpanes>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script scope>
|
|
23
|
+
import {modelMixins} from "@/components/table/model/ModelMixins";
|
|
24
|
+
import SplitpanesModel from "@/components/table/model/splitpanesModel.vue";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'otTop2Bottom1',
|
|
28
|
+
components: {SplitpanesModel},
|
|
29
|
+
mixins: [modelMixins]
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
<style scoped>
|
|
33
|
+
.top {
|
|
34
|
+
height: 100%;
|
|
35
|
+
padding-bottom: 10px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
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-model ref="splitpanesModel" :paneSize="paneSize" :horizontal="false" @initOk="initOk" v-bind="$attrs">
|
|
6
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
7
|
+
<slot :name="item"></slot>
|
|
8
|
+
</template>
|
|
9
|
+
</splitpanes-model>
|
|
10
|
+
</div>
|
|
11
|
+
</pane>
|
|
12
|
+
<pane style="background:transparent;padding-bottom: 5px" v-bind="paneSize">
|
|
13
|
+
<splitpanes-model ref="splitpanesModel1" :paneSize="paneSize" theme1="t3" theme2="t4" :horizontal="false" v-bind="$attrs">
|
|
14
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
15
|
+
<slot :name="item"></slot>
|
|
16
|
+
</template>
|
|
17
|
+
</splitpanes-model>
|
|
18
|
+
</pane>
|
|
19
|
+
</splitpanes>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script scope>
|
|
23
|
+
import {modelMixins} from "@/components/table/model/ModelMixins";
|
|
24
|
+
import SplitpanesModel from "@/components/table/model/splitpanesModel.vue";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'otTop2Bottom2',
|
|
28
|
+
components: {SplitpanesModel},
|
|
29
|
+
mixins: [modelMixins]
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
<style scoped>
|
|
33
|
+
.top {
|
|
34
|
+
height: 100%;
|
|
35
|
+
padding-bottom: 10px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<splitpanes-model ref="splitpanesModel" :paneSize="paneSize" v-bind="$attrs">
|
|
3
|
+
<template v-for='item in Object.keys($slots)' v-slot:[item]>
|
|
4
|
+
<slot :name="item"></slot>
|
|
5
|
+
</template>
|
|
6
|
+
</splitpanes-model>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script scope>
|
|
10
|
+
import {modelMixins} from "@/components/table/model/ModelMixins";
|
|
11
|
+
import SplitpanesModel from "@/components/table/model/splitpanesModel.vue";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'otLeftRight',
|
|
15
|
+
components: {SplitpanesModel},
|
|
16
|
+
mixins: [modelMixins]
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%;width: 100%">
|
|
3
|
+
<ol-table-search v-if="formConfig && searchRow == '1'" :formConfig="formConfig"></ol-table-search>
|
|
4
|
+
<splitpanes :style="formConfig ? getStyle : ''" class="default-theme splitpanesModel" :horizontal="horizontal"
|
|
5
|
+
:push-other-panes="false">
|
|
6
|
+
<pane style="background: transparent" :size="50" v-bind="paneSize">
|
|
7
|
+
<div :class="isLR ? 'left' :'top'">
|
|
8
|
+
<olTable :ref="theme1" v-bind="$attrs" @initOk="initOk" :initDataSource="false" :theme="theme1">
|
|
9
|
+
<template v-for='item in Object.keys($slots).filter(o=>o.indexOf("_t1") != -1)' v-slot:[item]>
|
|
10
|
+
<slot :name="item"></slot>
|
|
11
|
+
</template>
|
|
12
|
+
</olTable>
|
|
13
|
+
</div>
|
|
14
|
+
</pane>
|
|
15
|
+
<pane style="background: transparent" v-bind="paneSize">
|
|
16
|
+
<div :class="isLR ? 'right' :'bottom'">
|
|
17
|
+
<olTable :ref="theme2" v-bind="$attrs" :initDataSource="false" :theme="theme2">
|
|
18
|
+
<template v-for='item in Object.keys($slots).filter(o=>o.indexOf("_t2") != -1)' v-slot:[item]>
|
|
19
|
+
<slot :name="item"></slot>
|
|
20
|
+
</template>
|
|
21
|
+
</olTable>
|
|
22
|
+
</div>
|
|
23
|
+
</pane>
|
|
24
|
+
</splitpanes>
|
|
25
|
+
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script scope>
|
|
29
|
+
import {Pane, Splitpanes} from "splitpanes";
|
|
30
|
+
import {modelMixins} from "@/components/table/model/ModelMixins";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'splitpanesModel',
|
|
34
|
+
mixins: [modelMixins],
|
|
35
|
+
components: {Splitpanes, Pane}, props: {
|
|
36
|
+
searchRow: {default: '0'},
|
|
37
|
+
theme1: {default: 't1'},
|
|
38
|
+
theme2: {default: 't2'},
|
|
39
|
+
horizontal: {default: true},
|
|
40
|
+
isLR: {default: true},
|
|
41
|
+
}, computed: {
|
|
42
|
+
getStyle() {
|
|
43
|
+
let px = Math.ceil(this.formConfig.items.length / 4) * 45;
|
|
44
|
+
let style = 'height: calc(100% - ' + px + 'px)'
|
|
45
|
+
return style
|
|
46
|
+
|
|
47
|
+
},
|
|
48
|
+
}, methods: {}, created() {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
<style scoped>
|
|
53
|
+
@import "splitpanesModel.css";
|
|
54
|
+
</style>
|