Compare commits

...

2 Commits

Author SHA1 Message Date
c173418103 Merge remote-tracking branch 'origin/main' 2024-05-06 08:34:09 +08:00
17a113f8ad 页面展示优化 2024-05-06 08:33:59 +08:00
4 changed files with 21 additions and 30 deletions

View File

@ -31,8 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
*/ */
@RestController @RestController
@RequestMapping("/om/application") @RequestMapping("/om/application")
public class OmTeamApplicationController extends BaseController public class OmTeamApplicationController extends BaseController {
{
@Autowired @Autowired
private IOmTeamApplicationService omTeamApplicationService; private IOmTeamApplicationService omTeamApplicationService;
@ -41,13 +40,12 @@ public class OmTeamApplicationController extends BaseController
*/ */
// @PreAuthorize("@ss.hasPermi('om:application:list')") // @PreAuthorize("@ss.hasPermi('om:application:list')")
@GetMapping("/listByOm") @GetMapping("/listByOm")
public TableDataInfo listByOm(OmTeamApplication omTeamApplication) public TableDataInfo listByOm(OmTeamApplication omTeamApplication) {
{
startPage(); startPage();
if(StringUtils.isEmpty(omTeamApplication.getContacts())){ if (StringUtils.isEmpty(omTeamApplication.getContacts())) {
omTeamApplication.setContacts(IdUtils.fastSimpleUUID()); omTeamApplication.setContacts(IdUtils.fastSimpleUUID());
} }
if(StringUtils.isEmpty(omTeamApplication.getTelephone())){ if (StringUtils.isEmpty(omTeamApplication.getTelephone())) {
omTeamApplication.setTelephone(IdUtils.fastSimpleUUID()); omTeamApplication.setTelephone(IdUtils.fastSimpleUUID());
} }
List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication); List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication);
@ -58,18 +56,17 @@ public class OmTeamApplicationController extends BaseController
* 校验团队名称唯一 * 校验团队名称唯一
*/ */
@GetMapping("/uniqueCheck") @GetMapping("/uniqueCheck")
public AjaxResult uniqueCheck(OmTeamApplication omTeamApplication) public AjaxResult uniqueCheck(OmTeamApplication omTeamApplication) {
{
int num = omTeamApplicationService.uniqueCheck(omTeamApplication); int num = omTeamApplicationService.uniqueCheck(omTeamApplication);
return AjaxResult.success(num>0); return AjaxResult.success(num > 0);
} }
/** /**
* 查询团队注册申请列表 * 查询团队注册申请列表
*/ */
@PreAuthorize("@ss.hasPermi('om:application:list')") @PreAuthorize("@ss.hasPermi('om:application:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(OmTeamApplication omTeamApplication) public TableDataInfo list(OmTeamApplication omTeamApplication) {
{
startPage(); startPage();
List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication); List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication);
return getDataTable(list); return getDataTable(list);
@ -81,8 +78,7 @@ public class OmTeamApplicationController extends BaseController
@PreAuthorize("@ss.hasPermi('om:application:export')") @PreAuthorize("@ss.hasPermi('om:application:export')")
@Log(title = "团队注册申请", businessType = BusinessType.EXPORT) @Log(title = "团队注册申请", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, OmTeamApplication omTeamApplication) public void export(HttpServletResponse response, OmTeamApplication omTeamApplication) {
{
List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication); List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication);
ExcelUtil<OmTeamApplication> util = new ExcelUtil<OmTeamApplication>(OmTeamApplication.class); ExcelUtil<OmTeamApplication> util = new ExcelUtil<OmTeamApplication>(OmTeamApplication.class);
util.exportExcel(response, list, "团队注册申请数据"); util.exportExcel(response, list, "团队注册申请数据");
@ -93,8 +89,7 @@ public class OmTeamApplicationController extends BaseController
*/ */
// @PreAuthorize("@ss.hasPermi('om:application:query')") // @PreAuthorize("@ss.hasPermi('om:application:query')")
@GetMapping(value = "/detail/{id}") @GetMapping(value = "/detail/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id) {
{
return success(omTeamApplicationService.selectOmTeamApplicationById(id)); return success(omTeamApplicationService.selectOmTeamApplicationById(id));
} }
@ -104,8 +99,7 @@ public class OmTeamApplicationController extends BaseController
// @PreAuthorize("@ss.hasPermi('om:application:add')") // @PreAuthorize("@ss.hasPermi('om:application:add')")
// @Log(title = "团队注册申请", businessType = BusinessType.INSERT) // @Log(title = "团队注册申请", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody OmTeamApplication omTeamApplication) public AjaxResult add(@RequestBody OmTeamApplication omTeamApplication) {
{
return toAjax(omTeamApplicationService.insertOmTeamApplication(omTeamApplication)); return toAjax(omTeamApplicationService.insertOmTeamApplication(omTeamApplication));
} }
@ -115,8 +109,7 @@ public class OmTeamApplicationController extends BaseController
// @PreAuthorize("@ss.hasPermi('om:application:edit')") // @PreAuthorize("@ss.hasPermi('om:application:edit')")
// @Log(title = "团队注册申请", businessType = BusinessType.UPDATE) // @Log(title = "团队注册申请", businessType = BusinessType.UPDATE)
@PutMapping("/update") @PutMapping("/update")
public AjaxResult edit(@RequestBody OmTeamApplication omTeamApplication) public AjaxResult edit(@RequestBody OmTeamApplication omTeamApplication) {
{
return toAjax(omTeamApplicationService.updateOmTeamApplication(omTeamApplication)); return toAjax(omTeamApplicationService.updateOmTeamApplication(omTeamApplication));
} }
@ -126,8 +119,7 @@ public class OmTeamApplicationController extends BaseController
@PreAuthorize("@ss.hasPermi('om:application:remove')") @PreAuthorize("@ss.hasPermi('om:application:remove')")
@Log(title = "团队注册申请", businessType = BusinessType.DELETE) @Log(title = "团队注册申请", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) public AjaxResult remove(@PathVariable String[] ids) {
{
return toAjax(omTeamApplicationService.deleteOmTeamApplicationByIds(ids)); return toAjax(omTeamApplicationService.deleteOmTeamApplicationByIds(ids));
} }
@ -152,8 +144,7 @@ public class OmTeamApplicationController extends BaseController
// filename为文件下载后保存的文件名可自行设置但是注意文件名后缀要和原来的保持一致 // filename为文件下载后保存的文件名可自行设置但是注意文件名后缀要和原来的保持一致
response.setHeader("Content-Disposition", "attachment; filename=" + name); response.setHeader("Content-Disposition", "attachment; filename=" + name);
response.setHeader("filename", name); response.setHeader("filename", name);
OutputStream out = null; OutputStream out = response.getOutputStream();
out = response.getOutputStream();
byte[] bytes = omTeamApplicationService.downLoadFile(path, saveName); byte[] bytes = omTeamApplicationService.downLoadFile(path, saveName);
// 输出到客户端 // 输出到客户端
if (bytes != null) { if (bytes != null) {

View File

@ -138,7 +138,7 @@
<el-button <el-button
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="el-icon-star-on"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
@ -312,7 +312,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-star-off" icon="el-icon-star-on"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['order:info:edit']" v-hasPermi="['order:info:edit']"
>取消收藏</el-button> >取消收藏</el-button>

View File

@ -324,7 +324,7 @@
v-if="!scope.row.omOrderCollect" v-if="!scope.row.omOrderCollect"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-star-on" icon="el-icon-star-off"
@click="handleCollect(scope.row)" @click="handleCollect(scope.row)"
v-hasPermi="['order:info:edit']" v-hasPermi="['order:info:edit']"
>收藏</el-button> >收藏</el-button>
@ -332,7 +332,7 @@
v-if="scope.row.omOrderCollect" v-if="scope.row.omOrderCollect"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-star-off" icon="el-icon-star-on"
@click="handleDelCollect(scope.row)" @click="handleDelCollect(scope.row)"
v-hasPermi="['order:info:edit']" v-hasPermi="['order:info:edit']"
>取消收藏</el-button> >取消收藏</el-button>

View File

@ -313,7 +313,7 @@
v-if="!scope.row.omOrderCollect" v-if="!scope.row.omOrderCollect"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-star-on" icon="el-icon-star-off"
@click="handleCollect(scope.row)" @click="handleCollect(scope.row)"
v-hasPermi="['order:info:edit']" v-hasPermi="['order:info:edit']"
>收藏</el-button> >收藏</el-button>
@ -321,7 +321,7 @@
v-if="scope.row.omOrderCollect" v-if="scope.row.omOrderCollect"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-star-off" icon="el-icon-star-on"
@click="handleDelCollect(scope.row)" @click="handleDelCollect(scope.row)"
v-hasPermi="['order:info:edit']" v-hasPermi="['order:info:edit']"
>取消收藏</el-button> >取消收藏</el-button>