feat(期刊): 联调部分接口

dev
zhangjiabao 1 year ago
parent b4d9f25ce9
commit 16bede7ee8

@ -46,5 +46,15 @@ export default {
url: `/luoo-music/cms/journal/publish/${id}?state=${state}`, url: `/luoo-music/cms/journal/publish/${id}?state=${state}`,
method: "put" method: "put"
}); });
},
/**
* 创建人
* @returns
*/
createrList() {
return request({
url: "/tag/tag/creator/list",
method: "get"
});
} }
}; };

@ -12,16 +12,28 @@
label-width="100px" label-width="100px"
> >
<el-form-item prop="volid" label="期刊编号"> <el-form-item prop="volid" label="期刊编号">
<el-input size="small" placeholder="期刊编号"></el-input> <el-input
v-model="data.number"
size="small"
placeholder="期刊编号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="title" label="期刊标题"> <el-form-item prop="title" label="期刊标题">
<el-input size="small" placeholder="请输入期刊标题"></el-input> <el-input
v-model="data.name"
size="small"
placeholder="请输入期刊标题"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="tag" label="期刊标签"> <el-form-item prop="tag" label="期刊标签">
<el-input size="small" placeholder="请选择"></el-input> <el-input size="small" placeholder="请选择"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="author" label="期刊作者"> <el-form-item prop="author" label="期刊作者">
<el-input size="small" placeholder="不填写则默认为发布者"></el-input> <el-input
v-model="data.userId"
size="small"
placeholder="不填写则默认为发布者"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="image" label="上传封面"> <el-form-item prop="image" label="上传封面">
<el-upload <el-upload
@ -32,7 +44,7 @@
multiple multiple
:limit="1" :limit="1"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="fileList" :file-list="coverUploadFileList"
> >
<el-button size="small" type="primary" icon="el-icon-receiving" <el-button size="small" type="primary" icon="el-icon-receiving"
>上传图片</el-button >上传图片</el-button
@ -66,7 +78,7 @@
</el-form> </el-form>
<el-table <el-table
size="mini" size="mini"
:data="data.songTableData" :data="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"
@ -81,17 +93,22 @@
<i class="el-icon-rank"></i> <i class="el-icon-rank"></i>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="专辑封面"></el-table-column> <el-table-column prop="picture" label="专辑封面"></el-table-column>
<el-table-column prop="name" label="歌曲名称"></el-table-column> <el-table-column prop="name" label="歌曲名称"></el-table-column>
<el-table-column label="歌手/乐队"></el-table-column> <el-table-column prop="artist" label="歌手/乐队"></el-table-column>
<el-table-column label="所属专辑"></el-table-column> <el-table-column prop="album" label="所属专辑"></el-table-column>
<el-table-column label="时长"></el-table-column> <el-table-column prop="duration" label="时长"></el-table-column>
<el-table-column label="操作" fixed="right" width="300"> <el-table-column label="操作" fixed="right" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button plain icon="el-icon-edit" type="primary" size="mini" <el-button plain icon="el-icon-edit" type="primary" size="mini"
>编辑</el-button >编辑</el-button
> >
<el-button plain icon="el-icon-success" type="success" size="mini" <el-button
plain
icon="el-icon-success"
type="success"
size="mini"
@click="handleLyricClick(scope.row)"
>歌词</el-button >歌词</el-button
> >
<el-popconfirm <el-popconfirm
@ -123,13 +140,32 @@
<el-form-item prop="volid" label="期刊文案"> <el-form-item prop="volid" label="期刊文案">
<quill-editor <quill-editor
ref="text" ref="text"
v-model="data.content" v-model="data.summary"
style="height: 500px;" style="height: 500px;"
class="myQuillEditor" class="myQuillEditor"
:options="editorOption" :options="editorOption"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-dialog
title="歌词"
:visible="true"
v-if="lyricDialog.visible"
width="40%"
top="60px"
append-to-body
:before-close="handleLyricDialogBeforeClose"
>
<el-input type="textarea" v-model="lyricDialog.data"></el-input>
<span slot="footer">
<el-button size="small" type="primary" @click="handleLyricDialogSubmit"
>保存</el-button
>
<el-button size="small" @click="handleLyricDialogCancel"
>取消</el-button
>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -144,11 +180,25 @@ export default {
props: { props: {
data: { data: {
type: Object, type: Object,
default: {} default: {
id: null,
name: null,
tag: [],
number: null,
userId: null,
coverPhoto: null,
songs: []
}
} }
}, },
data() { data() {
return { return {
lyricDialog: {
visible: false,
songId: null,
data: ""
},
coverUploadFileList: [],
// editorOption // editorOption
// action: '/api/product/richtext_img_upload.do', // // action: '/api/product/richtext_img_upload.do', //
// methods: 'post', // // methods: 'post', //
@ -157,10 +207,6 @@ export default {
// size: 500, // Kb, 1M = 1024Kb // size: 500, // Kb, 1M = 1024Kb
// 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: {},
data: {
songTableData: [{ name: 1 }, { name: 2 }],
content: null
},
rules: {} rules: {}
}; };
}, },
@ -203,6 +249,51 @@ export default {
}, },
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`);
},
/**
* 弹窗关闭按扭点击事件
*/
handleLyricDialogBeforeClose(done) {
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;
done();
},
/**
* 弹窗提交按扭点击事件
*/
handleLyricDialogSubmit() {
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;
},
/**
* 弹窗取消按扭点击事件
*/
handleLyricDialogCancel() {
this.lyricDialog.data = "";
this.lyricDialog.songId = null;
this.lyricDialog.visible = false;
},
/**
* 打开弹窗按扭点击事件
*/
handleLyricClick(row) {
this.lyricDialog.songId = row.id;
this.lyricDialog.data = row.lyric;
this.lyricDialog.visible = true;
} }
} }
}; };

@ -237,7 +237,7 @@
:before-close="handleModifyDialogBeforeClose" :before-close="handleModifyDialogBeforeClose"
> >
<div style="height: 70vh;overflow: auto;"> <div style="height: 70vh;overflow: auto;">
<ArticleDetailDialog></ArticleDetailDialog> <ArticleDetailDialog :data="modifyDialog.data"></ArticleDetailDialog>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="handleDialogSubmit" <el-button size="small" type="primary" @click="handleDialogSubmit"
@ -306,10 +306,7 @@ export default {
modifyDialog: { modifyDialog: {
visible: false, visible: false,
type: 0, // 0for 1for 2for type: 0, // 0for 1for 2for
form: { data: {} //
rules: {},
data: {}
}
} }
}; };
}, },
@ -382,25 +379,25 @@ export default {
songCount: 1, songCount: 1,
songs: [ songs: [
{ {
album: "album", album: "范特西",
artist: "artist", artist: "周杰伦",
duration: "duration", duration: "1h30min",
id: "0", id: "1",
journal: [], journal: [1, 2, 3],
lyric: "xx", lyric: "lllll llll lll",
name: "name", name: "双节棍",
picture: "picture", picture: "/pic/pic",
size: "size", size: "1.3m",
state: "state", state: "1",
tags: [1, 2], tags: [1, 2],
updateTime: "2023-01-01", updateTime: "2023-01-01",
url: "/url", url: "/music/music",
userId: "userId" userId: "1"
} }
], ],
state: "1", state: "1",
status: "1", status: "1",
summary: "2", summary: "领军 \n 灵精了",
tag: [], tag: [],
userId: "1" userId: "1"
} }
@ -418,12 +415,15 @@ export default {
* 创建人下拉框 * 创建人下拉框
*/ */
fetchCreaterList() { fetchCreaterList() {
// tagApi.createrList().then(res => { // articleApi.createrList().then(res => {
// if (res.code === 200) { // if (res.code === 200) {
// this.queryForm.remoteData.publisher = res.data; // this.queryForm.remoteData.publisher = res.data;
// } // }
// }); // });
this.queryForm.remoteData.publisher = []; this.queryForm.remoteData.publisher = [
{ id: 1, name: "落在低处" },
{ id: 2, name: "左岸以西" }
];
}, },
/** /**
* 高级筛选tag * 高级筛选tag
@ -431,18 +431,20 @@ export default {
fetchSuperFilterTags() { fetchSuperFilterTags() {
this.queryForm.remoteData.superFilterTags = [ this.queryForm.remoteData.superFilterTags = [
{ {
id: 1,
name: "语言类型", name: "语言类型",
tags: [ tags: [
{ id: 1, name: "abc" }, { id: 3, name: "中文" },
{ id: 2, name: "bcasdd" }, { id: 4, name: "日文" },
{ id: 21, name: "becd" } { id: 5, name: "英文" }
] ]
}, },
{ {
id: 10,
name: "期刊标签", name: "期刊标签",
tags: [ tags: [
{ id: 4, name: "abc11" }, { id: 11, name: "民谣" },
{ id: 5, name: "bcd22" } { id: 12, name: "摇滚" }
] ]
} }
]; ];
@ -484,16 +486,16 @@ export default {
* 新建标签点击事件 * 新建标签点击事件
*/ */
handleAddClick() { handleAddClick() {
// TODO:
let newData = { let newData = {
"id": null, id: null,
"name": null, name: null,
"tag": [], tag: [],
"number": null, number: null,
"userId": null, userId: null,
"coverPhoto": null, coverPhoto: null,
songs: []
} };
this.modifyDialog.data = newData;
this.modifyDialog.type = 0; this.modifyDialog.type = 0;
this.modifyDialog.visible = true; this.modifyDialog.visible = true;
}, },
@ -501,8 +503,7 @@ export default {
* 编辑标签点击事件 * 编辑标签点击事件
*/ */
handleModifyClick(row) { handleModifyClick(row) {
// TODO: this.modifyDialog.data = JSON.parse(JSON.stringify(row));
this.modifyDialog.type = 1; this.modifyDialog.type = 1;
this.modifyDialog.visible = true; this.modifyDialog.visible = true;
}, },

@ -12,6 +12,7 @@
v-for="group in remoteTagData" v-for="group in remoteTagData"
:title="group.name" :title="group.name"
:name="group.name" :name="group.name"
:key="group.name"
> >
<el-button <el-button
type="primary" type="primary"
@ -26,6 +27,7 @@
style="margin-left: 10px;margin-top: 2px;" style="margin-left: 10px;margin-top: 2px;"
size="mini" size="mini"
v-for="tag in group.tags" v-for="tag in group.tags"
:key="tag.id"
@click="tagClick(tag)" @click="tagClick(tag)"
>{{ tag.name }}</el-button >{{ tag.name }}</el-button
> >

Loading…
Cancel
Save