Merge branch 'main' of http://192.168.0.75:3000/bonus/smart-bid-web
This commit is contained in:
commit
5c416d7559
|
|
@ -1,4 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
import { data } from 'jquery'
|
||||
|
||||
// 招标解析->查询列表
|
||||
export function listAPI(params) {
|
||||
|
|
@ -18,37 +19,47 @@ export function addDataAPI(data) {
|
|||
})
|
||||
}
|
||||
|
||||
/* 工器具库->修改工器具 */
|
||||
export function editDataAPI(data) {
|
||||
// 招标解析->查看标段列表
|
||||
export function getBidListAPI(params) {
|
||||
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',
|
||||
url: '/smartBid/analysis/getBidList',
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 招标解析->查看项目详情
|
||||
export function getProDetailAPI(params) {
|
||||
return request({
|
||||
url: '/smartBid/analysis/getProDetail',
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 招标解析->更新项目数据
|
||||
export function editProDataAPI(data) {
|
||||
return request({
|
||||
url: '/smartBid/analysis/editProData',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 招标解析->更新标段数据
|
||||
export function editBidDataAPI(data) {
|
||||
return request({
|
||||
url: '/smartBid/analysis/editBidData',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/* 测试 mq */
|
||||
export function testMQAPI(params) {
|
||||
return request({
|
||||
url: '/smartBid/analysis/testAsyncMq',
|
||||
url: '/smartBid/analysis/testAsyncMq2',
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<el-col :span="12" class="detail-col">
|
||||
<div class="detail-field">
|
||||
<div class="field-label">招标人</div>
|
||||
<div class="field-value">{{ detailData.bidder || '--' }}</div>
|
||||
<div class="field-value">{{ detailData.tenderer || '--' }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="detail-col">
|
||||
|
|
@ -49,13 +49,13 @@
|
|||
<el-col :span="12" class="detail-col">
|
||||
<div class="detail-field">
|
||||
<div class="field-label">开标时间</div>
|
||||
<div class="field-value">{{ detailData.openTime || '--' }}</div>
|
||||
<div class="field-value">{{ detailData.bidOpeningTime || '--' }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="detail-col">
|
||||
<div class="detail-field">
|
||||
<div class="field-label">开标方式</div>
|
||||
<div class="field-value">{{ detailData.openMethod || '--' }}</div>
|
||||
<div class="field-value">{{ detailData.bidOpeningMethod || '--' }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -63,13 +63,12 @@
|
|||
<!-- 项目简介 - 占满宽度 -->
|
||||
<div class="detail-field full-width">
|
||||
<div class="field-label">项目简介</div>
|
||||
<div class="field-value description-value">{{ detailData.proDescription || '--' }}</div>
|
||||
<div class="field-value description-value">{{ detailData.proIntroduction || '--' }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 招标文件 -->
|
||||
<div class="detail-field full-width">
|
||||
<div class="field-label">招标文件</div>
|
||||
<div class="file-value">{{ detailData.proDescription || '--' }}</div>
|
||||
<div class="detail-field full-width" v-for="item in detailData.compositions" :key="item.id">
|
||||
<div class="field-label">{{ item.compositionFileName || '--' }}</div>
|
||||
<div class="file-value" @click="viewFile(item)">{{ getFirstFileName(item) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
|
@ -77,7 +76,7 @@
|
|||
<el-row :gutter="12">
|
||||
<el-col :span="17">
|
||||
<TableModel :showSearch="false" :showOperation="false" :showRightTools="false"
|
||||
ref="detailTableRef" :columnsList="detailColumnsList" :request-api="listAPI"
|
||||
ref="detailTableRef" :columnsList="detailColumnsList" :request-api="getBidListAPI"
|
||||
:sendParams="sendParams" :handleColWidth="180" :isRadioShow="true"
|
||||
@radio-change="handleRadioChange" :indexNumShow="false" :isShowtableCardStyle="false">
|
||||
<template slot="tableTitle">
|
||||
|
|
@ -121,17 +120,18 @@
|
|||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<ViewFile v-if="dialogVisible" :file="fileData" @closeDialog="handleCloseDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { decryptWithSM4 } from '@/utils/sm'
|
||||
import { listAPI, delDataAPI } from '@/api/analysis/analysis'
|
||||
import { getProDetailAPI, getBidListAPI } from '@/api/analysis/analysis'
|
||||
import { formLabel, detailColumnsList } from '../config'
|
||||
import TableModel from '@/components/TableModel2'
|
||||
import request from '@/utils/request'
|
||||
import BidForm from './BidForm.vue'
|
||||
import UploadMoreFile from '@/views/common/UploadMoreFile.vue'
|
||||
import ViewFile from '@/views/common/ViewFile.vue';
|
||||
// 默认参数
|
||||
const defaultParams = {
|
||||
fileUploadRule: {
|
||||
|
|
@ -148,17 +148,18 @@ export default {
|
|||
components: {
|
||||
TableModel,
|
||||
BidForm,
|
||||
UploadMoreFile
|
||||
UploadMoreFile,
|
||||
ViewFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formLabel,
|
||||
detailColumnsList,
|
||||
listAPI,
|
||||
getBidListAPI,
|
||||
proId: '',
|
||||
detailData: {},
|
||||
sendParams: {
|
||||
enterpriseId: 2
|
||||
proId: decryptWithSM4(this.$route.query.proId),
|
||||
},
|
||||
defaultParams,
|
||||
selectedRow: {},
|
||||
|
|
@ -167,6 +168,9 @@ export default {
|
|||
delFileList: []
|
||||
},
|
||||
rules: {},
|
||||
dialogVisible:false,
|
||||
fileData:{}
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -210,44 +214,31 @@ export default {
|
|||
// 获取详情数据
|
||||
async getDetail() {
|
||||
try {
|
||||
// TODO: 根据实际API接口调整
|
||||
const res = await request({
|
||||
url: '/smartBid/analysis/detail',
|
||||
method: 'GET',
|
||||
params: { proId: this.proId }
|
||||
})
|
||||
// 或者使用 getDetailDataAPI,需要根据实际接口调整
|
||||
// const res = await getDetailDataAPI({ proId: this.proId })
|
||||
|
||||
const res = await getProDetailAPI({ proId: this.proId, queryType: 2 })
|
||||
console.log('res:', res);
|
||||
if (res.code === 200) {
|
||||
this.detailData = res.data || {}
|
||||
} else {
|
||||
this.$message.error(res.msg || '获取详情失败')
|
||||
// 如果接口未实现,使用模拟数据
|
||||
this.detailData = {
|
||||
proName: '南方电网公司2025年电网基建工程第二批次施工公开招标项目',
|
||||
proCode: 'CG2700022002003411',
|
||||
bidder: '中建宏业建筑工程有限公司',
|
||||
agency: '南方电网供应链集团有限公司',
|
||||
openTime: '2025/06/02 09:00',
|
||||
openMethod: '线上开标',
|
||||
proDescription: '本项目为南方电网公司2025年电网基建工程第四批次施工公开招标,涵盖云南、广东及深圳地区的多个标段,工期从141至487日历天不等,计划总投资额约...'
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取详情失败:', error)
|
||||
// 如果接口未实现,使用模拟数据
|
||||
this.detailData = {
|
||||
proName: '南方电网公司2025年电网基建工程第二批次施工公开招标项目',
|
||||
proCode: 'CG2700022002003411',
|
||||
bidder: '中建宏业建筑工程有限公司',
|
||||
agency: '南方电网供应链集团有限公司',
|
||||
openTime: '2025/06/02 09:00',
|
||||
openMethod: '线上开标',
|
||||
proDescription: '本项目为南方电网公司2025年电网基建工程第四批次施工公开招标,涵盖云南、广东及深圳地区的多个标段,工期从141至487日历天不等,计划总投资额约...'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 处理文件名
|
||||
getFirstFileName(item) {
|
||||
return item?.fileVoList?.[0]?.fileName || '--';
|
||||
},
|
||||
// 预览文件
|
||||
viewFile(item) {
|
||||
this.fileData = item.fileVoList[0]
|
||||
console.log(this.fileData);
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleCloseDialog() {
|
||||
this.dialogVisible = false
|
||||
this.fileData = {}
|
||||
},
|
||||
// 返回
|
||||
handleClose() {
|
||||
const obj = { path: "/analysis" }
|
||||
|
|
@ -515,6 +506,7 @@ export default {
|
|||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: #1f72ea;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -546,4 +538,5 @@ export default {
|
|||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -13,11 +13,16 @@
|
|||
:showRightTools="false"
|
||||
ref="analysisTableRef"
|
||||
:columnsList="bidListColumnsList"
|
||||
:request-api="listAPI"
|
||||
:request-api="getBidListAPI"
|
||||
:sendParams="sendParams"
|
||||
:handleColWidth="200"
|
||||
:isShowtableCardStyle="false"
|
||||
>
|
||||
<template slot="parsingState" slot-scope="{ data }">
|
||||
<el-tag v-if="data.parsingState === '0'" type="info">解析中</el-tag>
|
||||
<el-tag v-else-if="data.parsingState === '1'" type="success">解析成功</el-tag>
|
||||
<el-tag v-else-if="data.parsingState === '2'" type="danger">解析失败</el-tag>
|
||||
</template>
|
||||
<template slot="tableTitle">
|
||||
<h3>数据列表</h3>
|
||||
</template>
|
||||
|
|
@ -40,7 +45,8 @@
|
|||
import TableModel from '@/components/TableModel2'
|
||||
import { bidListColumnsList, bidFormLabel } from '../config'
|
||||
import { encryptWithSM4 } from '@/utils/sm'
|
||||
import { listAPI, delDataAPI } from '@/api/analysis/analysis'
|
||||
import { getBidListAPI, delDataAPI } from '@/api/analysis/analysis'
|
||||
import { decryptWithSM4 } from '@/utils/sm'
|
||||
export default {
|
||||
name: 'AnalysisBidIndex',
|
||||
components: {
|
||||
|
|
@ -50,9 +56,9 @@ export default {
|
|||
return {
|
||||
bidFormLabel,
|
||||
bidListColumnsList,
|
||||
listAPI,
|
||||
getBidListAPI,
|
||||
sendParams: {
|
||||
enterpriseId: 2
|
||||
proId: decryptWithSM4(this.$route.query.proId)
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,8 +8,14 @@
|
|||
<el-card class="analysis-detail-card">
|
||||
<template slot="header">
|
||||
<div class="card-header">
|
||||
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="项目信息">
|
||||
<h3>项目信息</h3>
|
||||
<div class="card-header-left">
|
||||
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="项目信息">
|
||||
<h3>项目信息</h3>
|
||||
</div>
|
||||
<el-button type="text" v-hasPermi="['enterpriseLibrary:analysis:edit']" class="edit-btn"
|
||||
@click="handleEditProject">
|
||||
编辑
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="analysis-detail-content">
|
||||
|
|
@ -33,7 +39,7 @@
|
|||
<el-col :span="12" class="detail-col">
|
||||
<div class="detail-field">
|
||||
<div class="field-label">招标人</div>
|
||||
<div class="field-value">{{ detailData.bidder || '--' }}</div>
|
||||
<div class="field-value">{{ detailData.tenderer || '--' }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="detail-col">
|
||||
|
|
@ -48,13 +54,13 @@
|
|||
<el-col :span="12" class="detail-col">
|
||||
<div class="detail-field">
|
||||
<div class="field-label">开标时间</div>
|
||||
<div class="field-value">{{ detailData.openTime || '--' }}</div>
|
||||
<div class="field-value">{{ detailData.bidOpeningTime || '--' }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="detail-col">
|
||||
<div class="detail-field">
|
||||
<div class="field-label">开标方式</div>
|
||||
<div class="field-value">{{ detailData.openMethod || '--' }}</div>
|
||||
<div class="field-value">{{ detailData.bidOpeningMethod || '--' }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -62,14 +68,14 @@
|
|||
<!-- 项目简介 - 占满宽度 -->
|
||||
<div class="detail-field full-width">
|
||||
<div class="field-label">项目简介</div>
|
||||
<div class="field-value description-value">{{ detailData.proDescription || '--' }}</div>
|
||||
<div class="field-value description-value">{{ detailData.proIntroduction || '--' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="table-container">
|
||||
<TableModel :showSearch="false" :showOperation="true" :showRightTools="false" ref="detailTableRef"
|
||||
:columnsList="detailColumnsList" :request-api="listAPI" :sendParams="sendParams"
|
||||
:handleColWidth="180" :isShowtableCardStyle="false">
|
||||
:columnsList="detailColumnsList" :request-api="getBidListAPI" :sendParams="sendParams"
|
||||
:handleColWidth="180" :isShowtableCardStyle="false" :autoLoad="true">
|
||||
<template slot="tableTitle">
|
||||
<div class="card-header">
|
||||
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="标的信息">
|
||||
|
|
@ -86,84 +92,62 @@
|
|||
</TableModel>
|
||||
</div>
|
||||
</div>
|
||||
<BidForm v-if="showBidForm" :width="600" :rowData="detailData" :title="title"
|
||||
@closeDialog="showBidForm = false" />
|
||||
<!-- 标段编辑弹窗 -->
|
||||
<BidForm v-if="showBidForm" :width="600" :rowData="rowData" :title="title"
|
||||
@closeDialog="showBidForm = false" @handleQuery="handleQuery" />
|
||||
<!-- 项目信息编辑弹窗 -->
|
||||
<ProForm v-if="showProForm" :width="600" :rowData="rowData" :title="title"
|
||||
@closeDialog="showProForm = false" @handleProQuery="handleProQuery" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { decryptWithSM4 } from '@/utils/sm'
|
||||
import { listAPI, delDataAPI } from '@/api/analysis/analysis'
|
||||
import { getProDetailAPI,getBidListAPI } from '@/api/analysis/analysis'
|
||||
import { formLabel, detailColumnsList } from '../config'
|
||||
import TableModel from '@/components/TableModel2'
|
||||
import request from '@/utils/request'
|
||||
import BidForm from './BidForm.vue'
|
||||
import ProForm from './ProForm.vue'
|
||||
|
||||
export default {
|
||||
name: 'AnalysisDetail',
|
||||
components: {
|
||||
TableModel,
|
||||
BidForm
|
||||
BidForm,
|
||||
ProForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formLabel,
|
||||
detailColumnsList,
|
||||
listAPI,
|
||||
proId: '',
|
||||
getBidListAPI,
|
||||
proId: decryptWithSM4(this.$route.query.proId),
|
||||
detailData: {},
|
||||
sendParams: {
|
||||
enterpriseId: 2
|
||||
proId: decryptWithSM4(this.$route.query.proId),
|
||||
},
|
||||
showBidForm: false,
|
||||
showProForm: false,
|
||||
title: '',
|
||||
rowData: {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.proId = decryptWithSM4(this.$route.query.proId)
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
// 获取详情数据
|
||||
async getDetail() {
|
||||
try {
|
||||
// TODO: 根据实际API接口调整
|
||||
const res = await request({
|
||||
url: '/smartBid/analysis/detail',
|
||||
method: 'GET',
|
||||
params: { proId: this.proId }
|
||||
})
|
||||
// 或者使用 getDetailDataAPI,需要根据实际接口调整
|
||||
// const res = await getDetailDataAPI({ proId: this.proId })
|
||||
|
||||
const res = await getProDetailAPI({ proId: this.proId })
|
||||
console.log('res:', res);
|
||||
if (res.code === 200) {
|
||||
this.detailData = res.data || {}
|
||||
} else {
|
||||
this.$message.error(res.msg || '获取详情失败')
|
||||
// 如果接口未实现,使用模拟数据
|
||||
this.detailData = {
|
||||
proName: '南方电网公司2025年电网基建工程第二批次施工公开招标项目',
|
||||
proCode: 'CG2700022002003411',
|
||||
bidder: '中建宏业建筑工程有限公司',
|
||||
agency: '南方电网供应链集团有限公司',
|
||||
openTime: '2025/06/02 09:00',
|
||||
openMethod: '线上开标',
|
||||
proDescription: '本项目为南方电网公司2025年电网基建工程第四批次施工公开招标,涵盖云南、广东及深圳地区的多个标段,工期从141至487日历天不等,计划总投资额约...'
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取详情失败:', error)
|
||||
// 如果接口未实现,使用模拟数据
|
||||
this.detailData = {
|
||||
proName: '南方电网公司2025年电网基建工程第二批次施工公开招标项目',
|
||||
proCode: 'CG2700022002003411',
|
||||
bidder: '中建宏业建筑工程有限公司',
|
||||
agency: '南方电网供应链集团有限公司',
|
||||
openTime: '2025/06/02 09:00',
|
||||
openMethod: '线上开标',
|
||||
proDescription: '本项目为南方电网公司2025年电网基建工程第四批次施工公开招标,涵盖云南、广东及深圳地区的多个标段,工期从141至487日历天不等,计划总投资额约...'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 返回
|
||||
|
|
@ -171,12 +155,29 @@ export default {
|
|||
const obj = { path: "/analysis" }
|
||||
this.$tab.closeOpenPage(obj)
|
||||
},
|
||||
// 编辑
|
||||
// 编辑标段
|
||||
handleUpdate(data) {
|
||||
this.title = '编辑'
|
||||
this.rowData = data
|
||||
this.showBidForm = true
|
||||
}
|
||||
},
|
||||
|
||||
/* 搜索操作 */
|
||||
handleQuery() {
|
||||
this.rowData = {}
|
||||
this.$refs.detailTableRef.getTableList()
|
||||
},
|
||||
/* 更新项目信息 */
|
||||
handleProQuery(data){
|
||||
this.rowData = {}
|
||||
this.detailData = data
|
||||
},
|
||||
/* 编辑项目信息 */
|
||||
handleEditProject() {
|
||||
this.title = '编辑'
|
||||
this.rowData = this.detailData
|
||||
this.showProForm = true
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -265,8 +266,15 @@ export default {
|
|||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
|
||||
.card-header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
font-size: 20px;
|
||||
color: #409EFF;
|
||||
|
|
@ -278,6 +286,17 @@ export default {
|
|||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
color: #409EFF;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
padding: 0;
|
||||
|
||||
&:hover {
|
||||
color: #66b1ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.analysis-detail-content {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<!-- 小型弹窗,用于完成,删除,保存等操作 -->
|
||||
<el-dialog class="l-dialog" :class="[lDialog, { 'no-pointer-events': showUploadAnimation }]" :title="title" :visible.sync="dialogVisible" :showClose="true"
|
||||
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
||||
<el-dialog class="l-dialog" :class="[lDialog, { 'no-pointer-events': showUploadAnimation }]" :title="title"
|
||||
:visible.sync="dialogVisible" :showClose="true" :closeOnClickModal="false" @close="handleClose"
|
||||
:append-to-body="true">
|
||||
<div>
|
||||
<!-- 全局上传动画 -->
|
||||
<GlobalUploadAnimation v-if="showUploadAnimation" :text="animationText" subtext="正在处理文件,请稍候..." />
|
||||
|
|
@ -38,7 +39,7 @@ import { addDataAPI } from '@/api/analysis/analysis'
|
|||
// 默认参数
|
||||
const defaultParams = {
|
||||
fileUploadRule: {
|
||||
fileUploadType: 'bidding',
|
||||
fileUploadType: 'pro_composition',
|
||||
fields_json: '',
|
||||
suffix: 'analysis_database',
|
||||
},
|
||||
|
|
@ -190,14 +191,18 @@ export default {
|
|||
async submitForm(formName) {
|
||||
try {
|
||||
const data = await this.validate(formName)
|
||||
console.log('data:', data);
|
||||
|
||||
// 所有校验通过,组装完整数据
|
||||
let formData = {
|
||||
...data,
|
||||
allFiles: [
|
||||
...data.fileList.map((file) =>
|
||||
JSON.parse(JSON.stringify(file)),
|
||||
allFiles: Object.keys(data)
|
||||
.filter(key => key.startsWith('fileList'))
|
||||
.flatMap(key =>
|
||||
(data[key] || []).map(file =>
|
||||
JSON.parse(JSON.stringify(file))
|
||||
)
|
||||
),
|
||||
],
|
||||
delFiles: [...data.delFileList],
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +216,11 @@ export default {
|
|||
})
|
||||
.filter((item) => item !== null)
|
||||
formData.files = allFiles
|
||||
delete formData.fileList
|
||||
formData.uploadType = this.uploadType;
|
||||
// 动态删除所有 fileList 开头的字段
|
||||
Object.keys(formData)
|
||||
.filter(key => key.startsWith('fileList'))
|
||||
.forEach(key => delete formData[key]);
|
||||
delete formData.delFileList
|
||||
delete formData.allFiles
|
||||
// 显示遮罩层
|
||||
|
|
@ -223,12 +232,12 @@ export default {
|
|||
this.$el.querySelector('.el-dialog') || document.body,
|
||||
})
|
||||
console.log('所有表单校验通过,完整数据:', formData)
|
||||
/* const res = await this.saveData(formData)
|
||||
const res = await this.saveData(formData)
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
} */
|
||||
}
|
||||
} catch (error) {
|
||||
} finally {
|
||||
if (this.loading) {
|
||||
|
|
@ -240,16 +249,14 @@ export default {
|
|||
// 保存接口
|
||||
async saveData(formData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.isAdd === 'add') {
|
||||
// 新增
|
||||
addDataAPI(formData)
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
addDataAPI(formData)
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 开始上传
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="标段编号" prop="bidNumber">
|
||||
<el-input v-model.trim="form.bidNumber" placeholder="请输入标段编号" clearable show-word-limit
|
||||
maxlength="64"></el-input>
|
||||
maxlength="32"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标段名称" prop="bidName">
|
||||
<el-input v-model.trim="form.bidName" placeholder="请输入标段名称" clearable show-word-limit
|
||||
|
|
@ -34,11 +34,11 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="招标阶段" prop="biddingStage">
|
||||
<el-input v-model.trim="form.biddingStage" placeholder="请输入招标阶段" clearable show-word-limit
|
||||
maxlength="64"></el-input>
|
||||
maxlength="32"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工期" prop="duration">
|
||||
<el-input v-model.trim="form.duration" placeholder="请输入工期" clearable show-word-limit
|
||||
maxlength="64"></el-input>
|
||||
<el-input type="textarea" v-model.trim="form.duration" placeholder="请输入工期" clearable show-word-limit
|
||||
:autosize="{ minRows: 3, maxRows: 5 }" maxlength="128"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
|
@ -51,26 +51,16 @@
|
|||
</template>
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
|
||||
import { editBidDataAPI } from '@/api/analysis/analysis'
|
||||
export default {
|
||||
name: 'BidForm',
|
||||
|
||||
props: ['width', 'rowData', 'title'],
|
||||
data() {
|
||||
return {
|
||||
lDialog: this.width > 500 ? 'w700' : 'w500',
|
||||
dialogVisible: true,
|
||||
|
||||
form: {
|
||||
markName: '',
|
||||
unit: '',
|
||||
bidNumber: '',
|
||||
bidName: '',
|
||||
maximumBidLimit: '',
|
||||
safetyConstFee: '',
|
||||
bidBond: '',
|
||||
biddingStage: '',
|
||||
duration: '',
|
||||
|
||||
},
|
||||
rules: {
|
||||
markName: [
|
||||
|
|
@ -139,9 +129,28 @@ export default {
|
|||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initFormData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* 初始化表单数据 */
|
||||
initFormData() {
|
||||
console.log(this.rowData);
|
||||
|
||||
this.form = {
|
||||
bidId: this.rowData.bidId || null,
|
||||
markName: this.rowData.markName || '',
|
||||
unit: this.rowData.unit || '',
|
||||
bidNumber: this.rowData.bidNumber || '',
|
||||
bidName: this.rowData.bidName || '',
|
||||
maximumBidLimit: this.rowData.maximumBidLimit || '',
|
||||
safetyConstFee: this.rowData.safetyConstFee || '',
|
||||
bidBond: this.rowData.bidBond || '',
|
||||
biddingStage: this.rowData.biddingStage || '',
|
||||
duration: this.rowData.duration || '',
|
||||
}
|
||||
},
|
||||
|
||||
/*关闭弹窗 */
|
||||
handleClose() {
|
||||
|
|
@ -156,12 +165,16 @@ export default {
|
|||
/**重置表单*/
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
pid: null,
|
||||
templateId: null,
|
||||
fileList: [],
|
||||
delFileList: [],
|
||||
remark: '',
|
||||
bidId: null,
|
||||
markName: '',
|
||||
unit: '',
|
||||
bidNumber: '',
|
||||
bidName: '',
|
||||
maximumBidLimit: '',
|
||||
safetyConstFee: '',
|
||||
bidBond: '',
|
||||
biddingStage: '',
|
||||
duration: '',
|
||||
}
|
||||
this.resetForm('ruleForm')
|
||||
},
|
||||
|
|
@ -186,30 +199,12 @@ export default {
|
|||
async submitForm(formName) {
|
||||
try {
|
||||
const data = await this.validate(formName)
|
||||
console.log(data);
|
||||
|
||||
// 所有校验通过,组装完整数据
|
||||
let formData = {
|
||||
...data,
|
||||
allFiles: [
|
||||
...data.fileList.map((file) =>
|
||||
JSON.parse(JSON.stringify(file)),
|
||||
),
|
||||
],
|
||||
delFiles: [...data.delFileList],
|
||||
}
|
||||
|
||||
let allFiles = formData.allFiles
|
||||
.map((file) => {
|
||||
return file?.response?.fileRes
|
||||
? {
|
||||
...file.response.fileRes,
|
||||
}
|
||||
: null
|
||||
})
|
||||
.filter((item) => item !== null)
|
||||
formData.files = allFiles
|
||||
delete formData.fileList
|
||||
delete formData.delFileList
|
||||
delete formData.allFiles
|
||||
// 显示遮罩层
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
|
|
@ -219,12 +214,12 @@ export default {
|
|||
this.$el.querySelector('.el-dialog') || document.body,
|
||||
})
|
||||
console.log('所有表单校验通过,完整数据:', formData)
|
||||
/* const res = await this.saveData(formData)
|
||||
const res = await this.saveData(formData)
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
} */
|
||||
}
|
||||
} catch (error) {
|
||||
} finally {
|
||||
if (this.loading) {
|
||||
|
|
@ -236,25 +231,14 @@ export default {
|
|||
// 保存接口
|
||||
async saveData(formData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.isAdd === 'add') {
|
||||
// 新增
|
||||
addDataAPI(formData)
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
} else {
|
||||
// 修改
|
||||
editDataAPI(formData)
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
}
|
||||
// 修改
|
||||
editBidDataAPI(formData)
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
@ -295,7 +279,7 @@ export default {
|
|||
.w700 ::v-deep .el-dialog__header {
|
||||
flex-shrink: 0;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,344 @@
|
|||
<template>
|
||||
<!-- 小型弹窗,用于完成,删除,保存等操作 -->
|
||||
<el-dialog class="l-dialog" :class="lDialog" :title="title" :visible.sync="dialogVisible" :showClose="true"
|
||||
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
||||
<div class="dialog-content-scrollable">
|
||||
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px" label-position="top">
|
||||
<el-form-item label="项目名称" prop="proName">
|
||||
<el-input v-model.trim="form.proName" placeholder="请输入项目名称" clearable show-word-limit
|
||||
maxlength="64"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编号" prop="项目编号">
|
||||
<el-input v-model.trim="form.proCode" placeholder="请输入项目编号" clearable show-word-limit
|
||||
maxlength="32"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="招标人" prop="tenderer">
|
||||
<el-input v-model.trim="form.tenderer" placeholder="请输入招标人" clearable show-word-limit
|
||||
maxlength="32"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="代理机构" prop="agency">
|
||||
<el-input v-model.trim="form.agency" placeholder="请输入代理机构" clearable show-word-limit
|
||||
maxlength="64"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开标时间" prop="bidOpeningTime" >
|
||||
<el-date-picker class="form-item" v-model="form.bidOpeningTime" type="date" placeholder="请选择开标时间" value-format="yyyy-MM-dd HH:mm:ss" clearable></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="开标方式" prop="bidOpeningMethod">
|
||||
<el-input v-model.trim="form.bidOpeningMethod" placeholder="请输入开标方式" clearable show-word-limit
|
||||
maxlength="64"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目简介" prop="proIntroduction">
|
||||
<el-input type="textarea" v-model.trim="form.proIntroduction" placeholder="请输入项目简介" clearable show-word-limit
|
||||
:autosize="{ minRows: 5, maxRows: 8 }" maxlength="512"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" class="confirm-btn" @click="submitForm('ruleForm')">确认</el-button>
|
||||
<el-button class="cancel-btn" @click="handleClose">取消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import { editProDataAPI } from '@/api/analysis/analysis'
|
||||
export default {
|
||||
name: 'ProForm',
|
||||
props: ['width', 'rowData', 'title'],
|
||||
data() {
|
||||
return {
|
||||
lDialog: this.width > 500 ? 'w700' : 'w500',
|
||||
dialogVisible: true,
|
||||
form: {
|
||||
|
||||
},
|
||||
rules: {
|
||||
proName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入项目名称',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
proCode: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入项目编号',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
tenderer: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入招标人',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
agency: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入代理机构',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
bidOpeningTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择开标时间',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
bidOpeningMethod: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入开标方式',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
proIntroduction: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入项目简介',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initFormData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* 初始化表单数据 */
|
||||
initFormData() {
|
||||
console.log(this.rowData);
|
||||
|
||||
this.form = {
|
||||
proId: this.rowData.proId || null,
|
||||
proName: this.rowData.proName || '',
|
||||
proCode: this.rowData.proCode || '',
|
||||
tenderer: this.rowData.tenderer || '',
|
||||
agency: this.rowData.agency || '',
|
||||
bidOpeningTime: this.rowData.bidOpeningTime || '',
|
||||
bidOpeningMethod: this.rowData.bidOpeningMethod || '',
|
||||
proIntroduction: this.rowData.proIntroduction || '',
|
||||
}
|
||||
},
|
||||
|
||||
/*关闭弹窗 */
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.$emit('closeDialog')
|
||||
},
|
||||
/**确认弹窗 */
|
||||
sureBtnClick() {
|
||||
this.dialogVisible = false
|
||||
this.$emit('closeDialog')
|
||||
},
|
||||
/**重置表单*/
|
||||
reset() {
|
||||
this.form = {
|
||||
proId: null,
|
||||
proName: '',
|
||||
proCode: '',
|
||||
tenderer: '',
|
||||
agency: '',
|
||||
bidOpeningTime: '',
|
||||
bidOpeningMethod: '',
|
||||
proIntroduction: '',
|
||||
}
|
||||
this.resetForm('ruleForm')
|
||||
},
|
||||
handleReuslt(res) {
|
||||
this.$modal.msgSuccess(res.msg)
|
||||
const newData = {...this.form};
|
||||
this.$emit('handleProQuery',newData)
|
||||
this.reset()
|
||||
this.handleClose()
|
||||
},
|
||||
validate(formName) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
resolve(this.form) // 校验成功返回表单数据
|
||||
} else {
|
||||
reject(new Error('数据未填写完整'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/**验证 */
|
||||
async submitForm(formName) {
|
||||
try {
|
||||
const data = await this.validate(formName)
|
||||
|
||||
// 所有校验通过,组装完整数据
|
||||
let formData = {
|
||||
...data,
|
||||
}
|
||||
// 显示遮罩层
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据提交中,请稍候...',
|
||||
background: 'rgba(0,0,0,0.5)',
|
||||
target:
|
||||
this.$el.querySelector('.el-dialog') || document.body,
|
||||
})
|
||||
console.log('所有表单校验通过,完整数据:', formData)
|
||||
const res = await this.saveData(formData)
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
} catch (error) {
|
||||
} finally {
|
||||
if (this.loading) {
|
||||
this.loading.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 保存接口
|
||||
async saveData(formData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 修改
|
||||
editProDataAPI(formData)
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.w700 ::v-deep .el-dialog {
|
||||
width: 700px;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 5vh !important;
|
||||
margin-bottom: 5vh !important;
|
||||
}
|
||||
|
||||
.w500 ::v-deep .el-dialog {
|
||||
width: 500px;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 5vh !important;
|
||||
margin-bottom: 5vh !important;
|
||||
}
|
||||
|
||||
// 弹窗主体区域
|
||||
.w500 ::v-deep .el-dialog__body,
|
||||
.w700 ::v-deep .el-dialog__body {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.w500 ::v-deep .el-dialog__header,
|
||||
.w700 ::v-deep .el-dialog__header {
|
||||
flex-shrink: 0;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.yxq .el-range-separator {
|
||||
margin-right: 7px !important;
|
||||
}
|
||||
|
||||
.el-date-editor--daterange.el-input__inner {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.select-style {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
width: 98px;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
width: 98px;
|
||||
height: 36px;
|
||||
background: #e5e5e5;
|
||||
box-shadow: 0px 4px 8px 0px rgba(76, 76, 76, 0.2);
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
color: #333;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s;
|
||||
|
||||
&:hover {
|
||||
background: #d0d0d0;
|
||||
box-shadow: 0px 6px 12px 0px rgba(76, 76, 76, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__footer {
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
// 内容区域可滚动
|
||||
.dialog-content-scrollable {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding-right: 6px;
|
||||
max-height: calc(90vh - 120px); // 减去头部和底部的高度
|
||||
|
||||
// 自定义滚动条样式
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 3px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -30,7 +30,7 @@ export const bidFormLabel = [
|
|||
isShow: false, // 是否展示label
|
||||
f_type: 'ipt',
|
||||
f_label: '标的名称',
|
||||
f_model: 'proName',
|
||||
f_model: 'markName',
|
||||
f_max: 32,
|
||||
f_width: '250px',
|
||||
},
|
||||
|
|
@ -38,7 +38,7 @@ export const bidFormLabel = [
|
|||
isShow: false, // 是否展示label
|
||||
f_type: 'ipt',
|
||||
f_label: '标段名称',
|
||||
f_model: 'personName',
|
||||
f_model: 'bidName',
|
||||
f_max: 32,
|
||||
f_width: '250px',
|
||||
},
|
||||
|
|
@ -46,7 +46,7 @@ export const bidFormLabel = [
|
|||
isShow: false, // 是否展示label
|
||||
f_type: 'sel',
|
||||
f_label: '解析状态',
|
||||
f_model: 'analysisStatus',
|
||||
f_model: 'parsingState',
|
||||
f_selList: [
|
||||
{ label: '解析中', value: 0 },
|
||||
{ label: '解析成功', value: 1 },
|
||||
|
|
@ -69,26 +69,26 @@ export const columnsList = [
|
|||
]
|
||||
|
||||
export const detailColumnsList = [
|
||||
{ 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: '招标阶段' },
|
||||
{ t_props: 'markName', t_label: '标的名称' },
|
||||
{ t_props: 'unit', t_label: '单位' },
|
||||
{ t_props: 'bidNumber', t_label: '标段标号' },
|
||||
{ t_props: 'bidName', t_label: '标段名称' },
|
||||
{ t_props: 'maximumBidLimit', t_label: '最高投标限价(万元)' },
|
||||
{ t_props: 'safetyConstFee', t_label: '安全文明施工费(万元)' },
|
||||
{ t_props: 'bidBond', t_label: '投标保证金(万元)' },
|
||||
{ t_props: 'duration', t_label: '工期' },
|
||||
{ t_props: 'biddingStage', t_label: '招标阶段' },
|
||||
]
|
||||
|
||||
export const bidListColumnsList = [
|
||||
{ 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: '招标阶段' },
|
||||
{ t_props: 'mainFunction', t_label: '解析状态' }
|
||||
{ t_props: 'markName', t_label: '标的名称' },
|
||||
{ t_props: 'unit', t_label: '单位' },
|
||||
{ t_props: 'bidNumber', t_label: '标段标号' },
|
||||
{ t_props: 'bidName', t_label: '标段名称' },
|
||||
{ t_props: 'maximumBidLimit', t_label: '最高投标限价(万元)' },
|
||||
{ t_props: 'safetyConstFee', t_label: '安全文明施工费(万元)' },
|
||||
{ t_props: 'bidBond', t_label: '投标保证金(万元)' },
|
||||
{ t_props: 'duration', t_label: '工期' },
|
||||
{ t_props: 'biddingStage', t_label: '招标阶段' },
|
||||
{ t_slot: 'parsingState', t_label: '解析状态' }
|
||||
]
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
<!-- 新建项目 -->
|
||||
<AnalysisForm v-if="showAnalysisForm" :title="title" :row="row" @closeDialog="showAnalysisForm = false"
|
||||
:width="600" />
|
||||
:width="600" @handleQuery="handleQuery" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ export default {
|
|||
this.$router.push({
|
||||
name: 'AnalysisDetail',
|
||||
query: {
|
||||
proId: encryptWithSM4('2'),
|
||||
proId: encryptWithSM4(row.proId + '' || '0'),
|
||||
},
|
||||
})
|
||||
},
|
||||
|
|
@ -155,7 +155,7 @@ export default {
|
|||
this.$router.push({
|
||||
name: 'AnalysisBidDetail',
|
||||
query: {
|
||||
proId: encryptWithSM4('2'),
|
||||
proId: encryptWithSM4(row.proId + '' || '0'),
|
||||
},
|
||||
})
|
||||
},
|
||||
|
|
@ -164,7 +164,7 @@ export default {
|
|||
this.$router.push({
|
||||
name: 'AnalysisBidIndex',
|
||||
query: {
|
||||
proId: encryptWithSM4('2'),
|
||||
proId: encryptWithSM4(row.proId + '' || '0'),
|
||||
},
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,32 +32,28 @@
|
|||
|
||||
<!-- 空状态 -->
|
||||
<span v-else class="empty-text">--</span>
|
||||
<el-dialog v-if="dialogVisible" :visible.sync="dialogVisible" width="50%" class="preview-dialog" title="文件预览">
|
||||
<!-- <el-dialog v-if="dialogVisible" :visible.sync="dialogVisible" width="50%" class="preview-dialog" title="文件预览">
|
||||
<OnlyOfficeViewer :document-url="documentUrl" :document-title="documentTitle"
|
||||
:document-key="documentKey" :mode="mode" :type="type" @document-ready="handleDocumentReady"
|
||||
@app-ready="handleAppReady" @error="handleError" @initialized="handleInitialized" :force-save="true"
|
||||
:save-timeout="15000" />
|
||||
</el-dialog>
|
||||
|
||||
</el-dialog> -->
|
||||
<ViewFile v-if="dialogVisible" :file="fileData" @closeDialog="handleCloseDialog" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OnlyOfficeViewer from './OnlyOfficeViewer';
|
||||
import ViewFile from './ViewFile';
|
||||
export default {
|
||||
name: 'FileOrImageDisplay',
|
||||
components: {
|
||||
OnlyOfficeViewer
|
||||
ViewFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
documentUrl: '',
|
||||
documentTitle: '',
|
||||
documentKey: '',
|
||||
mode: 'view',
|
||||
type: 'desktop',
|
||||
fileData: {},
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
@ -141,9 +137,9 @@ export default {
|
|||
methods: {
|
||||
// 文件点击事件
|
||||
handleFileClick() {
|
||||
this.documentUrl = this.file.filePath
|
||||
this.documentTitle = this.file.name
|
||||
this.documentKey = this.file.id + ''
|
||||
console.log(this.file);
|
||||
|
||||
this.fileData = this.file
|
||||
this.dialogVisible = true
|
||||
},
|
||||
// 图片点击事件
|
||||
|
|
@ -162,6 +158,10 @@ export default {
|
|||
handleInitialized() {
|
||||
console.log('初始化完成')
|
||||
},
|
||||
handleCloseDialog() {
|
||||
this.dialogVisible = false
|
||||
this.fileData = {}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -278,20 +278,5 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .el-dialog {
|
||||
height: 88vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .el-dialog__body {
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
height: 0;
|
||||
/* 重要:让flex布局生效 */
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .onlyoffice-container {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="dialogVisible" width="50%" class="preview-dialog" title="文件预览" @close="handleClose">
|
||||
<OnlyOfficeViewer :document-url="documentUrl" :document-title="documentTitle" :document-key="documentKey"
|
||||
:mode="mode" :type="type" @document-ready="handleDocumentReady" @app-ready="handleAppReady"
|
||||
@error="handleError" @initialized="handleInitialized" :force-save="true" :save-timeout="15000" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import OnlyOfficeViewer from './OnlyOfficeViewer';
|
||||
export default {
|
||||
name: 'ViewFile',
|
||||
props: {
|
||||
file: {
|
||||
type: Object,
|
||||
default: () => null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
OnlyOfficeViewer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: true,
|
||||
documentUrl: this.file.filePath,
|
||||
documentTitle: this.file.fileName,
|
||||
documentKey: (this.file?.sourceId || this.file?.id || '') + '',
|
||||
mode: 'view',
|
||||
type: 'desktop',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleDocumentReady() {
|
||||
console.log('文档已准备就绪')
|
||||
},
|
||||
handleAppReady() {
|
||||
console.log('应用已准备就绪')
|
||||
},
|
||||
handleError(error) {
|
||||
console.log('错误:', error)
|
||||
},
|
||||
handleInitialized() {
|
||||
console.log('初始化完成')
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.$emit('closeDialog')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.preview-dialog ::v-deep .el-dialog {
|
||||
height: 88vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .el-dialog__body {
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
height: 0;
|
||||
/* 重要:让flex布局生效 */
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .onlyoffice-container {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -104,7 +104,8 @@ export default {
|
|||
name: item.fileName,
|
||||
filePath: item.filePath,
|
||||
lsFilePath: item.lsFilePath,
|
||||
fileType: item.fileType
|
||||
fileType: item.fileType,
|
||||
id: item.sourceId
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,11 +31,12 @@
|
|||
</el-button>
|
||||
</template>
|
||||
</TableModel>
|
||||
<el-dialog v-if="dialogVisible" :visible.sync="dialogVisible" width="50%" class="preview-dialog" title="文件预览">
|
||||
<!-- <el-dialog v-if="dialogVisible" :visible.sync="dialogVisible" width="50%" class="preview-dialog" title="文件预览">
|
||||
<OnlyOfficeViewer :document-url="documentUrl" :document-title="documentTitle" :document-key="documentKey"
|
||||
:mode="mode" :type="type" @document-ready="handleDocumentReady" @app-ready="handleAppReady"
|
||||
@error="handleError" @initialized="handleInitialized" :force-save="true" :save-timeout="15000" />
|
||||
</el-dialog>
|
||||
</el-dialog> -->
|
||||
<ViewFile v-if="dialogVisible" :file="fileData" @closeDialog="handleCloseDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -44,13 +45,13 @@ import TableModel from '@/components/TableModel2'
|
|||
import { columnsList, formLabel } from './config'
|
||||
import { listAPI, delDataAPI } from '@/api/enterpriseLibrary/technical/technical'
|
||||
import { encryptWithSM4 } from '@/utils/sm'
|
||||
import OnlyOfficeViewer from '@/views/common/OnlyOfficeViewer'
|
||||
import ViewFile from '@/views/common/ViewFile'
|
||||
|
||||
export default {
|
||||
name: 'RightTableTechnical',
|
||||
components: {
|
||||
TableModel,
|
||||
OnlyOfficeViewer
|
||||
ViewFile
|
||||
},
|
||||
dicts: ['construction_nature', 'structural_form', 'basic_form'],
|
||||
props: {
|
||||
|
|
@ -69,11 +70,7 @@ export default {
|
|||
columnsList,
|
||||
listAPI,
|
||||
dialogVisible: false,
|
||||
documentUrl: '',
|
||||
documentTitle: '',
|
||||
documentKey: '',
|
||||
mode: 'view',
|
||||
type: 'desktop',
|
||||
fileData: {},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -157,22 +154,17 @@ export default {
|
|||
/** 查看文件 */
|
||||
viewFile(row) {
|
||||
console.log(row);
|
||||
this.documentTitle = row.technicalName
|
||||
this.documentKey = row.resourceFileVoList?.[0]?.sourceId + ''
|
||||
this.fileData = {
|
||||
fileName: row.technicalName,
|
||||
id: row.resourceFileVoList?.[0]?.sourceId + ''
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleDocumentReady() {
|
||||
console.log('文档已准备就绪')
|
||||
},
|
||||
handleAppReady() {
|
||||
console.log('应用已准备就绪')
|
||||
},
|
||||
handleError(error) {
|
||||
console.log('错误:', error)
|
||||
},
|
||||
handleInitialized() {
|
||||
console.log('初始化完成')
|
||||
handleCloseDialog() {
|
||||
this.dialogVisible = false
|
||||
this.fileData = {}
|
||||
},
|
||||
|
||||
/** 删除操作 */
|
||||
handleDelete(raw) {
|
||||
this.$confirm(`确定要删除方案名称"${raw.technicalName}"吗?删除后将无法恢复!`, '操作提示', {
|
||||
|
|
@ -242,21 +234,4 @@ export default {
|
|||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .el-dialog {
|
||||
height: 88vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .el-dialog__body {
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
height: 0;
|
||||
/* 重要:让flex布局生效 */
|
||||
}
|
||||
|
||||
.preview-dialog ::v-deep .onlyoffice-container {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue