fix: eslint and lint fixed
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
<!-- eslint-disable vue/no-parsing-error -->
|
||||
<script setup lang='ts'>
|
||||
import { ref } from 'vue';
|
||||
import useStore from '@/store'
|
||||
import { IPersonConfig } from '@/types/storeType';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import type { IPersonConfig } from '@/types/storeType'
|
||||
import DaiysuiTable from '@/components/DaiysuiTable/index.vue'
|
||||
import i18n from '@/locales/i18n'
|
||||
import useStore from '@/store'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const personConfig = useStore().personConfig
|
||||
|
||||
const { getAlreadyPersonList: alreadyPersonList, getAlreadyPersonDetail: alreadyPersonDetail } = storeToRefs(personConfig)
|
||||
@@ -13,118 +16,116 @@ const { getAlreadyPersonList: alreadyPersonList, getAlreadyPersonDetail: already
|
||||
// alreadyPersonList
|
||||
// )
|
||||
|
||||
|
||||
// const deleteAll = () => {
|
||||
// personConfig.deleteAllPerson()
|
||||
// }
|
||||
|
||||
const isDetail = ref(false)
|
||||
const handleMoveNotPerson = (row: IPersonConfig) => {
|
||||
personConfig.moveAlreadyToNot(row)
|
||||
function handleMoveNotPerson(row: IPersonConfig) {
|
||||
personConfig.moveAlreadyToNot(row)
|
||||
}
|
||||
|
||||
const tableColumnsList = [
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'uid',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'name',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.department'),
|
||||
props: 'department',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.identity'),
|
||||
props: 'identity',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.prizeName'),
|
||||
props: 'prizeName',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.operation'),
|
||||
actions: [
|
||||
{
|
||||
label: i18n.global.t('data.removePerson'),
|
||||
type: 'btn-info',
|
||||
onClick: (row: IPersonConfig) => {
|
||||
handleMoveNotPerson(row)
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'uid',
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'name',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.department'),
|
||||
props: 'department',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.identity'),
|
||||
props: 'identity',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.prizeName'),
|
||||
props: 'prizeName',
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.operation'),
|
||||
actions: [
|
||||
{
|
||||
label: i18n.global.t('data.removePerson'),
|
||||
type: 'btn-info',
|
||||
onClick: (row: IPersonConfig) => {
|
||||
handleMoveNotPerson(row)
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
const tableColumnsDetail = [
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'uid',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'name',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.department'),
|
||||
props: 'department',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.identity'),
|
||||
props: 'identity',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.prizeName'),
|
||||
props: 'prizeName',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.prizeTime'),
|
||||
props: 'prizeTime',
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'uid',
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.number'),
|
||||
props: 'name',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.department'),
|
||||
props: 'department',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.identity'),
|
||||
props: 'identity',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.prizeName'),
|
||||
props: 'prizeName',
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.prizeTime'),
|
||||
props: 'prizeTime',
|
||||
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.operation'),
|
||||
actions: [
|
||||
{
|
||||
label: i18n.global.t('data.removePerson'),
|
||||
type: 'btn-info',
|
||||
onClick: (row: IPersonConfig) => {
|
||||
handleMoveNotPerson(row)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('data.operation'),
|
||||
actions: [
|
||||
{
|
||||
label: i18n.global.t('data.removePerson'),
|
||||
type: 'btn-info',
|
||||
onClick: (row: IPersonConfig) => {
|
||||
handleMoveNotPerson(row)
|
||||
},
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="overflow-y-auto">
|
||||
|
||||
<h2>{{ $t('viewTitle.winnerManagement') }}</h2>
|
||||
<div class="flex items-center justify-start gap-10">
|
||||
<div>
|
||||
<span>{{$t('table.luckyPeopleNumber')}}:</span>
|
||||
<span>{{ alreadyPersonList.length }}</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<div class="form-control">
|
||||
<label class="cursor-pointer label">
|
||||
<span class="label-text">{{$t('table.detail')}}:</span>
|
||||
<input type="checkbox" class="border-solid toggle toggle-primary border-1" v-model="isDetail" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-y-auto">
|
||||
<h2>{{ t('viewTitle.winnerManagement') }}</h2>
|
||||
<div class="flex items-center justify-start gap-10">
|
||||
<div>
|
||||
<span>{{ t('table.luckyPeopleNumber') }}:</span>
|
||||
<span>{{ alreadyPersonList.length }}</span>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<div class="form-control">
|
||||
<label class="cursor-pointer label">
|
||||
<span class="label-text">{{ t('table.detail') }}:</span>
|
||||
<input v-model="isDetail" type="checkbox" class="border-solid toggle toggle-primary border-1">
|
||||
</label>
|
||||
</div>
|
||||
<DaiysuiTable v-if="!isDetail" :tableColumns="tableColumnsList" :data="alreadyPersonList"></DaiysuiTable>
|
||||
|
||||
<DaiysuiTable v-if="isDetail" :tableColumns="tableColumnsDetail" :data="alreadyPersonDetail"></DaiysuiTable>
|
||||
</div>
|
||||
</div>
|
||||
<DaiysuiTable v-if="!isDetail" :table-columns="tableColumnsList" :data="alreadyPersonList" />
|
||||
|
||||
<DaiysuiTable v-if="isDetail" :table-columns="tableColumnsDetail" :data="alreadyPersonDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='scss' scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user