c987b33d by lihua

数据产品目录修改

1 parent ca58d6b4
......@@ -987,7 +987,7 @@ const save = () => {
}
params.associationApi = associationApiList;
/** 只有数据集和api类型时,目录表必填。 */
if ((params.damType == '1' || params.damType == '2') && route.query.foundMode != '2') {
if ((params.damType == '1') && route.query.foundMode != '2') {
if (!params.databaseType) {
proxy.$ElMessage.error('资源类型为数据集时,数据库类型必填');
baseInfoExpand.value = true;
......@@ -1004,6 +1004,12 @@ const save = () => {
return;
}
}
if (params.damType == '2' && route.query.foundMode != '2') {
if (!associationApiList?.length) {
proxy.$ElMessage.error('资源类型为数据接口时,服务包不能为空');
return;
}
}
if (params.coverageArea == 'all') {
params.coverageArea = [['all']];
} else if (!params.coverageArea) {
......@@ -1178,7 +1184,7 @@ const handleImportSave = (val) => {
<Form ref="baseInfoFormRef" :itemList="baseInfoFormItems" formId="base-info-form" :rules="baseInfoFormRules"
@selectChange="baseSelectChange" @checkboxChange="handleBaseInfoCheckboxChange" col="col3" />
</ContentWrap>
<ContentWrap id="product-info" title="服务包信息" expandSwicth style="margin-top: 15px" :isExpand="expandServiceInfo"
<ContentWrap v-if="baseInfoFormRef?.formInline?.damType == '2'" id="product-info" title="服务包信息" expandSwicth style="margin-top: 15px" :isExpand="expandServiceInfo"
@expand="(v) => (expandServiceInfo = v)" description="" class="mb16">
<Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table"
@table-select-change="hanldeTableSelectChange" />
......@@ -1186,7 +1192,7 @@ const handleImportSave = (val) => {
<el-button link @click="addProduct" :icon="CirclePlus" v-preReClick>添加服务</el-button>
</div>
</ContentWrap>
<ContentWrap id="id-tableInfo" title="资源表" description="" :expand-swicth="true" :isExpand="assetTableInfoExpand"
<ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2'" id="id-tableInfo" title="资源表" description="" :expand-swicth="true" :isExpand="assetTableInfoExpand"
@expand="(v) => assetTableInfoExpand = v">
<div v-show="assetDataTableInfo.data.length" class="tools_btns">
<el-button type="primary" @click="handleCreateTable" v-preReClick>添加</el-button>
......@@ -1256,4 +1262,22 @@ const handleImportSave = (val) => {
white-space: break-spaces;
color: #999;
}
.row-add-btn {
.el-button--default {
padding: 4px 0px;
margin-top: 4px;
}
:deep(.el-icon) {
width: 16px;
height: 16px;
svg {
width: 16px;
height: 16px;
}
}
}
</style>
......
......@@ -108,20 +108,20 @@ const searchItemList = ref([
label: 'label'
}
},
// {
// type: "select",
// label: "",
// field: "isRegister",
// default: "",
// placeholder: "登记状态",
// clearable: true,
// filterable: true,
// options: isRegisterOptions.value,
// props: {
// value: 'value',
// label: 'label'
// }
// },
{
type: "select",
label: "",
field: "isRegister",
default: "",
placeholder: "登记状态",
clearable: true,
filterable: true,
options: isRegisterOptions.value,
props: {
value: 'value',
label: 'label'
}
},
]);
const pageInfo = ref({
......
......@@ -189,56 +189,61 @@ const tableInfo = ref({
btns: (scope) => {
const { row } = scope;
let list: any = [];
const approveVO = row.approveVO || {};
if (!approveVO && row.isApprove == 'N') {
list.push({ label: "编辑", value: "edit", click: apiManageTableBtnMap.EDIT });
list.push({ label: "删除", value: "del", click: apiManageTableBtnMap.DELETE });
list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL });
list.push({ label: "复制", value: "copy", click: apiManageTableBtnMap.COPY })
return list;
}
const currentStaffGuid = userData.staffGuid
const bizApproveState = row.bizApproveState;
const approveState = approveVO.approveState || null;
const approveStaffGuids = approveVO.approveStaffGuids || [];
const staffGuid = approveVO.staffGuid || '';
let isShowCancel = false;
let flowState;
if (approveState == 'N') {
flowState = 1;
}
if (approveState == 'A' && approveStaffGuids.indexOf(currentStaffGuid) > -1) {
flowState = 2;
}
if ((approveState == 'C' || approveState == 'R') && staffGuid == currentStaffGuid) {
flowState = 3;
}
if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
isShowCancel = true;
}
if (flowState === 1) {
list = [{ label: "编辑", value: "edit", click: apiManageTableBtnMap.EDIT }]
}
if (flowState === 2) {
list = [{ label: "通过", value: "pass", click: apiManageTableBtnMap.PASS }, { label: "驳回", value: "reject", click: apiManageTableBtnMap.REJECT }]
}
if (approveState == 'Y' && row.apiState != 1 && staffGuid == currentStaffGuid) {
list = [{ label: "编辑", value: "edit", click: apiManageTableBtnMap.EDIT }]
}
if (flowState === 3 || (row.apiState != 1 && approveState !== 'A')) {
list.push({ label: "删除", value: "del", click: apiManageTableBtnMap.DELETE })
}
if (flowState === 3 && bizApproveState != 'D') {
list.push({ label: "重新提交", value: "redit", click: apiManageTableBtnMap.EDIT })
}
if (isShowCancel) {
list.push({ label: "撤销", value: "revoke", click: apiManageTableBtnMap.REVOKE })
}
if (flowState !== 1) {
list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL })
}
list.push({ label: "复制", value: "copy", click: apiManageTableBtnMap.COPY })
return list
// const approveVO = row.approveVO || {};
// if (!approveVO && row.isApprove == 'N') {
// list.push({ label: "编辑", value: "edit", click: apiManageTableBtnMap.EDIT });
// list.push({ label: "删除", value: "del", click: apiManageTableBtnMap.DELETE });
// list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL });
// list.push({ label: "复制", value: "copy", click: apiManageTableBtnMap.COPY })
// return list;
// }
// const currentStaffGuid = userData.staffGuid
// const bizApproveState = row.bizApproveState;
// const approveState = approveVO.approveState || null;
// const approveStaffGuids = approveVO.approveStaffGuids || [];
// const staffGuid = approveVO.staffGuid || '';
// let isShowCancel = false;
// let flowState;
// if (approveState == 'N') {
// flowState = 1;
// }
// if (approveState == 'A' && approveStaffGuids.indexOf(currentStaffGuid) > -1) {
// flowState = 2;
// }
// if ((approveState == 'C' || approveState == 'R') && staffGuid == currentStaffGuid) {
// flowState = 3;
// }
// if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
// isShowCancel = true;
// }
// if (flowState === 1) {
// list = [{ label: "编辑", value: "edit", click: apiManageTableBtnMap.EDIT }]
// }
// if (flowState === 2) {
// list = [{ label: "通过", value: "pass", click: apiManageTableBtnMap.PASS }, { label: "驳回", value: "reject", click: apiManageTableBtnMap.REJECT }]
// }
// if (approveState == 'Y' && row.apiState != 1 && staffGuid == currentStaffGuid) {
// list = [{ label: "编辑", value: "edit", click: apiManageTableBtnMap.EDIT }]
// }
// if (flowState === 3 || (row.apiState != 1 && approveState !== 'A')) {
// list.push({ label: "删除", value: "del", click: apiManageTableBtnMap.DELETE })
// }
// if (flowState === 3 && bizApproveState != 'D') {
// list.push({ label: "重新提交", value: "redit", click: apiManageTableBtnMap.EDIT })
// }
// if (isShowCancel) {
// list.push({ label: "撤销", value: "revoke", click: apiManageTableBtnMap.REVOKE })
// }
// if (flowState !== 1) {
// list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL })
// }
// list.push({ label: "复制", value: "copy", click: apiManageTableBtnMap.COPY })
// return list
},
}
});
......@@ -259,22 +264,27 @@ const apiManageTableBtnMap = {
/** 详情 */
DETAIL: (scope) => {
let row = scope.row;
const approveVO = row.approveVO || {};
if (!approveVO && row.isApprove == 'N') {
router.push({
name: 'apiDetail',
query: { guid: row.guid, type: 'detail' }
});
return;
}
if (!row.approveGuid) {
proxy.$ElMessage.error(`【${row.apiName}】关联流程已删除!`);
return;
}
router.push({
name: 'APIProcessDetail',
query: { guid: row.approveGuid, type: 'detail' }
});
// const approveVO = row.approveVO || {};
// if (!approveVO && row.isApprove == 'N') {
// router.push({
// name: 'apiDetail',
// query: { guid: row.guid, type: 'detail' }
// });
// return;
// }
// if (!row.approveGuid) {
// proxy.$ElMessage.error(`【${row.apiName}】关联流程已删除!`);
// return;
// }
// router.push({
// name: 'APIProcessDetail',
// query: { guid: row.approveGuid, type: 'detail' }
// });
},
/** 撤回 */
REVOKE: (scope) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!