agilebuilder-ui 1.1.35-sit3 → 1.1.35

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-78107f31.js";
2
+ import { _ as s } from "./index-19f46200.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-78107f31.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-19f46200.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-78107f31.js";
2
+ import { _ as I } from "./index-19f46200.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.35-sit3",
3
+ "version": "1.1.35",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -1,3 +1,4 @@
1
+ import { isDynamicDataSourceSource } from './utils'
1
2
  import dayjs from 'dayjs'
2
3
  import weekOfYear from 'dayjs/plugin/weekOfYear'
3
4
  dayjs.extend(weekOfYear)
@@ -164,7 +165,7 @@ export function doFormatWithValueSet(column, value) {
164
165
  const valueSet = column.valueSet
165
166
  // 先处理值设置再处理格式化设置:即会对值设置的结果进行格式化设置
166
167
  if (valueSet !== undefined) {
167
- if (column.componentType === 'multiselect') {
168
+ if (column.componentType === 'multiselect' && !isDynamicDataSourceSource(column)) {
168
169
  if (typeof value === 'number') {
169
170
  // 当value是0时, value instanceof Number 为false
170
171
  value += ''
@@ -179,9 +180,7 @@ export function doFormatWithValueSet(column, value) {
179
180
  label.push(item[0].label)
180
181
  }
181
182
  })
182
- if(label.length > 0){
183
- value = label.join(',')
184
- }
183
+ value = label.join(',')
185
184
  } else {
186
185
  const item = valueSet.filter((item) => {
187
186
  return item.value === value + ''
@@ -106,7 +106,6 @@
106
106
  :is-show="operation.isShow"
107
107
  :label="operation.props.label ? operation.props.label : row[column.prop]"
108
108
  :on-click="operation.onClick"
109
- :operation="operation"
110
109
  :operation-index="operationIndex"
111
110
  :operation-setting="operation.props"
112
111
  :row-index="rowIndex"
@@ -396,7 +395,6 @@ import GridIcon from './components/grid-icon.vue'
396
395
  import { formatScanRuleSets } from './scan-util.ts'
397
396
  import storeVuex from '../../../src/store'
398
397
  import { isPromise } from '../../../src/utils/common-util'
399
- import { ElMessage } from 'element-plus'
400
398
 
401
399
  export default {
402
400
  components: {
@@ -565,10 +563,6 @@ export default {
565
563
  // 手动触发编辑状态
566
564
  isEditing() {
567
565
  try {
568
- // 是否符合编辑条件
569
- if (!this.validateEditConditions()) {
570
- return false
571
- }
572
566
  // 没权限
573
567
  if (!this.hasEditPermission) return
574
568
  // 检测到单选修改模式
@@ -1250,24 +1244,6 @@ export default {
1250
1244
  resolve(false)
1251
1245
  }
1252
1246
  })
1253
- },
1254
- validateEditConditions() {
1255
- if (this.controlConfig && this.controlConfig.editConditions?.length > 0) {
1256
- const gridParams = store.get(this.listCode)
1257
- const options = gridParams.options
1258
- // 非流程表单时才验证编辑条件
1259
- if (!options.isWorkflowEntity && options.validateEitConditions) {
1260
- const canEdit = options.validateEitConditions({
1261
- row: this.row,
1262
- editConditions: this.controlConfig.editConditions,
1263
- listCode: this.listCode
1264
- })
1265
- if (!canEdit) {
1266
- return false
1267
- }
1268
- }
1269
- }
1270
- return true
1271
1247
  }
1272
1248
  },
1273
1249
  emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
3
3
  @blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
4
- <span class="table-operation-row-btn" :style="myStyle">
4
+ <span :style="myStyle">
5
5
  <template v-if="isShowButton()">
6
6
  <el-tooltip :disabled="tooltipDisabled" :content="label" placement="top">
7
- <template v-if="operationSettingData?.permission">
7
+ <template v-if="operationSettingData.permission">
8
8
  <component
9
9
  v-bind="operationSettingData"
10
10
  :is="isElementType"
@@ -77,13 +77,9 @@ export default {
77
77
  type: String,
78
78
  default: null,
79
79
  },
80
- operation: {
81
- type: Object,
82
- default: () => ({}),
83
- },
84
80
  operationSetting: {
85
81
  type: Object,
86
- default: () => ({}),
82
+ default: null,
87
83
  },
88
84
  operationIndex: {
89
85
  type: Number,
@@ -108,23 +104,19 @@ export default {
108
104
  ...mapGetters(['preventReclick']),
109
105
  // 是否是保存按钮
110
106
  isSaveRow() {
111
- return ['lineEditSave', 'saveRow'].includes(this.operation?.eventName)
112
- // return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
107
+ return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
113
108
  },
114
109
  // 是否是删除按钮
115
110
  isDeleteRow() {
116
- return ['lineEditDelete', 'deleteRow'].includes(this.operation?.eventName)
117
- // return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
111
+ return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
118
112
  },
119
113
  // 是否是修改按钮
120
114
  isEditRow() {
121
- return ['lineEditUpdate', 'editRow'].includes(this.operation?.eventName)
122
- // return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
115
+ return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
123
116
  },
124
117
  // 是否是取消按钮
125
118
  isRestoreRow() {
126
- return ['restoreEdit', 'restoreRow'].includes(this.operation?.eventName)
127
- // return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
119
+ return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
128
120
  },
129
121
  // 前置图标
130
122
  prefixIcon() {
@@ -150,16 +142,16 @@ export default {
150
142
  },
151
143
  // 后置图标
152
144
  suffixIcon() {
153
- if(['right'].includes(this.operationSetting.iconPosition)) return this.operationSetting.iconValue
145
+ if(['right'].includes(this.operationSettingData.iconPosition)) return this.operationSetting.iconValue
154
146
  return undefined
155
147
  },
156
148
  // 是否显示文字按钮 > 图标模式
157
149
  isTextIcon() {
158
150
  if (this.isTableBtnLinkShow) {
159
- if (this.operationSetting.isTextIcon === undefined) {
151
+ if (this.operationSettingData.isTextIcon === undefined) {
160
152
  return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
161
153
  }
162
- return this.operationSetting.isTextIcon
154
+ return this.operationSettingData.isTextIcon
163
155
  } else {
164
156
  return false
165
157
  }
@@ -174,14 +166,14 @@ export default {
174
166
  },
175
167
  // 是否自动开启表格 按钮 转 文字按钮
176
168
  isTableBtnLinkShow() {
177
- if (this.operationSetting?.text) return true
169
+ if (this.operationSetting.text) return true
178
170
  if (this.isTableBtnLink && this.elementType === 'el-button') {
179
- return [this.operationSetting?.text, this.operationSetting?.plain, this.operationSetting?.round].every(v => v === undefined)
171
+ return [this.operationSetting.text, this.operationSetting.plain, this.operationSetting.round].every(v => v === undefined)
180
172
  }
181
173
  return false
182
174
  },
183
175
  operationSettingData() {
184
- const dataList = { ...(this.operationSetting ?? {}) }
176
+ const dataList = { ...this.operationSetting }
185
177
  if (this.isTableBtnLinkShow) {
186
178
  dataList.underline = false
187
179
  delete dataList.text
@@ -30,6 +30,7 @@
30
30
  import searchMethods from './search-methods'
31
31
  import SearchFormItem from './search-form-item.vue'
32
32
  import SearchButton from './search-button.vue'
33
+ import storeVuex from '../../../src/store';
33
34
 
34
35
  export default {
35
36
  name: 'SearchFormOpen',
@@ -101,7 +101,7 @@ const superGridService = {
101
101
  }
102
102
 
103
103
  // 需要多个组件共享的数据放到store中,避免组件定义一堆props来接收这些共享数据
104
- packageEnumAndBeanColumnValueSets(data.columns, this.code, gridParams.additionalParamMap, this.parentFormData)
104
+ packageEnumAndBeanColumnValueSets(data.columns, this.code)
105
105
  .then(() => {
106
106
  return this.getDynamicColumnByBean(
107
107
  additionalParams,
@@ -755,15 +755,7 @@ 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
- }
765
758
  if (column.valueSet && column.valueSet.length > 0 && column.valueSet[0].value === 'dynamicDataSource') {
766
- // 表示是动态数据源
767
759
  return true
768
760
  } else {
769
761
  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 super-icon" :class="iconValue" />
3
+ <i v-else-if="iconValue.indexOf('amb-color-icon-') === 0" class="amb-color-iconfont" :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,9 +40,3 @@ 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,19 +1,8 @@
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
- }
13
2
  /**
14
3
  * 封装值设置为枚举 或 bean方式时的值为'key-value'键值对信息
15
4
  */
16
- function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
5
+ export function packageEnumAndBeanColumnValueSets(columns, listCode) {
17
6
  return new Promise((resolve, reject) => {
18
7
  const valueSetColumnsInfo = {
19
8
  listCode: listCode,
@@ -106,138 +95,3 @@ function packageEnumAndBeanColumnValueSet(valueSetInfo) {
106
95
  return BEAN_NAME_PREFIX + beanName
107
96
  }
108
97
  }
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
-