agilebuilder-ui 1.0.84 → 1.0.85-temp2
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 +20663 -19719
- package/lib/super-ui.umd.cjs +74 -74
- package/package.json +1 -1
- 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/components/grid-icon.vue +7 -14
- package/packages/super-grid/src/components/hyperlinks.vue +24 -8
- package/packages/super-grid/src/custom-formatter.js +2 -1
- package/packages/super-grid/src/dynamic-input.vue +8 -1
- package/packages/super-grid/src/normal-column-content.vue +1078 -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 +40 -0
- package/packages/super-grid/src/super-grid.vue +73 -23
- package/packages/super-grid/src/utils.js +75 -56
- package/src/i18n/langs/cn.js +4 -1
- package/src/i18n/langs/en.js +3 -0
- package/src/utils/jump-page-utils.js +186 -291
package/package.json
CHANGED
|
@@ -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>
|
|
@@ -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>
|
|
@@ -16,7 +16,7 @@ const customFormatter = {
|
|
|
16
16
|
*/
|
|
17
17
|
customFormatValue(row, prop, format, rowIndex) {
|
|
18
18
|
// const start = new Date().getTime()
|
|
19
|
-
// console.log('---super-grid--customFormatValue--')
|
|
19
|
+
// console.log('---super-grid--customFormatValue--this.customFormat=', this.customFormat)
|
|
20
20
|
if (this.customFormat) {
|
|
21
21
|
let originalValue = row[prop]
|
|
22
22
|
if (this.isObjectProp(prop)) {
|
|
@@ -31,6 +31,7 @@ const customFormatter = {
|
|
|
31
31
|
this.column,
|
|
32
32
|
rowIndex
|
|
33
33
|
)
|
|
34
|
+
// console.log('---super-grid--customFormatValue--component=', component)
|
|
34
35
|
if (typeof component === 'undefined') {
|
|
35
36
|
return false
|
|
36
37
|
} else {
|
|
@@ -300,6 +300,7 @@
|
|
|
300
300
|
dynamicDataSourceCode: dynamicDataSourceCode,
|
|
301
301
|
valueSetOptions: valueSetOptions,
|
|
302
302
|
isSql: isSql,
|
|
303
|
+
backendUrl: baseURL,
|
|
303
304
|
additionalParameter: additionalParamMap ? JSON.stringify(additionalParamMap) : null
|
|
304
305
|
}"
|
|
305
306
|
:parent="parentFormData"
|
|
@@ -571,6 +572,11 @@ export default {
|
|
|
571
572
|
console.log('superGrid----window.location.protocol---', window.location.protocol)
|
|
572
573
|
const isShowScanIcon = isMobile && window.location.protocol === 'https:' ? true: false
|
|
573
574
|
const isApk = isMobile && userAgent && userAgent === 'app' ? true: false
|
|
575
|
+
|
|
576
|
+
let baseURL = gridParams.options.backendUrl
|
|
577
|
+
if (!baseURL) {
|
|
578
|
+
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
579
|
+
}
|
|
574
580
|
return {
|
|
575
581
|
deptManTree: false, // 是否是部门人员树
|
|
576
582
|
isMultiTree: false, // 是否是多选树
|
|
@@ -631,7 +637,8 @@ export default {
|
|
|
631
637
|
userAgent,
|
|
632
638
|
isApk,
|
|
633
639
|
isShowBrowserScan: false,
|
|
634
|
-
isShowScanIcon
|
|
640
|
+
isShowScanIcon,
|
|
641
|
+
baseURL
|
|
635
642
|
}
|
|
636
643
|
},
|
|
637
644
|
computed: {},
|