t20-common-lib 0.15.34 → 0.15.36

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": "t20-common-lib",
3
- "version": "0.15.34",
3
+ "version": "0.15.36",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -23,7 +23,15 @@ export const fileUploadTableMixin = {
23
23
  dataPorp: {
24
24
  fileAccept: '.rar,.zip,.doc,.docx,.pdf,image/*,.xls,.xlsx',
25
25
  typeOptions: [],
26
- multiple: false
26
+ multiple: false,
27
+ keys: {
28
+ rowKey: 'beid',
29
+ type: 'attno', // 附件类型
30
+ name: 'recordname', // 附件名称
31
+ url: 'beid', // 上传文件返回的文件地址
32
+ time: 'uploadtime', // 附件上传时间
33
+ user: 'creator' // 附件上传人
34
+ }
27
35
  },
28
36
  mapdata: {}
29
37
  }
@@ -99,10 +107,9 @@ export const fileUploadTableMixin = {
99
107
  JSON.stringify({
100
108
  syscode: uploadParam.syscode,
101
109
  appno: uploadParam.appno,
102
- bussValue: this.mapdata[row.type],
103
- attno: row.type,
104
- bussId:
105
- uploadParam && uploadParam.paymentTemplate === 'REQUEST_PAYOUT' ? '' : uploadParam.bussId,
110
+ bussValue: this.mapdata[row.type || row.attno],
111
+ attno: row.type || row.attno,
112
+ bussId: uploadParam.bussId,
106
113
  cltno: JSON.parse(sessionStorage.getItem('userInfo') || '{}').cltNo,
107
114
  memo: file.name,
108
115
  recordname: file.name,
@@ -204,15 +211,12 @@ export const fileUploadTableMixin = {
204
211
  onSuccess(file, row) {
205
212
  const _fileData = file.response
206
213
  this.$set(row, 'id', _fileData.data)
207
- this.$set(row, 'bussValue', this.mapdata[row.type])
208
- let userName = ''
209
- try {
210
- const raw = sessionStorage.getItem('User_Info') || sessionStorage.getItem('userInfo')
211
- if (raw) userName = JSON.parse(raw).userName || ''
212
- } catch (e) {
213
- userName = ''
214
- }
215
- this.$set(row, 'user', userName)
214
+ this.$set(row, 'bussValue', this.mapdata[row.type || row.attno])
215
+ this.$set(
216
+ row,
217
+ "creator",
218
+ JSON.parse(sessionStorage.getItem("User_Info")).userName
219
+ );
216
220
  this.$set(row, 'archiveId', _fileData.data)
217
221
  this.$set(row, 'beid', _fileData.data)
218
222
  },