agilebuilder-ui 1.0.89 → 1.0.90-temp2

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.89",
3
+ "version": "1.0.90-temp2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -707,18 +707,20 @@ export default {
707
707
  this.setInputNumberConfig()
708
708
  }
709
709
  // 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
710
- if (this.column.valueSetOptions && this.column.componentType !== 'inputNumber') {
711
- const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
712
- if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
713
- this.valueSetOptions = valueSetOptionsObj.valueSetOptions
714
- }
715
- if (valueSetOptionsObj.dynamicDataSourceCode && valueSetOptionsObj.dynamicDataSourceCode !== '') {
716
- this.dynamicDataSourceCode = valueSetOptionsObj.dynamicDataSourceCode
717
- }
718
- } else if (this.column.componentType === 'switch' && this.column.valueSetOptions) {
719
- const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
720
- if (valueSetOptionsObj) {
721
- this.valueSetOptions = valueSetOptionsObj
710
+ if (this.column.valueSetOptions) {
711
+ if (this.column.componentType === 'switch') {
712
+ const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
713
+ if (valueSetOptionsObj) {
714
+ this.valueSetOptions = valueSetOptionsObj
715
+ }
716
+ } else if (this.column.componentType !== 'inputNumber') {
717
+ const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
718
+ if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
719
+ this.valueSetOptions = valueSetOptionsObj.valueSetOptions
720
+ }
721
+ if (valueSetOptionsObj.dynamicDataSourceCode && valueSetOptionsObj.dynamicDataSourceCode !== '') {
722
+ this.dynamicDataSourceCode = valueSetOptionsObj.dynamicDataSourceCode
723
+ }
722
724
  }
723
725
  }
724
726
  if (this.column.orgTreeSet) {
@@ -69,21 +69,22 @@
69
69
  </el-dropdown-menu>
70
70
  </template>
71
71
  </el-dropdown>
72
- <component
73
- :is="operation.props.customControl"
74
- v-else-if="operation.props.customControl"
75
- :key="column.prop+'_'+rowIndex+'_'+currentPage"
76
- :disabled="true"
77
- :row="pageGridData[rowIndex]"
78
- :entity="pageGridData[rowIndex]"
79
- :prop="column.prop"
80
- :parent="parentFormData"
81
- :row-index="rowIndex"
82
- :grid-data="gridData"
83
- :page-grid-data="pageGridData"
84
- :current-page="currentPage"
85
- @refresh-list="refreshList"
86
- />
72
+ <component
73
+ :is="operation.props.customControl"
74
+ v-else-if="operation.props.customControl"
75
+ v-permission="operation.props.permission"
76
+ :key="column.prop+'_'+rowIndex+'_'+currentPage"
77
+ :disabled="true"
78
+ :row="pageGridData[rowIndex]"
79
+ :entity="pageGridData[rowIndex]"
80
+ :prop="column.prop"
81
+ :parent="parentFormData"
82
+ :row-index="rowIndex"
83
+ :grid-data="gridData"
84
+ :page-grid-data="pageGridData"
85
+ :current-page="currentPage"
86
+ @refresh-list="refreshList"
87
+ />
87
88
  <row-operation
88
89
  v-else
89
90
  :column="column"
@@ -11,7 +11,7 @@
11
11
  :width="getColumnWidth()"
12
12
  >
13
13
  <template v-slot:header>
14
- <span v-if="!column.customHeader" :class="{is_req: isFieldRequired()}">
14
+ <span v-if="!column.customHeader" :class="{ is_req: isFieldRequired() }">
15
15
  <span :title="$escapeHtml(label)" class="cell--span required__label" v-html="$escapeHtml(label)" />
16
16
  </span>
17
17
  <component
@@ -27,7 +27,7 @@
27
27
  </el-icon>
28
28
  </template>
29
29
  <template v-slot="scope">
30
- <!-- :pagination="pagination" -->
30
+ <!-- :pagination="pagination" -->
31
31
  <NormalColumnContent
32
32
  :ref="column.prop"
33
33
  :is-sql="isSql"
@@ -63,13 +63,7 @@
63
63
  <script>
64
64
  import { CirclePlus, ZoomIn as ElIconZoomIn } from '@element-plus/icons-vue'
65
65
  import { $emit, $off, $on } from '../../utils/gogocodeTransfer'
66
- import {
67
- getColumnValues,
68
- isRequiredEdit,
69
- getContentAlign,
70
- getHeaderAlign,
71
- getHeaderLable
72
- } from './utils'
66
+ import { getColumnValues, isRequiredEdit, getContentAlign, getHeaderAlign, getHeaderLable } from './utils'
73
67
  import DynamicInput from './dynamic-input.vue'
74
68
  import store from './store'
75
69
  import customFormatter from './custom-formatter'
@@ -284,7 +278,7 @@ export default {
284
278
  }
285
279
  const align = getContentAlign(this.column, gridParams)
286
280
  if (align) {
287
- this.align = gridParams.options.align
281
+ this.align = align
288
282
  }
289
283
  const headerAlign = getHeaderAlign(this.column, gridParams)
290
284
  if (headerAlign) {
@@ -302,10 +296,8 @@ export default {
302
296
  gridParams.options &&
303
297
  gridParams.options.showOperationButton
304
298
  },
305
- mounted() {
306
- },
307
- unmounted() {
308
- },
299
+ mounted() {},
300
+ unmounted() {},
309
301
  methods: {
310
302
  ...customFormatter,
311
303
  ...apis,
@@ -323,7 +315,7 @@ export default {
323
315
  $emit(this, 'refresPortData', port, value, index)
324
316
  },
325
317
  refresPortsData(map, index) {
326
- $emit(this, 'refresPortsData', map, index)
318
+ $emit(this, 'refresPortsData', map, index)
327
319
  },
328
320
  refresMainTableFields(map) {
329
321
  $emit(this, 'refresMainTableFields', map)
@@ -358,7 +350,7 @@ export default {
358
350
  this.$emit('open-page', openPageParams)
359
351
  }
360
352
  },
361
- emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit',]
353
+ emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
362
354
  }
363
355
  </script>
364
356
 
@@ -792,9 +792,9 @@ export function getControlConfig(column) {
792
792
  return controlConfig
793
793
  }
794
794
 
795
- export function getContentAlign(column, gridParams){
795
+ export function getContentAlign(column, gridParams) {
796
796
  let align
797
- if (typeof gridParams.options.align !== 'undefined') {
797
+ if (gridParams.options?.align && gridParams.options.align !== '') {
798
798
  align = gridParams.options.align
799
799
  } else if (column.contAlign && column.contAlign !== '') {
800
800
  align = column.contAlign
@@ -802,20 +802,16 @@ export function getContentAlign(column, gridParams){
802
802
  return align
803
803
  }
804
804
 
805
- export function getHeaderAlign(column, gridParams){
805
+ export function getHeaderAlign(column, gridParams) {
806
806
  let headerAlign
807
- if (typeof gridParams.options.headerAlign !== 'undefined') {
807
+ if (gridParams.options?.headerAlign && gridParams.options.headerAlign !== '') {
808
808
  headerAlign = gridParams.options.headerAlign
809
809
  } else if (column.titleAlign && column.titleAlign !== '') {
810
810
  headerAlign = column.titleAlign
811
- } else {
812
- // 如果没有配置表头对齐方式,默认使用内容对齐方式
813
- headerAlign = 'left'
814
811
  }
815
812
  return headerAlign
816
813
  }
817
814
 
818
-
819
815
  export function getHeaderLable(column) {
820
816
  let label = column.label
821
817
  if (!column.titleValueSet) {
@@ -831,4 +827,4 @@ export function getHeaderLable(column) {
831
827
 
832
828
  function formatHeader(column) {
833
829
  return doFormatWithValueSet(column.titleValueSetValue, column.label)
834
- }
830
+ }