wolyshaw %!s(int64=4) %!d(string=hai) anos
pai
achega
d47625a0a2

+ 4 - 1
src/views/accompaniment/index.vue

@@ -173,7 +173,10 @@ export default {
     },
     title() {
       const t1 = this.detail ? '修改' : '添加'
-      const t2 = this.type === 'COMMON' ? '公用' : '个人'
+      let t2 = this.type === 'COMMON' ? '公用' : '个人'
+      if (this.detail) {
+        t2 = this.detail.type === 'COMMON' ? '公用' : '个人'
+      }
       return t1 + t2 + '伴奏'
     },
   },

+ 2 - 2
src/views/accompaniment/modals/form.vue

@@ -113,14 +113,14 @@ export default {
             await Add({
               ...this.form,
               subjectIds: this.form.subjectIds.join(','),
-              type: this.type,
+              type: 'COMMON',
             })
             this.$message.success('提交成功')
           } else {
             await Update({
               ...this.form,
               subjectIds: this.form.subjectIds.join(','),
-              type: this.type,
+              type: this.detail.type,
               id: this.detail.id
             })
             this.$message.success('修改成功')