agilebuilder-ui 1.1.50-sit1 → 1.1.50-sit2

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.
@@ -1,5 +1,5 @@
1
1
  import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
2
- import { _ as s } from "./index-c625583f.js";
2
+ import { _ as s } from "./index-d6261c73.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-c625583f.js";
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-d6261c73.js";
2
2
  import { resolveComponent as u, openBlock as l, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as C, renderList as T, 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-c625583f.js";
2
+ import { _ as I } from "./index-d6261c73.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,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.1.50-sit1",
3
+ "version": "1.1.50-sit2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -861,12 +861,20 @@ export default {
861
861
  // 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
862
862
  if (this.column.valueSetOptions) {
863
863
  if (this.column.componentType === 'switch') {
864
- const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
864
+ let valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
865
+ if(typeof valueSetOptionsObj === 'string'){
866
+ // 再转一次
867
+ valueSetOptionsObj = JSON.parse(valueSetOptionsObj)
868
+ }
865
869
  if (valueSetOptionsObj) {
866
870
  this.valueSetOptions = valueSetOptionsObj
867
871
  }
868
872
  } else if (this.column.componentType !== 'inputNumber') {
869
- const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
873
+ let valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
874
+ if(typeof valueSetOptionsObj === 'string'){
875
+ // 再转一次
876
+ valueSetOptionsObj = JSON.parse(valueSetOptionsObj)
877
+ }
870
878
  if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
871
879
  this.valueSetOptions = valueSetOptionsObj.valueSetOptions
872
880
  }
@@ -990,7 +998,11 @@ export default {
990
998
  */
991
999
  getDateAllowTime() {
992
1000
  if (this.column.valueSetOptions) {
993
- const optionsObj = JSON.parse(this.column.valueSetOptions)
1001
+ let optionsObj = JSON.parse(this.column.valueSetOptions)
1002
+ if(typeof optionsObj === 'string'){
1003
+ // 再转一次
1004
+ optionsObj = JSON.parse(optionsObj)
1005
+ }
994
1006
  const nowTime = Date.now()
995
1007
  if (optionsObj.stateForbiddenTime) {
996
1008
  const stateDayNumber = optionsObj.stateForbiddenTime
@@ -1822,7 +1834,11 @@ export default {
1822
1834
  this.column.valueSetOptions !== '' &&
1823
1835
  this.column.componentType === 'inputNumber'
1824
1836
  ) {
1825
- const inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1837
+ let inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1838
+ if(typeof inputNumberSetting === 'string'){
1839
+ // 再转一次
1840
+ inputNumberSetting = JSON.parse(inputNumberSetting)
1841
+ }
1826
1842
  if (inputNumberSetting.min) {
1827
1843
  defaultValue = inputNumberSetting.min
1828
1844
  }
@@ -1912,7 +1928,11 @@ export default {
1912
1928
  this.column.valueSetOptions !== '' &&
1913
1929
  this.column.componentType === 'inputNumber'
1914
1930
  ) {
1915
- const inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1931
+ let inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1932
+ if(typeof inputNumberSetting === 'string'){
1933
+ // 再转一次
1934
+ inputNumberSetting = JSON.parse(inputNumberSetting)
1935
+ }
1916
1936
  this.inputNumberSet = inputNumberSetting
1917
1937
  } else {
1918
1938
  this.inputNumberSet = {
@@ -27,7 +27,7 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
27
27
  let titleValueSet = null
28
28
  const titleValueSetJson = column.titleValueSet
29
29
  if (titleValueSetJson) {
30
- titleValueSet = packageEnumAndBeanColumnValueSet(JSON.parse(titleValueSetJson))
30
+ titleValueSet = column.titleValueSet
31
31
  }
32
32
  if (columnValueSet || titleValueSet) {
33
33
  const valueSetMeta = {
@@ -150,11 +150,7 @@ function getDataSourceConfigList(columns) {
150
150
  const column = columns[i]
151
151
  const prop = column.prop ? column.prop : column.label
152
152
  const columnValueSet = getConfigWithValueSet(column, prop, column)
153
- let titleValueSet = null
154
- const titleValueSetJson = column.titleValueSet
155
- if (titleValueSetJson) {
156
- titleValueSet = getConfigWithValueSet(JSON.parse(titleValueSetJson), prop)
157
- }
153
+ let titleValueSet = getConfigWithTitleValueSet(column.titleValueSetOptions, prop)
158
154
  if (columnValueSet || titleValueSet) {
159
155
  if (columnValueSet) {
160
156
  // 字段的值设置
@@ -178,14 +174,14 @@ function getConfigWithValueSet(valueSetInfo, prop, column) {
178
174
  * bean形式值设置前缀
179
175
  */
180
176
  const BEAN_NAME_PREFIX = 'beanname:'
181
- const enumName = valueSetInfo.enumName
182
- const beanName = valueSetInfo.beanName
177
+ const enumName = valueSetInfo?valueSetInfo.enumName:null
178
+ const beanName = valueSetInfo?valueSetInfo.beanName:null
183
179
  let infoObj = {
184
180
  uuid: prop
185
181
  }
186
182
  // 选项组的在解析列表字段配置时就获得了,不需要在此处获得了
187
183
  if (enumName && enumName !== '') {
188
- if (valueSetInfo.remoteEnum === true) {
184
+ if (valueSetInfo && valueSetInfo.remoteEnum === true) {
189
185
  // 需要远程获得枚举值
190
186
  infoObj.type = 'enumName'
191
187
  infoObj.props = {
@@ -233,3 +229,47 @@ function getConfigWithValueSet(valueSetInfo, prop, column) {
233
229
  }
234
230
  return null
235
231
  }
232
+
233
+ // 动态列标题列值设置解析
234
+ function getConfigWithTitleValueSet(valueSetOptions, prop) {
235
+ let valueSetOptionsObj
236
+ if(valueSetOptions){
237
+ valueSetOptionsObj = JSON.parse(valueSetOptions)
238
+ }
239
+ let infoObj = {
240
+ uuid: prop
241
+ }
242
+ if (valueSetOptionsObj) {
243
+ // 动态数据源(select开启value-label自动转换或者)、数据表/视图、服务
244
+ const valueSetOptionsObj = JSON.parse(valueSetOptions)
245
+ if (
246
+ valueSetOptionsObj.type || valueSetOptionsObj.dynamicDataSourceCode
247
+ ) {
248
+ // 表示是动态数据源等值设置信息
249
+ // const isShouldInitSearch = (valueSetOptionsObj.filterType === undefined || valueSetOptionsObj.filterType != 'remote')
250
+ if (!valueSetOptionsObj.type || valueSetOptionsObj.type !== 'optionGroup') {
251
+ // 选项组时不需要在此处获得
252
+ Object.assign(infoObj, valueSetOptionsObj)
253
+ // 更新uuid为字段名
254
+ infoObj.uuid = prop
255
+ if (!infoObj.props) {
256
+ infoObj.props = {}
257
+ }
258
+ infoObj.props.prop = prop
259
+ }
260
+ if (valueSetOptionsObj.dynamicDataSourceCode) {
261
+ infoObj.type = 'dynamicData'
262
+ if (!infoObj.props) {
263
+ infoObj.props = {}
264
+ }
265
+ infoObj.props.code = valueSetOptionsObj.dynamicDataSourceCode
266
+ }
267
+ }
268
+ }
269
+ if (infoObj.type) {
270
+ // 表示是有效的值设置
271
+ return infoObj
272
+ }
273
+ return null
274
+ }
275
+