统计分析
This commit is contained in:
@@ -67,13 +67,13 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import HitokotoAdd from './HitokotoAdd.vue'
|
||||
import { Options } from 'vue-class-component'
|
||||
import { Options, Vue } from 'vue-class-component'
|
||||
import BaseList from '../../model/baselist'
|
||||
import { Page } from '../../model/common.dto'
|
||||
import HitokotoModel from '../../model/api/hitokoto'
|
||||
import { AxiosResponse } from 'axios'
|
||||
import { ElButton, ElForm, ElFormItem, ElInput, ElTable, ElTableColumn, ElPagination, ElDialog, ElSelect, ElOption, ElDatePicker, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { ref } from 'vue'
|
||||
import { VForm } from '../../types'
|
||||
|
||||
let selectedData: string[] = []
|
||||
@Options({
|
||||
@@ -81,7 +81,6 @@ let selectedData: string[] = []
|
||||
components: { ElButton, ElForm, ElFormItem, ElInput, ElTable, ElTableColumn, ElPagination, ElDialog, ElSelect, ElOption, ElDatePicker, HitokotoAdd }
|
||||
})
|
||||
export default class Hitokoto extends BaseList<HitokotoPage> {
|
||||
private readonly addForm: any = ref('addForm')
|
||||
search = new HitokotoPage()
|
||||
typeList: {label: string, value: string}[] = []
|
||||
hitokotoData: HitokotoModel[] = []
|
||||
@@ -97,7 +96,7 @@ export default class Hitokoto extends BaseList<HitokotoPage> {
|
||||
this.hitokotoData = data.data
|
||||
}
|
||||
async save() {
|
||||
this.addForm.$refs.hitokotoForm.validate(async (valid: boolean) => {
|
||||
((this.$refs.addForm as Vue).$refs.hitokotoForm as VForm).validate(async (valid: boolean) => {
|
||||
if(!valid) return
|
||||
this.modalLoading = true
|
||||
const { data } = await this.$http.post<any, AxiosResponse<any>>('/api/hitokoto/save', this.formData)
|
||||
|
||||
@@ -117,10 +117,9 @@ import BaseList from '../../model/baselist'
|
||||
import { Page } from '../../model/common.dto'
|
||||
import { AxiosResponse } from 'axios'
|
||||
import { ElButton, ElForm, ElFormItem, ElInput, ElTable, ElTableColumn, ElPagination, ElDialog, ElSelect, ElOption, ElRadioGroup, ElRadio, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import { MusicModel, MusicLibModel, MusicLyricModel, MusicPlayerItem } from '../../model/api/music'
|
||||
import prettyBytes from 'pretty-bytes'
|
||||
import { VForm } from '../../types'
|
||||
|
||||
let selectedIds: string[] = []
|
||||
@Options({
|
||||
@@ -128,8 +127,6 @@ let selectedIds: string[] = []
|
||||
components: { ElButton, ElForm, ElFormItem, ElInput, ElTable, ElTableColumn, ElPagination, ElDialog, ElSelect, ElOption, ElRadioGroup, ElRadio }
|
||||
})
|
||||
export default class Music extends BaseList<MusicPage> {
|
||||
// @Ref('player') private readonly player!: APlayerComponent
|
||||
private readonly lyricForm: any = ref('lyricForm')
|
||||
search = new MusicPage()
|
||||
currentRow: MusicModel | null = null
|
||||
exts: string[] = []
|
||||
@@ -226,7 +223,7 @@ export default class Music extends BaseList<MusicPage> {
|
||||
}
|
||||
}
|
||||
async saveLyric() {
|
||||
this.lyricForm.validate(async (valid: boolean) => {
|
||||
(this.$refs.lyricForm as VForm).validate(async (valid: boolean) => {
|
||||
if(!valid) return
|
||||
this.modalLoading = true
|
||||
const { data } = await this.$http.post<MusicLyricModel, AxiosResponse<any>>(`/api/music/lyric/save?musicId=${this.currentRow ? this.currentRow._id : ''}`, this.lyricFormData)
|
||||
|
||||
Reference in New Issue
Block a user