背景色替换

This commit is contained in:
cwchen 2025-11-05 14:16:09 +08:00
parent 789b3c64ef
commit 4146159e5e
24 changed files with 560 additions and 25 deletions

View File

@ -207,6 +207,10 @@ export default {
type: Number,
default: 200
},
showSearch: {
type: Boolean,
default: true
},
},
computed: {
/* 根据操作栏控制表头是否显示 */
@ -268,7 +272,7 @@ export default {
//
total: 0,
//
showSearch: true,
//
selectionShow: true,
//

View File

@ -1,14 +1,294 @@
<template>
<div>
<h1>AnalysisDetail</h1>
<div class="analysis-detail-container">
<div class="content-header">
<el-button class="reset-btn" @click="handleClose">返回</el-button>
</div>
<el-card class="analysis-detail-card">
<template slot="header">
<div class="card-header">
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="项目信息">
<h3>项目信息</h3>
</div>
</template>
<div class="analysis-detail-content">
<!-- 两列布局的字段 -->
<el-row :gutter="24" class="detail-row">
<el-col :span="12" class="detail-col">
<div class="detail-field">
<div class="field-label">项目名称</div>
<div class="field-value">{{ detailData.proName || '--' }}</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.proCode || '--' }}</div>
</div>
</el-col>
</el-row>
<el-row :gutter="24" class="detail-row">
<el-col :span="12" class="detail-col">
<div class="detail-field">
<div class="field-label">招标人</div>
<div class="field-value">{{ detailData.bidder || '--' }}</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.agency || '--' }}</div>
</div>
</el-col>
</el-row>
<el-row :gutter="24" class="detail-row">
<el-col :span="12" class="detail-col">
<div class="detail-field">
<div class="field-label">开标时间</div>
<div class="field-value">{{ detailData.openTime || '--' }}</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>
</el-col>
</el-row>
<!-- 项目简介 - 占满宽度 -->
<div class="detail-field full-width">
<div class="field-label">项目简介</div>
<div class="field-value description-value">{{ detailData.proDescription || '--' }}</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">
<template slot="tableTitle">
<div class="card-header">
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="标的信息">
<h3>标的信息</h3>
</div>
</template>
<template slot="handle" slot-scope="{ data }">
<el-button type="text" v-hasPermi="['enterpriseLibrary:analysis:edit']" class="action-btn" style="#FE9400"
@click="handleUpdate(data)">
修改
</el-button>
</template>
</TableModel>
</div>
<BidForm v-if="showBidForm" :width="600" :rowData="detailData" :title="title" @closeDialog="showBidForm = false"/>
</div>
</template>
<script>
import { decryptWithSM4 } from '@/utils/sm'
import { listAPI, delDataAPI } from '@/api/analysis/analysis'
import { formLabel, detailColumnsList } from '../config'
import TableModel from '@/components/TableModel2'
import request from '@/utils/request'
import BidForm from './BidForm.vue'
export default {
name: 'AnalysisDetail'
name: 'AnalysisDetail',
components: {
TableModel,
BidForm
},
data() {
return {
formLabel,
detailColumnsList,
listAPI,
proId: '',
detailData: {},
sendParams: {
enterpriseId: 2
},
showBidForm: 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 })
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日历天不等计划总投资额约...'
}
}
},
//
handleClose() {
const obj = { path: "/analysis" }
this.$tab.closeOpenPage(obj)
},
//
handleUpdate(data) {
this.title = '编辑'
this.rowData = data
this.showBidForm = true
}
}
}
</script>
<style scoped lang="scss">
<style scoped lang="scss">
.analysis-detail-container {
padding: 24px;
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
}
.content-header {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 20px;
gap: 12px;
}
.reset-btn {
width: 98px;
height: 36px;
background: #FFFFFF;
box-shadow: 0px 4px 8px 0px rgba(76, 76, 76, 0.2);
border-radius: 4px;
border: none;
color: #606266;
font-weight: 600;
font-size: 14px;
transition: all 0.3s ease;
cursor: pointer;
&:hover {
background: #f5f7fa;
color: #409EFF;
box-shadow: 0px 6px 12px 0px rgba(76, 76, 76, 0.3);
}
}
.analysis-detail-card {
background: #fff;
border-radius: 8px;
box-shadow: 0px 4px 20px 0px rgba(31, 35, 55, 0.1);
border: none;
margin-bottom: 10px;
::v-deep .el-card__header {
padding: 20px 24px;
border-bottom: 1px solid #EBEEF5;
}
::v-deep .el-card__body {
padding: 24px;
}
}
.card-header {
display: flex;
align-items: center;
gap: 8px;
.header-icon {
font-size: 20px;
color: #409EFF;
}
h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #303133;
}
}
.analysis-detail-content {
.detail-row {
margin-bottom: 20px;
&:last-of-type {
margin-bottom: 0;
}
}
.detail-col {
margin-bottom: 20px;
}
.detail-field {
.field-label {
color: #606266;
font-size: 14px;
font-weight: 500;
margin-bottom: 8px;
line-height: 1.5;
}
.field-value {
background: #f5f7fa;
border-radius: 4px;
padding: 12px 16px;
color: #303133;
font-size: 14px;
line-height: 1.5;
min-height: 20px;
word-break: break-word;
}
&.full-width {
margin-bottom: 0;
.description-value {
min-height: 80px;
white-space: pre-wrap;
word-wrap: break-word;
}
}
}
}
</style>

View File

@ -0,0 +1,239 @@
<template>
<!-- 小型弹窗用于完成删除保存等操作 -->
<el-dialog class="l-dialog" :class="lDialog" :title="title" :visible.sync="dialogVisible" :showClose="true"
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
<div>
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
<el-form-item label="标的名称" prop="markName">
<el-input v-model.trim="form.markName" placeholder="请输入标的名称" clearable show-word-limit
maxlength="64"></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'
export default {
name: 'BidForm',
props: ['width', 'rowData', 'title'],
data() {
return {
lDialog: this.width > 500 ? 'w700' : 'w500',
dialogVisible: true,
form: {
markName: '',
},
rules: {
markName: [
{
required: true,
message: '请输入标的名称',
trigger: 'blur',
},
],
},
}
},
methods: {
/*关闭弹窗 */
handleClose() {
this.dialogVisible = false
this.$emit('closeDialog')
},
/**确认弹窗 */
sureBtnClick() {
this.dialogVisible = false
this.$emit('closeDialog')
},
/**重置表单*/
reset() {
this.form = {
id: null,
pid: null,
templateId: null,
fileList: [],
delFileList: [],
remark: '',
}
this.resetForm('ruleForm')
},
handleReuslt(res) {
this.$modal.msgSuccess(res.msg)
this.reset()
this.$emit('handleQuery')
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,
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,
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) => {
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)
})
}
})
},
},
}
</script>
<style lang="scss" scoped>
.w700 ::v-deep .el-dialog {
width: 700px;
font-family: Source Han Sans CN, Source Han Sans CN;
}
.w500 ::v-deep .el-dialog {
width: 500px;
font-family: Source Han Sans CN, Source Han Sans CN;
}
.w500 ::v-deep .el-dialog__header,
.w700 ::v-deep .el-dialog__header {
.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;
}
</style>

View File

@ -36,3 +36,15 @@ export const columnsList = [
{ t_props: 'mainFunction', t_label: '解析状态' },
{ t_props: 'mainFunction', t_label: '创建时间' },
]
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: '招标阶段' },
]

View File

@ -150,7 +150,7 @@ export default {
.analysis-container {
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
// background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}
::v-deep .table-card {

View File

@ -76,7 +76,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
}

View File

@ -204,7 +204,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;

View File

@ -135,7 +135,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 20px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: calc(100vh - 84px);
}

View File

@ -98,7 +98,7 @@ export default {
/* 样式部分与原代码一致,无需修改 */
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
}

View File

@ -230,7 +230,7 @@ export default {
/* 样式部分与原代码一致,无需修改 */
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;

View File

@ -191,7 +191,7 @@ export default {
.tool-container {
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}
.back-container {

View File

@ -102,7 +102,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
}

View File

@ -224,7 +224,7 @@ export default {
/* 与PerformanceDetail保持一致的样式规范 */
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;

View File

@ -244,7 +244,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;

View File

@ -234,7 +234,7 @@ export default {
.tool-container {
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}
.back-container {

View File

@ -159,7 +159,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
}

View File

@ -399,7 +399,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;

View File

@ -231,7 +231,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 20px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: calc(100vh - 85px);
display: flex;
flex-direction: column;

View File

@ -361,7 +361,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 20px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: calc(100vh - 85px);
display: flex;
flex-direction: column;

View File

@ -372,7 +372,7 @@ export default {
.rejection-item-container {
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}
.back-container {

View File

@ -86,7 +86,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;

View File

@ -201,7 +201,7 @@ export default {
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;

View File

@ -61,7 +61,7 @@ export default {
width: 100%;
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}
.back-container {

View File

@ -196,7 +196,7 @@ export default {
.tool-container {
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
//background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}
.back-container {