fix
This commit is contained in:
parent
d53901e00a
commit
501742b95a
@ -11,7 +11,7 @@ export default {
|
|||||||
url: '/custom/activiti/handleApproval',
|
url: '/custom/activiti/handleApproval',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//撤回
|
// 撤回
|
||||||
RETURN_ENGINE_CHECK: {
|
RETURN_ENGINE_CHECK: {
|
||||||
url: '/custom/activiti/returnApproval',
|
url: '/custom/activiti/returnApproval',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
|||||||
@ -19,28 +19,28 @@ export default {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
|
|
||||||
//测试文件上传
|
// 测试文件上传
|
||||||
TEST_FILE_UPLOAD: {
|
TEST_FILE_UPLOAD: {
|
||||||
url: '/custom/benchmark/uploadFile',
|
url: '/custom/benchmark/uploadFile',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取用户列表
|
// 获取用户列表
|
||||||
SELECT_USER_BY_DEPT: {
|
SELECT_USER_BY_DEPT: {
|
||||||
url: '/custom/responsible/getUserByDepartmentId',
|
url: '/custom/responsible/getUserByDepartmentId',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//保存责任管理
|
// 保存责任管理
|
||||||
SAVE_MANAGER_DATA: {
|
SAVE_MANAGER_DATA: {
|
||||||
url: '/custom/responsible/saveResponsiblePerson',
|
url: '/custom/responsible/saveResponsiblePerson',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//判断是否是责任人
|
// 判断是否是责任人
|
||||||
IS_RESPONSIBLE: {
|
IS_RESPONSIBLE: {
|
||||||
url: '/custom/responsible/isResponsiblePerson',
|
url: '/custom/responsible/isResponsiblePerson',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//获取责任人
|
// 获取责任人
|
||||||
GET_MANAGER_DATA: {
|
GET_MANAGER_DATA: {
|
||||||
url: '/custom/responsible/getDeptResponsible',
|
url: '/custom/responsible/getDeptResponsible',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
url: '/custom/responsible/deleteResponsiblePerson',
|
url: '/custom/responsible/deleteResponsiblePerson',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//新增填写人管理
|
// 新增填写人管理
|
||||||
SAVE_FILLER_DATA: {
|
SAVE_FILLER_DATA: {
|
||||||
url: '/custom/responsible/saveFilledPerson',
|
url: '/custom/responsible/saveFilledPerson',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@ -66,12 +66,12 @@ export default {
|
|||||||
url: '/custom/responsible/getAllSubsystem',
|
url: '/custom/responsible/getAllSubsystem',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//判断是否是填写人
|
// 判断是否是填写人
|
||||||
IS_FILLER: {
|
IS_FILLER: {
|
||||||
url: '/custom/filler/isFillerPerson',
|
url: '/custom/filler/isFillerPerson',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//获取填写人
|
// 获取填写人
|
||||||
GET_FILLER_DATA: {
|
GET_FILLER_DATA: {
|
||||||
url: '/custom/responsible/getDeptFilled',
|
url: '/custom/responsible/getDeptFilled',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@ -106,7 +106,7 @@ export default {
|
|||||||
url: '/custom/common/insertModelCommon',
|
url: '/custom/common/insertModelCommon',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//填写人退回
|
// 填写人退回
|
||||||
HANDLE_FILLER_BACK: {
|
HANDLE_FILLER_BACK: {
|
||||||
url: '/custom/todoTaskPojo/todoReturn',
|
url: '/custom/todoTaskPojo/todoReturn',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@ -115,37 +115,37 @@ export default {
|
|||||||
url: '/custom/engineParamDetailPojo/selectParamList',
|
url: '/custom/engineParamDetailPojo/selectParamList',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//获取待办列表
|
// 获取待办列表
|
||||||
GET_TODO_LIST: {
|
GET_TODO_LIST: {
|
||||||
url: '/custom/todoTaskPojo/selectByresPersonTodoPage',
|
url: '/custom/todoTaskPojo/selectByresPersonTodoPage',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//获取创建人待办
|
// 获取创建人待办
|
||||||
GET_TODO_LIST_BY_CREATOR: {
|
GET_TODO_LIST_BY_CREATOR: {
|
||||||
url: '/custom/todoTaskPojo/selectByPage',
|
url: '/custom/todoTaskPojo/selectByPage',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//更新参数
|
// 更新参数
|
||||||
UPDATE_PARAM: {
|
UPDATE_PARAM: {
|
||||||
url: '/custom/engineParamDetailPojo/updateParamValue?userID=',
|
url: '/custom/engineParamDetailPojo/updateParamValue?userID=',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//导出模板
|
// 导出模板
|
||||||
EXPORT_TEMPLATE: {
|
EXPORT_TEMPLATE: {
|
||||||
url: '/custom/engineParamDetailPojo/excelExport',
|
url: '/custom/engineParamDetailPojo/excelExport',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//导入
|
// 导入
|
||||||
IMPORT_ENGINE_MODEL: {
|
IMPORT_ENGINE_MODEL: {
|
||||||
url: '/custom/engineParamDetailPojo/excelImport',
|
url: '/custom/engineParamDetailPojo/excelImport',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//责任人分发
|
// 责任人分发
|
||||||
HANDLE_RESPONSIBLE_DISPATCH: {
|
HANDLE_RESPONSIBLE_DISPATCH: {
|
||||||
url: '/custom/engineParamDetailPojo/updateToInsertFiledBy?userID=',
|
url: '/custom/engineParamDetailPojo/updateToInsertFiledBy?userID=',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//分发给责任人
|
// 分发给责任人
|
||||||
HANDLE_TODO_DISPATCH: {
|
HANDLE_TODO_DISPATCH: {
|
||||||
url: '/custom/todoTaskPojo/createResPerson?userID=',
|
url: '/custom/todoTaskPojo/createResPerson?userID=',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
|
|||||||
@ -1,30 +1,30 @@
|
|||||||
export default {
|
export default {
|
||||||
//添加模板
|
// 添加模板
|
||||||
ADD_MODEL: {
|
ADD_MODEL: {
|
||||||
url: '/custom/template/insertTemplate',
|
url: '/custom/template/insertTemplate',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//模板管理列表
|
// 模板管理列表
|
||||||
GET_MODEL_LIST: {
|
GET_MODEL_LIST: {
|
||||||
url: '/custom/template/getTemplateByCondition',
|
url: '/custom/template/getTemplateByCondition',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//导入模板
|
// 导入模板
|
||||||
IMPORT_MODEL: {
|
IMPORT_MODEL: {
|
||||||
url: '/custom/template/import',
|
url: '/custom/template/import',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//修改模板
|
// 修改模板
|
||||||
EDIT_MODEL: {
|
EDIT_MODEL: {
|
||||||
url: '/custom/template/updateTemplate',
|
url: '/custom/template/updateTemplate',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//查看版本
|
// 查看版本
|
||||||
CHECK_MODEL_VERISON: {
|
CHECK_MODEL_VERISON: {
|
||||||
url: '/custom/template/getTemplateVersion',
|
url: '/custom/template/getTemplateVersion',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//下载
|
// 下载
|
||||||
DOWNLODE_MODEL: {
|
DOWNLODE_MODEL: {
|
||||||
url: '/custom/template/export',
|
url: '/custom/template/export',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@ -33,22 +33,22 @@ export default {
|
|||||||
url: '/custom/template/exportMultiple',
|
url: '/custom/template/exportMultiple',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//获取部门
|
// 获取部门
|
||||||
GET_DEPARTMENT: {
|
GET_DEPARTMENT: {
|
||||||
url: '/custom/template/getDept',
|
url: '/custom/template/getDept',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//查询详情
|
// 查询详情
|
||||||
GET_MODEL_DETAIL: {
|
GET_MODEL_DETAIL: {
|
||||||
url: '/custom/parameter/getParameterByCondition',
|
url: '/custom/parameter/getParameterByCondition',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//添加参数
|
// 添加参数
|
||||||
ADD_MODEL_PARAM: {
|
ADD_MODEL_PARAM: {
|
||||||
url: '/custom/parameter/insertParameter',
|
url: '/custom/parameter/insertParameter',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//维护参数
|
// 维护参数
|
||||||
EDIT_MODEL_PARAM: {
|
EDIT_MODEL_PARAM: {
|
||||||
url: '/custom/parameter/maintenanceParameters',
|
url: '/custom/parameter/maintenanceParameters',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@ -69,30 +69,31 @@ export default {
|
|||||||
url: '/custom/approval/handleApproval',
|
url: '/custom/approval/handleApproval',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
//获取审批详情
|
// 获取审批详情
|
||||||
// GET_APPROVAL_DETAIL: {
|
// GET_APPROVAL_DETAIL: {
|
||||||
// url: '/custom/approval/getApprovalDetail',
|
// url: '/custom/approval/getApprovalDetail',
|
||||||
// method: 'get'
|
// method: 'get'
|
||||||
// },
|
// },
|
||||||
//获取所有人
|
// 获取所有人
|
||||||
GET_ALLUSERS: {
|
GET_ALLUSERS: {
|
||||||
url: '/custom/approval/getUsersByCondition',
|
url: '/custom/approval/getUsersByCondition',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//获取审批变更
|
// 获取审批变更
|
||||||
GET_APPROVAL_CHANGE: {
|
GET_APPROVAL_CHANGE: {
|
||||||
url: '/custom/approval/getTemplateChanges',
|
url: '/custom/approval/getTemplateChanges',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
}, //获取审批所有
|
},
|
||||||
|
// 获取审批所有
|
||||||
GET_PPROVAL_ALL: {
|
GET_PPROVAL_ALL: {
|
||||||
url: '/custom/approval/getApprovalProcess',
|
url: '/custom/approval/getApprovalProcess',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
GET_SUB_DEPT: {
|
GET_SUB_DEPT: {
|
||||||
url: '/custom/responsible/getSubDepartmentById',
|
url: '/custom/responsible/getSubDepartmentById',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//处理模板审批撤回
|
// 处理模板审批撤回
|
||||||
RETURN_APPROVAL: {
|
RETURN_APPROVAL: {
|
||||||
url: '/custom/approval/handleReturn',
|
url: '/custom/approval/handleReturn',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@ -105,7 +106,7 @@ export default {
|
|||||||
url: '/custom/approval/directSendingApproval',
|
url: '/custom/approval/directSendingApproval',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
|
|
||||||
GET_CAN_RETURN_NODE: {
|
GET_CAN_RETURN_NODE: {
|
||||||
url: '/custom/approval/getReturnNodes',
|
url: '/custom/approval/getReturnNodes',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
|||||||
@ -1557,7 +1557,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.return-opinion-section {
|
.return-opinion-section {
|
||||||
|
|||||||
@ -770,7 +770,16 @@ export default {
|
|||||||
// 新增的图表展示在第一个
|
// 新增的图表展示在第一个
|
||||||
this.chartList.unshift(newChart)
|
this.chartList.unshift(newChart)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
// 优先初始化新加的图表
|
||||||
this.initChart(0)
|
this.initChart(0)
|
||||||
|
// 如果存在其他未初始化的图表,补充初始化一次,避免索引变动导致未挂载
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.chartList.forEach((chart, idx) => {
|
||||||
|
if (!chart.chartInstance) {
|
||||||
|
this.initChart(idx)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toggleFloatingPanel() {
|
toggleFloatingPanel() {
|
||||||
@ -799,6 +808,14 @@ export default {
|
|||||||
chart.chartInstance = null
|
chart.chartInstance = null
|
||||||
}
|
}
|
||||||
this.chartList.splice(index, 1)
|
this.chartList.splice(index, 1)
|
||||||
|
// 删除后重新检查剩余图表的初始化状态
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.chartList.forEach((c, idx) => {
|
||||||
|
if (c && !c.chartInstance) {
|
||||||
|
this.initChart(idx)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleClearAllCharts() {
|
handleClearAllCharts() {
|
||||||
this.disposeAllCharts()
|
this.disposeAllCharts()
|
||||||
@ -1269,8 +1286,12 @@ export default {
|
|||||||
// 保存新选择的机型信息,用于后续查询
|
// 保存新选择的机型信息,用于后续查询
|
||||||
chart.newSelectedModels = newSelectedModels
|
chart.newSelectedModels = newSelectedModels
|
||||||
|
|
||||||
|
// 先触发查询,再关闭弹窗,避免 currentChartIndex 被重置
|
||||||
|
const chartIndex = this.currentChartIndex
|
||||||
|
if (chartIndex >= 0) {
|
||||||
|
this.handleChartModelQuery(chartIndex)
|
||||||
|
}
|
||||||
this.handleAddModelDialogClose()
|
this.handleAddModelDialogClose()
|
||||||
this.handleChartModelQuery(this.currentChartIndex)
|
|
||||||
},
|
},
|
||||||
// 图表机型查询
|
// 图表机型查询
|
||||||
handleChartModelQuery(index) {
|
handleChartModelQuery(index) {
|
||||||
@ -1342,7 +1363,7 @@ export default {
|
|||||||
const pojosData = resp.data.pojos || []
|
const pojosData = resp.data.pojos || []
|
||||||
console.log('查询返回的数据:', pojosData)
|
console.log('查询返回的数据:', pojosData)
|
||||||
console.log('新选择的机型:', newSelectedModels)
|
console.log('新选择的机型:', newSelectedModels)
|
||||||
|
|
||||||
if (pojosData.length > 0) {
|
if (pojosData.length > 0) {
|
||||||
// 初始化缓存对象
|
// 初始化缓存对象
|
||||||
if (!chart.cachedModelData) {
|
if (!chart.cachedModelData) {
|
||||||
@ -1355,7 +1376,7 @@ export default {
|
|||||||
pojosData.forEach((modelData) => {
|
pojosData.forEach((modelData) => {
|
||||||
// 尝试多种方式获取机型ID
|
// 尝试多种方式获取机型ID
|
||||||
let modelId = modelData.id || modelData.modelId || modelData.engineModelID || modelData.rowId
|
let modelId = modelData.id || modelData.modelId || modelData.engineModelID || modelData.rowId
|
||||||
|
|
||||||
// 如果无法从数据中获取ID,尝试通过机型名称匹配
|
// 如果无法从数据中获取ID,尝试通过机型名称匹配
|
||||||
if (!modelId) {
|
if (!modelId) {
|
||||||
const modelName = modelData.modelName || modelData.productFullName || ''
|
const modelName = modelData.modelName || modelData.productFullName || ''
|
||||||
@ -1387,7 +1408,7 @@ export default {
|
|||||||
console.warn('无法匹配机型ID,数据:', modelData)
|
console.warn('无法匹配机型ID,数据:', modelData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('缓存数据:', chart.cachedModelData)
|
console.log('缓存数据:', chart.cachedModelData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,15 +20,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button class="update-favorite-button" @click="handleUpdateFavorite"
|
<el-button class="update-favorite-button" @click="handleUpdateFavorite"
|
||||||
>更新常用</el-button
|
>
|
||||||
|
更新常用
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button type="primary" class="add-favorite-button" @click="handleAddFavorite"
|
<el-button type="primary" class="add-favorite-button" @click="handleAddFavorite"
|
||||||
>新增常用</el-button
|
>
|
||||||
|
新增常用
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button class="hidden-params-button" @click="handleShowHiddenParams">
|
<el-button class="hidden-params-button" @click="handleShowHiddenParams">
|
||||||
已隐藏参数
|
已隐藏参数
|
||||||
<span v-if="hiddenParams.length > 0" class="hidden-count"
|
<span v-if="hiddenParams.length > 0" class="hidden-count"
|
||||||
>({{ hiddenParams.length }})</span
|
>({{ hiddenParams.length }})</span
|
||||||
>
|
>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="download-comparison-data-button" @click="handleDownloadComparisonData">
|
<el-button class="download-comparison-data-button" @click="handleDownloadComparisonData">
|
||||||
@ -44,8 +48,12 @@
|
|||||||
<div class="left-param-panel">
|
<div class="left-param-panel">
|
||||||
<div class="tree-search-header">
|
<div class="tree-search-header">
|
||||||
<el-radio-group v-model="treeSearchMode" size="mini" class="search-mode-switch">
|
<el-radio-group v-model="treeSearchMode" size="mini" class="search-mode-switch">
|
||||||
<el-radio-button label="subsystem">子系统</el-radio-button>
|
<el-radio-button label="subsystem">
|
||||||
<el-radio-button label="parts">零部件名称</el-radio-button>
|
子系统
|
||||||
|
</el-radio-button>
|
||||||
|
<el-radio-button label="parts">
|
||||||
|
零部件名称
|
||||||
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<el-input
|
<el-input
|
||||||
@ -78,13 +86,21 @@
|
|||||||
<table class="comparison-table">
|
<table class="comparison-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="subsystem-column">子系统名称</th>
|
<th class="subsystem-column">
|
||||||
<th class="parts-column">零部件名称</th>
|
子系统名称
|
||||||
<th class="param-column">参数名称</th>
|
</th>
|
||||||
|
<th class="parts-column">
|
||||||
|
零部件名称
|
||||||
|
</th>
|
||||||
|
<th class="param-column">
|
||||||
|
参数名称
|
||||||
|
</th>
|
||||||
<th v-for="(model, index) in comparisonModels" :key="index" class="model-column">
|
<th v-for="(model, index) in comparisonModels" :key="index" class="model-column">
|
||||||
<div class="model-header">
|
<div class="model-header">
|
||||||
<div v-if="model.name" class="model-name"
|
<div v-if="model.name" class="model-name"
|
||||||
>{{ model.name }} V{{ model.parameterVersion }}</div
|
>
|
||||||
|
{{ model.name }} V{{ model.parameterVersion }}
|
||||||
|
</div
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
v-if="model.name"
|
v-if="model.name"
|
||||||
@ -107,8 +123,12 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(param, paramIndex) in displayParams" :key="paramIndex">
|
<tr v-for="(param, paramIndex) in displayParams" :key="paramIndex">
|
||||||
<td class="subsystem-column">{{ param.subsystemName }}</td>
|
<td class="subsystem-column">
|
||||||
<td class="parts-column">{{ param.displayPartsName }}</td>
|
{{ param.subsystemName }}
|
||||||
|
</td>
|
||||||
|
<td class="parts-column">
|
||||||
|
{{ param.displayPartsName }}
|
||||||
|
</td>
|
||||||
<td class="param-column">
|
<td class="param-column">
|
||||||
<span class="param-name">{{ getParamDisplayName(param) }}</span>
|
<span class="param-name">{{ getParamDisplayName(param) }}</span>
|
||||||
<i
|
<i
|
||||||
@ -157,7 +177,8 @@
|
|||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="modelName" label="产品型号" min-width="150" />
|
<el-table-column prop="modelName" label="产品型号" min-width="150" />
|
||||||
<el-table-column prop="parameterVersion" label="版本" min-width="70"
|
<el-table-column prop="parameterVersion" label="版本" min-width="70"
|
||||||
><template slot-scope="scope">
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
<span>V{{ scope.row.parameterVersion }}</span>
|
<span>V{{ scope.row.parameterVersion }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -220,7 +241,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleHiddenParamsDialogClose">取消</el-button>
|
<el-button @click="handleHiddenParamsDialogClose">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="selectedParamsToRestore.length === 0"
|
:disabled="selectedParamsToRestore.length === 0"
|
||||||
@ -255,7 +278,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleAddFavoriteDialogClose">取消</el-button>
|
<el-button @click="handleAddFavoriteDialogClose">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
<el-button type="primary" :loading="savingFavorite" @click="handleConfirmAddFavorite">
|
<el-button type="primary" :loading="savingFavorite" @click="handleConfirmAddFavorite">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -2084,40 +2109,40 @@ export default {
|
|||||||
// 先加载所有参数数据,然后根据参数数据构建树结构(包括"整车参数")
|
// 先加载所有参数数据,然后根据参数数据构建树结构(包括"整车参数")
|
||||||
this.loadAllParametersData().then(() => {
|
this.loadAllParametersData().then(() => {
|
||||||
// 加载树结构数据
|
// 加载树结构数据
|
||||||
const request = {
|
const request = {
|
||||||
...api.GET_ENGINE_DETAIL_QUERY,
|
...api.GET_ENGINE_DETAIL_QUERY,
|
||||||
params: {
|
params: {
|
||||||
tcData: 'tc'
|
tcData: 'tc'
|
||||||
},
|
},
|
||||||
disableSuccessMsg: true
|
disableSuccessMsg: true
|
||||||
}
|
}
|
||||||
this.$request(request)
|
this.$request(request)
|
||||||
.asyncThen((resp) => {
|
.asyncThen((resp) => {
|
||||||
// 处理接口返回的数据
|
// 处理接口返回的数据
|
||||||
let treeDataResult = []
|
let treeDataResult = []
|
||||||
if (resp && resp.data) {
|
if (resp && resp.data) {
|
||||||
// 接口返回的是对象格式:{ "父节点名": ["子节点1", "子节点2", ...] }
|
// 接口返回的是对象格式:{ "父节点名": ["子节点1", "子节点2", ...] }
|
||||||
const data = resp.data
|
const data = resp.data
|
||||||
if (typeof data === 'object' && !Array.isArray(data)) {
|
if (typeof data === 'object' && !Array.isArray(data)) {
|
||||||
treeDataResult = this.convertObjectToTree(data)
|
treeDataResult = this.convertObjectToTree(data)
|
||||||
} else if (Array.isArray(data)) {
|
} else if (Array.isArray(data)) {
|
||||||
// 如果已经是数组格式,尝试格式化
|
// 如果已经是数组格式,尝试格式化
|
||||||
treeDataResult = this.formatTreeData(data)
|
treeDataResult = this.formatTreeData(data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 根据接口返回的"整车参数"参数数据构建树结构
|
// 根据接口返回的"整车参数"参数数据构建树结构
|
||||||
const wholeEngineParamsNode = this.buildWholeEngineParamsNode()
|
const wholeEngineParamsNode = this.buildWholeEngineParamsNode()
|
||||||
|
|
||||||
// 将"整车参数"节点放在第一位,其他节点放在后面
|
// 将"整车参数"节点放在第一位,其他节点放在后面
|
||||||
treeDataResult = [wholeEngineParamsNode, ...treeDataResult]
|
treeDataResult = [wholeEngineParamsNode, ...treeDataResult]
|
||||||
|
|
||||||
// 保存完整的树数据(未过滤)
|
// 保存完整的树数据(未过滤)
|
||||||
this.allTreeData = JSON.parse(JSON.stringify(treeDataResult))
|
this.allTreeData = JSON.parse(JSON.stringify(treeDataResult))
|
||||||
this.allNodeMap = JSON.parse(JSON.stringify(this.nodeMap))
|
this.allNodeMap = JSON.parse(JSON.stringify(this.nodeMap))
|
||||||
|
|
||||||
// 始终使用完整的树数据
|
// 始终使用完整的树数据
|
||||||
this.treeData = JSON.parse(JSON.stringify(this.allTreeData))
|
this.treeData = JSON.parse(JSON.stringify(this.allTreeData))
|
||||||
|
|
||||||
// 如果已选择常用配置,根据可显示的参数更新选中状态
|
// 如果已选择常用配置,根据可显示的参数更新选中状态
|
||||||
if (this.currentCommonConfig) {
|
if (this.currentCommonConfig) {
|
||||||
@ -2142,12 +2167,12 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
.asyncErrorCatch((err) => {
|
|
||||||
console.error('获取参数列表失败:', err)
|
|
||||||
this.$message.error('获取参数列表失败')
|
|
||||||
})
|
})
|
||||||
})
|
.asyncErrorCatch((err) => {
|
||||||
|
console.error('获取参数列表失败:', err)
|
||||||
|
this.$message.error('获取参数列表失败')
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 加载所有参数数据
|
// 加载所有参数数据
|
||||||
loadAllParametersData() {
|
loadAllParametersData() {
|
||||||
@ -2167,12 +2192,12 @@ export default {
|
|||||||
if (Array.isArray(resp.data)) {
|
if (Array.isArray(resp.data)) {
|
||||||
resp.data.forEach((item) => {
|
resp.data.forEach((item) => {
|
||||||
if (item.subsystem && Array.isArray(item.parameters)) {
|
if (item.subsystem && Array.isArray(item.parameters)) {
|
||||||
result[item.subsystem] = item.parameters.map((param) => ({
|
result[item.subsystem] = item.parameters.map((param) => ({
|
||||||
parameterId: param.parameterId || '',
|
parameterId: param.parameterId || '',
|
||||||
parameterName: param.parameterName || '',
|
parameterName: param.parameterName || '',
|
||||||
partsName: param.partsName || '',
|
partsName: param.partsName || '',
|
||||||
subsystem: item.subsystem // 保存子系统名称
|
subsystem: item.subsystem // 保存子系统名称
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user