| | |
| | | <template #header> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:data:add']">新增</el-button> |
| | | <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['td:data:add']">新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:data:edit']">修改</el-button> |
| | | <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['td:data:edit']">修改</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:data:remove']">删除</el-button> |
| | | <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['td:data:remove']">删除</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:data:export']">导出</el-button> |
| | | <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['td:data:export']">导出</el-button> |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-tooltip content="修改" placement="top"> |
| | | <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:data:edit']"></el-button> |
| | | <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['td:data:edit']"></el-button> |
| | | </el-tooltip> |
| | | <el-tooltip content="删除" placement="top"> |
| | | <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:data:remove']"></el-button> |
| | | <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['td:data:remove']"></el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </template> |
| | | |
| | | <script setup name="Data" lang="ts"> |
| | | import { listData, getData, delData, addData, updateData } from '@/api/system/data'; |
| | | import { DataVO, DataQuery, DataForm } from '@/api/system/data/types'; |
| | | import { listData, getData, delData, addData, updateData } from '@/api/td/data'; |
| | | import { DataVO, DataQuery, DataForm } from '@/api/td/data/types'; |
| | | |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | | |
| | |
| | | |
| | | /** 导出按钮操作 */ |
| | | const handleExport = () => { |
| | | proxy?.download('system/data/export', { |
| | | proxy?.download('td/data/export', { |
| | | ...queryParams.value |
| | | }, `data_${new Date().getTime()}.xlsx`) |
| | | } |