Browse Source

提交代码

dev
主管理员 1 year ago
parent
commit
baddb39a2d
41 changed files with 2506 additions and 2281 deletions
  1. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/controller/HanHaiBannerController.java
  2. +20
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/entity/HanHaiBanner.java
  3. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/mapper/HanHaiBannerMapper.java
  4. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/service/IHanHaiBannerService.java
  5. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/service/impl/HanHaiBannerServiceImpl.java
  6. +25
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/vue/HanHaiBannerList.vue
  7. +20
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/vue/modules/HanHaiBannerForm.vue
  8. +49
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/vue3/HanHaiBanner.data.ts
  9. +171
    -171
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/controller/HanHaiRealEnterpriseController.java
  10. +90
    -81
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/entity/HanHaiRealEnterprise.java
  11. +17
    -17
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/mapper/HanHaiRealEnterpriseMapper.java
  12. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/mapper/xml/HanHaiRealEnterpriseMapper.xml
  13. +14
    -14
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/service/IHanHaiRealEnterpriseService.java
  14. +19
    -19
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/service/impl/HanHaiRealEnterpriseServiceImpl.java
  15. +217
    -210
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/HanHaiRealEnterpriseList.vue
  16. +138
    -133
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/modules/HanHaiRealEnterpriseForm.vue
  17. +83
    -83
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/modules/HanHaiRealEnterpriseModal.Style#Drawer.vue
  18. +59
    -59
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/modules/HanHaiRealEnterpriseModal.vue
  19. +61
    -61
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/HanHaiRealEnterprise.api.ts
  20. +108
    -95
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/HanHaiRealEnterprise.data.ts
  21. +161
    -161
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/HanHaiRealEnterpriseList.vue
  22. +57
    -57
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/components/HanHaiRealEnterpriseModal.vue
  23. +171
    -171
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/controller/HanHaiRealNameController.java
  24. +78
    -70
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/entity/HanHaiRealName.java
  25. +17
    -17
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/mapper/HanHaiRealNameMapper.java
  26. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/mapper/xml/HanHaiRealNameMapper.xml
  27. +14
    -14
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/service/IHanHaiRealNameService.java
  28. +19
    -19
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/service/impl/HanHaiRealNameServiceImpl.java
  29. +202
    -196
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/HanHaiRealNameList.vue
  30. +128
    -123
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/modules/HanHaiRealNameForm.vue
  31. +83
    -83
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/modules/HanHaiRealNameModal.Style#Drawer.vue
  32. +59
    -59
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/modules/HanHaiRealNameModal.vue
  33. +61
    -61
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/HanHaiRealName.api.ts
  34. +79
    -69
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/HanHaiRealName.data.ts
  35. +161
    -161
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/HanHaiRealNameList.vue
  36. +57
    -57
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/components/HanHaiRealNameModal.vue
  37. +2
    -2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/noticeapicontroller/InfoApiController.java
  38. +4
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiBean/ActorSetPageBean.java
  39. +3
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiBean/PromotionPageBean.java
  40. +12
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/IndexApiServiceImpl.java
  41. +35
    -4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/InfoApiServiceImpl.java

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/controller/HanHaiBannerController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 轮播广告
* @Author: jeecg-boot
* @Date: 2024-09-20
* @Date: 2024-09-25
* @Version: V1.0
*/
@Api(tags="轮播广告")


+ 20
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/entity/HanHaiBanner.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 轮播广告
* @Author: jeecg-boot
* @Date: 2024-09-20
* @Date: 2024-09-25
* @Version: V1.0
*/
@Data
@ -63,4 +63,23 @@ public class HanHaiBanner implements Serializable {
@Excel(name = "跳转地址", width = 15)
@ApiModelProperty(value = "跳转地址")
private java.lang.String toUrl;
/**0帖子1名片2作品*/
@Excel(name = "0帖子1名片2作品", width = 15)
@ApiModelProperty(value = "0帖子1名片2作品")
private java.lang.Integer type;
/**帖子*/
@Excel(name = "帖子", width = 15, dictTable = "at_trends", dicText = "title", dicCode = "id")
@Dict(dictTable = "at_trends", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "帖子")
private java.lang.String trendsId;
/**名片*/
@Excel(name = "名片", width = 15, dictTable = "at_actor_collection", dicText = "name", dicCode = "id")
@Dict(dictTable = "at_actor_collection", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "名片")
private java.lang.String collectionId;
/**作品*/
@Excel(name = "作品", width = 15, dictTable = "at_masterpiece", dicText = "title", dicCode = "id")
@Dict(dictTable = "at_masterpiece", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "作品")
private java.lang.String masterpieceId;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/mapper/HanHaiBannerMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 轮播广告
* @Author: jeecg-boot
* @Date: 2024-09-20
* @Date: 2024-09-25
* @Version: V1.0
*/
public interface HanHaiBannerMapper extends BaseMapper<HanHaiBanner> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/service/IHanHaiBannerService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 轮播广告
* @Author: jeecg-boot
* @Date: 2024-09-20
* @Date: 2024-09-25
* @Version: V1.0
*/
public interface IHanHaiBannerService extends IService<HanHaiBanner> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/service/impl/HanHaiBannerServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 轮播广告
* @Author: jeecg-boot
* @Date: 2024-09-20
* @Date: 2024-09-25
* @Version: V1.0
*/
@Service


+ 25
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/vue/HanHaiBannerList.vue View File

@ -99,6 +99,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HanHaiBannerModal from './modules/HanHaiBannerModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HanHaiBannerList',
@ -137,6 +138,26 @@
align:"center",
dataIndex: 'toUrl'
},
{
title:'0帖子1名片2作品',
align:"center",
dataIndex: 'type'
},
{
title:'帖子',
align:"center",
dataIndex: 'trendsId_dictText'
},
{
title:'名片',
align:"center",
dataIndex: 'collectionId_dictText'
},
{
title:'作品',
align:"center",
dataIndex: 'masterpieceId_dictText'
},
{
title: '操作',
dataIndex: 'action',
@ -174,6 +195,10 @@
fieldList.push({type:'string',value:'name',text:'备注名称',dictCode:''})
fieldList.push({type:'string',value:'image',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'toUrl',text:'跳转地址',dictCode:''})
fieldList.push({type:'int',value:'type',text:'0帖子1名片2作品',dictCode:''})
fieldList.push({type:'sel_search',value:'trendsId',text:'帖子',dictTable:"at_trends", dictText:'title', dictCode:'id'})
fieldList.push({type:'sel_search',value:'collectionId',text:'名片',dictTable:"at_actor_collection", dictText:'name', dictCode:'id'})
fieldList.push({type:'sel_search',value:'masterpieceId',text:'作品',dictTable:"at_masterpiece", dictText:'title', dictCode:'id'})
this.superFieldList = fieldList
}
}


+ 20
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/vue/modules/HanHaiBannerForm.vue View File

@ -18,6 +18,26 @@
<a-input v-model="model.toUrl" placeholder="请输入跳转地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="0帖子1名片2作品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input-number v-model="model.type" placeholder="请输入0帖子1名片2作品" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="帖子" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trendsId">
<j-search-select-tag v-model="model.trendsId" dict="at_trends,title,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="名片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="collectionId">
<j-search-select-tag v-model="model.collectionId" dict="at_actor_collection,name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="作品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="masterpieceId">
<j-search-select-tag v-model="model.masterpieceId" dict="at_masterpiece,title,id" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>


+ 49
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiBanner/vue3/HanHaiBanner.data.ts View File

@ -20,6 +20,26 @@ export const columns: BasicColumn[] = [
align:"center",
dataIndex: 'toUrl'
},
{
title: '0帖子1名片2作品',
align:"center",
dataIndex: 'type'
},
{
title: '帖子',
align:"center",
dataIndex: 'trendsId_dictText'
},
{
title: '名片',
align:"center",
dataIndex: 'collectionId_dictText'
},
{
title: '作品',
align:"center",
dataIndex: 'masterpieceId_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -43,4 +63,33 @@ export const formSchema: FormSchema[] = [
field: 'toUrl',
component: 'Input',
},
{
label: '0帖子1名片2作品',
field: 'type',
component: 'InputNumber',
},
{
label: '帖子',
field: 'trendsId',
component: 'JSearchSelect',
componentProps:{
dict:"at_trends,title,id"
},
},
{
label: '名片',
field: 'collectionId',
component: 'JSearchSelect',
componentProps:{
dict:"at_actor_collection,name,id"
},
},
{
label: '作品',
field: 'masterpieceId',
component: 'JSearchSelect',
componentProps:{
dict:"at_masterpiece,title,id"
},
},
];

+ 171
- 171
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/controller/HanHaiRealEnterpriseController.java View File

@ -1,171 +1,171 @@
package org.jeecg.modules.hanHaiRealEnterprise.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import org.jeecg.modules.hanHaiRealEnterprise.service.IHanHaiRealEnterpriseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 企业认证
* @Author: jeecg-boot
* @Date: 2024-08-27
* @Version: V1.0
*/
@Api(tags="企业认证")
@RestController
@RequestMapping("/hanHaiRealEnterprise/hanHaiRealEnterprise")
@Slf4j
public class HanHaiRealEnterpriseController extends JeecgController<HanHaiRealEnterprise, IHanHaiRealEnterpriseService> {
@Autowired
private IHanHaiRealEnterpriseService hanHaiRealEnterpriseService;
/**
* 分页列表查询
*
* @param hanHaiRealEnterprise
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "企业认证-分页列表查询")
@ApiOperation(value="企业认证-分页列表查询", notes="企业认证-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HanHaiRealEnterprise>> queryPageList(HanHaiRealEnterprise hanHaiRealEnterprise,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HanHaiRealEnterprise> queryWrapper = QueryGenerator.initQueryWrapper(hanHaiRealEnterprise, req.getParameterMap());
Page<HanHaiRealEnterprise> page = new Page<HanHaiRealEnterprise>(pageNo, pageSize);
IPage<HanHaiRealEnterprise> pageList = hanHaiRealEnterpriseService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hanHaiRealEnterprise
* @return
*/
@AutoLog(value = "企业认证-添加")
@ApiOperation(value="企业认证-添加", notes="企业认证-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HanHaiRealEnterprise hanHaiRealEnterprise) {
hanHaiRealEnterpriseService.save(hanHaiRealEnterprise);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hanHaiRealEnterprise
* @return
*/
@AutoLog(value = "企业认证-编辑")
@ApiOperation(value="企业认证-编辑", notes="企业认证-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HanHaiRealEnterprise hanHaiRealEnterprise) {
hanHaiRealEnterpriseService.updateById(hanHaiRealEnterprise);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "企业认证-通过id删除")
@ApiOperation(value="企业认证-通过id删除", notes="企业认证-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hanHaiRealEnterpriseService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "企业认证-批量删除")
@ApiOperation(value="企业认证-批量删除", notes="企业认证-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hanHaiRealEnterpriseService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "企业认证-通过id查询")
@ApiOperation(value="企业认证-通过id查询", notes="企业认证-通过id查询")
@GetMapping(value = "/queryById")
public Result<HanHaiRealEnterprise> queryById(@RequestParam(name="id",required=true) String id) {
HanHaiRealEnterprise hanHaiRealEnterprise = hanHaiRealEnterpriseService.getById(id);
if(hanHaiRealEnterprise==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hanHaiRealEnterprise);
}
/**
* 导出excel
*
* @param request
* @param hanHaiRealEnterprise
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HanHaiRealEnterprise hanHaiRealEnterprise) {
return super.exportXls(request, hanHaiRealEnterprise, HanHaiRealEnterprise.class, "企业认证");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HanHaiRealEnterprise.class);
}
}
package org.jeecg.modules.hanHaiRealEnterprise.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import org.jeecg.modules.hanHaiRealEnterprise.service.IHanHaiRealEnterpriseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 企业实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
@Api(tags="企业实名认证")
@RestController
@RequestMapping("/hanHaiRealEnterprise/hanHaiRealEnterprise")
@Slf4j
public class HanHaiRealEnterpriseController extends JeecgController<HanHaiRealEnterprise, IHanHaiRealEnterpriseService> {
@Autowired
private IHanHaiRealEnterpriseService hanHaiRealEnterpriseService;
/**
* 分页列表查询
*
* @param hanHaiRealEnterprise
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "企业实名认证-分页列表查询")
@ApiOperation(value="企业实名认证-分页列表查询", notes="企业实名认证-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HanHaiRealEnterprise>> queryPageList(HanHaiRealEnterprise hanHaiRealEnterprise,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HanHaiRealEnterprise> queryWrapper = QueryGenerator.initQueryWrapper(hanHaiRealEnterprise, req.getParameterMap());
Page<HanHaiRealEnterprise> page = new Page<HanHaiRealEnterprise>(pageNo, pageSize);
IPage<HanHaiRealEnterprise> pageList = hanHaiRealEnterpriseService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hanHaiRealEnterprise
* @return
*/
@AutoLog(value = "企业实名认证-添加")
@ApiOperation(value="企业实名认证-添加", notes="企业实名认证-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HanHaiRealEnterprise hanHaiRealEnterprise) {
hanHaiRealEnterpriseService.save(hanHaiRealEnterprise);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hanHaiRealEnterprise
* @return
*/
@AutoLog(value = "企业实名认证-编辑")
@ApiOperation(value="企业实名认证-编辑", notes="企业实名认证-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HanHaiRealEnterprise hanHaiRealEnterprise) {
hanHaiRealEnterpriseService.updateById(hanHaiRealEnterprise);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "企业实名认证-通过id删除")
@ApiOperation(value="企业实名认证-通过id删除", notes="企业实名认证-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hanHaiRealEnterpriseService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "企业实名认证-批量删除")
@ApiOperation(value="企业实名认证-批量删除", notes="企业实名认证-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hanHaiRealEnterpriseService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "企业实名认证-通过id查询")
@ApiOperation(value="企业实名认证-通过id查询", notes="企业实名认证-通过id查询")
@GetMapping(value = "/queryById")
public Result<HanHaiRealEnterprise> queryById(@RequestParam(name="id",required=true) String id) {
HanHaiRealEnterprise hanHaiRealEnterprise = hanHaiRealEnterpriseService.getById(id);
if(hanHaiRealEnterprise==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hanHaiRealEnterprise);
}
/**
* 导出excel
*
* @param request
* @param hanHaiRealEnterprise
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HanHaiRealEnterprise hanHaiRealEnterprise) {
return super.exportXls(request, hanHaiRealEnterprise, HanHaiRealEnterprise.class, "企业实名认证");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HanHaiRealEnterprise.class);
}
}

+ 90
- 81
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/entity/HanHaiRealEnterprise.java View File

@ -1,81 +1,90 @@
package org.jeecg.modules.hanHaiRealEnterprise.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 企业认证表
* @Author: jeecg-boot
* @Date: 2024-08-27
* @Version: V1.0
*/
@Data
@TableName("han_hai_real_enterprise")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="han_hai_real_enterprise对象", description="企业认证表")
public class HanHaiRealEnterprise implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**法人姓名*/
@Excel(name = "法人姓名", width = 15)
@ApiModelProperty(value = "法人姓名")
private java.lang.String name;
/**法人身份证*/
@Excel(name = "法人身份证", width = 15)
@ApiModelProperty(value = "法人身份证")
private java.lang.String card;
/**营业执照*/
@Excel(name = "营业执照", width = 15)
@ApiModelProperty(value = "营业执照")
private java.lang.String tradeImage;
/**其他资质*/
@Excel(name = "其他资质", width = 15)
@ApiModelProperty(value = "其他资质")
private java.lang.String otherImage;
/**身份证正面*/
@Excel(name = "身份证正面", width = 15)
@ApiModelProperty(value = "身份证正面")
private java.lang.String imageStraight;
/**身份证反面*/
@Excel(name = "身份证反面", width = 15)
@ApiModelProperty(value = "身份证反面")
private java.lang.String imageReverseSide;
/**用户标识*/
@Excel(name = "用户标识", width = 15)
@ApiModelProperty(value = "用户标识")
private java.lang.String userId;
}
package org.jeecg.modules.hanHaiRealEnterprise.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 企业实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
@Data
@TableName("han_hai_real_enterprise")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="han_hai_real_enterprise对象", description="企业实名认证")
public class HanHaiRealEnterprise implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**法人姓名*/
@Excel(name = "法人姓名", width = 15)
@ApiModelProperty(value = "法人姓名")
private java.lang.String name;
/**法人身份证*/
@Excel(name = "法人身份证", width = 15)
@ApiModelProperty(value = "法人身份证")
private java.lang.String card;
/**营业执照*/
@Excel(name = "营业执照", width = 15)
@ApiModelProperty(value = "营业执照")
private java.lang.String tradeImage;
/**其他资质*/
@Excel(name = "其他资质", width = 15)
@ApiModelProperty(value = "其他资质")
private java.lang.String otherImage;
/**身份证正面*/
@Excel(name = "身份证正面", width = 15)
@ApiModelProperty(value = "身份证正面")
private java.lang.String imageStraight;
/**身份证反面*/
@Excel(name = "身份证反面", width = 15)
@ApiModelProperty(value = "身份证反面")
private java.lang.String imageReverseSide;
/**用户标识*/
@Excel(name = "用户标识", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "用户标识")
private java.lang.String userId;
/**审核状态*/
@Excel(name = "审核状态", width = 15)
@ApiModelProperty(value = "审核状态")
private java.lang.Integer state;
}

+ 17
- 17
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/mapper/HanHaiRealEnterpriseMapper.java View File

@ -1,17 +1,17 @@
package org.jeecg.modules.hanHaiRealEnterprise.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 企业认证
* @Author: jeecg-boot
* @Date: 2024-08-27
* @Version: V1.0
*/
public interface HanHaiRealEnterpriseMapper extends BaseMapper<HanHaiRealEnterprise> {
}
package org.jeecg.modules.hanHaiRealEnterprise.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 企业实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
public interface HanHaiRealEnterpriseMapper extends BaseMapper<HanHaiRealEnterprise> {
}

+ 4
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/mapper/xml/HanHaiRealEnterpriseMapper.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hanHaiRealEnterprise.mapper.HanHaiRealEnterpriseMapper">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hanHaiRealEnterprise.mapper.HanHaiRealEnterpriseMapper">
</mapper>

+ 14
- 14
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/service/IHanHaiRealEnterpriseService.java View File

@ -1,14 +1,14 @@
package org.jeecg.modules.hanHaiRealEnterprise.service;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 企业认证
* @Author: jeecg-boot
* @Date: 2024-08-27
* @Version: V1.0
*/
public interface IHanHaiRealEnterpriseService extends IService<HanHaiRealEnterprise> {
}
package org.jeecg.modules.hanHaiRealEnterprise.service;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 企业实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
public interface IHanHaiRealEnterpriseService extends IService<HanHaiRealEnterprise> {
}

+ 19
- 19
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/service/impl/HanHaiRealEnterpriseServiceImpl.java View File

@ -1,19 +1,19 @@
package org.jeecg.modules.hanHaiRealEnterprise.service.impl;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import org.jeecg.modules.hanHaiRealEnterprise.mapper.HanHaiRealEnterpriseMapper;
import org.jeecg.modules.hanHaiRealEnterprise.service.IHanHaiRealEnterpriseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 企业认证
* @Author: jeecg-boot
* @Date: 2024-08-27
* @Version: V1.0
*/
@Service
public class HanHaiRealEnterpriseServiceImpl extends ServiceImpl<HanHaiRealEnterpriseMapper, HanHaiRealEnterprise> implements IHanHaiRealEnterpriseService {
}
package org.jeecg.modules.hanHaiRealEnterprise.service.impl;
import org.jeecg.modules.hanHaiRealEnterprise.entity.HanHaiRealEnterprise;
import org.jeecg.modules.hanHaiRealEnterprise.mapper.HanHaiRealEnterpriseMapper;
import org.jeecg.modules.hanHaiRealEnterprise.service.IHanHaiRealEnterpriseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 企业实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
@Service
public class HanHaiRealEnterpriseServiceImpl extends ServiceImpl<HanHaiRealEnterpriseMapper, HanHaiRealEnterprise> implements IHanHaiRealEnterpriseService {
}

+ 217
- 210
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/HanHaiRealEnterpriseList.vue View File

@ -1,211 +1,218 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('企业认证表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<han-hai-real-enterprise-modal ref="modalForm" @ok="modalFormOk"></han-hai-real-enterprise-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HanHaiRealEnterpriseModal from './modules/HanHaiRealEnterpriseModal'
export default {
name: 'HanHaiRealEnterpriseList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HanHaiRealEnterpriseModal
},
data () {
return {
description: '企业认证表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'法人姓名',
align:"center",
dataIndex: 'name'
},
{
title:'法人身份证',
align:"center",
dataIndex: 'card'
},
{
title:'营业执照',
align:"center",
dataIndex: 'tradeImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'其他资质',
align:"center",
dataIndex: 'otherImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'身份证正面',
align:"center",
dataIndex: 'imageStraight',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'身份证反面',
align:"center",
dataIndex: 'imageReverseSide',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hanHaiRealEnterprise/hanHaiRealEnterprise/list",
delete: "/hanHaiRealEnterprise/hanHaiRealEnterprise/delete",
deleteBatch: "/hanHaiRealEnterprise/hanHaiRealEnterprise/deleteBatch",
exportXlsUrl: "/hanHaiRealEnterprise/hanHaiRealEnterprise/exportXls",
importExcelUrl: "hanHaiRealEnterprise/hanHaiRealEnterprise/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'法人姓名',dictCode:''})
fieldList.push({type:'string',value:'card',text:'法人身份证',dictCode:''})
fieldList.push({type:'string',value:'tradeImage',text:'营业执照',dictCode:''})
fieldList.push({type:'string',value:'otherImage',text:'其他资质',dictCode:''})
fieldList.push({type:'string',value:'imageStraight',text:'身份证正面',dictCode:''})
fieldList.push({type:'string',value:'imageReverseSide',text:'身份证反面',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户标识',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('企业实名认证')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<han-hai-real-enterprise-modal ref="modalForm" @ok="modalFormOk"></han-hai-real-enterprise-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HanHaiRealEnterpriseModal from './modules/HanHaiRealEnterpriseModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HanHaiRealEnterpriseList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HanHaiRealEnterpriseModal
},
data () {
return {
description: '企业实名认证管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'法人姓名',
align:"center",
dataIndex: 'name'
},
{
title:'法人身份证',
align:"center",
dataIndex: 'card'
},
{
title:'营业执照',
align:"center",
dataIndex: 'tradeImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'其他资质',
align:"center",
dataIndex: 'otherImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'身份证正面',
align:"center",
dataIndex: 'imageStraight',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'身份证反面',
align:"center",
dataIndex: 'imageReverseSide',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'审核状态',
align:"center",
dataIndex: 'state'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hanHaiRealEnterprise/hanHaiRealEnterprise/list",
delete: "/hanHaiRealEnterprise/hanHaiRealEnterprise/delete",
deleteBatch: "/hanHaiRealEnterprise/hanHaiRealEnterprise/deleteBatch",
exportXlsUrl: "/hanHaiRealEnterprise/hanHaiRealEnterprise/exportXls",
importExcelUrl: "hanHaiRealEnterprise/hanHaiRealEnterprise/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'法人姓名',dictCode:''})
fieldList.push({type:'string',value:'card',text:'法人身份证',dictCode:''})
fieldList.push({type:'string',value:'tradeImage',text:'营业执照',dictCode:''})
fieldList.push({type:'string',value:'otherImage',text:'其他资质',dictCode:''})
fieldList.push({type:'string',value:'imageStraight',text:'身份证正面',dictCode:''})
fieldList.push({type:'string',value:'imageReverseSide',text:'身份证反面',dictCode:''})
fieldList.push({type:'sel_search',value:'userId',text:'用户标识',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'int',value:'state',text:'审核状态',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 138
- 133
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/modules/HanHaiRealEnterpriseForm.vue View File

@ -1,134 +1,139 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="法人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入法人姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="法人身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="card">
<a-input v-model="model.card" placeholder="请输入法人身份证" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="营业执照" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tradeImage">
<j-image-upload isMultiple v-model="model.tradeImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="其他资质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="otherImage">
<j-image-upload isMultiple v-model="model.otherImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身份证正面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageStraight">
<j-image-upload isMultiple v-model="model.imageStraight" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身份证反面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageReverseSide">
<j-image-upload isMultiple v-model="model.imageReverseSide" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户标识" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HanHaiRealEnterpriseForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/hanHaiRealEnterprise/hanHaiRealEnterprise/add",
edit: "/hanHaiRealEnterprise/hanHaiRealEnterprise/edit",
queryById: "/hanHaiRealEnterprise/hanHaiRealEnterprise/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="法人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入法人姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="法人身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="card">
<a-input v-model="model.card" placeholder="请输入法人身份证" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="营业执照" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tradeImage">
<j-image-upload isMultiple v-model="model.tradeImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="其他资质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="otherImage">
<j-image-upload isMultiple v-model="model.otherImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身份证正面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageStraight">
<j-image-upload isMultiple v-model="model.imageStraight" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身份证反面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageReverseSide">
<j-image-upload isMultiple v-model="model.imageReverseSide" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<a-input-number v-model="model.state" placeholder="请输入审核状态" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HanHaiRealEnterpriseForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/hanHaiRealEnterprise/hanHaiRealEnterprise/add",
edit: "/hanHaiRealEnterprise/hanHaiRealEnterprise/edit",
queryById: "/hanHaiRealEnterprise/hanHaiRealEnterprise/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 83
- 83
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/modules/HanHaiRealEnterpriseModal.Style#Drawer.vue View File

@ -1,84 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<han-hai-real-enterprise-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></han-hai-real-enterprise-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HanHaiRealEnterpriseForm from './HanHaiRealEnterpriseForm'
export default {
name: 'HanHaiRealEnterpriseModal',
components: {
HanHaiRealEnterpriseForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<han-hai-real-enterprise-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></han-hai-real-enterprise-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HanHaiRealEnterpriseForm from './HanHaiRealEnterpriseForm'
export default {
name: 'HanHaiRealEnterpriseModal',
components: {
HanHaiRealEnterpriseForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 59
- 59
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue/modules/HanHaiRealEnterpriseModal.vue View File

@ -1,60 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<han-hai-real-enterprise-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></han-hai-real-enterprise-form>
</j-modal>
</template>
<script>
import HanHaiRealEnterpriseForm from './HanHaiRealEnterpriseForm'
export default {
name: 'HanHaiRealEnterpriseModal',
components: {
HanHaiRealEnterpriseForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<han-hai-real-enterprise-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></han-hai-real-enterprise-form>
</j-modal>
</template>
<script>
import HanHaiRealEnterpriseForm from './HanHaiRealEnterpriseForm'
export default {
name: 'HanHaiRealEnterpriseModal',
components: {
HanHaiRealEnterpriseForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 61
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/HanHaiRealEnterprise.api.ts View File

@ -1,61 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hanHaiRealEnterprise/hanHaiRealEnterprise/list',
save='/hanHaiRealEnterprise/hanHaiRealEnterprise/add',
edit='/hanHaiRealEnterprise/hanHaiRealEnterprise/edit',
deleteOne = '/hanHaiRealEnterprise/hanHaiRealEnterprise/delete',
deleteBatch = '/hanHaiRealEnterprise/hanHaiRealEnterprise/deleteBatch',
importExcel = '/hanHaiRealEnterprise/hanHaiRealEnterprise/importExcel',
exportXls = '/hanHaiRealEnterprise/hanHaiRealEnterprise/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hanHaiRealEnterprise/hanHaiRealEnterprise/list',
save='/hanHaiRealEnterprise/hanHaiRealEnterprise/add',
edit='/hanHaiRealEnterprise/hanHaiRealEnterprise/edit',
deleteOne = '/hanHaiRealEnterprise/hanHaiRealEnterprise/delete',
deleteBatch = '/hanHaiRealEnterprise/hanHaiRealEnterprise/deleteBatch',
importExcel = '/hanHaiRealEnterprise/hanHaiRealEnterprise/importExcel',
exportXls = '/hanHaiRealEnterprise/hanHaiRealEnterprise/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 108
- 95
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/HanHaiRealEnterprise.data.ts View File

@ -1,95 +1,108 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '法人姓名',
align:"center",
dataIndex: 'name'
},
{
title: '法人身份证',
align:"center",
dataIndex: 'card'
},
{
title: '营业执照',
align:"center",
dataIndex: 'tradeImage',
customRender:render.renderAvatar,
},
{
title: '其他资质',
align:"center",
dataIndex: 'otherImage',
customRender:render.renderAvatar,
},
{
title: '身份证正面',
align:"center",
dataIndex: 'imageStraight',
customRender:render.renderAvatar,
},
{
title: '身份证反面',
align:"center",
dataIndex: 'imageReverseSide',
customRender:render.renderAvatar,
},
{
title: '用户标识',
align:"center",
dataIndex: 'userId'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '法人姓名',
field: 'name',
component: 'Input',
},
{
label: '法人身份证',
field: 'card',
component: 'Input',
},
{
label: '营业执照',
field: 'tradeImage',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '其他资质',
field: 'otherImage',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '身份证正面',
field: 'imageStraight',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '身份证反面',
field: 'imageReverseSide',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '用户标识',
field: 'userId',
component: 'Input',
},
];
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '法人姓名',
align:"center",
dataIndex: 'name'
},
{
title: '法人身份证',
align:"center",
dataIndex: 'card'
},
{
title: '营业执照',
align:"center",
dataIndex: 'tradeImage',
customRender:render.renderAvatar,
},
{
title: '其他资质',
align:"center",
dataIndex: 'otherImage',
customRender:render.renderAvatar,
},
{
title: '身份证正面',
align:"center",
dataIndex: 'imageStraight',
customRender:render.renderAvatar,
},
{
title: '身份证反面',
align:"center",
dataIndex: 'imageReverseSide',
customRender:render.renderAvatar,
},
{
title: '用户标识',
align:"center",
dataIndex: 'userId_dictText'
},
{
title: '审核状态',
align:"center",
dataIndex: 'state'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '法人姓名',
field: 'name',
component: 'Input',
},
{
label: '法人身份证',
field: 'card',
component: 'Input',
},
{
label: '营业执照',
field: 'tradeImage',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '其他资质',
field: 'otherImage',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '身份证正面',
field: 'imageStraight',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '身份证反面',
field: 'imageReverseSide',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '用户标识',
field: 'userId',
component: 'JSearchSelect',
componentProps:{
dict:"han_hai_member,nick_name,id"
},
},
{
label: '审核状态',
field: 'state',
component: 'InputNumber',
},
];

+ 161
- 161
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/HanHaiRealEnterpriseList.vue View File

@ -1,162 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HanHaiRealEnterpriseModal @register="registerModal" @success="handleSuccess"></HanHaiRealEnterpriseModal>
</div>
</template>
<script lang="ts" name="hanHaiRealEnterprise-hanHaiRealEnterprise" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HanHaiRealEnterpriseModal from './components/HanHaiRealEnterpriseModal.vue'
import {columns, searchFormSchema} from './hanHaiRealEnterprise.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hanHaiRealEnterprise.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '企业认证',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"企业认证",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HanHaiRealEnterpriseModal @register="registerModal" @success="handleSuccess"></HanHaiRealEnterpriseModal>
</div>
</template>
<script lang="ts" name="hanHaiRealEnterprise-hanHaiRealEnterprise" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HanHaiRealEnterpriseModal from './components/HanHaiRealEnterpriseModal.vue'
import {columns, searchFormSchema} from './hanHaiRealEnterprise.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hanHaiRealEnterprise.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '企业实名认证',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"企业实名认证",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 57
- 57
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealEnterprise/vue3/components/HanHaiRealEnterpriseModal.vue View File

@ -1,58 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hanHaiRealEnterprise.data';
import {saveOrUpdate} from '../hanHaiRealEnterprise.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hanHaiRealEnterprise.data';
import {saveOrUpdate} from '../hanHaiRealEnterprise.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 171
- 171
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/controller/HanHaiRealNameController.java View File

@ -1,171 +1,171 @@
package org.jeecg.modules.hanHaiRealName.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import org.jeecg.modules.hanHaiRealName.service.IHanHaiRealNameService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 个人实名表
* @Author: jeecg-boot
* @Date: 2024-08-25
* @Version: V1.0
*/
@Api(tags="个人实名表")
@RestController
@RequestMapping("/hanHaiRealName/hanHaiRealName")
@Slf4j
public class HanHaiRealNameController extends JeecgController<HanHaiRealName, IHanHaiRealNameService> {
@Autowired
private IHanHaiRealNameService hanHaiRealNameService;
/**
* 分页列表查询
*
* @param hanHaiRealName
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "个人实名表-分页列表查询")
@ApiOperation(value="个人实名表-分页列表查询", notes="个人实名表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HanHaiRealName>> queryPageList(HanHaiRealName hanHaiRealName,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HanHaiRealName> queryWrapper = QueryGenerator.initQueryWrapper(hanHaiRealName, req.getParameterMap());
Page<HanHaiRealName> page = new Page<HanHaiRealName>(pageNo, pageSize);
IPage<HanHaiRealName> pageList = hanHaiRealNameService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hanHaiRealName
* @return
*/
@AutoLog(value = "个人实名表-添加")
@ApiOperation(value="个人实名表-添加", notes="个人实名表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HanHaiRealName hanHaiRealName) {
hanHaiRealNameService.save(hanHaiRealName);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hanHaiRealName
* @return
*/
@AutoLog(value = "个人实名表-编辑")
@ApiOperation(value="个人实名表-编辑", notes="个人实名表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HanHaiRealName hanHaiRealName) {
hanHaiRealNameService.updateById(hanHaiRealName);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "个人实名表-通过id删除")
@ApiOperation(value="个人实名表-通过id删除", notes="个人实名表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hanHaiRealNameService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "个人实名表-批量删除")
@ApiOperation(value="个人实名表-批量删除", notes="个人实名表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hanHaiRealNameService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "个人实名表-通过id查询")
@ApiOperation(value="个人实名表-通过id查询", notes="个人实名表-通过id查询")
@GetMapping(value = "/queryById")
public Result<HanHaiRealName> queryById(@RequestParam(name="id",required=true) String id) {
HanHaiRealName hanHaiRealName = hanHaiRealNameService.getById(id);
if(hanHaiRealName==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hanHaiRealName);
}
/**
* 导出excel
*
* @param request
* @param hanHaiRealName
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HanHaiRealName hanHaiRealName) {
return super.exportXls(request, hanHaiRealName, HanHaiRealName.class, "个人实名表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HanHaiRealName.class);
}
}
package org.jeecg.modules.hanHaiRealName.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import org.jeecg.modules.hanHaiRealName.service.IHanHaiRealNameService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 个人实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
@Api(tags="个人实名认证表")
@RestController
@RequestMapping("/hanHaiRealName/hanHaiRealName")
@Slf4j
public class HanHaiRealNameController extends JeecgController<HanHaiRealName, IHanHaiRealNameService> {
@Autowired
private IHanHaiRealNameService hanHaiRealNameService;
/**
* 分页列表查询
*
* @param hanHaiRealName
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "个人实名认证表-分页列表查询")
@ApiOperation(value="个人实名认证表-分页列表查询", notes="个人实名认证表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HanHaiRealName>> queryPageList(HanHaiRealName hanHaiRealName,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HanHaiRealName> queryWrapper = QueryGenerator.initQueryWrapper(hanHaiRealName, req.getParameterMap());
Page<HanHaiRealName> page = new Page<HanHaiRealName>(pageNo, pageSize);
IPage<HanHaiRealName> pageList = hanHaiRealNameService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hanHaiRealName
* @return
*/
@AutoLog(value = "个人实名认证表-添加")
@ApiOperation(value="个人实名认证表-添加", notes="个人实名认证表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HanHaiRealName hanHaiRealName) {
hanHaiRealNameService.save(hanHaiRealName);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hanHaiRealName
* @return
*/
@AutoLog(value = "个人实名认证表-编辑")
@ApiOperation(value="个人实名认证表-编辑", notes="个人实名认证表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HanHaiRealName hanHaiRealName) {
hanHaiRealNameService.updateById(hanHaiRealName);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "个人实名认证表-通过id删除")
@ApiOperation(value="个人实名认证表-通过id删除", notes="个人实名认证表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hanHaiRealNameService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "个人实名认证表-批量删除")
@ApiOperation(value="个人实名认证表-批量删除", notes="个人实名认证表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hanHaiRealNameService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "个人实名认证表-通过id查询")
@ApiOperation(value="个人实名认证表-通过id查询", notes="个人实名认证表-通过id查询")
@GetMapping(value = "/queryById")
public Result<HanHaiRealName> queryById(@RequestParam(name="id",required=true) String id) {
HanHaiRealName hanHaiRealName = hanHaiRealNameService.getById(id);
if(hanHaiRealName==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hanHaiRealName);
}
/**
* 导出excel
*
* @param request
* @param hanHaiRealName
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HanHaiRealName hanHaiRealName) {
return super.exportXls(request, hanHaiRealName, HanHaiRealName.class, "个人实名认证表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HanHaiRealName.class);
}
}

+ 78
- 70
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/entity/HanHaiRealName.java View File

@ -1,70 +1,78 @@
package org.jeecg.modules.hanHaiRealName.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 个人实名表
* @Author: jeecg-boot
* @Date: 2024-08-25
* @Version: V1.0
*/
@Data
@TableName("han_hai_real_name")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="han_hai_real_name对象", description="个人实名表")
public class HanHaiRealName implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**正面*/
@Excel(name = "正面", width = 15)
@ApiModelProperty(value = "正面")
private java.lang.String imageStraight;
/**反面*/
@Excel(name = "反面", width = 15)
@ApiModelProperty(value = "反面")
private java.lang.String imageReverseSide;
/**姓名*/
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private java.lang.String name;
/**证件号码*/
@Excel(name = "证件号码", width = 15)
@ApiModelProperty(value = "证件号码")
private java.lang.String card;
/**用户标识*/
@Excel(name = "用户标识", width = 15)
@ApiModelProperty(value = "用户标识")
private java.lang.String userId;
}
package org.jeecg.modules.hanHaiRealName.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 个人实名认证表
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
@Data
@TableName("han_hai_real_name")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="han_hai_real_name对象", description="个人实名认证表")
public class HanHaiRealName implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**正面*/
@Excel(name = "正面", width = 15)
@ApiModelProperty(value = "正面")
private java.lang.String imageStraight;
/**反面*/
@Excel(name = "反面", width = 15)
@ApiModelProperty(value = "反面")
private java.lang.String imageReverseSide;
/**姓名*/
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private java.lang.String name;
/**证件号码*/
@Excel(name = "证件号码", width = 15)
@ApiModelProperty(value = "证件号码")
private java.lang.String card;
/**用户标识*/
@Excel(name = "用户标识", width = 15)
@ApiModelProperty(value = "用户标识")
private java.lang.String userId;
/**审核状态*/
@Excel(name = "审核状态", width = 15)
@ApiModelProperty(value = "审核状态")
private java.lang.Integer state;
}

+ 17
- 17
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/mapper/HanHaiRealNameMapper.java View File

@ -1,17 +1,17 @@
package org.jeecg.modules.hanHaiRealName.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 个人实名表
* @Author: jeecg-boot
* @Date: 2024-08-25
* @Version: V1.0
*/
public interface HanHaiRealNameMapper extends BaseMapper<HanHaiRealName> {
}
package org.jeecg.modules.hanHaiRealName.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 个人实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
public interface HanHaiRealNameMapper extends BaseMapper<HanHaiRealName> {
}

+ 4
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/mapper/xml/HanHaiRealNameMapper.xml View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hanHaiRealName.mapper.HanHaiRealNameMapper">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hanHaiRealName.mapper.HanHaiRealNameMapper">
</mapper>

+ 14
- 14
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/service/IHanHaiRealNameService.java View File

@ -1,14 +1,14 @@
package org.jeecg.modules.hanHaiRealName.service;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 个人实名表
* @Author: jeecg-boot
* @Date: 2024-08-25
* @Version: V1.0
*/
public interface IHanHaiRealNameService extends IService<HanHaiRealName> {
}
package org.jeecg.modules.hanHaiRealName.service;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 个人实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
public interface IHanHaiRealNameService extends IService<HanHaiRealName> {
}

+ 19
- 19
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/service/impl/HanHaiRealNameServiceImpl.java View File

@ -1,19 +1,19 @@
package org.jeecg.modules.hanHaiRealName.service.impl;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import org.jeecg.modules.hanHaiRealName.mapper.HanHaiRealNameMapper;
import org.jeecg.modules.hanHaiRealName.service.IHanHaiRealNameService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 个人实名表
* @Author: jeecg-boot
* @Date: 2024-08-25
* @Version: V1.0
*/
@Service
public class HanHaiRealNameServiceImpl extends ServiceImpl<HanHaiRealNameMapper, HanHaiRealName> implements IHanHaiRealNameService {
}
package org.jeecg.modules.hanHaiRealName.service.impl;
import org.jeecg.modules.hanHaiRealName.entity.HanHaiRealName;
import org.jeecg.modules.hanHaiRealName.mapper.HanHaiRealNameMapper;
import org.jeecg.modules.hanHaiRealName.service.IHanHaiRealNameService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 个人实名认证
* @Author: jeecg-boot
* @Date: 2024-09-25
* @Version: V1.0
*/
@Service
public class HanHaiRealNameServiceImpl extends ServiceImpl<HanHaiRealNameMapper, HanHaiRealName> implements IHanHaiRealNameService {
}

+ 202
- 196
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/HanHaiRealNameList.vue View File

@ -1,197 +1,203 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('个人实名表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<han-hai-real-name-modal ref="modalForm" @ok="modalFormOk"></han-hai-real-name-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HanHaiRealNameModal from './modules/HanHaiRealNameModal'
export default {
name: 'HanHaiRealNameList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HanHaiRealNameModal
},
data () {
return {
description: '个人实名表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'正面',
align:"center",
dataIndex: 'imageStraight',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'反面',
align:"center",
dataIndex: 'imageReverseSide',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'证件号码',
align:"center",
dataIndex: 'card'
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hanHaiRealName/hanHaiRealName/list",
delete: "/hanHaiRealName/hanHaiRealName/delete",
deleteBatch: "/hanHaiRealName/hanHaiRealName/deleteBatch",
exportXlsUrl: "/hanHaiRealName/hanHaiRealName/exportXls",
importExcelUrl: "hanHaiRealName/hanHaiRealName/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'imageStraight',text:'正面',dictCode:''})
fieldList.push({type:'string',value:'imageReverseSide',text:'反面',dictCode:''})
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
fieldList.push({type:'string',value:'card',text:'证件号码',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户标识',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('个人实名认证表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<han-hai-real-name-modal ref="modalForm" @ok="modalFormOk"></han-hai-real-name-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HanHaiRealNameModal from './modules/HanHaiRealNameModal'
export default {
name: 'HanHaiRealNameList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HanHaiRealNameModal
},
data () {
return {
description: '个人实名认证表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'正面',
align:"center",
dataIndex: 'imageStraight',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'反面',
align:"center",
dataIndex: 'imageReverseSide',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'证件号码',
align:"center",
dataIndex: 'card'
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId'
},
{
title:'审核状态',
align:"center",
dataIndex: 'state'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hanHaiRealName/hanHaiRealName/list",
delete: "/hanHaiRealName/hanHaiRealName/delete",
deleteBatch: "/hanHaiRealName/hanHaiRealName/deleteBatch",
exportXlsUrl: "/hanHaiRealName/hanHaiRealName/exportXls",
importExcelUrl: "hanHaiRealName/hanHaiRealName/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'imageStraight',text:'正面',dictCode:''})
fieldList.push({type:'string',value:'imageReverseSide',text:'反面',dictCode:''})
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
fieldList.push({type:'string',value:'card',text:'证件号码',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户标识',dictCode:''})
fieldList.push({type:'int',value:'state',text:'审核状态',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 128
- 123
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/modules/HanHaiRealNameForm.vue View File

@ -1,124 +1,129 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="正面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageStraight">
<j-image-upload isMultiple v-model="model.imageStraight" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="反面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageReverseSide">
<j-image-upload isMultiple v-model="model.imageReverseSide" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="证件号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="card">
<a-input v-model="model.card" placeholder="请输入证件号码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户标识" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HanHaiRealNameForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/hanHaiRealName/hanHaiRealName/add",
edit: "/hanHaiRealName/hanHaiRealName/edit",
queryById: "/hanHaiRealName/hanHaiRealName/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="正面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageStraight">
<j-image-upload isMultiple v-model="model.imageStraight" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="反面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageReverseSide">
<j-image-upload isMultiple v-model="model.imageReverseSide" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="证件号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="card">
<a-input v-model="model.card" placeholder="请输入证件号码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户标识" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<a-input-number v-model="model.state" placeholder="请输入审核状态" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HanHaiRealNameForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/hanHaiRealName/hanHaiRealName/add",
edit: "/hanHaiRealName/hanHaiRealName/edit",
queryById: "/hanHaiRealName/hanHaiRealName/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 83
- 83
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/modules/HanHaiRealNameModal.Style#Drawer.vue View File

@ -1,84 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<han-hai-real-name-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></han-hai-real-name-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HanHaiRealNameForm from './HanHaiRealNameForm'
export default {
name: 'HanHaiRealNameModal',
components: {
HanHaiRealNameForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<han-hai-real-name-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></han-hai-real-name-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HanHaiRealNameForm from './HanHaiRealNameForm'
export default {
name: 'HanHaiRealNameModal',
components: {
HanHaiRealNameForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 59
- 59
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue/modules/HanHaiRealNameModal.vue View File

@ -1,60 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<han-hai-real-name-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></han-hai-real-name-form>
</j-modal>
</template>
<script>
import HanHaiRealNameForm from './HanHaiRealNameForm'
export default {
name: 'HanHaiRealNameModal',
components: {
HanHaiRealNameForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<han-hai-real-name-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></han-hai-real-name-form>
</j-modal>
</template>
<script>
import HanHaiRealNameForm from './HanHaiRealNameForm'
export default {
name: 'HanHaiRealNameModal',
components: {
HanHaiRealNameForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 61
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/HanHaiRealName.api.ts View File

@ -1,61 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hanHaiRealName/hanHaiRealName/list',
save='/hanHaiRealName/hanHaiRealName/add',
edit='/hanHaiRealName/hanHaiRealName/edit',
deleteOne = '/hanHaiRealName/hanHaiRealName/delete',
deleteBatch = '/hanHaiRealName/hanHaiRealName/deleteBatch',
importExcel = '/hanHaiRealName/hanHaiRealName/importExcel',
exportXls = '/hanHaiRealName/hanHaiRealName/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hanHaiRealName/hanHaiRealName/list',
save='/hanHaiRealName/hanHaiRealName/add',
edit='/hanHaiRealName/hanHaiRealName/edit',
deleteOne = '/hanHaiRealName/hanHaiRealName/delete',
deleteBatch = '/hanHaiRealName/hanHaiRealName/deleteBatch',
importExcel = '/hanHaiRealName/hanHaiRealName/importExcel',
exportXls = '/hanHaiRealName/hanHaiRealName/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 79
- 69
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/HanHaiRealName.data.ts View File

@ -1,69 +1,79 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '正面',
align:"center",
dataIndex: 'imageStraight',
customRender:render.renderAvatar,
},
{
title: '反面',
align:"center",
dataIndex: 'imageReverseSide',
customRender:render.renderAvatar,
},
{
title: '姓名',
align:"center",
dataIndex: 'name'
},
{
title: '证件号码',
align:"center",
dataIndex: 'card'
},
{
title: '用户标识',
align:"center",
dataIndex: 'userId'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '正面',
field: 'imageStraight',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '反面',
field: 'imageReverseSide',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '姓名',
field: 'name',
component: 'Input',
},
{
label: '证件号码',
field: 'card',
component: 'Input',
},
{
label: '用户标识',
field: 'userId',
component: 'Input',
},
];
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '正面',
align:"center",
dataIndex: 'imageStraight',
customRender:render.renderAvatar,
},
{
title: '反面',
align:"center",
dataIndex: 'imageReverseSide',
customRender:render.renderAvatar,
},
{
title: '姓名',
align:"center",
dataIndex: 'name'
},
{
title: '证件号码',
align:"center",
dataIndex: 'card'
},
{
title: '用户标识',
align:"center",
dataIndex: 'userId'
},
{
title: '审核状态',
align:"center",
dataIndex: 'state'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '正面',
field: 'imageStraight',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '反面',
field: 'imageReverseSide',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '姓名',
field: 'name',
component: 'Input',
},
{
label: '证件号码',
field: 'card',
component: 'Input',
},
{
label: '用户标识',
field: 'userId',
component: 'Input',
},
{
label: '审核状态',
field: 'state',
component: 'InputNumber',
},
];

+ 161
- 161
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/HanHaiRealNameList.vue View File

@ -1,162 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HanHaiRealNameModal @register="registerModal" @success="handleSuccess"></HanHaiRealNameModal>
</div>
</template>
<script lang="ts" name="hanHaiRealName-hanHaiRealName" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HanHaiRealNameModal from './components/HanHaiRealNameModal.vue'
import {columns, searchFormSchema} from './hanHaiRealName.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hanHaiRealName.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '个人实名表',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"个人实名表",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HanHaiRealNameModal @register="registerModal" @success="handleSuccess"></HanHaiRealNameModal>
</div>
</template>
<script lang="ts" name="hanHaiRealName-hanHaiRealName" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HanHaiRealNameModal from './components/HanHaiRealNameModal.vue'
import {columns, searchFormSchema} from './hanHaiRealName.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hanHaiRealName.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '个人实名认证表',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"个人实名认证表",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 57
- 57
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiRealName/vue3/components/HanHaiRealNameModal.vue View File

@ -1,58 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hanHaiRealName.data';
import {saveOrUpdate} from '../hanHaiRealName.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hanHaiRealName.data';
import {saveOrUpdate} from '../hanHaiRealName.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 2
- 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/noticeapicontroller/InfoApiController.java View File

@ -147,7 +147,7 @@ public class InfoApiController {
//个人认证提交
@ApiOperation(value="小程序-个人认证提交", notes="小程序-个人认证提交")
@GetMapping("/submitCertification")
@PostMapping("/submitCertification")
public Result<?> submitCertification(@RequestHeader("X-Access-Token") String token, HanHaiRealNameBean hanHaiRealNameBean)
{
return infoApiService.submitCertification(token,hanHaiRealNameBean);
@ -157,7 +157,7 @@ public class InfoApiController {
//企业认证提交
@ApiOperation(value="小程序-企业认证提交", notes="小程序-企业认证提交")
@GetMapping("/submitCompanyCertification")
@PostMapping("/submitCompanyCertification")
public Result<?> submitCompanyCertification(@RequestHeader("X-Access-Token") String token, HanHaiRealEnterpriseBean hanHaiRealEnterpriseBean)
{
return infoApiService.submitCompanyCertification(token,hanHaiRealEnterpriseBean);


+ 4
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiBean/ActorSetPageBean.java View File

@ -7,6 +7,10 @@ import lombok.Data;
public class ActorSetPageBean {
/**搜索条件*/
@ApiModelProperty(value = "搜索条件" )
private String title;
/**显示条数*/
@ApiModelProperty(value = "显示条数" )


+ 3
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiBean/PromotionPageBean.java View File

@ -6,7 +6,9 @@ import lombok.Data;
@Data
public class PromotionPageBean {
/**搜索条件*/
@ApiModelProperty(value = "搜索条件" )
private String title;
/**显示条数*/
@ApiModelProperty(value = "显示条数" )


+ 12
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/IndexApiServiceImpl.java View File

@ -256,7 +256,19 @@ public class IndexApiServiceImpl implements IndexApiService {
public Result<?> getActorSetPage(ActorSetPageBean bean){
Page<AtActorCollection> page = new Page<AtActorCollection>(bean.getPageNo(), bean.getPageSize());
Page<AtActorCollection> pageList = atActorCollectionService
.lambdaQuery()
.orderByDesc(AtActorCollection::getCreateTime)
.page(page);
//判断title是否为空
if (StringUtils.isNotBlank(bean.getTitle())){
pageList = atActorCollectionService
.lambdaQuery()
.like(AtActorCollection::getTitle,bean.getTitle())
.orderByDesc(AtActorCollection::getCreateTime)
.page(page);
}
return Result.OK("演员集列表", pageList);
}


+ 35
- 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/InfoApiServiceImpl.java View File

@ -125,7 +125,7 @@ public class InfoApiServiceImpl implements InfoApiService {
map.put("todayMoney",100);
map.put("userMoney",100);
map.put("userSumMoney",100);
map.put("money",88);
map.put("money",hanHaiMember.getPrice());
return Result.OK("查询成功", map);
}
@ -214,6 +214,15 @@ public class InfoApiServiceImpl implements InfoApiService {
public Result<?> submitCertification(String token, HanHaiRealNameBean hanHaiRealNameBean){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//根据用户标识查询是否有认证信息
HanHaiRealName one = hanHaiRealNameService.lambdaQuery()
.eq(HanHaiRealName::getUserId, hanHaiMember.getId())
.one();
if(null != one){
return Result.OK("您已提交过实名认证,请勿重复提交!");
}
String imageStraight = hanHaiRealNameBean.getImageStraight();
String imageReverseSide = hanHaiRealNameBean.getImageReverseSide();
String name = hanHaiRealNameBean.getName();
@ -242,6 +251,7 @@ public class InfoApiServiceImpl implements InfoApiService {
}
haiRealName.setUserId(hanHaiMember.getId());
haiRealName.setCard(card);
boolean result = hanHaiRealNameService.save(haiRealName);
@ -279,6 +289,14 @@ public class InfoApiServiceImpl implements InfoApiService {
public Result<?> submitCompanyCertification(String token, HanHaiRealEnterpriseBean hanHaiRealEnterpriseBean){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//根据用户信息查询是否认证
HanHaiRealEnterprise one = hanHaiRealEnterpriseService.lambdaQuery()
.eq(HanHaiRealEnterprise::getUserId, hanHaiMember.getId())
.one();
if(null != one){
return Result.OK("您已提交过企业认证,请勿重复提交!");
}
String imageStraight = hanHaiRealEnterpriseBean.getImageStraight();
String imageReverseSide = hanHaiRealEnterpriseBean.getImageReverseSide();
String name = hanHaiRealEnterpriseBean.getName();
@ -319,6 +337,7 @@ public class InfoApiServiceImpl implements InfoApiService {
}
haiRealEnterprise.setUserId(hanHaiMember.getId());
haiRealEnterprise.setCard(card);
Boolean result = hanHaiRealEnterpriseService.save(haiRealEnterprise);
@ -363,11 +382,11 @@ public class InfoApiServiceImpl implements InfoApiService {
@Override
public Result<?> getCompanyCertification(String token){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
List<HanHaiRealEnterprise> list = hanHaiRealEnterpriseService
HanHaiRealEnterprise one = hanHaiRealEnterpriseService
.lambdaQuery()
.eq(HanHaiRealEnterprise::getUserId, hanHaiMember.getId())
.list();
return Result.OK("企业认证信息", list);
.one();
return Result.OK("企业认证信息", one);
}
//获取我的发布列表
@ -421,6 +440,18 @@ public class InfoApiServiceImpl implements InfoApiService {
.orderByDesc(AtOrder::getCreateTime)
.eq(AtOrder::getUserId,hanHaiMember.getId())
.page(page);
//判断title是否为空
if (StringUtils.isNotBlank(bean.getTitle())){
page1 = atOrderService.lambdaQuery()
.like(AtOrder::getName,bean.getTitle())
.orderByDesc(AtOrder::getCreateTime)
.eq(AtOrder::getUserId,hanHaiMember.getId())
.page(page);
}
return Result.OK("推广记录",page1);
}


Loading…
Cancel
Save