agilebuilder-ui 1.1.11 → 1.1.12-tmp2

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.
@@ -156,7 +156,7 @@ const emits = defineEmits(['remove', 'uploadend'])
156
156
 
157
157
  // 表示点击了选择文件按钮
158
158
  function pickBrowserFiles() {
159
- // console.log('---点击了选择文件按钮---')
159
+ console.log('---点击了选择文件按钮---')
160
160
  const message = {
161
161
  type: 'pickFiles',
162
162
  multiple: props.multiple,
@@ -167,12 +167,18 @@ function pickBrowserFiles() {
167
167
  listCode: props.listCode
168
168
  }
169
169
  if(window.parent && window.parent.parent && window.parent.parent.parent ) {
170
+ console.log('---点击了选择文件按钮111---')
171
+ message.myCustom = 'window.parent.parent.parent'
170
172
  // 加上uniapp中的iframe,一共是4层iframe嵌套时.最多支持4层iframe嵌套。
171
173
  window.parent.parent.parent.postMessage(JSON.stringify(message), '*')
172
174
  } else if(window.parent && window.parent.parent) {
175
+ console.log('---点击了选择文件按钮222---')
176
+ message.myCustom = 'window.parent.parent'
173
177
  // 加上uniapp中的iframe,一共是3层iframe嵌套时
174
178
  window.parent.parent.postMessage(JSON.stringify(message), '*')
175
179
  } else {
180
+ console.log('---点击了选择文件按钮444---')
181
+ message.myCustom = 'window.parent'
176
182
  window.parent.postMessage(JSON.stringify(message), '*')
177
183
  }
178
184
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span style="width: 100%">
2
+ <span style="width: 100%" class="organization-input">
3
3
  <template v-if="disabled">
4
4
  <el-input
5
5
  :disabled="true"
@@ -221,7 +221,7 @@ export default {
221
221
  getPropName(prop, isJoinTable, tableName) {
222
222
  if (prop && prop.startsWith('${')) {
223
223
  // 格式是:${page.xxx} 或 ${data.xxx}
224
- prop = prop.substring(prop.indexOf('.')+1, prop.length - 1)
224
+ prop = prop.substring(prop.indexOf('.') + 1, prop.length - 1)
225
225
  }
226
226
  return getPropNameWhenJoinTable(prop, isJoinTable, tableName)
227
227
  },
@@ -296,7 +296,7 @@ export default {
296
296
  },
297
297
  getModelValue(model, propType) {
298
298
  let models = this.models
299
- if(propType && propType === 'page') {
299
+ if (propType && propType === 'page') {
300
300
  models = this.pageModels
301
301
  }
302
302
  let modelValue = ''
@@ -305,8 +305,8 @@ export default {
305
305
  modelValue = parentObj[model.substring(model.lastIndexOf('.') + 1)]
306
306
  } else {
307
307
  const name = this.getPropName(model)
308
- if(propType && propType === 'page') {
309
- modelValue = models?models[name]: null
308
+ if (propType && propType === 'page') {
309
+ modelValue = models ? models[name] : null
310
310
  } else {
311
311
  modelValue = models[name]
312
312
  }
@@ -520,11 +520,11 @@ export default {
520
520
  }
521
521
  },
522
522
  setValue(model, finallyOrgResult, propType) {
523
- if(!propType) {
524
- propType = this.getPropType(model)
523
+ if (!propType) {
524
+ propType = this.getPropType(model)
525
525
  }
526
526
  let models = this.models
527
- if(propType && propType === 'page') {
527
+ if (propType && propType === 'page') {
528
528
  models = this.pageModels
529
529
  }
530
530
  this.setEntityValue(model, finallyOrgResult, models)
@@ -579,3 +579,8 @@ export default {
579
579
  emits: ['replace', 'setValue', 'clear', 'focus', 'update:value', 'change']
580
580
  }
581
581
  </script>
582
+ <style lang="css">
583
+ .organization-input .el-input-group__append {
584
+ padding: 0 10px;
585
+ }
586
+ </style>
@@ -1022,15 +1022,26 @@ export default {
1022
1022
  }
1023
1023
  }
1024
1024
  },
1025
+ orgTreeSetSort() {
1026
+ // 设值排下序,否则出现所有映射还没设值完毕,就触发了change事件问题
1027
+ const columnPropIndex = this.fields.findIndex((filed) => filed.model === this.column.prop)
1028
+ if (columnPropIndex > -1) {
1029
+ const tempFiled = this.fields[columnPropIndex]
1030
+ this.fields.splice(columnPropIndex, 1)
1031
+ this.fields.push(tempFiled)
1032
+ }
1033
+ },
1025
1034
  // 显示组织树时需要计算指定部门
1026
1035
  showOrganizationTree() {
1027
1036
  if (this.column.orgTreeSet) {
1028
1037
  const orgTreeSet = JSON.parse(this.column.orgTreeSet)
1029
1038
  if (orgTreeSet.length) {
1030
1039
  this.fields = orgTreeSet
1040
+ this.orgTreeSetSort()
1031
1041
  } else {
1032
1042
  if (orgTreeSet.orgTreeSetArr) {
1033
1043
  this.fields = orgTreeSet.orgTreeSetArr
1044
+ this.orgTreeSetSort()
1034
1045
  }
1035
1046
  if (orgTreeSet.specifyType) {
1036
1047
  if (orgTreeSet.specifyType === 'dataTable') {
@@ -176,6 +176,7 @@ const superGridService = {
176
176
  gridParams.pagination = this.pagination
177
177
  gridParams.pageContext = this.pageContext
178
178
  gridParams.configureObj = this.configureObj
179
+ this.tableName = this.basicInfo.tableName
179
180
  gridParams.hiddenColumns = this.options.hiddenColumns?JSON.parse(JSON.stringify(this.options.hiddenColumns)):[]
180
181
  if (this.pagination) {
181
182
  // 监控每行显示多少条变量使用
@@ -2164,7 +2164,8 @@ export default {
2164
2164
  },
2165
2165
  getSearchParam() {
2166
2166
  const searchParam = {
2167
- code: this.code
2167
+ code: this.code,
2168
+ tableName: this.tableName
2168
2169
  }
2169
2170
  const gridParams = store.get(this.code)
2170
2171
  const pagination = this.getPaginationInfo()
@@ -3,6 +3,8 @@
3
3
  <WorkgroupMobileTree
4
4
  v-if="isMobile"
5
5
  ref="workgroupTree"
6
+ :close-on-click-modal="false"
7
+ :close-on-press-escape="false"
6
8
  :branch-info="branchInfo"
7
9
  :multiple="multiple"
8
10
  :search-field="searchField"
@@ -2,6 +2,8 @@
2
2
  <div>
3
3
  <WorkgroupMobileUserTree
4
4
  v-if="isMobile"
5
+ :close-on-click-modal="false"
6
+ :close-on-press-escape="false"
5
7
  :multiple="multiple"
6
8
  :branch-info="branchInfo"
7
9
  :search-field="searchField"
@@ -199,4 +199,36 @@ body .el-table colgroup.gutter {
199
199
  text-align: center;
200
200
  vertical-align: middle;
201
201
  justify-content: center;
202
+ }
203
+
204
+
205
+ /* 分隔组件 */
206
+ .amb-widget-separatelabel {
207
+ --el-card-border-color: var(--el-border-color-light);
208
+ --el-card-border-radius: 4px;
209
+ --el-card-padding: 20px;
210
+ --el-card-bg-color: var(--el-fill-color-blank);
211
+ background-color: var(--el-card-bg-color);
212
+ /* border: 1px solid var(--el-card-border-color); */
213
+ border-bottom: 1px solid var(--el-card-border-color);
214
+ border-radius: var(--el-card-border-radius);
215
+ color: var(--el-text-color-primary);
216
+ overflow: hidden;
217
+ transition: var(--el-transition-duration);
218
+ /* box-shadow: var(--el-box-shadow-light); */
219
+ padding: 10px;
220
+ padding-left: 0px;
221
+ margin-bottom: 18px;
222
+ }
223
+
224
+ .amb-widget-separatelabel>.label {
225
+ /* border-left: 4px solid #5893ef; */
226
+ border-bottom: 2px solid #5893ef;
227
+ color: #5893ef;
228
+ display: inline-block;
229
+ padding-left: 6px;
230
+ padding-right: 6px;
231
+ padding-bottom: 10px;
232
+ /* font-size: 14px; */
233
+ margin-bottom: -8px;
202
234
  }
@@ -11,12 +11,7 @@ class CalculatorFactory {
11
11
  * @return
12
12
  */
13
13
  isNullValue(leftValue, operator) {
14
- return (
15
- (leftValue === undefined ||
16
- leftValue === null ||
17
- leftValue + '' === '') &&
18
- operator === 'IS_NULL'
19
- )
14
+ return (leftValue === undefined || leftValue === null || leftValue + '' === '') && operator === 'IS_NULL'
20
15
  }
21
16
  /**
22
17
  * 空IS NOT NULL操作符时的处理
@@ -25,12 +20,7 @@ class CalculatorFactory {
25
20
  * @return true 表示给定的值不为空
26
21
  */
27
22
  isNotNullValue(leftValue, operator) {
28
- return (
29
- leftValue !== undefined &&
30
- leftValue !== null &&
31
- leftValue + '' !== '' &&
32
- operator === 'IS_NOT_NULL'
33
- )
23
+ return leftValue !== undefined && leftValue !== null && leftValue + '' !== '' && operator === 'IS_NOT_NULL'
34
24
  }
35
25
  /**
36
26
  * 空值时相等的处理
@@ -42,9 +32,7 @@ class CalculatorFactory {
42
32
  isEQEmptyValue(leftVale, operator, rightValue) {
43
33
  return (
44
34
  (leftVale === undefined || leftVale === null || leftVale + '' === '') &&
45
- (rightValue === undefined ||
46
- rightValue === null ||
47
- rightValue + '' === '') &&
35
+ (rightValue === undefined || rightValue === null || rightValue + '' === '') &&
48
36
  (operator === 'EQ' || operator === 'CONTAIN')
49
37
  )
50
38
  }
@@ -81,9 +69,7 @@ class NumberCalculator extends CalculatorFactory {
81
69
  } else if (operator === 'IS_NOT_NULL') {
82
70
  this.result = leftVale !== undefined && leftVale !== null
83
71
  } else {
84
- throw new Error(
85
- '表达式不合法:' + leftVale + ' ' + operator + ' ' + rightValue
86
- )
72
+ throw new Error('表达式不合法:' + leftVale + ' ' + operator + ' ' + rightValue)
87
73
  }
88
74
  }
89
75
  }
@@ -98,26 +84,28 @@ class TextCalculator extends CalculatorFactory {
98
84
  } else if (this.isNotNullValue(leftVale, operator)) {
99
85
  this.result = true
100
86
  } else if (leftVale === undefined || leftVale === null) {
101
- this.result = false
87
+ if (operator === 'NET') {
88
+ this.result = leftVale + '' !== rightValue + ''
89
+ } else if (operator === 'EQ') {
90
+ this.result = leftVale + '' === rightValue + ''
91
+ } else {
92
+ this.result = false
93
+ }
102
94
  } else {
103
95
  if (operator === 'NET') {
104
- this.result = (leftVale+'') !== (rightValue+'')
96
+ this.result = leftVale + '' !== rightValue + ''
105
97
  } else if (operator === 'EQ') {
106
- this.result = (leftVale+'') === (rightValue+'')
98
+ this.result = leftVale + '' === rightValue + ''
107
99
  } else if (operator === 'NOT_CONTAIN') {
108
- this.result = !(leftVale+'').includes(rightValue+'')
100
+ this.result = !(leftVale + '').includes(rightValue + '')
109
101
  } else if (operator === 'CONTAIN') {
110
- this.result = (leftVale+'').includes(rightValue+'')
102
+ this.result = (leftVale + '').includes(rightValue + '')
111
103
  } else if (operator === 'IS_NULL') {
112
- this.result =
113
- leftVale === undefined || leftVale === null || leftVale === ''
104
+ this.result = leftVale === undefined || leftVale === null || leftVale === ''
114
105
  } else if (operator === 'IS_NOT_NULL') {
115
- this.result =
116
- leftVale !== undefined && leftVale !== null && leftVale !== ''
106
+ this.result = leftVale !== undefined && leftVale !== null && leftVale !== ''
117
107
  } else {
118
- throw new Error(
119
- '表达式不合法:' + leftVale + ' ' + operator + ' ' + rightValue
120
- )
108
+ throw new Error('表达式不合法:' + leftVale + ' ' + operator + ' ' + rightValue)
121
109
  }
122
110
  }
123
111
  }
@@ -1,6 +1,6 @@
1
1
  import * as Vue from 'vue'
2
2
  import authApi from './auth-api'
3
- import { getToken, getLanguage, getAllLanguages, setAllLanguages } from './auth'
3
+ import { getToken, getLanguage, getAllLanguages, setAllLanguages, removeToken } from './auth'
4
4
  import { v4 as uuidv4 } from 'uuid'
5
5
  import { getCookieCache } from './auth'
6
6
  import i18nUtil from './i18n-util'
@@ -672,3 +672,25 @@ export function getCurrentSystemCode() {
672
672
  return window.$vueApp.config.globalProperties.systemCode
673
673
  }
674
674
  }
675
+
676
+ export function isLogoutTimeout(event) {
677
+ let isTimeout = false
678
+ if (
679
+ event &&
680
+ typeof event.data === 'string' &&
681
+ event.data.indexOf('loginTimeout') >= 0
682
+ ) {
683
+ if (
684
+ event &&
685
+ typeof event.data === 'string' &&
686
+ event.data.indexOf('loginTimeout') >= 0
687
+ ) {
688
+ // removeToken()
689
+ // this.$router.replace({
690
+ // path: '/login'
691
+ // })
692
+ isTimeout = true
693
+ }
694
+ }
695
+ return isTimeout
696
+ }
package/vite.config.js CHANGED
@@ -1,21 +1,17 @@
1
1
  import { defineConfig } from "vite";
2
2
  import vue from "@vitejs/plugin-vue";
3
3
  import path from "path";
4
- import { terser } from 'rollup-plugin-terser'
4
+ // import { terser } from 'rollup-plugin-terser'
5
5
  // https://vitejs.dev/config/
6
6
  export default defineConfig({
7
7
  plugins: [
8
- vue(),
9
- terser({
10
- compress: {
11
- drop_console: true,
12
- drop_debugger: true
13
- },
14
- output: {
15
- // 对于console.error,不做任何处理
16
- comments: (node, comment) => comment.type === 'error'
17
- }
18
- })
8
+ vue()
9
+ // terser({
10
+ // output: {
11
+ // // 对于console.error,不做任何处理
12
+ // comments: (node, comment) => comment.type === 'error'
13
+ // }
14
+ // })
19
15
  ],
20
16
  build: {
21
17
  outDir: "lib", //输出文件名称