vue2-client 1.8.76 → 1.8.78
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -118,10 +118,12 @@ export default {
|
|
|
118
118
|
|
|
119
119
|
upload(formData, this.serviceName, { headers, timeout: 600 * 1000 }).then(res => {
|
|
120
120
|
// 根据服务端返回的结果判断成功与否,设置文件条目的状态
|
|
121
|
-
if (res.success) {
|
|
121
|
+
if (res.success || res.id) {
|
|
122
122
|
fileInfo.status = 'done'
|
|
123
123
|
let dataObj
|
|
124
|
-
if (
|
|
124
|
+
if (res.id) {
|
|
125
|
+
dataObj = res
|
|
126
|
+
} else if (typeof res.data === 'string') {
|
|
125
127
|
dataObj = JSON.parse(res.data)
|
|
126
128
|
} else {
|
|
127
129
|
dataObj = res.data
|
|
@@ -188,10 +188,12 @@ export default {
|
|
|
188
188
|
// 设置表单分组项目相关参数
|
|
189
189
|
for (let i = 0; i < this.groupJsonData.length; i++) {
|
|
190
190
|
const groupItem = this.groupJsonData[i]
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
if (groupItem.groupItems.length > 0) {
|
|
192
|
+
formData[groupItem.model] = {}
|
|
193
|
+
for (let j = 0; j < groupItem.groupItems.length; j++) {
|
|
194
|
+
const item = groupItem.groupItems[j]
|
|
195
|
+
this.setFormProps(formData[groupItem.model], item)
|
|
196
|
+
}
|
|
195
197
|
}
|
|
196
198
|
}
|
|
197
199
|
// 设置动态简易表单项的相关参数
|
|
@@ -445,7 +447,7 @@ export default {
|
|
|
445
447
|
for (let i = 0; i < this.groupJsonData.length; i++) {
|
|
446
448
|
const item = this.groupJsonData[i]
|
|
447
449
|
try {
|
|
448
|
-
if (modifyModelData.data[item.model]) {
|
|
450
|
+
if (item.groupItems.length > 0 && modifyModelData.data[item.model]) {
|
|
449
451
|
this.form[item.model] = JSON.parse(modifyModelData.data[item.model])
|
|
450
452
|
}
|
|
451
453
|
} catch (e) {
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
const value = this.form[this.model]
|
|
70
70
|
if (value) {
|
|
71
71
|
// 如果数据源中值含'-',代表是由多个数据源组成的树,需要重新组织新增/编辑时的表单值
|
|
72
|
-
if (this.option.length > 0 && this.option[0].value.indexOf('-') !== -1) {
|
|
72
|
+
if (this.option.length > 0 && this.option[0].value.toString().indexOf('-') !== -1) {
|
|
73
73
|
this.value = model + '-' + value
|
|
74
74
|
} else {
|
|
75
75
|
this.value = value
|