|
@@ -47,12 +47,21 @@
|
|
:loading="tableLoading"
|
|
:loading="tableLoading"
|
|
:total="total"
|
|
:total="total"
|
|
:page-info="pageInfo"
|
|
:page-info="pageInfo"
|
|
- @edit="handleEdit"
|
|
|
|
@delete="handleDelete"
|
|
@delete="handleDelete"
|
|
@pageHandleChange="pageHandleChange"
|
|
@pageHandleChange="pageHandleChange"
|
|
@sort="handleSort"
|
|
@sort="handleSort"
|
|
@add="handleAdd"
|
|
@add="handleAdd"
|
|
>
|
|
>
|
|
|
|
+ <template #navBtn>
|
|
|
|
+ <v-btn color="primary" class="buttons mr-3" rounded elevation="5" @click="handleCombine">
|
|
|
|
+ <v-icon left>mdi-vector-combine</v-icon>
|
|
|
|
+ 合并
|
|
|
|
+ </v-btn>
|
|
|
|
+ <v-btn color="primary" class="buttons" rounded elevation="5" @click="handleUpload">
|
|
|
|
+ <v-icon left>mdi-import</v-icon>
|
|
|
|
+ 导入
|
|
|
|
+ </v-btn>
|
|
|
|
+ </template>
|
|
<template #question="{ item }">
|
|
<template #question="{ item }">
|
|
<span style="max-width: 300px;" class="d-inline-block text-truncate">{{ item.question }}</span>
|
|
<span style="max-width: 300px;" class="d-inline-block text-truncate">{{ item.question }}</span>
|
|
</template>
|
|
</template>
|
|
@@ -61,11 +70,14 @@
|
|
</template>
|
|
</template>
|
|
<template #actions="{ item }">
|
|
<template #actions="{ item }">
|
|
<v-btn text color="primary" @click="handleDetails(item)">查看</v-btn>
|
|
<v-btn text color="primary" @click="handleDetails(item)">查看</v-btn>
|
|
|
|
+ <v-btn text color="primary" @click="handleEdit(item)">编辑</v-btn>
|
|
<v-btn text color="error" @click="handleDelete([item.id])">删除</v-btn>
|
|
<v-btn text color="error" @click="handleDelete([item.id])">删除</v-btn>
|
|
</template>
|
|
</template>
|
|
</MTable>
|
|
</MTable>
|
|
</div>
|
|
</div>
|
|
<ModelTrainManageEdit ref="ModelTrainManageEditRefs" @success="onOpen"></ModelTrainManageEdit>
|
|
<ModelTrainManageEdit ref="ModelTrainManageEditRefs" @success="onOpen"></ModelTrainManageEdit>
|
|
|
|
+ <ModelTrainManageCombine ref="modelTrainManageCombineRefs" @success="init"></ModelTrainManageCombine>
|
|
|
|
+ <ModelTrainManageUpload ref="modelTrainManageUploadRefs" @success="init"></ModelTrainManageUpload>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -78,12 +90,16 @@ import {
|
|
import MTable from '@/components/List/table.vue'
|
|
import MTable from '@/components/List/table.vue'
|
|
import MSearch from '@/components/Filter'
|
|
import MSearch from '@/components/Filter'
|
|
import ModelTrainManageEdit from './modelTrainManageEdit.vue'
|
|
import ModelTrainManageEdit from './modelTrainManageEdit.vue'
|
|
|
|
+import ModelTrainManageCombine from './modelTrainManageCombine.vue'
|
|
|
|
+import ModelTrainManageUpload from './modelTrainManageUpload.vue'
|
|
export default {
|
|
export default {
|
|
name: 'ModelTrain',
|
|
name: 'ModelTrain',
|
|
components: {
|
|
components: {
|
|
MTable,
|
|
MTable,
|
|
MSearch,
|
|
MSearch,
|
|
- ModelTrainManageEdit
|
|
|
|
|
|
+ ModelTrainManageEdit,
|
|
|
|
+ ModelTrainManageUpload,
|
|
|
|
+ ModelTrainManageCombine
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -161,7 +177,6 @@ export default {
|
|
sort_order: undefined
|
|
sort_order: undefined
|
|
}
|
|
}
|
|
if (this.orders.length) {
|
|
if (this.orders.length) {
|
|
- console.log(this.orders[0])
|
|
|
|
Object.assign(orders, {
|
|
Object.assign(orders, {
|
|
sort_by: this.orders[0].column.replace(/`/g, ''),
|
|
sort_by: this.orders[0].column.replace(/`/g, ''),
|
|
sort_order: this.orders[0].asc ? 'asc' : 'desc'
|
|
sort_order: this.orders[0].asc ? 'asc' : 'desc'
|
|
@@ -193,6 +208,12 @@ export default {
|
|
handleDetails (item) {
|
|
handleDetails (item) {
|
|
this.$refs.ModelTrainManageEditRefs.open(item, true)
|
|
this.$refs.ModelTrainManageEditRefs.open(item, true)
|
|
},
|
|
},
|
|
|
|
+ handleCombine () {
|
|
|
|
+ this.$refs.modelTrainManageCombineRefs.open()
|
|
|
|
+ },
|
|
|
|
+ async handleUpload (file) {
|
|
|
|
+ this.$refs.modelTrainManageUploadRefs.open()
|
|
|
|
+ },
|
|
pageHandleChange (index) {
|
|
pageHandleChange (index) {
|
|
this.pageInfo.current = index
|
|
this.pageInfo.current = index
|
|
this.init()
|
|
this.init()
|