agilebuilder-ui 1.1.50-rc1 → 1.1.50-sit1

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 (42) hide show
  1. package/lib/{401-aaa4054d.js → 401-a5673c5d.js} +1 -1
  2. package/lib/{404-ef3b10e9.js → 404-62f3a128.js} +1 -1
  3. package/lib/{iframe-page-28c30283.js → iframe-page-31db5f9e.js} +1 -1
  4. package/lib/{index-bece2c1c.js → index-c625583f.js} +13910 -13843
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +98 -98
  8. package/lib/{tab-content-iframe-index-87ac3b2b.js → tab-content-iframe-index-75aa0f68.js} +1 -1
  9. package/lib/{tab-content-index-956a0533.js → tab-content-index-229106e0.js} +1 -1
  10. package/lib/{tache-subprocess-history-2c4f98f2.js → tache-subprocess-history-ea3e3d70.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/department-tree-inline/src/search-result.vue +2 -1
  13. package/packages/department-user-tree-inline/src/search-result.vue +2 -1
  14. package/packages/fs-preview/src/fs-preview.vue +19 -7
  15. package/packages/fs-upload/src/fs-upload-multi.vue +5 -3
  16. package/packages/fs-upload/src/fs-upload-single.vue +6 -3
  17. package/packages/fs-upload-list/src/fs-upload-list.vue +6 -1
  18. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +6 -0
  19. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +6 -0
  20. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +6 -1
  21. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +6 -0
  22. package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +7 -0
  23. package/packages/fs-upload-new/src/fs-button-upload.vue +5 -0
  24. package/packages/fs-upload-new/src/fs-drag-upload.vue +5 -0
  25. package/packages/fs-upload-new/src/fs-preview-new.vue +25 -7
  26. package/packages/fs-upload-new/src/fs-upload-new.vue +16 -1
  27. package/packages/multipart-upload/src/multipart-upload-form.vue +6 -3
  28. package/packages/multipart-upload/src/multipart-upload-list.vue +6 -3
  29. package/packages/plugins/export-data-new.js +14 -1
  30. package/packages/super-grid/src/normal-column-content.vue +1 -0
  31. package/packages/super-grid/src/row-operation.vue +13 -9
  32. package/packages/super-grid/src/search-form-item.vue +17 -13
  33. package/packages/super-grid/src/utils.js +1 -0
  34. package/packages/super-grid/src/view-image-dialog.vue +6 -3
  35. package/src/utils/auth.js +3 -0
  36. package/src/utils/common-util.js +20 -5
  37. package/src/utils/request.js +7 -1
  38. package/src/utils/watermark-cache.js +13 -0
  39. package/src/utils/watermark.js +47 -6
  40. package/src/views/layout/EmptyLayout.vue +9 -1
  41. package/src/views/layout/Layout.vue +4 -0
  42. package/src/views/layout/NewLayout.vue +4 -0
@@ -157,7 +157,7 @@
157
157
  >
158
158
  <dynamic-source-select
159
159
  v-model:value="searchForm[column.prop]"
160
- :allow-create="true"
160
+ :allow-create="dataSourceOptions?.controlConfig?.allowCreate"
161
161
  :base-props="{
162
162
  multiple: column.componentType === 'multiselect' ? true : false
163
163
  }"
@@ -166,7 +166,7 @@
166
166
  :is-join-table="isJoinTable"
167
167
  :list-code="code"
168
168
  :list-toolbar-form-data="listToolbarFormData"
169
- :options="getDynamicDataSourceOptions(column)"
169
+ :options="dataSourceOptions"
170
170
  :table-name="tableName"
171
171
  @change="multiselectChange"
172
172
  />
@@ -289,7 +289,8 @@ export default {
289
289
  moduleConfig: {},
290
290
  dateVal: this.getFormItemValue(this.column.prop),
291
291
  controlConfig: getControlConfig(this.column),
292
- isShowEmtptyFlag: false
292
+ isShowEmtptyFlag: false,
293
+ dataSourceOptions: {}
293
294
  // checkedEmpty: false,
294
295
  }
295
296
  },
@@ -323,6 +324,14 @@ export default {
323
324
  if (this.column.valueSetOptions) {
324
325
  this.moduleConfig = JSON.parse(this.column.valueSetOptions)
325
326
  }
327
+ const componentType = this.column.componentType
328
+ if (
329
+ componentType &&
330
+ (componentType === 'multiselect' || componentType === 'select') &&
331
+ this.isDynamicDataSourceSource(this.column)
332
+ ) {
333
+ this.dataSourceOptions = this.getDynamicDataSourceOptions(this.column)
334
+ }
326
335
  console.log('searchitem页面', this.column)
327
336
  },
328
337
  mounted() {
@@ -346,12 +355,7 @@ export default {
346
355
  return isDynamicDataSourceSource(column)
347
356
  },
348
357
  setValueToModelProp(prop, value, componentName, index) {
349
- console.log('setValueToModelProp',
350
- prop,
351
- value,
352
- componentName,
353
- index
354
- )
358
+ console.log('setValueToModelProp', prop, value, componentName, index)
355
359
  if (prop && prop.indexOf('.') > 0) {
356
360
  const parentOjbect = this.getParentObject(prop)
357
361
  // 嵌套属性中的最后一个属性是属于这个中间父对象的,所有要通过中间父对象来赋值
@@ -497,10 +501,10 @@ export default {
497
501
  return ['00:00:00']
498
502
  }
499
503
  } else {
500
- const now = new Date();
501
- const year = now.getFullYear(); // e.g., 2023
502
- const month = now.getMonth() + 1; // Months are 0-indexed, so add 1
503
- const day = now.getDate(); // Day of the month
504
+ const now = new Date()
505
+ const year = now.getFullYear() // e.g., 2023
506
+ const month = now.getMonth() + 1 // Months are 0-indexed, so add 1
507
+ const day = now.getDate() // Day of the month
504
508
  return [`${year}-${month}-${day} 00:00:00`, `${year}-${month}-${day} 23:59:59`]
505
509
  }
506
510
  },
@@ -768,6 +768,7 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap, b
768
768
  options.dynamicDataSourceCode = valueSetOptionsObj.dynamicDataSourceCode
769
769
  }
770
770
  }
771
+ options.controlConfig = getControlConfig(column)
771
772
  return options
772
773
  }
773
774
 
@@ -51,7 +51,7 @@ import * as Vue from 'vue'
51
51
  import {
52
52
  isPlateSys,
53
53
  getSystemFrontendUrl,
54
- getKkFileBackendUrl,
54
+ getKkFilePreviewUrl,
55
55
  } from '../../../src/utils/common-util'
56
56
  import {getToken} from '../../../src/utils/auth'
57
57
 
@@ -155,7 +155,10 @@ export default {
155
155
  //要预览文件的访问地址
156
156
  const myPreviewUrl = originUrl + '&fullfilename='+myShowName
157
157
  // http://127.0.0.1:8012/onlinePreview
158
- previewUrl = getKkFileBackendUrl() +'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
158
+ getKkFilePreviewUrl(myPreviewUrl).then(url=>{
159
+ window.open(url, myShowName)
160
+ })
161
+ // previewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl+'?url='+encodeURIComponent(Base64.encode(myPreviewUrl))
159
162
  } else {
160
163
  previewUrl =
161
164
  this.baseUrl +
@@ -166,8 +169,8 @@ export default {
166
169
  encodeURI(myShowName) +
167
170
  '&serverPath=' +
168
171
  uuid
172
+ window.open(previewUrl, myShowName)
169
173
  }
170
- window.open(previewUrl, myShowName)
171
174
  }
172
175
  },
173
176
  deleteFile() {
package/src/utils/auth.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import authApi from './auth-api'
2
2
  import { removeAllSystemPermissions } from './permissionAuth'
3
3
  import { removeGlobalPropCache } from './global-prop'
4
+ import { removeWatermark} from './watermark-cache'
4
5
 
5
6
  export function getToken() {
6
7
  return authApi.getToken()
@@ -168,4 +169,6 @@ export function clearPermission() {
168
169
 
169
170
  // 清除系统参数设置的全局属性缓存
170
171
  removeGlobalPropCache()
172
+ // 清除水印配置
173
+ removeWatermark()
171
174
  }
@@ -3,6 +3,8 @@ import { getToken, getLanguage, getAllLanguages, setAllLanguages } from './auth'
3
3
  import { v4 as uuidv4 } from 'uuid'
4
4
  import { getCookieCache } from './auth'
5
5
  import i18nUtil from './i18n-util'
6
+ import { Base64 } from 'js-base64'
7
+ import { getWatermarkSetting } from './watermark'
6
8
 
7
9
  /**
8
10
  * 获得相对地址
@@ -818,11 +820,24 @@ export function getURLSearchParamObj(fullPath) {
818
820
  console.error('error===',error)
819
821
  }
820
822
  }
821
- /**
822
- * 获得KKFileView的路径。
823
- * @returns
824
- */
825
- export function getKkFileBackendUrl() {
823
+
824
+ // 获得KKFileView预览url,处理水印
825
+ export function getKkFilePreviewUrl(previewUrl) {
826
+ let myPreviewUrl = getKkFileBackendUrl()+'?url='+encodeURIComponent(Base64.encode(previewUrl))
827
+ return new Promise((resolve,reject)=>{
828
+ getWatermarkSetting().then((watermark)=>{
829
+ if(watermark){
830
+ myPreviewUrl = myPreviewUrl + '&watermarkTxt='+watermark.content+'&watermarkXSpace=60&watermarkYSpace=100&watermarkWidth=500&watermarkHeight=100'
831
+ }
832
+ resolve(myPreviewUrl)
833
+ }).catch((error)=>{
834
+ console.error('获得水印失败',error)
835
+ resolve(myPreviewUrl)
836
+ })
837
+ })
838
+ }
839
+
840
+ function getKkFileBackendUrl() {
826
841
  let kkFileViewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl
827
842
  let kkFileViewUrlResult = kkFileViewUrl
828
843
  let baseURL = window.$vueApp.config.globalProperties.baseURL
@@ -80,7 +80,13 @@ service.interceptors.response.use(
80
80
  }
81
81
  } else if (error.response.status === 403) {
82
82
  // ForbiddenException(403) 403没权限
83
- const message = getI18n().t('imatrixUIMessage.forbiddenException')
83
+ let message = ''
84
+ if (error.response.data?.message) {
85
+ message = error.response.data.message
86
+ console.error('ForbiddenException(403):', error.response.data)
87
+ } else {
88
+ message = getI18n().t('imatrixUIMessage.forbiddenException')
89
+ }
84
90
  const serverConfig = window['$vueApp'].config.globalProperties
85
91
  let vnode
86
92
  if (serverConfig.forbiddenUser || serverConfig.forbiddenLinkUrl) {
@@ -0,0 +1,13 @@
1
+ const watermarkSetting = 'AMB_WATERMARK_SETTING'
2
+
3
+ export function getWatermark() {
4
+ return localStorage.getItem(watermarkSetting)
5
+ }
6
+
7
+ export function cacheWatermark(value) {
8
+ localStorage.setItem(watermarkSetting, value)
9
+ }
10
+
11
+ export function removeWatermark() {
12
+ localStorage.removeItem(watermarkSetting)
13
+ }
@@ -1,5 +1,4 @@
1
- 'use strict'
2
- // import ssoService from '../api/sso-service'
1
+ import {getWatermark, cacheWatermark, removeWatermark} from './watermark-cache'
3
2
  const watermark = {}
4
3
 
5
4
  const setWatermark = (str, parma, paramId) => {
@@ -35,12 +34,12 @@ const setWatermark = (str, parma, paramId) => {
35
34
  const div = document.createElement('div')
36
35
  div.id = id
37
36
  div.style.pointerEvents = 'none'
38
- div.style.top = '80px'
39
- div.style.left = '200px'
37
+ div.style.top = '10px' // 80px
38
+ div.style.left = '0px' // 200px
40
39
  div.style.position = 'fixed'
41
40
  div.style.zIndex = '10000'
42
- div.style.width = '70%'
43
- div.style.height = '80%'
41
+ div.style.width = '100%' // 70%
42
+ div.style.height = '100%' // 80%
44
43
  div.style.background =
45
44
  'url(' + can.toDataURL('image/png') + ') left top repeat'
46
45
 
@@ -71,6 +70,48 @@ export function showWatermark(label, parma, user, paramId) {
71
70
  }
72
71
  })
73
72
  }
73
+
74
+ // 获得水印维护信息
75
+ export function getWatermarkSetting(){
76
+ return new Promise((resolve,reject)=>{
77
+ let watermark = getWatermark()
78
+ if(!watermark || watermark === 'EMPTY_VALUE'){
79
+ window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + '/component/watermark').then((data)=>{
80
+ if(data){
81
+ watermark = data
82
+ cacheWatermark(JSON.stringify(watermark))
83
+ // 兼容之前的代码
84
+ watermark.font = watermark.fontStyle
85
+ watermark.color = watermark.fontColor
86
+ resolve(watermark)
87
+ } else {
88
+ cacheWatermark('EMPTY_VALUE')
89
+ resolve()
90
+ }
91
+ })
92
+ } else {
93
+ try{
94
+ watermark = JSON.parse(watermark)
95
+ // 兼容之前的代码
96
+ watermark.font = watermark.fontStyle
97
+ watermark.color = watermark.fontColor
98
+ resolve(watermark)
99
+ }catch(error){
100
+ console.error('watermark content error.',error)
101
+ resolve()
102
+ }
103
+ }
104
+ })
105
+ }
106
+
107
+ // 该方法只允许调用一次
108
+ export function showWatermarkNew() {
109
+ getWatermarkSetting().then((watermark)=>{
110
+ if(watermark){
111
+ setWatermark(watermark.content, watermark)
112
+ }
113
+ })
114
+ }
74
115
  // watermark.set = (label, parma) => {
75
116
 
76
117
  // }
@@ -1,3 +1,11 @@
1
1
  <template>
2
2
  <router-view />
3
- </template>
3
+ </template>
4
+ <script>
5
+ import {showWatermarkNew} from '../../utils/watermark'
6
+ export default {
7
+ mounted(){
8
+ showWatermarkNew()
9
+ }
10
+ }
11
+ </script>
@@ -17,6 +17,7 @@
17
17
  import { Sidebar, AppMain, Breadcrumb } from './components'
18
18
  import ResizeMixin from './mixin/ResizeHandler'
19
19
  import { isShowMenuRoute } from '../../../src/utils/common-util'
20
+ import {showWatermarkNew} from '../../utils/watermark'
20
21
 
21
22
  export default {
22
23
  name: 'Layout',
@@ -49,6 +50,9 @@ export default {
49
50
  }
50
51
  },
51
52
  },
53
+ mounted(){
54
+ showWatermarkNew()
55
+ },
52
56
  methods: {
53
57
  handleClickOutside() {
54
58
  this.$store.dispatch('closeSidebar', { withoutAnimation: false })
@@ -9,10 +9,14 @@
9
9
 
10
10
  <script>
11
11
  import { AppMain } from './components'
12
+ import {showWatermarkNew} from '../../utils/watermark'
12
13
  export default {
13
14
  name: 'NewLayout',
14
15
  components: {
15
16
  AppMain,
16
17
  },
18
+ mounted(){
19
+ showWatermarkNew()
20
+ }
17
21
  }
18
22
  </script>