From 2d143a6f555532d6305dd376e160207c1715922d Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 3 Nov 2025 15:36:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9B=E6=A0=87=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/analysis/analysis.js | 46 +++++++ src/components/TableModel2/index.vue | 22 +++- src/views/analysis/config.js | 38 ++++++ src/views/analysis/index.vue | 190 +++++++++++++++++++++++++++ 4 files changed, 291 insertions(+), 5 deletions(-) create mode 100644 src/api/analysis/analysis.js create mode 100644 src/views/analysis/config.js create mode 100644 src/views/analysis/index.vue diff --git a/src/api/analysis/analysis.js b/src/api/analysis/analysis.js new file mode 100644 index 0000000..2f5c1d6 --- /dev/null +++ b/src/api/analysis/analysis.js @@ -0,0 +1,46 @@ +import request from '@/utils/request' + +// 工器具库->查询列表 +export function listAPI(params) { + return request({ + url: '/smartBid/mainDatabase/tool/getList', + method: 'GET', + params + }) +} + +/* 工器具库->新增工器具 */ +export function addDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/tool/addData', + method: 'POST', + data + }) +} + +/* 工器具库->修改工器具 */ +export function editDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/tool/editData', + method: 'POST', + data + }) +} + +/* 工器具库->删除工器具 */ +export function delDataAPI(data) { + return request({ + url: '/smartBid/mainDatabase/tool/delData', + method: 'POST', + data + }) +} + +/* 工器具库->查询详情 */ +export function getDetailDataAPI(params) { + return request({ + url: '/smartBid/mainDatabase/tool/detailData', + method: 'GET', + params + }) +} \ No newline at end of file diff --git a/src/components/TableModel2/index.vue b/src/components/TableModel2/index.vue index fa4135f..4e5ee99 100644 --- a/src/components/TableModel2/index.vue +++ b/src/components/TableModel2/index.vue @@ -353,6 +353,12 @@ export default { const params = { ...this.queryParams } const queryParams = JSON.parse(JSON.stringify(params)) delete queryParams.time // 剔除无关参数 + // 删除日期范围选择器绑定的临时数组字段(如 openTime),保留实际使用的两个字段(如 openStartTime, openEndTime) + this.formLabel.forEach((item) => { + if (item.f_type === 'dateRange' && item.dateType && item.dateType.length === 2) { + delete queryParams[item.f_model] + } + }) // console.log( // `%c🔍 列表查询入参 %c`, // 'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;', @@ -496,11 +502,17 @@ export default { } } } else { - const [_1, _2] = type - const [_time1, _time2] = e - if (e.length > 0) { - this.queryParams[_1] = _time1 - this.queryParams[_2] = _time2 + if (type && type.length === 2) { + const [_1, _2] = type + if (e && e.length > 0) { + const [_time1, _time2] = e + this.queryParams[_1] = _time1 + this.queryParams[_2] = _time2 + } else { + // 清空日期范围时,同时清空两个字段 + this.queryParams[_1] = '' + this.queryParams[_2] = '' + } } } }, diff --git a/src/views/analysis/config.js b/src/views/analysis/config.js new file mode 100644 index 0000000..3ff18d5 --- /dev/null +++ b/src/views/analysis/config.js @@ -0,0 +1,38 @@ +export const formLabel = [ + { + isShow: false, // 是否展示label + f_type: 'ipt', + f_label: '项目名称', + f_model: 'proName', + f_max: 32, + f_width: '250px', + }, + { + isShow: false, // 是否展示label + f_type: 'ipt', + f_label: '招标人', + f_model: 'personName', + f_max: 32, + f_width: '250px', + }, + { + isShow: false, // 是否展示label + f_type: 'dateRange', + f_label: '开标时间', + f_model: 'openTime', + f_width: '350px', + dateType: ['openStartTime', 'openEndTime'], // 开始时间和结束时间字段名 + }, +] + +export const columnsList = [ + { t_props: 'toolName', t_label: '模板名称' }, + { t_props: 'model', t_label: '项目名称' }, + { t_props: 'unit', t_label: '项目编号' }, + { t_props: 'technicalParameters', t_label: '招标人' }, + { t_props: 'mainFunction', t_label: '代理机构' }, + { t_props: 'mainFunction', t_label: '开标时间' }, + { t_props: 'mainFunction', t_label: '开标方式' }, + { t_props: 'mainFunction', t_label: '解析状态' }, + { t_props: 'mainFunction', t_label: '创建时间' }, +] \ No newline at end of file diff --git a/src/views/analysis/index.vue b/src/views/analysis/index.vue new file mode 100644 index 0000000..7b15c50 --- /dev/null +++ b/src/views/analysis/index.vue @@ -0,0 +1,190 @@ + + + +