update 修复bug 参数对象增加审批状态

This commit is contained in:
2026-03-02 09:42:56 +08:00
parent c2c862b246
commit ff5a808044

View File

@@ -20,8 +20,8 @@
<el-icon class="icon-style" v-if="data.type != 3" :size="18"><Folder /></el-icon>
<el-icon class="icon-style" v-else :size="18"><Document /></el-icon>
<div class="name" :title="data.name">{{ data.name }}</div>
<!-- 审批中的节点 不允许修改删除 -->
<div class="options" v-if="!data.shenpi">
<!-- 审批中的节点 不允许修改删除 0-审核完成1-文件上传审核中3-文件删除审核中-->
<div class="options" v-if="!data.approveType">
<div class="edit" @click="openEditFun(data)">
<el-icon>
<EditPen />
@@ -33,6 +33,15 @@
</el-icon>
</div>
</div>
<div class="options" v-else>
{{
data.approveType === 1
? '上传审核中'
: data.approveType === 3
? '删除审核中'
: ''
}}
</div>
</div>
</template>
</el-tree>
@@ -44,7 +53,7 @@
ref="paramTableRef"
tableName="PARAMETER_LIST"
hidePagination
:actionList="currentNode.shenpi ? [] : actionList"
:actionList="currentNode.approveType ? [] : actionList"
>
<template #leftOptions>
<div class="options">
@@ -70,13 +79,13 @@
新增参数对象
</el-button>
<template v-if="currentNode?.type === 3">
<el-button v-if="!currentNode.shenpi" type="primary" @click="openParamFun"
<el-button v-if="!currentNode.approveType" type="primary" @click="openParamFun"
>新增参数</el-button
>
<el-button
v-if="
objFormatFun(newParamTableData) !== objFormatFun(paramTableData) &&
!currentNode.shenpi
!currentNode.approveType
"
type="primary"
@click="updateParamFun"
@@ -125,12 +134,12 @@
>
{{ paramObjInfo?.parameterLibraryCategoryName }}
</el-descriptions-item>
<el-descriptions-item
<!-- <el-descriptions-item
v-if="paramObjInfo?.parameterLibraryCategoryObjectName"
label="对象名称"
>
{{ currentNode.name }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="创建时间">
{{ currentNode.createTime }}
</el-descriptions-item>
@@ -157,7 +166,12 @@
:lib-type-info="currentNode"
@createFun="creatLibParamObjFun"
/>
<ApproveDel v-model="approveDelShow" :api="deleteSimulationParameterApi" :params="delParams" />
<ApproveDel
v-model="approveDelShow"
:api="deleteSimulationParameterApi"
:params="delParams"
@confirm="deleteConfirmFun"
/>
<Edit v-model="editShow" :data="editData" @confirm="resetTreeFun" />
<ParamDetail
v-model="paramDetailShow"
@@ -394,6 +408,13 @@ const creatLibParamObjFun = async (data: any) => {
showParamObjVisible.value = false;
};
const deleteConfirmFun = () => {
const node = libTreeRef.value.getNode(currentNode.value.nodeKey);
if (node) {
node.data.approveType = 3;
}
};
const deleteParamFun = async (flag: any, row?: any) => {
// 如果删除的是参数,要走审批流程
if (flag === 'param') {
@@ -518,6 +539,7 @@ const objFormatFun = (data: any) => {
align-items: center;
justify-content: flex-end;
padding-right: 5px;
color: var(--el-color-warning);
.edit {
margin-left: 12px;
color: var(--el-color-primary);