招标解析

This commit is contained in:
cwchen 2025-11-03 15:36:35 +08:00
parent 8d2eedeaf4
commit 2d143a6f55
4 changed files with 291 additions and 5 deletions

View File

@ -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
})
}

View File

@ -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] = ''
}
}
}
},

View File

@ -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: '创建时间' },
]

View File

@ -0,0 +1,190 @@
<template>
<!-- 招标解析 -->
<el-card class="analysis-container">
<div class="table-container">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="false" ref="analysisTableRef"
:columnsList="columnsList" :request-api="listAPI">
<template slot="tableTitle">
<h3>数据列表</h3>
</template>
<template slot="tableActions">
<el-button @click="handleModelExport" v-hasPermi="['enterpriseLibrary:tool:add']"
class="add-btn">导入模板下载</el-button>
<el-button @click="handleBathchImport" v-hasPermi="['enterpriseLibrary:tool:import']"
class="add-btn">批量导入</el-button>
<el-button @click="handleAdd" v-hasPermi="['enterpriseLibrary:tool:add']" class="add-btn"><i
class="el-icon-plus"></i> 新增工器具</el-button>
</template>
<template slot="deptName" slot-scope="{ data }">
<span>{{ data.dept.deptName || '--' }}</span>
</template>
<template slot="handle" slot-scope="{ data }">
<el-button type="text" v-hasPermi="['enterpriseLibrary:tool:detail']" class="action-btn"
@click="handleDetail(data)">
查看
</el-button>
<el-button type="text" v-hasPermi="['enterpriseLibrary:tool:edit']" class="action-btn"
style="color: #EAA819;" @click="handleUpdate(data)">
编辑
</el-button>
<el-button type="text" v-hasPermi="['enterpriseLibrary:tool:del']" class="action-btn"
style="color: #DB3E29;" @click="handleDelete(data)">
删除
</el-button>
</template>
</TableModel>
</div>
</el-card>
</template>
<script>
import TableModel from '@/components/TableModel2'
import { columnsList, formLabel } from './config'
import { listAPI, delDataAPI } from '@/api/analysis/analysis'
import { encryptWithSM4, decryptWithSM4 } from '@/utils/sm'
import { downloadFileWithLoading } from '@/utils/download'
export default {
name: 'Tool',
components: {
TableModel,
},
data() {
return {
formLabel,
columnsList,
listAPI,
}
},
created() {
},
methods: {
//
handleBack() {
const obj = {
path: "/enterpriseKnowledge/index",
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
}
}
this.$tab.closeOpenPage(obj)
},
/** 新增按钮操作 */
handleAdd() {
this.title = "新增工器具";
this.isAdd = 'add';
this.row = { enterpriseId: this.enterpriseId };
this.isflag = true;
},
/** 修改操作 */
handleUpdate(row) {
this.title = "修改工器具";
this.isAdd = 'edit';
this.row = row;
this.isflag = true;
},
/* 查看操作 */
handleDetail(row) {
this.title = "查看详情";
this.isAdd = 'detail';
this.row = row;
this.isflag = true;
},
//
handleModelExport() {
downloadFileWithLoading(
'smartBid/commonDownload/downLoadToolModel',
'工器具导入模板.xlsx',
'正在下载模板,请稍候...'
)
},
//
handleBathchImport() {
this.importExcelDialogVisible = true;
},
handleImportSuccess() {
this.handleQuery();
},
handleImportClose() {
this.handleQuery();
},
closeDialog() {
this.isflag = false;
},
/* 搜索操作 */
handleQuery() {
this.$refs.analysisTableRef.getTableList()
},
/** 删除操作 */
handleDelete(row) {
this.$confirm(`确定要删除"${row.toolName}"吗?删除后将无法恢复!`, '操作提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true,
customClass: 'delete-confirm-dialog'
}).then(() => {
delDataAPI(
{
toolId: row.toolId,
enterpriseId: this.enterpriseId
}
).then(res => {
if (res.code === 200) {
this.$message.success('删除成功');
this.handleQuery();
} else {
this.$message.error(res.msg || '删除失败');
}
}).catch(error => {
console.error('删除失败:', error);
});
})
},
},
}
</script>
<style scoped lang="scss">
.analysis-container {
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}
::v-deep .table-card{
height: calc(100vh - 230px) !important;
}
.add-btn {
width: 121px;
height: 36px;
background: #1F72EA;
box-shadow: 0px 4px 8px 0px rgba(51, 135, 255, 0.5);
border-radius: 4px 4px 4px 4px;
color: #fff;
border: none;
font-size: 14px;
transition: all 0.3s;
&:hover {
background: #4A8BFF;
box-shadow: 0px 6px 12px 0px rgba(51, 135, 255, 0.6);
}
}
.action-btn {
margin-right: 8px;
&:last-child {
margin-right: 0;
}
}
</style>