feat(曲库): 添加曲库功能

dev
zhangjiabao 8 months ago
parent 1a9f311b5c
commit aa6b705810

@ -28,5 +28,17 @@ export default {
lyric
}
});
},
updateState(id, state) {
return request({
url: `/luoo-music/cms/song/update/state/${id}?state=${state}`,
method: "put"
});
},
delete(id) {
return request({
url: `/luoo-music/cms/song/${id}`,
method: "delete"
});
}
};

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706176782118" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3693" width="128" height="128" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M320 864V0h480v224h224v640H320z m608-544H416v32h512v-32z m0 128H416v32h512v-32z m0 128H416v32h512v-32z m0 128H416v32h512v-32zM832 0h19.2L1024 160v32H832V0zM288 896h416v128H0V160h288v320H96v32h192v96H96v32h192v96H96v32h192v96H96v32h192z" fill="" p-id="3694"></path></svg>

After

Width:  |  Height:  |  Size: 603 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706177040355" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6510" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M243.382635 960.453708c-84.656075 0-153.497976-68.503187-153.497976-152.706961 0-83.755566 68.841901-151.84943 153.497976-151.84943 21.209044 0 38.371936 17.202801 38.371936 38.376029 0 21.24793-17.162892 38.375006-38.371936 38.375006-43.021839 0-76.751035 33.012881-76.751035 75.098395 0 41.857317 34.403554 75.960019 76.751035 75.960019 42.308595 0 76.746942-34.8139 76.746942-77.574796L320.129576 288.386106c0-51.114145 34.32476-96.611361 83.455737-110.663402L787.364023 68.111261c34.961256-10.118452 71.839165-3.222391 100.957343 18.738783 29.117155 21.957081 45.792952 55.460126 45.792952 91.886757l0 512.277316c0 84.618213-68.840878 153.494906-153.497976 153.494906-84.656075 0-153.493883-68.876694-153.493883-153.494906 0-84.656075 68.838831-153.496953 153.493883-153.496953 21.212114 0 38.375006 17.161868 38.375006 38.375006 0 21.210068-17.161868 38.371936-38.375006 38.371936-42.343387 0-76.746942 34.403554-76.746942 76.750011 0 42.34441 34.403554 76.747965 76.746942 76.747965 42.308595 0 76.747965-34.403554 76.747965-76.747965l0-512.277316c0-12.141528-5.54325-23.309892-15.249309-30.579459-9.744945-7.344269-21.962198-9.671267-33.69031-6.29538l-383.739824 109.61042c-16.379039 4.685719-27.808346 19.899212-27.808346 36.913724L396.876518 806.132994C396.876518 891.203508 328.034617 960.453708 243.382635 960.453708" fill="#D4D4D4" p-id="6511"></path><path d="M358.465696 422.394193c-16.674775 0-32.04074-11.015891-36.874839-27.882024-5.807263-20.34742 5.995551-41.594327 26.381857-47.402613l402.925792-115.122971c20.273742-5.734608 41.59842 5.959735 47.445592 26.347065 5.808286 20.386306-5.999644 41.594327-26.384927 47.441499l-402.926816 115.122971C365.509113 421.872307 361.989963 422.394193 358.465696 422.394193" fill="#D4D4D4" p-id="6512"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706176802508" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6612" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M979.067648 415.512459c0 0 0.040932-300.381301 0.040932-303.553551 0-39.417755-32.060183-71.477938-71.477938-71.477938-3.172249 0-303.543318 0.040932-303.533085 0.040932-2.128477 0-4.256954-0.010233-6.364965-0.020466-2.241041-0.010233-4.461615-0.020466-6.671956-0.020466-19.893072 0-49.947576 0-69.615521 19.657712l-463.772602 463.782835c-11.164271 11.143805-17.304108 25.971511-17.304108 41.750893 0 15.769149 6.139837 30.596855 17.293875 41.761126l354.503966 354.493733c11.143805 11.154038 25.971511 17.304108 41.750893 17.304108 15.779382 0 30.607088-6.139837 41.761126-17.293875l463.762369-463.782835c19.882839-19.862373 19.770276-48.433082 19.647479-76.052117C979.077881 419.922908 979.067648 417.7228 979.067648 415.512459zM938.155866 422.276513c0.092098 20.107967 0.163729 39.110763-7.65433 46.918589l-463.772602 463.793068c-3.417843 3.428076-7.971555 5.310959-12.811794 5.310959-4.830005 0-9.373485-1.882883-12.791327-5.310959l-354.514199-354.503966c-3.428076-3.428076-5.310959-7.971555-5.310959-12.811794s1.882883-9.373485 5.310959-12.801561l463.782835-463.782835c7.081279-7.081279 23.976064-7.674796 40.666188-7.674796 2.148943 0 4.308119 0.010233 6.487761 0.020466 2.169409 0.010233 4.349051 0.020466 6.54916 0.020466 0 0 300.360835-0.040932 303.533085-0.040932 16.84362 0 30.54569 13.70207 30.54569 30.54569 0 3.172249-0.040932 303.553551-0.040932 303.553551C938.1354 417.784198 938.145633 420.035472 938.155866 422.276513z" p-id="6613"></path><path d="M859.83201 220.122373c-10.478655 4.246721-22.410406-0.808412-26.657126-11.276834-2.046612-5.0449-5.055133-9.578146-8.953929-13.46671-7.705496-7.705496-17.938558-11.941983-28.836769-11.941983-10.877745 0-21.110807 4.236488-28.795836 11.93175-15.891945 15.891945-15.881712 41.750893 0.010233 57.642838 15.871479 15.881712 41.730427 15.881712 57.622372 0 7.992021-7.992021 20.957311-7.992021 28.939099 0.010233 7.992021 7.992021 7.992021 20.957311-0.010233 28.939099-15.922644 15.912411-36.839023 23.873734-57.745169 23.873734-20.926612 0-41.832757-7.961322-57.755402-23.873734-31.845289-31.855522-31.855522-83.675748-0.020466-115.53127 15.421224-15.431457 35.938514-23.924899 57.755402-23.924899 21.827121 0 42.34441 8.493441 57.775868 23.924899 7.78736 7.78736 13.824867 16.884552 17.938558 27.03575C875.345332 203.933669 870.300432 215.875652 859.83201 220.122373z" p-id="6614"></path></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -2,7 +2,7 @@
* @Author: zhangjiabao
* @Date: 2024-01-25 11:05:17
* @LastEditors: zhangjiabao
* @LastEditTime: 2024-01-25 11:06:12
* @LastEditTime: 2024-01-25 18:01:54
* @FilePath: /luoo_manage_fe/src/router/index.js
*/
import Vue from "vue";
@ -57,7 +57,19 @@ export const constantRouterMap = [
path: "index",
name: "Form",
component: () => import("@/views/tag/index"),
meta: { title: "标签管理", icon: "form" }
meta: { title: "标签管理", icon: "tag" }
}
]
},
{
path: "/song",
component: Layout,
children: [
{
path: "index",
name: "Form",
component: () => import("@/views/song/index"),
meta: { title: "曲库管理", icon: "music" }
}
]
},
@ -69,7 +81,7 @@ export const constantRouterMap = [
path: "index",
name: "Form",
component: () => import("@/views/article"),
meta: { title: "期刊管理", icon: "table" }
meta: { title: "期刊管理", icon: "artical" }
}
]
},

@ -2,7 +2,7 @@
* @Author: zhangjiabao
* @Date: 2024-01-24 10:09:33
* @LastEditors: zhangjiabao
* @LastEditTime: 2024-01-25 10:41:27
* @LastEditTime: 2024-01-25 16:25:59
* @FilePath: /luoo_manage_fe/src/views/article/articleModify.vue
-->
<!--
@ -277,7 +277,7 @@
append-to-body
:before-close="handleMusicModifyDialogBeforeClose"
><MusicModify
:remoteTagData="remoteTagList"
:remoteTagList="remoteTagList"
:data="musicModifyDialog.data"
></MusicModify>
<span slot="footer">
@ -290,7 +290,7 @@
<script>
import musicApi from "@/api/musicV2";
import { MusicModify } from "./musicModify.vue";
import MusicModify from "../song/musicModify.vue";
import Sortable from "sortablejs";
import { quillEditor } from "vue-quill-editor";
import "quill/dist/quill.core.css";

@ -264,7 +264,7 @@
direction="rtl"
>
<SuperFilterTagDrawer
:remoteTagData="queryForm.remoteData.superFilterTags"
:remoteTagList="queryForm.remoteData.superFilterTags"
@query="handleSuperFilterTagQuery"
></SuperFilterTagDrawer>
</el-drawer>
@ -403,7 +403,7 @@ export default {
updateTime: "2023-01-01",
url:
"https://luoow.wxwenku.com/999/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
userId: "1"
userId: "1627863701048659968"
}
],
state: "1",

@ -1,28 +1,34 @@
<!--
* @Author: zhangjiabao
* @Date: 2024-01-02 15:41:16
* @LastEditors: zhangjiabao
* @LastEditTime: 2024-01-25 11:22:50
* @FilePath: /luoo_manage_fe/src/views/dashboard/index.vue
-->
<template>
<div class="dashboard-container">
<div class="dashboard-text">name:{{name}}</div>
<div class="dashboard-text">roles:<span v-for='role in roles' :key='role'>{{role}}</span></div>
<!-- <div class="dashboard-text">name:{{name}}</div> -->
<!-- <div class="dashboard-text">roles:<span v-for='role in roles' :key='role'>{{role}}</span></div> -->
<span>QUEYUE</span>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { mapGetters } from "vuex";
export default {
name: 'dashboard',
name: "dashboard",
computed: {
...mapGetters([
'name',
'roles'
])
...mapGetters(["name", "roles"])
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard {
&-container {
margin: 30px;
height: 81vh;
}
&-text {
font-size: 30px;

@ -1,28 +1,45 @@
<!--
* @Author: zhangjiabao
* @Date: 2024-01-02 15:41:16
* @LastEditors: zhangjiabao
* @LastEditTime: 2024-01-25 17:49:21
* @FilePath: /luoo_manage_fe/src/views/layout/components/Sidebar/index.vue
-->
<template>
<scroll-bar>
<el-menu mode="vertical" unique-opened :default-active="$route.path" :collapse="isCollapse" background-color="#304156" text-color="#fff" active-text-color="#409EFF">
<span
style="font-size: 20px;color: white; text-align: center; display: inline-block; width: 100%; margin-top: 10px;"
>QueYue</span
>
<el-menu
mode="vertical"
unique-opened
:default-active="$route.path"
:collapse="isCollapse"
background-color="#304156"
text-color="#fff"
active-text-color="#409EFF"
>
<sidebar-item :routes="routes"></sidebar-item>
</el-menu>
</scroll-bar>
</template>
<script>
import { mapGetters } from 'vuex'
import SidebarItem from './SidebarItem'
import ScrollBar from '@/components/ScrollBar'
import { mapGetters } from "vuex";
import SidebarItem from "./SidebarItem";
import ScrollBar from "@/components/ScrollBar";
export default {
components: { SidebarItem, ScrollBar },
computed: {
...mapGetters([
'sidebar'
]),
...mapGetters(["sidebar"]),
routes() {
return this.$router.options.routes
return this.$router.options.routes;
},
isCollapse() {
return !this.sidebar.opened
return !this.sidebar.opened;
}
}
}
};
</script>

@ -0,0 +1,640 @@
<!--
* @Description: 曲库
* @version: v1
* @Author: zhangjiabao
* @Date: 2024-01-14 00:12:59
-->
<template>
<div class="app-container">
<!-- card -->
<el-card class="box-card">
<div slot="header" class="card-header clearfix">
<span class="card-header-text">曲库管理</span>
</div>
<!-- 查询条件 -->
<el-form :inline="true" class="in-card-form">
<el-form-item>
<el-input
placeholder="请输入关键词"
size="medium"
v-model="queryForm.data.keyword"
></el-input>
</el-form-item>
<el-form-item>
<el-select
placeholder="选择发布人"
size="medium"
v-model="queryForm.data.creatorId"
>
<el-option
v-for="item in queryForm.remoteData.publisher"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
placeholder="选择时间范围"
v-model="queryForm.data.timeRange"
type="daterange"
:range-separator="
queryForm.data.timeRange.length === 0 ? null : '~'
"
:editable="false"
:clearable="false"
value-format="yyyy-MM-dd"
start-placeholder="选择时间范围"
size="medium"
style="width: 280px;"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-search"
type="primary"
size="medium"
@click="handleQueryClick"
>查询</el-button
>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh-left"
size="medium"
@click="handleResetClick"
>重置</el-button
>
</el-form-item>
</el-form>
<el-form :inline="true" class="in-card-form">
<el-form-item>
<el-button icon="el-icon-upload" type="primary" size="small"
>上传</el-button
>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-upload2" size="small">批量上传</el-button>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-download" size="small">下载</el-button>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-delete" size="small">删除</el-button>
</el-form-item>
</el-form>
<!-- 表格 -->
<el-table
stripe
:data="table.data"
ref="songTable"
height="calc(100vh - 375px)"
v-loading="table.loading"
v-if="table.show"
element-loading-text="加载中"
@selection-change="handleTableSelectionChange"
:header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
border
fit
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column sortable label="歌曲名">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="scope">
<el-button style="padding: 0px;" type="text" icon="el-icon-download"
>下载</el-button
>
</template>
</el-table-column>
<el-table-column prop="artist" label="歌手/乐队"></el-table-column>
<el-table-column prop="album" label="所属专辑"></el-table-column>
<el-table-column label="歌曲风格">
<template slot-scope="scope">
<span>{{ getTagNameById(scope.row.tags) }}</span>
</template>
</el-table-column>
<el-table-column prop="picture" label="专辑封面" width="100px">
<template slot-scope="slot">
<img
style="width: 50;height: 50px;"
v-if="slot.row.picture"
:src="slot.row.picture"
/>
</template>
</el-table-column>
<el-table-column prop="duration" label="时长"></el-table-column>
<el-table-column label="关联期刊">
<template slot-scope="scope">
<span v-for="j in scope.row.journal" :key="j + ''">{{ j }}</span>
</template>
</el-table-column>
<el-table-column
prop="updateTime"
sortable
label="修改时间"
></el-table-column>
<el-table-column fixed="right" label="启停用" width="100">
<template slot-scope="scope">
<el-switch
style="margin-bottom: 4px;"
v-model="scope.row.state"
active-color="#13ce66"
@change="handleTableRowStatusChange($event, scope.row)"
:active-value="1"
:inactive-value="0"
size="mini"
></el-switch>
</template>
</el-table-column>
<el-table-column label="上传人员">
<template slot-scope="scope">
<span>{{ getAuthorNameById(scope.row.userId) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="300">
<template slot-scope="scope">
<el-button
plain
icon="el-icon-edit"
@click="handleModifyClick(scope.row)"
type="primary"
size="mini"
>编辑</el-button
>
<el-button plain icon="el-icon-success" type="success" size="mini"
>歌词</el-button
>
<el-popconfirm
confirm-button-text="确定"
cancel-button-text="取消"
icon="el-icon-info"
icon-color="red"
title="是否确认删除歌曲?"
style="margin-left: 10px;"
@confirm="handleDeleteClick(scope.row)"
>
<el-button
slot="reference"
plain
icon="el-icon-delete"
type="danger"
size="mini"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-row :inline="true">
<el-col :span="12">
<div class="foot-operator-right">
<el-button size="small" @click="handleTableSelectionAllClick"
>选择全部</el-button
>
<el-button size="small" @click="handleTableSelectionInverseClick"
>反向选择</el-button
>
</div>
</el-col>
<el-col :span="12" style="text-align: right;">
<div class="foot-operator-right">
<el-pagination
class="pagination-right"
background
v-if="table.show"
layout="total, prev, pager, next, sizes"
:current-page.sync="table.page.current"
:page-size="table.page.size"
:total="table.page.total"
@size-change="handlePageSizeChange"
@current-change="handlePageCurrentChange"
>
</el-pagination>
</div>
</el-col>
</el-row>
</el-card>
<el-dialog
title="信息编辑"
:visible="true"
v-if="musicModifyDialog.visible"
width="40%"
top="60px"
append-to-body
:before-close="handleMusicModifyDialogBeforeClose"
><MusicModify
:remoteTagList="queryForm.remoteData.tags"
:data="musicModifyDialog.data"
></MusicModify>
<span slot="footer">
<el-button size="small" type="primary">保存</el-button>
<el-button size="small">取消</el-button>
</span></el-dialog
>
</div>
</template>
<script>
import tagApi from "@/api/tag";
import musicApi from "@/api/musicV2";
import MusicModify from "./musicModify.vue";
export default {
name: "Song",
data() {
return {
//
queryForm: {
remoteData: {
publisher: [],
tags: []
},
lastQuery: {},
data: {
keyword: null,
creatorId: null,
timeRange: []
}
},
musicModifyDialog: {
visible: false,
data: {}
},
//
table: {
show: true,
loading: true,
selection: [],
data: [],
page: {
current: 1,
size: 10,
total: 0
}
}
};
},
filters: {},
components: {
MusicModify
},
created() {
this.fetchCreaterList();
this.fetchTags();
this.fetchData(this.queryForm.data);
},
methods: {
log(e) {
this.$message.success(e);
},
// ************************* *************************
/**
* 查询表格数据
*/
fetchData(param) {
//
this.queryForm.lastQuery = param;
let queryParam = {
keyword: param.keyword,
userId: param.creatorId
};
if (param.timeRange) {
if (param.timeRange[0]) {
queryParam.start = param.timeRange[0] + " 00:00:00";
}
if (param.timeRange[1]) {
queryParam.end = param.timeRange[1] + " 23:59:59";
}
}
this.table.loading = 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/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
userId: "1627863701048659968"
},
{
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/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
userId: "1627863701048659968"
}
];
this.table.data = musicList;
this.table.page.total = 10;
this.table.loading = false;
}, 1000);
},
/**
* 创建人下拉框
*/
fetchCreaterList() {
tagApi.createrList().then(res => {
if (res.code === 200) {
this.queryForm.remoteData.publisher = res.data;
} else {
this.queryForm.remoteData.publisher = [];
}
});
},
/**
* 高级筛选tag
*/
fetchTags() {
// tagApi.queryHierarchical().then(res => {
// console.log(res)
// })
let res = [
{
id: 1,
nameCh: "语言类型",
children: [
{ id: 3, nameCh: "中文" },
{ id: 4, nameCh: "日文" },
{ id: 5, nameCh: "英文" }
]
},
{
id: 10,
nameCh: "期刊标签",
children: [
{ id: 11, nameCh: "民谣" },
{ id: 12, nameCh: "摇滚" }
]
}
];
let newList = [];
for (let index in res) {
let item = res[index];
let newItem = { value: item.id, label: item.nameCh, children: [] };
for (let childrenIndex in item.children) {
let childrenItem = item.children[childrenIndex];
newItem.children.push({
value: childrenItem.id,
label: childrenItem.nameCh
});
}
newList.push(newItem);
}
this.queryForm.remoteData.tags = newList;
},
// ************************* *************************
getAuthorNameById(userId) {
for (let index in this.queryForm.remoteData.publisher) {
let item = this.queryForm.remoteData.publisher[index];
if (item.id === userId) {
return item.name;
}
return "";
}
},
getTagNameById(tagIdList) {
let tagList = [];
for (let tagIdIndex in tagIdList) {
let tagId = tagIdList[tagIdIndex];
for (let index in this.queryForm.remoteData.tags) {
let item = this.queryForm.remoteData.tags[index];
if (item.value === tagId) {
tagList.push(item.label);
}
if (!item.children) {
continue;
}
for (let subIndex in item.children) {
let subItem = item.children[subIndex];
if (subItem.value === tagId) {
tagList.push(subItem.label);
}
}
}
}
let name = "";
for (let index in tagList) {
name = name + "#" + tagList[index] + " ";
}
return name;
},
// ************************* *************************
/**
* 查询按扭点击事件
*/
handleQueryClick() {
this.table.page.current = 1;
this.table.page.total = 0;
this.fetchData(this.queryForm.data);
},
/**
* 重置点击事件
*/
handleResetClick() {
this.queryForm.data = {
keyword: null,
creatorId: null,
timeRange: []
};
},
/**
* 编辑标签点击事件
*/
handleModifyClick(row) {
this.musicModifyDialog.data = row;
this.musicModifyDialog.visible = true;
},
/**
* 删除按钮点击事件
*/
handleDeleteClick(row) {
musicApi.delete(row.id).then(res => {
if (res.code === 200) {
this.$message.success(res.message);
this.fetchData(this.queryForm.lastQuery);
return;
} else {
this.$message.error(res.message);
}
});
},
/**
* 表格内状态滑块切换事件
*/
handleTableRowStatusChange($event, row) {
this.$message("状态切换" + $event);
musicApi.updateStatus(row.id, $event).then(res => {
if (res.code === 200) {
this.$message.success(res.message);
} else {
this.$message.error(res.message);
}
this.fetchData(this.queryForm.lastQuery);
});
},
/**
* 表格多选框
*/
handleTableSelectionChange(val) {
this.table.selection = val;
console.log(val);
},
/**
* 表格全选
*/
handleTableSelectionAllClick() {
this.handleTableSelectRows(this.table.data);
},
/**
* 表格反选
*/
handleTableSelectionInverseClick() {
let newSelection = [];
for (let rowIndex in this.table.data) {
let isIn = false;
for (let seletIndex in this.table.selection) {
if (
this.table.selection[seletIndex]["id"] ===
this.table.data[rowIndex]["id"]
) {
isIn = true;
continue;
}
}
if (!isIn) {
newSelection.push(this.table.data[rowIndex]);
}
}
this.$refs.songTable.clearSelection();
this.handleTableSelectRows(newSelection);
},
handleTableSelectRows(rows) {
this.$refs.songTable.clearSelection();
for (let rowIndex in rows) {
this.$refs.songTable.toggleRowSelection(rows[rowIndex]);
}
},
/**
* 分页组件页数变化事件
*/
handlePageCurrentChange(val) {
this.table.page.current = val;
this.fetchData(this.queryForm.lastQuery);
},
/**
* 分页组件大小变化事件
*/
handlePageSizeChange(val) {
this.table.page.size = val;
this.fetchData(this.queryForm.lastQuery);
},
/**
* 弹窗关闭按扭点击事件
*/
handleMusicModifyDialogBeforeClose(done) {
this.musicModifyDialog.visible = false;
done();
}
}
};
</script>
<style scoped>
.pagination-right {
text-align: right;
margin-top: 10px;
}
.foot-operator-right {
text-align: left;
margin-top: 10px;
}
.box-card {
min-height: 300px;
height: calc(100vh - 140px);
border-radius: 10px;
.el-card__header {
background-color: rgba(249, 249, 249, 1);
}
}
/deep/ .el-dialog {
border-radius: 5px;
}
.popup-dialog {
.el-dialog__header {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
height: 50px;
background-color: #f5f5f5f5;
}
.el-dialog__title {
font-size: 15px;
font-weight: bolder;
}
.el-dialog__footer {
border-top: solid;
border-top-width: thin;
border-top-color: rgb(233, 233, 233);
padding: 10px 20px 10px;
}
}
.in-card-form {
height: 50px;
display: flex;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}
.card-header {
height: 23px;
}
.app-container {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
}
.card-header-text {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
font-weight: 700;
font-style: normal;
font-size: 16px;
text-align: left;
line-height: 20px;
letter-spacing: normal;
color: #333333;
}
</style>

@ -99,7 +99,8 @@ export default {
data() {
return {
selectTag: [],
rules: {}
rules: {},
coverUploadFileList: []
};
},
filters: {},
Loading…
Cancel
Save