agilebuilder-ui 1.0.13 → 1.0.15

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.13",
3
+ "version": "1.0.15",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -244,6 +244,13 @@ export default {
244
244
  // 返回false停止上传
245
245
  return false
246
246
  }
247
+ const beforeUpload = this.fileSetObj.beforeUpload
248
+ if(beforeUpload) {
249
+ const result = beforeUpload.call(this, {pageContext: this.fileSetObj.pageContext, configureObj: this.fileSetObj.configureObj, file: file})
250
+ if(result!==undefined && result!==null && result !== true){
251
+ return false
252
+ }
253
+ }
247
254
  },
248
255
  // 上传成功
249
256
  uploadOnSuccess(response, file) {
@@ -378,9 +385,7 @@ export default {
378
385
  'delete-success',
379
386
  'delete',
380
387
  'update:value',
381
- ,
382
388
  'close',
383
- ,
384
389
  'update:value',
385
390
  ],
386
391
  }
@@ -21,6 +21,7 @@
21
21
  :size="size"
22
22
  type="text"
23
23
  @click="showOrganizationTree(false)"
24
+ @change="changeEvent"
24
25
  >
25
26
  <template v-slot:append>
26
27
  <el-icon class="el-input__icon" @click="showOrganizationTree(false)"><el-icon-search/></el-icon>
@@ -98,7 +99,6 @@
98
99
 
99
100
  <script>
100
101
  import {Delete as ElIconDelete, Search as ElIconSearch,} from '@element-plus/icons-vue'
101
- import {$emit} from '../../utils/gogocodeTransfer'
102
102
  // import Vue from 'vue'
103
103
  import {getPropNameWhenJoinTable, setEntityFieldValue,} from '../../../src/utils/util'
104
104
 
@@ -188,6 +188,10 @@ export default {
188
188
  created() {
189
189
  },
190
190
  methods: {
191
+ // change事件
192
+ changeEvent(value) {
193
+ this.$emit('change', value)
194
+ },
191
195
  // 打开组织树
192
196
  showOrganizationTree() {
193
197
  let isMulti = this.multiple
@@ -200,6 +204,7 @@ export default {
200
204
  }
201
205
  this.$emit('focus')
202
206
  this.showOrganizationTreeFlag = true
207
+ this.$emit('show-tree')
203
208
  },
204
209
  getPropName(prop, isJoinTable, tableName) {
205
210
  return getPropNameWhenJoinTable(prop, isJoinTable, tableName)
@@ -193,14 +193,20 @@ export default {
193
193
  return {}
194
194
  },
195
195
  created() {
196
- this.getI18nSet().then((processI18n) => {
197
- this.processI18n = processI18n
198
- if (!this.histories || this.histories === null) {
199
- this.getData()
200
- } else {
201
- this.loaded = true
202
- }
203
- })
196
+ console.log('historyList---workflowId==', this.workflowId)
197
+ if(this.workflowId !== undefined && this.workflowId !== null){
198
+ this.getI18nSet().then((processI18n) => {
199
+ this.processI18n = processI18n
200
+ if (!this.histories || this.histories === null) {
201
+ this.getData()
202
+ } else {
203
+ this.loaded = true
204
+ }
205
+ })
206
+ } else {
207
+ // 页面设计器预览页面时会用该方法
208
+ this.initTableData()
209
+ }
204
210
  },
205
211
  mounted() {
206
212
  this.$nextTick(() => {
@@ -210,34 +216,41 @@ export default {
210
216
  methods: {
211
217
  ...ApiJs,
212
218
  getData() {
213
- this.$http
214
- .get(
215
- window.$vueApp.config.globalProperties.baseAPI +
216
- '/wf-editor/instance-histories/' +
217
- this.workflowId
218
- )
219
- .then((data) => {
220
- this.histories = data.histories
221
- if (data && data.currentTasks) {
222
- this.histories = this.histories.concat(data.currentTasks)
223
- }
224
- this.loaded = true
225
- if (this.maxHeight) {
226
- this.tableMaxHeight = Number(this.maxHeight)
227
- } else {
228
- if (this.$parent.$el.offsetHeight) {
229
- this.tableMaxHeight = this.$parent.$el.offsetHeight
230
- }
231
- if (!this.tableMaxHeight) {
232
- this.tableMaxHeight = window.innerHeight - 120
233
- }
234
- }
219
+ this.$http
220
+ .get(
221
+ window.$vueApp.config.globalProperties.baseAPI +
222
+ '/wf-editor/instance-histories/' +
223
+ this.workflowId
224
+ )
225
+ .then((data) => {
226
+ this.initTableData(data)
235
227
  })
236
228
  .catch((error) => {
237
229
  console.log(error)
238
230
  this.loaded = true
239
231
  })
240
232
  },
233
+ initTableData(data) {
234
+ if(data) {
235
+ this.histories = data.histories
236
+ if (data && data.currentTasks) {
237
+ this.histories = this.histories.concat(data.currentTasks)
238
+ }
239
+ } else {
240
+ this.histories = []
241
+ }
242
+ this.loaded = true
243
+ if (this.maxHeight) {
244
+ this.tableMaxHeight = Number(this.maxHeight)
245
+ } else {
246
+ if (this.$parent.$el.offsetHeight) {
247
+ this.tableMaxHeight = this.$parent.$el.offsetHeight
248
+ }
249
+ if (!this.tableMaxHeight) {
250
+ this.tableMaxHeight = window.innerHeight - 120
251
+ }
252
+ }
253
+ },
241
254
  getI18nSet() {
242
255
  return new Promise((resolve, reject) => {
243
256
  if (this.allProcessI18n) {
@@ -112,12 +112,12 @@ export default {
112
112
  getDefaultActive() {
113
113
  if (this.firstLeafMenu && this.firstLeafMenu.pageType !== 'iframe') {
114
114
  const pageCode = this.firstLeafMenu.path
115
- return '/dsc/' + this.firstLeafMenu.code + '~~' + pageCode
115
+ return '/dsc/' + this.firstLeafMenu.code + '~~' + pageCode + '~~' + this.firstLeafMenu.newPage
116
116
  } else if (
117
117
  this.firstLeafMenu &&
118
118
  this.firstLeafMenu.pageType === 'iframe'
119
119
  ) {
120
- return '/dsc/' + this.firstLeafMenu.code + '~~'
120
+ return '/dsc/' + this.firstLeafMenu.code + '~~pageCode' + '~~' + this.firstLeafMenu.newPage
121
121
  } else {
122
122
  return ''
123
123
  }
@@ -44,7 +44,7 @@ export default {
44
44
  let defaultPageTip = window.$vueApp.config.globalProperties.defaultPageTip
45
45
  if (!defaultPageTip) {
46
46
  defaultPageTip =
47
- '欢迎访问质量管理系统/Welcome to Quality Management System'
47
+ '欢迎访问Agile Builder/Welcome to Agile Builder'
48
48
  }
49
49
  let defaultPageTipCn = defaultPageTip
50
50
  let defaultPageTipEn
@@ -44,7 +44,7 @@ export default {
44
44
  let defaultPageTip = window.$vueApp.config.globalProperties.defaultPageTip
45
45
  if (!defaultPageTip) {
46
46
  defaultPageTip =
47
- '欢迎访问质量管理系统/Welcome to Quality Management System'
47
+ '欢迎访问Agile Builder/Welcome to Agile Builder'
48
48
  }
49
49
  let defaultPageTipCn = defaultPageTip
50
50
  let defaultPageTipEn
@@ -77,7 +77,23 @@ export default {
77
77
  // 登录超时,给父iframe发送信号
78
78
  window.addEventListener('message', this.recieveMessage)
79
79
  },
80
- methods: {
80
+ mounted() {
81
+ // 监听菜单管理切换应用功能,刷新页面
82
+ window.addEventListener('message', function(event) {
83
+ if (event.data === 'refreshTabContent') { // 确保消息来源可信
84
+ window.location.reload();
85
+ }
86
+ });
87
+ },
88
+ unmounted() {
89
+ // 移除监听
90
+ window.removeEventListener('message', function(event) {
91
+ if (event.data === "refreshTabContent") { // 确保消息来源可信
92
+ console.log("Received message:", event.data);
93
+ }
94
+ });
95
+ },
96
+ methods: {
81
97
  closeSelectedTag(tagName) {
82
98
  const index = this.$store.state.tabContent.openTab.findIndex(
83
99
  (item) => item.code === tagName
@@ -128,7 +144,7 @@ export default {
128
144
  } else {
129
145
  // 表示页面跳转
130
146
  if(tag.routePath.indexOf('http:') < 0 && tag.routePath.indexOf('https:') < 0 ) {
131
- path = '#'
147
+ path = '#'
132
148
  }
133
149
  if(tag.routePath.indexOf('?') >= 0) {
134
150
  path = path + tag.routePath + '&'