bug修复
This commit is contained in:
parent
5c416d7559
commit
c344954779
|
|
@ -0,0 +1,59 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析规则配置接口(统一处理解析规则相关数据交互)
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 1. 查询解析规则配置列表(支持按模板ID、规则类型等筛选)
|
||||||
|
export function listAnalysisRuleSet(query) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/analysisRuleSet/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 查询解析规则配置详情(携带解析规则ID,包含关联定位查询规则信息)
|
||||||
|
export function getAnalysisRuleSetDetail(params) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/analysisRuleSet/detail',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 新增解析规则配置(携带解析名称、模板ID等基础信息)
|
||||||
|
export function addAnalysisRuleSet(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/analysisRuleSet/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 修改解析规则配置(携带解析规则ID,更新配置信息)
|
||||||
|
export function updateAnalysisRuleSet(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/analysisRuleSet/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 删除解析规则配置(携带解析规则ID,级联删除关联的定位查询规则)
|
||||||
|
export function delAnalysisRuleSet(params) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/analysisRuleSet/delete',
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 校验解析规则名称唯一性(新增/编辑时使用,避免重复)
|
||||||
|
export function checkAnalysisNameUnique(params) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/analysisRuleSet/checkNameUnique',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -48,6 +48,7 @@
|
||||||
<ProjectFile
|
<ProjectFile
|
||||||
ref="projectFileRef"
|
ref="projectFileRef"
|
||||||
title="项目文件"
|
title="项目文件"
|
||||||
|
:is-edit-mode="type === 'edit'"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -57,6 +58,7 @@
|
||||||
<SectionFile
|
<SectionFile
|
||||||
ref="sectionFileRef"
|
ref="sectionFileRef"
|
||||||
title="标段/标包文件"
|
title="标段/标包文件"
|
||||||
|
:is-edit-mode="type === 'edit'"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -254,8 +256,6 @@ export default {
|
||||||
|
|
||||||
// 向子组件传递数据
|
// 向子组件传递数据
|
||||||
this.$refs.basicInfoRef.setFormData(detail);
|
this.$refs.basicInfoRef.setFormData(detail);
|
||||||
// 注意:这里假设 detail.projectFiles 和 detail.sectionFiles 的结构
|
|
||||||
// 与子组件 setFormData 期望的结构一致。
|
|
||||||
this.$refs.projectFileRef.setFormData(detail.projectFiles || []);
|
this.$refs.projectFileRef.setFormData(detail.projectFiles || []);
|
||||||
this.$refs.sectionFileRef.setFormData(detail.sectionFiles || []);
|
this.$refs.sectionFileRef.setFormData(detail.sectionFiles || []);
|
||||||
this.$refs.analysisLabelRef.setFormData(detail);
|
this.$refs.analysisLabelRef.setFormData(detail);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
type="card"
|
type="card"
|
||||||
class="file-tabs"
|
class="file-tabs"
|
||||||
@tab-remove="handleRemoveTab"
|
@tab-remove="handleRemoveTab"
|
||||||
@tab-click="handleTabChange"
|
v-on="isEditMode ? { 'tab-click': handleTabChange } : {}"
|
||||||
>
|
>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="(tab, index) in fileTabs"
|
v-for="(tab, index) in fileTabs"
|
||||||
|
|
@ -103,6 +103,11 @@ export default {
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '模板组成-标段/标包文件'
|
default: '模板组成-标段/标包文件'
|
||||||
|
},
|
||||||
|
|
||||||
|
isEditMode: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@
|
||||||
|
|
||||||
<!-- 操作按钮:调整更多按钮样式,增加菜单项 -->
|
<!-- 操作按钮:调整更多按钮样式,增加菜单项 -->
|
||||||
<template slot="handle" slot-scope="{ data }">
|
<template slot="handle" slot-scope="{ data }">
|
||||||
<!-- 解析规则按钮(保持原有样式) -->
|
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
v-hasPermi="['template:info:detail']"
|
v-hasPermi="['template:info:detail']"
|
||||||
|
|
@ -244,16 +243,14 @@ export default {
|
||||||
|
|
||||||
// 查看模板详情
|
// 查看模板详情
|
||||||
handleDetail(data) {
|
handleDetail(data) {
|
||||||
if (data && data.templateId) {
|
this.$router.push({
|
||||||
console.log('关联的组成数据:', data.compositionList);
|
name: "AnalysisRule",
|
||||||
const encryptedId = encryptWithSM4(data.templateId.toString());
|
query: {
|
||||||
this.$router.push({
|
analysisLabelId: encryptWithSM4(data.analysisLabelId.toString()),
|
||||||
name: 'TemplateRule',
|
templateId: encryptWithSM4(data.templateId.toString())
|
||||||
query: { templateId: encryptedId }
|
},
|
||||||
});
|
title: '解析规则'
|
||||||
} else {
|
});
|
||||||
this.$modal.msgError('获取模板ID失败,请重试');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 切换模板状态
|
// 切换模板状态
|
||||||
|
|
@ -280,7 +277,7 @@ export default {
|
||||||
this.$modal.confirm(`是否确认删除“${row.templateName}”模板?`)
|
this.$modal.confirm(`是否确认删除“${row.templateName}”模板?`)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
delTemplateInfo({
|
delTemplateInfo({
|
||||||
templateId: encryptWithSM4(row.templateId.toString())
|
templateId: row.templateId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功');
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue