agilebuilder-ui 1.1.43 → 1.1.45

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-9787409e.js";
2
+ import { _ as s } from "./index-465b0d69.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-9787409e.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-465b0d69.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-9787409e.js";
2
+ import { _ as I } from "./index-465b0d69.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.43",
3
+ "version": "1.1.45",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -460,7 +460,7 @@ export default {
460
460
  // 限制高度最低值
461
461
  hasMaxHeight() {
462
462
  if (this.maxHeight) {
463
- return this.maxHeight <= 100 ? 100 : this.maxHeight + this.heightOffset
463
+ return this.maxHeight <= 100 ? 100 : this.maxHeight + (this.heightOffset!==0?this.heightOffset:30)
464
464
  }
465
465
  return undefined
466
466
  },
@@ -468,7 +468,7 @@ export default {
468
468
  // 是指固定高度最低值
469
469
  hasTableHeight() {
470
470
  if (this.tableHeight) {
471
- return this.tableHeight <= 100 ? 100 : this.tableHeight + this.heightOffset
471
+ return this.tableHeight <= 100 ? 100 : this.tableHeight + (this.heightOffset!==0?this.heightOffset:30)
472
472
  }
473
473
  return undefined
474
474
  },
@@ -523,6 +523,8 @@ export default {
523
523
  // 表示不显示“序号”列
524
524
  return false
525
525
  }
526
+ // 存储有默认值的字段集合
527
+ this.storeHasDefaultValueColumns(column, gridParams)
526
528
  let isVisible
527
529
  if (column.show === undefined || column.show) {
528
530
  isVisible = true
@@ -547,8 +549,6 @@ export default {
547
549
  } else {
548
550
  isVisible = false
549
551
  }
550
- // 存储有默认值的字段集合
551
- this.storeHasDefaultValueColumns(column, gridParams)
552
552
  return isVisible
553
553
  })
554
554
  )
@@ -1288,7 +1288,11 @@ export default {
1288
1288
  if (gridParams.defaultValueColumns === undefined || gridParams.defaultValueColumns === null) {
1289
1289
  gridParams.defaultValueColumns = []
1290
1290
  }
1291
- gridParams.defaultValueColumns.push(column)
1291
+ // 放到defaultValueColumns前要根据column.prop判断是否已经存在
1292
+ const hasColumn = gridParams.defaultValueColumns.find((item) => item.prop === column.prop)
1293
+ if (!hasColumn) {
1294
+ gridParams.defaultValueColumns.push(column)
1295
+ }
1292
1296
  }
1293
1297
  },
1294
1298
  // 判断是不是表单子表的使用
@@ -3402,11 +3406,17 @@ export default {
3402
3406
  this.$refs.superGrid.setCurrentRow(this.tableDatas[rowIndex])
3403
3407
  },
3404
3408
  getSuperGridRef() {
3409
+ return this
3410
+ },
3411
+ getSuperGridTableRef() {
3405
3412
  return this.$refs.superGrid
3406
3413
  },
3407
3414
  getColumns() {
3408
3415
  return this.columns
3409
3416
  },
3417
+ getTableData() {
3418
+ return this.tableDatas
3419
+ },
3410
3420
  handRowKeyToUpperCase(row) {
3411
3421
  // 把row对象的所有key都转成大写
3412
3422
  if (row) {
@@ -227,6 +227,23 @@ body .el-table colgroup.gutter {
227
227
  flex-direction: column
228
228
  }
229
229
 
230
+ .amb-chart-container {
231
+ display: flex;
232
+ flex-direction: column;
233
+ height: 100%;
234
+ }
235
+
236
+ .amb-chart-header {
237
+ flex-shrink: 0;
238
+ }
239
+
240
+ .amb-chart-content {
241
+ /* 图表区域占据剩余空间 */
242
+ flex: 1;
243
+ /* 允许内容缩小 */
244
+ min-height: 0;
245
+ }
246
+
230
247
  .amb-widget-chart-header {
231
248
  border-bottom: 1px solid var(--el-card-border-color);
232
249
  padding: 6px 10px;
@@ -1,6 +1,5 @@
1
1
  import * as Vue from 'vue'
2
- import authApi from './auth-api'
3
- import { getToken, getLanguage, getAllLanguages, setAllLanguages, removeToken } from './auth'
2
+ import { getToken, getLanguage, getAllLanguages, setAllLanguages } from './auth'
4
3
  import { v4 as uuidv4 } from 'uuid'
5
4
  import { getCookieCache } from './auth'
6
5
  import i18nUtil from './i18n-util'
@@ -231,7 +230,11 @@ export function isPlateSys(systemCode) {
231
230
 
232
231
  export function getServerConfigUtil(http) {
233
232
  return new Promise((resolve, reject) => {
234
- http.get('./server-config.json').then((result) => {
233
+ let timestamp = '1'
234
+ if(__BUILD_TIME__) {
235
+ timestamp = __BUILD_TIME__
236
+ }
237
+ http.get('./server-config.json?t='+timestamp).then((result) => {
235
238
  const config = result
236
239
  for (const key in config) {
237
240
  window.$vueApp.config.globalProperties[key] = config[key]
@@ -245,10 +248,10 @@ export function getServerConfigUtil(http) {
245
248
  localStorage.setItem('_baseAPI_', window.$vueApp.config.globalProperties.baseAPI)
246
249
  localStorage.setItem('_amb_projectModel_', window.$vueApp.config.globalProperties.projectModel)
247
250
  if (config.fontIconAddress && window.insertCssFile) {
248
- window.insertCssFile(`${config.fontIconAddress}/iconfont.css`)
251
+ window.insertCssFile(`${config.fontIconAddress}/iconfont.css?t=${timestamp}`)
249
252
  }
250
253
  if (config.fontIconAddress && window.insertCssFile) {
251
- window.insertCssFile(`${config.fontIconAddress}-color/iconfont.css`)
254
+ window.insertCssFile(`${config.fontIconAddress}-color/iconfont.css?t=${timestamp}`)
252
255
  }
253
256
  resolve()
254
257
  })
@@ -557,27 +560,49 @@ async function handlePlateSysLang(currentLanguage) {
557
560
  }
558
561
  }
559
562
  }
563
+ // 缓存项目设值信息
564
+ export function cacheProjectSetting() {
565
+ return new Promise((resolve,reject)=>{
566
+ const projectSettingCache = localStorage.getItem('PROJECT_SETTINGS')
567
+ let projectSettings = null
568
+ if(projectSettingCache && projectSettingCache === '_EMPTY_VALUE') {
569
+ resolve(projectSettings)
570
+ } else if (projectSettingCache) {
571
+ projectSettings = JSON.parse(projectSettingCache)
572
+ setBrowserFavicon(projectSettings)
573
+ resolve(projectSettings)
574
+ } else {
575
+ window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + '/cfg/project-settings').then((data) => {
576
+ if(data){
577
+ localStorage.setItem('PROJECT_SETTINGS', JSON.stringify(data))
578
+ projectSettings = data
579
+ setBrowserFavicon(projectSettings)
580
+ } else {
581
+ localStorage.setItem('PROJECT_SETTINGS', '_EMPTY_VALUE')
582
+ }
583
+ resolve(projectSettings)
584
+ }).catch((error)=>{
585
+ reject(error)
586
+ })
587
+ }
588
+ })
589
+ }
560
590
 
561
- // export function setProjectSetting() {
562
- // const projectSettingCache = Cookies.get('PROJECT_SETTINGS')
563
- // let projectSettings = null
564
- // if (projectSettingCache) {
565
- // projectSettings = JSON.parse(projectSettingCache)
566
- // // TODO:工具方法中没有this,这个代码会报错,先注释该方法,没找到调用它的地方
567
- // this.setLogoUrl(projectSettings)
568
- // } else {
569
- // window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + '/cfg/project-settings').then((data) => {
570
- // Cookies.set('PROJECT_SETTINGS', JSON.stringify(data))
571
- // projectSettings = data
572
- // })
573
- // }
574
- // if (projectSettings.browserImageUuid) {
575
- // const linkElement = document.getElementById('ambBrowserIcon')
576
- // if (linkElement) {
577
- // linkElement.href = window.$vueApp.config.globalProperties.baseAPI + '/cfg/project/icon/browserIcon'
578
- // }
579
- // }
580
- // }
591
+ function setBrowserFavicon(projectSettings){
592
+ const linkElement = document.getElementById('ambBrowserIcon')
593
+ if(!linkElement){
594
+ return
595
+ }
596
+ if (projectSettings) {
597
+ const browserIconUrl = window.$vueApp.config.globalProperties.baseAPI + '/cfg/project/icon/browserIcon?t='+__BUILD_TIME__
598
+ if(projectSettings.browserImageUuid && (!linkElement.href || linkElement.href !== browserIconUrl) ){
599
+ linkElement.href = browserIconUrl
600
+ }
601
+ }
602
+ if(!linkElement.href) {
603
+ linkElement.href = 'favicon.svg?t='+__BUILD_TIME__
604
+ }
605
+ }
581
606
 
582
607
  // 动态加载css
583
608
  export function loadCSS() {
package/src/utils/util.js CHANGED
@@ -259,15 +259,30 @@ function parseCondition(
259
259
  // 再获取属于那张表
260
260
  const propDbNameArr = propDbName.split('_+_')
261
261
  propDbName = propDbNameArr[1]
262
- leftValue = getValue(parentFormData, propDbName, isSql)
262
+ if (pageContext && propDbName && propDbName.indexOf('${')>=0) {
263
+ leftValue = getPropValueNew(propDbName, pageContext, entity)
264
+ } else {
265
+ leftValue = getValue(parentFormData, propDbName, isSql)
266
+ }
267
+ // leftValue = getValue(parentFormData, propDbName, isSql)
263
268
  } else {
264
- leftValue = getValue(entity, propDbName, isSql)
269
+ if (pageContext && propDbName && propDbName.indexOf('${')>=0) {
270
+ leftValue = getPropValueNew(propDbName, pageContext, entity)
271
+ } else {
272
+ leftValue = getValue(entity, propDbName, isSql)
273
+ }
274
+ // leftValue = getValue(entity, propDbName, isSql)
265
275
  }
266
276
  if (leftValue === undefined || leftValue === null) {
267
277
  if (tableName && propDbName.toLowerCase().startsWith(tableName.toLowerCase() + '.')) {
268
278
  // 表示是当前表的字段
269
279
  const myProp = propDbName.substring(propDbName.indexOf('.'))
270
- leftValue = getValue(entity, myProp, isSql)
280
+ if (pageContext && myProp && myProp.indexOf('${')>=0) {
281
+ leftValue = getPropValueNew(myProp, pageContext, entity)
282
+ } else {
283
+ leftValue = getValue(entity, myProp, isSql)
284
+ }
285
+ // leftValue = getValue(entity, myProp, isSql)
271
286
  }
272
287
  }
273
288
  } else {
@@ -275,12 +290,27 @@ function parseCondition(
275
290
  propName = propName.replace('parent_+_', '')
276
291
  const propNameArr = propName.split('_+_')
277
292
  propName = propNameArr[1]
278
- leftValue = getValue(parentFormData, propName, isSql)
293
+ if (pageContext && propName && propName.indexOf('${')>=0) {
294
+ leftValue = getPropValueNew(propName, pageContext, entity)
295
+ } else {
296
+ leftValue =getValue(parentFormData, propName, isSql)
297
+ }
298
+ // leftValue = getValue(parentFormData, propName, isSql)
279
299
  } else {
280
- leftValue = getValue(entity, propName, isSql)
300
+ if (pageContext && propName && propName.indexOf('${')>=0) {
301
+ leftValue = getPropValueNew(propName, pageContext, entity)
302
+ } else {
303
+ leftValue = getValue(entity, propName, isSql)
304
+ }
305
+ // leftValue = getValue(entity, propName, isSql)
281
306
  }
282
307
  if (propDbName && (leftValue === undefined || leftValue === null)) {
283
- leftValue = getValue(entity, propDbName, isSql)
308
+ if (pageContext && propDbName && propDbName.indexOf('${')>=0) {
309
+ leftValue = getPropValueNew(propDbName, pageContext, entity)
310
+ } else {
311
+ leftValue = getValue(entity, propDbName, isSql)
312
+ }
313
+ // leftValue = getValue(entity, propDbName, isSql)
284
314
  }
285
315
  }
286
316
  const operator = condition.operator
@@ -291,7 +321,7 @@ function parseCondition(
291
321
  // 判断value类型
292
322
  let value
293
323
  if (pageContext) {
294
- value = getPropValueNew(propValue, pageContext)
324
+ value = getPropValueNew(propValue, pageContext, entity)
295
325
  } else {
296
326
  value = getPropValue(propValue, entity, additionalParamMap, contextParameterMap)
297
327
  }
@@ -83,7 +83,7 @@ export default defineComponent({
83
83
  } else {
84
84
  // 有子菜单时
85
85
  vnodes.push(
86
- h('div', { class: ['smb-sidebar-menu-item-title'] }, [
86
+ h('div', { class: titleClass }, [
87
87
  h(
88
88
  'div',
89
89
  {