| | |
| | | <el-button type="primary" plain icon="Plus" @click="openForm('create')" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="success" plain icon="Edit" :disabled="single" @click="openForm('update')" v-hasPermi="['system:post:edit']">修改</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | <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="['${moduleName}:${businessName}:edit']"></el-button> |
| | | <el-button link type="primary" icon="Edit" @click="openForm('update',scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']"></el-button> |
| | | </el-tooltip> |
| | | <el-tooltip content="删除" placement="top"> |
| | | <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']"></el-button> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- 翻页组件 --> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | |
| | | <script setup name="${BusinessName}" lang="ts"> |
| | | /** 模块导入 */ |
| | | import { list${BusinessName}, del${BusinessName}} from '@/api/${moduleName}/${businessName}'; |
| | | import { ${BusinessName}VO, ${BusinessName}Query} from '@/api/${moduleName}/${businessName}/types'; |
| | | import DetailForm from "@/views/${moduleName}/${businessName}/DetailForm.vue"; |
| | | import { ${BusinessName}VO} from '@/api/${moduleName}/${businessName}/types'; |
| | | import DetailForm from './DetailForm.vue'; |
| | | |
| | | defineOptions({ name: '${BusinessName}' }) |
| | | |
| | |
| | | const dateRange${AttrName} = ref<[DateModelType, DateModelType]>(['', '']); |
| | | #end |
| | | #end |
| | | |
| | | // 查询窗体Ref |
| | | const queryFormRef = ref<ElFormInstance>(); |
| | | // 查询参数 |
| | | const queryParams = reactive({ |
| | |
| | | |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | queryParams.value.pageNum = 1; |
| | | queryParams.pageNum = 1; |
| | | getList(); |
| | | } |
| | | |
| | |
| | | } |
| | | /** 弹出框(增加、修改) */ |
| | | const detailFormRef = ref(); |
| | | const openForm = (type: string, id?: number) => { |
| | | const openForm = (type: string, row?: ${BusinessName}VO) => { |
| | | const id = row?.${pkColumn.javaField} || ids.value[0]; |
| | | detailFormRef?.value.open(type, id) |
| | | } |
| | | onMounted(() => { |