diff --git a/src/components/BatchImageAdd/index.vue b/src/components/BatchImageAdd/index.vue
index effeee0..57ee283 100644
--- a/src/components/BatchImageAdd/index.vue
+++ b/src/components/BatchImageAdd/index.vue
@@ -20,6 +20,9 @@
+
+
+
@@ -41,11 +44,16 @@
type: Function,
required: true,
},
+ hasType: {
+ type: Boolean,
+ default: false,
+ },
},
data() {
return {
dialogVisible: false,
isEnabled: true,
+ type: '',
loading: false,
fileList: [],
previewVisible: false,
@@ -71,6 +79,7 @@
},
close() {
this.isEnabled = true
+ this.type = ''
this.loading = false
this.fileList = []
this.dialogVisible = false
@@ -102,13 +111,17 @@
try {
let successCount = 0
for (const url of urls) {
- await this.doAdd({ imageUrl: url, isEnabled: this.isEnabled })
+ const data = { imageUrl: url, isEnabled: this.isEnabled }
+ if (this.hasType) {
+ data.type = this.type
+ }
+ await this.doAdd(data)
successCount++
}
- this.$baseMessage(`成功添加 ${successCount} 条数据`, 'success')
this.$emit('fetch-data')
this.close()
} catch (error) {
+ console.error('批量添加失败:', error)
this.$baseMessage('部分或全部添加失败', 'error')
} finally {
this.loading = false
diff --git a/src/views/spring/avatar/avatarDecor/components/AppManagementEdit.vue b/src/views/spring/avatar/avatarDecor/components/AppManagementEdit.vue
index 0db4ee0..db88008 100644
--- a/src/views/spring/avatar/avatarDecor/components/AppManagementEdit.vue
+++ b/src/views/spring/avatar/avatarDecor/components/AppManagementEdit.vue
@@ -1,6 +1,9 @@
+
+
+
+
@@ -55,7 +56,7 @@
@size-change="handleSizeChange"
/>
-
+
diff --git a/src/views/spring/avatar/avatarFrame/components/AppManagementEdit.vue b/src/views/spring/avatar/avatarFrame/components/AppManagementEdit.vue
index 7957143..01ae7ba 100644
--- a/src/views/spring/avatar/avatarFrame/components/AppManagementEdit.vue
+++ b/src/views/spring/avatar/avatarFrame/components/AppManagementEdit.vue
@@ -1,6 +1,9 @@
+
+
+
+
@@ -55,7 +56,7 @@
@size-change="handleSizeChange"
/>
-
+
diff --git a/src/views/spring/avatar/systemAvatar/components/AppManagementEdit.vue b/src/views/spring/avatar/systemAvatar/components/AppManagementEdit.vue
index 58ef3d4..47fcf73 100644
--- a/src/views/spring/avatar/systemAvatar/components/AppManagementEdit.vue
+++ b/src/views/spring/avatar/systemAvatar/components/AppManagementEdit.vue
@@ -9,6 +9,9 @@
@upload-success="handleUploadSuccess"
/>
+
+
+
@@ -33,6 +36,7 @@
id: '',
form: {
imageUrl: '',
+ type: '',
isEnabled: true,
},
rules: {
@@ -60,6 +64,7 @@
this.title = '编辑'
this.form = {
imageUrl: row.imageUrl,
+ type: row.type,
isEnabled: row.isEnabled,
}
this.id = row.id
diff --git a/src/views/spring/avatar/systemAvatar/index.vue b/src/views/spring/avatar/systemAvatar/index.vue
index 030faab..a11f497 100644
--- a/src/views/spring/avatar/systemAvatar/index.vue
+++ b/src/views/spring/avatar/systemAvatar/index.vue
@@ -20,6 +20,7 @@
+
@@ -55,7 +56,7 @@
@size-change="handleSizeChange"
/>
-
+