agilebuilder-ui 1.1.35 → 1.1.36-p1
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-20f1c97c.js → 401-b8934d65.js} +1 -1
- package/lib/{404-36d09e24.js → 404-743a4631.js} +1 -1
- package/lib/{iframe-page-51c292dc.js → iframe-page-5e102433.js} +1 -1
- package/lib/{index-19f46200.js → index-a0c08bb5.js} +529 -473
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +48 -48
- package/lib/{tab-content-iframe-index-5d9d85c0.js → tab-content-iframe-index-e9b465bf.js} +1 -1
- package/lib/{tab-content-index-bd535c86.js → tab-content-index-313404d0.js} +1 -1
- package/lib/{tache-subprocess-history-56bf69ba.js → tache-subprocess-history-7d87cd77.js} +1 -1
- package/package.json +1 -1
- package/packages/super-grid/src/formatter.js +4 -3
- package/packages/super-grid/src/normal-column-content.vue +23 -0
- 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/super-icon/src/index.vue +7 -1
- package/packages/utils/value-set.js +147 -1
- package/src/styles/theme/black/font-style.scss +2 -0
- package/src/styles/theme/blue/font-style.scss +2 -0
- package/src/styles/theme/blue2/font-style.scss +2 -0
- package/src/styles/theme/dark-blue/font.scss +2 -0
- package/src/styles/theme/gray/font-style.scss +2 -0
- package/src/styles/theme/green/font.scss +3 -1
- package/src/styles/theme/ocean-blue/font.scss +3 -1
- package/src/styles/theme/tiffany-blue-mobile/font.scss +2 -0
- package/src/utils/file-util.ts +32 -0
- package/src/utils/util.js +721 -715
- package/src/views/dsc-component/Sidebar/Item.vue +7 -2
|
@@ -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-a0c08bb5.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-a0c08bb5.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-a0c08bb5.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 + ''
|
|
@@ -395,6 +395,7 @@ import GridIcon from './components/grid-icon.vue'
|
|
|
395
395
|
import { formatScanRuleSets } from './scan-util.ts'
|
|
396
396
|
import storeVuex from '../../../src/store'
|
|
397
397
|
import { isPromise } from '../../../src/utils/common-util'
|
|
398
|
+
import { ElMessage } from 'element-plus'
|
|
398
399
|
|
|
399
400
|
export default {
|
|
400
401
|
components: {
|
|
@@ -563,6 +564,10 @@ export default {
|
|
|
563
564
|
// 手动触发编辑状态
|
|
564
565
|
isEditing() {
|
|
565
566
|
try {
|
|
567
|
+
// 是否符合编辑条件
|
|
568
|
+
if (!this.validateEditConditions()) {
|
|
569
|
+
return false
|
|
570
|
+
}
|
|
566
571
|
// 没权限
|
|
567
572
|
if (!this.hasEditPermission) return
|
|
568
573
|
// 检测到单选修改模式
|
|
@@ -1244,6 +1249,24 @@ export default {
|
|
|
1244
1249
|
resolve(false)
|
|
1245
1250
|
}
|
|
1246
1251
|
})
|
|
1252
|
+
},
|
|
1253
|
+
validateEditConditions() {
|
|
1254
|
+
if (this.controlConfig && this.controlConfig.editConditions?.length > 0) {
|
|
1255
|
+
const gridParams = store.get(this.listCode)
|
|
1256
|
+
const options = gridParams.options
|
|
1257
|
+
// 非流程表单时才验证编辑条件
|
|
1258
|
+
if (!options.isWorkflowEntity && options.validateEitConditions) {
|
|
1259
|
+
const canEdit = options.validateEitConditions({
|
|
1260
|
+
row: this.row,
|
|
1261
|
+
editConditions: this.controlConfig.editConditions,
|
|
1262
|
+
listCode: this.listCode
|
|
1263
|
+
})
|
|
1264
|
+
if (!canEdit) {
|
|
1265
|
+
return false
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
return true
|
|
1247
1270
|
}
|
|
1248
1271
|
},
|
|
1249
1272
|
emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<i v-if="iconValue.indexOf('amb-icon-') === 0" class="amb-iconfont" :class="iconValue" />
|
|
3
|
-
<i v-else-if="iconValue.indexOf('amb-color-icon-') === 0" class="amb-color-iconfont" :class="iconValue" />
|
|
3
|
+
<i v-else-if="iconValue.indexOf('amb-color-icon-') === 0" class="amb-color-iconfont super-icon" :class="iconValue" />
|
|
4
4
|
<i v-else-if="iconValue.indexOf('fa-') === 0" :class="'fa ' + iconValue" />
|
|
5
5
|
<img
|
|
6
6
|
v-else-if="iconValue.indexOf('svg-img-') === 0"
|
|
@@ -40,3 +40,9 @@ const defaultShowImageAction = ref(
|
|
|
40
40
|
window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/show-image?serverPath='
|
|
41
41
|
)
|
|
42
42
|
</script>
|
|
43
|
+
<style lang="scss" scoped>
|
|
44
|
+
.super-icon {
|
|
45
|
+
width: 14px;
|
|
46
|
+
height: 14px;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// ...所有支持的icon
|
|
2
|
+
const iconList = [
|
|
3
|
+
'amb-color-icon-XLS',
|
|
4
|
+
'amb-color-icon-XLSX',
|
|
5
|
+
'amb-color-icon-DOC',
|
|
6
|
+
'amb-color-icon-DOCX',
|
|
7
|
+
'amb-color-icon-PDF',
|
|
8
|
+
'amb-color-icon-TXT',
|
|
9
|
+
'amb-color-icon-JPG',
|
|
10
|
+
'amb-color-icon-PNG',
|
|
11
|
+
'amb-color-icon-ZIP',
|
|
12
|
+
'amb-color-icon-unknown'
|
|
13
|
+
]
|
|
14
|
+
// 列表_5215278368.xls
|
|
15
|
+
export function getFileIconByName(fileName: string): string {
|
|
16
|
+
if (!fileName) {
|
|
17
|
+
return 'amb-color-icon-unknown'
|
|
18
|
+
}
|
|
19
|
+
let fileType = fileName.substring(fileName.lastIndexOf('.') + 1) // 获取文件名
|
|
20
|
+
if (!fileType) {
|
|
21
|
+
return 'amb-color-icon-unknown'
|
|
22
|
+
}
|
|
23
|
+
switch (fileType) {
|
|
24
|
+
case 'xlsx':
|
|
25
|
+
fileType = 'XLS'
|
|
26
|
+
break
|
|
27
|
+
case 'docx':
|
|
28
|
+
fileType = 'DOC'
|
|
29
|
+
break
|
|
30
|
+
}
|
|
31
|
+
return 'amb-color-icon-' + fileType.toUpperCase()
|
|
32
|
+
}
|