@@ -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)
+ })
})
},
// 开始上传
diff --git a/src/views/analysis/components/BidForm.vue b/src/views/analysis/components/BidForm.vue
index 06aa51e..d2e7497 100644
--- a/src/views/analysis/components/BidForm.vue
+++ b/src/views/analysis/components/BidForm.vue
@@ -14,7 +14,7 @@
+ maxlength="32">
+ maxlength="32">
-
+
@@ -51,26 +51,16 @@
+
diff --git a/src/views/analysis/config.js b/src/views/analysis/config.js
index 5cc07d3..f915690 100644
--- a/src/views/analysis/config.js
+++ b/src/views/analysis/config.js
@@ -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: '解析状态' }
]
\ No newline at end of file
diff --git a/src/views/analysis/index.vue b/src/views/analysis/index.vue
index 65cd7ec..f82d47e 100644
--- a/src/views/analysis/index.vue
+++ b/src/views/analysis/index.vue
@@ -43,7 +43,7 @@
+ :width="600" @handleQuery="handleQuery" />