imatrix-ui 2.9.23-dw → 2.9.25-dw
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.umd.min.js +7 -7
- package/package.json +1 -1
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +19 -14
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +5 -2
- package/packages/super-grid/src/apis.js +20 -3
- package/packages/super-grid/src/dynamic-input.vue +7 -1
- package/packages/super-grid/src/super-grid-service.js +1 -0
- package/packages/super-grid/src/super-grid.vue +12 -0
- package/packages/super-nine-grid/src/super-grid-service.js +2 -1
- package/packages/super-nine-grid/src/super-nine-grid.vue +17 -6
- package/src/store/modules/user.js +3 -1
- package/src/utils/auth-api.js +9 -1
- package/src/utils/auth.js +4 -0
package/package.json
CHANGED
|
@@ -50,20 +50,25 @@ const dynamicSourceSelectService = {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
return new Promise((resolve, reject) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
// 页面设计不请求动态数据源
|
|
54
|
+
if (Vue.prototype.systemCode !== undefined && Vue.prototype.systemCode === 'iMatrix') {
|
|
55
|
+
resolve()
|
|
56
|
+
} else {
|
|
57
|
+
this.$http.post(backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(result => {
|
|
58
|
+
if (result.backendUrl) {
|
|
59
|
+
// result.backendUrl表示需要使用动态数据源所属的系统路径重新获得一次数据
|
|
60
|
+
this.$http.post(result.backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(finallyResult => {
|
|
61
|
+
resolve(finallyResult)
|
|
62
|
+
}).catch(error => {
|
|
63
|
+
reject(error)
|
|
64
|
+
})
|
|
65
|
+
} else {
|
|
66
|
+
resolve(result)
|
|
67
|
+
}
|
|
68
|
+
}).catch(error => {
|
|
69
|
+
reject(error)
|
|
70
|
+
})
|
|
71
|
+
}
|
|
67
72
|
})
|
|
68
73
|
}
|
|
69
74
|
}
|
|
@@ -252,7 +252,9 @@ export default {
|
|
|
252
252
|
}
|
|
253
253
|
this.$emit('set-value', {
|
|
254
254
|
value: targeValue,
|
|
255
|
-
targetColumnName: this.column.prop
|
|
255
|
+
targetColumnName: this.column.prop,
|
|
256
|
+
options: this.optionItems,
|
|
257
|
+
valueAttribute: this.valueAttribute
|
|
256
258
|
})
|
|
257
259
|
}
|
|
258
260
|
}
|
|
@@ -383,7 +385,8 @@ export default {
|
|
|
383
385
|
value: value,
|
|
384
386
|
sourceColumnName: sourceColumnName,
|
|
385
387
|
targetColumnName: targetColumnName,
|
|
386
|
-
options: this.optionItems
|
|
388
|
+
options: this.optionItems,
|
|
389
|
+
valueAttribute: this.valueAttribute
|
|
387
390
|
})
|
|
388
391
|
})
|
|
389
392
|
}
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
isLastEditRowSave,
|
|
6
6
|
isHasEditOption,
|
|
7
7
|
scrollYToBottom,
|
|
8
|
-
getAdditionalParamMap
|
|
8
|
+
getAdditionalParamMap,
|
|
9
|
+
isDynamicDataSourceSource
|
|
9
10
|
} from './utils'
|
|
10
11
|
import formValidatorService from './formValidatorUtil'
|
|
11
12
|
import Vue from 'vue'
|
|
@@ -782,14 +783,30 @@ gridParams.$rowIndex < gridParams.gridData.length) {
|
|
|
782
783
|
listCode = store.get('_list_code')
|
|
783
784
|
}
|
|
784
785
|
const gridParams = store.get(listCode)
|
|
786
|
+
const dynamicSourceSelectOptions = gridParams.dynamicSourceSelectOptions
|
|
785
787
|
const columns = gridParams.columns
|
|
786
788
|
columns.forEach(col => {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
+
const prop = col.prop
|
|
790
|
+
const isDynamicDataSource = isDynamicDataSourceSource(col)
|
|
791
|
+
if (dynamicSourceSelectOptions && isDynamicDataSource && dynamicSourceSelectOptions[prop]) {
|
|
792
|
+
// { options, valueAttribute }
|
|
793
|
+
const optionSet = dynamicSourceSelectOptions[prop]
|
|
794
|
+
result[prop] = this.packageDynamicDataSourceOptions(optionSet.options, optionSet.valueAttribute)
|
|
795
|
+
} else if (col.valueSet && col.valueSet.length > 0) {
|
|
796
|
+
result[prop] = col.valueSet
|
|
789
797
|
}
|
|
790
798
|
})
|
|
791
799
|
return result
|
|
792
800
|
},
|
|
801
|
+
packageDynamicDataSourceOptions(options, valueAttribute) {
|
|
802
|
+
if (options) {
|
|
803
|
+
options.forEach(item => {
|
|
804
|
+
item.value = item[valueAttribute]
|
|
805
|
+
item.label = item['_label_']
|
|
806
|
+
})
|
|
807
|
+
}
|
|
808
|
+
return options
|
|
809
|
+
},
|
|
793
810
|
// 取消列表的编辑状态
|
|
794
811
|
restoreGridEdit(listCode) {
|
|
795
812
|
if (!listCode) {
|
|
@@ -1186,9 +1186,15 @@ export default {
|
|
|
1186
1186
|
this.callCustomEventWithParam('replace', { originalValue, newValue, row: this.row, column: this.column, prop })
|
|
1187
1187
|
}
|
|
1188
1188
|
},
|
|
1189
|
-
setDynamicSourceSelectValue({ value, sourceColumnName, targetColumnName, options }) {
|
|
1189
|
+
setDynamicSourceSelectValue({ value, sourceColumnName, targetColumnName, options, valueAttribute }) {
|
|
1190
1190
|
if (targetColumnName) {
|
|
1191
1191
|
this.setCellValue(targetColumnName, value, 'input')
|
|
1192
|
+
// 动态数据源选项集合存储,导出报告时子表字段值的导出时有使用
|
|
1193
|
+
const gridParams = store.get(this.listCode)
|
|
1194
|
+
if (!gridParams.dynamicSourceSelectOptions) {
|
|
1195
|
+
gridParams.dynamicSourceSelectOptions = {}
|
|
1196
|
+
}
|
|
1197
|
+
gridParams.dynamicSourceSelectOptions[targetColumnName] = { options, valueAttribute }
|
|
1192
1198
|
}
|
|
1193
1199
|
},
|
|
1194
1200
|
multiselectChange(arr) {
|
|
@@ -34,6 +34,7 @@ const superGridService = {
|
|
|
34
34
|
this.isSql = isSqlSetting
|
|
35
35
|
param.isSql = isSqlSetting + ''
|
|
36
36
|
}
|
|
37
|
+
param.publishVersion = this.publishVersion
|
|
37
38
|
if (this.options && typeof (this.options.isAdministerListView) !== 'undefined' && this.options.isAdministerListView) {
|
|
38
39
|
param.isAdminister = this.options.isAdministerListView + ''
|
|
39
40
|
}
|
|
@@ -282,6 +282,10 @@ export default {
|
|
|
282
282
|
return {}
|
|
283
283
|
}
|
|
284
284
|
},
|
|
285
|
+
publishVersion: {
|
|
286
|
+
type: Number,
|
|
287
|
+
default: 0
|
|
288
|
+
},
|
|
285
289
|
// 为了兼容平台的旧写法,暂不删除以下属性
|
|
286
290
|
// 操作列、占位符列内容显示的函数,格式为:{'属性名':方法},例如:{'name':viewUser,'operation':showOperation}
|
|
287
291
|
customFormatter: {
|
|
@@ -635,6 +639,14 @@ export default {
|
|
|
635
639
|
handler(newValue, oldValue) {
|
|
636
640
|
this.$emit('change-rows-per-page', this.pageSize)
|
|
637
641
|
}
|
|
642
|
+
},
|
|
643
|
+
// 更新parent值
|
|
644
|
+
'options.extraParam.entityMap': {
|
|
645
|
+
deep: true,
|
|
646
|
+
handler(newValue, oldValue) {
|
|
647
|
+
console.log('watch====options.extraParam.entityMap===改变==', newValue)
|
|
648
|
+
this.parentFormData = newValue
|
|
649
|
+
}
|
|
638
650
|
}
|
|
639
651
|
},
|
|
640
652
|
provide() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-undef */
|
|
2
2
|
import Vue from 'vue'
|
|
3
|
-
import store from './store'
|
|
4
3
|
import { packageEnumAndBeanColumnValueSets } from '../../utils/value-set'
|
|
4
|
+
import store from './store'
|
|
5
5
|
import { isHasOptionFunction } from './utils'
|
|
6
6
|
const superGridService = {
|
|
7
7
|
initialize() {
|
|
@@ -12,6 +12,7 @@ const superGridService = {
|
|
|
12
12
|
this.isSql = isSqlSetting
|
|
13
13
|
param.isSql = isSqlSetting + ''
|
|
14
14
|
}
|
|
15
|
+
param.publishVersion = this.publishVersion
|
|
15
16
|
this.isLoading = true
|
|
16
17
|
// 初始化组件时先获取元信息再获取数据,以后翻页、排序、查询不再去获取元数据了
|
|
17
18
|
this.$http.post(url, param).then(data => {
|
|
@@ -27,15 +27,21 @@
|
|
|
27
27
|
</el-col>
|
|
28
28
|
<el-col v-for="(params,index) in gridData" :key="params.id" :span="6" :offset="1.5" class="col-content">
|
|
29
29
|
<el-card :body-style="{ padding: '0px' }" shadow="hover">
|
|
30
|
-
<div @mouseenter="enter(index)" @mouseleave="leave()" @click="clickContent(params)">
|
|
30
|
+
<!-- <div @mouseenter="enter(index)" @mouseleave="leave()" @click="clickContent(params)"> -->
|
|
31
|
+
<div @click="clickContent(params)">
|
|
31
32
|
<transition name="fade">
|
|
32
|
-
<div v-if="seen && index === current" class="popContainer">
|
|
33
|
-
|
|
33
|
+
<!-- <div v-if="seen && index === current" class="popContainer"> -->
|
|
34
|
+
<div class="popContainer">
|
|
35
|
+
<div class="else-button" style="background: rgba(0,0,0,0.5); min-height: 20%;">
|
|
36
|
+
<!-- <div class="else-button" style="min-height: 20%;"> -->
|
|
37
|
+
<slot :name="slotBefore" :params="params" />
|
|
34
38
|
<template v-for="button in operations">
|
|
35
39
|
<template v-if="isShowButton(params, button)">
|
|
36
40
|
<el-tooltip v-if="button.icon" :key="button.name" v-permission="button.permission?button.permission:'true'" class="item" effect="dark" :content="button.name" placement="top">
|
|
41
|
+
<!-- <em style="color: black;" :class="button.icon +' icons'" @click.stop="buttonClick(button.event, params)" /> -->
|
|
37
42
|
<em :class="button.icon +' icons'" @click.stop="buttonClick(button.event, params)" />
|
|
38
43
|
</el-tooltip>
|
|
44
|
+
<!-- <em v-else :key="button.name" v-permission="button.permission?button.permission:'true'" style="color: black;" :class="button.name +' icons'" @click.stop="buttonClick(button.event, params)">{{ button.name }} </em> -->
|
|
39
45
|
<em v-else :key="button.name" v-permission="button.permission?button.permission:'true'" :class="button.name +' icons'" @click.stop="buttonClick(button.event, params)">{{ button.name }} </em>
|
|
40
46
|
</template>
|
|
41
47
|
</template>
|
|
@@ -160,7 +166,7 @@
|
|
|
160
166
|
width: 23.15%;
|
|
161
167
|
display: block;
|
|
162
168
|
height: 200px;
|
|
163
|
-
background: rgba(0,0,0,0.5);
|
|
169
|
+
// background: rgba(0,0,0,0.5);
|
|
164
170
|
text-align: right;
|
|
165
171
|
}
|
|
166
172
|
.fade-enter-active, .fade-leave-active {
|
|
@@ -229,6 +235,10 @@ export default {
|
|
|
229
235
|
default: function() {
|
|
230
236
|
return {}
|
|
231
237
|
}
|
|
238
|
+
},
|
|
239
|
+
publishVersion: {
|
|
240
|
+
type: Number,
|
|
241
|
+
default: 0
|
|
232
242
|
}
|
|
233
243
|
},
|
|
234
244
|
data() {
|
|
@@ -280,7 +290,8 @@ export default {
|
|
|
280
290
|
storeId,
|
|
281
291
|
currentId: null, // 当前点击的记录id
|
|
282
292
|
isShowRadio, // 单选时是否显示单选按钮
|
|
283
|
-
titleStyle: null // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
|
|
293
|
+
titleStyle: null, // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
|
|
294
|
+
slotBefore: 'before'
|
|
284
295
|
}
|
|
285
296
|
},
|
|
286
297
|
computed: {
|
|
@@ -314,7 +325,7 @@ export default {
|
|
|
314
325
|
this.$watch('hasLoadData', function(newVal, oldVal) {
|
|
315
326
|
if (newVal === true) {
|
|
316
327
|
this.$nextTick(() => {
|
|
317
|
-
this.rowDrop()
|
|
328
|
+
// this.rowDrop()
|
|
318
329
|
const gridParams = store.get(this.storeId)
|
|
319
330
|
if (isHasOptionFunction('gridComplete', this.storeId)) {
|
|
320
331
|
gridParams.options.gridComplete.call(this, { gridData: this.gridData, columns: gridParams.columns, superGrid: this.$refs.superGrid })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ssoService from '../../api/sso-service'
|
|
2
|
-
import { setToken, removeToken, setUsername, getUsername, removeUsername, setCurrentUser, removeCurrentUser } from '../../utils/auth'
|
|
2
|
+
import { setToken, removeToken, setUsername, getUsername, removeUsername, setCurrentUser, removeCurrentUser, removePublishControl } from '../../utils/auth'
|
|
3
3
|
|
|
4
4
|
import { removePermissions, getPermissions, setPermissions, getMenus, setMenus, removeMenus } from '../../utils/permissionAuth'
|
|
5
5
|
|
|
@@ -102,6 +102,8 @@ const user = {
|
|
|
102
102
|
|
|
103
103
|
removeMenus()
|
|
104
104
|
|
|
105
|
+
removePublishControl()
|
|
106
|
+
|
|
105
107
|
resolve(data)
|
|
106
108
|
}).catch(error => {
|
|
107
109
|
reject(error)
|
package/src/utils/auth-api.js
CHANGED
|
@@ -4,6 +4,8 @@ import Vue from 'vue'
|
|
|
4
4
|
const jwtKey = 'JWT'
|
|
5
5
|
const currentUserNameKey = 'USERNAME'
|
|
6
6
|
const currentUserInfoKey = 'CURRENT_USER'
|
|
7
|
+
const versionEnv = 'VERSION_ENVIRONMENT'
|
|
8
|
+
const userVersion = 'CURRENT_USER_SYSTEM_VERSION'
|
|
7
9
|
|
|
8
10
|
function getToken() {
|
|
9
11
|
let token = getCookieCache(jwtKey)
|
|
@@ -96,6 +98,11 @@ function setSessionCache(key, value) {
|
|
|
96
98
|
function removeSessionCache(key) {
|
|
97
99
|
sessionStorage.removeItem(key)
|
|
98
100
|
}
|
|
101
|
+
|
|
102
|
+
function removePublishControl() {
|
|
103
|
+
removeCookieCache(versionEnv)
|
|
104
|
+
removeCookieCache(userVersion)
|
|
105
|
+
}
|
|
99
106
|
export default {
|
|
100
107
|
getToken,
|
|
101
108
|
setToken,
|
|
@@ -111,5 +118,6 @@ export default {
|
|
|
111
118
|
removeCookieCache,
|
|
112
119
|
getSessionCache,
|
|
113
120
|
setSessionCache,
|
|
114
|
-
removeSessionCache
|
|
121
|
+
removeSessionCache,
|
|
122
|
+
removePublishControl
|
|
115
123
|
}
|