agilebuilder-ui 1.0.85 → 1.0.87-temp1
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/lib/super-ui.css +1 -1
- package/lib/super-ui.js +24626 -23708
- package/lib/super-ui.umd.cjs +76 -76
- package/package.json +2 -2
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +3 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +2 -1
- package/packages/index.js +5 -2
- package/packages/rich-editor/index.vue +1 -1
- package/packages/row-form/index.js +7 -0
- package/packages/row-form/index.vue +211 -0
- package/packages/super-grid/src/apis.js +26 -0
- package/packages/super-grid/src/components/grid-icon.vue +7 -14
- package/packages/super-grid/src/components/hyperlinks.vue +24 -8
- package/packages/super-grid/src/custom-formatter.js +312 -386
- package/packages/super-grid/src/dynamic-input.vue +8 -1
- package/packages/super-grid/src/normal-column-content.vue +1079 -0
- package/packages/super-grid/src/normal-column.vue +41 -752
- package/packages/super-grid/src/row-detail.vue +50 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +6 -1
- package/packages/super-grid/src/search-form-item.vue +6 -1
- package/packages/super-grid/src/super-grid-service.js +41 -1
- package/packages/super-grid/src/super-grid.vue +123 -49
- package/packages/super-grid/src/utils.js +80 -56
- package/src/i18n/langs/cn.js +4 -1
- package/src/i18n/langs/en.js +3 -0
- package/src/permission.js +7 -1
- package/src/store/modules/user.js +4 -1
- package/src/styles/theme/dark-blue/button.scss +2 -2
- package/src/styles/theme/dark-blue/index.scss +1 -1
- package/src/styles/theme/green/button.scss +2 -2
- package/src/styles/theme/green/index.scss +1 -1
- package/src/styles/theme/ocean-blue/button.scss +2 -2
- package/src/styles/theme/ocean-blue/index.scss +1 -1
- package/src/utils/jump-page-utils.js +199 -321
- package/src/utils/permissionAuth.js +1 -1
- package/src/views/layout/components/Menubar/Item.vue +27 -4
- package/src/views/layout/components/Menubar/SidebarItem.vue +6 -2
- package/src/views/layout/components/Menubar/index.vue +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agilebuilder-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.87temp1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./lib/super-ui.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"axios": "^1.5.1",
|
|
29
29
|
"element-plus": "^2.4.1",
|
|
30
30
|
"nprogress": "^0.2.0",
|
|
31
|
-
"sass": "
|
|
31
|
+
"sass": "1.69.4",
|
|
32
32
|
"vite": "^4.4.5",
|
|
33
33
|
"vite-plugin-require-transform": "^1.0.21",
|
|
34
34
|
"vite-plugin-svg-icons": "^2.0.1",
|
|
@@ -233,6 +233,9 @@ export default {
|
|
|
233
233
|
},
|
|
234
234
|
},
|
|
235
235
|
created() {
|
|
236
|
+
if (this.options && this.options.backendUrl) {
|
|
237
|
+
this.backendUrl = this.options.backendUrl
|
|
238
|
+
}
|
|
236
239
|
if (this.options && this.options.dynamicDataSourceCode) {
|
|
237
240
|
this.dynamicDataSourceCode = this.options.dynamicDataSourceCode.trim()
|
|
238
241
|
const param = {
|
|
@@ -253,7 +253,8 @@ export default {
|
|
|
253
253
|
},
|
|
254
254
|
handleBeforeUpload(file) {
|
|
255
255
|
let limitFileSize = this.fileSetObj.limitFileSize
|
|
256
|
-
|
|
256
|
+
console.log('handleBeforeUpload-----limitFileSize=', limitFileSize)
|
|
257
|
+
if (!limitFileSize) {
|
|
257
258
|
// 默认是30M
|
|
258
259
|
limitFileSize = 30
|
|
259
260
|
}
|
package/packages/index.js
CHANGED
|
@@ -39,6 +39,7 @@ import SuperIcon from './super-icon'
|
|
|
39
39
|
import FsUploadNew from './fs-upload-new'
|
|
40
40
|
import ScanCodeInputBrowser from './scan-code-input-browser'
|
|
41
41
|
import WorkgroupTreeMobile from './workgroup-tree-mobile'
|
|
42
|
+
import RowForm from './row-form'
|
|
42
43
|
import * as ElementPlusIconsVue from "@element-plus/icons-vue"
|
|
43
44
|
// 将所有组件都存储起来,方便后续统一注册
|
|
44
45
|
const components = [
|
|
@@ -77,7 +78,8 @@ const components = [
|
|
|
77
78
|
SuperIcon,
|
|
78
79
|
FsUploadNew,
|
|
79
80
|
ScanCodeInputBrowser,
|
|
80
|
-
WorkgroupTreeMobile
|
|
81
|
+
WorkgroupTreeMobile,
|
|
82
|
+
RowForm
|
|
81
83
|
]
|
|
82
84
|
|
|
83
85
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
@@ -137,7 +139,8 @@ export {
|
|
|
137
139
|
SuperIcon,
|
|
138
140
|
FsUploadNew,
|
|
139
141
|
ScanCodeInputBrowser,
|
|
140
|
-
WorkgroupTreeMobile
|
|
142
|
+
WorkgroupTreeMobile,
|
|
143
|
+
RowForm
|
|
141
144
|
}
|
|
142
145
|
|
|
143
146
|
export default {
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-drawer
|
|
3
|
+
v-model="isShowForm"
|
|
4
|
+
:close-on-click-modal="false"
|
|
5
|
+
:close-on-press-escape="false"
|
|
6
|
+
direction="btt"
|
|
7
|
+
size="100%"
|
|
8
|
+
@close="closeForm()"
|
|
9
|
+
>
|
|
10
|
+
<template #header>
|
|
11
|
+
<div style="text-align: center">
|
|
12
|
+
{{ $t('superGrid.recordLine', { row: realEditIndex + 1 }) }}
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<template #default>
|
|
16
|
+
<el-form label-width="auto">
|
|
17
|
+
<template v-for="(column, index) in columns" >
|
|
18
|
+
<el-form-item :key="index" v-if="column.prop != '$index' && column.prop != '$selection' && column.prop != 'operation'" :label="getMyHeaderLable(column)" >
|
|
19
|
+
<NormalColumnContent
|
|
20
|
+
:ref="column.prop"
|
|
21
|
+
:is-sql="isSql"
|
|
22
|
+
:column="column"
|
|
23
|
+
:list-code="listCode"
|
|
24
|
+
:drag-column-prop="dragColumnProp"
|
|
25
|
+
:right-click-menu-arr="options.rightClickMenuArr"
|
|
26
|
+
:table-name="tableName"
|
|
27
|
+
:page-code="pageCode"
|
|
28
|
+
:list-toolbar-form-data="listToolbarFormData"
|
|
29
|
+
:list-name="listName"
|
|
30
|
+
:options="options"
|
|
31
|
+
:current-page="currentPage"
|
|
32
|
+
:grid-data="gridData"
|
|
33
|
+
:page-grid-data="pageGridData"
|
|
34
|
+
:row="gridData[realEditIndex]"
|
|
35
|
+
:row-index="realEditIndex"
|
|
36
|
+
:is-show-form="true"
|
|
37
|
+
@open-page="openPageEvent"
|
|
38
|
+
@refresData="refresData"
|
|
39
|
+
@refresh-list="refreshList"
|
|
40
|
+
@refresPortData="refresPortData"
|
|
41
|
+
@refresPortsData="refresPortsData"
|
|
42
|
+
@refresMainTableFields="refresMainTableFields"
|
|
43
|
+
@prohibitToEdit="prohibitToEdit"
|
|
44
|
+
/>
|
|
45
|
+
</el-form-item>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
</el-form>
|
|
49
|
+
<el-button v-if="realEditIndex !== 0" type="primary" link @click="prevRow">
|
|
50
|
+
{{ $t('superGrid.prevRow') }}
|
|
51
|
+
</el-button>
|
|
52
|
+
<el-button v-if="realEditIndex !== gridData.length - 1" type="primary" link @click="nextRow">
|
|
53
|
+
{{ $t('superGrid.nextRow') }}
|
|
54
|
+
</el-button>
|
|
55
|
+
</template>
|
|
56
|
+
</el-drawer>
|
|
57
|
+
</template>
|
|
58
|
+
<script lang="ts">
|
|
59
|
+
export default {
|
|
60
|
+
name: 'RowForm'
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
<script setup lang="ts">
|
|
64
|
+
import NormalColumnContent from '../super-grid/src/normal-column-content.vue'
|
|
65
|
+
import {
|
|
66
|
+
getHeaderLable
|
|
67
|
+
} from '../super-grid/src/utils'
|
|
68
|
+
import { reactive, ref, onMounted, defineEmits, nextTick } from 'vue'
|
|
69
|
+
const props = defineProps<{
|
|
70
|
+
columns: {
|
|
71
|
+
type: Array<any>
|
|
72
|
+
default: null
|
|
73
|
+
}
|
|
74
|
+
listCode: {
|
|
75
|
+
type: String
|
|
76
|
+
default: null
|
|
77
|
+
}
|
|
78
|
+
isSql: {
|
|
79
|
+
type: Boolean
|
|
80
|
+
default: false
|
|
81
|
+
}
|
|
82
|
+
dragColumnProp: {
|
|
83
|
+
type: String
|
|
84
|
+
default: null
|
|
85
|
+
}
|
|
86
|
+
tableName: {
|
|
87
|
+
type: String
|
|
88
|
+
default: null
|
|
89
|
+
}
|
|
90
|
+
pageCode: {
|
|
91
|
+
type: String
|
|
92
|
+
default: null
|
|
93
|
+
}
|
|
94
|
+
listName: {
|
|
95
|
+
type: String
|
|
96
|
+
default: null
|
|
97
|
+
}
|
|
98
|
+
currentPage: {
|
|
99
|
+
type: Number
|
|
100
|
+
default: 1
|
|
101
|
+
}
|
|
102
|
+
gridData: {
|
|
103
|
+
type: Array<any>
|
|
104
|
+
default: null
|
|
105
|
+
}
|
|
106
|
+
pageGridData: {
|
|
107
|
+
type: Array<any>
|
|
108
|
+
default: null
|
|
109
|
+
}
|
|
110
|
+
listToolbarFormData: {
|
|
111
|
+
type: Object
|
|
112
|
+
default: null
|
|
113
|
+
}
|
|
114
|
+
// 行记录序号
|
|
115
|
+
rowIndex: {
|
|
116
|
+
type: Number
|
|
117
|
+
default: 0
|
|
118
|
+
}
|
|
119
|
+
options: {
|
|
120
|
+
type: Object
|
|
121
|
+
default: null
|
|
122
|
+
}
|
|
123
|
+
lineEdit: {
|
|
124
|
+
type: Object
|
|
125
|
+
default: null
|
|
126
|
+
}
|
|
127
|
+
}>()
|
|
128
|
+
const emits = defineEmits([
|
|
129
|
+
'open-page',
|
|
130
|
+
'close',
|
|
131
|
+
'prohibitToEdit',
|
|
132
|
+
'refresData',
|
|
133
|
+
'refresPortData',
|
|
134
|
+
'refresPortsData',
|
|
135
|
+
'refresMainTableFields'
|
|
136
|
+
])
|
|
137
|
+
const realEditIndex: any = ref(props.rowIndex)
|
|
138
|
+
const isShowForm = ref(true)
|
|
139
|
+
const reload = ref(true)
|
|
140
|
+
function getMyHeaderLable(column) {
|
|
141
|
+
return getHeaderLable(column)
|
|
142
|
+
}
|
|
143
|
+
function prevRow() {
|
|
144
|
+
reload.value = false
|
|
145
|
+
--realEditIndex.value
|
|
146
|
+
nextTick(() => {
|
|
147
|
+
reload.value = true
|
|
148
|
+
})
|
|
149
|
+
console.log(realEditIndex.value)
|
|
150
|
+
}
|
|
151
|
+
function nextRow() {
|
|
152
|
+
reload.value = false
|
|
153
|
+
++realEditIndex.value
|
|
154
|
+
nextTick(() => {
|
|
155
|
+
reload.value = true
|
|
156
|
+
})
|
|
157
|
+
console.log(realEditIndex.value)
|
|
158
|
+
}
|
|
159
|
+
function isShowColumn(column) {
|
|
160
|
+
let hidden = true
|
|
161
|
+
if (column && column) {
|
|
162
|
+
if (column.prop === '$index') {
|
|
163
|
+
hidden = false
|
|
164
|
+
} else if (column.prop === 'operation') {
|
|
165
|
+
hidden = false
|
|
166
|
+
} else if (column.prop === '$detail') {
|
|
167
|
+
hidden = false
|
|
168
|
+
} else if (!column.show) {
|
|
169
|
+
hidden = false
|
|
170
|
+
} else if (column.formatter && column.formatter.type === 'hyperlinks') {
|
|
171
|
+
hidden = false
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return hidden
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function closeForm() {
|
|
178
|
+
isShowForm.value = false
|
|
179
|
+
emits('close')
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function openPageEvent(openPageParams) {
|
|
183
|
+
emits('open-page', openPageParams)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// 设置字段禁止编辑
|
|
187
|
+
function prohibitToEdit(entity) {
|
|
188
|
+
emits('prohibitToEdit', entity)
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function refresData(data) {
|
|
192
|
+
emits('refresData', data)
|
|
193
|
+
}
|
|
194
|
+
function refresPortData(port, value) {
|
|
195
|
+
if (props && props.lineEdit && props.lineEdit.editingCell) {
|
|
196
|
+
emits('refresPortData', port, value, props.lineEdit.editingCell.row)
|
|
197
|
+
} else {
|
|
198
|
+
emits('refresPortData', port, value, this.index)
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function refresPortsData(map) {
|
|
202
|
+
if (props && props.lineEdit && props.lineEdit.editingCell) {
|
|
203
|
+
emits('refresPortsData', map, props.lineEdit.editingCell.row)
|
|
204
|
+
} else {
|
|
205
|
+
emits('refresPortsData', map, this.index)
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function refresMainTableFields(map) {
|
|
209
|
+
emits('refresMainTableFields', map)
|
|
210
|
+
}
|
|
211
|
+
</script>
|
|
@@ -1224,6 +1224,26 @@ const apis = {
|
|
|
1224
1224
|
})
|
|
1225
1225
|
return result
|
|
1226
1226
|
},
|
|
1227
|
+
// 获得该列表中,下拉选是选项组的字段信息,返回的key是属性名,value是选项集合
|
|
1228
|
+
getTableSelectOptions(listCode) {
|
|
1229
|
+
const result = {}
|
|
1230
|
+
if (!listCode) {
|
|
1231
|
+
listCode = store.get('_list_code')
|
|
1232
|
+
}
|
|
1233
|
+
const gridParams = store.get(listCode)
|
|
1234
|
+
const columns = gridParams.columns
|
|
1235
|
+
columns.forEach(col => {
|
|
1236
|
+
const prop = col.prop
|
|
1237
|
+
const isDynamicDataSource = isDynamicDataSourceSource(col)
|
|
1238
|
+
if (!isDynamicDataSource && col.valueSet && col.valueSet.length > 0) {
|
|
1239
|
+
result[prop] = {
|
|
1240
|
+
options: col.valueSet,
|
|
1241
|
+
column: col
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
})
|
|
1245
|
+
return result
|
|
1246
|
+
},
|
|
1227
1247
|
// 取消列表的编辑状态
|
|
1228
1248
|
restoreGridEdit(listCode) {
|
|
1229
1249
|
if (!listCode) {
|
|
@@ -1387,6 +1407,12 @@ const apis = {
|
|
|
1387
1407
|
})
|
|
1388
1408
|
}
|
|
1389
1409
|
return defaultValueColumnsMap
|
|
1410
|
+
},
|
|
1411
|
+
// 重新刷新子表数据
|
|
1412
|
+
reloadSubTableData(listCode) {
|
|
1413
|
+
const gridParams = store.get(listCode)
|
|
1414
|
+
gridParams.options['subTableData'] = null
|
|
1415
|
+
this.fetchListData()
|
|
1390
1416
|
}
|
|
1391
1417
|
}
|
|
1392
1418
|
export default apis
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
</el-tag>
|
|
14
14
|
</span>
|
|
15
15
|
<span v-else :style="customStyle">
|
|
16
|
-
<i v-if="formatConfig.position==='pre'" :class="formatConfig.icon" />
|
|
17
|
-
<span v-if="formatConfig.displayTextJudge" class="cell--span">{{ displayText }}
|
|
18
|
-
|
|
19
|
-
<i v-if="formatConfig.position==='suf'" :class="formatConfig.icon" />
|
|
16
|
+
<i v-if="formatConfig.position === 'pre'" :class="formatConfig.icon" />
|
|
17
|
+
<span v-if="formatConfig.displayTextJudge" class="cell--span">{{ displayText }} </span>
|
|
18
|
+
<i v-if="formatConfig.position === 'suf'" :class="formatConfig.icon" />
|
|
20
19
|
</span>
|
|
21
20
|
</span>
|
|
22
21
|
</template>
|
|
@@ -69,14 +68,11 @@ export default {
|
|
|
69
68
|
created() {
|
|
70
69
|
this.initFomrat()
|
|
71
70
|
},
|
|
72
|
-
mounted() {
|
|
73
|
-
|
|
74
|
-
},
|
|
71
|
+
mounted() {},
|
|
75
72
|
methods: {
|
|
76
73
|
...customFormatter,
|
|
77
74
|
initFomrat() {
|
|
78
|
-
|
|
79
|
-
this.column.formatter.options && this.column.formatter.options.format) {
|
|
75
|
+
if (this.column.formatter && this.column.formatter.options && this.column.formatter.options.format) {
|
|
80
76
|
this.formatConfig = JSON.parse(this.column.formatter.options.format)
|
|
81
77
|
Object.assign(this.formatConfig, this.getFormatIconSetting(this.row))
|
|
82
78
|
console.log(this.formatConfig, '-------------------')
|
|
@@ -143,7 +139,7 @@ export default {
|
|
|
143
139
|
if (gridParams.options['eventCallBack'] && gridParams.options['eventCallBack'][this.formatConfig.event]) {
|
|
144
140
|
const customEventResult = gridParams.options['eventCallBack'][this.formatConfig.event].call(this, params)
|
|
145
141
|
if (isPromise(customEventResult)) {
|
|
146
|
-
await customEventResult.then(result => {
|
|
142
|
+
await customEventResult.then((result) => {
|
|
147
143
|
console.log('点击前事件返回结果--Promise--resolve---', result)
|
|
148
144
|
this.customStyle = result
|
|
149
145
|
})
|
|
@@ -153,10 +149,7 @@ export default {
|
|
|
153
149
|
}
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
|
-
|
|
157
152
|
}
|
|
158
153
|
</script>
|
|
159
154
|
|
|
160
|
-
<style>
|
|
161
|
-
|
|
162
|
-
</style>
|
|
155
|
+
<style></style>
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span>
|
|
3
|
-
<el-link :type="getLinkType(row)" @click="clickHyperLink(column, row, listCode,scopeIndex)">
|
|
4
|
-
<span
|
|
5
|
-
|
|
3
|
+
<el-link :type="getLinkType(row)" @click="clickHyperLink(column, row, listCode, scopeIndex)">
|
|
4
|
+
<span
|
|
5
|
+
v-if="isShowOverflowTooltip"
|
|
6
|
+
:id="column.prop + 'DomData' + scopeIndex"
|
|
7
|
+
:title="$escapeHtml(getMyHyperLinkSetting(row).title)"
|
|
8
|
+
:style="{ width: cellWidth + 'px' }"
|
|
9
|
+
class="ellipsis cell--span"
|
|
10
|
+
>{{ $escapeHtml(getMyHyperLinkSetting(row).label)
|
|
11
|
+
}}<i v-if="getMyHyperLinkSetting(row).icon" :class="getMyHyperLinkSetting(row).icon"
|
|
12
|
+
/></span>
|
|
13
|
+
<span v-else :id="column.prop + 'DomData' + scopeIndex" class="cell--span"
|
|
14
|
+
>{{ $escapeHtml(getMyHyperLinkSetting(row).label)
|
|
15
|
+
}}<i v-if="getMyHyperLinkSetting(row).icon" :class="getMyHyperLinkSetting(row).icon"
|
|
16
|
+
/></span>
|
|
6
17
|
</el-link>
|
|
7
18
|
</span>
|
|
8
19
|
</template>
|
|
@@ -48,7 +59,15 @@ export default {
|
|
|
48
59
|
if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
|
|
49
60
|
tableName = gridParams.basicInfo.tableName
|
|
50
61
|
}
|
|
51
|
-
const hyperLinkResult = this.getHyperLinkSetting(
|
|
62
|
+
const hyperLinkResult = this.getHyperLinkSetting(
|
|
63
|
+
this.column,
|
|
64
|
+
row,
|
|
65
|
+
this.isSql,
|
|
66
|
+
gridParams.additionalParamMap,
|
|
67
|
+
gridParams.contextParameter,
|
|
68
|
+
tableName,
|
|
69
|
+
this.listCode
|
|
70
|
+
)
|
|
52
71
|
hyperLinkResult.icon = this.getHyperIconClass(hyperLinkResult)
|
|
53
72
|
return hyperLinkResult
|
|
54
73
|
},
|
|
@@ -105,10 +124,7 @@ export default {
|
|
|
105
124
|
return 'primary'
|
|
106
125
|
}
|
|
107
126
|
}
|
|
108
|
-
|
|
109
127
|
}
|
|
110
128
|
</script>
|
|
111
129
|
|
|
112
|
-
<style>
|
|
113
|
-
|
|
114
|
-
</style>
|
|
130
|
+
<style></style>
|