olp-table 5.3.4 → 5.3.5
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/package.json +12 -92
- package/.env.build +0 -1
- package/README.md +0 -26
- package/babel.config.js +0 -5
- package/jsconfig.json +0 -22
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/rmMode.bat +0 -1
- package/src/App.vue +0 -199
- package/src/api/crud.js +0 -22
- package/src/api/dist.js +0 -6
- package/src/assets/iconfont/iconfont.css +0 -20
- package/src/assets/iconfont/iconfont.json +0 -16
- 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 +0 -75
- package/src/components/codemirror-tag.vue +0 -100
- package/src/components/lazy-load-select.vue +0 -107
- package/src/components/ol-dialog-excel.vue +0 -112
- package/src/components/ol-dialog-import.vue +0 -304
- package/src/components/ol-dialog-json.vue +0 -82
- package/src/components/ol-dialog-table.vue +0 -81
- package/src/components/ol-dialog-upload-file.vue +0 -208
- package/src/components/ol-dict-tag.vue +0 -271
- package/src/components/ol-select-dom.vue +0 -71
- package/src/components/ol-table-filter.vue +0 -28
- package/src/components/ol-table-render.vue +0 -44
- package/src/components/ol-table-select.vue +0 -150
- package/src/components/pinia-init.vue +0 -18
- package/src/components/table/model/ModelMixins.js +0 -43
- package/src/components/table/model/model-index.vue +0 -121
- package/src/components/table/model/ot-left-right.vue +0 -18
- package/src/components/table/model/ot-left-tree-right-table.scss +0 -14
- package/src/components/table/model/ot-left-tree-right-table.vue +0 -41
- package/src/components/table/model/ot-top-1-bottom-2.vue +0 -39
- package/src/components/table/model/ot-top-2-bottom-1.vue +0 -38
- package/src/components/table/model/ot-top-2-bottom-2.vue +0 -38
- package/src/components/table/model/ot-top-bottom.vue +0 -18
- package/src/components/table/model/splitpanesModel.css +0 -22
- package/src/components/table/model/splitpanesModel.vue +0 -54
- package/src/components/table/ol-form/index.vue +0 -537
- package/src/components/table/ol-form-v3/index.vue +0 -455
- package/src/components/table/ol-main-form-sub-table/index.vue +0 -601
- package/src/components/table/ol-pager/index.vue +0 -46
- package/src/components/table/ol-table/components/ol-table-column-config/columnIndex.vue +0 -233
- package/src/components/table/ol-table/components/ol-table-column-config/index.vue +0 -145
- package/src/components/table/ol-table/components/ol-table-column-dict-color/index.vue +0 -88
- package/src/components/table/ol-table/index.vue +0 -232
- package/src/components/table/ol-table-operate/index.vue +0 -61
- package/src/components/table/ol-table-search/index.vue +0 -17
- package/src/components/table/ol-table-tool-btn/index.vue +0 -60
- package/src/components/tree/components/o-tree.vue +0 -289
- package/src/components/tree/index.vue +0 -46
- package/src/components/v-component/index.vue +0 -43
- package/src/config/dev-config.js +0 -5
- package/src/config/prod-config.js +0 -5
- package/src/config/shared-config.js +0 -20
- package/src/data.js +0 -9378
- package/src/directives/permission/hasPermi.js +0 -63
- package/src/directives/permission/hasRole.js +0 -30
- package/src/main.js +0 -55
- package/src/mixins/VTMixin/DefaultMethods.js +0 -749
- package/src/mixins/VTMixin/OTMixinBody.js +0 -105
- package/src/mixins/VTMixin/OTMixinBodyFooter.js +0 -93
- package/src/mixins/VTMixin/OTMixinBodyMethods.js +0 -420
- package/src/mixins/VTMixin/OTMixinColumnMethod.js +0 -450
- package/src/mixins/VTMixin/OTMixinInitMethod.js +0 -130
- package/src/mixins/VTMixin/OTMixinPager.js +0 -38
- package/src/mixins/VTMixin/OTMixinSortable.js +0 -43
- package/src/mixins/VTMixin/index.js +0 -18
- package/src/package/index.js +0 -20
- package/src/plugins/axios.js +0 -61
- package/src/store/dict.js +0 -76
- package/src/store/dictType.js +0 -52
- package/src/store/permi.js +0 -45
- package/src/styles/common.scss +0 -37
- package/src/styles/index.scss +0 -48
- package/src/styles/theme.scss +0 -32
- package/src/utils/AESCRUDUtils.js +0 -87
- package/src/utils/DateUtils.js +0 -35
- package/src/utils/ExcelUtil.js +0 -159
- package/src/utils/TableSortUtil.js +0 -91
- package/src/utils/columnProp.js +0 -3
- package/src/utils/groupCompute.js +0 -68
- package/src/utils/http/httpFactory.js +0 -92
- package/src/utils/http/httpFactory2.js +0 -79
- package/src/utils/http/httpUtil.js +0 -123
- package/src/utils/http/httpUtils.js +0 -38
- package/src/utils/loadStyle.js +0 -14
- package/src/utils/message.js +0 -56
- package/src/utils/object.js +0 -80
- package/src/utils/security/TokenUtil.js +0 -19
- package/src/utils/tree.js +0 -54
- package/src/utils/util.js +0 -127
- package/src/views/Test/index.vue +0 -77
- package/src/views/Test/index2.vue +0 -33
- package/src/views/components/btn-config/index.vue +0 -202
- package/src/views/components/option-config/index.vue +0 -192
- package/src/views/db/chineseToEnglish.vue +0 -127
- package/src/views/db/filed.vue +0 -395
- package/src/views/db/index.vue +0 -192
- package/src/views/db/preview/index.vue +0 -139
- package/src/views/db/preview/left.vue +0 -204
- package/src/views/db/preview/right.vue +0 -466
- package/src/views/groupTable/index.vue +0 -137
- package/src/views/groupTable/ol-table-column-config/columnIndex.vue +0 -194
- package/src/views/groupTable/ol-table-column-config/index.vue +0 -92
- package/src/views/table/add-or-edit/config/base-config/index.vue +0 -539
- package/src/views/table/add-or-edit/config/base-config/table-form.vue +0 -333
- package/src/views/table/add-or-edit/config/column-config/header-config.vue +0 -475
- package/src/views/table/add-or-edit/config/column-config/index.vue +0 -790
- package/src/views/table/add-or-edit/config/data/column.js +0 -218
- package/src/views/table/add-or-edit/config/data/crud.js +0 -122
- package/src/views/table/add-or-edit/config/data/events.js +0 -109
- package/src/views/table/add-or-edit/config/data/method.js +0 -127
- package/src/views/table/add-or-edit/config/data/option.js +0 -725
- package/src/views/table/add-or-edit/config/data/page.js +0 -79
- package/src/views/table/add-or-edit/config/field-config/filed-config-table.vue +0 -42
- package/src/views/table/add-or-edit/config/field-config/index.vue +0 -91
- package/src/views/table/add-or-edit/config/form-config/index.vue +0 -1179
- package/src/views/table/add-or-edit/config/index.vue +0 -376
- package/src/views/table/add-or-edit/config/initFormObject.js +0 -25
- package/src/views/table/add-or-edit/config/script-config/LeftMeun.vue +0 -71
- package/src/views/table/add-or-edit/config/script-config/index.vue +0 -70
- package/src/views/table/add-or-edit/config/table-config/btn-config.vue +0 -340
- package/src/views/table/add-or-edit/config/table-config/btn-sort.vue +0 -132
- package/src/views/table/add-or-edit/config/table-config/index.vue +0 -446
- package/src/views/table/add-or-edit/configOld/dataTags/filed-config-table-model.vue +0 -41
- package/src/views/table/add-or-edit/configOld/dataTags/filed-config.vue +0 -74
- package/src/views/table/add-or-edit/configOld/dataTags/index.vue +0 -439
- package/src/views/table/add-or-edit/configOld/dataTags/set-table-sql.vue +0 -79
- package/src/views/table/add-or-edit/configOld/dataTags/table-on-config.vue +0 -74
- package/src/views/table/add-or-edit/configOld/index.vue +0 -127
- package/src/views/table/add-or-edit/configOld/tableTags/columnConfig.js +0 -5
- package/src/views/table/add-or-edit/configOld/tableTags/index.vue +0 -353
- package/src/views/table/add-or-edit/configOld/tableTags/operation-but-config.vue +0 -75
- package/src/views/table/add-or-edit/configOld/tableTags/tool-but-config.vue +0 -92
- package/src/views/table/add-or-edit/index.vue +0 -201
- package/src/views/table/add-or-edit/themeModel/index.vue +0 -53
- package/src/views/table/add-or-edit/themeModel/init-model-table.vue +0 -48
- package/src/views/table/add-or-edit/themeModel/init-model.vue +0 -81
- package/src/views/table/add-or-edit/themeModel/left-right.vue +0 -24
- package/src/views/table/add-or-edit/themeModel/left-tree-right-table.vue +0 -75
- package/src/views/table/add-or-edit/themeModel/olTableSearchModelMixins.js +0 -42
- package/src/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue +0 -49
- package/src/views/table/add-or-edit/themeModel/top-1-bottom-2.vue +0 -29
- package/src/views/table/add-or-edit/themeModel/top-2-bottom-1.vue +0 -32
- package/src/views/table/add-or-edit/themeModel/top-2-bottom-2.vue +0 -32
- package/src/views/table/add-or-edit/themeModel/top-bottom.vue +0 -14
- package/src/views/table/index.vue +0 -43
- package/src/views/table/index2.vue +0 -199
- package/src/views/table/preview/index.vue +0 -29
- package/src/views/tree/components/config-core-data.vue +0 -85
- package/src/views/tree/components/config-core-table.vue +0 -362
- package/src/views/tree/components/config-core-tree/data/events.js +0 -95
- package/src/views/tree/components/config-core-tree/data/option.js +0 -88
- package/src/views/tree/components/config-core-tree/data/prop.js +0 -28
- package/src/views/tree/components/config-core-tree/index.vue +0 -181
- package/src/views/tree/components/config-core.vue +0 -42
- package/src/views/tree/components/form-config/index.vue +0 -967
- package/src/views/tree/index.vue +0 -424
- package/vue.config.js +0 -44
- /package/{olp-table/demo.html → demo.html} +0 -0
- /package/{olp-table/fonts → fonts}/iconfont.1720006583309.7e4906d9.woff +0 -0
- /package/{olp-table/fonts → fonts}/iconfont.1720006583309.947a27f0.ttf +0 -0
- /package/{olp-table/olp-table.common.js → olp-table.common.js} +0 -0
- /package/{olp-table/olp-table.css → olp-table.css} +0 -0
- /package/{olp-table/olp-table.umd.js → olp-table.umd.js} +0 -0
- /package/{olp-table/olp-table.umd.min.js → olp-table.umd.min.js} +0 -0
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<vxe-grid v-bind="gridOptions" ref="vexGridRef" @edit-closed="doUpdate(undefined)">
|
|
3
|
-
<!-- 通用多选框 -->
|
|
4
|
-
<template #checkedBox_header="{ column }">
|
|
5
|
-
<div style="display: flex;align-items: center;">
|
|
6
|
-
<el-checkbox v-model="column.params.all" @change="headerClick(column)"></el-checkbox>
|
|
7
|
-
<span style="margin-left: 5px;">{{ column.title }} </span>
|
|
8
|
-
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
<template #seq="{ rowIndex}">
|
|
12
|
-
<vxe-button size="mini" style="padding:0" type="text">
|
|
13
|
-
<span class="vxe-icon-sort"/>{{ rowIndex + 1 }}
|
|
14
|
-
</vxe-button>
|
|
15
|
-
</template>
|
|
16
|
-
<template #checkedBox_default="{ column, row }">
|
|
17
|
-
<el-checkbox v-model="row[column.field]" v-if="column.field == 'visible'" @change="checkBoxClick(column,row)"
|
|
18
|
-
true-value="1"
|
|
19
|
-
false-value="0">{{ row.title }}
|
|
20
|
-
</el-checkbox>
|
|
21
|
-
|
|
22
|
-
<el-checkbox v-model="row[column.field]" v-else @change="checkBoxClick(column,row)"
|
|
23
|
-
true-value="1"
|
|
24
|
-
false-value="0"></el-checkbox>
|
|
25
|
-
</template>
|
|
26
|
-
<!-- 通用下拉框 -->
|
|
27
|
-
<template #select_default="{ column, row }">
|
|
28
|
-
<ol-dict-tag :code="column.params.dictCode" size="small" clearable @change="doUpdate(row)"
|
|
29
|
-
v-model="row[column.field]">
|
|
30
|
-
</ol-dict-tag>
|
|
31
|
-
</template>
|
|
32
|
-
</vxe-grid>
|
|
33
|
-
</template>
|
|
34
|
-
<script>
|
|
35
|
-
import {updateSort} from "@/utils/TableSortUtil";
|
|
36
|
-
import OlDictTag from "@/components/ol-dict-tag.vue";
|
|
37
|
-
import {inject} from "vue";
|
|
38
|
-
|
|
39
|
-
import {storeDict} from "@/store/dict";
|
|
40
|
-
import {storeDictType} from "@/store/dictType";
|
|
41
|
-
|
|
42
|
-
const http = inject('http')
|
|
43
|
-
|
|
44
|
-
const dict = storeDict();
|
|
45
|
-
const dictType = storeDictType();
|
|
46
|
-
dict.init(http)
|
|
47
|
-
dictType.init(http)
|
|
48
|
-
export default {
|
|
49
|
-
name: 'columnIndex',
|
|
50
|
-
components: {OlDictTag},
|
|
51
|
-
inject: ['http'],
|
|
52
|
-
data() {
|
|
53
|
-
return {
|
|
54
|
-
gridOptions: {
|
|
55
|
-
border: true,
|
|
56
|
-
keepSource: true,
|
|
57
|
-
showOverflow: true,
|
|
58
|
-
loading: false,
|
|
59
|
-
height: 'auto',
|
|
60
|
-
size: 'mini',
|
|
61
|
-
rowConfig: {isHover: true, isCurrent: true},
|
|
62
|
-
editConfig: {
|
|
63
|
-
trigger: 'click',
|
|
64
|
-
showStatus: true,
|
|
65
|
-
mode: 'row'
|
|
66
|
-
},
|
|
67
|
-
align: 'center',
|
|
68
|
-
scrollX: {enabled: true, gt: 15},
|
|
69
|
-
scrollY: {enabled: true, gt: 0},
|
|
70
|
-
columnConfig: {
|
|
71
|
-
resizable: true
|
|
72
|
-
},
|
|
73
|
-
expandConfig: {
|
|
74
|
-
labelField: 'seq'
|
|
75
|
-
},
|
|
76
|
-
checkboxConfig: {
|
|
77
|
-
showHeader: false
|
|
78
|
-
},
|
|
79
|
-
columns: [],
|
|
80
|
-
columnSource: [
|
|
81
|
-
{
|
|
82
|
-
field: 'sort',
|
|
83
|
-
width: 60,
|
|
84
|
-
className: 'move',
|
|
85
|
-
title: "序号",
|
|
86
|
-
slots: {
|
|
87
|
-
default: 'seq'
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
field: 'visible',
|
|
92
|
-
align: 'left',
|
|
93
|
-
fixed:'left',
|
|
94
|
-
params: {
|
|
95
|
-
all: 0
|
|
96
|
-
},
|
|
97
|
-
slots: {
|
|
98
|
-
header: 'checkedBox_header',
|
|
99
|
-
default: 'checkedBox_default'
|
|
100
|
-
},
|
|
101
|
-
minWidth: 120,
|
|
102
|
-
title: '标题'
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
field: 'sortable',
|
|
106
|
-
params: {
|
|
107
|
-
all: 0,
|
|
108
|
-
dictCode: 'order_by_type'
|
|
109
|
-
},
|
|
110
|
-
editRender: {
|
|
111
|
-
props: {clearable: true, filterable: true},
|
|
112
|
-
events: {change: this.doUpdate},
|
|
113
|
-
name: '$select',
|
|
114
|
-
options: dict.val('order_by_type')
|
|
115
|
-
},
|
|
116
|
-
width: 80,
|
|
117
|
-
title: '排序'
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
field: 'fixed',
|
|
121
|
-
params: {
|
|
122
|
-
dictCode: 'table_fixed'
|
|
123
|
-
},
|
|
124
|
-
editRender: {
|
|
125
|
-
props: {clearable: true, filterable: true},
|
|
126
|
-
events: {change: this.doUpdate}, name: '$select', options: dict.val('table_fixed')
|
|
127
|
-
},
|
|
128
|
-
width: 80,
|
|
129
|
-
title: '固定'
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
title: '合计',
|
|
133
|
-
field: 'totalToOtherProp',
|
|
134
|
-
params: {
|
|
135
|
-
dictCode: 'online_calculation_type'
|
|
136
|
-
},
|
|
137
|
-
editRender: {
|
|
138
|
-
props: {clearable: true, filterable: true},
|
|
139
|
-
events: {change: this.doUpdate},
|
|
140
|
-
name: '$select',
|
|
141
|
-
options: dict.val('online_calculation_type')
|
|
142
|
-
},
|
|
143
|
-
width: 80,
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
toolbarConfig: {},
|
|
147
|
-
data: [],
|
|
148
|
-
updateSortMethod: this.doUpdate
|
|
149
|
-
},
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
methods: {
|
|
153
|
-
doUpdate(rows) {
|
|
154
|
-
setTimeout(() => {
|
|
155
|
-
if (rows == undefined) {
|
|
156
|
-
rows = this.gridOptions.data;
|
|
157
|
-
}
|
|
158
|
-
rows = rows instanceof Array ? JSON.parse(JSON.stringify(rows)) : [rows]
|
|
159
|
-
let updates = [];
|
|
160
|
-
for (let row of rows) {
|
|
161
|
-
let obj = {id:row.id,field:row.field};
|
|
162
|
-
for (let column of this.gridOptions.columns) {
|
|
163
|
-
obj[column.field] = row[column.field];
|
|
164
|
-
}
|
|
165
|
-
if(obj.field){
|
|
166
|
-
updates.push(obj);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
this.$emit('update', updates)
|
|
170
|
-
}, 300)
|
|
171
|
-
},
|
|
172
|
-
headerClick(column) {
|
|
173
|
-
let updateSource = [];
|
|
174
|
-
this.gridOptions.data.forEach(row => {
|
|
175
|
-
row[column.field] = column.params.all ? '1' : '0'
|
|
176
|
-
updateSource.push(row)
|
|
177
|
-
})
|
|
178
|
-
this.doUpdate(updateSource)
|
|
179
|
-
},
|
|
180
|
-
checkBoxClick(column, row) {
|
|
181
|
-
let f = true
|
|
182
|
-
this.gridOptions.data.forEach(item => {
|
|
183
|
-
if (item[column.field] != '1') {
|
|
184
|
-
f = false
|
|
185
|
-
}
|
|
186
|
-
})
|
|
187
|
-
column.params.all = f
|
|
188
|
-
if (row != undefined) {
|
|
189
|
-
this.doUpdate(row)
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
init({paging}, columns) {
|
|
193
|
-
columns = columns.filter(o => o.columnAuth == 1);
|
|
194
|
-
let columnSource = JSON.parse(JSON.stringify(this.gridOptions.columnSource));
|
|
195
|
-
if (paging == 2) {
|
|
196
|
-
columnSource.push({
|
|
197
|
-
title: '分组',
|
|
198
|
-
field: 'groupToOtherProp',
|
|
199
|
-
width: 60,
|
|
200
|
-
params: {
|
|
201
|
-
all: null
|
|
202
|
-
},
|
|
203
|
-
slots: {
|
|
204
|
-
default: 'checkedBox_default'
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
columnSource.push({
|
|
208
|
-
title: '分组合计',
|
|
209
|
-
field: 'groupTotalToOtherProp',
|
|
210
|
-
params: {
|
|
211
|
-
dictCode: 'online_calculation_type'
|
|
212
|
-
},
|
|
213
|
-
width: 100,
|
|
214
|
-
editRender: {
|
|
215
|
-
props: {clearable: true, filterable: true},
|
|
216
|
-
name: '$select',
|
|
217
|
-
options: dict.val('online_calculation_type')
|
|
218
|
-
},
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
this.gridOptions.columns = columnSource;
|
|
222
|
-
this.gridOptions.data = columns
|
|
223
|
-
this.checkBoxClick(this.gridOptions.columns[2])
|
|
224
|
-
updateSort(this.$refs.vexGridRef, this.gridOptions)
|
|
225
|
-
},
|
|
226
|
-
getData() {
|
|
227
|
-
return this.gridOptions.data
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
</script>
|
|
232
|
-
<style scoped>
|
|
233
|
-
</style>
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-drawer v-model="show"
|
|
3
|
-
destroy-on-close
|
|
4
|
-
:show-close="false"
|
|
5
|
-
:close-on-click-modal="false"
|
|
6
|
-
:title="'列配置 -'+uuid " direction="rtl" size="25%">
|
|
7
|
-
<div style="height: calc(100% - 50px);">
|
|
8
|
-
<ColumnIndex ref="columnIndex" @update="$emit('update',$event)"/>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="button-container">
|
|
11
|
-
<el-button @click="cancelClick" :loading="loading">返回页面</el-button>
|
|
12
|
-
<el-popconfirm
|
|
13
|
-
@confirm="confirmClick"
|
|
14
|
-
title="保存当前设置?"
|
|
15
|
-
>
|
|
16
|
-
<template #reference>
|
|
17
|
-
<el-button type="primary" :loading="loading">保存</el-button>
|
|
18
|
-
</template>
|
|
19
|
-
</el-popconfirm>
|
|
20
|
-
</div>
|
|
21
|
-
</el-drawer>
|
|
22
|
-
</template>
|
|
23
|
-
<style scoped>
|
|
24
|
-
.button-container {
|
|
25
|
-
height: 50px;
|
|
26
|
-
display: grid;
|
|
27
|
-
grid-template-columns: auto auto; /* 两列布局 */
|
|
28
|
-
justify-content: end; /* 靠右对齐 */
|
|
29
|
-
align-items: center; /* 垂直居中 */
|
|
30
|
-
grid-column-gap: 10px; /* 列之间的间距 */
|
|
31
|
-
padding-right: 10px; /* 右侧内边距,可根据需要调整 */
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
34
|
-
<script>
|
|
35
|
-
import {put} from "@/utils/http/httpUtils";
|
|
36
|
-
import ColumnIndex from "@/components/table/ol-table/components/ol-table-column-config/columnIndex.vue";
|
|
37
|
-
|
|
38
|
-
export default {
|
|
39
|
-
name: 'olTableColumnConfig',
|
|
40
|
-
inject: ['http'],
|
|
41
|
-
components: {
|
|
42
|
-
ColumnIndex,
|
|
43
|
-
},
|
|
44
|
-
data() {
|
|
45
|
-
return {
|
|
46
|
-
uuid: '',
|
|
47
|
-
show: false,
|
|
48
|
-
loading: true,
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
methods: {
|
|
52
|
-
cancelClick() {
|
|
53
|
-
this.show = false;
|
|
54
|
-
},
|
|
55
|
-
confirmClick() {
|
|
56
|
-
let gridOptions = this.$refs.columnIndex.gridOptions
|
|
57
|
-
let datas = [];
|
|
58
|
-
for (let data of gridOptions.data) {
|
|
59
|
-
let o = {id: data.id,visible:data.visible == 1 ? 1 : 0};
|
|
60
|
-
for (let j = 2; j < gridOptions.columns.length; j++) {
|
|
61
|
-
let column = gridOptions.columns[j];
|
|
62
|
-
o[column.field] = data[column.field];
|
|
63
|
-
if (column.field.indexOf("ToOtherProp") != -1) {
|
|
64
|
-
data.otherProp[column.field] = data[column.field];
|
|
65
|
-
o.otherProp = data.otherProp;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
delete o.groupTotalToOtherProp;
|
|
69
|
-
if (o.fixed == 'left') {
|
|
70
|
-
o.fixed = 1;
|
|
71
|
-
} else if (o.fixed == 'right') {
|
|
72
|
-
o.fixed = 2;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
datas.push(o)
|
|
76
|
-
}
|
|
77
|
-
let i = 1;
|
|
78
|
-
for (let data1 of datas) {
|
|
79
|
-
i++;
|
|
80
|
-
data1.sort = i;
|
|
81
|
-
if (data1.otherProp) {
|
|
82
|
-
data1.otherProp = JSON.stringify(data1.otherProp);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
datas[0].uuid = gridOptions.data[0].uuid;
|
|
86
|
-
datas[0].thmem = gridOptions.data[0].thmem;
|
|
87
|
-
this.loading = true;
|
|
88
|
-
put(this.http, '/online/tableConfigColumn/editBatch', datas).then(res => {
|
|
89
|
-
if (res) {
|
|
90
|
-
this.$emit('ok');
|
|
91
|
-
this.show = false;
|
|
92
|
-
}
|
|
93
|
-
}).finally(() => {
|
|
94
|
-
this.loading = false;
|
|
95
|
-
})
|
|
96
|
-
},
|
|
97
|
-
copyTextToClipboard(text) {
|
|
98
|
-
navigator.clipboard.writeText(text).then(() => {
|
|
99
|
-
console.log('Text copied to clipboard');
|
|
100
|
-
}).catch(err => {
|
|
101
|
-
console.error('Failed to copy text: ', err);
|
|
102
|
-
});
|
|
103
|
-
},
|
|
104
|
-
open(tableConfig, id, columns) {
|
|
105
|
-
this.show = true;
|
|
106
|
-
this.loading = true;
|
|
107
|
-
this.uuid = id;
|
|
108
|
-
this.$nextTick(() => {
|
|
109
|
-
this.$refs.columnIndex.init(tableConfig, JSON.parse(JSON.stringify(columns)))
|
|
110
|
-
this.loading = false;
|
|
111
|
-
})
|
|
112
|
-
},
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
</script>
|
|
116
|
-
<style lang="less" scoped>
|
|
117
|
-
.page-left {
|
|
118
|
-
position: absolute;
|
|
119
|
-
left: 10px;
|
|
120
|
-
top: 50%;
|
|
121
|
-
transform: translateY(-50%);
|
|
122
|
-
z-index: 10;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.vxe-pager {
|
|
126
|
-
height: 35px;
|
|
127
|
-
top: 5px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.container :deep(.el-drawer__header) {
|
|
131
|
-
padding: 0px 20px;
|
|
132
|
-
margin-bottom: 0px;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.el-tag:hover {
|
|
136
|
-
background-color: #f56c6c; /* 红色背景 */
|
|
137
|
-
color: #fff; /* 白色文字 */
|
|
138
|
-
cursor: pointer;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
:deep(.move) {
|
|
142
|
-
cursor: move;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
</style>
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="OTableColumnDictColor_container" v-if="title">
|
|
3
|
-
<div class="box">{{ title }}:</div>
|
|
4
|
-
<div v-for="item in cssClass" class="box">
|
|
5
|
-
<div class="color" :style="item.style"></div>
|
|
6
|
-
<span class="dictLabel">{{ item.dictLabel }}</span>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
name: 'olTableColumnDictColor',
|
|
13
|
-
props: {
|
|
14
|
-
columns: {default: []}
|
|
15
|
-
},
|
|
16
|
-
data() {
|
|
17
|
-
return {
|
|
18
|
-
cssClass: [],
|
|
19
|
-
title: undefined,
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
created() {
|
|
23
|
-
for (let column of this.columns) {
|
|
24
|
-
if (column.params && column.params.cssClass) {
|
|
25
|
-
let cssClass = [];
|
|
26
|
-
for (let obj of Object.keys(column.params.cssClass)) {
|
|
27
|
-
let st = column.params.cssClass[obj];
|
|
28
|
-
this.title = column.title;
|
|
29
|
-
let style = 'background-color:' + st['backgroundColor'] + ";color:" + st['color'];
|
|
30
|
-
cssClass.push({
|
|
31
|
-
dictValue: obj,
|
|
32
|
-
dictLabel: column.params.dictValueLabel[obj],
|
|
33
|
-
style: style
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
this.cssClass = cssClass
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<style lang="less" scoped>
|
|
45
|
-
.OTableColumnDictColor_container {
|
|
46
|
-
float: left;
|
|
47
|
-
font-size: 11px;
|
|
48
|
-
color: #000000;
|
|
49
|
-
|
|
50
|
-
.box {
|
|
51
|
-
float: left;
|
|
52
|
-
display: flex;
|
|
53
|
-
justify-content: center; /* 水平居中,如需 */
|
|
54
|
-
align-items: center; /* 垂直居中 */
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.text-with-line {
|
|
59
|
-
text-align: center; /* 文字居中 */
|
|
60
|
-
position: relative; /* 相对定位 */
|
|
61
|
-
padding-top: 10px; /* 文字与横线之间的间隔 */
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.text-with-line::after {
|
|
65
|
-
content: ""; /* 伪元素内容为空 */
|
|
66
|
-
position: absolute; /* 绝对定位 */
|
|
67
|
-
left: 0; /* 横线左边界与div左边界对齐 */
|
|
68
|
-
right: 0; /* 横线右边界与div右边界对齐 */
|
|
69
|
-
top: 0; /* 横线顶部与div内部内容顶部对齐 */
|
|
70
|
-
height: 1px; /* 横线高度 */
|
|
71
|
-
background: black; /* 横线颜色 */
|
|
72
|
-
transform: scaleY(0.5); /* 将线性缩小一半,看起来更细 */
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.dictLabel {
|
|
76
|
-
margin-right: 5px;
|
|
77
|
-
float: left;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.color {
|
|
81
|
-
float: left;
|
|
82
|
-
margin-right: 5px;
|
|
83
|
-
text-align: center;
|
|
84
|
-
width: 12px;
|
|
85
|
-
height: 12px;
|
|
86
|
-
border-radius: 10px;
|
|
87
|
-
}
|
|
88
|
-
</style>
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<slot :name="getSlotName('search')" v-if="table.formConfig.show"></slot>
|
|
3
|
-
<vxe-grid v-bind="table" class="ol-table" :footer-method="footerMethod" @checkboxChange="selectRowChange"
|
|
4
|
-
@radioChange="selectRowChange"
|
|
5
|
-
v-on="events"
|
|
6
|
-
@checkboxAll="selectRowChange">
|
|
7
|
-
<template v-for='item in table.formConfig.items.filter(item =>item.slotsName != undefined)' v-slot:[item.slotsName]>
|
|
8
|
-
<olSelectDom :item="item" v-model="table.formConfig.data[item.key]"></olSelectDom>
|
|
9
|
-
</template>
|
|
10
|
-
<template #img_default="{row,column}">
|
|
11
|
-
<el-image
|
|
12
|
-
style="height: 40px"
|
|
13
|
-
:src="row[getFiledName(column)]"
|
|
14
|
-
:preview-src-list="[row[column[getFiledName(column)]]]"
|
|
15
|
-
:zoom-rate="1.2"
|
|
16
|
-
:max-scale="7"
|
|
17
|
-
:min-scale="0.2"
|
|
18
|
-
:initial-index="4"
|
|
19
|
-
fit="scale-down"
|
|
20
|
-
/>
|
|
21
|
-
</template>
|
|
22
|
-
<template #icon_default="{row,column}">
|
|
23
|
-
<i :class="row[getFiledName(column)]"></i>{{ row[column[getFiledName(column)]] }}
|
|
24
|
-
</template>
|
|
25
|
-
<template #header_left>
|
|
26
|
-
<span class="title" v-if="table['table-title']">{{ table['table-title'] }}
|
|
27
|
-
</span>
|
|
28
|
-
<span style="margin: 0px 15px -30px 0px" v-else></span>
|
|
29
|
-
<slot :name="getSlotName('headerLeftLeft')"></slot>
|
|
30
|
-
<ol-table-tool-btn :loading="loading" :value="toolBtn.filter(o=>o.alignMode == 'left')" :currentPermi="uuid+':'+theme+':'"
|
|
31
|
-
@toolbarBtnClick="toolbarBtnClick($event)"/>
|
|
32
|
-
<slot :name="getSlotName('headerLeftRight')"></slot>
|
|
33
|
-
</template>
|
|
34
|
-
<template #header_right>
|
|
35
|
-
<slot :name="getSlotName('headerRightLeft')"></slot>
|
|
36
|
-
<ol-table-tool-btn :loading="loading" :value="toolBtn.filter(o=>o.alignMode == 'right' && ['olp_fullscreen','olp_refresh','olp_setting','olp_search'].indexOf(o.code) == -1)" :currentPermi="uuid+':'+theme+':'"
|
|
37
|
-
@toolbarBtnClick="toolbarBtnClick($event)">
|
|
38
|
-
<template #right>
|
|
39
|
-
<vxe-button @click="zoomEvent" v-if="showToolName('olp_fullscreen')" circle>
|
|
40
|
-
<i class="vxe-icon-fullscreen" v-if="!isMaximized" title="全屏"/>
|
|
41
|
-
<i class=" vxe-icon-minimize" title="取消全屏" v-else/>
|
|
42
|
-
</vxe-button>
|
|
43
|
-
<vxe-button icon="vxe-icon-refresh" v-if="showToolName('olp_refresh')" @click="query" title="刷新" circle></vxe-button>
|
|
44
|
-
<vxe-button icon="vxe-icon-setting-fill" v-if="showToolName('olp_setting')" title="设置"
|
|
45
|
-
@click="$refs.olTableColumnConfig.open(tableConfig, tableConfig.uuid,table.columns)"
|
|
46
|
-
circle></vxe-button>
|
|
47
|
-
<vxe-button icon="vxe-icon-search" title="搜索" v-if="showToolName('olp_search')" @click="toggleFormDisplay" circle></vxe-button>
|
|
48
|
-
</template>
|
|
49
|
-
</ol-table-tool-btn>
|
|
50
|
-
<slot :name="getSlotName('headerRightRight')"></slot>
|
|
51
|
-
</template>
|
|
52
|
-
<!--操作-->
|
|
53
|
-
<template #operate="{ row }">
|
|
54
|
-
<slot :name="getSlotName('operateLeft')"></slot>
|
|
55
|
-
<olTableOperate :row="row" :value="operationBtn"
|
|
56
|
-
@handleOperationClick="handleOperationClick($event)"></olTableOperate>
|
|
57
|
-
<slot :name="getSlotName('operateRight')"></slot>
|
|
58
|
-
</template>
|
|
59
|
-
<!--分页-->
|
|
60
|
-
<template #pager v-if="pagination.enabled && table.columns.length !=0">
|
|
61
|
-
<olPager v-bind="pagination" @page-change="handlePageChange"
|
|
62
|
-
@clearSelected="clearSelected">
|
|
63
|
-
<template #left>
|
|
64
|
-
<ol-table-column-dict-color :columns="table.columns"/>
|
|
65
|
-
<slot :name="getSlotName('pageLeft')"></slot>
|
|
66
|
-
</template>
|
|
67
|
-
<template #right>
|
|
68
|
-
<slot :name="getSlotName('pageRight')"></slot>
|
|
69
|
-
</template>
|
|
70
|
-
</olPager>
|
|
71
|
-
</template>
|
|
72
|
-
</vxe-grid>
|
|
73
|
-
<component ref="components" v-if="customUrl != undefined" :is="customUrl" @emits="emits"/>
|
|
74
|
-
<ol-table-column-config ref="olTableColumnConfig" @update="updateColumn" @ok="init(true)"/>
|
|
75
|
-
<olForm ref="form" @query="query"></olForm>
|
|
76
|
-
<OlMainFormSubTable ref="subForm" @query="query"/>
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<script>
|
|
80
|
-
import {OTMixin} from "@/mixins/VTMixin";
|
|
81
|
-
import olTableOperate from "@/components/table/ol-table-operate"
|
|
82
|
-
import olPager from "@/components/table/ol-pager"
|
|
83
|
-
import olForm from "@/components/table/ol-form"
|
|
84
|
-
import OlTableColumnConfig from "@/components/table/ol-table/components/ol-table-column-config/index.vue";
|
|
85
|
-
import OlTableToolBtn from "@/components/table/ol-table-tool-btn/index.vue";
|
|
86
|
-
import {Delete} from "@element-plus/icons-vue";
|
|
87
|
-
import OlTableColumnDictColor from "@/components/table/ol-table/components/ol-table-column-dict-color/index.vue";
|
|
88
|
-
import {storeDict} from "@/store/dict";
|
|
89
|
-
import {storeDictType} from "@/store/dictType";
|
|
90
|
-
import getFiledName from "@/utils/columnProp";
|
|
91
|
-
import OlMainFormSubTable from "@/components/table/ol-main-form-sub-table/index.vue";
|
|
92
|
-
import {storePermi} from "@/store/permi";
|
|
93
|
-
|
|
94
|
-
const dict = storeDict();
|
|
95
|
-
const dictType = storeDictType();
|
|
96
|
-
const permi = storePermi();
|
|
97
|
-
export default {
|
|
98
|
-
name: 'olTable',
|
|
99
|
-
props: {
|
|
100
|
-
theme: {
|
|
101
|
-
type: String
|
|
102
|
-
},
|
|
103
|
-
initDataSource: {
|
|
104
|
-
default: true
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
mixins: [OTMixin],
|
|
108
|
-
components: {
|
|
109
|
-
OlMainFormSubTable,
|
|
110
|
-
OlTableColumnDictColor, Delete, OlTableToolBtn, OlTableColumnConfig, olTableOperate, olPager, olForm},
|
|
111
|
-
data() {
|
|
112
|
-
return {
|
|
113
|
-
uuid: this.$attrs.uuid
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
methods: {
|
|
117
|
-
showToolName(code){
|
|
118
|
-
for (let toolBtn of this.toolBtn) {
|
|
119
|
-
if(toolBtn.code == code){
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return false;
|
|
124
|
-
},
|
|
125
|
-
getFiledName,
|
|
126
|
-
handleClose() {
|
|
127
|
-
this.selectRowChange()
|
|
128
|
-
}, getSlotName(name) {
|
|
129
|
-
return name + "_" + this.theme
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
mounted() {
|
|
133
|
-
setTimeout(() => {
|
|
134
|
-
this.updateSort()
|
|
135
|
-
}, 500)
|
|
136
|
-
},
|
|
137
|
-
created() {
|
|
138
|
-
dict.init();
|
|
139
|
-
dictType.init();
|
|
140
|
-
permi.init();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
</script>
|
|
144
|
-
|
|
145
|
-
<style>
|
|
146
|
-
@import "@/styles/theme.scss";
|
|
147
|
-
</style>
|
|
148
|
-
<style lang="less" scoped>
|
|
149
|
-
|
|
150
|
-
.codemirror-el-dialog {
|
|
151
|
-
|
|
152
|
-
> .el-dialog__header {
|
|
153
|
-
display: block;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.cursor-pointer {
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.table-right-operation-but {
|
|
162
|
-
margin: 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
/deep/ .vxe-table--body-wrapper {
|
|
167
|
-
min-height: 110px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.tableCard {
|
|
171
|
-
height: 100%;
|
|
172
|
-
|
|
173
|
-
:deep(.el-card__body) {
|
|
174
|
-
padding: 8px 16px;
|
|
175
|
-
height: 100%;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/*
|
|
180
|
-
/deep/ .vxe-grid--form-wrapper .vxe-form .vxe-form--wrapper{
|
|
181
|
-
border: 1px solid #e8eaec;
|
|
182
|
-
border-radius: 2px;
|
|
183
|
-
padding: 15px 0;
|
|
184
|
-
}
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
|
-
.page-left {
|
|
188
|
-
position: absolute;
|
|
189
|
-
left: 10px;
|
|
190
|
-
top: 50%;
|
|
191
|
-
transform: translateY(-50%);
|
|
192
|
-
z-index: 10;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.vxe-pager {
|
|
196
|
-
height: 34px;
|
|
197
|
-
top: 3px;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.t-bottom {
|
|
201
|
-
float: left;
|
|
202
|
-
position: relative;
|
|
203
|
-
font-size: 13px;
|
|
204
|
-
width: 100%;
|
|
205
|
-
top: 4px;
|
|
206
|
-
border-top: 0;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.title {
|
|
210
|
-
z-index: 15;
|
|
211
|
-
margin: 0px 15px -23px 0px;
|
|
212
|
-
background-color: #fff;
|
|
213
|
-
border-radius: 2px;
|
|
214
|
-
border: 1px solid rgb(232, 234, 236);
|
|
215
|
-
border-bottom: 0;
|
|
216
|
-
padding: 0px 9px;
|
|
217
|
-
line-height: 25px;
|
|
218
|
-
color: #49494b;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/deep/ .size--mini {
|
|
222
|
-
.title {
|
|
223
|
-
margin: 0px 15px -20px 0px !important;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/deep/ .size--medium {
|
|
228
|
-
.title {
|
|
229
|
-
margin: 0px 15px -29px 0px !important;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
</style>
|