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 request from '@/utils/request'
|
||||||
|
import { data } from 'jquery'
|
||||||
|
|
||||||
// 招标解析->查询列表
|
// 招标解析->查询列表
|
||||||
export function listAPI(params) {
|
export function listAPI(params) {
|
||||||
|
|
@ -18,37 +19,47 @@ export function addDataAPI(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 工器具库->修改工器具 */
|
// 招标解析->查看标段列表
|
||||||
export function editDataAPI(data) {
|
export function getBidListAPI(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smartBid/mainDatabase/tool/editData',
|
url: '/smartBid/analysis/getBidList',
|
||||||
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',
|
method: 'GET',
|
||||||
params
|
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 */
|
/* 测试 mq */
|
||||||
export function testMQAPI(params) {
|
export function testMQAPI(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smartBid/analysis/testAsyncMq',
|
url: '/smartBid/analysis/testAsyncMq2',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
<div class="detail-field">
|
<div class="detail-field">
|
||||||
<div class="field-label">招标人</div>
|
<div class="field-label">招标人</div>
|
||||||
<div class="field-value">{{ detailData.bidder || '--' }}</div>
|
<div class="field-value">{{ detailData.tenderer || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
|
|
@ -49,13 +49,13 @@
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
<div class="detail-field">
|
<div class="detail-field">
|
||||||
<div class="field-label">开标时间</div>
|
<div class="field-label">开标时间</div>
|
||||||
<div class="field-value">{{ detailData.openTime || '--' }}</div>
|
<div class="field-value">{{ detailData.bidOpeningTime || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
<div class="detail-field">
|
<div class="detail-field">
|
||||||
<div class="field-label">开标方式</div>
|
<div class="field-label">开标方式</div>
|
||||||
<div class="field-value">{{ detailData.openMethod || '--' }}</div>
|
<div class="field-value">{{ detailData.bidOpeningMethod || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -63,13 +63,12 @@
|
||||||
<!-- 项目简介 - 占满宽度 -->
|
<!-- 项目简介 - 占满宽度 -->
|
||||||
<div class="detail-field full-width">
|
<div class="detail-field full-width">
|
||||||
<div class="field-label">项目简介</div>
|
<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>
|
||||||
|
|
||||||
<!-- 招标文件 -->
|
<div class="detail-field full-width" v-for="item in detailData.compositions" :key="item.id">
|
||||||
<div class="detail-field full-width">
|
<div class="field-label">{{ item.compositionFileName || '--' }}</div>
|
||||||
<div class="field-label">招标文件</div>
|
<div class="file-value" @click="viewFile(item)">{{ getFirstFileName(item) }}</div>
|
||||||
<div class="file-value">{{ detailData.proDescription || '--' }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -77,7 +76,7 @@
|
||||||
<el-row :gutter="12">
|
<el-row :gutter="12">
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<TableModel :showSearch="false" :showOperation="false" :showRightTools="false"
|
<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"
|
:sendParams="sendParams" :handleColWidth="180" :isRadioShow="true"
|
||||||
@radio-change="handleRadioChange" :indexNumShow="false" :isShowtableCardStyle="false">
|
@radio-change="handleRadioChange" :indexNumShow="false" :isShowtableCardStyle="false">
|
||||||
<template slot="tableTitle">
|
<template slot="tableTitle">
|
||||||
|
|
@ -121,17 +120,18 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<ViewFile v-if="dialogVisible" :file="fileData" @closeDialog="handleCloseDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { decryptWithSM4 } from '@/utils/sm'
|
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 { formLabel, detailColumnsList } from '../config'
|
||||||
import TableModel from '@/components/TableModel2'
|
import TableModel from '@/components/TableModel2'
|
||||||
import request from '@/utils/request'
|
|
||||||
import BidForm from './BidForm.vue'
|
import BidForm from './BidForm.vue'
|
||||||
import UploadMoreFile from '@/views/common/UploadMoreFile.vue'
|
import UploadMoreFile from '@/views/common/UploadMoreFile.vue'
|
||||||
|
import ViewFile from '@/views/common/ViewFile.vue';
|
||||||
// 默认参数
|
// 默认参数
|
||||||
const defaultParams = {
|
const defaultParams = {
|
||||||
fileUploadRule: {
|
fileUploadRule: {
|
||||||
|
|
@ -148,17 +148,18 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
TableModel,
|
TableModel,
|
||||||
BidForm,
|
BidForm,
|
||||||
UploadMoreFile
|
UploadMoreFile,
|
||||||
|
ViewFile
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formLabel,
|
formLabel,
|
||||||
detailColumnsList,
|
detailColumnsList,
|
||||||
listAPI,
|
getBidListAPI,
|
||||||
proId: '',
|
proId: '',
|
||||||
detailData: {},
|
detailData: {},
|
||||||
sendParams: {
|
sendParams: {
|
||||||
enterpriseId: 2
|
proId: decryptWithSM4(this.$route.query.proId),
|
||||||
},
|
},
|
||||||
defaultParams,
|
defaultParams,
|
||||||
selectedRow: {},
|
selectedRow: {},
|
||||||
|
|
@ -167,6 +168,9 @@ export default {
|
||||||
delFileList: []
|
delFileList: []
|
||||||
},
|
},
|
||||||
rules: {},
|
rules: {},
|
||||||
|
dialogVisible:false,
|
||||||
|
fileData:{}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -210,44 +214,31 @@ export default {
|
||||||
// 获取详情数据
|
// 获取详情数据
|
||||||
async getDetail() {
|
async getDetail() {
|
||||||
try {
|
try {
|
||||||
// TODO: 根据实际API接口调整
|
const res = await getProDetailAPI({ proId: this.proId, queryType: 2 })
|
||||||
const res = await request({
|
console.log('res:', res);
|
||||||
url: '/smartBid/analysis/detail',
|
|
||||||
method: 'GET',
|
|
||||||
params: { proId: this.proId }
|
|
||||||
})
|
|
||||||
// 或者使用 getDetailDataAPI,需要根据实际接口调整
|
|
||||||
// const res = await getDetailDataAPI({ proId: this.proId })
|
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.detailData = res.data || {}
|
this.detailData = res.data || {}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg || '获取详情失败')
|
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) {
|
} catch (error) {
|
||||||
console.error('获取详情失败:', 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() {
|
handleClose() {
|
||||||
const obj = { path: "/analysis" }
|
const obj = { path: "/analysis" }
|
||||||
|
|
@ -515,6 +506,7 @@ export default {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #1f72ea;
|
color: #1f72ea;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -546,4 +538,5 @@ export default {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -13,11 +13,16 @@
|
||||||
:showRightTools="false"
|
:showRightTools="false"
|
||||||
ref="analysisTableRef"
|
ref="analysisTableRef"
|
||||||
:columnsList="bidListColumnsList"
|
:columnsList="bidListColumnsList"
|
||||||
:request-api="listAPI"
|
:request-api="getBidListAPI"
|
||||||
:sendParams="sendParams"
|
:sendParams="sendParams"
|
||||||
:handleColWidth="200"
|
:handleColWidth="200"
|
||||||
:isShowtableCardStyle="false"
|
: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">
|
<template slot="tableTitle">
|
||||||
<h3>数据列表</h3>
|
<h3>数据列表</h3>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -40,7 +45,8 @@
|
||||||
import TableModel from '@/components/TableModel2'
|
import TableModel from '@/components/TableModel2'
|
||||||
import { bidListColumnsList, bidFormLabel } from '../config'
|
import { bidListColumnsList, bidFormLabel } from '../config'
|
||||||
import { encryptWithSM4 } from '@/utils/sm'
|
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 {
|
export default {
|
||||||
name: 'AnalysisBidIndex',
|
name: 'AnalysisBidIndex',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -50,9 +56,9 @@ export default {
|
||||||
return {
|
return {
|
||||||
bidFormLabel,
|
bidFormLabel,
|
||||||
bidListColumnsList,
|
bidListColumnsList,
|
||||||
listAPI,
|
getBidListAPI,
|
||||||
sendParams: {
|
sendParams: {
|
||||||
enterpriseId: 2
|
proId: decryptWithSM4(this.$route.query.proId)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,14 @@
|
||||||
<el-card class="analysis-detail-card">
|
<el-card class="analysis-detail-card">
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="项目信息">
|
<div class="card-header-left">
|
||||||
<h3>项目信息</h3>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="analysis-detail-content">
|
<div class="analysis-detail-content">
|
||||||
|
|
@ -33,7 +39,7 @@
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
<div class="detail-field">
|
<div class="detail-field">
|
||||||
<div class="field-label">招标人</div>
|
<div class="field-label">招标人</div>
|
||||||
<div class="field-value">{{ detailData.bidder || '--' }}</div>
|
<div class="field-value">{{ detailData.tenderer || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
|
|
@ -48,13 +54,13 @@
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
<div class="detail-field">
|
<div class="detail-field">
|
||||||
<div class="field-label">开标时间</div>
|
<div class="field-label">开标时间</div>
|
||||||
<div class="field-value">{{ detailData.openTime || '--' }}</div>
|
<div class="field-value">{{ detailData.bidOpeningTime || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="detail-col">
|
<el-col :span="12" class="detail-col">
|
||||||
<div class="detail-field">
|
<div class="detail-field">
|
||||||
<div class="field-label">开标方式</div>
|
<div class="field-label">开标方式</div>
|
||||||
<div class="field-value">{{ detailData.openMethod || '--' }}</div>
|
<div class="field-value">{{ detailData.bidOpeningMethod || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -62,14 +68,14 @@
|
||||||
<!-- 项目简介 - 占满宽度 -->
|
<!-- 项目简介 - 占满宽度 -->
|
||||||
<div class="detail-field full-width">
|
<div class="detail-field full-width">
|
||||||
<div class="field-label">项目简介</div>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<TableModel :showSearch="false" :showOperation="true" :showRightTools="false" ref="detailTableRef"
|
<TableModel :showSearch="false" :showOperation="true" :showRightTools="false" ref="detailTableRef"
|
||||||
:columnsList="detailColumnsList" :request-api="listAPI" :sendParams="sendParams"
|
:columnsList="detailColumnsList" :request-api="getBidListAPI" :sendParams="sendParams"
|
||||||
:handleColWidth="180" :isShowtableCardStyle="false">
|
:handleColWidth="180" :isShowtableCardStyle="false" :autoLoad="true">
|
||||||
<template slot="tableTitle">
|
<template slot="tableTitle">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="标的信息">
|
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="标的信息">
|
||||||
|
|
@ -86,84 +92,62 @@
|
||||||
</TableModel>
|
</TableModel>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { decryptWithSM4 } from '@/utils/sm'
|
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 { formLabel, detailColumnsList } from '../config'
|
||||||
import TableModel from '@/components/TableModel2'
|
import TableModel from '@/components/TableModel2'
|
||||||
import request from '@/utils/request'
|
|
||||||
import BidForm from './BidForm.vue'
|
import BidForm from './BidForm.vue'
|
||||||
|
import ProForm from './ProForm.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AnalysisDetail',
|
name: 'AnalysisDetail',
|
||||||
components: {
|
components: {
|
||||||
TableModel,
|
TableModel,
|
||||||
BidForm
|
BidForm,
|
||||||
|
ProForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formLabel,
|
formLabel,
|
||||||
detailColumnsList,
|
detailColumnsList,
|
||||||
listAPI,
|
getBidListAPI,
|
||||||
proId: '',
|
proId: decryptWithSM4(this.$route.query.proId),
|
||||||
detailData: {},
|
detailData: {},
|
||||||
sendParams: {
|
sendParams: {
|
||||||
enterpriseId: 2
|
proId: decryptWithSM4(this.$route.query.proId),
|
||||||
},
|
},
|
||||||
showBidForm: false,
|
showBidForm: false,
|
||||||
|
showProForm: false,
|
||||||
title: '',
|
title: '',
|
||||||
rowData: {},
|
rowData: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.proId = decryptWithSM4(this.$route.query.proId)
|
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取详情数据
|
// 获取详情数据
|
||||||
async getDetail() {
|
async getDetail() {
|
||||||
try {
|
try {
|
||||||
// TODO: 根据实际API接口调整
|
const res = await getProDetailAPI({ proId: this.proId })
|
||||||
const res = await request({
|
console.log('res:', res);
|
||||||
url: '/smartBid/analysis/detail',
|
|
||||||
method: 'GET',
|
|
||||||
params: { proId: this.proId }
|
|
||||||
})
|
|
||||||
// 或者使用 getDetailDataAPI,需要根据实际接口调整
|
|
||||||
// const res = await getDetailDataAPI({ proId: this.proId })
|
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.detailData = res.data || {}
|
this.detailData = res.data || {}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg || '获取详情失败')
|
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) {
|
} catch (error) {
|
||||||
console.error('获取详情失败:', 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" }
|
const obj = { path: "/analysis" }
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj)
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑标段
|
||||||
handleUpdate(data) {
|
handleUpdate(data) {
|
||||||
this.title = '编辑'
|
this.title = '编辑'
|
||||||
this.rowData = data
|
this.rowData = data
|
||||||
this.showBidForm = true
|
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>
|
</script>
|
||||||
|
|
@ -265,8 +266,15 @@ export default {
|
||||||
.card-header {
|
.card-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
||||||
|
.card-header-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.header-icon {
|
.header-icon {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
|
|
@ -278,6 +286,17 @@ export default {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit-btn {
|
||||||
|
color: #409EFF;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #66b1ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.analysis-detail-content {
|
.analysis-detail-content {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 小型弹窗,用于完成,删除,保存等操作 -->
|
<!-- 小型弹窗,用于完成,删除,保存等操作 -->
|
||||||
<el-dialog class="l-dialog" :class="[lDialog, { 'no-pointer-events': showUploadAnimation }]" :title="title" :visible.sync="dialogVisible" :showClose="true"
|
<el-dialog class="l-dialog" :class="[lDialog, { 'no-pointer-events': showUploadAnimation }]" :title="title"
|
||||||
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
:visible.sync="dialogVisible" :showClose="true" :closeOnClickModal="false" @close="handleClose"
|
||||||
|
:append-to-body="true">
|
||||||
<div>
|
<div>
|
||||||
<!-- 全局上传动画 -->
|
<!-- 全局上传动画 -->
|
||||||
<GlobalUploadAnimation v-if="showUploadAnimation" :text="animationText" subtext="正在处理文件,请稍候..." />
|
<GlobalUploadAnimation v-if="showUploadAnimation" :text="animationText" subtext="正在处理文件,请稍候..." />
|
||||||
|
|
@ -38,7 +39,7 @@ import { addDataAPI } from '@/api/analysis/analysis'
|
||||||
// 默认参数
|
// 默认参数
|
||||||
const defaultParams = {
|
const defaultParams = {
|
||||||
fileUploadRule: {
|
fileUploadRule: {
|
||||||
fileUploadType: 'bidding',
|
fileUploadType: 'pro_composition',
|
||||||
fields_json: '',
|
fields_json: '',
|
||||||
suffix: 'analysis_database',
|
suffix: 'analysis_database',
|
||||||
},
|
},
|
||||||
|
|
@ -190,14 +191,18 @@ export default {
|
||||||
async submitForm(formName) {
|
async submitForm(formName) {
|
||||||
try {
|
try {
|
||||||
const data = await this.validate(formName)
|
const data = await this.validate(formName)
|
||||||
|
console.log('data:', data);
|
||||||
|
|
||||||
// 所有校验通过,组装完整数据
|
// 所有校验通过,组装完整数据
|
||||||
let formData = {
|
let formData = {
|
||||||
...data,
|
...data,
|
||||||
allFiles: [
|
allFiles: Object.keys(data)
|
||||||
...data.fileList.map((file) =>
|
.filter(key => key.startsWith('fileList'))
|
||||||
JSON.parse(JSON.stringify(file)),
|
.flatMap(key =>
|
||||||
|
(data[key] || []).map(file =>
|
||||||
|
JSON.parse(JSON.stringify(file))
|
||||||
|
)
|
||||||
),
|
),
|
||||||
],
|
|
||||||
delFiles: [...data.delFileList],
|
delFiles: [...data.delFileList],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,7 +216,11 @@ export default {
|
||||||
})
|
})
|
||||||
.filter((item) => item !== null)
|
.filter((item) => item !== null)
|
||||||
formData.files = allFiles
|
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.delFileList
|
||||||
delete formData.allFiles
|
delete formData.allFiles
|
||||||
// 显示遮罩层
|
// 显示遮罩层
|
||||||
|
|
@ -223,12 +232,12 @@ export default {
|
||||||
this.$el.querySelector('.el-dialog') || document.body,
|
this.$el.querySelector('.el-dialog') || document.body,
|
||||||
})
|
})
|
||||||
console.log('所有表单校验通过,完整数据:', formData)
|
console.log('所有表单校验通过,完整数据:', formData)
|
||||||
/* const res = await this.saveData(formData)
|
const res = await this.saveData(formData)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.handleReuslt(res)
|
this.handleReuslt(res)
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
} */
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
} finally {
|
} finally {
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
|
|
@ -240,16 +249,14 @@ export default {
|
||||||
// 保存接口
|
// 保存接口
|
||||||
async saveData(formData) {
|
async saveData(formData) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (this.isAdd === 'add') {
|
// 新增
|
||||||
// 新增
|
addDataAPI(formData)
|
||||||
addDataAPI(formData)
|
.then((res) => {
|
||||||
.then((res) => {
|
resolve(res)
|
||||||
resolve(res)
|
})
|
||||||
})
|
.catch((error) => {
|
||||||
.catch((error) => {
|
reject(error)
|
||||||
reject(error)
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 开始上传
|
// 开始上传
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标段编号" prop="bidNumber">
|
<el-form-item label="标段编号" prop="bidNumber">
|
||||||
<el-input v-model.trim="form.bidNumber" placeholder="请输入标段编号" clearable show-word-limit
|
<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>
|
||||||
<el-form-item label="标段名称" prop="bidName">
|
<el-form-item label="标段名称" prop="bidName">
|
||||||
<el-input v-model.trim="form.bidName" placeholder="请输入标段名称" clearable show-word-limit
|
<el-input v-model.trim="form.bidName" placeholder="请输入标段名称" clearable show-word-limit
|
||||||
|
|
@ -34,11 +34,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="招标阶段" prop="biddingStage">
|
<el-form-item label="招标阶段" prop="biddingStage">
|
||||||
<el-input v-model.trim="form.biddingStage" placeholder="请输入招标阶段" clearable show-word-limit
|
<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>
|
||||||
<el-form-item label="工期" prop="duration">
|
<el-form-item label="工期" prop="duration">
|
||||||
<el-input v-model.trim="form.duration" placeholder="请输入工期" clearable show-word-limit
|
<el-input type="textarea" v-model.trim="form.duration" placeholder="请输入工期" clearable show-word-limit
|
||||||
maxlength="64"></el-input>
|
:autosize="{ minRows: 3, maxRows: 5 }" maxlength="128"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -51,26 +51,16 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
import { editBidDataAPI } from '@/api/analysis/analysis'
|
||||||
export default {
|
export default {
|
||||||
name: 'BidForm',
|
name: 'BidForm',
|
||||||
|
|
||||||
props: ['width', 'rowData', 'title'],
|
props: ['width', 'rowData', 'title'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lDialog: this.width > 500 ? 'w700' : 'w500',
|
lDialog: this.width > 500 ? 'w700' : 'w500',
|
||||||
dialogVisible: true,
|
dialogVisible: true,
|
||||||
|
|
||||||
form: {
|
form: {
|
||||||
markName: '',
|
|
||||||
unit: '',
|
|
||||||
bidNumber: '',
|
|
||||||
bidName: '',
|
|
||||||
maximumBidLimit: '',
|
|
||||||
safetyConstFee: '',
|
|
||||||
bidBond: '',
|
|
||||||
biddingStage: '',
|
|
||||||
duration: '',
|
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
markName: [
|
markName: [
|
||||||
|
|
@ -139,9 +129,28 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.initFormData()
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
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() {
|
handleClose() {
|
||||||
|
|
@ -156,12 +165,16 @@ export default {
|
||||||
/**重置表单*/
|
/**重置表单*/
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
bidId: null,
|
||||||
pid: null,
|
markName: '',
|
||||||
templateId: null,
|
unit: '',
|
||||||
fileList: [],
|
bidNumber: '',
|
||||||
delFileList: [],
|
bidName: '',
|
||||||
remark: '',
|
maximumBidLimit: '',
|
||||||
|
safetyConstFee: '',
|
||||||
|
bidBond: '',
|
||||||
|
biddingStage: '',
|
||||||
|
duration: '',
|
||||||
}
|
}
|
||||||
this.resetForm('ruleForm')
|
this.resetForm('ruleForm')
|
||||||
},
|
},
|
||||||
|
|
@ -186,30 +199,12 @@ export default {
|
||||||
async submitForm(formName) {
|
async submitForm(formName) {
|
||||||
try {
|
try {
|
||||||
const data = await this.validate(formName)
|
const data = await this.validate(formName)
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
// 所有校验通过,组装完整数据
|
// 所有校验通过,组装完整数据
|
||||||
let formData = {
|
let formData = {
|
||||||
...data,
|
...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({
|
this.loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
|
|
@ -219,12 +214,12 @@ export default {
|
||||||
this.$el.querySelector('.el-dialog') || document.body,
|
this.$el.querySelector('.el-dialog') || document.body,
|
||||||
})
|
})
|
||||||
console.log('所有表单校验通过,完整数据:', formData)
|
console.log('所有表单校验通过,完整数据:', formData)
|
||||||
/* const res = await this.saveData(formData)
|
const res = await this.saveData(formData)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.handleReuslt(res)
|
this.handleReuslt(res)
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
} */
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
} finally {
|
} finally {
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
|
|
@ -236,25 +231,14 @@ export default {
|
||||||
// 保存接口
|
// 保存接口
|
||||||
async saveData(formData) {
|
async saveData(formData) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (this.isAdd === 'add') {
|
// 修改
|
||||||
// 新增
|
editBidDataAPI(formData)
|
||||||
addDataAPI(formData)
|
.then((res) => {
|
||||||
.then((res) => {
|
resolve(res)
|
||||||
resolve(res)
|
})
|
||||||
})
|
.catch((error) => {
|
||||||
.catch((error) => {
|
reject(error)
|
||||||
reject(error)
|
})
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 修改
|
|
||||||
editDataAPI(formData)
|
|
||||||
.then((res) => {
|
|
||||||
resolve(res)
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
reject(error)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -295,7 +279,7 @@ export default {
|
||||||
.w700 ::v-deep .el-dialog__header {
|
.w700 ::v-deep .el-dialog__header {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-bottom: 1px solid #EBEEF5;
|
border-bottom: 1px solid #EBEEF5;
|
||||||
|
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
font-size: 16px;
|
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
|
isShow: false, // 是否展示label
|
||||||
f_type: 'ipt',
|
f_type: 'ipt',
|
||||||
f_label: '标的名称',
|
f_label: '标的名称',
|
||||||
f_model: 'proName',
|
f_model: 'markName',
|
||||||
f_max: 32,
|
f_max: 32,
|
||||||
f_width: '250px',
|
f_width: '250px',
|
||||||
},
|
},
|
||||||
|
|
@ -38,7 +38,7 @@ export const bidFormLabel = [
|
||||||
isShow: false, // 是否展示label
|
isShow: false, // 是否展示label
|
||||||
f_type: 'ipt',
|
f_type: 'ipt',
|
||||||
f_label: '标段名称',
|
f_label: '标段名称',
|
||||||
f_model: 'personName',
|
f_model: 'bidName',
|
||||||
f_max: 32,
|
f_max: 32,
|
||||||
f_width: '250px',
|
f_width: '250px',
|
||||||
},
|
},
|
||||||
|
|
@ -46,7 +46,7 @@ export const bidFormLabel = [
|
||||||
isShow: false, // 是否展示label
|
isShow: false, // 是否展示label
|
||||||
f_type: 'sel',
|
f_type: 'sel',
|
||||||
f_label: '解析状态',
|
f_label: '解析状态',
|
||||||
f_model: 'analysisStatus',
|
f_model: 'parsingState',
|
||||||
f_selList: [
|
f_selList: [
|
||||||
{ label: '解析中', value: 0 },
|
{ label: '解析中', value: 0 },
|
||||||
{ label: '解析成功', value: 1 },
|
{ label: '解析成功', value: 1 },
|
||||||
|
|
@ -69,26 +69,26 @@ export const columnsList = [
|
||||||
]
|
]
|
||||||
|
|
||||||
export const detailColumnsList = [
|
export const detailColumnsList = [
|
||||||
{ t_props: 'toolName', t_label: '标的名称' },
|
{ t_props: 'markName', t_label: '标的名称' },
|
||||||
{ t_props: 'model', t_label: '单位' },
|
{ t_props: 'unit', t_label: '单位' },
|
||||||
{ t_props: 'unit', t_label: '标段标号' },
|
{ t_props: 'bidNumber', t_label: '标段标号' },
|
||||||
{ t_props: 'technicalParameters', t_label: '标段名称' },
|
{ t_props: 'bidName', t_label: '标段名称' },
|
||||||
{ t_props: 'mainFunction', t_label: '最高投标限价(万元)' },
|
{ t_props: 'maximumBidLimit', t_label: '最高投标限价(万元)' },
|
||||||
{ t_props: 'mainFunction', t_label: '安全文明施工费(万元)' },
|
{ t_props: 'safetyConstFee', t_label: '安全文明施工费(万元)' },
|
||||||
{ t_props: 'mainFunction', t_label: '投标保证金(万元)' },
|
{ t_props: 'bidBond', t_label: '投标保证金(万元)' },
|
||||||
{ t_props: 'mainFunction', t_label: '工期' },
|
{ t_props: 'duration', t_label: '工期' },
|
||||||
{ t_props: 'mainFunction', t_label: '招标阶段' },
|
{ t_props: 'biddingStage', t_label: '招标阶段' },
|
||||||
]
|
]
|
||||||
|
|
||||||
export const bidListColumnsList = [
|
export const bidListColumnsList = [
|
||||||
{ t_props: 'toolName', t_label: '标的名称' },
|
{ t_props: 'markName', t_label: '标的名称' },
|
||||||
{ t_props: 'model', t_label: '单位' },
|
{ t_props: 'unit', t_label: '单位' },
|
||||||
{ t_props: 'unit', t_label: '标段标号' },
|
{ t_props: 'bidNumber', t_label: '标段标号' },
|
||||||
{ t_props: 'technicalParameters', t_label: '标段名称' },
|
{ t_props: 'bidName', t_label: '标段名称' },
|
||||||
{ t_props: 'mainFunction', t_label: '最高投标限价(万元)' },
|
{ t_props: 'maximumBidLimit', t_label: '最高投标限价(万元)' },
|
||||||
{ t_props: 'mainFunction', t_label: '安全文明施工费(万元)' },
|
{ t_props: 'safetyConstFee', t_label: '安全文明施工费(万元)' },
|
||||||
{ t_props: 'mainFunction', t_label: '投标保证金(万元)' },
|
{ t_props: 'bidBond', t_label: '投标保证金(万元)' },
|
||||||
{ t_props: 'mainFunction', t_label: '工期' },
|
{ t_props: 'duration', t_label: '工期' },
|
||||||
{ t_props: 'mainFunction', t_label: '招标阶段' },
|
{ t_props: 'biddingStage', t_label: '招标阶段' },
|
||||||
{ t_props: 'mainFunction', t_label: '解析状态' }
|
{ t_slot: 'parsingState', t_label: '解析状态' }
|
||||||
]
|
]
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 新建项目 -->
|
<!-- 新建项目 -->
|
||||||
<AnalysisForm v-if="showAnalysisForm" :title="title" :row="row" @closeDialog="showAnalysisForm = false"
|
<AnalysisForm v-if="showAnalysisForm" :title="title" :row="row" @closeDialog="showAnalysisForm = false"
|
||||||
:width="600" />
|
:width="600" @handleQuery="handleQuery" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ export default {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'AnalysisDetail',
|
name: 'AnalysisDetail',
|
||||||
query: {
|
query: {
|
||||||
proId: encryptWithSM4('2'),
|
proId: encryptWithSM4(row.proId + '' || '0'),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -155,7 +155,7 @@ export default {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'AnalysisBidDetail',
|
name: 'AnalysisBidDetail',
|
||||||
query: {
|
query: {
|
||||||
proId: encryptWithSM4('2'),
|
proId: encryptWithSM4(row.proId + '' || '0'),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -164,7 +164,7 @@ export default {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'AnalysisBidIndex',
|
name: 'AnalysisBidIndex',
|
||||||
query: {
|
query: {
|
||||||
proId: encryptWithSM4('2'),
|
proId: encryptWithSM4(row.proId + '' || '0'),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -32,32 +32,28 @@
|
||||||
|
|
||||||
<!-- 空状态 -->
|
<!-- 空状态 -->
|
||||||
<span v-else class="empty-text">--</span>
|
<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"
|
<OnlyOfficeViewer :document-url="documentUrl" :document-title="documentTitle"
|
||||||
:document-key="documentKey" :mode="mode" :type="type" @document-ready="handleDocumentReady"
|
:document-key="documentKey" :mode="mode" :type="type" @document-ready="handleDocumentReady"
|
||||||
@app-ready="handleAppReady" @error="handleError" @initialized="handleInitialized" :force-save="true"
|
@app-ready="handleAppReady" @error="handleError" @initialized="handleInitialized" :force-save="true"
|
||||||
:save-timeout="15000" />
|
:save-timeout="15000" />
|
||||||
</el-dialog>
|
</el-dialog> -->
|
||||||
|
<ViewFile v-if="dialogVisible" :file="fileData" @closeDialog="handleCloseDialog" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import OnlyOfficeViewer from './OnlyOfficeViewer';
|
import ViewFile from './ViewFile';
|
||||||
export default {
|
export default {
|
||||||
name: 'FileOrImageDisplay',
|
name: 'FileOrImageDisplay',
|
||||||
components: {
|
components: {
|
||||||
OnlyOfficeViewer
|
ViewFile
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
documentUrl: '',
|
fileData: {},
|
||||||
documentTitle: '',
|
|
||||||
documentKey: '',
|
|
||||||
mode: 'view',
|
|
||||||
type: 'desktop',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -141,9 +137,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 文件点击事件
|
// 文件点击事件
|
||||||
handleFileClick() {
|
handleFileClick() {
|
||||||
this.documentUrl = this.file.filePath
|
console.log(this.file);
|
||||||
this.documentTitle = this.file.name
|
|
||||||
this.documentKey = this.file.id + ''
|
this.fileData = this.file
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
// 图片点击事件
|
// 图片点击事件
|
||||||
|
|
@ -162,6 +158,10 @@ export default {
|
||||||
handleInitialized() {
|
handleInitialized() {
|
||||||
console.log('初始化完成')
|
console.log('初始化完成')
|
||||||
},
|
},
|
||||||
|
handleCloseDialog() {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.fileData = {}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</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>
|
</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,
|
name: item.fileName,
|
||||||
filePath: item.filePath,
|
filePath: item.filePath,
|
||||||
lsFilePath: item.lsFilePath,
|
lsFilePath: item.lsFilePath,
|
||||||
fileType: item.fileType
|
fileType: item.fileType,
|
||||||
|
id: item.sourceId
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,12 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableModel>
|
</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"
|
<OnlyOfficeViewer :document-url="documentUrl" :document-title="documentTitle" :document-key="documentKey"
|
||||||
:mode="mode" :type="type" @document-ready="handleDocumentReady" @app-ready="handleAppReady"
|
:mode="mode" :type="type" @document-ready="handleDocumentReady" @app-ready="handleAppReady"
|
||||||
@error="handleError" @initialized="handleInitialized" :force-save="true" :save-timeout="15000" />
|
@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>
|
</template>
|
||||||
|
|
||||||
|
|
@ -44,13 +45,13 @@ import TableModel from '@/components/TableModel2'
|
||||||
import { columnsList, formLabel } from './config'
|
import { columnsList, formLabel } from './config'
|
||||||
import { listAPI, delDataAPI } from '@/api/enterpriseLibrary/technical/technical'
|
import { listAPI, delDataAPI } from '@/api/enterpriseLibrary/technical/technical'
|
||||||
import { encryptWithSM4 } from '@/utils/sm'
|
import { encryptWithSM4 } from '@/utils/sm'
|
||||||
import OnlyOfficeViewer from '@/views/common/OnlyOfficeViewer'
|
import ViewFile from '@/views/common/ViewFile'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RightTableTechnical',
|
name: 'RightTableTechnical',
|
||||||
components: {
|
components: {
|
||||||
TableModel,
|
TableModel,
|
||||||
OnlyOfficeViewer
|
ViewFile
|
||||||
},
|
},
|
||||||
dicts: ['construction_nature', 'structural_form', 'basic_form'],
|
dicts: ['construction_nature', 'structural_form', 'basic_form'],
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -69,11 +70,7 @@ export default {
|
||||||
columnsList,
|
columnsList,
|
||||||
listAPI,
|
listAPI,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
documentUrl: '',
|
fileData: {},
|
||||||
documentTitle: '',
|
|
||||||
documentKey: '',
|
|
||||||
mode: 'view',
|
|
||||||
type: 'desktop',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -157,22 +154,17 @@ export default {
|
||||||
/** 查看文件 */
|
/** 查看文件 */
|
||||||
viewFile(row) {
|
viewFile(row) {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
this.documentTitle = row.technicalName
|
this.fileData = {
|
||||||
this.documentKey = row.resourceFileVoList?.[0]?.sourceId + ''
|
fileName: row.technicalName,
|
||||||
|
id: row.resourceFileVoList?.[0]?.sourceId + ''
|
||||||
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
handleDocumentReady() {
|
handleCloseDialog() {
|
||||||
console.log('文档已准备就绪')
|
this.dialogVisible = false
|
||||||
},
|
this.fileData = {}
|
||||||
handleAppReady() {
|
|
||||||
console.log('应用已准备就绪')
|
|
||||||
},
|
|
||||||
handleError(error) {
|
|
||||||
console.log('错误:', error)
|
|
||||||
},
|
|
||||||
handleInitialized() {
|
|
||||||
console.log('初始化完成')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 删除操作 */
|
/** 删除操作 */
|
||||||
handleDelete(raw) {
|
handleDelete(raw) {
|
||||||
this.$confirm(`确定要删除方案名称"${raw.technicalName}"吗?删除后将无法恢复!`, '操作提示', {
|
this.$confirm(`确定要删除方案名称"${raw.technicalName}"吗?删除后将无法恢复!`, '操作提示', {
|
||||||
|
|
@ -242,21 +234,4 @@ export default {
|
||||||
margin-right: 0;
|
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>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue