agilebuilder-ui 1.0.85-temp7 → 1.0.85-tempf8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.0.85-temp7",
3
+ "version": "1.0.85-tempf8",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -356,7 +356,7 @@ export default {
356
356
  },
357
357
  changeEvent(newValue){
358
358
  this.inputValue(newValue)
359
- this.$emit('change', newValue)
359
+ this.change(newValue)
360
360
  },
361
361
  /**
362
362
  * @description: 获取提示标题
@@ -100,7 +100,7 @@
100
100
  :show-value="$escapeHtml(getLabel(row, rowIndex))"
101
101
  :value="getCellValue(row)"
102
102
  :additional-param-map="additionalParamMap"
103
- :additional-settings="controlConfig"
103
+ :additional-settings="additionalSettings"
104
104
  />
105
105
  </span>
106
106
  <!-- 自定义格式的时候 -->
@@ -136,7 +136,7 @@
136
136
  :additional-param-map="additionalParamMap"
137
137
  :listCode="listCode"
138
138
  :component-id="componentId"
139
- :additional-settings="controlConfig"
139
+ :additional-settings="additionalSettings"
140
140
  @prohibitToEdit="prohibitToEdit"
141
141
  @refresh-list="refreshList"
142
142
  /></span>
@@ -271,7 +271,7 @@
271
271
  columnFormatter !== undefined &&
272
272
  columnFormatter.type !== undefined &&
273
273
  columnFormatter.type === 'hyperlinks' &&
274
- getMyHyperLinkSetting(row).visible === true
274
+ getMyHyperLinkSetting(row, rowIndex).visible === true
275
275
  "
276
276
  type="primary"
277
277
  @click="clickHyperLink(column, row, listCode, rowIndex)"
@@ -280,17 +280,17 @@
280
280
  v-if="isShowOverflowTooltip"
281
281
  :id="column.prop + 'DomData' + rowIndex"
282
282
  :style="isShowForm ? {} : { width: cellWidth + 'px' }"
283
- :title="$escapeHtml(getMyHyperLinkSetting(row).title)"
283
+ :title="$escapeHtml(getMyHyperLinkSetting(row, rowIndex).title)"
284
284
  :class="isShowForm ? '' : 'ellipsis cell--span'"
285
- >{{ $escapeHtml(getMyHyperLinkSetting(row).label) }}
286
- <el-icon v-if="getMyHyperLinkSetting(row).icon">
287
- <component :is="getMyHyperLinkSetting(row).icon" />
285
+ >{{ $escapeHtml(getMyHyperLinkSetting(row, rowIndex).label) }}
286
+ <el-icon v-if="getMyHyperLinkSetting(row, rowIndex).icon">
287
+ <component :is="getMyHyperLinkSetting(row, rowIndex).icon" />
288
288
  </el-icon>
289
289
  </span>
290
290
  <span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'"
291
- >{{ $escapeHtml(getMyHyperLinkSetting(row).label) }}
292
- <el-icon v-if="getMyHyperLinkSetting(row).icon">
293
- <component :is="getMyHyperLinkSetting(row).icon" />
291
+ >{{ $escapeHtml(getMyHyperLinkSetting(row, rowIndex).label) }}
292
+ <el-icon v-if="getMyHyperLinkSetting(row, rowIndex).icon">
293
+ <component :is="getMyHyperLinkSetting(row, rowIndex).icon" />
294
294
  </el-icon>
295
295
  </span>
296
296
  </el-link>
@@ -482,9 +482,10 @@ export default {
482
482
  getTableGridData: gridParams.options.getGridData,
483
483
  additionalParamMap,
484
484
  disabled: false,
485
- controlConfig: this.getColumnCustomControlControlConfig(this.column.formatter),
485
+ additionalSettings: this.getColumnCustomControlControlConfig(this.column.formatter),
486
486
  scanEnable,
487
487
  componentId,
488
+ controlConfig,
488
489
  rowLinkConfigMapping: {}
489
490
  }
490
491
  },
@@ -922,7 +923,8 @@ export default {
922
923
  tableName,
923
924
  this.listCode
924
925
  )
925
- if (hyperLinkResult.jumpPageSetting) {
926
+ debugger
927
+ if (hyperLinkResult.jumpPageSetting && rowIndex !== undefined) {
926
928
  this.rowLinkConfigMapping[rowIndex] = hyperLinkResult.jumpPageSetting
927
929
  }
928
930
  hyperLinkResult.icon = this.getHyperIconClass(hyperLinkResult)
@@ -1006,7 +1008,12 @@ export default {
1006
1008
  getColumnCustomControlControlConfig(columnFormatter) {
1007
1009
  if (columnFormatter && columnFormatter.options && columnFormatter.options.controlConfig) {
1008
1010
  const controlConfig = JSON.parse(columnFormatter.options.controlConfig)
1011
+ if (this.controlConfig) {
1012
+ Object.assign(controlConfig, this.controlConfig)
1013
+ }
1009
1014
  return controlConfig
1015
+ } else {
1016
+ return this.controlConfig
1010
1017
  }
1011
1018
  },
1012
1019
  isRequired(editing) {
@@ -340,7 +340,7 @@ const superGridService = {
340
340
  if (column.queryType && column.queryType !== 'no' && column.componentType && (column.componentType === 'date' || column.componentType === 'dateSection' ||
341
341
  column.componentType === 'timePicker' || column.componentType === 'dateTimePicker')) {
342
342
  // 配置了默认值
343
- if (column.controlConfig) {
343
+ if (column.controlConfig && column.controlConfig.timeDefaultQueryRange) {
344
344
  queryParameterSize++
345
345
  }
346
346
  }
@@ -256,6 +256,7 @@ import {getEntityFieldValueWithOutCase, setEntityFieldValue} from '../../../src/
256
256
  import eventBus from './eventBus'
257
257
  import {
258
258
  addDynamicProp,
259
+ getControlConfig,
259
260
  getExtraParam,
260
261
  getFirstEditableColumn,
261
262
  getGridParams,
@@ -1422,6 +1423,7 @@ export default {
1422
1423
  const gridParams = store.get(this.code)
1423
1424
  let funName = null
1424
1425
  let columnOptions = null
1426
+ let columnStyleSetting = null
1425
1427
  if (param && param.column && param.column.property) {
1426
1428
  if (gridParams && gridParams.columnOptionMap) {
1427
1429
  if (gridParams.columnOptionMap[param.column.property]) {
@@ -1429,6 +1431,10 @@ export default {
1429
1431
  if (columnOptions.events && columnOptions.events.cellStyle) {
1430
1432
  funName = columnOptions.events.cellStyle
1431
1433
  }
1434
+ const controlConfig = getControlConfig(columnOptions)
1435
+ if (controlConfig && controlConfig['cellStyle']) {
1436
+ columnStyleSetting = controlConfig['cellStyle']
1437
+ }
1432
1438
  }
1433
1439
  }
1434
1440
  }
@@ -1437,7 +1443,8 @@ export default {
1437
1443
  if (isHasOptionFunction('cellStyleRender', this.code)) {
1438
1444
  param.additionalParamMap = gridParams.additionalParamMap
1439
1445
  param.pageContext = this.pageContext
1440
- param.configureOb = this.configureObj
1446
+ param.configureObj = this.configureObj
1447
+ param.cellStyle = columnStyleSetting
1441
1448
  return gridParams.options.cellStyleRender.call(this, param)
1442
1449
  } else if (
1443
1450
  funName !== null &&
@@ -1453,7 +1460,8 @@ export default {
1453
1460
  column: columnOptions,
1454
1461
  prop: param.column.property,
1455
1462
  additionalParamMap: gridParams.additionalParamMap,
1456
- rowIndex: param.rowIndex
1463
+ rowIndex: param.rowIndex,
1464
+ cellStyle: columnStyleSetting
1457
1465
  }
1458
1466
  return gridParams.options['eventCallBack'][funName].call(this, params)
1459
1467
  }
@@ -1489,6 +1497,7 @@ export default {
1489
1497
  const gridParams = store.get(this.code)
1490
1498
  let funName = null
1491
1499
  let columnOptions = null
1500
+ let titleStyleSetting = null
1492
1501
  if (param && param.column && param.column.property) {
1493
1502
  if (gridParams && gridParams.columnOptionMap) {
1494
1503
  if (gridParams.columnOptionMap[param.column.property]) {
@@ -1499,43 +1508,54 @@ export default {
1499
1508
  ) {
1500
1509
  funName = columnOptions.events.headerCellStyle
1501
1510
  }
1511
+ const controlConfig = getControlConfig(columnOptions)
1512
+ if (controlConfig && controlConfig['titleStyle']) {
1513
+ titleStyleSetting = controlConfig['titleStyle']
1514
+ }
1502
1515
  }
1503
1516
  }
1504
1517
  }
1505
1518
  // 应用模式
1506
1519
  // 修改表头样式,当某些字段需要编辑时,某些字段不需要编辑时,为了突出显示有权限编辑的字段,可以使用该功能
1507
- if (
1508
- gridParams.options.renderHeader &&
1509
- gridParams.options.renderHeader.props
1510
- ) {
1511
- const column = param.column
1512
- const props = gridParams.options.renderHeader.props
1513
- const propsArr = props.split(',')
1514
- for (let i = 0; i < propsArr.length; i++) {
1515
- const prop = propsArr[i]
1516
- if (column.property === prop.trim()) {
1517
- let backgroundColor = '#c3f4e2'
1518
- if (
1519
- typeof gridParams.options.renderHeader.color !== 'undefined'
1520
- ) {
1521
- backgroundColor = gridParams.options.renderHeader.color
1520
+ if (isHasOptionFunction('titleStyleRender', this.code)) {
1521
+ param.additionalParamMap = gridParams.additionalParamMap
1522
+ param.pageContext = this.pageContext
1523
+ param.configureObj = this.configureObj
1524
+ param.titleStyle = titleStyleSetting
1525
+ return gridParams.options.titleStyleRender.call(this, param)
1526
+ } else if (
1527
+ gridParams.options.renderHeader &&
1528
+ gridParams.options.renderHeader.props
1529
+ ) {
1530
+ const column = param.column
1531
+ const props = gridParams.options.renderHeader.props
1532
+ const propsArr = props.split(',')
1533
+ for (let i = 0; i < propsArr.length; i++) {
1534
+ const prop = propsArr[i]
1535
+ if (column.property === prop.trim()) {
1536
+ let backgroundColor = '#c3f4e2'
1537
+ if (
1538
+ typeof gridParams.options.renderHeader.color !== 'undefined'
1539
+ ) {
1540
+ backgroundColor = gridParams.options.renderHeader.color
1541
+ }
1542
+ return { background: backgroundColor }
1522
1543
  }
1523
- return { background: backgroundColor }
1524
1544
  }
1545
+ } else if (
1546
+ funName !== null &&
1547
+ columnOptions !== null &&
1548
+ gridParams.options &&
1549
+ gridParams.options['eventCallBack'] &&
1550
+ gridParams.options['eventCallBack'][funName] &&
1551
+ typeof gridParams.options['eventCallBack'][funName] === 'function'
1552
+ ) {
1553
+ // const param = { value: param.row[param.column.property], row: param.row, column: columnOptions, prop: param.column.property }
1554
+ param.additionalParamMap = gridParams.additionalParamMap
1555
+ param.titleStyle = titleStyleSetting
1556
+ return gridParams.options['eventCallBack'][funName].call(this, param)
1525
1557
  }
1526
- } else if (
1527
- funName !== null &&
1528
- columnOptions !== null &&
1529
- gridParams.options &&
1530
- gridParams.options['eventCallBack'] &&
1531
- gridParams.options['eventCallBack'][funName] &&
1532
- typeof gridParams.options['eventCallBack'][funName] === 'function'
1533
- ) {
1534
- // const param = { value: param.row[param.column.property], row: param.row, column: columnOptions, prop: param.column.property }
1535
- param.additionalParamMap = gridParams.additionalParamMap
1536
- return gridParams.options['eventCallBack'][funName].call(this, param)
1537
1558
  }
1538
- }
1539
1559
  },
1540
1560
  fetchData(searchParam, isSearch, parentRowIds, resove) {
1541
1561
  const gridParams = store.get(this.code)
@@ -555,7 +555,7 @@ export function getTableHeight(superGrid, listCode, pageHeight) {
555
555
  if (superGrid) {
556
556
  rect = superGrid.$el.getBoundingClientRect()
557
557
  }
558
- const totalHeight = window.innerHeight - rect.y - 90
558
+ const totalHeight = window.innerHeight - rect.y - 110
559
559
  console.log('rect=', rect, 'window.innerHeight=', window.innerHeight, 'totalHeight=', totalHeight)
560
560
  return totalHeight
561
561
 
@@ -78,10 +78,10 @@
78
78
 
79
79
  //page-runtime 头部按钮样式
80
80
  .page-runtime-header-btn{
81
- margin-bottom: 20px;
81
+ margin-bottom: 10px;
82
82
  display: inline-block;
83
83
  }
84
84
  .page-runtime-header-btn + .page-runtime-header-btn{
85
- margin-left: 10px;
85
+ margin-left: 5px;
86
86
  }
87
87
  }
@@ -99,7 +99,7 @@
99
99
  .app-container {
100
100
  // padding: 20px;
101
101
  // padding: 0px;
102
- padding: 20px 24px;
102
+ padding: 10px 12px;
103
103
  background: #FFFFFF;
104
104
  border-radius: 6px;
105
105
  box-shadow: 0px 1px 8px 0px #00000019;
@@ -111,10 +111,10 @@
111
111
  }
112
112
  //page-runtime 头部按钮样式
113
113
  .page-runtime-header-btn{
114
- margin-bottom: 20px;
114
+ margin-bottom: 10px;
115
115
  display: inline-block;
116
116
  }
117
117
  .page-runtime-header-btn + .page-runtime-header-btn{
118
- margin-left: 10px;
118
+ margin-left: 5px;
119
119
  }
120
120
  }
@@ -100,7 +100,7 @@
100
100
  .app-container {
101
101
  // padding: 20px;
102
102
  // padding: 0px;
103
- padding: 20px 24px;
103
+ padding: 10px 12px;
104
104
  background: #FFFFFF;
105
105
  border-radius: 6px;
106
106
  box-shadow: 0px 1px 8px 0px #00000019;
@@ -112,10 +112,10 @@
112
112
 
113
113
  //page-runtime 头部按钮样式
114
114
  .page-runtime-header-btn{
115
- margin-bottom: 20px;
115
+ margin-bottom: 10px;
116
116
  display: inline-block;
117
117
  }
118
118
  .page-runtime-header-btn + .page-runtime-header-btn{
119
- margin-left: 10px;
119
+ margin-left: 5px;
120
120
  }
121
121
  }
@@ -100,7 +100,7 @@
100
100
  .app-container {
101
101
  // padding: 20px;
102
102
  // padding: 0px;
103
- padding: 20px 24px;
103
+ padding: 10px 12px;
104
104
  background: #FFFFFF;
105
105
  border-radius: 6px;
106
106
  box-shadow: 0px 1px 8px 0px #00000019;
@@ -1,6 +1,7 @@
1
1
  <script lang="jsx">
2
2
  import { defineComponent, h } from 'vue'
3
3
  import SvgIcon from '../../../svg-icon/src/svg-icon.vue'
4
+ import {ElBadge} from 'element-plus'
4
5
  export default defineComponent ({
5
6
  name: 'MenuItem',
6
7
  functional: true,
@@ -20,11 +21,19 @@ export default defineComponent ({
20
21
  isRoot: {
21
22
  type: Boolean,
22
23
  default: false
23
- }
24
+ },
25
+ code: {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ backlogTotal: {
30
+ type: Number,
31
+ default: 0
32
+ }
24
33
  },
25
34
  render(props) {
26
- const { title, hasChildren, isRoot } = props
27
- let icon = props.icon
35
+ const { title, hasChildren, isRoot,code, backlogTotal } = props
36
+ let icon = props.icon
28
37
  const vnodes = []
29
38
  if (icon) {
30
39
  if (icon.indexOf('fa-') === 0) {
@@ -51,7 +60,7 @@ export default defineComponent ({
51
60
  }
52
61
  if (isRoot) {
53
62
  // 是否是根目录,没有子菜单时
54
- vnodes.push(h('div', {style:{display:'inline-block'}},
63
+ vnodes.push(h('div', {style:{display:'inline-block',}},
55
64
  [h('div',{
56
65
  title:title,
57
66
  style:{display:'inline-block',width:width,overflow:'hidden','text-overflow':'ellipsis','white-space':'nowrap','word-break':'keep-all'}
@@ -60,6 +69,20 @@ export default defineComponent ({
60
69
  // vnodes.push(<div style='display: inline-block'>
61
70
  // <div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
62
71
  // </div>)
72
+ }else if (code === 'undoneTask') {
73
+ // 有子菜单时
74
+ vnodes.push(h('div', {style:{display:'inline-block'}},
75
+ [h('div',{
76
+ title:title,
77
+ style:{display:'inline-block',width:width,overflow:'hidden','text-overflow':'ellipsis','white-space':'nowrap','word-break':'keep-all'}
78
+ }, [h(ElBadge,{value:backlogTotal,style:{display:'inline'}},title)])])
79
+ )
80
+ // vnodes.push(<div slot='title' style='display: inline-block'>
81
+ // <div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>
82
+ // {(title)}
83
+ // <el-badge value={backlogTotal}></el-badge>
84
+ // </div>
85
+ // </div>)
63
86
  } else {
64
87
  // 有子菜单时
65
88
  vnodes.push(h('div', {style:{display:'inline-block'}},
@@ -34,7 +34,7 @@
34
34
  />
35
35
  <app-link :key="child.code" v-else :to="toPath(child)" @click="clickMenu(toPath(child))">
36
36
  <el-menu-item :index="child.code + '~~' + child.i18nValue">
37
- <item :icon="child.iconName" :title="getI18nName(child)" />
37
+ <item :backlog-total="backlogTotal" :code="child.code" :icon="child.iconName" :title="getI18nName(child)" />
38
38
  </el-menu-item>
39
39
  </app-link>
40
40
  </template>
@@ -67,7 +67,11 @@ export default {
67
67
  basePath: {
68
68
  type: String,
69
69
  default: "",
70
- }
70
+ },
71
+ backlogTotal: {
72
+ type: Number,
73
+ default: 0
74
+ }
71
75
  },
72
76
  data() {
73
77
  let frontendUrlKey = '_PLAT_FORM_FRONTEND_URL'
@@ -18,7 +18,7 @@
18
18
  >
19
19
  {{ systemName }}
20
20
  </el-menu-item>
21
- <sidebar-item v-for="menu in menus" :key="menu.code" :item="menu"/>
21
+ <sidebar-item v-for="menu in menus" :backlog-total="backlogTotal" :key="menu.code" :item="menu"/>
22
22
  </el-menu>
23
23
  </el-scrollbar>
24
24
  <hamburger
@@ -73,7 +73,8 @@ export default {
73
73
  defaultActive: '',
74
74
  menus,
75
75
  isSelectFirst,
76
- isDevp
76
+ isDevp,
77
+ backlogTotal: 0
77
78
  }
78
79
  },
79
80
  computed: {
@@ -98,6 +99,12 @@ export default {
98
99
  },
99
100
  created() {
100
101
  this.firstLeafMenu = this.getFirstMenu(this.menus)
102
+ console.log('ffff',this.firstLeafMenu)
103
+ if (this.firstLeafMenu.name === '待办事宜'){
104
+ window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + '/task/tasks/to-do-task-nums').then(res => {
105
+ this.backlogTotal = res.undoneTaskCount
106
+ })
107
+ }
101
108
  if (this.firstLeafMenu) {
102
109
  // Breadcrumb组件需要使用window.$vueApp.config.globalProperties._selectMenu的值,格式为:fullPath~~title
103
110
  this.defaultActive =
@@ -246,3 +253,8 @@ export default {
246
253
  },
247
254
  }
248
255
  </script>
256
+ <style>
257
+ .aa{
258
+ background-color: red;
259
+ }
260
+ </style>