Browse Source

代码重构

dev-V1.0.1
庄锐波 5 months ago
parent
commit
7ea97fccf7
  1. 12
      ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enterprise/AppEnforcementRegistrationController.java
  2. 61
      ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/EnforcementRegistration.java
  3. 9
      ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/EnforcementRegistrationBo.java
  4. 28
      ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/EnforcementRegistrationVo.java
  5. 9
      ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEnforcementRegistrationService.java
  6. 194
      ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EnforcementRegistrationServiceImpl.java
  7. 2
      zdxt-web-client/zdxt-enforcement-code-app/src/api/enterprise/index.js
  8. 12
      zdxt-web-client/zdxt-enforcement-code-app/src/router/enterprise-app/ent-main-router.js
  9. 414
      zdxt-web-client/zdxt-enforcement-code-app/src/views/enterprise/enforcementRegistrationList.vue
  10. 6
      zdxt-web-client/zdxt-enforcement-code-app/src/views/enterprise/enterpriseHomeV2.vue

12
ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/app/enterprise/AppEnforcementRegistrationController.java

@ -38,7 +38,7 @@ public class AppEnforcementRegistrationController extends BaseController {
private final IEnforcementRegistrationService enforcementRegistrationService;
/**
* 查询企业端-执法登记记录列表
* 查询企业端-执法登记记录列表基础分页
*/
//@SaCheckPermission("enforcementcode:registration:list")
@GetMapping("/list")
@ -46,4 +46,14 @@ public class AppEnforcementRegistrationController extends BaseController {
return enforcementRegistrationService.queryPageList(bo, pageQuery);
}
/**
* 查询企业端-执法登记记录列表含投诉标记字典翻译超时天数计算执法人员格式化
* 前端企业端执法登记列表页面使用此接口
*/
@GetMapping("/getEnterpriseEnforcementRegistrationList")
public TableDataInfo<EnforcementRegistrationVo> getEnterpriseEnforcementRegistrationList(
EnforcementRegistrationBo bo, PageQuery pageQuery) {
return enforcementRegistrationService.queryEnterprisePageList(bo, pageQuery);
}
}

61
ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/EnforcementRegistration.java

@ -16,9 +16,8 @@ import java.io.Serial;
* @date 2026-04-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("enforcement_registration")
public class EnforcementRegistration extends BaseEntity {
public class EnforcementRegistration {
@Serial
private static final long serialVersionUID = 1L;
@ -125,12 +124,12 @@ public class EnforcementRegistration extends BaseEntity {
private Long reslut;
/**
*
*
*/
private String userId;
/**
*
*
*/
private String deptId;
@ -160,67 +159,67 @@ public class EnforcementRegistration extends BaseEntity {
private Long isSubmit;
/**
*
*
*/
private String enforce;
/**
*
*
*/
private String uniteCheck;
/**
*
*
*/
private String lawEnforcementItemText;
/**
*
*
*/
private String lawField;
/**
*
*
*/
private String checkCategory;
/**
*
*
*/
private String checkCss;
/**
*
*
*/
private String enforceReason;
/**
*
*
*/
private String bureauDeptId;
/**
*
*
*/
private String bureauDeptName;
/**
*
*
*/
private String lawEnforcementBasisText;
/**
*
*
*/
private Long isEvaluate;
/**
*
*
*/
private String lawId;
/**
*
*
*/
private String lawText;
@ -279,5 +278,33 @@ public class EnforcementRegistration extends BaseEntity {
*/
private Long isRealUnion;
/**
* 创建部门
*/
@TableField(fill = FieldFill.INSERT)
private String createDept;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}

9
ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/bo/EnforcementRegistrationBo.java

@ -280,5 +280,14 @@ public class EnforcementRegistrationBo extends BaseEntity {
*/
private Long isRealUnion;
/**
* 日期类型筛选: 1=本月, 2=本季, 3=本年
*/
private Integer dateType;
/**
* 指定月份筛选, 格式: "YYYY-MM"
*/
private String dateSearch;
}

28
ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/EnforcementRegistrationVo.java

@ -13,6 +13,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@ -337,5 +338,32 @@ public class EnforcementRegistrationVo implements Serializable {
@ExcelProperty(value = "是否真联合执法(0:未联合; 1:已经联合)")
private Long isRealUnion;
// ======== 以下为显示用扩展字段(非数据库字段)========
/**
* 执法类别文本字典翻译
*/
private String lawEnforceCategoryText;
/**
* 是否投诉标记: 0=, 1=
*/
private Integer comOrOpi;
/**
* 距今天数执法时间到今天的天数差
*/
private Long outTimeDayNum;
/**
* 执法人员1展示文本姓名+执法证号
*/
private String lawEnforcerDisplay;
/**
* 其他执法人员展示列表姓名+执法证号
*/
private List<String> lawEnforcer2List;
}

9
ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IEnforcementRegistrationService.java

@ -33,6 +33,15 @@ public interface IEnforcementRegistrationService {
*/
TableDataInfo<EnforcementRegistrationVo> queryPageList(EnforcementRegistrationBo bo, PageQuery pageQuery);
/**
* 企业端-分页查询执法登记记录列表含投诉标记字典翻译超时计算等
*
* @param bo 查询条件
* @param pageQuery 分页参数
* @return 企业端-执法登记记录分页列表
*/
TableDataInfo<EnforcementRegistrationVo> queryEnterprisePageList(EnforcementRegistrationBo bo, PageQuery pageQuery);
/**
* 查询符合条件的企业端-执法登记记录列表
*

194
ruoyi-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EnforcementRegistrationServiceImpl.java

@ -1,5 +1,7 @@
package com.zdxt.enforcementcode.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -9,16 +11,25 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.system.domain.SysUser;
import org.dromara.system.domain.vo.SysDictDataVo;
import org.dromara.system.mapper.SysUserMapper;
import org.dromara.system.service.ISysDictTypeService;
import org.springframework.stereotype.Service;
import com.zdxt.enforcementcode.domain.EnterpriseComplaint;
import com.zdxt.enforcementcode.domain.bo.EnforcementRegistrationBo;
import com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo;
import com.zdxt.enforcementcode.domain.EnforcementRegistration;
import com.zdxt.enforcementcode.mapper.EnforcementRegistrationMapper;
import com.zdxt.enforcementcode.mapper.EnterpriseComplaintMapper;
import com.zdxt.enforcementcode.service.IEnforcementRegistrationService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
/**
* 企业端-执法登记记录Service业务层处理
@ -32,6 +43,9 @@ import java.util.Collection;
public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrationService {
private final EnforcementRegistrationMapper baseMapper;
private final EnterpriseComplaintMapper complaintMapper;
private final ISysDictTypeService dictTypeService;
private final SysUserMapper sysUserMapper;
/**
* 查询企业端-执法登记记录
@ -126,6 +140,180 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
return lqw;
}
/**
* 企业端-分页查询执法登记记录列表
* 包含投诉标记字典翻译超时天数计算执法人员格式化
* 批量查询避免循环中嵌套查询
*/
@Override
public TableDataInfo<EnforcementRegistrationVo> queryEnterprisePageList(EnforcementRegistrationBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<EnforcementRegistration> lqw = buildEnterpriseQueryWrapper(bo);
Page<EnforcementRegistrationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
List<EnforcementRegistrationVo> records = result.getRecords();
if (CollUtil.isEmpty(records)) {
return TableDataInfo.build(result);
}
// ===== 1. 批量查询字典数据(执法类别 law_enforce_category) =====
Map<String, String> dictMap = new HashMap<>();
List<SysDictDataVo> dictList = dictTypeService.selectDictDataByType("law_enforce_category");
if (CollUtil.isNotEmpty(dictList)) {
dictMap = dictList.stream().collect(Collectors.toMap(SysDictDataVo::getDictValue, SysDictDataVo::getDictLabel, (a, b) -> a));
}
// ===== 2. 批量查询投诉信息 =====
List<String> allRegIds = records.stream().map(EnforcementRegistrationVo::getId).collect(Collectors.toList());
// 一次查出所有相关投诉记录的 relId
Set<String> complainedIds = new HashSet<>();
if (CollUtil.isNotEmpty(allRegIds)) {
List<EnterpriseComplaint> complaints = complaintMapper.selectList(
new LambdaQueryWrapper<EnterpriseComplaint>()
.select(EnterpriseComplaint::getRelId)
.in(EnterpriseComplaint::getRelId, allRegIds)
.eq(EnterpriseComplaint::getComOrOpi, 1)
);
complainedIds = complaints.stream()
.map(EnterpriseComplaint::getRelId)
.collect(Collectors.toSet());
}
// ===== 3. 批量查询执法人员信息 =====
// 收集所有用户ID(执法人员1 + 执法人员2)
Set<Long> allUserIds = new HashSet<>();
for (EnforcementRegistrationVo vo : records) {
if (StringUtils.isNotBlank(vo.getLawEnforcerId())) {
try { allUserIds.add(Convert.toLong(vo.getLawEnforcerId())); } catch (Exception ignored) {}
}
if (StringUtils.isNotBlank(vo.getLawEnforcerIdTwo())) {
for (String idStr : vo.getLawEnforcerIdTwo().split(",")) {
try { allUserIds.add(Convert.toLong(idStr.trim())); } catch (Exception ignored) {}
}
}
}
// 一次批量查询所有用户
Map<Long, SysUser> userMap = new HashMap<>();
if (CollUtil.isNotEmpty(allUserIds)) {
List<SysUser> users = sysUserMapper.selectList(
new LambdaQueryWrapper<SysUser>()
.select(SysUser::getUserId, SysUser::getUserName, SysUser::getLawCertificateNum, SysUser::getPhonenumber)
.in(SysUser::getUserId, allUserIds)
);
userMap = users.stream().collect(Collectors.toMap(SysUser::getUserId, u -> u, (a, b) -> a));
}
// ===== 4. 循环组装显示字段(无嵌套查询) =====
for (EnforcementRegistrationVo vo : records) {
// 4.1 执法类别文本
if (StringUtils.isNotBlank(vo.getLawEnforceCategory()) && dictMap.containsKey(vo.getLawEnforceCategory())) {
vo.setLawEnforceCategoryText(dictMap.get(vo.getLawEnforceCategory()));
}
// 4.2 投诉标记
vo.setComOrOpi(complainedIds.contains(vo.getId()) ? 1 : 0);
// 4.3 超时天数
if (vo.getEnforcementTime() != null) {
Instant instant = vo.getEnforcementTime().toInstant();
LocalDate startDate = instant.atZone(ZoneId.systemDefault()).toLocalDate();
vo.setOutTimeDayNum(ChronoUnit.DAYS.between(startDate, LocalDate.now()));
}
// 4.4 执法人员1格式化展示
if (StringUtils.isNotBlank(vo.getLawEnforcerId())) {
try {
SysUser user = userMap.get(Convert.toLong(vo.getLawEnforcerId()));
if (user != null) {
vo.setLawEnforcerDisplay(formatEnforcerDisplay(user));
}
} catch (Exception ignored) {}
}
// 4.5 执法人员2列表格式化展示
if (StringUtils.isNotBlank(vo.getLawEnforcerIdTwo())) {
List<String> lawTwoList = new ArrayList<>();
for (String idStr : vo.getLawEnforcerIdTwo().split(",")) {
try {
SysUser user = userMap.get(Convert.toLong(idStr.trim()));
if (user != null) {
lawTwoList.add(formatEnforcerDisplay(user));
}
} catch (Exception ignored) {}
}
vo.setLawEnforcer2List(lawTwoList);
}
}
return TableDataInfo.build(result);
}
/**
* 格式化执法人员展示文本姓名 + 执法证号无证号则展示脱敏手机号
*/
private String formatEnforcerDisplay(SysUser user) {
String certNum = user.getLawCertificateNum();
if (StringUtils.isNotBlank(certNum)) {
return user.getUserName() + " " + certNum;
}
// 无执法证号时展示脱敏手机号
String phone = user.getPhonenumber();
if (StringUtils.isNotBlank(phone) && phone.length() >= 7) {
phone = phone.substring(0, 3) + "****" + phone.substring(phone.length() - 4);
}
return user.getUserName() + " " + (phone != null ? phone : "");
}
/**
* 企业端查询条件构建器
* : 企业号过滤已提交过滤日期过滤关键字模糊搜索
*/
private LambdaQueryWrapper<EnforcementRegistration> buildEnterpriseQueryWrapper(EnforcementRegistrationBo bo) {
LambdaQueryWrapper<EnforcementRegistration> lqw = Wrappers.lambdaQuery();
// 只查已提交的记录
lqw.eq(EnforcementRegistration::getIsSubmit, 1);
// 企业统一信用号过滤
lqw.eq(StringUtils.isNotBlank(bo.getEnterpriseNumber()), EnforcementRegistration::getEnterpriseNumber, bo.getEnterpriseNumber());
// 关键字模糊搜索(搜索执法事项、执法单位名称、执法人员姓名等)
String searchValue = bo.getSearchValue();
if (StringUtils.isNotBlank(searchValue)) {
lqw.and(w -> w
.like(EnforcementRegistration::getLawEnforcementItemText, searchValue)
.or().like(EnforcementRegistration::getBureauDeptName, searchValue)
.or().like(EnforcementRegistration::getLawEnforcer, searchValue)
.or().like(EnforcementRegistration::getEnterpriseName, searchValue)
);
}
// 日期类型筛选
if (bo.getDateType() != null) {
LocalDate now = LocalDate.now();
LocalDate startDate;
switch (bo.getDateType()) {
case 1: // 本月
startDate = now.withDayOfMonth(1);
break;
case 2: // 本季
int quarterStartMonth = (now.getMonthValue() - 1) / 3 * 3 + 1;
startDate = now.withMonth(quarterStartMonth).withDayOfMonth(1);
break;
case 3: // 本年
startDate = now.withDayOfYear(1);
break;
default:
startDate = null;
}
if (startDate != null) {
lqw.ge(EnforcementRegistration::getEnforcementTime, java.sql.Date.valueOf(startDate));
}
}
// 指定月份筛选 格式: "YYYY-MM"
if (StringUtils.isNotBlank(bo.getDateSearch())) {
String yearMonth = bo.getDateSearch();
lqw.apply("DATE_FORMAT(enforcement_time, '%Y-%m') = {0}", yearMonth);
}
// 默认按执法时间倒序
lqw.orderByDesc(EnforcementRegistration::getEnforcementTime);
return lqw;
}
/**
* 新增企业端-执法登记记录
*

2
zdxt-web-client/zdxt-enforcement-code-app/src/api/enterprise/index.js

@ -18,7 +18,7 @@ export const getEnterpriseMerchantAuthorization = (params, success, error) => _g
//查询企业二维码
export const queryEnterpriseInformationQrCode = (enterpriseNumber, success, error) => _get(enterpriseAppBaseUrl+"/enterpriseInfo/getQrCode/"+enterpriseNumber,null,success,error)
//查询企业执法登记列表-企业端修改联合检查查询语句
//查询企业执法登记列表-企业端(含投诉标记、字典翻译、超时计算等)
export const getEnterpriseEnforcementRegistrationList = (params, success, error) => _get(enterpriseAppBaseUrl+"/enforcement_registration/getEnterpriseEnforcementRegistrationList",params,success,error)
//深i企登录-暂时没有环境调通

12
zdxt-web-client/zdxt-enforcement-code-app/src/router/enterprise-app/ent-main-router.js

@ -24,12 +24,12 @@ const routes = [
name: "enterpriseQrCode",
component: () => import("@/views/enterprise/qrCode.vue"),
},
// // 执法监督码
// {
// path: "/enterprise/registrationList",
// name: "registrationList",
// component: () => import("@/views/enterprise/registrationList.vue"),
// }
// 执法监督码
{
path: "/enterprise/enforcementRegistrationList",
name: "enforcementRegistrationList",
component: () => import("@/views/enterprise/enforcementRegistrationList.vue"),
}
];
export {routes};

414
zdxt-web-client/zdxt-enforcement-code-app/src/views/enterprise/enforcementRegistrationList.vue

@ -1,11 +1,417 @@
<script setup>
<template>
<div class="registration-list-page">
<!-- 搜索栏 -->
<van-search
v-model="searchText"
show-action
placeholder="请输入关键字查询"
clearable
clear-trigger="always"
@clear="onClear"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</script>
<!-- 日期快捷筛选按钮 -->
<div class="search-button-list">
<van-button plain hairline :class="dateType === null ? 'search-btn active' : 'search-btn'"
@click="searchDateType(null)" round type="primary" size="mini">全部</van-button>
<van-button plain hairline :class="dateType === 1 ? 'search-btn active' : 'search-btn'"
@click="searchDateType(1)" round type="primary" size="mini">本月</van-button>
<van-button plain hairline :class="dateType === 2 ? 'search-btn active' : 'search-btn'"
@click="searchDateType(2)" round type="primary" size="mini">本季</van-button>
<van-button plain hairline :class="dateType === 3 ? 'search-btn active' : 'search-btn'"
@click="searchDateType(3)" round type="primary" size="mini">本年</van-button>
<van-button plain hairline :class="dateType === 9 ? 'search-btn active' : 'search-btn'"
@click="openDatePicker" round type="primary" size="mini">筛选</van-button>
</div>
<template>
<!-- 指定月份显示 -->
<div class="search-date-display" v-show="dateShow">
<span class="date-label" @click="openDatePicker">{{ dateSearchDisplay }}</span>
</div>
<!-- 月份选择器弹出层 -->
<van-popup v-model:show="showDatePicker" position="bottom">
<van-date-picker
title="选择月度"
v-model="currentDate"
:min-date="minDate"
:max-date="maxDate"
:columns-type="['year', 'month']"
@confirm="onDateConfirm"
@cancel="showDatePicker = false"
/>
</van-popup>
<!-- 可滚动列表区域 -->
<div class="list-container">
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
:offset="50"
>
<!-- 空状态 -->
<van-empty v-if="finished && list.length === 0" description="暂无数据" />
<!-- 列表项 -->
<div class="card-item" v-for="item in list" :key="item.id">
<div class="card-header">
<span class="card-time">执法时间{{ formatDate(item.enforcementTime) }}</span>
<span class="joint-mark" v-if="item.hasUnion === 1"></span>
</div>
<div class="card-divider"></div>
<div class="card-body" @click="toDetailView(item.id)">
<div class="card-title">{{ item.lawEnforcementItemText || '-' }}</div>
<div class="card-row">
<span class="card-label">执法单位</span>
<span>{{ item.bureauDeptName || '-' }}</span>
</div>
<div class="card-row">
<span class="card-label">执法人员</span>
<span class="enforcer-block">
<span>{{ item.lawEnforcerDisplay || item.lawEnforcer || '-' }}</span>
<span v-for="(name, idx) in (item.lawEnforcer2List || [])" :key="idx">{{ name }}</span>
</span>
</div>
<div class="card-row">
<span class="card-label">执法类别</span>
<span>{{ item.lawEnforceCategoryText || '-' }}</span>
</div>
</div>
<!-- 评价按钮 -->
<div class="card-actions" v-if="item.outTimeDayNum != null && item.outTimeDayNum <= 5 && item.isEvaluate === 0">
<a @click.stop="toEvaluate(item.id, item.lawEnforcementItemText)">
<van-icon name="flower-o" /> 评价
</a>
</div>
</div>
</van-list>
</van-pull-refresh>
</div>
</div>
</template>
<style scoped lang="less">
<script setup name="enforcementRegistrationList">
import { getEnterpriseEnforcementRegistrationList } from '@/api/enterprise';
import { showToast } from 'vant';
import 'vant/es/toast/style';
const { useCommon } = $globalStore;
const router = useRouter();
// ========== ==========
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const searchText = ref('');
// ========== ==========
const pageNum = ref(1);
const pageSize = ref(10);
// ========== ==========
const dateType = ref(null);
const dateSearch = ref(null);
const dateSearchDisplay = ref('');
const dateShow = ref(false);
const showDatePicker = ref(false);
const currentDate = ref(['2026', '01']);
const minDate = new Date(2020, 0, 1);
const maxDate = new Date(2030, 11, 31);
// ========== ==========
const formatDate = (dateStr) => {
if (!dateStr) return '-';
const d = new Date(dateStr);
const y = d.getFullYear();
const m = String(d.getMonth() + 1).padStart(2, '0');
const day = String(d.getDate()).padStart(2, '0');
return `${y}-${m}-${day}`;
};
// ========== ==========
const fetchList = () => {
const params = {
pageNum: pageNum.value,
pageSize: pageSize.value,
enterpriseNumber: useCommon.enterpriseNumber,
};
//
if (searchText.value) {
params.searchValue = searchText.value;
}
//
if (dateType.value != null && dateType.value !== 9) {
params.dateType = dateType.value;
}
//
if (dateSearch.value) {
params.dateSearch = dateSearch.value;
}
getEnterpriseEnforcementRegistrationList(params, (res) => {
if (res.code === 200) {
const rows = res.rows || [];
const total = res.total || 0;
if (refreshing.value) {
list.value = rows;
refreshing.value = false;
} else {
list.value = [...list.value, ...rows];
}
if (list.value.length >= total) {
finished.value = true;
}
loading.value = false;
} else {
loading.value = false;
finished.value = true;
showToast(res.msg || '加载失败');
}
}, () => {
loading.value = false;
finished.value = true;
refreshing.value = false;
showToast('网络请求失败');
});
};
// ========== ==========
const onLoad = () => {
if (refreshing.value) return;
fetchList();
pageNum.value++;
};
// ========== ==========
const onRefresh = () => {
pageNum.value = 1;
finished.value = false;
loading.value = true;
fetchList();
pageNum.value++;
};
// ========== ==========
const onSearch = () => {
pageNum.value = 1;
list.value = [];
finished.value = false;
loading.value = true;
fetchList();
pageNum.value++;
};
// ========== ==========
const onClear = () => {
searchText.value = '';
onSearch();
};
// ========== ==========
const searchDateType = (val) => {
dateType.value = val;
dateSearch.value = null;
dateShow.value = false;
onSearch();
};
// ========== ==========
const openDatePicker = () => {
dateType.value = 9;
showDatePicker.value = true;
};
// ========== ==========
const onDateConfirm = (value) => {
const year = value.selectedValues[0];
const month = value.selectedValues[1];
dateSearchDisplay.value = year + '/' + month;
dateSearch.value = year + '-' + month;
dateType.value = 9;
dateShow.value = true;
showDatePicker.value = false;
onSearch();
};
// ========== ==========
const toDetailView = (id) => {
router.push({
path: '/registrationDetail',
query: { id }
});
};
// ========== ==========
const toEvaluate = (id, checkItem) => {
router.push({
path: '/evaluate',
query: {
isSelect: false,
id,
lawEnforcementItemText: checkItem,
}
});
};
</script>
<style lang="less" scoped>
.registration-list-page {
display: flex;
flex-direction: column;
height: 100%;
background-color: #ebf3fb;
.list-container {
flex: 1;
overflow-y: auto;
padding: 0 0.27rem;
}
}
/* ===== 搜索按钮行 ===== */
.search-button-list {
display: flex;
flex-direction: row;
padding: 0.2rem 0.27rem 0;
gap: 0.15rem;
.search-btn {
flex: 1;
height: 0.7rem;
background: #ebebeb;
border-color: #ebebeb;
color: #999;
font-size: 0.3rem;
}
.search-btn.active {
background-color: #d9e6fd;
border-color: #75a5fb;
color: #1367fe;
}
}
/* ===== 日期显示 ===== */
.search-date-display {
padding: 0.15rem 0.27rem 0;
.date-label {
color: #c1bfbf;
font-size: 0.4rem;
}
}
/* ===== 卡片样式 ===== */
.card-item {
background: #fff;
border-radius: 0.2rem;
margin-top: 0.27rem;
padding: 0.2rem 0.3rem;
position: relative;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
.card-time {
color: #c1bfbf;
font-size: 0.32rem;
}
}
.joint-mark {
display: inline-block;
width: 0.5rem;
height: 0.5rem;
background: #2d94fa;
border-radius: 50%;
color: #fff;
font-size: 0.3rem;
line-height: 0.5rem;
text-align: center;
}
.card-divider {
height: 1px;
background: #f4f5f6;
margin: 0.15rem 0;
}
.card-body {
.card-title {
font-size: 0.4rem;
font-weight: bold;
color: #000;
margin-bottom: 0.15rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-row {
display: flex;
font-size: 0.35rem;
color: #666;
line-height: 1.6;
.card-label {
color: #323233;
white-space: nowrap;
}
}
}
.enforcer-block {
display: flex;
flex-direction: column;
}
.card-actions {
display: flex;
justify-content: flex-end;
border-top: 1px solid #f4f5f6;
margin-top: 0.2rem;
padding-top: 0.15rem;
a {
font-size: 0.35rem;
color: #1367fe;
white-space: nowrap;
}
a i {
margin-right: 0.1rem;
font-size: 0.4rem;
}
}
/* ===== Vant 搜索框样式覆盖 ===== */
:deep(.van-search__content) {
height: 0.9rem;
border: 1px solid #ececec;
border-radius: 0.15rem 0 0 0.15rem;
}
:deep(.van-search__action) {
margin: 0 3% 0 0;
width: 10%;
height: 0.9rem;
background: #1367fe;
border: 0.01rem solid #1367fe;
border-radius: 0 0.15rem 0.15rem 0;
color: #fff;
text-align: center;
line-height: 0.9rem;
}
</style>

6
zdxt-web-client/zdxt-enforcement-code-app/src/views/enterprise/enterpriseHomeV2.vue

@ -75,7 +75,7 @@
<!-- 双卡片行 -->
<div class="card-row">
<!-- 历史执法信息 -->
<div class="info-card" @click="toRegistrationListView">
<div class="info-card" @click="toEnforcementRegistrationListView">
<h4>历史执法信息</h4>
<div class="card-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@ -151,9 +151,9 @@ const showEnterpriseQRCode = async () => {
});
};
const toRegistrationListView = async () => {
const toEnforcementRegistrationListView = async () => {
router.push({
path: "/enterprise/registrationList",
path: "/enterprise/enforcementRegistrationList",
});
}
const toDemoList = () => {

Loading…
Cancel
Save