agilebuilder-ui 1.0.79-temp2 → 1.0.80-tmp1
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 +16290 -15715
- package/lib/super-ui.umd.cjs +69 -69
- package/package.json +1 -1
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +2 -2
- package/packages/rich-editor/index.vue +29 -0
- package/packages/super-grid/src/apis.js +2 -2
- package/packages/super-grid/src/dynamic-input.vue +15 -8
- package/packages/super-grid/src/group-column.vue +5 -0
- package/packages/super-grid/src/normal-column.vue +22 -8
- package/packages/super-grid/src/row-operation.vue +19 -10
- package/packages/super-grid/src/super-grid-service.js +4 -1
- package/packages/super-grid/src/super-grid.vue +31 -4
- package/packages/super-grid/src/utils.js +118 -36
- package/packages/super-nine-grid/src/super-nine-grid.vue +2 -0
- package/packages/workflow-button/src/workflow-button.vue +6 -1
- package/src/permission.js +5 -2
- package/src/utils/calculator/calculator-util.js +14 -0
- package/src/utils/permission.js +7 -1
- package/src/utils/permissionAuth.js +47 -1
package/package.json
CHANGED
|
@@ -196,7 +196,7 @@ export default {
|
|
|
196
196
|
}
|
|
197
197
|
let lastValues = []
|
|
198
198
|
if (this.baseProps.multiple !== undefined && this.baseProps.multiple === true) {
|
|
199
|
-
if (this.value !== undefined && this.value !== null &&
|
|
199
|
+
if (this.value !== undefined && this.value !== null && Array.isArray(this.value)) {
|
|
200
200
|
lastValues = JSON.parse(JSON.stringify(this.value))
|
|
201
201
|
}
|
|
202
202
|
}
|
|
@@ -296,7 +296,7 @@ export default {
|
|
|
296
296
|
// })
|
|
297
297
|
// }
|
|
298
298
|
// 默认选中处理
|
|
299
|
-
if (dynamicDataSourceDto.defaultSelect) {
|
|
299
|
+
if (dynamicDataSourceDto.defaultSelect && (this.value === undefined || this.value === null || this.value === '')) {
|
|
300
300
|
// 多选处理
|
|
301
301
|
/**
|
|
302
302
|
if (this.baseProps.multiple) {
|
|
@@ -40,6 +40,19 @@
|
|
|
40
40
|
>
|
|
41
41
|
<div :id="fullscreenViewerId"/>
|
|
42
42
|
</el-dialog>
|
|
43
|
+
<!--<el-image-->
|
|
44
|
+
<!-- ref="preview"-->
|
|
45
|
+
<!-- :src="imgList[0]"-->
|
|
46
|
+
<!-- :preview-src-list="imgList"-->
|
|
47
|
+
<!-- style="display: none"-->
|
|
48
|
+
<!--/>-->
|
|
49
|
+
<ElImageViewer
|
|
50
|
+
v-if="isLightBoxVisible"
|
|
51
|
+
hide-on-click-modal
|
|
52
|
+
:initial-index="0"
|
|
53
|
+
:url-list="imgList"
|
|
54
|
+
:on-close="() =>{isLightBoxVisible = false}"
|
|
55
|
+
/>
|
|
43
56
|
</div>
|
|
44
57
|
</template>
|
|
45
58
|
|
|
@@ -92,11 +105,13 @@ import 'tinymce/plugins/visualchars' //
|
|
|
92
105
|
import 'tinymce/plugins/wordcount' // 数字统计
|
|
93
106
|
import 'tinymce/skins/ui/oxide/skin.css' // 编辑器皮肤样式
|
|
94
107
|
import './tinymce/zh_CN.js'
|
|
108
|
+
import {ElImageViewer} from 'element-plus'
|
|
95
109
|
|
|
96
110
|
export default {
|
|
97
111
|
name: 'RichEditor',
|
|
98
112
|
components: {
|
|
99
113
|
Editor,
|
|
114
|
+
ElImageViewer
|
|
100
115
|
},
|
|
101
116
|
props: {
|
|
102
117
|
entity: {
|
|
@@ -188,6 +203,18 @@ export default {
|
|
|
188
203
|
}
|
|
189
204
|
return url
|
|
190
205
|
},
|
|
206
|
+
setup: (editor) => {
|
|
207
|
+
editor.on('click', (e) => {
|
|
208
|
+
const targetNode = e.target.nodeName
|
|
209
|
+
if (targetNode === 'IMG') {
|
|
210
|
+
// 这里可以实现自定义的图片预览逻辑
|
|
211
|
+
const imgSrc = e.target.src
|
|
212
|
+
this.imgList = []
|
|
213
|
+
this.imgList.push(imgSrc)
|
|
214
|
+
this.isLightBoxVisible = true
|
|
215
|
+
}
|
|
216
|
+
})
|
|
217
|
+
},
|
|
191
218
|
images_upload_handler: (blobInfo, success, failure, progress) => {
|
|
192
219
|
let file
|
|
193
220
|
if (blobInfo.blob() instanceof File) {
|
|
@@ -223,6 +250,8 @@ export default {
|
|
|
223
250
|
dialogVisible: false,
|
|
224
251
|
fullscreenViewerId: 'editor_viewer_' + new Date().getTime(),
|
|
225
252
|
ImageComponent: null,
|
|
253
|
+
imgList: [],
|
|
254
|
+
isLightBoxVisible: false
|
|
226
255
|
}
|
|
227
256
|
},
|
|
228
257
|
watch: {
|
|
@@ -139,9 +139,9 @@ const apis = {
|
|
|
139
139
|
const gridParams = store.get(listCode)
|
|
140
140
|
const gridData = gridParams.gridData
|
|
141
141
|
gridParams.superGrid.clearSort()
|
|
142
|
-
|
|
142
|
+
console.log('创建行记录的条件1', gridParams.lineEdit)
|
|
143
143
|
// console.log('创建行记录的条件2', gridParams.lineEdit.editable)
|
|
144
|
-
|
|
144
|
+
console.log('创建行记录的条件3', gridParams.loaded)
|
|
145
145
|
if (
|
|
146
146
|
gridParams.lineEdit &&
|
|
147
147
|
gridParams.lineEdit.editable &&
|
|
@@ -1590,15 +1590,19 @@ export default {
|
|
|
1590
1590
|
isSaveAll = true
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
this.innerValue.
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
this.
|
|
1593
|
+
if (this.type === 'multiselect') {
|
|
1594
|
+
// console.log('multiselectChange2---this.innerValue=', this.innerValue)
|
|
1595
|
+
if (this.innerValue && typeof this.innerValue !== 'number' && this.innerValue.indexOf('saveAll') !== -1) {
|
|
1596
|
+
this.innerValue.splice(this.innerValue.indexOf('saveAll'), 1)
|
|
1597
|
+
}
|
|
1598
|
+
// console.log('multiselectChange3---this.innerValue=', this.innerValue)
|
|
1599
|
+
const val = this.innerValue && this.innerValue.length > 0 ? this.innerValue.join(',') : null
|
|
1600
|
+
if (isSaveAll) {
|
|
1601
|
+
this.cellEvent('input', val)
|
|
1602
|
+
}
|
|
1603
|
+
this.cellEvent('change', val)
|
|
1604
|
+
this.setCellValue(this.column.prop, val, 'change')
|
|
1600
1605
|
}
|
|
1601
|
-
this.cellEvent('change', arr)
|
|
1602
1606
|
},
|
|
1603
1607
|
getDefaultValue(val) {
|
|
1604
1608
|
// 表示当前字段的是空的,但是有默认值时,给当前字段设置值
|
|
@@ -1712,6 +1716,9 @@ export default {
|
|
|
1712
1716
|
isInvalidValue(value) {
|
|
1713
1717
|
return value === undefined || value === null || value === ''
|
|
1714
1718
|
},
|
|
1719
|
+
refreshList() {
|
|
1720
|
+
this.$emit('refresh-list')
|
|
1721
|
+
},
|
|
1715
1722
|
getSwitchConfig(switchProp) {
|
|
1716
1723
|
if (this.valueSetOptions && this.valueSetOptions[switchProp]) {
|
|
1717
1724
|
return this.valueSetOptions[switchProp]
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
@refresPortsData="refresPortsData"
|
|
21
21
|
@refresMainTableFields="refresMainTableFields"
|
|
22
22
|
@prohibit-to-edit="prohibitToEdit"
|
|
23
|
+
@open-page="openPageDialog"
|
|
23
24
|
/>
|
|
24
25
|
</template>
|
|
25
26
|
<template v-else>
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
:grid-data="gridData"
|
|
34
35
|
:page-grid-data="gridData"
|
|
35
36
|
@prohibit-to-edit="prohibitToEdit"
|
|
37
|
+
@open-page="openPageDialog"
|
|
36
38
|
/>
|
|
37
39
|
</template>
|
|
38
40
|
</el-table-column>
|
|
@@ -108,6 +110,9 @@ export default {
|
|
|
108
110
|
},
|
|
109
111
|
prohibitToEdit(entity) {
|
|
110
112
|
this.$emit('prohibit-to-edit', entity)
|
|
113
|
+
},
|
|
114
|
+
openPageDialog(openPageParams) {
|
|
115
|
+
this.$emit('open-page', openPageParams)
|
|
111
116
|
}
|
|
112
117
|
}
|
|
113
118
|
}
|
|
@@ -11,9 +11,17 @@
|
|
|
11
11
|
:width="getColumnWidth()"
|
|
12
12
|
>
|
|
13
13
|
<template v-slot:header>
|
|
14
|
-
<span :class="{
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<span v-if="!column.customHeader" :class="{is_req: isFieldRequired()}">
|
|
15
|
+
<span :title="$escapeHtml(label)" class="cell--span required__label" v-html="$escapeHtml(label)" />
|
|
16
|
+
</span>
|
|
17
|
+
<component
|
|
18
|
+
:is="column.customHeader"
|
|
19
|
+
v-else
|
|
20
|
+
:prop="column.prop"
|
|
21
|
+
:parent="parentFormData"
|
|
22
|
+
:grid-data="gridData"
|
|
23
|
+
:current-page="currentPage"
|
|
24
|
+
/>
|
|
17
25
|
<el-icon v-if="isShowAdd" style="font-size: 20px; color: #409eff" @click="createFormSubTableRow">
|
|
18
26
|
<CirclePlus />
|
|
19
27
|
</el-icon>
|
|
@@ -41,6 +49,7 @@
|
|
|
41
49
|
@findIndex="findIndex(scope.$index)"
|
|
42
50
|
@focus="onFocus(scope.$index)"
|
|
43
51
|
@prohibit-to-edit="prohibitToEdit"
|
|
52
|
+
@refresh-list="refreshList"
|
|
44
53
|
@refresData="refresData"
|
|
45
54
|
@refresMainTableFields="refresMainTableFields"
|
|
46
55
|
@refresPortData="refresPortData"
|
|
@@ -94,6 +103,8 @@
|
|
|
94
103
|
:operation-index="operationIndex"
|
|
95
104
|
:operation-setting="operation.props"
|
|
96
105
|
:row-index="scope.$index"
|
|
106
|
+
:list-code="listCode"
|
|
107
|
+
:parent-form-data="parentFormData"
|
|
97
108
|
/>
|
|
98
109
|
</span>
|
|
99
110
|
</span>
|
|
@@ -147,6 +158,7 @@
|
|
|
147
158
|
:component-id="componentId"
|
|
148
159
|
:additional-settings="controlConfig"
|
|
149
160
|
@prohibitToEdit="prohibitToEdit"
|
|
161
|
+
@refresh-list="refreshList"
|
|
150
162
|
/></span>
|
|
151
163
|
<span
|
|
152
164
|
v-else-if="
|
|
@@ -444,12 +456,12 @@ export default {
|
|
|
444
456
|
if (this.column.controlConfig) {
|
|
445
457
|
controlConfig = JSON.parse(this.column.controlConfig)
|
|
446
458
|
}
|
|
447
|
-
|
|
459
|
+
|
|
448
460
|
let scanEnable = false
|
|
449
|
-
if
|
|
461
|
+
if(controlConfig.scanEnable){
|
|
450
462
|
scanEnable = true
|
|
451
463
|
}
|
|
452
|
-
const componentId = this.listCode
|
|
464
|
+
const componentId = this.listCode+'_'+this.column.prop
|
|
453
465
|
return {
|
|
454
466
|
selectRow: null,
|
|
455
467
|
that: this,
|
|
@@ -1036,6 +1048,9 @@ export default {
|
|
|
1036
1048
|
changeDisabled(state) {
|
|
1037
1049
|
this.disabled = state
|
|
1038
1050
|
},
|
|
1051
|
+
refreshList() {
|
|
1052
|
+
this.$emit('refresh-list')
|
|
1053
|
+
},
|
|
1039
1054
|
getFilesFormatter() {
|
|
1040
1055
|
if (this.column.formatter.options?.fileSet) {
|
|
1041
1056
|
return JSON.parse(this.column.formatter.options.fileSet)
|
|
@@ -1046,7 +1061,7 @@ export default {
|
|
|
1046
1061
|
* 设置条码扫描解析规则
|
|
1047
1062
|
*/
|
|
1048
1063
|
setScanRuleSets() {
|
|
1049
|
-
if
|
|
1064
|
+
if(this.scanEnable && this.controlConfig && this.controlConfig.scanRuleList) {
|
|
1050
1065
|
formatScanRuleSets(this.controlConfig.scanRuleList).then((res) => {
|
|
1051
1066
|
//扫描处理
|
|
1052
1067
|
this.column._scanRuleSets = res
|
|
@@ -1068,7 +1083,6 @@ export default {
|
|
|
1068
1083
|
.m-requried {
|
|
1069
1084
|
float: left;
|
|
1070
1085
|
white-space: nowrap;
|
|
1071
|
-
width: 100%;
|
|
1072
1086
|
}
|
|
1073
1087
|
|
|
1074
1088
|
.m-requried::after {
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
import { mapGetters } from 'vuex'
|
|
50
50
|
import customFormatter from './custom-formatter'
|
|
51
51
|
import { analysisCondition } from '../../../src/utils/util'
|
|
52
|
+
import store from './store'
|
|
52
53
|
export default {
|
|
53
54
|
name: 'RowOperation',
|
|
54
55
|
props: {
|
|
@@ -89,6 +90,14 @@ export default {
|
|
|
89
90
|
type: Number,
|
|
90
91
|
default: null,
|
|
91
92
|
},
|
|
93
|
+
listCode: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: null
|
|
96
|
+
},
|
|
97
|
+
parentFormData: {
|
|
98
|
+
type: Object,
|
|
99
|
+
default: null
|
|
100
|
+
}
|
|
92
101
|
},
|
|
93
102
|
data() {
|
|
94
103
|
return {
|
|
@@ -152,6 +161,7 @@ export default {
|
|
|
152
161
|
},
|
|
153
162
|
isShowButton() {
|
|
154
163
|
// const start = new Date().getTime()
|
|
164
|
+
const gridParams = store.get(this.listCode)
|
|
155
165
|
const val = customFormatter.isShowButtonFun(
|
|
156
166
|
this.entity,
|
|
157
167
|
this.column,
|
|
@@ -162,16 +172,15 @@ export default {
|
|
|
162
172
|
const displayJudgment = JSON.stringify(
|
|
163
173
|
this.operationSetting.buttonDisplayConditionsList
|
|
164
174
|
)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
true,
|
|
171
|
-
|
|
172
|
-
null,
|
|
173
|
-
|
|
174
|
-
)
|
|
175
|
+
if (gridParams) {
|
|
176
|
+
let tableName = null
|
|
177
|
+
if (gridParams.basicInfo.tableName) {
|
|
178
|
+
tableName = gridParams.basicInfo.tableName
|
|
179
|
+
}
|
|
180
|
+
return analysisCondition(displayJudgment, this.entity, gridParams.additionalParamMap, gridParams.contextParameter, true, tableName, this.parentFormData)
|
|
181
|
+
} else {
|
|
182
|
+
return analysisCondition(displayJudgment, this.entity, {}, {}, true, null, null)
|
|
183
|
+
}
|
|
175
184
|
}
|
|
176
185
|
|
|
177
186
|
if (val) {
|
|
@@ -203,6 +203,7 @@ const superGridService = {
|
|
|
203
203
|
configureObj: this.configureObj
|
|
204
204
|
})
|
|
205
205
|
}
|
|
206
|
+
console.log('fetchData-----this.options.initSearch=', this.options.initSearch,'gridParams.basicInfo.initializationQuery=', gridParams.basicInfo.initializationQuery, '0000000')
|
|
206
207
|
if (canFetchData === undefined || canFetchData === true) {
|
|
207
208
|
// 表示初始化时查询记录
|
|
208
209
|
if (this.options.isPageInfo) {
|
|
@@ -213,6 +214,7 @@ const superGridService = {
|
|
|
213
214
|
'undefined' ||
|
|
214
215
|
gridParams.basicInfo.initializationQuery
|
|
215
216
|
) {
|
|
217
|
+
console.log('fetchData-----this.loadCompleteQuery=', this.loadCompleteQuery, '1111111')
|
|
216
218
|
// 判断是否初始化完查询条件后再查询数据
|
|
217
219
|
if (this.loadCompleteQuery) {
|
|
218
220
|
this.isLoading = false
|
|
@@ -220,7 +222,7 @@ const superGridService = {
|
|
|
220
222
|
this.fetchData()
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
|
-
} else if (this.options.initSearch
|
|
225
|
+
} else if (this.options.initSearch) {
|
|
224
226
|
// 判断是否初始化完查询条件后再查询数据
|
|
225
227
|
if (this.loadCompleteQuery) {
|
|
226
228
|
this.isLoading = false
|
|
@@ -308,6 +310,7 @@ const superGridService = {
|
|
|
308
310
|
if (queryParameterSize > 0) {
|
|
309
311
|
this.loadCompleteQuery = true
|
|
310
312
|
}
|
|
313
|
+
console.log('isLoadCompleteQuery-----this.loadCompleteQuery=', this.loadCompleteQuery)
|
|
311
314
|
}
|
|
312
315
|
},
|
|
313
316
|
packageColumnOptionMap(gridParams) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div :style="subTableStyle">
|
|
3
3
|
<search-form
|
|
4
4
|
v-if="
|
|
5
5
|
!isFormSubTable &&
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
:page-grid-data="
|
|
103
103
|
isSubTableShowPage ? getSubTableGridData(subTableData) : gridData
|
|
104
104
|
"
|
|
105
|
+
@refresh-list="refreshList"
|
|
105
106
|
@open-page="openPageDialog"
|
|
106
107
|
@refresPortData="refresPortData"
|
|
107
108
|
@refresPortsData="refresPortsData"
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
"
|
|
136
137
|
@open-page="openPageDialog"
|
|
137
138
|
@refresData="refresData"
|
|
139
|
+
@refresh-list="refreshList"
|
|
138
140
|
@refresPortData="refresPortData"
|
|
139
141
|
@refresPortsData="refresPortsData"
|
|
140
142
|
@refresMainTableFields="refresMainTableFields"
|
|
@@ -458,7 +460,8 @@ export default {
|
|
|
458
460
|
pageContext, // 页面配置上下文
|
|
459
461
|
configureObj, // 表格配置信息
|
|
460
462
|
isMobile, // 是否是移动端
|
|
461
|
-
isShowMobileSearch: false // 是否显示移动端查询区域
|
|
463
|
+
isShowMobileSearch: false, // 是否显示移动端查询区域
|
|
464
|
+
subTableStyle: {}
|
|
462
465
|
}
|
|
463
466
|
},
|
|
464
467
|
computed: {
|
|
@@ -785,11 +788,21 @@ export default {
|
|
|
785
788
|
pageGridData: this.isSubTableShowPage
|
|
786
789
|
? this.gridData
|
|
787
790
|
: null,
|
|
791
|
+
listCode: this.code,
|
|
788
792
|
additionalParamMap: gridParams.additionalParamMap,
|
|
789
793
|
pageContext: this.pageContext,
|
|
790
794
|
configureObj: this.configureObj
|
|
791
795
|
})
|
|
792
796
|
}
|
|
797
|
+
this.$emit('gridComplete', {
|
|
798
|
+
gridData: this.isSubTableShowPage ? this.subTableData : this.gridData,
|
|
799
|
+
columns: gridParams.columns,
|
|
800
|
+
superGrid: this.$refs.superGrid,
|
|
801
|
+
isMobile: false,
|
|
802
|
+
listCode: this.code,
|
|
803
|
+
pageGridData: this.isSubTableShowPage ? this.gridData : null,
|
|
804
|
+
additionalParamMap: gridParams.additionalParamMap
|
|
805
|
+
})
|
|
793
806
|
})
|
|
794
807
|
}
|
|
795
808
|
},
|
|
@@ -1256,6 +1269,7 @@ export default {
|
|
|
1256
1269
|
gridParams.options.isFormSubTable === true
|
|
1257
1270
|
) {
|
|
1258
1271
|
this.isFormSubTable = true
|
|
1272
|
+
this.subTableStyle = { width: '100%' }
|
|
1259
1273
|
}
|
|
1260
1274
|
},
|
|
1261
1275
|
/**
|
|
@@ -1651,13 +1665,14 @@ export default {
|
|
|
1651
1665
|
|
|
1652
1666
|
this.isLoading = true
|
|
1653
1667
|
this.hasLoadData = false
|
|
1668
|
+
console.log('fetchData--isSearch--', isSearch)
|
|
1654
1669
|
if (isSearch === undefined || isSearch === false) {
|
|
1655
1670
|
// 如果不是查询时才需要从缓存中获得结果
|
|
1656
1671
|
// 如果是刷新当前列表,则需要获得缓存中的window.sessionStorage
|
|
1657
1672
|
const isRefreshList = window.sessionStorage.getItem(
|
|
1658
1673
|
'refreshList-' + this.code
|
|
1659
1674
|
)
|
|
1660
|
-
|
|
1675
|
+
console.log('fetchData--isRefreshList--', isRefreshList)
|
|
1661
1676
|
if (isRefreshList !== undefined && isRefreshList === 'true') {
|
|
1662
1677
|
const searchParamJson = window.sessionStorage.getItem(
|
|
1663
1678
|
'searchParam-' + this.code
|
|
@@ -1743,11 +1758,13 @@ export default {
|
|
|
1743
1758
|
configureObj: this.configureObj
|
|
1744
1759
|
})
|
|
1745
1760
|
}
|
|
1761
|
+
console.log('fetchData--canFetchData--', canFetchData, 'requestUrl=', requestUrl)
|
|
1746
1762
|
return new Promise((resolve, reject) => {
|
|
1747
1763
|
if(isPromise(canFetchData)){
|
|
1748
1764
|
canFetchData.then((result)=>{
|
|
1749
1765
|
if(result === undefined || result) {
|
|
1750
1766
|
if(!requestUrl){
|
|
1767
|
+
gridParams.loaded = true
|
|
1751
1768
|
resolve()
|
|
1752
1769
|
} else {
|
|
1753
1770
|
this.doRequest(requestUrl, param, parentRowIds, gridParams, resove).then(()=>{
|
|
@@ -1758,24 +1775,30 @@ export default {
|
|
|
1758
1775
|
}
|
|
1759
1776
|
} else {
|
|
1760
1777
|
console.error('beforeRequest result is false!!')
|
|
1778
|
+
gridParams.loaded = true
|
|
1761
1779
|
resolve()
|
|
1762
1780
|
}
|
|
1763
1781
|
}).catch((error)=>{
|
|
1782
|
+
gridParams.loaded = true
|
|
1764
1783
|
reject(error)
|
|
1765
1784
|
})
|
|
1766
1785
|
} else {
|
|
1767
1786
|
if (canFetchData === undefined || canFetchData === true) {
|
|
1768
1787
|
if(!requestUrl){
|
|
1788
|
+
gridParams.loaded = true
|
|
1769
1789
|
resolve()
|
|
1770
1790
|
} else {
|
|
1771
1791
|
this.doRequest(requestUrl, param, parentRowIds, gridParams, resove).then(()=>{
|
|
1792
|
+
gridParams.loaded = true
|
|
1772
1793
|
resolve()
|
|
1773
1794
|
}).catch((error)=>{
|
|
1795
|
+
gridParams.loaded = true
|
|
1774
1796
|
reject(error)
|
|
1775
1797
|
})
|
|
1776
1798
|
}
|
|
1777
1799
|
} else {
|
|
1778
1800
|
console.error('beforeRequest result is false!!')
|
|
1801
|
+
gridParams.loaded = true
|
|
1779
1802
|
resolve()
|
|
1780
1803
|
}
|
|
1781
1804
|
}
|
|
@@ -1886,6 +1909,7 @@ export default {
|
|
|
1886
1909
|
this.hasLoadData = true
|
|
1887
1910
|
} else {
|
|
1888
1911
|
// 对数据做序列化,比如:处理xss攻击
|
|
1912
|
+
gridParams.loaded = true
|
|
1889
1913
|
if (isHasOptionFunction('gridDataLoaded', this.code)) {
|
|
1890
1914
|
gridParams.options.gridDataLoaded.call(this, {
|
|
1891
1915
|
gridData: data,
|
|
@@ -2902,7 +2926,7 @@ export default {
|
|
|
2902
2926
|
if (index < 0) {
|
|
2903
2927
|
index = 0
|
|
2904
2928
|
}
|
|
2905
|
-
this.editRow(index)
|
|
2929
|
+
this.editRow(index, this.code)
|
|
2906
2930
|
}
|
|
2907
2931
|
}
|
|
2908
2932
|
}
|
|
@@ -3115,6 +3139,9 @@ export default {
|
|
|
3115
3139
|
store.set(this.code, gridParams)
|
|
3116
3140
|
this['subTableData'] = data
|
|
3117
3141
|
},
|
|
3142
|
+
refreshList() {
|
|
3143
|
+
this.fetchData(this.getSearchParam())
|
|
3144
|
+
},
|
|
3118
3145
|
// 选择记录
|
|
3119
3146
|
selectRecord(selection, row){
|
|
3120
3147
|
let selectRecordEventResult = true
|