agilebuilder-ui 1.0.621 → 1.0.962

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.
Files changed (120) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.js +115880 -110424
  3. package/lib/super-ui.umd.cjs +103 -95
  4. package/package.json +6 -3
  5. package/packages/department-tree/src/department-tree.vue +27 -10
  6. package/packages/department-tree-inline/src/department-tree-service.js +20 -41
  7. package/packages/department-tree-mobile/src/department-tree-app.vue +6 -6
  8. package/packages/department-tree-mobile/src/department-tree-inline-app.vue +15 -15
  9. package/packages/department-user-tree/src/department-user-tree.vue +17 -2
  10. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +61 -26
  11. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +64 -22
  12. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -6
  13. package/packages/department-user-tree-inline/src/group-user/group-input.vue +162 -0
  14. package/packages/department-user-tree-inline/src/group-user/group-list.vue +99 -0
  15. package/packages/department-user-tree-inline/src/group-user/group-user.vue +42 -0
  16. package/packages/department-user-tree-inline/src/group-user-multiple-tree.vue +304 -0
  17. package/packages/department-user-tree-inline/src/group-user-single-tree.vue +155 -0
  18. package/packages/department-user-tree-inline/src/group-user-tree-service.js +74 -0
  19. package/packages/department-user-tree-inline/src/search-result.vue +34 -36
  20. package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +6 -6
  21. package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +17 -19
  22. package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +0 -11
  23. package/packages/dynamic-source-select/src/dynamic-source-select.vue +795 -799
  24. package/packages/dynamic-source-select/src/events.js +11 -16
  25. package/packages/fs-upload-list/src/fs-upload-list.vue +183 -122
  26. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +246 -0
  27. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +480 -0
  28. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +127 -0
  29. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +246 -0
  30. package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +255 -0
  31. package/packages/fs-upload-new/src/fs-button-upload.vue +10 -13
  32. package/packages/fs-upload-new/src/fs-drag-upload.vue +4 -8
  33. package/packages/fs-upload-new/src/fs-preview-new.vue +103 -36
  34. package/packages/fs-upload-new/src/fs-upload-new.vue +160 -13
  35. package/packages/index.js +11 -2
  36. package/packages/organization-input/src/organization-input.vue +493 -539
  37. package/packages/plugins/export-data-new.js +34 -1
  38. package/packages/rich-editor/index.vue +29 -0
  39. package/packages/row-form/index.js +7 -0
  40. package/packages/row-form/index.vue +211 -0
  41. package/packages/scan-code-input/src/scan-code-input.vue +136 -104
  42. package/packages/scan-code-input-browser/index.js +6 -0
  43. package/packages/{scan-code-input/src/scan-code-input-colse.vue → scan-code-input-browser/src/scan-code-input.vue} +1 -28
  44. package/packages/secret-info/index.vue +2 -2
  45. package/packages/super-grid/src/apis.js +158 -10
  46. package/packages/super-grid/src/components/grid-icon.vue +7 -14
  47. package/packages/super-grid/src/components/hyperlinks.vue +24 -8
  48. package/packages/super-grid/src/custom-formatter.js +312 -380
  49. package/packages/super-grid/src/dynamic-input.vue +346 -43
  50. package/packages/super-grid/src/formValidatorUtil.js +79 -15
  51. package/packages/super-grid/src/group-column.vue +5 -0
  52. package/packages/super-grid/src/normal-column-content.vue +1056 -0
  53. package/packages/super-grid/src/normal-column.vue +57 -740
  54. package/packages/super-grid/src/row-detail.vue +50 -0
  55. package/packages/super-grid/src/row-operation.vue +19 -10
  56. package/packages/super-grid/src/scan-util.ts +243 -0
  57. package/packages/super-grid/src/search-button.vue +18 -14
  58. package/packages/super-grid/src/search-form-advancedQuery.vue +9 -2
  59. package/packages/super-grid/src/search-form-item.vue +10 -3
  60. package/packages/super-grid/src/search-form-mobile.vue +250 -0
  61. package/packages/super-grid/src/search-form.vue +159 -82
  62. package/packages/super-grid/src/super-grid-service.js +51 -6
  63. package/packages/super-grid/src/super-grid.vue +657 -761
  64. package/packages/super-grid/src/utils.js +126 -170
  65. package/packages/super-nine-grid/src/super-nine-grid.vue +1032 -1141
  66. package/packages/workflow-button/src/workflow-button.vue +6 -1
  67. package/packages/workgroup-tree/src/workgroup-tree.vue +31 -0
  68. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +28 -0
  69. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +26 -0
  70. package/packages/workgroup-tree-mobile/index.js +6 -0
  71. package/packages/workgroup-tree-mobile/src/dept-result.vue +51 -0
  72. package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +120 -0
  73. package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +375 -0
  74. package/packages/workgroup-tree-mobile/src/workgroup-tree-service.ts +62 -0
  75. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +15 -0
  76. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +27 -0
  77. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +11 -0
  78. package/packages/workgroup-user-tree-mobile/index.js +6 -0
  79. package/packages/workgroup-user-tree-mobile/src/dept-path.vue +36 -0
  80. package/packages/workgroup-user-tree-mobile/src/dept-result.vue +58 -0
  81. package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue +119 -0
  82. package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +394 -0
  83. package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-service.ts +41 -0
  84. package/src/api/sso-service.js +44 -15
  85. package/src/directives/permission/permission.js +4 -3
  86. package/src/i18n/langs/cn.js +19 -3
  87. package/src/i18n/langs/en.js +18 -2
  88. package/src/permission.js +114 -122
  89. package/src/store/modules/user.js +32 -33
  90. package/src/styles/index.scss +1 -0
  91. package/src/styles/table.scss +12 -0
  92. package/src/styles/theme/dark-blue/button.scss +2 -2
  93. package/src/styles/theme/dark-blue/index.scss +1 -1
  94. package/src/styles/theme/dark-blue/sidebar.scss +10 -0
  95. package/src/styles/theme/dark-blue/table.scss +8 -52
  96. package/src/styles/theme/green/button.scss +2 -2
  97. package/src/styles/theme/green/green.scss +1 -1
  98. package/src/styles/theme/green/index.scss +1 -1
  99. package/src/styles/theme/green/sidebar.scss +20 -0
  100. package/src/styles/theme/green/table.scss +7 -51
  101. package/src/styles/theme/ocean-blue/button.scss +2 -2
  102. package/src/styles/theme/ocean-blue/index.scss +1 -1
  103. package/src/styles/theme/ocean-blue/ocean-blue.scss +1 -1
  104. package/src/styles/theme/ocean-blue/sidebar.scss +10 -0
  105. package/src/styles/theme/ocean-blue/table.scss +7 -52
  106. package/src/utils/auth.js +23 -3
  107. package/src/utils/calculator/calculator-factory.js +4 -4
  108. package/src/utils/calculator/calculator-util.js +14 -0
  109. package/src/utils/common-util.js +270 -124
  110. package/src/utils/i18n-util.js +145 -0
  111. package/src/utils/jump-page-utils.js +245 -314
  112. package/src/utils/permission.js +7 -1
  113. package/src/utils/permissionAuth.js +155 -37
  114. package/src/utils/request.js +10 -11
  115. package/src/utils/util.js +154 -205
  116. package/src/views/layout/EmptyLayout.vue +1 -1
  117. package/src/views/layout/components/Menubar/Item.vue +27 -4
  118. package/src/views/layout/components/Menubar/SidebarItem.vue +7 -3
  119. package/src/views/layout/components/Menubar/index.vue +14 -2
  120. package/src/views/layout/tab-content-index.vue +1 -1
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <el-table-column
3
+ align="center"
4
+ :class-name="column.prop"
5
+ fixed="left"
6
+ header-align="center"
7
+ :prop="column.prop"
8
+ :width="80"
9
+ :label="column.label"
10
+ >
11
+ <template v-slot="scope">
12
+ <el-icon @click="showDetail(scope.$index)"><ElView /></el-icon>
13
+ </template>
14
+ </el-table-column>
15
+ </template>
16
+
17
+ <script>
18
+ import { View as ElView } from '@element-plus/icons-vue'
19
+ export default {
20
+ name: 'RowDetail',
21
+ components: {
22
+ ElView
23
+ },
24
+ props: {
25
+ column: {
26
+ type: Object,
27
+ default: null
28
+ },
29
+ listCode: {
30
+ type: String,
31
+ default: null
32
+ }
33
+ },
34
+ data() {
35
+ },
36
+ computed: {
37
+ },
38
+ created() {
39
+ },
40
+ methods: {
41
+ showDetail(rowIndex) {
42
+ this.$emit('show-detail', rowIndex)
43
+ }
44
+ }
45
+ }
46
+ </script>
47
+
48
+ <style lang="scss" scoped>
49
+
50
+ </style>
@@ -49,6 +49,7 @@
49
49
  import { mapGetters } from 'vuex'
50
50
  import customFormatter from './custom-formatter'
51
51
  import { analysisCondition } from '../../../src/utils/util'
52
+ import store from './store'
52
53
  export default {
53
54
  name: 'RowOperation',
54
55
  props: {
@@ -89,6 +90,14 @@ export default {
89
90
  type: Number,
90
91
  default: null,
91
92
  },
93
+ listCode: {
94
+ type: String,
95
+ default: null
96
+ },
97
+ parentFormData: {
98
+ type: Object,
99
+ default: null
100
+ }
92
101
  },
93
102
  data() {
94
103
  return {
@@ -152,6 +161,7 @@ export default {
152
161
  },
153
162
  isShowButton() {
154
163
  // const start = new Date().getTime()
164
+ const gridParams = store.get(this.listCode)
155
165
  const val = customFormatter.isShowButtonFun(
156
166
  this.entity,
157
167
  this.column,
@@ -162,16 +172,15 @@ export default {
162
172
  const displayJudgment = JSON.stringify(
163
173
  this.operationSetting.buttonDisplayConditionsList
164
174
  )
165
- return analysisCondition(
166
- displayJudgment,
167
- this.entity,
168
- {},
169
- {},
170
- true,
171
- null,
172
- null,
173
- null
174
- )
175
+ if (gridParams) {
176
+ let tableName = null
177
+ if (gridParams.basicInfo.tableName) {
178
+ tableName = gridParams.basicInfo.tableName
179
+ }
180
+ return analysisCondition(displayJudgment, this.entity, gridParams.additionalParamMap, gridParams.contextParameter, true, tableName, this.parentFormData)
181
+ } else {
182
+ return analysisCondition(displayJudgment, this.entity, {}, {}, true, null, null)
183
+ }
175
184
  }
176
185
 
177
186
  if (val) {
@@ -0,0 +1,243 @@
1
+ import { setEntityFieldValue } from "../../../src/utils/util";
2
+
3
+ export interface ScanRuleSet {
4
+ [key: string]: { outs: any[]; adaptations: any[] }
5
+ }
6
+ export function formatScanRuleSets(ruleList: any[]) {
7
+ const scanRuleSets: ScanRuleSet = {}
8
+ // 从配置的解析规则中获取所有使用的条码解析规则, (因为有的配置的是规则分组,并且有可能值设置只使用了分组中的某几个规则,)
9
+ // 输出为 {规则编码:[ outs:[{returnedValue:'返回值的编码',pageVariable:'设置到'}], adaptations:[] ]} 的结构
10
+ // 获取到这个结构后,再去后端调用,获取规则的详细信息(适配条件,输出字段的匹配规则)
11
+ ruleList.forEach((ruleSet: any) => {
12
+ if (ruleSet.type === 'group') {
13
+ // 当时规则组时,需要获取每条值设置的规则,并存放到scanRuleSets
14
+ ruleSet.outs.forEach((valueSet: any) => {
15
+ if (!scanRuleSets[valueSet.ruleCode]) {
16
+ scanRuleSets[valueSet.ruleCode] = { outs: [], adaptations: [] }
17
+ }
18
+ scanRuleSets[valueSet.ruleCode].outs.push(valueSet)
19
+ })
20
+ } else {
21
+ scanRuleSets[ruleSet.code] = { outs: ruleSet.outs, adaptations: [] }
22
+ }
23
+ })
24
+ return packageScanRuleSets(scanRuleSets)
25
+ }
26
+
27
+ function packageScanRuleSets(scanRuleSets: ScanRuleSet) {
28
+ // 获取规则的详细信息(适配条件,输出字段的匹配规则)
29
+ return new Promise((resolve, reject) => {
30
+ //
31
+ if (Object.keys(scanRuleSets).length > 0) {
32
+ // Object.keys(scanRuleSets) 为当前配置使用的所有规则的编码
33
+ window.$vueApp.config.globalProperties.$http
34
+ .post(
35
+ window['$vueApp'].config.globalProperties.baseAPI +
36
+ '/dc/setting-barcode-analysis/by-codes',
37
+ Object.keys(scanRuleSets)
38
+ )
39
+ .then((res: any) => {
40
+ res.forEach((rule: any) => {
41
+ // 遍历所有的规则,看哪些规则的输出字段需要设值,因为有可能配置的规则中只使用了部分输出字段
42
+ const ruleOuts = JSON.parse(rule.barcodeAnalysisOuts)
43
+ // 获取当前输入框配置的输出字段编码
44
+ const needOutsFields = new Set()
45
+ // 解析规则配置的"返回值编码(来自条码解析规则定义的输出字段,唯一值)"字段和"设置到"字段的映射
46
+ const outsFiledsSet: any = {}
47
+ scanRuleSets[rule.code].outs.forEach((valueSet: any) => {
48
+ needOutsFields.add(valueSet.returnedValue)
49
+ outsFiledsSet[valueSet.returnedValue] = valueSet.pageVariable
50
+ })
51
+ const filteredOutsField: any[] = []
52
+ ruleOuts.forEach((outFiled: any) => {
53
+ if (needOutsFields.has(outFiled.code)) {
54
+ // 设置输出字段 需要设置到的变量
55
+ outFiled.pageVariable = outsFiledsSet[outFiled.code]
56
+ filteredOutsField.push(outFiled)
57
+ }
58
+ })
59
+ scanRuleSets[rule.code].outs = filteredOutsField
60
+ // 适配条件
61
+ scanRuleSets[rule.code].adaptations = JSON.parse(rule.barcodeAnalysisAdaptations)
62
+ resolve(scanRuleSets)
63
+ })
64
+ })
65
+ } else {
66
+ resolve(null)
67
+ }
68
+ })
69
+ }
70
+
71
+ /**
72
+ * 解析扫描值
73
+ * @param obj
74
+ * return {value:扫描值,params:{},scanSet:{}}
75
+ */
76
+ export function analysisScanValue(scanValue: any, scanRuleSets: ScanRuleSet) {
77
+ if (!scanValue || !scanRuleSets) {
78
+ return null
79
+ }
80
+ const scanSets = Object.values(scanRuleSets)
81
+ for (let i = 0; i < scanSets.length; i++) {
82
+ const scanSet: any = scanSets[i]
83
+ //检查是否匹配
84
+ const adaptations = scanSet.adaptations
85
+ let validStr = ''
86
+ for (let k = 0; k < adaptations.length; k++) {
87
+ const adap = adaptations[k]
88
+ const indexs = _getScanIndexs(scanValue, adap.startIndex, adap.endIndex)
89
+ const startIndex = indexs[0]
90
+ const endIndex = indexs[1]
91
+ let paramValue = scanValue.substring(startIndex, endIndex)
92
+ let compareValue = adap.value
93
+ //比较条件为times时,把operate设置为==
94
+ let operate = adap.operate
95
+ if (operate == 'times') {
96
+ //出现的次数
97
+ const realValue = paramValue.split(compareValue == undefined ? '' : compareValue).length - 1
98
+ //替换为需要比较的次数
99
+ compareValue = realValue
100
+ paramValue = adap.times
101
+ operate = '='
102
+ }
103
+
104
+ if (isNaN(paramValue) || isNaN(compareValue)) {
105
+ paramValue = "'" + paramValue + "'"
106
+ compareValue = "'" + compareValue + "'"
107
+ }
108
+ if (adap.leftBracket) {
109
+ validStr += adap.leftBracket
110
+ }
111
+ if (operate == '<>') {
112
+ operate = '!='
113
+ } else if (operate == '=') {
114
+ operate = '=='
115
+ }
116
+ if (operate == 'include' || operate == 'notinclude') {
117
+ validStr += paramValue + '.indexOf(' + compareValue + ')'
118
+ if (operate == 'include') {
119
+ validStr += '>-1'
120
+ } else {
121
+ validStr += '<0'
122
+ }
123
+ } else {
124
+ validStr += paramValue + operate + compareValue
125
+ }
126
+ if (adap.rightBracket) {
127
+ validStr += adap.rightBracket
128
+ }
129
+ if (adap.joinStr && k + 1 < adaptations.length) {
130
+ const joinStr = adap.joinStr == 'and' ? '&&' : '||'
131
+ validStr += joinStr
132
+ }
133
+ }
134
+ let res = false
135
+ if (validStr) {
136
+ try {
137
+ console.log('validStr', validStr)
138
+ res = eval('(' + validStr + ')')
139
+ console.log('res', res)
140
+ } catch (e) {
141
+ console.log(e)
142
+ }
143
+ } else {
144
+ res = true //没有规则表示都符合
145
+ }
146
+ //如果符合条件时,后续规则不验证
147
+ if (res) {
148
+ return executeAnalysisForScan(scanValue, scanSet)
149
+ }
150
+ }
151
+ return null
152
+ }
153
+
154
+ /**
155
+ * 处理条码解析
156
+ * @param obj
157
+ */
158
+ function executeAnalysisForScan(scanValue: any, scanSet: any) {
159
+ if (!scanSet || !scanValue) {
160
+ return
161
+ }
162
+ //解析获取指定的值
163
+ const outs = scanSet.outs
164
+ const params: any = {}
165
+ outs.forEach((outJson: any) => {
166
+ const fieldName = outJson.fieldName
167
+ if (outJson.fixedValue != undefined) {
168
+ params[fieldName] = outJson.fixedValue
169
+ } else {
170
+ let pValue = scanValue
171
+ //分隔符后取值
172
+ if (outJson.splitChar && outJson.splitNum) {
173
+ const splitChar = outJson.splitChar == '|' ? outJson.splitChar : outJson.splitChar
174
+ const strs = scanValue.split(splitChar)
175
+ const splitNum = outJson.splitNum < 1 ? 1 : outJson.splitNum
176
+ console.log(pValue, splitChar, strs, splitNum)
177
+ if (splitNum <= strs.length) {
178
+ pValue = strs[splitNum - 1]
179
+ } else {
180
+ pValue = ''
181
+ }
182
+ }
183
+ //检查第二次分隔符后取值
184
+ if (outJson.splitChar2 && outJson.splitNum2) {
185
+ const splitChar2 = outJson.splitChar2 == '|' ? outJson.splitChar2 : outJson.splitChar2
186
+ const strs: any = pValue.split(splitChar2)
187
+ const splitNum2 = outJson.splitNum2 < 1 ? 1 : outJson.splitNum2
188
+ console.log(pValue, splitChar2, strs, splitNum2)
189
+ if (splitNum2 <= strs.length) {
190
+ pValue = strs[splitNum2 - 1]
191
+ } else {
192
+ pValue = ''
193
+ }
194
+ }
195
+ //有值时,判断是否有截取
196
+ if (pValue.length > 0) {
197
+ const indexs = _getScanIndexs(pValue, outJson.startIndex, outJson.endIndex)
198
+ const startIndex = indexs[0]
199
+ const endIndex = indexs[1]
200
+ pValue = pValue.substring(startIndex, endIndex)
201
+ }
202
+ //获取值
203
+ params[fieldName] = pValue
204
+ }
205
+ })
206
+ return { value: scanValue, params: params, scanSet: scanSet }
207
+ }
208
+
209
+ /**
210
+ * 获取有效的索引位置
211
+ * @param value
212
+ * @param startIndex
213
+ * @param endIndex
214
+ */
215
+ function _getScanIndexs(value: any, startIndex: any, endIndex: any) {
216
+ startIndex = startIndex == undefined ? 0 : startIndex - 1
217
+ startIndex = startIndex < 0 ? 0 : startIndex
218
+ startIndex = startIndex > value.length - 1 ? value.length - 1 : startIndex
219
+ endIndex = endIndex == undefined ? value.length : endIndex
220
+ endIndex = endIndex > value.length ? value.length : endIndex
221
+ endIndex = endIndex < 1 ? 1 : endIndex
222
+ if (endIndex < startIndex) {
223
+ endIndex = startIndex
224
+ }
225
+ return [startIndex, endIndex]
226
+ }
227
+
228
+ export function setScanAnalysisValue(entity: any, scanSet: any, params: any) {
229
+ if (!scanSet) {
230
+ return
231
+ }
232
+ const outs = scanSet.outs
233
+ outs.forEach((outField: any) => {
234
+ const fieldName = outField.fieldName
235
+ const value = params[fieldName]
236
+ let variableName = outField.pageVariable
237
+ if (variableName && variableName.indexOf('${')>=0) {
238
+ variableName = variableName.substring(2, variableName.length - 1)
239
+ }
240
+
241
+ setEntityFieldValue(entity, variableName, value)
242
+ })
243
+ }
@@ -1,25 +1,26 @@
1
1
  <template>
2
- <div class="search-button" style="text-align: right">
2
+ <div class="search-button" :style="{textAlign: isMobile?'center':'right'}">
3
3
  <!-- :loading="loading" -->
4
- <el-button class="button--default" size="default" @click="$emit('save-condition')">
5
- {{ $t('superGrid.saveCondition') }}
6
- </el-button>
7
- <el-button :loading="loading" class="button--default" size="default" @click="resetForm">
8
- {{ $t('imatrixUIPublicModel.reset') }}
9
- </el-button>
10
4
  <el-button
11
5
  :loading="loading"
12
6
  size="default"
13
7
  type="primary"
14
8
  @click="submitForm"
15
9
  >
16
- {{ $t('imatrixUIMessage.search') }}
10
+ {{$t('imatrixUIPublicModel.sure')}}
11
+ </el-button>
12
+ <el-button :loading="loading" class="button--default" size="default" @click="resetForm">
13
+ {{ $t('imatrixUIPublicModel.reset') }}
14
+ </el-button>
15
+ <el-button class="button--default" size="default" @click="$emit('save-condition')">
16
+ {{ $t('superGrid.saveCondition') }}
17
17
  </el-button>
18
18
  <el-button
19
- :icon="isMyOpen ? CaretTop : CaretBottom"
20
- link
21
- size="default"
22
- @click="openFold"
19
+ v-if="!isMobile"
20
+ :icon="isMyOpen ? CaretTop : CaretBottom"
21
+ link
22
+ size="default"
23
+ @click="openFold"
23
24
  >
24
25
  {{ isMyOpen ? $t('superGrid.fold') : $t('superGrid.open') }}
25
26
  </el-button>
@@ -38,6 +39,7 @@
38
39
  import {$emit} from '../../utils/gogocodeTransfer'
39
40
  import {CaretBottom, CaretTop} from '@element-plus/icons-vue'
40
41
  import {shallowRef} from "vue";
42
+ import {isMobileBrowser} from '../../../src/utils/common-util'
41
43
 
42
44
  export default {
43
45
  name: 'SearchButton',
@@ -45,15 +47,17 @@ export default {
45
47
  isOpen: {
46
48
  type: Boolean,
47
49
  default: false,
48
- },
50
+ }
49
51
  },
50
52
  data() {
53
+ const isMobile = isMobileBrowser()
51
54
  const isMyOpen = this.isOpen
52
55
  return {
53
56
  isMyOpen, // false表示折叠状态,应该显示“展开”,true表示当前是展开状态,应该显示“折叠”
54
57
  loading: false,
55
58
  CaretTop: shallowRef(CaretTop),
56
- CaretBottom: shallowRef(CaretBottom)
59
+ CaretBottom: shallowRef(CaretBottom),
60
+ isMobile // 移动端时不需要显示展开折叠按钮
57
61
  }
58
62
  },
59
63
  methods: {
@@ -285,6 +285,7 @@
285
285
  v-model:value="scope.row.value"
286
286
  :prop="scope.row.prop"
287
287
  :row="scope.row"
288
+ :additional-settings="controlConfig"
288
289
  class="customComponent"
289
290
  @focus="selectRow(scope.row)"
290
291
  @input="
@@ -374,7 +375,7 @@ import searchFormNumber from './search-form-number.vue'
374
375
  import store from './store'
375
376
  import SearchConditionInput from './search-condition-input.vue'
376
377
  import SearchConditionList from './search-condition-list.vue'
377
- import {getDynamicDataSourceOptions, isDynamicDataSourceSource} from './utils'
378
+ import {getDynamicDataSourceOptions, isDynamicDataSourceSource, getControlConfig} from './utils'
378
379
  import {
379
380
  CirclePlus,
380
381
  Remove,
@@ -434,6 +435,7 @@ export default {
434
435
  operationArr: [],
435
436
  tableName,
436
437
  isJoinTable: isHasJoinTable, // 是否是关联表
438
+ controlConfig: getControlConfig(this.column)
437
439
  }
438
440
  },
439
441
  computed: {},
@@ -460,10 +462,15 @@ export default {
460
462
  ...searchMethods,
461
463
  getDynamicDataSourceOptions(column) {
462
464
  const gridParams = store.get(this.code)
465
+ let baseURL = gridParams.options.backendUrl
466
+ if (!baseURL) {
467
+ baseURL = window.$vueApp.config.globalProperties.baseURL
468
+ }
463
469
  return getDynamicDataSourceOptions(
464
470
  column,
465
471
  this.isSql,
466
- gridParams.additionalParamMap
472
+ gridParams.additionalParamMap,
473
+ baseURL
467
474
  )
468
475
  },
469
476
  // 值设置是否是动态数据源类型的数据源
@@ -22,6 +22,7 @@
22
22
  :is="column.componentName"
23
23
  :ref="column.componentName"
24
24
  :entity="searchForm"
25
+ :additional-settings="controlConfig"
25
26
  :model-value="getFormItemValue(column.prop)"
26
27
  :prop="column.prop"
27
28
  :row="searchForm"
@@ -237,7 +238,7 @@ import {$emit} from '../../utils/gogocodeTransfer'
237
238
  import searchMethods from './search-methods'
238
239
  import searchFormNumber from './search-form-number.vue'
239
240
  import store from './store'
240
- import {getDynamicDataSourceOptions, isDynamicDataSourceSource} from './utils'
241
+ import {getDynamicDataSourceOptions, isDynamicDataSourceSource, getControlConfig} from './utils'
241
242
 
242
243
  export default {
243
244
  name: 'SearchFormItem',
@@ -291,7 +292,8 @@ export default {
291
292
  dateOne: null,
292
293
  dataTwo: null,
293
294
  moduleConfig: {},
294
- dateVal: this.getFormItemValue(this.column.prop)
295
+ dateVal: this.getFormItemValue(this.column.prop),
296
+ controlConfig: getControlConfig(this.column)
295
297
  }
296
298
  },
297
299
  computed: {
@@ -319,10 +321,15 @@ export default {
319
321
  ...searchMethods,
320
322
  getDynamicDataSourceOptions(column) {
321
323
  const gridParams = store.get(this.code)
324
+ let baseURL = gridParams.options.backendUrl
325
+ if (!baseURL) {
326
+ baseURL = window.$vueApp.config.globalProperties.baseURL
327
+ }
322
328
  return getDynamicDataSourceOptions(
323
329
  column,
324
330
  this.isSql,
325
- gridParams.additionalParamMap
331
+ gridParams.additionalParamMap,
332
+ baseURL
326
333
  )
327
334
  },
328
335
  // 值设置是否是动态数据源类型的数据源