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

View File

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

View File

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

View File

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