位置管理

This commit is contained in:
cwchen 2025-12-24 10:22:05 +08:00
parent 25699d4f21
commit 5656ab0bd5
4 changed files with 90 additions and 544 deletions

View File

@ -453,6 +453,18 @@ export default {
item.dateType.length === 2
) {
delete queryParams[item.f_model]
// :00 :59
if (item.f_type === 'dateTimeRange') {
const [startTimeKey, endTimeKey] = item.dateType
// :00
if (queryParams[startTimeKey] && queryParams[startTimeKey].length === 16) {
queryParams[startTimeKey] = queryParams[startTimeKey] + ':00'
}
// :59
if (queryParams[endTimeKey] && queryParams[endTimeKey].length === 16) {
queryParams[endTimeKey] = queryParams[endTimeKey] + ':59'
}
}
}
})
// console.log(

View File

@ -162,540 +162,6 @@ export const dynamicRoutes = [
}
]
},
{
path: '/enterpriseAdd',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:enterprise:add'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/enterprise/components/EnterpriseForm'),
name: 'EnterpriseForm',
meta: { title: '新增主体信息', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/enterpriseEdit',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:enterprise:edit'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/enterprise/components/EnterpriseForm'),
name: 'EnterpriseEditForm',
meta: { title: '编辑主体信息', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/enterpriseDetail',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:enterprise:detail'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/enterprise/components/EnterpriseDetail'),
name: 'EnterpriseDetail',
meta: { title: '主体信息详情', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/enterpriseKnowledge',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:enterprise:EnterpriseKnowledge'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/enterprise/components/EnterpriseKnowledge'),
name: 'EnterpriseKnowledge',
meta: { title: '企业知识库', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/personnel',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:personnel:list'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/personnel/index'),
name: 'Personnel',
meta: { title: '人员库', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/personnelAdd/',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:personnel:add'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/personnel/components/PersonnelForm'),
name: 'PersonnelForm',
meta: { title: '新增人员', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/personnelEdit/',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:personnel:edit'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/personnel/components/PersonnelForm'),
name: 'PersonnelEditForm',
meta: { title: '编辑人员', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/personnelDetail/',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:personnel:detail'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/personnel/components/PersonnelDetail'),
name: 'PersonnelDetail',
meta: { title: '人员详情', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/technical',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:technical:list'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/technical/index'),
name: 'Technical',
meta: { title: '技术方案库', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/technicalAdd',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:technical:add'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalForm'),
name: 'TechnicalAdd',
meta: { title: '新增方案', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/technicalEdit',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:technical:edit'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalForm'),
name: 'TechnicalEdit',
meta: { title: '修改方案', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/technicalDetail',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:technical:detail'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalDetail'),
name: 'TechnicalDetail',
meta: { title: '方案详情', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/tools',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:tool:list'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/tool/index'),
name: 'Tools',
meta: { title: '工器具库', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
},
{
path: '/performanceList',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:performance:list'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/performance/index'),
name: 'Performance',
meta: { title: '业绩库列表', activeMenu: '/enterpriseLibrary/performance', noCache: true }
}
]
},
{
path: '/performanceForm',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:performance:add'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/performance/components/PerformanceForm'),
name: 'PerformanceForm',
meta: { title: '新增业绩库', activeMenu: '/enterpriseLibrary/performance', noCache: true }
}
]
},
{
path: '/performanceDetail',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:performance:detail'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/performance/components/PerformanceDetail'),
name: 'PerformanceDetail',
meta: { title: '业绩库详情', activeMenu: '/enterpriseLibrary/performance', noCache: true }
}
]
},
{
path: '/performanceEdit',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:performance:edit'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/performance/components/PerformanceEdit'),
name: 'PerformanceEdit',
meta: { title: '编辑业绩库', activeMenu: '/enterpriseLibrary/performance', noCache: true }
}
]
},
{
path: '/financeList',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:finance:list'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/finance/index'),
name: 'Financial',
meta: { title: '财务库列表', activeMenu: '/enterpriseLibrary/performance', noCache: true }
}
]
},
{
path: '/financeForm',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:finance:add'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/finance/components/FinanceForm'),
name: 'FinanceForm',
meta: { title: '新增财务库', activeMenu: '/enterpriseLibrary/finance', noCache: true }
}
]
},
{
path: '/financeEdit',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:finance:edit'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/finance/components/FinanceForm'),
name: 'FinanceEdit',
meta: { title: '编辑财务库', activeMenu: '/enterpriseLibrary/finance', noCache: true }
}
]
},
{
path: '/financeForm',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:finance:detail'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/finance/components/FinanceDetail'),
name: 'FinanceDetail',
meta: { title: '财务库详情', activeMenu: '/enterpriseLibrary/finance', noCache: true }
}
]
},
{
path: '/qualificationList',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:qualification:list'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/qualification/index'),
name: 'Qualification',
meta: { title: '资质库列表', activeMenu: '/enterpriseLibrary/qualification', noCache: true }
}
]
},
{
path: '/qualificationForm',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:qualification:add'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/qualification/components/QualificationForm'),
name: 'QualificationForm',
meta: { title: '新增资质库', activeMenu: '/enterpriseLibrary/qualification', noCache: true }
}
]
},
{
path: '/rejectionItemList',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:rejectionItem:list'],
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/rejectionItem/index'),
name: 'Rejection',
meta: { title: '废标项列表', activeMenu: '/enterpriseLibrary/rejection', noCache: true }
}
]
},
{
path: '/analysisDetail',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/analysis/components/AnalysisDetail'),
name: 'AnalysisDetail',
meta: { title: '项目解析结果', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/analysisBidDetail',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/analysis/components/AnalysisBidDetail'),
name: 'AnalysisBidDetail',
meta: { title: '项目标段', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/analysisBid',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/analysis/components/AnalysisBidIndex'),
name: 'AnalysisBidIndex',
meta: { title: '标段信息', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/analysisBidView',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/analysis/components/AnalysisBidView'),
name: 'AnalysisBidView',
meta: { title: '解析结果', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/testOnlyOffice',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/analysis/components/TestOnlyOffice'),
name: 'TestOnlyOffice',
meta: { title: '预览文档', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/documentSearch',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/common/DocumentSearch'),
name: 'DocumentSearch',
meta: { title: '文档搜索', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/documentSearchWord',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/common/DocumentSearchWord'),
name: 'DocumentSearchWord',
meta: { title: 'Word文档搜索', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/documentExcel',
component: Layout,
hidden: true,
permissions: ['enterpriseLibrary:analysis:detail'],
children: [
{
path: 'index',
component: () => import('@/views/common/DocumentExcel'),
name: 'DocumentExcel',
meta: { title: 'Excel文档查看', activeMenu: '/analysis', noCache: true }
}
]
},
{
path: '/analysisLabel',
component: Layout,
hidden: true,
permissions: ['analysis:label:list'],
children: [
{
path: 'index',
component: () => import('@/views/template/analysisLabel/index'),
name: 'AnalysisLabel',
meta: { title: '解析结果标签', activeMenu: '/template', noCache: true }
}
]
},
{
path: '/analysisLabelItem',
component: Layout,
hidden: true,
permissions: ['analysis:labelItem:list'],
children: [
{
path: 'index',
component: () => import('@/views/template/analysisLabel/components/AnalysisLabelItem'),
name: 'AnalysisLabelItem',
meta: { title: '解析结果标签项', activeMenu: '/template', noCache: true }
}
]
},
{
path: '/templateInfo',
component: Layout,
hidden: true,
permissions: ['template:info:list'],
children: [
{
path: 'index',
component: () => import('@/views/template/templateInfo/index'),
name: 'TemplateInfo',
meta: { title: '模板信息', activeMenu: '/template', noCache: true }
}
]
},
{
path: '/templateForm',
component: Layout,
hidden: true,
permissions: ['template:info:add'],
children: [
{
path: 'index',
component: () => import('@/views/template/templateInfo/components/TemplateForm'),
name: 'TemplateForm',
meta: { title: '新增模板', activeMenu: '/template', noCache: true }
}
]
},
{
path: '/analysisRule',
component: Layout,
hidden: true,
permissions: ['analysis:rule:list'],
children: [
{
path: 'index',
component: () => import('@/views/template/templateInfo/components/AnalysisRule'),
name: 'AnalysisRule',
meta: { title: '解析规则', activeMenu: '/template', noCache: true }
}
]
},
{
path: '/templateHistory',
component: Layout,
hidden: true,
permissions: ['analysis:rule:list'],
children: [
{
path: 'index',
component: () => import('@/views/template/templateInfo/components/TemplateHistory'),
name: 'TemplateHistory',
meta: { title: '模板历史详情', activeMenu: '/template', noCache: true }
}
]
},
]
// 防止连续点击多次路由报错

View File

@ -32,7 +32,7 @@
<div class="table-container">
<TableModel :formLabel="[]" :showOperation="false" :showRightTools="false" ref="dataRecognitionTableRef"
:columnsList="columnsList" :request-api="dataRecognitionListAPI" :handleColWidth="250"
:showSearch="false">
:showSearch="false" :sendParams="queryParams">
<template slot="tableTitle">
<h3>数据列表</h3>
</template>
@ -66,6 +66,27 @@ export default {
TableModel,
},
data() {
//
const getDefaultTimeRange = () => {
const now = new Date()
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)
const todayEnd = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59)
const formatTime = (date) => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}
return {
startTime: formatTime(todayStart),
endTime: formatTime(todayEnd)
}
}
const defaultTime = getDefaultTimeRange()
return {
showSearch: true,
columnsList,
@ -81,10 +102,8 @@ export default {
{ label: '新能源车流量(PCU/h)', value: '0' },
],
queryParams: {
pageNum: 1,
pageSize: 10,
startTime: '',
endTime: '',
startTime: defaultTime.startTime,
endTime: defaultTime.endTime,
},
}
},
@ -112,8 +131,8 @@ export default {
/** 初始化默认时间范围 */
initDefaultTimeRange() {
const now = new Date()
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0)
const todayEnd = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59)
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)
const todayEnd = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59)
const formatTime = (date) => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
@ -122,10 +141,20 @@ export default {
const minutes = String(date.getMinutes()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}`
}
const formatTimeWithSeconds = (date) => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}
const defaultTimeRange = [formatTime(todayStart), formatTime(todayEnd)]
this.timeRange = defaultTimeRange
this.queryParams.startTime = defaultTimeRange[0]
this.queryParams.endTime = defaultTimeRange[1]
// queryParams 使
this.queryParams.startTime = formatTimeWithSeconds(todayStart)
this.queryParams.endTime = formatTimeWithSeconds(todayEnd)
},
/** 获取统计数据 */
@ -135,6 +164,13 @@ export default {
startTime: this.queryParams.startTime,
endTime: this.queryParams.endTime,
}
// :00 :59
if (params.startTime && params.startTime.length === 16) {
params.startTime = params.startTime + ':00'
}
if (params.endTime && params.endTime.length === 16) {
params.endTime = params.endTime + ':59'
}
const res = await dataRecognitionDetailAPI(params)
if (res.code === 200 && res.data) {
// statistics
@ -179,7 +215,15 @@ export default {
this.getStatistics()
if (this.$refs.dataRecognitionTableRef) {
//
Object.assign(this.$refs.dataRecognitionTableRef.queryParams, this.queryParams)
const queryParams = { ...this.queryParams }
// :00 :59
if (queryParams.startTime && queryParams.startTime.length === 16) {
queryParams.startTime = queryParams.startTime + ':00'
}
if (queryParams.endTime && queryParams.endTime.length === 16) {
queryParams.endTime = queryParams.endTime + ':59'
}
Object.assign(this.$refs.dataRecognitionTableRef.queryParams, queryParams)
this.$refs.dataRecognitionTableRef.queryParams.pageNum = 1
this.$refs.dataRecognitionTableRef.getTableList()
}
@ -202,6 +246,13 @@ export default {
async handleExport() {
try {
const params = { ...this.queryParams }
// :00 :59
if (params.startTime && params.startTime.length === 16) {
params.startTime = params.startTime + ':00'
}
if (params.endTime && params.endTime.length === 16) {
params.endTime = params.endTime + ':59'
}
const res = await exportDataRecognitionAPI(params)
if (res.code === 200) {
//

View File

@ -169,6 +169,14 @@ export default {
try {
this.loading = true
const params = { ...this.queryParams }
// :00 :59
if (params.startTime && params.startTime.length === 16) {
params.startTime = params.startTime + ':00'
}
if (params.endTime && params.endTime.length === 16) {
params.endTime = params.endTime + ':59'
}
const res = await imageRecognitionListAPI(params)
if (res.code === 200) {
@ -232,6 +240,15 @@ export default {
try {
this.loading = true
const params = { ...this.queryParams }
// :00 :59
if (params.startTime && params.startTime.length === 16) {
params.startTime = params.startTime + ':00'
}
if (params.endTime && params.endTime.length === 16) {
params.endTime = params.endTime + ':59'
}
const res = await exportImageRecognitionAPI(params)
if (res.code === 200) {
//