|
|
@ -1,8 +1,8 @@
|
|
|
|
<!--
|
|
|
|
<!--
|
|
|
|
* @Author: zhangjiabao
|
|
|
|
* @Author: zhangjiabao
|
|
|
|
* @Date: 2024-01-24 10:09:33
|
|
|
|
* @Date: 2024-01-24 10:09:33
|
|
|
|
* @LastEditors: zhangjiabao
|
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
|
* @LastEditTime: 2024-01-26 10:14:39
|
|
|
|
* @LastEditTime: 2024-01-28 18:13:03
|
|
|
|
* @FilePath: /luoo_manage_fe/src/views/article/articleModify.vue
|
|
|
|
* @FilePath: /luoo_manage_fe/src/views/article/articleModify.vue
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<!--
|
|
|
|
<!--
|
|
|
@ -22,16 +22,16 @@
|
|
|
|
label-suffix=":"
|
|
|
|
label-suffix=":"
|
|
|
|
label-width="100px"
|
|
|
|
label-width="100px"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-form-item prop="number" label="期刊编号">
|
|
|
|
<el-form-item prop="journalNo" label="期刊编号">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="data.number"
|
|
|
|
v-model="data.journalNo"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
placeholder="期刊编号"
|
|
|
|
placeholder="期刊编号"
|
|
|
|
></el-input>
|
|
|
|
></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="name" label="期刊标题">
|
|
|
|
<el-form-item prop="title" label="期刊标题">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="data.name"
|
|
|
|
v-model="data.title"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
placeholder="请输入期刊标题"
|
|
|
|
placeholder="请输入期刊标题"
|
|
|
|
></el-input>
|
|
|
|
></el-input>
|
|
|
@ -48,7 +48,7 @@
|
|
|
|
></el-cascader>
|
|
|
|
></el-cascader>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="userId" label="期刊作者">
|
|
|
|
<el-form-item prop="userId" label="期刊作者">
|
|
|
|
<el-select placeholder="选择发布人" size="small" v-model="data.userId">
|
|
|
|
<el-select placeholder="输入发布人名称" size="small" v-model="data.userId">
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in publisher"
|
|
|
|
v-for="item in publisher"
|
|
|
|
:label="item.name"
|
|
|
|
:label="item.name"
|
|
|
@ -57,17 +57,14 @@
|
|
|
|
></el-option>
|
|
|
|
></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="coverPhoto" label="上传封面">
|
|
|
|
<el-form-item prop="image" label="上传封面">
|
|
|
|
<img
|
|
|
|
<img style="width: 170px;height: 120px;" :src="data.image" />
|
|
|
|
style="width: 170px;height: 120px;"
|
|
|
|
|
|
|
|
v-if="data.coverPhoto"
|
|
|
|
|
|
|
|
:src="data.coverPhoto"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
<el-upload
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
|
action="/luoo-music/cms/journal/upload/image"
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
|
|
|
|
:on-change="handleUploadArticleImageSuccess"
|
|
|
|
multiple
|
|
|
|
multiple
|
|
|
|
:limit="1"
|
|
|
|
:limit="1"
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
:on-exceed="handleExceed"
|
|
|
@ -86,11 +83,27 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="期刊音乐" prop="songs">
|
|
|
|
<el-form-item label="期刊音乐" prop="songs">
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="4"
|
|
|
|
<el-col :span="4">
|
|
|
|
><el-button plain size="small" type="primary" icon="el-icon-plus"
|
|
|
|
<el-upload
|
|
|
|
>上传歌曲</el-button
|
|
|
|
action="/luoo-music/cms/song/batch"
|
|
|
|
></el-col
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
>
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
|
|
|
|
:on-change="handleUploadSongSuccess"
|
|
|
|
|
|
|
|
multiple
|
|
|
|
|
|
|
|
:limit="1"
|
|
|
|
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
|
|
|
|
:file-list="songUploadFileList"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
icon="el-icon-circle-plus-outline"
|
|
|
|
|
|
|
|
>上传歌曲</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="4"
|
|
|
|
<el-col :span="4"
|
|
|
|
><el-button
|
|
|
|
><el-button
|
|
|
|
plain
|
|
|
|
plain
|
|
|
@ -106,7 +119,7 @@
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<el-table
|
|
|
|
<el-table
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
:data="data.songs"
|
|
|
|
:data="!data.songs ? [] : data.songs"
|
|
|
|
style="width: calc(50% + 400px); margin: 0 0 auto auto;"
|
|
|
|
style="width: calc(50% + 400px); margin: 0 0 auto auto;"
|
|
|
|
stripe
|
|
|
|
stripe
|
|
|
|
class="draggable-table"
|
|
|
|
class="draggable-table"
|
|
|
@ -121,12 +134,12 @@
|
|
|
|
<i class="el-icon-sort"></i>
|
|
|
|
<i class="el-icon-sort"></i>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="picture" label="专辑封面" width="100px">
|
|
|
|
<el-table-column prop="image" label="专辑封面" width="100px">
|
|
|
|
<template slot-scope="slot">
|
|
|
|
<template slot-scope="slot">
|
|
|
|
<img
|
|
|
|
<img
|
|
|
|
style="width: 50;height: 50px;"
|
|
|
|
style="width: 50;height: 50px;"
|
|
|
|
v-if="slot.row.picture"
|
|
|
|
v-if="slot.row.image"
|
|
|
|
:src="slot.row.picture"
|
|
|
|
:src="slot.row.image"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
@ -173,7 +186,7 @@
|
|
|
|
<el-form-item prop="volid" label="期刊文案">
|
|
|
|
<el-form-item prop="volid" label="期刊文案">
|
|
|
|
<quill-editor
|
|
|
|
<quill-editor
|
|
|
|
ref="text"
|
|
|
|
ref="text"
|
|
|
|
v-model="data.summary"
|
|
|
|
v-model="data.content"
|
|
|
|
style="height: 500px;"
|
|
|
|
style="height: 500px;"
|
|
|
|
class="myQuillEditor"
|
|
|
|
class="myQuillEditor"
|
|
|
|
:options="editorOption"
|
|
|
|
:options="editorOption"
|
|
|
@ -189,7 +202,9 @@
|
|
|
|
append-to-body
|
|
|
|
append-to-body
|
|
|
|
:before-close="handleLyricDialogBeforeClose"
|
|
|
|
:before-close="handleLyricDialogBeforeClose"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-input type="textarea" v-model="lyricDialog.data"></el-input>
|
|
|
|
<div v-loading="lyricDialog.loading">
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="lyricDialog.data"></el-input>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<span slot="footer">
|
|
|
|
<span slot="footer">
|
|
|
|
<el-button size="small" type="primary" @click="handleLyricDialogSubmit"
|
|
|
|
<el-button size="small" type="primary" @click="handleLyricDialogSubmit"
|
|
|
|
>保存</el-button
|
|
|
|
>保存</el-button
|
|
|
@ -263,7 +278,7 @@
|
|
|
|
<el-button size="small" type="primary" @click="handleMusicDialogSubmit"
|
|
|
|
<el-button size="small" type="primary" @click="handleMusicDialogSubmit"
|
|
|
|
>保存</el-button
|
|
|
|
>保存</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button size="small" @click="handleMusicDialogCancel"
|
|
|
|
<el-button size="small" @click="musicDialog.visible = false"
|
|
|
|
>取消</el-button
|
|
|
|
>取消</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
@ -281,8 +296,12 @@
|
|
|
|
:data="musicModifyDialog.data"
|
|
|
|
:data="musicModifyDialog.data"
|
|
|
|
></MusicModify>
|
|
|
|
></MusicModify>
|
|
|
|
<span slot="footer">
|
|
|
|
<span slot="footer">
|
|
|
|
<el-button size="small" type="primary">保存</el-button>
|
|
|
|
<el-button size="small" type="primary" @click="onSaveMusicInfo"
|
|
|
|
<el-button size="small">取消</el-button>
|
|
|
|
>保存</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button size="small" @click="musicModifyDialog.visible = false"
|
|
|
|
|
|
|
|
>取消</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</span></el-dialog
|
|
|
|
</span></el-dialog
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -303,12 +322,15 @@ export default {
|
|
|
|
type: Object,
|
|
|
|
type: Object,
|
|
|
|
default: {
|
|
|
|
default: {
|
|
|
|
id: null,
|
|
|
|
id: null,
|
|
|
|
name: null,
|
|
|
|
title: null,
|
|
|
|
tag: [],
|
|
|
|
tag: [],
|
|
|
|
number: null,
|
|
|
|
journalNo: null,
|
|
|
|
userId: null,
|
|
|
|
userId: null,
|
|
|
|
coverPhoto: null,
|
|
|
|
image: null,
|
|
|
|
songs: []
|
|
|
|
songs: [],
|
|
|
|
|
|
|
|
size: 0,
|
|
|
|
|
|
|
|
content: "",
|
|
|
|
|
|
|
|
duration: 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
remoteTagList: {
|
|
|
|
remoteTagList: {
|
|
|
@ -341,6 +363,7 @@ export default {
|
|
|
|
data: {}
|
|
|
|
data: {}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
coverUploadFileList: [],
|
|
|
|
coverUploadFileList: [],
|
|
|
|
|
|
|
|
songUploadFileList: [],
|
|
|
|
// editorOption里是放图片上传配置参数用的,例如:
|
|
|
|
// editorOption里是放图片上传配置参数用的,例如:
|
|
|
|
// action: '/api/product/richtext_img_upload.do', // 必填参数 图片上传地址
|
|
|
|
// action: '/api/product/richtext_img_upload.do', // 必填参数 图片上传地址
|
|
|
|
// methods: 'post', // 必填参数 图片上传方式
|
|
|
|
// methods: 'post', // 必填参数 图片上传方式
|
|
|
@ -350,17 +373,15 @@ export default {
|
|
|
|
// accept: 'multipart/form-data, image/png, image/gif, image/jpeg, image/bmp, image/x-icon,image/jpg' // 可选 可上传的图片格式
|
|
|
|
// accept: 'multipart/form-data, image/png, image/gif, image/jpeg, image/bmp, image/x-icon,image/jpg' // 可选 可上传的图片格式
|
|
|
|
editorOption: {},
|
|
|
|
editorOption: {},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
number: [
|
|
|
|
journalNo: [
|
|
|
|
{ required: true, message: "请输入期刊编号", trigger: "blur" }
|
|
|
|
{ required: true, message: "请输入期刊编号", trigger: "blur" }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
name: [{ required: true, message: "请输入期刊标题", trigger: "blur" }],
|
|
|
|
title: [{ required: true, message: "请输入期刊标题", trigger: "blur" }],
|
|
|
|
tag: [{ required: true, message: "请选择期刊标签", trigger: "change" }],
|
|
|
|
tag: [{ required: true, message: "请选择期刊标签", trigger: "change" }],
|
|
|
|
userId: [
|
|
|
|
userId: [
|
|
|
|
{ required: true, message: "请选择期刊作者", trigger: "blur" }
|
|
|
|
{ required: true, message: "请选择期刊作者", trigger: "blur" }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
coverPhoto: [
|
|
|
|
image: [{ required: true, message: "请上传封面", trigger: "change" }],
|
|
|
|
{ required: true, message: "请上传封面", trigger: "change" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
songs: [{ required: true, message: "请选择音乐", trigger: "change" }]
|
|
|
|
songs: [{ required: true, message: "请选择音乐", trigger: "change" }]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -399,6 +420,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
for (let j in this.remoteTagList) {
|
|
|
|
for (let j in this.remoteTagList) {
|
|
|
|
let jId = this.remoteTagList[j].value;
|
|
|
|
let jId = this.remoteTagList[j].value;
|
|
|
|
|
|
|
|
if(tag === jId){
|
|
|
|
|
|
|
|
this.selectTag.push([jId])
|
|
|
|
|
|
|
|
}
|
|
|
|
for (let k in this.remoteTagList[j].children) {
|
|
|
|
for (let k in this.remoteTagList[j].children) {
|
|
|
|
let kId = this.remoteTagList[j].children[k].value;
|
|
|
|
let kId = this.remoteTagList[j].children[k].value;
|
|
|
|
if (tag === this.remoteTagList[j].children[k].value) {
|
|
|
|
if (tag === this.remoteTagList[j].children[k].value) {
|
|
|
@ -420,52 +444,20 @@ export default {
|
|
|
|
this.data.tag = newTag;
|
|
|
|
this.data.tag = newTag;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
queryFromMusicLibrary(keyword) {
|
|
|
|
queryFromMusicLibrary(keyword) {
|
|
|
|
// musicApi.getByKeyword(keyword).then(res => {
|
|
|
|
if (!keyword || keyword === "") {
|
|
|
|
// if (res.code === 200) {
|
|
|
|
this.musicDialog.remoteResult = [];
|
|
|
|
// this.musicDialog.remoteResult = res.data;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.musicDialog.remoteResult = [];
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
this.musicDialog.selectLoading = true;
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
let musicList = [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
album: "范特西",
|
|
|
|
|
|
|
|
artist: "周杰伦",
|
|
|
|
|
|
|
|
duration: "1h30min",
|
|
|
|
|
|
|
|
id: "1",
|
|
|
|
|
|
|
|
journal: [1, 2, 3],
|
|
|
|
|
|
|
|
lyric: "lllll llll lll",
|
|
|
|
|
|
|
|
name: "双节棍",
|
|
|
|
|
|
|
|
picture: "https://luoow.wxwenku.com/999/cover_min.jpg",
|
|
|
|
|
|
|
|
size: "1.3m",
|
|
|
|
|
|
|
|
state: "1",
|
|
|
|
|
|
|
|
tags: [3, 5, 11],
|
|
|
|
|
|
|
|
updateTime: "2023-01-01",
|
|
|
|
|
|
|
|
url: "https://luoow.wxwenku.com/999/03._Du_und_ich_Klee.mp3",
|
|
|
|
|
|
|
|
userId: "1"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
album: "范特西1",
|
|
|
|
|
|
|
|
artist: "周杰伦1",
|
|
|
|
|
|
|
|
duration: "1h30min",
|
|
|
|
|
|
|
|
id: "2",
|
|
|
|
|
|
|
|
journal: [1, 2, 3],
|
|
|
|
|
|
|
|
lyric: "lllll llll lll",
|
|
|
|
|
|
|
|
name: "双节棍1",
|
|
|
|
|
|
|
|
picture: "https://luoow.wxwenku.com/999/cover_min.jpg",
|
|
|
|
|
|
|
|
size: "1.3m",
|
|
|
|
|
|
|
|
state: "1",
|
|
|
|
|
|
|
|
tags: [3, 5, 11],
|
|
|
|
|
|
|
|
updateTime: "2023-01-01",
|
|
|
|
|
|
|
|
url: "https://luoow.wxwenku.com/999/03._Du_und_ich_Klee.mp3",
|
|
|
|
|
|
|
|
userId: "1"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
this.musicDialog.remoteResult = musicList;
|
|
|
|
|
|
|
|
this.musicDialog.selectLoading = false;
|
|
|
|
this.musicDialog.selectLoading = false;
|
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
|
|
|
|
this.musicDialog.selectLoading = true;
|
|
|
|
|
|
|
|
musicApi.getList({ keyword, state: 1 }, 1, 50).then(res => {
|
|
|
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
|
|
this.musicDialog.remoteResult = res.data.rows;
|
|
|
|
|
|
|
|
this.musicDialog.selectLoading = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.musicDialog.remoteResult = [];
|
|
|
|
|
|
|
|
this.musicDialog.selectLoading = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleMusicLibrarySelectChange(val) {
|
|
|
|
handleMusicLibrarySelectChange(val) {
|
|
|
|
for (let i in this.musicDialog.tableData) {
|
|
|
|
for (let i in this.musicDialog.tableData) {
|
|
|
@ -503,6 +495,19 @@ export default {
|
|
|
|
beforeRemove(file, fileList) {
|
|
|
|
beforeRemove(file, fileList) {
|
|
|
|
return this.$confirm(`确定移除 ${file.name}?`);
|
|
|
|
return this.$confirm(`确定移除 ${file.name}?`);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
handleUploadArticleImageSuccess(response, file, fileList) {
|
|
|
|
|
|
|
|
if (response.status === "success") {
|
|
|
|
|
|
|
|
this.$message.success("上传成功");
|
|
|
|
|
|
|
|
this.data.image = response.response.data["fullUrl"];
|
|
|
|
|
|
|
|
this.data.size = response.response.data["size"];
|
|
|
|
|
|
|
|
this.data.duration = response.response.data["duration"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleUploadSongSuccess(response, file, fileList) {
|
|
|
|
|
|
|
|
if (response.status === "success") {
|
|
|
|
|
|
|
|
this.$message.success("上传成功");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
// ************************* 按扭事件 *************************
|
|
|
|
// ************************* 按扭事件 *************************
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 曲库添加按扭点击事件
|
|
|
|
* 曲库添加按扭点击事件
|
|
|
@ -547,32 +552,23 @@ export default {
|
|
|
|
* 弹窗提交按扭点击事件
|
|
|
|
* 弹窗提交按扭点击事件
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
handleLyricDialogSubmit() {
|
|
|
|
handleLyricDialogSubmit() {
|
|
|
|
// musicApi
|
|
|
|
musicApi
|
|
|
|
// .updateLyric(this.lyricDialog.songId, this.lyricDialog.data)
|
|
|
|
.updateLyric(this.lyricDialog.songId, this.lyricDialog.data)
|
|
|
|
// .then(res => {
|
|
|
|
.then(res => {
|
|
|
|
// if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
// for (let sIndex in this.data.songs) {
|
|
|
|
for (let sIndex in this.data.songs) {
|
|
|
|
// if (this.data.songs[sIndex].id === this.lyricDialog.songId) {
|
|
|
|
if (this.data.songs[sIndex].id === this.lyricDialog.songId) {
|
|
|
|
// this.data.songs[sIndex].lyric = this.lyricDialog.data;
|
|
|
|
this.data.songs[sIndex].lyric = this.lyricDialog.data;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// break;
|
|
|
|
break;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// this.lyricDialog.data = "";
|
|
|
|
this.lyricDialog.data = "";
|
|
|
|
// this.lyricDialog.songId = null;
|
|
|
|
this.lyricDialog.songId = null;
|
|
|
|
// this.lyricDialog.visible = false;
|
|
|
|
this.lyricDialog.visible = false;
|
|
|
|
// } else {
|
|
|
|
} else {
|
|
|
|
// this.$message.error(res.message);
|
|
|
|
this.$message.error(res.message);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// });
|
|
|
|
});
|
|
|
|
for (let sIndex in this.data.songs) {
|
|
|
|
|
|
|
|
if (this.data.songs[sIndex].id === this.lyricDialog.songId) {
|
|
|
|
|
|
|
|
this.data.songs[sIndex].lyric = this.lyricDialog.data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.lyricDialog.data = "";
|
|
|
|
|
|
|
|
this.lyricDialog.songId = null;
|
|
|
|
|
|
|
|
this.lyricDialog.visible = false;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 弹窗取消按扭点击事件
|
|
|
|
* 弹窗取消按扭点击事件
|
|
|
@ -587,8 +583,12 @@ export default {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
handleLyricClick(row) {
|
|
|
|
handleLyricClick(row) {
|
|
|
|
this.lyricDialog.songId = row.id;
|
|
|
|
this.lyricDialog.songId = row.id;
|
|
|
|
this.lyricDialog.data = row.lyric;
|
|
|
|
|
|
|
|
this.lyricDialog.visible = true;
|
|
|
|
this.lyricDialog.visible = true;
|
|
|
|
|
|
|
|
this.lyricDialog.loading = true;
|
|
|
|
|
|
|
|
musicApi.getLyric(row.id).then(res => {
|
|
|
|
|
|
|
|
this.lyricDialog.data = res.data.lyric;
|
|
|
|
|
|
|
|
this.lyricDialog.loading = false;
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 弹窗关闭按扭点击事件
|
|
|
|
* 弹窗关闭按扭点击事件
|
|
|
@ -619,12 +619,38 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.musicDialog.visible = false;
|
|
|
|
this.musicDialog.visible = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
onSaveMusicInfo() {
|
|
|
|
* 弹窗取消按扭点击事件
|
|
|
|
let oldInfo = this.musicModifyDialog.data;
|
|
|
|
*/
|
|
|
|
let newInfo = {
|
|
|
|
handleMusicDialogCancel() {
|
|
|
|
album: oldInfo["album"],
|
|
|
|
this.$message.success("music cancel");
|
|
|
|
artist: oldInfo["artist"],
|
|
|
|
this.musicDialog.visible = false;
|
|
|
|
image: oldInfo["image"],
|
|
|
|
|
|
|
|
name: oldInfo["name"],
|
|
|
|
|
|
|
|
tags: oldInfo["tags"],
|
|
|
|
|
|
|
|
url: oldInfo["url"],
|
|
|
|
|
|
|
|
size: oldInfo["size"],
|
|
|
|
|
|
|
|
duration: oldInfo["duration"]
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
musicApi.updateInfo(oldInfo["id"], newInfo).then(res => {
|
|
|
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
|
|
this.$message.success("保存成功");
|
|
|
|
|
|
|
|
musicApi.getById(oldInfo.id).then(newQueryRes => {
|
|
|
|
|
|
|
|
if (newQueryRes.data === 200) {
|
|
|
|
|
|
|
|
for (let songIndex in this.data.songs) {
|
|
|
|
|
|
|
|
if (this.data.songs[songIndex].id === newQueryRes.data.id) {
|
|
|
|
|
|
|
|
this.data.songs[songIndex] = newQueryRes.data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log("更新表格数据完成")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.message.$error(newQueryRes.message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.musicModifyDialog.visible = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 弹窗关闭按扭点击事件
|
|
|
|
* 弹窗关闭按扭点击事件
|
|
|
|