vue2-client 1.2.55-test2 → 1.2.56

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.
@@ -68,7 +68,7 @@ export default {
68
68
  ...mapState('account', { currUser: 'user' })
69
69
  },
70
70
  created () {
71
- this.uploadedFileList = this.mode.type === 'file' ? [...this.files] : [...this.images]
71
+ this.uploadedFileList = this.model.type === 'file' ? [...this.files] : [...this.images]
72
72
  },
73
73
  methods: {
74
74
  uploadFiles (info) {
@@ -86,15 +86,16 @@ export default {
86
86
  const headers = {
87
87
  'Content-Type': 'multipart/form-data',
88
88
  }
89
+ // TODO 暂时给默认值 基础表单调整好后处理
89
90
  const formData = new FormData()
90
91
  formData.append('avatar', info.file)
91
- formData.append('resUploadMode', this.model.resUploadMode)
92
+ formData.append('resUploadMode', this.model.resUploadMode ?? 'server')
92
93
  if (this.model.pathKey) {
93
- formData.append('pathKey', this.model.pathKey)
94
+ formData.append('pathKey', this.model.pathKey ?? 'cs')
94
95
  }
95
- formData.append('stockAlias', this.model.stockAlias)
96
+ // formData.append('stockAlias', this.model.stockAlias)
96
97
  formData.append('formType', this.model.type)
97
- formData.append('resUploadStock', this.model.resUploadStock)
98
+ formData.append('resUploadStock', this.model.resUploadStock ?? 1)
98
99
  formData.append('filename', info.file.name)
99
100
  formData.append('filesize', (info.file.size / 1024 / 1024).toFixed(4))
100
101
  formData.append('f_operator', this.currUser.username)
@@ -257,11 +257,12 @@ export default {
257
257
  }
258
258
  }
259
259
  this.form = formData
260
- this.files = this.modifyModelData.files
261
- this.images = this.modifyModelData.images
262
- this.modifyModelData = this.modifyModelData.data
263
- if (Object.keys(this.modifyModelData).length > 0) {
264
- this.getModifyModelData()
260
+ if (this.modifyModelData.data) {
261
+ this.files = this.modifyModelData.files
262
+ this.images = this.modifyModelData.images
263
+ if (Object.keys(this.modifyModelData.data).length > 0) {
264
+ this.getModifyModelData()
265
+ }
265
266
  }
266
267
  },
267
268
  itemDisabled (value) {
@@ -316,18 +317,18 @@ export default {
316
317
  getModifyModelData () {
317
318
  for (let i = 0; i < this.realJsonData.length; i++) {
318
319
  const item = this.realJsonData[i]
319
- if (this.modifyModelData[item.model] || this.modifyModelData[item.model] === 0) {
320
- this.form[item.model] = this.modifyModelData[item.model] + ''
320
+ if (this.modifyModelData.data[item.model] || this.modifyModelData.data[item.model] === 0) {
321
+ this.form[item.model] = this.modifyModelData.data[item.model] + ''
321
322
  } else {
322
323
  this.form[item.model] = undefined
323
324
  }
324
325
  }
325
326
  // 追加版本号信息
326
327
  for (const item of this.versionJsonData) {
327
- if (!this.modifyModelData[item.model]) {
328
+ if (!this.modifyModelData.data[item.model]) {
328
329
  this.form[item.model] = 0
329
330
  } else {
330
- this.form[item.model] = this.modifyModelData[item.model] + ''
331
+ this.form[item.model] = this.modifyModelData.data[item.model] + ''
331
332
  }
332
333
  }
333
334
  },