|
@@ -21,12 +21,6 @@
|
|
:label="item.label" />
|
|
:label="item.label" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="当前状态:" prop="status">
|
|
|
|
- <el-select v-model="form.status" placeholder="请选择当前状态">
|
|
|
|
- <el-option v-for="item in onOrOffOptions" :key="item.value" :label="item.label"
|
|
|
|
- :value="item.value" />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="歌手简介:" prop="description">
|
|
<el-form-item label="歌手简介:" prop="description">
|
|
<el-input v-model="form.description" type="textarea" rows="5" placeholder="请输入歌手简介" />
|
|
<el-input v-model="form.description" type="textarea" rows="5" placeholder="请输入歌手简介" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -42,18 +36,16 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { detail, create, edit } from '@/api/music/singer'
|
|
|
|
-import { sexMixin, regionMixin, platformMixin, onOrOffMixin } from '@/mixin/index'
|
|
|
|
|
|
+import { detail, submit } from '@/api/music/singer'
|
|
|
|
+import { sexMixin, regionMixin, platformMixin } from '@/mixin/index'
|
|
import Upload from '@/components/Upload/index.vue'
|
|
import Upload from '@/components/Upload/index.vue'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
Upload
|
|
Upload
|
|
},
|
|
},
|
|
- mixins: [sexMixin, regionMixin, platformMixin, onOrOffMixin],
|
|
|
|
|
|
+ mixins: [sexMixin, regionMixin, platformMixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- // 音频类型
|
|
|
|
- audioType: 9,
|
|
|
|
// 表单
|
|
// 表单
|
|
form: {
|
|
form: {
|
|
name: '',
|
|
name: '',
|
|
@@ -97,6 +89,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ // 获取资源平台
|
|
|
|
+ this.getPlatform(9)
|
|
if (this.$route.query.id) {
|
|
if (this.$route.query.id) {
|
|
this.form.id = this.$route.query.id
|
|
this.form.id = this.$route.query.id
|
|
this.disabled = Boolean(this.$route.query.disabled)
|
|
this.disabled = Boolean(this.$route.query.disabled)
|
|
@@ -122,21 +116,13 @@ export default {
|
|
getSubmit() {
|
|
getSubmit() {
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if (this.form.id) {
|
|
|
|
- edit(this.form).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
- this.$message.success('修改成功!')
|
|
|
|
- this.cancel()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- create(this.form).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
- this.$message.success('新增成功!')
|
|
|
|
- this.cancel()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ let title = this.form.id ? '编辑成功!' : '新增成功!'
|
|
|
|
+ submit(this.form).then(res => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ this.$message.success(`${title}`)
|
|
|
|
+ this.cancel()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|