review
This commit is contained in:
1 parent
e2c5bb996b
commit
2ecc8a46e9
15 files changed
+18707
-667
No files matched your search
@@ -11,7 +11,7 @@
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
@@ -23,7 +23,7 @@
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
:headers="headers"
|
||||
:items="tableData"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
@@ -53,11 +53,11 @@ new Vue({
|
||||
template: '#app-template',
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
isMobile: window.innerWidth < 600,
|
||||
// 表格相关数据
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
currentTableGenderType: 'all',
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
@@ -78,17 +78,6 @@ new Vue({
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
],
|
||||
}),
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
},
|
||||
tableData() {
|
||||
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
|
||||
return this.tableDataFromBackend;
|
||||
}
|
||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
@@ -96,13 +85,13 @@ new Vue({
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
async doUiAction(uiActionId, actionData) {
|
||||
async doUiAction(uiActionId, uiActionData) {
|
||||
switch (uiActionId) {
|
||||
case 'refreshTableData':
|
||||
await this.refreshTableData(actionData);
|
||||
await this.refreshTableData(uiActionData);
|
||||
break;
|
||||
case 'toTaskHistory':
|
||||
await this.toTaskHistory(actionData);
|
||||
await this.toTaskHistory(uiActionData);
|
||||
break;
|
||||
default:
|
||||
console.error("[doAction] uiActionId not find", { uiActionId });
|
||||
|
||||
Reference in new issue
Block a user