agilebuilder-ui 1.1.35-sit1 → 1.1.35-sit3
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/{401-02854e97.js → 401-cf905888.js} +1 -1
- package/lib/{404-7fc14953.js → 404-5a6f0cf4.js} +1 -1
- package/lib/{iframe-page-f229d784.js → iframe-page-603a05cd.js} +1 -1
- package/lib/{index-73d07db3.js → index-78107f31.js} +6003 -5955
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +48 -48
- package/lib/{tab-content-iframe-index-f6bcacf3.js → tab-content-iframe-index-8f8128dd.js} +1 -1
- package/lib/{tab-content-index-4a0d7f2d.js → tab-content-index-9d7fc3c7.js} +1 -1
- package/lib/{tache-subprocess-history-dcb3009a.js → tache-subprocess-history-a3e8a008.js} +1 -1
- package/package.json +1 -1
- package/packages/super-grid/src/formatter.js +4 -3
- package/packages/super-grid/src/search-form-open.vue +0 -1
- package/packages/super-grid/src/super-grid-service.js +1 -1
- package/packages/super-grid/src/utils.js +8 -0
- package/packages/utils/value-set.js +147 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
|
|
2
|
-
import { _ as s } from "./index-
|
|
2
|
+
import { _ as s } from "./index-78107f31.js";
|
|
3
3
|
const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
|
|
4
4
|
this.src = this.$route.query.src;
|
|
5
5
|
} }, mounted() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-
|
|
1
|
+
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-78107f31.js";
|
|
2
2
|
import { resolveComponent as u, openBlock as d, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as T, renderList as C, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
|
|
3
3
|
const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
|
|
4
4
|
return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
|
|
2
|
-
import { _ as I } from "./index-
|
|
2
|
+
import { _ as I } from "./index-78107f31.js";
|
|
3
3
|
const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
|
|
4
4
|
const o = this.$route.query.workflowId;
|
|
5
5
|
o && (this.workflowId = parseInt(o));
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isDynamicDataSourceSource } from './utils'
|
|
2
1
|
import dayjs from 'dayjs'
|
|
3
2
|
import weekOfYear from 'dayjs/plugin/weekOfYear'
|
|
4
3
|
dayjs.extend(weekOfYear)
|
|
@@ -165,7 +164,7 @@ export function doFormatWithValueSet(column, value) {
|
|
|
165
164
|
const valueSet = column.valueSet
|
|
166
165
|
// 先处理值设置再处理格式化设置:即会对值设置的结果进行格式化设置
|
|
167
166
|
if (valueSet !== undefined) {
|
|
168
|
-
if (column.componentType === 'multiselect'
|
|
167
|
+
if (column.componentType === 'multiselect') {
|
|
169
168
|
if (typeof value === 'number') {
|
|
170
169
|
// 当value是0时, value instanceof Number 为false
|
|
171
170
|
value += ''
|
|
@@ -180,7 +179,9 @@ export function doFormatWithValueSet(column, value) {
|
|
|
180
179
|
label.push(item[0].label)
|
|
181
180
|
}
|
|
182
181
|
})
|
|
183
|
-
|
|
182
|
+
if(label.length > 0){
|
|
183
|
+
value = label.join(',')
|
|
184
|
+
}
|
|
184
185
|
} else {
|
|
185
186
|
const item = valueSet.filter((item) => {
|
|
186
187
|
return item.value === value + ''
|
|
@@ -101,7 +101,7 @@ const superGridService = {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
// 需要多个组件共享的数据放到store中,避免组件定义一堆props来接收这些共享数据
|
|
104
|
-
packageEnumAndBeanColumnValueSets(data.columns, this.code)
|
|
104
|
+
packageEnumAndBeanColumnValueSets(data.columns, this.code, gridParams.additionalParamMap, this.parentFormData)
|
|
105
105
|
.then(() => {
|
|
106
106
|
return this.getDynamicColumnByBean(
|
|
107
107
|
additionalParams,
|
|
@@ -755,7 +755,15 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap, b
|
|
|
755
755
|
|
|
756
756
|
// 值设置是否是动态数据源类型的数据源
|
|
757
757
|
export function isDynamicDataSourceSource(column) {
|
|
758
|
+
if(column.valueSetOptions) {
|
|
759
|
+
const valueSetOptionsObj = JSON.parse(column.valueSetOptions)
|
|
760
|
+
if((valueSetOptionsObj.type && valueSetOptionsObj.type === 'dynamicData') || valueSetOptionsObj.dynamicDataSourceCode){
|
|
761
|
+
// 表示是动态数据源
|
|
762
|
+
return true
|
|
763
|
+
}
|
|
764
|
+
}
|
|
758
765
|
if (column.valueSet && column.valueSet.length > 0 && column.valueSet[0].value === 'dynamicDataSource') {
|
|
766
|
+
// 表示是动态数据源
|
|
759
767
|
return true
|
|
760
768
|
} else {
|
|
761
769
|
return false
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import * as Vue from 'vue'
|
|
2
|
+
import { isPlateSys } from '../../src/utils/common-util'
|
|
3
|
+
|
|
4
|
+
export function packageEnumAndBeanColumnValueSets(columns, listCode, additionalParamMap, entity) {
|
|
5
|
+
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
6
|
+
// 平台系统时,beanName和枚举类型时
|
|
7
|
+
return packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode)
|
|
8
|
+
} else {
|
|
9
|
+
// 业务系统时,获得选项配置
|
|
10
|
+
return packageEnumAndBeanColumnValueSetsWhenOtherSys(columns, listCode, additionalParamMap, entity)
|
|
11
|
+
}
|
|
12
|
+
}
|
|
2
13
|
/**
|
|
3
14
|
* 封装值设置为枚举 或 bean方式时的值为'key-value'键值对信息
|
|
4
15
|
*/
|
|
5
|
-
|
|
16
|
+
function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
6
17
|
return new Promise((resolve, reject) => {
|
|
7
18
|
const valueSetColumnsInfo = {
|
|
8
19
|
listCode: listCode,
|
|
@@ -95,3 +106,138 @@ function packageEnumAndBeanColumnValueSet(valueSetInfo) {
|
|
|
95
106
|
return BEAN_NAME_PREFIX + beanName
|
|
96
107
|
}
|
|
97
108
|
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 封装值设置为枚举 或 bean方式时的值为'key-value'键值对信息
|
|
112
|
+
*/
|
|
113
|
+
function packageEnumAndBeanColumnValueSetsWhenOtherSys(columns, listCode, additionalParamMap, entity, systemCode) {
|
|
114
|
+
return new Promise((resolve, reject) => {
|
|
115
|
+
const dataSourceList = getDataSourceConfigList(columns)
|
|
116
|
+
const valueSetColumnIndexs = dataSourceList.valueSetColumnIndexs
|
|
117
|
+
const param = {
|
|
118
|
+
listCode: listCode,
|
|
119
|
+
entityMap: entity,
|
|
120
|
+
additionalParamMap: additionalParamMap,
|
|
121
|
+
dataSourceList: dataSourceList.dataSourceConfigList,
|
|
122
|
+
dataSourceListTitle: dataSourceList.dataSourceConfigListTitle,
|
|
123
|
+
systemCode: systemCode
|
|
124
|
+
}
|
|
125
|
+
const url = window.$vueApp.config.globalProperties.baseURL + '/common/common-data/find-grid-datas'
|
|
126
|
+
//const url = window['$vueApp'].config.globalProperties.baseAPI + '/common/common-data/xxxx'
|
|
127
|
+
window.$vueApp.config.globalProperties.$http
|
|
128
|
+
.post(url, param)
|
|
129
|
+
.then((result) => {
|
|
130
|
+
const columnValueSet = result.columnValueSet
|
|
131
|
+
const columnTitleValueSet = result.columnTitleValueSet
|
|
132
|
+
for(let prop in valueSetColumnIndexs){
|
|
133
|
+
const columnIndex = valueSetColumnIndexs[prop]
|
|
134
|
+
const valueSet = columnValueSet[prop]
|
|
135
|
+
if (valueSet) {
|
|
136
|
+
columns[columnIndex].valueSet = valueSet
|
|
137
|
+
}
|
|
138
|
+
const valueSetTitle = columnTitleValueSet[prop]
|
|
139
|
+
if (valueSetTitle) {
|
|
140
|
+
columns[columnIndex].titleValueSetValue = valueSetTitle
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
console.log('查询选项数据完成', result)
|
|
144
|
+
resolve(result)
|
|
145
|
+
})
|
|
146
|
+
.catch((error) => {
|
|
147
|
+
console.log('查询选项数据失败', error)
|
|
148
|
+
//失败时
|
|
149
|
+
reject(error)
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function getDataSourceConfigList(columns) {
|
|
155
|
+
const dataSourceConfigList = []
|
|
156
|
+
const dataSourceConfigListTitle = []
|
|
157
|
+
const valueSetColumnIndexs = {}
|
|
158
|
+
for (let i = 0; i < columns.length; i++) {
|
|
159
|
+
const column = columns[i]
|
|
160
|
+
const prop = column.prop ? column.prop : column.label
|
|
161
|
+
const columnValueSet = getConfigWithValueSet(column, prop, column)
|
|
162
|
+
let titleValueSet = null
|
|
163
|
+
const titleValueSetJson = column.titleValueSet
|
|
164
|
+
if (titleValueSetJson) {
|
|
165
|
+
titleValueSet = getConfigWithValueSet(JSON.parse(titleValueSetJson), prop)
|
|
166
|
+
}
|
|
167
|
+
if (columnValueSet || titleValueSet) {
|
|
168
|
+
if (columnValueSet) {
|
|
169
|
+
// 字段的值设置
|
|
170
|
+
dataSourceConfigList.push(columnValueSet)
|
|
171
|
+
}
|
|
172
|
+
if (titleValueSet) {
|
|
173
|
+
dataSourceConfigListTitle.push(titleValueSet)
|
|
174
|
+
}
|
|
175
|
+
valueSetColumnIndexs[prop] = i
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return {dataSourceConfigList, dataSourceConfigListTitle, valueSetColumnIndexs}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function getConfigWithValueSet(valueSetInfo, prop, column) {
|
|
182
|
+
/**
|
|
183
|
+
* 枚举类型值设置前缀
|
|
184
|
+
*/
|
|
185
|
+
const ENUM_NAME_PREFIX = 'enumname:'
|
|
186
|
+
/**
|
|
187
|
+
* bean形式值设置前缀
|
|
188
|
+
*/
|
|
189
|
+
const BEAN_NAME_PREFIX = 'beanname:'
|
|
190
|
+
const enumName = valueSetInfo.enumName
|
|
191
|
+
const beanName = valueSetInfo.beanName
|
|
192
|
+
let infoObj = {
|
|
193
|
+
uuid: prop
|
|
194
|
+
}
|
|
195
|
+
// 选项组的在解析列表字段配置时就获得了,不需要在此处获得了
|
|
196
|
+
if (enumName && enumName !== '') {
|
|
197
|
+
if (valueSetInfo.remoteEnum === true) {
|
|
198
|
+
// 需要远程获得枚举值
|
|
199
|
+
infoObj.type = 'enumName'
|
|
200
|
+
infoObj.props = {
|
|
201
|
+
prop: prop,
|
|
202
|
+
valueSet: ENUM_NAME_PREFIX + enumName
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
} else if (beanName && beanName !== '') {
|
|
206
|
+
infoObj.type = 'beanName'
|
|
207
|
+
infoObj.props = {
|
|
208
|
+
prop: prop,
|
|
209
|
+
valueSet: BEAN_NAME_PREFIX + beanName
|
|
210
|
+
}
|
|
211
|
+
}else if(column && column.valueSetOptions) {
|
|
212
|
+
// 动态数据源、数据表/视图、服务
|
|
213
|
+
const valueSetOptionsObj = JSON.parse(column.valueSetOptions)
|
|
214
|
+
if((valueSetOptionsObj.type || valueSetOptionsObj.dynamicDataSourceCode) && valueSetOptionsObj.valueLabelSwitch){
|
|
215
|
+
// 表示是动态数据源等值设置信息
|
|
216
|
+
// const isShouldInitSearch = (valueSetOptionsObj.filterType === undefined || valueSetOptionsObj.filterType != 'remote')
|
|
217
|
+
if(!valueSetOptionsObj.type || valueSetOptionsObj.type !== 'optionGroup'){
|
|
218
|
+
// 选项组时不需要在此处获得
|
|
219
|
+
Object.assign(infoObj, valueSetOptionsObj)
|
|
220
|
+
// 更新uuid为字段名
|
|
221
|
+
infoObj.uuid = prop
|
|
222
|
+
if(!infoObj.props){
|
|
223
|
+
infoObj.props = {}
|
|
224
|
+
}
|
|
225
|
+
infoObj.props.prop = prop
|
|
226
|
+
}
|
|
227
|
+
if(valueSetOptionsObj.dynamicDataSourceCode){
|
|
228
|
+
infoObj.type = 'dynamicData'
|
|
229
|
+
if(!infoObj.props){
|
|
230
|
+
infoObj.props = {}
|
|
231
|
+
}
|
|
232
|
+
infoObj.props.code = valueSetOptionsObj.dynamicDataSourceCode
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if(infoObj.type){
|
|
237
|
+
// 表示是有效的值设置
|
|
238
|
+
return infoObj
|
|
239
|
+
}
|
|
240
|
+
return null
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
|