diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/law-enforcer.ts b/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/law-enforcer.ts
index b46a5a3b..92517a05 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/law-enforcer.ts
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/law-enforcer.ts
@@ -33,6 +33,8 @@ export interface LawEnforcerListQuery {
districtName?: string; // 所属区名称
bureauDeptName?: string; // 所属领域/单位名称
enforcementTime?: string; // 过滤时间(如 "2026" / "2026-Q3" / "2026-10" )
+ beginTime?: string; // 开始时间 YYYY-MM-DD(年/季/月/自定义区间)
+ endTime?: string; // 结束时间 YYYY-MM-DD
orderByColumn?: string;
isAsc?: string;
}
@@ -42,10 +44,12 @@ export const listLawEnforcer = (params: LawEnforcerListQuery): AxiosPromise<{ ro
return request({ url: `${BASE_URL}/list`, method: 'get', params });
};
-/** 执法人员详情查询参数:lawEnforcerId + enforcementTime + 分页字段 */
+/** 执法人员详情查询参数:lawEnforcerId + 时间区间 + 分页字段 */
export interface LawEnforcerDetailQuery {
lawEnforcerId: string | number;
enforcementTime?: string;
+ beginTime?: string;
+ endTime?: string;
pageNum?: number;
pageSize?: number;
}
@@ -55,10 +59,12 @@ export const listLawEnforcerDetails = (params: LawEnforcerDetailQuery): AxiosPro
return request({ url: `${BASE_URL}/details`, method: 'get', params });
};
-/** 执法人员列表导出参数:lawEnforcer + enforcementTime */
+/** 执法人员列表导出参数:lawEnforcer + 时间区间 */
export interface LawEnforcerExportQuery {
lawEnforcer?: string;
enforcementTime?: string;
+ beginTime?: string;
+ endTime?: string;
}
/** 执法人员列表导出:web/supervision/report/lawEnfOfficer/export */
@@ -66,10 +72,12 @@ export const exportLawEnforcer = (params: LawEnforcerExportQuery): AxiosPromise<
return request({ url: `${BASE_URL}/export`, method: 'post', params, responseType: 'blob' });
};
-/** 执法人员详情导出参数:lawEnforcerId + enforcementTime */
+/** 执法人员详情导出参数:lawEnforcerId + 时间区间 */
export interface LawEnforcerDetailExportQuery {
lawEnforcerId: string | number;
enforcementTime?: string;
+ beginTime?: string;
+ endTime?: string;
}
/** 执法人员详情导出:web/supervision/report/lawEnfOfficer/exportDetails */
diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/scan-data-situation.ts b/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/scan-data-situation.ts
index f66aae3f..8c187b9f 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/scan-data-situation.ts
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/scan-data-situation.ts
@@ -59,6 +59,8 @@ export interface ScanAreaQuery extends ScanTimeParams {
pageSize?: number;
districtCode?: string;
districtName?: string;
+ orderByColumn?: string;
+ isAsc?: string;
}
/** 领域查询参数 */
diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/high-frequency/components/FreqPane.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/high-frequency/components/FreqPane.vue
index d85b2442..9ea15e46 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/high-frequency/components/FreqPane.vue
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/high-frequency/components/FreqPane.vue
@@ -38,7 +38,7 @@ const disableCurrentAndFutureMonth = (date: Date) => {
/** 年份选项(近 5 年) */
const yearOptions = (() => {
const curr = now.getFullYear();
- return Array.from({ length: 5 }, (_, i) => String(curr - i));
+ return Array.from({ length: 3 }, (_, i) => String(curr - i));
})();
// ======================== 字典 ========================
diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/inspection-registration/components/StatPane.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/inspection-registration/components/StatPane.vue
index 7e494208..b9f76d32 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/inspection-registration/components/StatPane.vue
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/inspection-registration/components/StatPane.vue
@@ -37,7 +37,7 @@ const disableCurrentAndFutureMonth = (date: Date) => {
/** 年份选项(近 5 年) */
const yearOptions = (() => {
const curr = now.getFullYear();
- return Array.from({ length: 5 }, (_, i) => String(curr - i));
+ return Array.from({ length: 3 }, (_, i) => String(curr - i));
})();
// ======================== 所属区 / 领域字典 ========================
diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/key-enterprise/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/key-enterprise/index.vue
index 68110191..3ff918e5 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/key-enterprise/index.vue
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/key-enterprise/index.vue
@@ -37,7 +37,7 @@ const disableCurrentAndFutureMonth = (date: Date) => {
/** 年份选项(近 5 年) */
const yearOptions = (() => {
const curr = now.getFullYear();
- return Array.from({ length: 5 }, (_, i) => String(curr - i));
+ return Array.from({ length: 3 }, (_, i) => String(curr - i));
})();
// ======================== 区域/街道字典 ========================
diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-district/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-district/index.vue
index e2ca906d..8f3cefd9 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-district/index.vue
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-district/index.vue
@@ -25,7 +25,9 @@ const queryParams = reactive({
dateType: undefined as string | undefined,
dateSearch: undefined as string | undefined,
beginTime: undefined as string | undefined,
- endTime: undefined as string | undefined
+ endTime: undefined as string | undefined,
+ orderByColumn: '' as string,
+ isAsc: '' as string
});
// 时段模式:year | quarter | month | custom
@@ -171,7 +173,9 @@ const getList = async () => {
...buildTimeParams(),
pageNum: currentPage.value,
pageSize: pageSize.value,
- ...currentDistrict()
+ ...currentDistrict(),
+ orderByColumn: queryParams.orderByColumn || undefined,
+ isAsc: queryParams.isAsc || undefined
});
tableData.value = (res as any)?.rows || [];
total.value = (res as any)?.total || 0;
@@ -193,6 +197,8 @@ const handleReset = () => {
queryParams.dateSearch = undefined;
queryParams.beginTime = undefined;
queryParams.endTime = undefined;
+ queryParams.orderByColumn = '';
+ queryParams.isAsc = '';
timeMode.value = 'year';
selectedYear.value = String(new Date().getFullYear());
selectedQuarter.value = Math.ceil((new Date().getMonth() + 1) / 3);
@@ -227,6 +233,22 @@ const handleSelectionChange = (selection: DistrictRow[]) => {
selectedRows.value = selection;
};
+/** 可排序列白名单(与后端 SQL 白名单保持一致) */
+const SORTABLE_PROPS = ['xzzfslpm', 'fxzzfslpm'];
+
+/** 列排序(服务端排序:orderByColumn + isAsc),仅白名单内的列生效 */
+const handleSortChange = (sortObj: { prop: string; order: 'ascending' | 'descending' | null }) => {
+ if (sortObj.prop && SORTABLE_PROPS.includes(sortObj.prop) && sortObj.order) {
+ queryParams.orderByColumn = sortObj.prop;
+ queryParams.isAsc = sortObj.order === 'ascending' ? 'asc' : 'desc';
+ } else {
+ queryParams.orderByColumn = '';
+ queryParams.isAsc = '';
+ }
+ currentPage.value = 1;
+ getList();
+};
+
/** 序号:跨页累加 */
const indexMethod = (index: number) => (currentPage.value - 1) * pageSize.value + index + 1;
@@ -408,16 +430,17 @@ onUnmounted(() => {
style="width: 100%"
:height="tableHeight"
@selection-change="handleSelectionChange"
+ @sort-change="handleSortChange"
>
-
+
-
+
diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue
index 4b083e99..9eaf71c4 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue
@@ -19,18 +19,18 @@ const queryParams = reactive({
lawEnforcer: '' as string, // 执法人员关键字(接口参数名)
area: undefined as string | undefined,
field: undefined as string | undefined,
- enforcementTime: `${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}-01`,
orderByColumn: '' as string,
isAsc: '' as string
});
-// 时段模式:year | quarter | month
+// 时段模式:year | quarter | month | custom(与 scan-domain 保持一致)
const timeMode = ref('month');
const selectedYear = ref(String(new Date().getFullYear()));
const selectedQuarter = ref(Math.ceil((new Date().getMonth() + 1) / 3));
const selectedMonth = ref(
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}`
);
+const customRange = ref([]); // 自定义时段 [beginTime, endTime]
// 季度选项
const quarterOptions = [
@@ -46,31 +46,43 @@ const yearOptions = (() => {
return Array.from({ length: 5 }, (_, i) => String(curr - i));
})();
-/** 同步 enforcementTime(按当前时段模式拼值) */
-const syncEnforcementTime = () => {
+/**
+ * 时段 → beginTime/endTime(与 scan-domain 保持一致)
+ * 后端 enforcementTime 为 Date,年/季度无法用单值表达,统一改用日期区间过滤
+ */
+const buildTimeParams = () => {
if (timeMode.value === 'year') {
- queryParams.enforcementTime = selectedYear.value;
- } else if (timeMode.value === 'quarter') {
- queryParams.enforcementTime = `${selectedYear.value}-Q${selectedQuarter.value}`;
- } else if (timeMode.value === 'month') {
- // 月度模式固定拼 01 日:YYYY-MM-01
- queryParams.enforcementTime = selectedMonth.value ? `${selectedMonth.value}-01` : '';
+ const year = selectedYear.value;
+ return { beginTime: `${year}-01-01`, endTime: `${year}-12-31` };
}
-};
-
-/** 时段模式变更 */
-const handleTimeModeChange = () => {
- if (timeMode.value === 'month' && !selectedMonth.value) {
- const n = new Date();
- selectedMonth.value = `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, '0')}`;
+ if (timeMode.value === 'quarter') {
+ const year = selectedYear.value;
+ const startMonth = (selectedQuarter.value - 1) * 3 + 1;
+ const endMonth = selectedQuarter.value * 3;
+ const endDay = new Date(Number(year), endMonth, 0).getDate();
+ return {
+ beginTime: `${year}-${String(startMonth).padStart(2, '0')}-01`,
+ endTime: `${year}-${String(endMonth).padStart(2, '0')}-${String(endDay).padStart(2, '0')}`
+ };
+ }
+ if (timeMode.value === 'custom') {
+ if (!customRange.value || customRange.value.length !== 2) {
+ return { beginTime: undefined, endTime: undefined };
+ }
+ return { beginTime: customRange.value[0], endTime: customRange.value[1] };
+ }
+ // 月度:未选月份则不按时间过滤
+ if (!selectedMonth.value) {
+ return { beginTime: undefined, endTime: undefined };
}
- syncEnforcementTime();
+ const [year, month] = selectedMonth.value.split('-');
+ const endDay = new Date(Number(year), Number(month), 0).getDate();
+ return {
+ beginTime: `${year}-${month}-01`,
+ endTime: `${year}-${month}-${String(endDay).padStart(2, '0')}`
+ };
};
-const handleYearChange = () => syncEnforcementTime();
-const handleQuarterChange = () => syncEnforcementTime();
-const handleMonthChange = () => syncEnforcementTime();
-
// ======================== 字典 ========================
const areaOptions = ref([]);
const fieldOptions = ref([]);
@@ -116,6 +128,7 @@ const getList = async () => {
const domain = fieldOptions.value.find((i) => i.domainId === field);
const res = await listLawEnforcer({
...rest,
+ ...buildTimeParams(),
districtName: area,
bureauDeptName: domain?.domainName
});
@@ -146,7 +159,7 @@ const handleReset = () => {
selectedYear.value = String(n.getFullYear());
selectedQuarter.value = Math.ceil((n.getMonth() + 1) / 3);
selectedMonth.value = `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, '0')}`;
- syncEnforcementTime();
+ customRange.value = [];
getList();
};
@@ -154,7 +167,7 @@ const handleExport = async () => {
try {
const res = await exportLawEnforcer({
lawEnforcer: queryParams.lawEnforcer,
- enforcementTime: queryParams.enforcementTime
+ ...buildTimeParams()
});
const blob = new Blob([res as any], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
@@ -202,7 +215,7 @@ const getDetailList = async () => {
if (!detailEnforcer.value?.lawEnforcerId) return;
const res = await listLawEnforcerDetails({
lawEnforcerId: detailEnforcer.value.lawEnforcerId,
- enforcementTime: queryParams.enforcementTime,
+ ...buildTimeParams(),
pageNum: detailPage.value,
pageSize: detailPageSize.value
});
@@ -242,7 +255,7 @@ const handleDetailExport = async () => {
try {
const res = await exportLawEnforcerDetails({
lawEnforcerId: detailEnforcer.value.lawEnforcerId,
- enforcementTime: queryParams.enforcementTime
+ ...buildTimeParams()
});
const blob = new Blob([res as any], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
@@ -263,7 +276,6 @@ const handleDetailExport = async () => {
onMounted(() => {
loadAreaDict();
loadFieldDict();
- syncEnforcementTime();
getList();
nextTick(() => calcTableHeight());
window.addEventListener('resize', calcTableHeight);
@@ -310,22 +322,23 @@ onUnmounted(() => {
-
-
+
+
+
+
-
+
-
+
-
+
@@ -336,7 +349,17 @@ onUnmounted(() => {
placeholder="选择月份"
value-format="YYYY-MM"
style="width: 150px"
- @change="handleMonthChange"
+ />
+
+
+
diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue
index 56deffa5..7ef21e6b 100644
--- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue
+++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue
@@ -1,5 +1,5 @@