| | |
| | | <template> |
| | | <div class="p-2"> |
| | | <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> |
| | | <div class="search" v-show="showSearch"> |
| | | <div class="mb-[10px]" v-show="showSearch"> |
| | | <el-card shadow="hover"> |
| | | <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> |
| | | <el-form-item label="数据源" prop="dataName"> |
| | | <el-select v-model="queryParams.dataName" filterable clearable placeholder="请选择/输入数据源名称" style="width: 200px"> |
| | |
| | | <el-button icon="Refresh" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | </div> |
| | | </transition> |
| | | |
| | | <el-card shadow="never"> |
| | | <el-card shadow="hover"> |
| | | <template #header> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | |
| | | :name="(key as any).substring((key as any).lastIndexOf('/') + 1, (key as any).indexOf('.vm'))" |
| | | :key="value" |
| | | > |
| | | <el-link :underline="false" icon="DocumentCopy" v-copyText="value" v-copyText:callback="copyTextSuccess" style="float:right" |
| | | > 复制</el-link |
| | | > |
| | | <el-link :underline="false" icon="DocumentCopy" v-copyText="value" v-copyText:callback="copyTextSuccess" style="float:right"> |
| | | 复制 |
| | | </el-link> |
| | | <pre>{{ value }}</pre> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | import { listTable, previewTable, delTable, genCode, synchDb, getDataNames } from '@/api/tool/gen'; |
| | | import { TableQuery, TableVO } from '@/api/tool/gen/types'; |
| | | import router from '@/router'; |
| | | import importTable from './importTable.vue'; |
| | | import { ComponentInternalInstance } from 'vue'; |
| | | import { ElForm, DateModelType } from 'element-plus'; |
| | | import ImportTable from './importTable.vue'; |
| | | |
| | | const route = useRoute(); |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | |
| | | const uniqueId = ref(""); |
| | | const dataNameList = ref<Array<string>>([]); |
| | | |
| | | const queryFormRef = ref(ElForm); |
| | | const importRef = ref(importTable); |
| | | const queryFormRef = ref<ElFormInstance>(); |
| | | const importRef = ref<InstanceType<typeof ImportTable>>(); |
| | | |
| | | const queryParams = ref<TableQuery>({ |
| | | pageNum: 1, |
| | |
| | | uniqueId.value = time as string; |
| | | queryParams.value.pageNum = Number(route.query.pageNum); |
| | | dateRange.value = ['', '']; |
| | | queryFormRef.value.resetFields(); |
| | | queryFormRef.value?.resetFields(); |
| | | getList(); |
| | | } |
| | | }) |
| | |
| | | } |
| | | /** 打开导入表弹窗 */ |
| | | const openImportTable = () => { |
| | | importRef.value.show(queryParams.value.dataName); |
| | | importRef.value?.show(queryParams.value.dataName); |
| | | } |
| | | /** 重置按钮操作 */ |
| | | const resetQuery = () => { |
| | | dateRange.value = ['', '']; |
| | | queryFormRef.value.resetFields(); |
| | | queryFormRef.value?.resetFields(); |
| | | handleQuery(); |
| | | } |
| | | /** 预览按钮 */ |